瀏覽代碼

bugFix 资源组设备不显示在换线设备中的问题

xiahan 1 年之前
父節點
當前提交
0ac996b494

+ 1 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProcessOperationProcessEquServiceImpl.java

@@ -216,6 +216,7 @@ public class ApsProcessOperationProcessEquServiceImpl extends ServiceImpl<ApsPro
     @Override
     @Transactional(rollbackFor = Exception.class)
     public R changingWires(List<ChangingWiresVo> changingWiresVos) {
+        ApsUtils.checkScheduling();
         if (changingWiresVos.isEmpty()) {
             log.error("换线作业的工序作业不为空");
             return R.error("工序作业不能为空");

+ 14 - 13
cx-aps/cx-aps-common/src/main/resources/mybatis/ApsProcessOperationProcessEquDao.xml

@@ -344,29 +344,30 @@
     </update>
     <select id="getOptionalEquipmentById" resultType="com.rongwei.bsentity.vo.OptionalEquipmentVo">
         SELECT
-            CONCAT(IFNULL( aci.USEDEPTID, arg.RESOURCEWORKSHOPID ),'/',aci.ID) AS value,
-            CONCAT(IFNULL( aci.USEDEPTNAME, arg.RESOURCEWORKSHOP ),'/',aci.CHECKITEMNAME) as label
+        CCONCAT( IFNULL( aci.USEDEPTID, arg.RESOURCEWORKSHOPID ), '/', apoe.RESOURCEID ) AS value ,
+        CONCAT( IFNULL( aci.USEDEPTNAME, arg.RESOURCEWORKSHOP ), '/', IFNULL( aci.CHECKITEMNAME, arg.RESOURCENAME ) ) AS
+        label
         FROM
-            aps_process_operation_process_equ apope
-                LEFT JOIN aps_process_operation apo ON apope.PROCESSID = apo.ID
-                AND apo.DELETED = '0'
-                LEFT JOIN aps_process_operation_equ apoe ON apoe.MAINID = apo.ID
-                AND apoe.DELETED = '0'
-                LEFT JOIN asp_check_items aci ON apoe.RESOURCEID = aci.ID
-                AND aci.DELETED = '0'
-                LEFT JOIN aps_resource_group arg ON apoe.RESOURCEID = arg.ID
+        aps_process_operation_process_equ apope
+        LEFT JOIN aps_process_operation apo ON apope.PROCESSID = apo.ID
+        AND apo.DELETED = '0'
+        LEFT JOIN aps_process_operation_equ apoe ON apoe.MAINID = apo.ID
+        AND apoe.DELETED = '0'
+        LEFT JOIN asp_check_items aci ON apoe.RESOURCEID = aci.ID
+        AND aci.DELETED = '0'
+        LEFT JOIN aps_resource_group arg ON apoe.RESOURCEID = arg.ID
         <where>
             apope.DELETED = '0'
             <if test="idList !=null and idList.size() >0">
-            AND apope.ID IN
+                AND apope.ID IN
                 <foreach collection="idList" item="id" open="(" close=")" separator=",">
                     #{id}
                 </foreach>
             </if>
-            GROUP BY IFNULL( aci.USEDEPTID, arg.RESOURCEWORKSHOPID ),aci.ID
+            GROUP BY  IFNULL( aci.USEDEPTID, arg.RESOURCEWORKSHOPID ),apoe.RESOURCEID
             <if test="idList !=null and idList.size() >1">
                 <!-- 存在多选工序作业时 筛选共有的设备 -->
-                <bind name="idLength" value="idList.size()" />
+                <bind name="idLength" value="idList.size()"/>
                 HAVING count(*)>=#{idLength}
             </if>
         </where>