|
@@ -356,29 +356,40 @@
|
|
|
SELECT
|
|
|
CONCAT(aci.USEDEPTID, '/', aci.ID ) AS value ,
|
|
|
CONCAT(aci.USEDEPTNAME, '/', aci.CHECKITEMNAME) AS label
|
|
|
- FROM
|
|
|
- aps_process_operation_process_equ apope
|
|
|
- LEFT JOIN aps_process_operation apo ON apope.PROCESSID = apo.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'
|
|
|
- <where>
|
|
|
- apope.DELETED = '0'
|
|
|
- <if test="idList !=null and idList.size() >0">
|
|
|
- AND apope.ID IN
|
|
|
- <foreach collection="idList" item="id" open="(" close=")" separator=",">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- and apo.CANCHOOSEDEVICEID is not null
|
|
|
- GROUP BY aci.ID
|
|
|
- <if test="idList !=null and idList.size() >1">
|
|
|
- <!-- 存在多选工序作业时 筛选共有的设备 -->
|
|
|
- <bind name="idLength" value="idList.size()"/>
|
|
|
- HAVING count(*)>=#{idLength}
|
|
|
- </if>
|
|
|
- ORDER BY aci.USEDEPTNAME,aci.CHECKITEMNAME,aci.CHECKITEMNAME ASC
|
|
|
- </where>
|
|
|
+ FROM asp_check_items aci
|
|
|
+ LEFT JOIN aps_process_operation_process_equ apope ON aci.ID=apope.PROCESSDEVICEID
|
|
|
+ where
|
|
|
+ apope.DELETED = '0'
|
|
|
+ and aci.DELETED='0'
|
|
|
+ and apope.PROCESSDEVICEID is not null
|
|
|
+ GROUP BY aci.ID
|
|
|
+ ORDER BY aci.USEDEPTNAME,aci.CHECKITEMNAME,aci.CHECKITEMNAME ASC
|
|
|
+ <!-- SELECT-->
|
|
|
+ <!-- CONCAT(aci.USEDEPTID, '/', aci.ID ) AS value ,-->
|
|
|
+ <!-- CONCAT(aci.USEDEPTNAME, '/', aci.CHECKITEMNAME) AS label-->
|
|
|
+ <!-- FROM-->
|
|
|
+ <!-- aps_process_operation_process_equ apope-->
|
|
|
+ <!-- LEFT JOIN aps_process_operation apo ON apope.PROCESSID = apo.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'-->
|
|
|
+ <!-- <where>-->
|
|
|
+ <!-- apope.DELETED = '0'-->
|
|
|
+ <!-- <if test="idList !=null and idList.size() >0">-->
|
|
|
+ <!-- AND apope.ID IN-->
|
|
|
+ <!-- <foreach collection="idList" item="id" open="(" close=")" separator=",">-->
|
|
|
+ <!-- #{id}-->
|
|
|
+ <!-- </foreach>-->
|
|
|
+ <!-- </if>-->
|
|
|
+ <!-- and apo.CANCHOOSEDEVICEID is not null-->
|
|
|
+ <!-- GROUP BY aci.ID-->
|
|
|
+ <!-- <if test="idList !=null and idList.size() >1">-->
|
|
|
+ <!-- <!– 存在多选工序作业时 筛选共有的设备 –>-->
|
|
|
+ <!-- <bind name="idLength" value="idList.size()"/>-->
|
|
|
+ <!-- HAVING count(*)>=#{idLength}-->
|
|
|
+ <!-- </if>-->
|
|
|
+ <!-- ORDER BY aci.USEDEPTNAME,aci.CHECKITEMNAME,aci.CHECKITEMNAME ASC-->
|
|
|
+ <!-- </where>-->
|
|
|
</select>
|
|
|
<select id="checkConflict" resultType="java.lang.String">
|
|
|
select CONCAT("订单",apo1.ORDERNO,"-",
|