|
|
|
@ -16,11 +16,12 @@
|
|
|
|
|
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
|
|
|
|
<result column="MODIFIED_USER" property="modifiedUser" />
|
|
|
|
|
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
|
|
|
|
<result column="DUTY_USER" property="dutyUser" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
HANDLE, SITE, SFC, OPERATION, STEP_ID, QTY, TYPE, REASON, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
|
|
|
|
|
HANDLE, SITE, SFC, OPERATION, STEP_ID, QTY, TYPE, REASON, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME, DUTY_USER
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
@ -66,6 +67,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -88,6 +90,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -118,6 +121,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -148,6 +152,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -178,6 +183,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -208,6 +214,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -238,6 +245,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -264,6 +272,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="dutyUser!=null">DUTY_USER,</if>
|
|
|
|
|
</trim> VALUES
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
#{handle},
|
|
|
|
@ -278,6 +287,7 @@
|
|
|
|
|
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
|
|
|
|
<if test="modifiedUser!=null">#{modifiedUser},</if>
|
|
|
|
|
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
|
|
|
|
<if test="dutyUser!=null">#{dutyUser},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -299,6 +309,7 @@
|
|
|
|
|
#{createdDateTime},
|
|
|
|
|
#{modifiedUser},
|
|
|
|
|
#{modifiedDateTime},
|
|
|
|
|
#{dutyUser},
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -316,6 +327,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.dutyUser!=null">DUTY_USER=#{et.dutyUser},</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>
|
|
|
|
|
|
|
|
|
@ -333,6 +345,7 @@
|
|
|
|
|
CREATED_DATE_TIME=#{et.createdDateTime},
|
|
|
|
|
MODIFIED_USER=#{et.modifiedUser},
|
|
|
|
|
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
|
|
|
|
DUTY_USER=#{et.dutyUser},
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
@ -350,6 +363,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.dutyUser!=null">DUTY_USER=#{et.dutyUser},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ew!=null">
|
|
|
|
@ -366,6 +380,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -413,6 +428,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.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
|
|
|
|
${ew.sqlSegment}
|
|
|
|
@ -430,28 +446,31 @@
|
|
|
|
|
</foreach>)
|
|
|
|
|
</delete>
|
|
|
|
|
<!-- BaseMapper标准查询/修改/删除 -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="generatorWord" resultType="hashmap">
|
|
|
|
|
SELECT DISTINCT NVL(WCT.DESCRIPTION,' ') WORK_CENTER,NVL(WO.VALUE,' ') WORK_ORDER,NVL(WO2.VALUE,' ') DWG_NO,NVL(ZSS.QTY,0) QTY,NVL(OT.DESCRIPTION,' ') OPERATION,
|
|
|
|
|
NVL(ZSS.REASON,' ') REASON,NVL(ZSS."TYPE",' ') "TYPE",
|
|
|
|
|
CASE WHEN I1.VALUE != NULL THEN NVL(I1.VALUE * I.QTY_MULTIPLIER,0)
|
|
|
|
|
WHEN I2.VALUE != NULL THEN NVL(I2.VALUE * I.QTY_MULTIPLIER,0)
|
|
|
|
|
ELSE NVL(I.QTY_MULTIPLIER,0) END WEIGHT,NVL(I.ITEM,' ') ITEM,NVL(S.SFC,' ') SFC,NVL(it.DESCRIPTION,' ') ITEM_DESCRIPTION,
|
|
|
|
|
NVL(SO.SHOP_ORDER,' ') SHOP_ORDER,NVL(ZNU.FULL_NAME,' ') DUTY_USER
|
|
|
|
|
WHEN I2.VALUE != NULL THEN NVL(I2.VALUE * I.QTY_MULTIPLIER,0)
|
|
|
|
|
ELSE NVL(I.QTY_MULTIPLIER,0) END WEIGHT,NVL(I.ITEM,' ') ITEM,NVL(S.SFC,' ') SFC,NVL(it.DESCRIPTION,' ') ITEM_DESCRIPTION,
|
|
|
|
|
NVL(SO.SHOP_ORDER,' ') SHOP_ORDER,NVL(ZNU.FULL_NAME,' ') DUTY_USER
|
|
|
|
|
FROM
|
|
|
|
|
SHOP_ORDER SO
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS WO ON WO.HANDLE = SO.HANDLE AND WO."ATTRIBUTE" = 'WORK_ORDER'
|
|
|
|
|
INNER JOIN SFC S ON S.SFC = #{sfc} AND S.SITE = #{site}
|
|
|
|
|
LEFT JOIN Z_SFC_SCRAP ZSS ON ZSS.SFC = S.SFC
|
|
|
|
|
LEFT JOIN OPERATION O ON O.OPERATION = ZSS.OPERATION AND O.SITE = SO.SITE
|
|
|
|
|
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = SUBSTR(O.OPERATION,1,INSTR(O.OPERATION,'_')-1)
|
|
|
|
|
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS WO2 ON WO2.HANDLE = I.HANDLE AND WO2."ATTRIBUTE" = 'DWG_NO'
|
|
|
|
|
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZSS.DUTY_USER
|
|
|
|
|
LEFT JOIN ITEM_T it ON it.ITEM_BO = I.HANDLE AND it.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS I1 ON I1.HANDLE = I.HANDLE AND I1."ATTRIBUTE" = 'PER_METER'
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS I2 ON I2.HANDLE = I.HANDLE AND I2."ATTRIBUTE" = 'PER_SQUARE_METER'
|
|
|
|
|
SHOP_ORDER SO
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS WO ON WO.HANDLE = SO.HANDLE AND WO."ATTRIBUTE" = 'WORK_ORDER'
|
|
|
|
|
INNER JOIN SFC S ON S.SFC = #{sfc} AND S.SITE = #{site}
|
|
|
|
|
LEFT JOIN Z_SFC_SCRAP ZSS ON ZSS.SFC = S.SFC
|
|
|
|
|
LEFT JOIN OPERATION O ON O.OPERATION = ZSS.OPERATION AND O.SITE = SO.SITE
|
|
|
|
|
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = SUBSTR(O.OPERATION,1,INSTR(O.OPERATION,'_')-1)
|
|
|
|
|
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS WO2 ON WO2.HANDLE = I.HANDLE AND WO2."ATTRIBUTE" = 'DWG_NO'
|
|
|
|
|
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZSS.DUTY_USER
|
|
|
|
|
LEFT JOIN ITEM_T it ON it.ITEM_BO = I.HANDLE AND it.LOCALE = #{locale}
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS I1 ON I1.HANDLE = I.HANDLE AND I1."ATTRIBUTE" = 'PER_METER'
|
|
|
|
|
LEFT JOIN CUSTOM_FIELDS I2 ON I2.HANDLE = I.HANDLE AND I2."ATTRIBUTE" = 'PER_SQUARE_METER'
|
|
|
|
|
WHERE SO.SHOP_ORDER = #{shopOrder}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|