SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM Z_SELF_REPORT
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<iftest="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<iftest="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
<iftest="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<iftest="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
<iftest="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
<iftest="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
<iftest="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
<iftest="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<iftest="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
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}
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.site!=null"> AND ZSR.SITE=#{ew.entity.site}</if>
<iftest="ew.entity.taskNo!=null"> AND ZSR.TASK_NO=#{ew.entity.taskNo}</if>
<iftest="ew.entity.workCenter!=null and ew.entity.workCenter!='' "> AND ZSR.WORK_CENTER=#{ew.entity.workCenter}</if>
<iftest="ew.entity.shopOrder!=null and ew.entity.shopOrder!=''"> AND ZSR.SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.item!=null and ew.entity.item!=''"> AND ZSR.ITEM=#{ew.entity.item}</if>
<iftest="ew.entity.opStep!=null and ew.entity.opStep!=''"> AND ZSR.OP_STEP=#{ew.entity.opStep}</if>
<iftest="ew.entity.resrce!=null"> AND ZSR.RESRCE=#{ew.entity.resrce}</if>
<iftest="ew.entity.sfc!=null and ew.entity.sfc!='' "> AND ZSR.SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.ncCode!=null"> AND ZSR.NC_CODE=#{ew.entity.ncCode}</if>
<iftest="ew.entity.ncQty!=null"> AND ZSR.NC_QTY=#{ew.entity.ncQty}</if>
<iftest="ew.entity.location!=null"> AND ZSR.LOCATION=#{ew.entity.location}</if>
<iftest="ew.entity.state!=null and ew.entity.state!=''"> AND ZSR.STATE=#{ew.entity.state}</if>
<iftest="ew.entity.remark!=null"> AND ZSR.REMARK=#{ew.entity.remark}</if>
<iftest="ew.entity.createUser!=null"> AND ZSR.CREATE_USER=#{ew.entity.createUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND ZSR.CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifyUser!=null"> AND ZSR.MODIFY_USER=#{ew.entity.modifyUser}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND ZSR.MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="startTime!=null"> AND ZSR.CREATED_DATE_TIME >=#{startTime}</if>
<iftest="endTime!=null"> AND ZSR.CREATED_DATE_TIME <=#{endTime}</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectMaps"resultType="HashMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM Z_SELF_REPORT
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<iftest="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<iftest="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
<iftest="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<iftest="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
<iftest="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
<iftest="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
<iftest="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
<iftest="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<iftest="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectObjs"resultType="Object">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM Z_SELF_REPORT
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<iftest="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<iftest="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
<iftest="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<iftest="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
<iftest="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
<iftest="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
<iftest="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
<iftest="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<iftest="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectPage"resultMap="BaseResultMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM Z_SELF_REPORT
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<iftest="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<iftest="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
<iftest="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<iftest="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
<iftest="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
<iftest="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
<iftest="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
<iftest="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<iftest="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectMapsPage"resultType="HashMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM Z_SELF_REPORT
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<iftest="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<iftest="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
<iftest="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<iftest="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
<iftest="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
<iftest="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
<iftest="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
<iftest="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<iftest="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">