|
@@ -1451,11 +1451,12 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (checkLevel == 3) {
|
|
|
- //==============拼接工艺路线输出成品==============
|
|
|
+ if (checkLevel == 2 || checkLevel == 3) {
|
|
|
+ //==============拼接工艺路线输出成品和工艺输出物料规格==============
|
|
|
//查询坯料计划对应工艺路线的输出成品
|
|
|
List<String> processOutputList = this.baseMapper.selectProcessByBlankId(apsBlankOrderDo.getId());
|
|
|
if (processOutputList != null && processOutputList.size() > 0) {
|
|
|
+ //工艺路线输出成品
|
|
|
String outputProcessMaterial = "";
|
|
|
//排序
|
|
|
processOutputList.sort(String::compareTo);
|
|
@@ -1466,6 +1467,22 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
}
|
|
|
apsBlankOrderDo.setOutputmaterial(outputProcessMaterial);
|
|
|
+
|
|
|
+ //工艺输出物料规格
|
|
|
+ String processOutputMaterialSpecification = "";
|
|
|
+ List<String> processOutputMaterialSpecificationList = processOutputList.stream().map(item -> {
|
|
|
+ String[] s = item.split(" ");
|
|
|
+ return s[0] + " " + s[1];
|
|
|
+ }).sorted(String::compareTo).collect(Collectors.toList());
|
|
|
+ for (int i = 0; i < processOutputMaterialSpecificationList.size(); i++) {
|
|
|
+ processOutputMaterialSpecification += "[" + (i + 1) + "]" + processOutputMaterialSpecificationList.get(i);
|
|
|
+ if (i < processOutputMaterialSpecificationList.size() - 1) {
|
|
|
+ processOutputMaterialSpecification += ",\r\n";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ apsBlankOrderDo.setProcessoutmaterspecification(processOutputMaterialSpecification);
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
return R.error("工艺路线没有输出成品");
|
|
|
}
|
|
@@ -1626,6 +1643,13 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //提交工艺路线的校验
|
|
|
+ if (checkLevel == 2) {
|
|
|
+ if (!apsBlankOrderDo.getBlankoutmaterspecification().equals(apsBlankOrderDo.getProcessoutmaterspecification())) {
|
|
|
+ return R.error("工艺路线输出物料规格" + apsBlankOrderDo.getProcessoutmaterspecification() + "与坯料输出物料规格" + apsBlankOrderDo.getBlankoutmaterspecification() + "不一致");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (checkLevel == 3) {
|
|
|
//============校验工艺路线=============
|
|
|
//如果坯料需求的坯料输出成品字段值不等于坯料需求的工艺输出成品字段值,错误提示:工艺路线输出成品与坯料输出成品不一致
|
|
@@ -1754,12 +1778,14 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
return R.error("第" + j + "个坯料计划的承诺交货期-止不能早于排程交货期-止" + DateUtil.format(apsBlankOrderDo.getScheduledateend(), "yyyy-MM-dd"));
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
+ if (checkLevel == 2 || checkLevel == 3) {
|
|
|
//==============拼接工艺路线输出成品==============
|
|
|
//查询坯料计划对应工艺路线的输出成品
|
|
|
List<String> processOutputList = this.baseMapper.selectProcessByBlankId(apsBlankOrderDo.getId());
|
|
|
if (processOutputList != null && processOutputList.size() > 0) {
|
|
|
+ //工艺路线输出成品
|
|
|
String outputProcessMaterial = "";
|
|
|
//排序
|
|
|
processOutputList.sort(String::compareTo);
|
|
@@ -1770,6 +1796,22 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
}
|
|
|
apsBlankOrderDo.setOutputmaterial(outputProcessMaterial);
|
|
|
+
|
|
|
+ //工艺输出物料规格
|
|
|
+ String processOutputMaterialSpecification = "";
|
|
|
+ List<String> processOutputMaterialSpecificationList = processOutputList.stream().map(item -> {
|
|
|
+ String[] s = item.split(" ");
|
|
|
+ return s[0] + " " + s[1];
|
|
|
+ }).sorted(String::compareTo).collect(Collectors.toList());
|
|
|
+ for (int i = 0; i < processOutputMaterialSpecificationList.size(); i++) {
|
|
|
+ processOutputMaterialSpecification += "[" + (i + 1) + "]" + processOutputMaterialSpecificationList.get(i);
|
|
|
+ if (i < processOutputMaterialSpecificationList.size() - 1) {
|
|
|
+ processOutputMaterialSpecification += ",\r\n";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ apsBlankOrderDo.setProcessoutmaterspecification(processOutputMaterialSpecification);
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
return R.error("第" + j + "个坯料计划 工艺路线没有输出成品");
|
|
|
}
|
|
@@ -1907,6 +1949,14 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //提交工艺路线的校验
|
|
|
+ if (checkLevel == 2) {
|
|
|
+ if (!apsBlankOrderDo.getBlankoutmaterspecification().equals(apsBlankOrderDo.getProcessoutmaterspecification())) {
|
|
|
+ return R.error("第" + j + "个坯料计划 工艺路线输出物料规格" + apsBlankOrderDo.getProcessoutmaterspecification() + "与坯料输出物料规格" + apsBlankOrderDo.getBlankoutmaterspecification() + "不一致");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (checkLevel == 3) {
|
|
|
//============校验工艺路线=============
|
|
|
//如果坯料需求的坯料输出成品字段值不等于坯料需求的工艺输出成品字段值,错误提示:工艺路线输出成品与坯料输出成品不一致
|