SELECT <includerefid="Base_Column_List"></include> FROM Z_INSPECTION_ITEM
<where>
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.inspectionItemNo!=null"> AND INSPECTION_ITEM_NO=#{ew.entity.inspectionItemNo}</if>
<iftest="ew.entity.inspectionType!=null"> AND INSPECTION_TYPE=#{ew.entity.inspectionType}</if>
<iftest="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<iftest="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
<iftest="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<iftest="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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>
<iftest="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
</where>
</select>
<selectid="selectCount"resultType="Integer">
SELECT COUNT(1) FROM Z_INSPECTION_ITEM
<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.inspectionItemNo!=null"> AND INSPECTION_ITEM_NO=#{ew.entity.inspectionItemNo}</if>
<iftest="ew.entity.inspectionType!=null"> AND INSPECTION_TYPE=#{ew.entity.inspectionType}</if>
<iftest="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<iftest="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
<iftest="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<iftest="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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>
<iftest="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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_INSPECTION_ITEM
<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.inspectionItemNo!=null"> AND INSPECTION_ITEM_NO=#{ew.entity.inspectionItemNo}</if>
<iftest="ew.entity.inspectionType!=null"> AND INSPECTION_TYPE=#{ew.entity.inspectionType}</if>
<iftest="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<iftest="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
<iftest="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<iftest="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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>
<iftest="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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_INSPECTION_ITEM
<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.inspectionItemNo!=null"> AND INSPECTION_ITEM_NO=#{ew.entity.inspectionItemNo}</if>
<iftest="ew.entity.inspectionType!=null"> AND INSPECTION_TYPE=#{ew.entity.inspectionType}</if>
<iftest="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<iftest="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
<iftest="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<iftest="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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>
<iftest="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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_INSPECTION_ITEM
<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.inspectionItemNo!=null"> AND INSPECTION_ITEM_NO=#{ew.entity.inspectionItemNo}</if>
<iftest="ew.entity.inspectionType!=null"> AND INSPECTION_TYPE=#{ew.entity.inspectionType}</if>
<iftest="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<iftest="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
<iftest="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<iftest="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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>
<iftest="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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_INSPECTION_ITEM
<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.inspectionItemNo!=null"> AND INSPECTION_ITEM_NO=#{ew.entity.inspectionItemNo}</if>
<iftest="ew.entity.inspectionType!=null"> AND INSPECTION_TYPE=#{ew.entity.inspectionType}</if>
<iftest="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<iftest="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
<iftest="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<iftest="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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>
<iftest="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
<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_INSPECTION_ITEM
<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.inspectionItemNo!=null"> AND INSPECTION_ITEM_NO=#{ew.entity.inspectionItemNo}</if>
<iftest="ew.entity.inspectionType!=null"> AND INSPECTION_TYPE=#{ew.entity.inspectionType}</if>
<iftest="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
<iftest="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
<iftest="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<iftest="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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>
<iftest="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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">