refactor: 执行入库后将库位信息填充,料箱

This commit is contained in:
Kelvin 2024-12-19 09:49:05 +08:00
parent f253d12153
commit a8bf938f30

View File

@ -42,6 +42,7 @@ public class WmsInTaskController extends BaseController {
private final IWmsInPlanDetailEntityService wmsInPlanDetailEntityService; private final IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
private final IUcmCtBaseService ucmCtBaseService; private final IUcmCtBaseService ucmCtBaseService;
private final IWmStorageLocationService wmStorageLocationService; private final IWmStorageLocationService wmStorageLocationService;
private final IUcmCtBaseService umcCtBaseService;
/** /**
* 查询入库任务列表 * 查询入库任务列表
@ -235,6 +236,11 @@ public class WmsInTaskController extends BaseController {
}); });
mdItemService.updateMdItem(mbbBdMrlMitm); mdItemService.updateMdItem(mbbBdMrlMitm);
} else if (Objects.equals(wmsInTask.getPlanTypeCode(), "CGRK")) { } else if (Objects.equals(wmsInTask.getPlanTypeCode(), "CGRK")) {
// 将库位信息填充至料箱
UcmCtBase ucmCtBase = ucmCtBaseService.selectUcmCtBaseByCode(wmsInTask.getBoxRfid());
ucmCtBase.setAttr1(wmsInTask.getCellTgt().toString());
ucmCtBaseService.updateUcmCtBase(ucmCtBase);
// 插入台账数据
wmsInPlanDetailEntityList.forEach(planDetailEntity -> { wmsInPlanDetailEntityList.forEach(planDetailEntity -> {
BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId()); BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId());
// 设置状态为 解锁 // 设置状态为 解锁
@ -247,6 +253,11 @@ public class WmsInTaskController extends BaseController {
baseKnifeService.updateBaseKnife(baseKnife); baseKnifeService.updateBaseKnife(baseKnife);
}); });
} else if (Objects.equals(wmsInTask.getPlanTypeCode(), "GJHK")) { } else if (Objects.equals(wmsInTask.getPlanTypeCode(), "GJHK")) {
// 将库位信息填充至料箱
UcmCtBase ucmCtBase = ucmCtBaseService.selectUcmCtBaseByCode(wmsInTask.getBoxRfid());
ucmCtBase.setAttr1(wmsInTask.getCellTgt().toString());
ucmCtBaseService.updateUcmCtBase(ucmCtBase);
// 插入台账数据
wmsInPlanDetailEntityList.forEach(planDetailEntity -> { wmsInPlanDetailEntityList.forEach(planDetailEntity -> {
BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId()); BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId());
// 设置状态为 解锁 // 设置状态为 解锁