SELECT <includerefid="Base_Column_List"></include> FROM Z_SFC_SCRAP
<where>
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<iftest="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<iftest="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<iftest="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<iftest="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<iftest="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</where>
</select>
<selectid="selectCount"resultType="Integer">
SELECT COUNT(1) FROM Z_SFC_SCRAP
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<iftest="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<iftest="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<iftest="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<iftest="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<iftest="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</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="selectList"resultMap="BaseResultMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM Z_SFC_SCRAP
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<iftest="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<iftest="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<iftest="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<iftest="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<iftest="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</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="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_SFC_SCRAP
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<iftest="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<iftest="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<iftest="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<iftest="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<iftest="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</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_SFC_SCRAP
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<iftest="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<iftest="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<iftest="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<iftest="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<iftest="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</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_SFC_SCRAP
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<iftest="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<iftest="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<iftest="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<iftest="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<iftest="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</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_SFC_SCRAP
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<iftest="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<iftest="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<iftest="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<iftest="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<iftest="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<iftest="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</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">