add:增加打包间子卷信息展示

This commit is contained in:
zhangzq
2025-03-08 13:50:32 +08:00
parent 46607940ed
commit d880051422
7 changed files with 40 additions and 86 deletions

View File

@@ -8,7 +8,6 @@ import lombok.*;
import lombok.EqualsAndHashCode;
import org.nl.common.domain.query.BaseQuery;
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
import org.nl.b_lms.sch.point.dto.BstIvtPackageinfoivtVO;
/**
* {@code @Description:} 装箱区点位库存表(BstIvtPackageinfoivt)查询参数类
@@ -17,81 +16,13 @@ import org.nl.b_lms.sch.point.dto.BstIvtPackageinfoivtVO;
* @since 2024-02-27
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class BstIvtPackageinfoivtVO extends BaseQuery<BstIvtPackageinfoivt> {
public class BstIvtPackageinfoivtVO extends BstIvtPackageinfoivt {
/**
* 库存记录标识
* 子卷重量
*/
private Long ivt_id;
private String weight;
/**
* 点位编码
* 管芯重量
*/
private String point_code;
/**
* 点位名称
*/
private String point_name;
/**
* 子卷号
*/
private String container_name;
/**
* 点位类型
*/
private String point_status;
/**
* 库存状态
*/
private String ivt_status;
/**
* 区块
*/
private String block;
/**
* 位置
*/
private String point_location;
/**
* 顺序号
*/
private BigDecimal sort_seq;
/**
* 是否启用
*/
private String is_used;
/**
* 备注
*/
private String remark;
/**
* 创建人
*/
private Long create_id;
/**
* 创建人
*/
private String create_name;
/**
* 创建时间
*/
private String create_time;
/**
* 修改人
*/
private Long update_optid;
/**
* 修改人
*/
private String update_optname;
/**
* 修改时间
*/
private String update_time;
/**
* 规划
*/
private String plan;
private String paper_weight;
}

View File

@@ -26,7 +26,7 @@ public interface IbstIvtPackageinfoivtService extends IService<BstIvtPackageinfo
* @param pageable 分页参数
* @return IPage<BstIvtPackageinfoivt>
*/
IPage<BstIvtPackageinfoivt> queryAll(Map whereJson, PageQuery pageable);
IPage queryAll(Map whereJson, PageQuery pageable);
/**

View File

@@ -15,10 +15,12 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.nl.b_lms.pda.service.PrintTableTwoService;
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
import org.nl.b_lms.pdm.info.service.IPdmBiContainerinfoService;
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
import org.nl.b_lms.sch.point.dao.mapper.BstIvtPackageinfoivtMapper;
import org.nl.b_lms.sch.point.dto.BstIvtPackageinfoivtVO;
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
import org.nl.b_lms.sch.task.dao.SchBaseTask;
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
@@ -31,7 +33,6 @@ import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.system.service.param.impl.SysParamServiceImpl;
import org.nl.wms.ext.mes.service.LmsToMesService;
import org.nl.wms.sch.manage.TaskStatusEnum;
@@ -40,7 +41,6 @@ import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -49,6 +49,7 @@ import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -75,12 +76,14 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
private IbstIvtPackageinfoivtService packageinfoivtService;
@Autowired
private AutoSendVehicleToDjq autoSendVehicleToDjq;
@Resource
@Autowired
private IPdmBiContainerinfoService iPdmBiContainerinfoService;
@Resource
@Autowired
private PrintTableTwoService printTableTwoService;
@Autowired
private IPdmBiSlittingproductionplanService iPdmBiSlittingproductionplanService;
/**
* 查询数据分页
@@ -89,7 +92,7 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
* @param page 分页参数
*/
@Override
public IPage<BstIvtPackageinfoivt> queryAll(Map whereJson, PageQuery page) {
public IPage queryAll(Map whereJson, PageQuery page) {
LambdaQueryWrapper<BstIvtPackageinfoivt> queryWrapper = new QueryWrapper<BstIvtPackageinfoivt>().lambda();
String isUsed = MapUtil.getStr(whereJson, "is_used");
String pointCode = MapUtil.getStr(whereJson, "point_code");
@@ -107,7 +110,24 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
if (StringUtils.isNotEmpty(ivtStatus)) {
queryWrapper.eq(BstIvtPackageinfoivt::getIvt_status, ivtStatus);
}
return bstIvtPackageinfoivtMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), queryWrapper);
Page selectPage = bstIvtPackageinfoivtMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), queryWrapper);
List<BstIvtPackageinfoivt> records = selectPage.getRecords();
Set<String> containers = records.stream().map(BstIvtPackageinfoivt::getContainer_name).filter(a->StringUtils.isNotEmpty(a)).collect(Collectors.toSet());
List<PdmBiSlittingproductionplan> containerInfo = iPdmBiSlittingproductionplanService.list(new QueryWrapper<PdmBiSlittingproductionplan>().in("container_name", containers).select("container_name", "weight", "paper_weight"));
Map<String, PdmBiSlittingproductionplan> listMap = containerInfo.stream().collect(HashMap::new,(m, o) -> m.put(o.getContainer_name(),o), HashMap::putAll);
List<BstIvtPackageinfoivtVO> voRecords = new ArrayList<>();
for (BstIvtPackageinfoivt record : records) {
BstIvtPackageinfoivtVO vo = new BstIvtPackageinfoivtVO();
BeanUtils.copyProperties(record,vo);
PdmBiSlittingproductionplan planInfo = listMap.get(record.getContainer_name());
if (planInfo!=null){
vo.setWeight(planInfo.getWeight());
vo.setPaper_weight(planInfo.getPaper_weight());
}
voRecords.add(vo);
}
selectPage.setRecords(voRecords);
return selectPage;
}

View File

@@ -84,7 +84,7 @@ spring:
reset-enable: false
filters:
DruidFilter,stat
url: jdbc:mysql://127.0.0.1:3306/lz_lms?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://127.0.0.1:3306/lms?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
username: root
password: 123456
rules:

View File

@@ -1,5 +1,5 @@
server:
port: 8011
port: 8013
#配置数据源
spring:
shardingsphere:

View File

@@ -134,6 +134,7 @@ https://juejin.cn/post/6844903775631572999
<root level="info">
<appender-ref ref="asyncLuceneAppender"/>
<appender-ref ref="asyncFileAppender"/>
<appender-ref ref="CONSOLE"/>
</root>
<logger name="jdbc" level="ERROR" additivity="true">
<appender-ref ref="asyncFileAppender"/>