opt:有任务禁止绑定子卷、绑定气胀轴,下料到内保间判断必须有气胀轴、必须有计划

This commit is contained in:
DESKTOP-5DIJMF9\admin
2025-04-11 12:13:06 +08:00
parent b10c478baf
commit e588a32472

View File

@@ -1049,7 +1049,12 @@ public class SlitterServiceImpl implements SlitterService {
if (CollectionUtil.isNotEmpty(qzzNos)) { if (CollectionUtil.isNotEmpty(qzzNos)) {
List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.getByQzzNos(qzzNos); List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.getByQzzNos(qzzNos);
List<String> collect = plans.stream().map(PdmBiSlittingproductionplan::getContainer_name).collect(Collectors.toList()); List<String> collect = plans.stream().map(PdmBiSlittingproductionplan::getContainer_name).collect(Collectors.toList());
if(collect.size()==0){
throw new BadRequestException("操作失败,点位[" + pointCode + "]未查到子卷分切计划,请先绑定子卷库存!");
}
taskParam.put("containers", collect); taskParam.put("containers", collect);
}else{
throw new BadRequestException("操作失败,点位[" + pointCode + "]无气胀轴信息,请先绑定子卷库存!");
} }
// List<BstIvtCutpointivt> areaEmptyNotTaskPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1", // List<BstIvtCutpointivt> areaEmptyNotTaskPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1",
// "1", "0", "2"); // "1", "0", "2");
@@ -1194,6 +1199,11 @@ public class SlitterServiceImpl implements SlitterService {
if (plans.size() == 0) { if (plans.size() == 0) {
throw new BadRequestException("子卷号:[" + containerName + "] 的分切计划没找到,检查是否推送或者子卷号是否正确!"); throw new BadRequestException("子卷号:[" + containerName + "] 的分切计划没找到,检查是否推送或者子卷号是否正确!");
} }
// 校验是否存在任务
List<SchBaseTask> taskList = taskService.checkHaveStartTask(pointCode1);
if (taskList.size() > 0) {
throw new BadRequestException("操作失败,点位[" + pointCode1 + "]存在未完成的任务!");
}
BstIvtCutpointivt pointCode = bcutpointivtService.getPintByTrussCode(pointCode1, false); BstIvtCutpointivt pointCode = bcutpointivtService.getPintByTrussCode(pointCode1, false);
PdmBiSlittingproductionplan demoPlan = plans.get(0); PdmBiSlittingproductionplan demoPlan = plans.get(0);
String resourceName = demoPlan.getResource_name(); String resourceName = demoPlan.getResource_name();
@@ -1256,6 +1266,11 @@ public class SlitterServiceImpl implements SlitterService {
if (plans.size() == 0) { if (plans.size() == 0) {
throw new BadRequestException("子卷号:[" + containerName + "] 的分切计划没找到,检查是否推送或者子卷号是否正确!"); throw new BadRequestException("子卷号:[" + containerName + "] 的分切计划没找到,检查是否推送或者子卷号是否正确!");
} }
// 校验是否存在任务
List<SchBaseTask> taskList = taskService.checkHaveStartTask(pointCode1);
if (taskList.size() > 0) {
throw new BadRequestException("操作失败,点位[" + pointCode1 + "]存在未完成的任务!");
}
BstIvtCutpointivt pointCode = bcutpointivtService.getPintByTrussCode(pointCode1, false); BstIvtCutpointivt pointCode = bcutpointivtService.getPintByTrussCode(pointCode1, false);
PdmBiSlittingproductionplan demoPlan = plans.get(0); PdmBiSlittingproductionplan demoPlan = plans.get(0);
String resourceName = demoPlan.getResource_name(); String resourceName = demoPlan.getResource_name();