DLC 8 ヶ月 前
コミット
de6d621561

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

@@ -105,12 +105,6 @@ public interface ApsProcessOperationDao extends BaseMapper<ApsProcessOperationDo
     @Select("SELECT * FROM aps_process_operation_process_equ WHERE DELETED = 0 AND ID in ('${nextIds}')")
     List<ApsProcessOperationProcessEquDo> getNextProcessOperationEqusByNextIds(@Param("nextIds") String nextIds);
 
-    @Select({" <script>",
-            "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("batchnumbers") List<String> batchnumbers);
 
 }

+ 23 - 15
cx-aps/cx-aps-common/src/main/resources/mybatis/ApsProcessOperationDao.xml

@@ -7,9 +7,9 @@
 
         update aps_process_operation
         <set>
-<!--            <if test="batchNum != null and batchNum!=''">-->
-<!--                BACHMATERIALPROCESS = CONCAT_WS(',',BACHMATERIALPROCESS,#{batchNum}),-->
-<!--            </if>-->
+            <!--            <if test="batchNum != null and batchNum!=''">-->
+            <!--                BACHMATERIALPROCESS = CONCAT_WS(',',BACHMATERIALPROCESS,#{batchNum}),-->
+            <!--            </if>-->
             INPUTUNQUALIFIEDROLL = INPUTUNQUALIFIEDROLL +#{unqualifiedQuantity}
         </set>
         <where>
@@ -28,17 +28,17 @@
             UNFINISHROLL = UNFINISHROLL -#{currentCheckNum},
             <!-- 完工状态-->
             CLOSESTATUS = case when UNFINISHROLL -#{currentCheckNum} = SECONDROLL+CANCELROLL then '已完工' else '加工中' end,
-<!--            ,-->
-<!--            &lt;!&ndash;实际完工时间&ndash;&gt;-->
-<!--            ACTUALFINISHDATE = (select IF(COUNT(ID) !=0 ,NULL,NOW()) from aps_process_operation_process_equ where-->
-<!--            PROCESSID =#{id} and CLOSESTATUS !='已完工'),-->
+            <!--            ,-->
+            <!--            &lt;!&ndash;实际完工时间&ndash;&gt;-->
+            <!--            ACTUALFINISHDATE = (select IF(COUNT(ID) !=0 ,NULL,NOW()) from aps_process_operation_process_equ where-->
+            <!--            PROCESSID =#{id} and CLOSESTATUS !='已完工'),-->
 
-<!--            &lt;!&ndash; 作业状态&ndash;&gt;-->
-<!--            WORKSTATUS = (select IF(COUNT(ID) !=0 ,'加工中','已完工') from aps_process_operation_process_equ where-->
-<!--            PROCESSID =#{id} and CLOSESTATUS !='已完工'),-->
-<!--            &lt;!&ndash; 生产状态&ndash;&gt;-->
-<!--            PROCESSSTATUS = (select IF(COUNT(ID) !=0 ,'40','50') from aps_process_operation_process_equ where PROCESSID-->
-<!--            =#{id} and CLOSESTATUS !='已完工')-->
+            <!--            &lt;!&ndash; 作业状态&ndash;&gt;-->
+            <!--            WORKSTATUS = (select IF(COUNT(ID) !=0 ,'加工中','已完工') from aps_process_operation_process_equ where-->
+            <!--            PROCESSID =#{id} and CLOSESTATUS !='已完工'),-->
+            <!--            &lt;!&ndash; 生产状态&ndash;&gt;-->
+            <!--            PROCESSSTATUS = (select IF(COUNT(ID) !=0 ,'40','50') from aps_process_operation_process_equ where PROCESSID-->
+            <!--            =#{id} and CLOSESTATUS !='已完工')-->
         </set>
         <where>
             ID =#{id}
@@ -46,7 +46,8 @@
     </update>
     <update id="updateBatchNumberByProcessList">
         update aps_process_operation_process_equ
-        set BACHMATERIALPROCESS = IF(BACHMATERIALPROCESS is null || BACHMATERIALPROCESS = '',#{batchnumber},concat(BACHMATERIALPROCESS,',',#{batchnumber}))
+        set BACHMATERIALPROCESS = IF(BACHMATERIALPROCESS is null || BACHMATERIALPROCESS =
+        '',#{batchnumber},concat(BACHMATERIALPROCESS,',',#{batchnumber}))
         where DELETED = 0
         AND PROCESSID in
         <foreach collection="processIdList" separator="," open="(" item="item" close=")">
@@ -96,7 +97,7 @@
                 <foreach collection="productionOrderIds" open="(" close=")" item="id" separator=",">
                     #{id}
                 </foreach>
-               and DELETED='0')
+                and DELETED='0')
             </where>
         </if>
     </update>
@@ -116,4 +117,11 @@
             </where>
         </if>
     </update>
+    <update id="updateProgressInventory">
+        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>
+    </update>
 </mapper>