Ver Fonte

如果剩余待开工卷数<待加工料卷批次号数量,则去掉待加工料卷批次号最后多余的{待加工料卷批次号数量-剩余待开工卷数}个批次号;同时将这些批次号对应在制品退回备料库

DLC há 8 meses atrás
pai
commit
e8548be962

+ 4 - 4
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/dao/ApsProcessOperationDao.java

@@ -106,11 +106,11 @@ public interface ApsProcessOperationDao extends BaseMapper<ApsProcessOperationDo
     List<ApsProcessOperationProcessEquDo> getNextProcessOperationEqusByNextIds(@Param("nextIds") String nextIds);
 
     @Select({" <script>",
-            "update aps_work_in_progress_inventory set WORKINPROCESSSTATUS='备料中',PLANMATERIALID=null where DELETED='0' and PROCESSOPERATIONEQUID=#{processoperationequid} and BLANKBATCHNUMBER in",
-            " <foreach collection=\"blankbatchnumbers\" item=\"blankbatchnumber\" index=\"index\" open=\"(\" close=\")\" separator=\",\"> ",
-            "  #{blankbatchnumbers}",
+            "update aps_work_in_progress_inventory set WORKINPROCESSSTATUS='备料中',PLANMATERIALID=null where DELETED='0' and BATCHNUMBER in",
+            " <foreach collection=\"batchnumbers\" item=\"batchnumber\" index=\"index\" open=\"(\" close=\")\" separator=\",\"> ",
+            "  #{batchnumber}",
             "</foreach>",
             "</script>"})
-    void updateProgressInventory(@Param("blankbatchnumbers") List<String> blankbatchnumbers, @Param("processoperationequid") String processoperationequid);
+    void updateProgressInventory(@Param("batchnumbers") List<String> batchnumbers);
 
 }

+ 2 - 2
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationServiceImpl.java

@@ -2219,7 +2219,7 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
                 List<String> newpch = new ArrayList<>();
                 List<String> delpch = new ArrayList<>();
                 for (String bachmaterialprocess : bachmaterialprocessArr) {
-                    if (newpch.size() <= processOperationProcessEquDo.getLeavewaitworkroll()) {
+                    if (newpch.size() < processOperationProcessEquDo.getLeavewaitworkroll()) {
                         newpch.add(bachmaterialprocess);
                     } else {
                         delpch.add(bachmaterialprocess);
@@ -2228,7 +2228,7 @@ public class ApsProcessOperationServiceImpl extends ServiceImpl<ApsProcessOperat
                 processOperationProcessEquDo.setBachmaterialprocess(String.join(",", newpch));
                 //将这些批次号对应在制品退回备料库
                 if (delpch.size() > 0) {
-                    apsProcessOperationDao.updateProgressInventory(delpch, processOperationProcessEquDo.getId());
+                    apsProcessOperationDao.updateProgressInventory(delpch);
                 }
             }
         }