|
|
|
@ -44,10 +44,10 @@
|
|
|
|
|
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
|
|
|
|
<result column="MODIFIED_USER" property="modifiedUser" />
|
|
|
|
|
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
|
|
|
|
<result column="PRODUCT_CATEGORY" property="productCategory" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="abnormalBillDto" type="com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto" extends="BaseResultMap">
|
|
|
|
|
<result column="SEQ" property="seq"/>
|
|
|
|
|
<result column="ITEM_DESCRIPTION" property="itemDescription"/>
|
|
|
|
@ -79,7 +79,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
HANDLE, SITE, ABNORMAL_NO, STATUS, CORRECTION, PROGRAM, 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, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
|
|
|
|
|
HANDLE, SITE, ABNORMAL_NO, STATUS, CORRECTION, PROGRAM, 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, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME, PRODUCT_CATEGORY
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
@ -153,6 +153,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -203,6 +204,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -261,6 +263,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -319,6 +322,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -377,6 +381,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -435,6 +440,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
AND ${ew.sqlSegment}
|
|
|
|
@ -493,6 +499,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -547,6 +554,7 @@
|
|
|
|
|
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
|
|
|
|
<if test="modifiedUser!=null">MODIFIED_USER,</if>
|
|
|
|
|
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
|
|
|
|
<if test="productCategory!=null">PRODUCT_CATEGORY,</if>
|
|
|
|
|
</trim> VALUES
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
#{handle},
|
|
|
|
@ -589,6 +597,7 @@
|
|
|
|
|
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
|
|
|
|
<if test="modifiedUser!=null">#{modifiedUser},</if>
|
|
|
|
|
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
|
|
|
|
<if test="productCategory!=null">#{productCategory},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -638,6 +647,7 @@
|
|
|
|
|
#{createdDateTime},
|
|
|
|
|
#{modifiedUser},
|
|
|
|
|
#{modifiedDateTime},
|
|
|
|
|
#{productCategory},
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -683,6 +693,7 @@
|
|
|
|
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
|
|
|
|
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
|
|
|
|
|
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
|
|
|
|
<if test="et.productCategory!=null">PRODUCT_CATEGORY=#{et.productCategory},</if>
|
|
|
|
|
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
@ -728,6 +739,7 @@
|
|
|
|
|
CREATED_DATE_TIME=#{et.createdDateTime},
|
|
|
|
|
MODIFIED_USER=#{et.modifiedUser},
|
|
|
|
|
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
|
|
|
|
PRODUCT_CATEGORY=#{et.productCategory},
|
|
|
|
|
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
@ -773,6 +785,7 @@
|
|
|
|
|
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
|
|
|
|
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
|
|
|
|
|
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
|
|
|
|
<if test="et.productCategory!=null">PRODUCT_CATEGORY=#{et.productCategory},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ew!=null">
|
|
|
|
@ -817,6 +830,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -892,6 +906,7 @@
|
|
|
|
|
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
|
|
|
|
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
|
|
|
|
|
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
|
|
|
|
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -925,7 +940,6 @@
|
|
|
|
|
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZAB.CREATED_USER AND ZNU.SITE = ZAB.SITE
|
|
|
|
|
LEFT JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZAB.SHOP_ORDER AND SO.SITE = ZAB.SITE
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER'
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS CF2 ON CF2.HANDLE = SO.HANDLE AND CF2."ATTRIBUTE" = 'PRODUCT_CATEGORY'
|
|
|
|
|
LEFT JOIN Z_ABNORMAL_NC_CODE ZANC ON ZANC.ABNORMAL_BILL_BO = ZAB.HANDLE
|
|
|
|
|
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = 'NCCodeBO:'|| ZAB.SITE || ',' || ZANC.NC_CODE AND NCT.LOCALE = #{language}
|
|
|
|
|
<where>
|
|
|
|
@ -945,15 +959,12 @@
|
|
|
|
|
<if test="abnormalBill.status != null and abnormalBill.status != '' and abnormalBill.status != 'COMP'.toString()">
|
|
|
|
|
AND zab.STATUS = #{abnormalBill.status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBill.status == 'J'.toString()">
|
|
|
|
|
AND zab.PROGRAM IS NULL
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBill.status == 'F'.toString()">
|
|
|
|
|
AND zab.CORRECTION IS NULL
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBill.status == 'COMP'.toString()">
|
|
|
|
|
AND zab.PROGRAM = 'true' AND zab.CORRECTION = 'true' AND zab.status != 'G'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBill.status == ''">
|
|
|
|
|
AND zab.STATUS != 'Q' AND zab.STATUS != 'G'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBill.startDateTime != null ">
|
|
|
|
|
AND zab.CREATED_DATE_TIME >= #{abnormalBill.startDateTime}
|
|
|
|
|
</if>
|
|
|
|
@ -973,64 +984,65 @@
|
|
|
|
|
AND CF.VALUE LIKE '%${abnormalBill.workOrder}%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBill.productionCategory != null and abnormalBill.productionCategory != ''">
|
|
|
|
|
AND CF2.VALUE LIKE '%${abnormalBill.productionCategory}'
|
|
|
|
|
AND zab.PRODUCT_CATEGORY LIKE '%${abnormalBill.productionCategory}'
|
|
|
|
|
</if>
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="userGroupList != null and userGroupList.size != 0">
|
|
|
|
|
AND ZAB.REPORT_SEND_USER_GROUP IN
|
|
|
|
|
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">
|
|
|
|
|
UPPER(#{item.userGroup})
|
|
|
|
|
</foreach>
|
|
|
|
|
<!-- <choose>-->
|
|
|
|
|
<!-- <when test="userGroupList != null and userGroupList.size != 0">-->
|
|
|
|
|
<!-- AND ZAB.REPORT_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'X' AND ZAB.REPORT_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'X'-->
|
|
|
|
|
<!-- END-->
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'X' AND ZAB.REPORT_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'X'-->
|
|
|
|
|
<!-- END-->
|
|
|
|
|
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'Q' AND ZAB.CANCEL_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'Q'-->
|
|
|
|
|
<!-- END-->
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'Q' AND ZAB.CANCEL_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'Q'-->
|
|
|
|
|
<!-- END-->
|
|
|
|
|
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'J' AND ZABD.DUTY_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'J'-->
|
|
|
|
|
<!-- END-->
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'J' AND ZABD.DUTY_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'J'-->
|
|
|
|
|
<!-- END-->
|
|
|
|
|
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'F' AND ZABD.RESOLVE_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'F'-->
|
|
|
|
|
<!-- END)-->
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
<if test="userGroupList == null">
|
|
|
|
|
<!-- OR ZAB.STATUS =-->
|
|
|
|
|
<!-- CASE WHEN ZAB.STATUS = 'F' AND ZABD.RESOLVE_SEND_USER_GROUP IN-->
|
|
|
|
|
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
|
|
|
|
|
<!-- UPPER(#{item.userGroup})-->
|
|
|
|
|
<!-- </foreach>-->
|
|
|
|
|
<!-- THEN-->
|
|
|
|
|
<!-- 'F'-->
|
|
|
|
|
<!-- END)-->
|
|
|
|
|
<!-- </when>-->
|
|
|
|
|
<!-- <otherwise>-->
|
|
|
|
|
<!-- <if test="userGroupList == null">-->
|
|
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
<if test="userGroupList != null and userGroupList.size == 0">
|
|
|
|
|
AND 1 == 2
|
|
|
|
|
</if>
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<!-- <if test="userGroupList != null and userGroupList.size == 0">-->
|
|
|
|
|
<!-- AND 1 == 2-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<!-- </otherwise>-->
|
|
|
|
|
<!-- </choose>-->
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY zab.ABNORMAL_NO,zab.STATUS,it.DESCRIPTION,zab.CREATED_DATE_TIME,zab.RESPONSE_DATE_TIME,
|
|
|
|
|
ZNU.FULL_NAME,zab.NC_CODE,zab.PB_DESCRIPTION
|
|
|
|
|
ORDER BY zab.CREATED_DATE_TIME DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="findAllByAbnormalNoDevice" resultMap="abnormalBillDto">
|
|
|
|
@ -1098,14 +1110,14 @@
|
|
|
|
|
SELECT zabv.SFC SFC,zabv.HANDLE HANDLE
|
|
|
|
|
FROM Z_ABNORMAL_BILL_VIEW zabv
|
|
|
|
|
INNER JOIN (SELECT MAX(ZAB.HANDLE) HANDLE FROM Z_ABNORMAL_BILL_VIEW ZAB WHERE
|
|
|
|
|
ZAB.SITE = #{site}
|
|
|
|
|
<if test="sfc != null and sfc != ''">
|
|
|
|
|
AND ZAB.SFC = #{sfc}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBo != null and abnormalBo != ''">
|
|
|
|
|
AND ZAB.HANDLE = #{abnormalBo}
|
|
|
|
|
</if>
|
|
|
|
|
) ZAB ON ZAB.HANDLE = zabv.HANDLE
|
|
|
|
|
ZAB.SITE = #{site}
|
|
|
|
|
<if test="sfc != null and sfc != ''">
|
|
|
|
|
AND ZAB.SFC = #{sfc}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="abnormalBo != null and abnormalBo != ''">
|
|
|
|
|
AND ZAB.HANDLE = #{abnormalBo}
|
|
|
|
|
</if>
|
|
|
|
|
) ZAB ON ZAB.HANDLE = zabv.HANDLE
|
|
|
|
|
WHERE zabv.SITE = #{site}
|
|
|
|
|
<if test="sfc != null and sfc != ''">
|
|
|
|
|
AND zabv.SFC = #{sfc}
|
|
|
|
@ -1113,7 +1125,7 @@
|
|
|
|
|
<if test="abnormalBo != null and abnormalBo != ''">
|
|
|
|
|
AND zabv.HANDLE = #{abnormalBo}
|
|
|
|
|
</if>
|
|
|
|
|
AND ABNORMAL_METHOD = 'C'
|
|
|
|
|
AND ABNORMAL_METHOD = 'C'
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|