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">