|
@@ -350,18 +350,14 @@
|
|
</update>
|
|
</update>
|
|
<select id="getOptionalEquipmentById" resultType="com.rongwei.bsentity.vo.OptionalEquipmentVo">
|
|
<select id="getOptionalEquipmentById" resultType="com.rongwei.bsentity.vo.OptionalEquipmentVo">
|
|
SELECT
|
|
SELECT
|
|
- CONCAT( IFNULL( aci.USEDEPTID, arg.RESOURCEWORKSHOPID ), '/', apoe.RESOURCEID ) AS value ,
|
|
|
|
- CONCAT( IFNULL( aci.USEDEPTNAME, arg.RESOURCEWORKSHOP ), '/', IFNULL( aci.CHECKITEMNAME, arg.RESOURCENAME ) ) AS
|
|
|
|
- label
|
|
|
|
|
|
+ CONCAT(aci.USEDEPTID, '/', aci.ID ) AS value ,
|
|
|
|
+ CONCAT(aci.USEDEPTNAME, '/', aci.CHECKITEMNAME) AS label
|
|
FROM
|
|
FROM
|
|
aps_process_operation_process_equ apope
|
|
aps_process_operation_process_equ apope
|
|
LEFT JOIN aps_process_operation apo ON apope.PROCESSID = apo.ID
|
|
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
|
|
|
|
|
|
+ LEFT JOIN asp_check_items aci ON FIND_IN_SET(aci.ID,apo.CANCHOOSEDEVICEID)
|
|
|
|
+ left join sys_dict c on c.DICTTYPE='asp_check_item_type' AND aci.CHECKITEMTYPE =c.VALUE
|
|
AND aci.DELETED = '0'
|
|
AND aci.DELETED = '0'
|
|
- LEFT JOIN aps_resource_group arg ON apoe.RESOURCEID = arg.ID
|
|
|
|
<where>
|
|
<where>
|
|
apope.DELETED = '0'
|
|
apope.DELETED = '0'
|
|
<if test="idList !=null and idList.size() >0">
|
|
<if test="idList !=null and idList.size() >0">
|
|
@@ -370,12 +366,13 @@
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- GROUP BY IFNULL( aci.USEDEPTID, arg.RESOURCEWORKSHOPID ),apoe.RESOURCEID
|
|
|
|
|
|
+ GROUP BY aci.ID
|
|
<if test="idList !=null and idList.size() >1">
|
|
<if test="idList !=null and idList.size() >1">
|
|
<!-- 存在多选工序作业时 筛选共有的设备 -->
|
|
<!-- 存在多选工序作业时 筛选共有的设备 -->
|
|
<bind name="idLength" value="idList.size()"/>
|
|
<bind name="idLength" value="idList.size()"/>
|
|
HAVING count(*)>=#{idLength}
|
|
HAVING count(*)>=#{idLength}
|
|
</if>
|
|
</if>
|
|
|
|
+ order by c.VALUE,aci.CHECKITEMNAME asc
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
<select id="checkConflict" resultType="java.lang.String">
|
|
<select id="checkConflict" resultType="java.lang.String">
|