@ -11,6 +11,7 @@
<result column= "TYPE" property= "type" />
<result column= "ITEM_BO" property= "itemBo" />
<result column= "SFC" property= "sfc" />
<result column= "OPERATION" property= "operation" />
<result column= "WORK_CENTER" property= "workCenter" />
<result column= "SHOP_ORDER" property= "shopOrder" />
<result column= "MESSAGE_TYPE" property= "messageType" />
@ -49,17 +50,14 @@
<result column= "WORK_CENTER_DESCRIPTION" property= "workCenterDescription" />
<result column= "RESRCE_DESCRIPTION" property= "resrceDescription" />
<result column= "REPORT_USER" property= "reportUser" />
<result column= "RESPONSE_USER" property= "responseUser" />
<result column= "RESPONSE_DATE_TIME" property= "responseDateTime" />
<result column= "ABNORMAL_METHOD" property= "abnormalMethod" />
<result column= "CONFIRM_USER" property= "confirmUser" />
<result column= "RESOLVE_REMARK" property= "resolveRemark" />
<result column= "CANCEL_UESR" property= "cancelUser" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id= "Base_Column_List" >
HANDLE, SITE, ABNORMAL_NO, STATUS, TYPE, ITEM_BO, SFC, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTOR, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
HANDLE, SITE, ABNORMAL_NO, STATUS, TYPE, ITEM_BO, SFC, OPERATION, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTOR, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -100,6 +98,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -145,6 +144,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -198,6 +198,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -251,6 +252,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -304,6 +306,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -357,6 +360,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -410,6 +414,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -459,6 +464,7 @@
<if test= "type!=null" > TYPE,</if>
<if test= "itemBo!=null" > ITEM_BO,</if>
<if test= "sfc!=null" > SFC,</if>
<if test= "operation!=null" > OPERATION,</if>
<if test= "workCenter!=null" > WORK_CENTER,</if>
<if test= "shopOrder!=null" > SHOP_ORDER,</if>
<if test= "messageType!=null" > MESSAGE_TYPE,</if>
@ -496,6 +502,7 @@
<if test= "type!=null" > #{type},</if>
<if test= "itemBo!=null" > #{itemBo},</if>
<if test= "sfc!=null" > #{sfc},</if>
<if test= "operation!=null" > #{operation},</if>
<if test= "workCenter!=null" > #{workCenter},</if>
<if test= "shopOrder!=null" > #{shopOrder},</if>
<if test= "messageType!=null" > #{messageType},</if>
@ -540,6 +547,7 @@
#{type},
#{itemBo},
#{sfc},
#{operation},
#{workCenter},
#{shopOrder},
#{messageType},
@ -580,6 +588,7 @@
<if test= "et.type!=null" > TYPE=#{et.type},</if>
<if test= "et.itemBo!=null" > ITEM_BO=#{et.itemBo},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
<if test= "et.operation!=null" > OPERATION=#{et.operation},</if>
<if test= "et.workCenter!=null" > WORK_CENTER=#{et.workCenter},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.messageType!=null" > MESSAGE_TYPE=#{et.messageType},</if>
@ -620,6 +629,7 @@
TYPE=#{et.type},
ITEM_BO=#{et.itemBo},
SFC=#{et.sfc},
OPERATION=#{et.operation},
WORK_CENTER=#{et.workCenter},
SHOP_ORDER=#{et.shopOrder},
MESSAGE_TYPE=#{et.messageType},
@ -660,6 +670,7 @@
<if test= "et.type!=null" > TYPE=#{et.type},</if>
<if test= "et.itemBo!=null" > ITEM_BO=#{et.itemBo},</if>
<if test= "et.sfc!=null" > SFC=#{et.sfc},</if>
<if test= "et.operation!=null" > OPERATION=#{et.operation},</if>
<if test= "et.workCenter!=null" > WORK_CENTER=#{et.workCenter},</if>
<if test= "et.shopOrder!=null" > SHOP_ORDER=#{et.shopOrder},</if>
<if test= "et.messageType!=null" > MESSAGE_TYPE=#{et.messageType},</if>
@ -699,6 +710,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -769,6 +781,7 @@
<if test= "ew.entity.type!=null" > AND TYPE=#{ew.entity.type}</if>
<if test= "ew.entity.itemBo!=null" > AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test= "ew.entity.sfc!=null" > AND SFC=#{ew.entity.sfc}</if>
<if test= "ew.entity.operation!=null" > AND OPERATION=#{ew.entity.operation}</if>
<if test= "ew.entity.workCenter!=null" > AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test= "ew.entity.shopOrder!=null" > AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test= "ew.entity.messageType!=null" > AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
@ -861,19 +874,19 @@
<select id= "findAllByAbnormalNoDevice" resultMap= "abnormalBillDto" >
SELECT ZAB.ABNORMAL_NO ABNORMAL_NO , ZAB.STATUS STATUS ,ZAB.REPORT_FROM REPORT_FROM ,WCT.DESCRIPTION WORK_CENTER_DESCRIPTION,
ZAB.RESRCE RESRCE ,R.DESCRIPTION RESRCE_DESCRIPTION,ZNU.FULL_NAME REPORT_USER,ZAB.MESSAGE_TYPE MESSAGE_TYPE ,
ZAB.NC_CODE NC_CODE ,ZAB.PB_DESCRIPTION PB_DESCRIPTION ,ZAB.SHUT_DOWN SHUT_DOWN ,ZAB.RESPONSE_USER RESPONSE_USER,ZAB.RESPONSE_DATE_TIME RESPONSE_DATE_TIME,
ZABD.ABNORMAL_METHOD ABNORMAL_METHOD,ZNU3.FULL_NAME CONFIRM_USER,ZABD.RESOLVE_REMARK RESOLVE_REMARK,
ZAB.CANCEL_CODE CANCEL_CODE,ZAB.CANCEL_DATE_TIME CANCEL_DATE_TIME,ZNU4.FULL_NAME CANCEL_USER,ZAB.CANCEL_REASON CANCEL_REASON
ZAB.RESRCE RESRCE ,R.DESCRIPTION RESRCE_DESCRIPTION,ZNU.FULL_NAME REPORT_USER,ZAB.MESSAGE_TYPE MESSAGE_TYPE ,
ZAB.NC_CODE NC_CODE ,ZAB.PB_DESCRIPTION PB_DESCRIPTION ,ZAB.SHUT_DOWN SHUT_DOWN ,ZAB.RESPONSE_USER RESPONSE_USER,ZAB.RESPONSE_DATE_TIME RESPONSE_DATE_TIME,
ZABD.ABNORMAL_METHOD ABNORMAL_METHOD,ZNU3.FULL_NAME CONFIRM_USER,ZABD.RESOLVE_REMARK RESOLVE_REMARK,
ZAB.CANCEL_CODE CANCEL_CODE,ZAB.CANCEL_DATE_TIME CANCEL_DATE_TIME,ZNU4.FULL_NAME CANCEL_USER,ZAB.CANCEL_REASON CANCEL_REASON
FROM
Z_ABNORMAL_BILL ZAB
INNER JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZABD.ABNORMAL_BILL_BO = ZAB.HANDLE
INNER JOIN RESRCE R ON R.RESRCE = ZAB.RESRCE AND R.SITE = ZAB.SITE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = ('WORKCENTERBO:' || ZAB.SITE || ',' || ZAB.WORK_CENTER) AND WCT.LOCALE =#{language}
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZAB.CREATED_USER AND ZNU.SITE = ZAB.SITE
LEFT JOIN Z_NWA_USER ZNU2 ON ZNU2.USER_NAME = ZAB.RESPONSE_USER AND ZNU2.SITE = ZAB.SITE
LEFT JOIN Z_NWA_USER ZNU3 ON ZNU3.USER_NAME = ZABD.RESOLVE_USER AND ZNU3.SITE = ZAB.SITE
LEFT JOIN Z_NWA_USER ZNU4 ON ZNU4.USER_NAME = ZAB.CANCEL_USER AND ZNU4.SITE = ZAB.SITE
Z_ABNORMAL_BILL ZAB
INNER JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZABD.ABNORMAL_BILL_BO = ZAB.HANDLE
INNER JOIN RESRCE R ON R.RESRCE = ZAB.RESRCE AND R.SITE = ZAB.SITE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = ('WORKCENTERBO:' || ZAB.SITE || ',' || ZAB.WORK_CENTER) AND WCT.LOCALE =#{language}
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZAB.CREATED_USER AND ZNU.SITE = ZAB.SITE
LEFT JOIN Z_NWA_USER ZNU2 ON ZNU2.USER_NAME = ZAB.RESPONSE_USER AND ZNU2.SITE = ZAB.SITE
LEFT JOIN Z_NWA_USER ZNU3 ON ZNU3.USER_NAME = ZABD.RESOLVE_USER AND ZNU3.SITE = ZAB.SITE
LEFT JOIN Z_NWA_USER ZNU4 ON ZNU4.USER_NAME = ZAB.CANCEL_USER AND ZNU4.SITE = ZAB.SITE
<where >
<if test= "abnormalBill != null" >
<if test= "abnormalBill.site != null and abnormalBill.site != ''" >
@ -894,18 +907,19 @@
SITE = #{site}
</if>
<if test= "status != null and status.size() != 0" >
AND STATUS NOT IN
<foreach collection= "status" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
AND STATUS NOT IN
<foreach collection= "status" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
</if>
<if test= "type != null and type != ''" >
AND "TYPE" = #{type}
AND "TYPE" = #{type}
</if>
<if test= "sfc != null and sfc != ''" >
AND SFC = #{sfc}
AND SFC = #{sfc}
</if>
</where>
</select>
</mapper>