|
|
|
@ -559,13 +559,17 @@
|
|
|
|
|
</foreach>)
|
|
|
|
|
</delete>
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
|
|
|
|
|
|
<!--自定义sql-->
|
|
|
|
|
<select id="selectListByCondition" resultMap="BaseResultMap">
|
|
|
|
|
SELECT ZSR.HANDLE, ZSR.SITE, ZSR.TASK_NO, ZSR.WORK_CENTER,ZSR.NC_CODE_DESC, ZSR.SHOP_ORDER, ZSR.ITEM, ZSR.OP_STEP, ZSR.RESRCE, ZSR.SFC, ZSR.NC_CODE, ZSR.NC_QTY, ZSR.LOCATION, ZSR.STATE, ZSR.REMARK, B.FULL_NAME CREATE_USER,ZSR. CREATED_DATE_TIME,IT.DESCRIPTION,ZSR.CREATE_USER PB_USER FROM Z_SELF_REPORT ZSR
|
|
|
|
|
SELECT ZSR.HANDLE, ZSR.SITE, ZSR.TASK_NO, ZSR.WORK_CENTER,ZSR.NC_CODE_DESC, ZSR.SHOP_ORDER, ZSR.ITEM, ZSR.OP_STEP, ZSR.RESRCE, ZSR.SFC, ZSR.NC_CODE, ZSR.NC_QTY, ZSR.LOCATION, ZSR.STATE, ZSR.REMARK, B.FULL_NAME CREATE_USER,ZSR. CREATED_DATE_TIME,IT.DESCRIPTION,ZSR.CREATE_USER PB_USER,CF.VALUE CHECK_USR FROM Z_SELF_REPORT ZSR
|
|
|
|
|
JOIN ITEM I ON I.ITEM = ZSR.ITEM AND I.CURRENT_REVISION='true'
|
|
|
|
|
LEFT JOIN ITEM_T IT ON I.HANDLE = IT.ITEM_BO AND IT.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN Z_NWA_USER B ON ZSR.SITE = B.SITE AND ZSR.CREATE_USER = B.USER_NAME
|
|
|
|
|
JOIN SHOP_ORDER SO ON SO.shop_order=zsr.SHOP_order and so.site=zsr.site
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS PC ON PC.HANDLE = SO.HANDLE AND PC."ATTRIBUTE" = 'PRODUCT_CATEGORY'
|
|
|
|
|
LEFT JOIN RESRCE R ON R.RESRCE = ZSR.RESRCE AND R.SITE = ZSR.SITE
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = R.HANDLE AND CF."ATTRIBUTE" = 'CHECK_USR'
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ew!=null">
|
|
|
|
|
<if test="ew.entity!=null">
|
|
|
|
@ -575,6 +579,7 @@
|
|
|
|
|
<if test="ew.entity.site!=null"> AND ZSR.SITE=#{ew.entity.site}</if>
|
|
|
|
|
<if test="ew.entity.taskNo!=null"> AND ZSR.TASK_NO=#{ew.entity.taskNo}</if>
|
|
|
|
|
<if test="ew.entity.workCenter!=null and ew.entity.workCenter!='' "> AND ZSR.WORK_CENTER=#{ew.entity.workCenter}</if>
|
|
|
|
|
<if test="ew.entity.checkUsr!=null and ew.entity.checkUsr!='' "> AND CF.VALUE=#{ew.entity.checkUsr}</if>
|
|
|
|
|
<if test="ew.entity.shopOrder!=null and ew.entity.shopOrder!=''"> AND ZSR.SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
|
|
|
|
<if test="ew.entity.item!=null and ew.entity.item!=''"> AND ZSR.ITEM=#{ew.entity.item}</if>
|
|
|
|
|
<if test="ew.entity.opStep!=null and ew.entity.opStep!=''"> AND ZSR.OP_STEP=#{ew.entity.opStep}</if>
|
|
|
|
@ -613,4 +618,15 @@
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!--查询设备和设备上的检验人员-->
|
|
|
|
|
<select id="selectResourceAndCheckUsr" resultMap="BaseResultMap">
|
|
|
|
|
SELECT R.RESRCE ,R.DESCRIPTION ,CF.VALUE CHECK_USR FROM RESRCE R
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = R.HANDLE AND CF."ATTRIBUTE" = 'CHECK_USR'
|
|
|
|
|
WHERE R.SITE = #{site}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--自定义sql-->
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|