refactor(入库任务): 执行任务方法,优化对入库类型的判断

This commit is contained in:
Kelvin 2025-01-04 15:19:11 +08:00
parent 99de619c66
commit 3b5dcf7bbf

View File

@ -220,7 +220,7 @@ public class WmsInTaskController extends BaseController {
baseKnife.setCreateTime(DateUtils.getNowDate()); baseKnife.setCreateTime(DateUtils.getNowDate());
baseKnifeService.updateBaseKnife(baseKnife); baseKnifeService.updateBaseKnife(baseKnife);
}); });
} else if (Objects.equals(wmsInTask.getPlanTypeId(), "9")) { } else if (Objects.equals(wmsInTask.getPlanTypeId(), "9") || Objects.equals(wmsInTask.getPlanTypeCode(), "ZDHK")) {
// 入库类型为整刀回库 // 入库类型为整刀回库
wmsInPlanDetailEntityList.forEach(planDetailEntity -> { wmsInPlanDetailEntityList.forEach(planDetailEntity -> {
BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId()); BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId());
@ -283,7 +283,7 @@ public class WmsInTaskController extends BaseController {
} }
} }
}); });
} else if (Objects.equals(wmsInTask.getPlanTypeId(), "15")) { } else if (Objects.equals(wmsInTask.getPlanTypeId(), "15") || Objects.equals(wmsInTask.getPlanTypeCode(), "CDHK")) {
// 拆刀回库 // 拆刀回库
wmsInPlanDetailEntityList.forEach(planDetailEntity -> { wmsInPlanDetailEntityList.forEach(planDetailEntity -> {
BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId()); BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId());
@ -300,7 +300,7 @@ public class WmsInTaskController extends BaseController {
baseKnifeService.updateBaseKnife(bladeOpt.get()); baseKnifeService.updateBaseKnife(bladeOpt.get());
} }
}); });
} else if (Objects.equals(wmsInTask.getPlanTypeId(), "7")) { } else if (Objects.equals(wmsInTask.getPlanTypeId(), "7") || Objects.equals(wmsInTask.getPlanTypeCode(), "DBRK")) {
// 入库类型为刀柄入库 // 入库类型为刀柄入库
wmsInPlanDetailEntityList.forEach(planDetailEntity -> { wmsInPlanDetailEntityList.forEach(planDetailEntity -> {
// 生成台账 // 生成台账