|
@@ -2213,6 +2213,22 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
|
|
|
calendar.add(Calendar.SECOND, addMinute.setScale(0, RoundingMode.UP).intValue());
|
|
|
processOperationProcessEquDo.setPlanenddate(calendar.getTime());
|
|
|
}
|
|
|
+ String[] bachmaterialprocessArr = processOperationProcessEquDo.getBachmaterialprocess().split(",");
|
|
|
+ if (processOperationProcessEquDo.getLeavewaitworkroll() < bachmaterialprocessArr.length) {
|
|
|
+ List<String> newpch = new ArrayList<>();
|
|
|
+ List<String> delpch = new ArrayList<>();
|
|
|
+ for (String bachmaterialprocess : bachmaterialprocessArr) {
|
|
|
+ if (newpch.size() <= processOperationProcessEquDo.getLeavewaitworkroll()) {
|
|
|
+ newpch.add(bachmaterialprocess);
|
|
|
+ } else {
|
|
|
+ delpch.add(bachmaterialprocess);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ processOperationProcessEquDo.setBachmaterialprocess(String.join(",", newpch));
|
|
|
+ //将这些批次号对应在制品退回备料库
|
|
|
+ apsProcessOperationDao.updateProgressInventory(delpch);
|
|
|
+ }
|
|
|
+
|
|
|
Integer leaveWaitJobRoll = processOperationProcessEquDo.getPlanprocessrall() - processOperationProcessEquDo.getReportroll() - processOperationProcessEquDo.getCancelroll();
|
|
|
if (leaveWaitJobRoll == 0) {
|
|
|
processOperationProcessEquDo.setClosestatus(SaveConstans.CloseStatus.COMPLETED);
|