fix(工序出站):拆完后失效的条码从lotNoList移除,否则有自动出站的时候LotRouter查不到

This commit is contained in:
liaohechuan 2024-12-28 18:15:41 +08:00
parent d814ecce61
commit 204bb6e0bf

View File

@ -525,7 +525,7 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
// 拆分的条码完成上一工序
this.completeSplit(operationOutListDTO, shopOrderObj, currentRouterStepBo, site, shopOrder, user, nowTime, ef1List,
operationOutDTO, lotState, resultZLotMaterialCompleteTransaction, isCreateInventory, finallyRouterStepBo);
operationOutDTO, lotState, resultZLotMaterialCompleteTransaction, isCreateInventory, finallyRouterStepBo, lotNoList);
}
}
}
@ -602,7 +602,7 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
}
// 6:生产批调整数据
this.updateDate(site, operationOutDTO, group, resrceBo, resultZLotMaterialCompleteTransaction, shopOrder, sourceMasterLot, isCreateInventory, finallyRouterStepBo, currentRouterStepBo);
this.updateDate(site, operationOutDTO, group, resrceBo, resultZLotMaterialCompleteTransaction, shopOrder, sourceMasterLot, isCreateInventory, finallyRouterStepBo, currentRouterStepBo, lotNoList);
// 出站完成后调用质量模块:创建检验任务和修改表逻辑
processService.qmsCreateInspecJobAndUpadteTables(site, user, operation, resrce, lotNoList, COMPLETION_AFTER_TRIGGER);
@ -1124,7 +1124,7 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
}
// 生产批调整数据
this.updateDate(site, operationOutDTO, group, autoResourceBo, resultZLotMaterialCompleteTransaction, shopOrder, sourceMasterLot, null, null, null);
this.updateDate(site, operationOutDTO, group, autoResourceBo, resultZLotMaterialCompleteTransaction, shopOrder, sourceMasterLot, null, null, null, lotNoList);
String user = SecurityUtils.getUserName();
// 出站后调用质量模块
@ -1164,10 +1164,11 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
* @param isCreateInventory
* @param finallyRouterStepBo
* @param currentRouterStepBo
* @param lotNoList
*/
private void updateDate(String site, OperationOutDTO operationOutDTO, List<OperationOutListDTO> group, String resrceBo,
ZLotMaterialCompleteTransaction resultZLotMaterialCompleteTransaction, String shopOrder, String sourceMasterLot,
String isCreateInventory, String finallyRouterStepBo, String currentRouterStepBo) {
String isCreateInventory, String finallyRouterStepBo, String currentRouterStepBo, List<String> lotNoList) {
// 获取远程服务实例,用于获取生产创建库存时启用按质检状态生成
RemoteParamService remoteParamService = SpringContextHolder.getBean(RemoteParamService.class);
// 通过远程服务获取生产创建库存时启用按质检状态生成
@ -1278,6 +1279,8 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
lotRouter.setActive("N");
lotRouter.setActivity("2");
lotRouterList.add(lotRouter);
// 并从lotNoList移除掉,不然有自动出站的时候LotRouter查不到
lotNoList.remove(operationOutListDTO.getLotNo());
}
}
// 生产批生产历程
@ -1473,11 +1476,12 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
* @param resultZLotMaterialCompleteTransaction
* @param isCreateInventory
* @param finallyRouterStepBo
* @param lotNoList
*/
public void completeSplit(OperationOutListDTO operationOutListDTO, ShopOrder shopOrderObj, String currentRouterStepBo, String site,
String shopOrder, String user, LocalDateTime nowTime, List<FastCodeDetail> ef1List, OperationOutDTO operationOutDTO,
LotState lotState, ZLotMaterialCompleteTransaction resultZLotMaterialCompleteTransaction, String isCreateInventory,
String finallyRouterStepBo) {
String finallyRouterStepBo, List<String> lotNoList) {
// 通过当前途程和工艺路线查询上一途程工序以及母批的资源,需要做自动完成
OperationOutDTO operationOutDTOUp = baseMapper.readUpStep(operationOutListDTO.getSourceMasterLot(), shopOrderObj.getPlannedRouterBo(), currentRouterStepBo);
if (operationOutDTOUp != null) {
@ -1520,7 +1524,7 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
BeanUtils.copyProperties(operationOutDTO, operationOutDTONew);
operationOutDTONew.setOperation(operationUp);
operationOutDTONew.setResrce(resrceUp);
this.updateDate(site, operationOutDTONew, operationOutListDTOS, resrceBoUp, resultZLotMaterialCompleteTransaction, shopOrder, sourceMasterLot, isCreateInventory, finallyRouterStepBo, currentRouterStepBo);
this.updateDate(site, operationOutDTONew, operationOutListDTOS, resrceBoUp, resultZLotMaterialCompleteTransaction, shopOrder, sourceMasterLot, isCreateInventory, finallyRouterStepBo, currentRouterStepBo, lotNoList);
// 出站完成后调用质量模块:创建检验任务和修改表逻辑
// 定义 qms需要的 lotNoList