|
|
|
|
@ -103,7 +103,7 @@ public class WmsInstockDetailServiceImpl implements IWmsInstockDetailService {
|
|
|
|
|
.select(BaseMaterialInfo::getInspectionRequest)
|
|
|
|
|
.leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInstockDetail::getMaterialId)
|
|
|
|
|
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getIsInspection()), WmsInstockDetail::getIsInspection, bo.getIsInspection())
|
|
|
|
|
// .eq(StringUtils.isNotBlank(bo.getIsInspection()), WmsInstockDetail::getIsInspection, bo.getIsInspection())
|
|
|
|
|
.eq(bo.getInstockQty() != null, WmsInstockDetail::getInstockQty, bo.getInstockQty())
|
|
|
|
|
|
|
|
|
|
.eq(bo.getInstockDetailId() != null, WmsInstockDetail::getInstockDetailId, bo.getInstockDetailId())
|
|
|
|
|
@ -141,6 +141,7 @@ public class WmsInstockDetailServiceImpl implements IWmsInstockDetailService {
|
|
|
|
|
baseMaterialInfo.setMaterialId(detailBo.getMaterialId());
|
|
|
|
|
List<BaseMaterialInfoVo> baseMaterialInfoVos = baseMaterialInfoService.queryList(baseMaterialInfo);
|
|
|
|
|
WmsInstockDetail add = MapstructUtils.convert(detailBo, WmsInstockDetail.class);
|
|
|
|
|
add.setMaterialId(baseMaterialInfoVos.get(0).getMaterialId());
|
|
|
|
|
add.setMaterialCode(baseMaterialInfoVos.get(0).getMaterialCode());
|
|
|
|
|
add.setMaterialName(baseMaterialInfoVos.get(0).getMaterialName());
|
|
|
|
|
add.setMaterialSpe(baseMaterialInfoVos.get(0).getMaterialSpec());
|
|
|
|
|
@ -230,6 +231,9 @@ public class WmsInstockDetailServiceImpl implements IWmsInstockDetailService {
|
|
|
|
|
Integer printSeq = (int) wmsInstockPrintService.queryPrintNum(bo) + 1;
|
|
|
|
|
String baseOrder = generateOrder(printSeq);
|
|
|
|
|
BigDecimal totalPackaged = BigDecimal.ZERO;
|
|
|
|
|
Long materialId = bo.getMaterialId();
|
|
|
|
|
BaseMaterialInfoVo baseMaterialInfo = baseMaterialInfoService.queryById(materialId);
|
|
|
|
|
String inspectionRequest = baseMaterialInfo.getInspectionRequest();
|
|
|
|
|
if (splitInt > 1) {
|
|
|
|
|
// 分包逻辑 - 统一处理模式
|
|
|
|
|
List<Integer> packageQtyList = bo.getPackageQtyList();
|
|
|
|
|
@ -258,12 +262,13 @@ public class WmsInstockDetailServiceImpl implements IWmsInstockDetailService {
|
|
|
|
|
WmsInstockPrint print = new WmsInstockPrint();
|
|
|
|
|
BeanUtils.copyProperties(bo, print);
|
|
|
|
|
print.setBatchCode(batchCode);
|
|
|
|
|
print.setMaterialId(bo.getMaterialId());
|
|
|
|
|
print.setMaterialId(materialId);
|
|
|
|
|
print.setApportionQty(BigDecimal.ONE); // 打印的包数:1包
|
|
|
|
|
print.setMaterialQty(currentPackageQty.longValue()); // 每包的物料数量
|
|
|
|
|
print.setInboundStatus("0"); // 入库状态(0-待入库,1-已入库,2-入库中)
|
|
|
|
|
print.setCreateBy(LoginHelper.getUsername());
|
|
|
|
|
print.setCreateTime(new Date());
|
|
|
|
|
print.setInspectionRequest(inspectionRequest);//质检要求(0必检,1免检)
|
|
|
|
|
|
|
|
|
|
wmsInstockPrintService.insertWmsInstockPrint(print);
|
|
|
|
|
|
|
|
|
|
@ -281,10 +286,13 @@ public class WmsInstockDetailServiceImpl implements IWmsInstockDetailService {
|
|
|
|
|
WmsInstockPrint print = new WmsInstockPrint();
|
|
|
|
|
BeanUtils.copyProperties(bo, print);
|
|
|
|
|
print.setBatchCode(batchCode);
|
|
|
|
|
print.setMaterialId(bo.getMaterialId());
|
|
|
|
|
print.setMaterialId(materialId);
|
|
|
|
|
print.setApportionQty(copies); // 打印的包数(打印份数)
|
|
|
|
|
print.setMaterialQty(detail.getInstockQty().longValue()); // 每包的物料数量(全部入库数量)
|
|
|
|
|
print.setInboundStatus("0");//入库状态(0-待入库,1-已入库,2-入库中)
|
|
|
|
|
print.setCreateBy(LoginHelper.getUsername());
|
|
|
|
|
print.setCreateTime(new Date());
|
|
|
|
|
print.setInspectionRequest(inspectionRequest);//质检要求(0必检,1免检)
|
|
|
|
|
|
|
|
|
|
wmsInstockPrintService.insertWmsInstockPrint(print);
|
|
|
|
|
|
|
|
|
|
|