SELECT <includerefid="Base_Column_List"></include> FROM SHOP_ORDER
<where>
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<iftest="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<iftest="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
<iftest="ew.entity.plannedWorkCenterBo!=null"> AND PLANNED_WORK_CENTER_BO=#{ew.entity.plannedWorkCenterBo}</if>
<iftest="ew.entity.plannedItemBo!=null"> AND PLANNED_ITEM_BO=#{ew.entity.plannedItemBo}</if>
<iftest="ew.entity.plannedBomBo!=null"> AND PLANNED_BOM_BO=#{ew.entity.plannedBomBo}</if>
<iftest="ew.entity.plannedRouterBo!=null"> AND PLANNED_ROUTER_BO=#{ew.entity.plannedRouterBo}</if>
<iftest="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<iftest="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
<iftest="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<iftest="ew.entity.qtyToBuild!=null"> AND QTY_TO_BUILD=#{ew.entity.qtyToBuild}</if>
<iftest="ew.entity.qtyOrdered!=null"> AND QTY_ORDERED=#{ew.entity.qtyOrdered}</if>
<iftest="ew.entity.qtyReleased!=null"> AND QTY_RELEASED=#{ew.entity.qtyReleased}</if>
<iftest="ew.entity.releasedDate!=null"> AND RELEASED_DATE=#{ew.entity.releasedDate}</if>
<iftest="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<iftest="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<iftest="ew.entity.scheduledStartDate!=null"> AND SCHEDULED_START_DATE=#{ew.entity.scheduledStartDate}</if>
<iftest="ew.entity.scheduledCompDate!=null"> AND SCHEDULED_COMP_DATE=#{ew.entity.scheduledCompDate}</if>
<iftest="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<iftest="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
<iftest="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
<iftest="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<iftest="ew.entity.customer!=null"> AND CUSTOMER=#{ew.entity.customer}</if>
<iftest="ew.entity.customerOrder!=null"> AND CUSTOMER_ORDER=#{ew.entity.customerOrder}</if>
<iftest="ew.entity.rmaSfcDataTypeBo!=null"> AND RMA_SFC_DATA_TYPE_BO=#{ew.entity.rmaSfcDataTypeBo}</if>
<iftest="ew.entity.rmaShopOrderDataTypeBo!=null"> AND RMA_SHOP_ORDER_DATA_TYPE_BO=#{ew.entity.rmaShopOrderDataTypeBo}</if>
<iftest="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
<iftest="ew.entity.transferSite!=null"> AND TRANSFER_SITE=#{ew.entity.transferSite}</if>
<iftest="ew.entity.transferType!=null"> AND TRANSFER_TYPE=#{ew.entity.transferType}</if>
<iftest="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
<iftest="ew.entity.shopOrderTypeBo!=null"> AND SHOP_ORDER_TYPE_BO=#{ew.entity.shopOrderTypeBo}</if>
<iftest="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
<iftest="ew.entity.endUnitNumber!=null"> AND END_UNIT_NUMBER=#{ew.entity.endUnitNumber}</if>
<iftest="ew.entity.reqSerialChange!=null"> AND REQ_SERIAL_CHANGE=#{ew.entity.reqSerialChange}</if>
<iftest="ew.entity.collectParentSerial!=null"> AND COLLECT_PARENT_SERIAL=#{ew.entity.collectParentSerial}</if>
<iftest="ew.entity.batchNumber!=null"> AND BATCH_NUMBER=#{ew.entity.batchNumber}</if>
<iftest="ew.entity.erpOrder!=null"> AND ERP_ORDER=#{ew.entity.erpOrder}</if>
<iftest="ew.entity.erpProductionVersion!=null"> AND ERP_PRODUCTION_VERSION=#{ew.entity.erpProductionVersion}</if>
<iftest="ew.entity.erpUnitOfMeasure!=null"> AND ERP_UNIT_OF_MEASURE=#{ew.entity.erpUnitOfMeasure}</if>
<iftest="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<iftest="ew.entity.inspectionLot!=null"> AND INSPECTION_LOT=#{ew.entity.inspectionLot}</if>
<iftest="ew.entity.inspectionGroupSize!=null"> AND INSPECTION_GROUP_SIZE=#{ew.entity.inspectionGroupSize}</if>
<iftest="ew.entity.erpPutawayStorloc!=null"> AND ERP_PUTAWAY_STORLOC=#{ew.entity.erpPutawayStorloc}</if>
<iftest="ew.entity.warehouseNumber!=null"> AND WAREHOUSE_NUMBER=#{ew.entity.warehouseNumber}</if>
<iftest="ew.entity.underdeliveryTolerance!=null"> AND UNDERDELIVERY_TOLERANCE=#{ew.entity.underdeliveryTolerance}</if>
<iftest="ew.entity.overdeliveryTolerance!=null"> AND OVERDELIVERY_TOLERANCE=#{ew.entity.overdeliveryTolerance}</if>
<iftest="ew.entity.unlimitedOverdelivery!=null"> AND UNLIMITED_OVERDELIVERY=#{ew.entity.unlimitedOverdelivery}</if>
<iftest="ew.entity.minimumDeliveryQty!=null"> AND MINIMUM_DELIVERY_QTY=#{ew.entity.minimumDeliveryQty}</if>
<iftest="ew.entity.maximumDeliveryQty!=null"> AND MAXIMUM_DELIVERY_QTY=#{ew.entity.maximumDeliveryQty}</if>
<iftest="ew.entity.toleranceDefinedIn!=null"> AND TOLERANCE_DEFINED_IN=#{ew.entity.toleranceDefinedIn}</if>
</where>
</select>
<selectid="selectCount"resultType="Integer">
SELECT COUNT(1) FROM SHOP_ORDER
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<iftest="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
<iftest="ew.entity.plannedWorkCenterBo!=null"> AND PLANNED_WORK_CENTER_BO=#{ew.entity.plannedWorkCenterBo}</if>
<iftest="ew.entity.plannedItemBo!=null"> AND PLANNED_ITEM_BO=#{ew.entity.plannedItemBo}</if>
<iftest="ew.entity.plannedBomBo!=null"> AND PLANNED_BOM_BO=#{ew.entity.plannedBomBo}</if>
<iftest="ew.entity.plannedRouterBo!=null"> AND PLANNED_ROUTER_BO=#{ew.entity.plannedRouterBo}</if>
<iftest="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<iftest="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
<iftest="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<iftest="ew.entity.qtyToBuild!=null"> AND QTY_TO_BUILD=#{ew.entity.qtyToBuild}</if>
<iftest="ew.entity.qtyOrdered!=null"> AND QTY_ORDERED=#{ew.entity.qtyOrdered}</if>
<iftest="ew.entity.qtyReleased!=null"> AND QTY_RELEASED=#{ew.entity.qtyReleased}</if>
<iftest="ew.entity.releasedDate!=null"> AND RELEASED_DATE=#{ew.entity.releasedDate}</if>
<iftest="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<iftest="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<iftest="ew.entity.scheduledStartDate!=null"> AND SCHEDULED_START_DATE=#{ew.entity.scheduledStartDate}</if>
<iftest="ew.entity.scheduledCompDate!=null"> AND SCHEDULED_COMP_DATE=#{ew.entity.scheduledCompDate}</if>
<iftest="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<iftest="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
<iftest="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
<iftest="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<iftest="ew.entity.customer!=null"> AND CUSTOMER=#{ew.entity.customer}</if>
<iftest="ew.entity.customerOrder!=null"> AND CUSTOMER_ORDER=#{ew.entity.customerOrder}</if>
<iftest="ew.entity.rmaSfcDataTypeBo!=null"> AND RMA_SFC_DATA_TYPE_BO=#{ew.entity.rmaSfcDataTypeBo}</if>
<iftest="ew.entity.rmaShopOrderDataTypeBo!=null"> AND RMA_SHOP_ORDER_DATA_TYPE_BO=#{ew.entity.rmaShopOrderDataTypeBo}</if>
<iftest="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
<iftest="ew.entity.transferSite!=null"> AND TRANSFER_SITE=#{ew.entity.transferSite}</if>
<iftest="ew.entity.transferType!=null"> AND TRANSFER_TYPE=#{ew.entity.transferType}</if>
<iftest="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
<iftest="ew.entity.shopOrderTypeBo!=null"> AND SHOP_ORDER_TYPE_BO=#{ew.entity.shopOrderTypeBo}</if>
<iftest="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
<iftest="ew.entity.endUnitNumber!=null"> AND END_UNIT_NUMBER=#{ew.entity.endUnitNumber}</if>
<iftest="ew.entity.reqSerialChange!=null"> AND REQ_SERIAL_CHANGE=#{ew.entity.reqSerialChange}</if>
<iftest="ew.entity.collectParentSerial!=null"> AND COLLECT_PARENT_SERIAL=#{ew.entity.collectParentSerial}</if>
<iftest="ew.entity.batchNumber!=null"> AND BATCH_NUMBER=#{ew.entity.batchNumber}</if>
<iftest="ew.entity.erpOrder!=null"> AND ERP_ORDER=#{ew.entity.erpOrder}</if>
<iftest="ew.entity.erpProductionVersion!=null"> AND ERP_PRODUCTION_VERSION=#{ew.entity.erpProductionVersion}</if>
<iftest="ew.entity.erpUnitOfMeasure!=null"> AND ERP_UNIT_OF_MEASURE=#{ew.entity.erpUnitOfMeasure}</if>
<iftest="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<iftest="ew.entity.inspectionLot!=null"> AND INSPECTION_LOT=#{ew.entity.inspectionLot}</if>
<iftest="ew.entity.inspectionGroupSize!=null"> AND INSPECTION_GROUP_SIZE=#{ew.entity.inspectionGroupSize}</if>
<iftest="ew.entity.erpPutawayStorloc!=null"> AND ERP_PUTAWAY_STORLOC=#{ew.entity.erpPutawayStorloc}</if>
<iftest="ew.entity.warehouseNumber!=null"> AND WAREHOUSE_NUMBER=#{ew.entity.warehouseNumber}</if>
<iftest="ew.entity.underdeliveryTolerance!=null"> AND UNDERDELIVERY_TOLERANCE=#{ew.entity.underdeliveryTolerance}</if>
<iftest="ew.entity.overdeliveryTolerance!=null"> AND OVERDELIVERY_TOLERANCE=#{ew.entity.overdeliveryTolerance}</if>
<iftest="ew.entity.unlimitedOverdelivery!=null"> AND UNLIMITED_OVERDELIVERY=#{ew.entity.unlimitedOverdelivery}</if>
<iftest="ew.entity.minimumDeliveryQty!=null"> AND MINIMUM_DELIVERY_QTY=#{ew.entity.minimumDeliveryQty}</if>
<iftest="ew.entity.maximumDeliveryQty!=null"> AND MAXIMUM_DELIVERY_QTY=#{ew.entity.maximumDeliveryQty}</if>
<iftest="ew.entity.toleranceDefinedIn!=null"> AND TOLERANCE_DEFINED_IN=#{ew.entity.toleranceDefinedIn}</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 SHOP_ORDER
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<iftest="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
<iftest="ew.entity.plannedWorkCenterBo!=null"> AND PLANNED_WORK_CENTER_BO=#{ew.entity.plannedWorkCenterBo}</if>
<iftest="ew.entity.plannedItemBo!=null"> AND PLANNED_ITEM_BO=#{ew.entity.plannedItemBo}</if>
<iftest="ew.entity.plannedBomBo!=null"> AND PLANNED_BOM_BO=#{ew.entity.plannedBomBo}</if>
<iftest="ew.entity.plannedRouterBo!=null"> AND PLANNED_ROUTER_BO=#{ew.entity.plannedRouterBo}</if>
<iftest="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<iftest="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
<iftest="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<iftest="ew.entity.qtyToBuild!=null"> AND QTY_TO_BUILD=#{ew.entity.qtyToBuild}</if>
<iftest="ew.entity.qtyOrdered!=null"> AND QTY_ORDERED=#{ew.entity.qtyOrdered}</if>
<iftest="ew.entity.qtyReleased!=null"> AND QTY_RELEASED=#{ew.entity.qtyReleased}</if>
<iftest="ew.entity.releasedDate!=null"> AND RELEASED_DATE=#{ew.entity.releasedDate}</if>
<iftest="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<iftest="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<iftest="ew.entity.scheduledStartDate!=null"> AND SCHEDULED_START_DATE=#{ew.entity.scheduledStartDate}</if>
<iftest="ew.entity.scheduledCompDate!=null"> AND SCHEDULED_COMP_DATE=#{ew.entity.scheduledCompDate}</if>
<iftest="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<iftest="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
<iftest="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
<iftest="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<iftest="ew.entity.customer!=null"> AND CUSTOMER=#{ew.entity.customer}</if>
<iftest="ew.entity.customerOrder!=null"> AND CUSTOMER_ORDER=#{ew.entity.customerOrder}</if>
<iftest="ew.entity.rmaSfcDataTypeBo!=null"> AND RMA_SFC_DATA_TYPE_BO=#{ew.entity.rmaSfcDataTypeBo}</if>
<iftest="ew.entity.rmaShopOrderDataTypeBo!=null"> AND RMA_SHOP_ORDER_DATA_TYPE_BO=#{ew.entity.rmaShopOrderDataTypeBo}</if>
<iftest="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
<iftest="ew.entity.transferSite!=null"> AND TRANSFER_SITE=#{ew.entity.transferSite}</if>
<iftest="ew.entity.transferType!=null"> AND TRANSFER_TYPE=#{ew.entity.transferType}</if>
<iftest="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
<iftest="ew.entity.shopOrderTypeBo!=null"> AND SHOP_ORDER_TYPE_BO=#{ew.entity.shopOrderTypeBo}</if>
<iftest="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
<iftest="ew.entity.endUnitNumber!=null"> AND END_UNIT_NUMBER=#{ew.entity.endUnitNumber}</if>
<iftest="ew.entity.reqSerialChange!=null"> AND REQ_SERIAL_CHANGE=#{ew.entity.reqSerialChange}</if>
<iftest="ew.entity.collectParentSerial!=null"> AND COLLECT_PARENT_SERIAL=#{ew.entity.collectParentSerial}</if>
<iftest="ew.entity.batchNumber!=null"> AND BATCH_NUMBER=#{ew.entity.batchNumber}</if>
<iftest="ew.entity.erpOrder!=null"> AND ERP_ORDER=#{ew.entity.erpOrder}</if>
<iftest="ew.entity.erpProductionVersion!=null"> AND ERP_PRODUCTION_VERSION=#{ew.entity.erpProductionVersion}</if>
<iftest="ew.entity.erpUnitOfMeasure!=null"> AND ERP_UNIT_OF_MEASURE=#{ew.entity.erpUnitOfMeasure}</if>
<iftest="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<iftest="ew.entity.inspectionLot!=null"> AND INSPECTION_LOT=#{ew.entity.inspectionLot}</if>
<iftest="ew.entity.inspectionGroupSize!=null"> AND INSPECTION_GROUP_SIZE=#{ew.entity.inspectionGroupSize}</if>
<iftest="ew.entity.erpPutawayStorloc!=null"> AND ERP_PUTAWAY_STORLOC=#{ew.entity.erpPutawayStorloc}</if>
<iftest="ew.entity.warehouseNumber!=null"> AND WAREHOUSE_NUMBER=#{ew.entity.warehouseNumber}</if>
<iftest="ew.entity.underdeliveryTolerance!=null"> AND UNDERDELIVERY_TOLERANCE=#{ew.entity.underdeliveryTolerance}</if>
<iftest="ew.entity.overdeliveryTolerance!=null"> AND OVERDELIVERY_TOLERANCE=#{ew.entity.overdeliveryTolerance}</if>
<iftest="ew.entity.unlimitedOverdelivery!=null"> AND UNLIMITED_OVERDELIVERY=#{ew.entity.unlimitedOverdelivery}</if>
<iftest="ew.entity.minimumDeliveryQty!=null"> AND MINIMUM_DELIVERY_QTY=#{ew.entity.minimumDeliveryQty}</if>
<iftest="ew.entity.maximumDeliveryQty!=null"> AND MAXIMUM_DELIVERY_QTY=#{ew.entity.maximumDeliveryQty}</if>
<iftest="ew.entity.toleranceDefinedIn!=null"> AND TOLERANCE_DEFINED_IN=#{ew.entity.toleranceDefinedIn}</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 SHOP_ORDER
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<iftest="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
<iftest="ew.entity.plannedWorkCenterBo!=null"> AND PLANNED_WORK_CENTER_BO=#{ew.entity.plannedWorkCenterBo}</if>
<iftest="ew.entity.plannedItemBo!=null"> AND PLANNED_ITEM_BO=#{ew.entity.plannedItemBo}</if>
<iftest="ew.entity.plannedBomBo!=null"> AND PLANNED_BOM_BO=#{ew.entity.plannedBomBo}</if>
<iftest="ew.entity.plannedRouterBo!=null"> AND PLANNED_ROUTER_BO=#{ew.entity.plannedRouterBo}</if>
<iftest="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<iftest="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
<iftest="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<iftest="ew.entity.qtyToBuild!=null"> AND QTY_TO_BUILD=#{ew.entity.qtyToBuild}</if>
<iftest="ew.entity.qtyOrdered!=null"> AND QTY_ORDERED=#{ew.entity.qtyOrdered}</if>
<iftest="ew.entity.qtyReleased!=null"> AND QTY_RELEASED=#{ew.entity.qtyReleased}</if>
<iftest="ew.entity.releasedDate!=null"> AND RELEASED_DATE=#{ew.entity.releasedDate}</if>
<iftest="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<iftest="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<iftest="ew.entity.scheduledStartDate!=null"> AND SCHEDULED_START_DATE=#{ew.entity.scheduledStartDate}</if>
<iftest="ew.entity.scheduledCompDate!=null"> AND SCHEDULED_COMP_DATE=#{ew.entity.scheduledCompDate}</if>
<iftest="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<iftest="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
<iftest="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
<iftest="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<iftest="ew.entity.customer!=null"> AND CUSTOMER=#{ew.entity.customer}</if>
<iftest="ew.entity.customerOrder!=null"> AND CUSTOMER_ORDER=#{ew.entity.customerOrder}</if>
<iftest="ew.entity.rmaSfcDataTypeBo!=null"> AND RMA_SFC_DATA_TYPE_BO=#{ew.entity.rmaSfcDataTypeBo}</if>
<iftest="ew.entity.rmaShopOrderDataTypeBo!=null"> AND RMA_SHOP_ORDER_DATA_TYPE_BO=#{ew.entity.rmaShopOrderDataTypeBo}</if>
<iftest="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
<iftest="ew.entity.transferSite!=null"> AND TRANSFER_SITE=#{ew.entity.transferSite}</if>
<iftest="ew.entity.transferType!=null"> AND TRANSFER_TYPE=#{ew.entity.transferType}</if>
<iftest="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
<iftest="ew.entity.shopOrderTypeBo!=null"> AND SHOP_ORDER_TYPE_BO=#{ew.entity.shopOrderTypeBo}</if>
<iftest="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
<iftest="ew.entity.endUnitNumber!=null"> AND END_UNIT_NUMBER=#{ew.entity.endUnitNumber}</if>
<iftest="ew.entity.reqSerialChange!=null"> AND REQ_SERIAL_CHANGE=#{ew.entity.reqSerialChange}</if>
<iftest="ew.entity.collectParentSerial!=null"> AND COLLECT_PARENT_SERIAL=#{ew.entity.collectParentSerial}</if>
<iftest="ew.entity.batchNumber!=null"> AND BATCH_NUMBER=#{ew.entity.batchNumber}</if>
<iftest="ew.entity.erpOrder!=null"> AND ERP_ORDER=#{ew.entity.erpOrder}</if>
<iftest="ew.entity.erpProductionVersion!=null"> AND ERP_PRODUCTION_VERSION=#{ew.entity.erpProductionVersion}</if>
<iftest="ew.entity.erpUnitOfMeasure!=null"> AND ERP_UNIT_OF_MEASURE=#{ew.entity.erpUnitOfMeasure}</if>
<iftest="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<iftest="ew.entity.inspectionLot!=null"> AND INSPECTION_LOT=#{ew.entity.inspectionLot}</if>
<iftest="ew.entity.inspectionGroupSize!=null"> AND INSPECTION_GROUP_SIZE=#{ew.entity.inspectionGroupSize}</if>
<iftest="ew.entity.erpPutawayStorloc!=null"> AND ERP_PUTAWAY_STORLOC=#{ew.entity.erpPutawayStorloc}</if>
<iftest="ew.entity.warehouseNumber!=null"> AND WAREHOUSE_NUMBER=#{ew.entity.warehouseNumber}</if>
<iftest="ew.entity.underdeliveryTolerance!=null"> AND UNDERDELIVERY_TOLERANCE=#{ew.entity.underdeliveryTolerance}</if>
<iftest="ew.entity.overdeliveryTolerance!=null"> AND OVERDELIVERY_TOLERANCE=#{ew.entity.overdeliveryTolerance}</if>
<iftest="ew.entity.unlimitedOverdelivery!=null"> AND UNLIMITED_OVERDELIVERY=#{ew.entity.unlimitedOverdelivery}</if>
<iftest="ew.entity.minimumDeliveryQty!=null"> AND MINIMUM_DELIVERY_QTY=#{ew.entity.minimumDeliveryQty}</if>
<iftest="ew.entity.maximumDeliveryQty!=null"> AND MAXIMUM_DELIVERY_QTY=#{ew.entity.maximumDeliveryQty}</if>
<iftest="ew.entity.toleranceDefinedIn!=null"> AND TOLERANCE_DEFINED_IN=#{ew.entity.toleranceDefinedIn}</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 SHOP_ORDER
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<iftest="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
<iftest="ew.entity.plannedWorkCenterBo!=null"> AND PLANNED_WORK_CENTER_BO=#{ew.entity.plannedWorkCenterBo}</if>
<iftest="ew.entity.plannedItemBo!=null"> AND PLANNED_ITEM_BO=#{ew.entity.plannedItemBo}</if>
<iftest="ew.entity.plannedBomBo!=null"> AND PLANNED_BOM_BO=#{ew.entity.plannedBomBo}</if>
<iftest="ew.entity.plannedRouterBo!=null"> AND PLANNED_ROUTER_BO=#{ew.entity.plannedRouterBo}</if>
<iftest="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<iftest="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
<iftest="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<iftest="ew.entity.qtyToBuild!=null"> AND QTY_TO_BUILD=#{ew.entity.qtyToBuild}</if>
<iftest="ew.entity.qtyOrdered!=null"> AND QTY_ORDERED=#{ew.entity.qtyOrdered}</if>
<iftest="ew.entity.qtyReleased!=null"> AND QTY_RELEASED=#{ew.entity.qtyReleased}</if>
<iftest="ew.entity.releasedDate!=null"> AND RELEASED_DATE=#{ew.entity.releasedDate}</if>
<iftest="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<iftest="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<iftest="ew.entity.scheduledStartDate!=null"> AND SCHEDULED_START_DATE=#{ew.entity.scheduledStartDate}</if>
<iftest="ew.entity.scheduledCompDate!=null"> AND SCHEDULED_COMP_DATE=#{ew.entity.scheduledCompDate}</if>
<iftest="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<iftest="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
<iftest="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
<iftest="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<iftest="ew.entity.customer!=null"> AND CUSTOMER=#{ew.entity.customer}</if>
<iftest="ew.entity.customerOrder!=null"> AND CUSTOMER_ORDER=#{ew.entity.customerOrder}</if>
<iftest="ew.entity.rmaSfcDataTypeBo!=null"> AND RMA_SFC_DATA_TYPE_BO=#{ew.entity.rmaSfcDataTypeBo}</if>
<iftest="ew.entity.rmaShopOrderDataTypeBo!=null"> AND RMA_SHOP_ORDER_DATA_TYPE_BO=#{ew.entity.rmaShopOrderDataTypeBo}</if>
<iftest="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
<iftest="ew.entity.transferSite!=null"> AND TRANSFER_SITE=#{ew.entity.transferSite}</if>
<iftest="ew.entity.transferType!=null"> AND TRANSFER_TYPE=#{ew.entity.transferType}</if>
<iftest="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
<iftest="ew.entity.shopOrderTypeBo!=null"> AND SHOP_ORDER_TYPE_BO=#{ew.entity.shopOrderTypeBo}</if>
<iftest="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
<iftest="ew.entity.endUnitNumber!=null"> AND END_UNIT_NUMBER=#{ew.entity.endUnitNumber}</if>
<iftest="ew.entity.reqSerialChange!=null"> AND REQ_SERIAL_CHANGE=#{ew.entity.reqSerialChange}</if>
<iftest="ew.entity.collectParentSerial!=null"> AND COLLECT_PARENT_SERIAL=#{ew.entity.collectParentSerial}</if>
<iftest="ew.entity.batchNumber!=null"> AND BATCH_NUMBER=#{ew.entity.batchNumber}</if>
<iftest="ew.entity.erpOrder!=null"> AND ERP_ORDER=#{ew.entity.erpOrder}</if>
<iftest="ew.entity.erpProductionVersion!=null"> AND ERP_PRODUCTION_VERSION=#{ew.entity.erpProductionVersion}</if>
<iftest="ew.entity.erpUnitOfMeasure!=null"> AND ERP_UNIT_OF_MEASURE=#{ew.entity.erpUnitOfMeasure}</if>
<iftest="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<iftest="ew.entity.inspectionLot!=null"> AND INSPECTION_LOT=#{ew.entity.inspectionLot}</if>
<iftest="ew.entity.inspectionGroupSize!=null"> AND INSPECTION_GROUP_SIZE=#{ew.entity.inspectionGroupSize}</if>
<iftest="ew.entity.erpPutawayStorloc!=null"> AND ERP_PUTAWAY_STORLOC=#{ew.entity.erpPutawayStorloc}</if>
<iftest="ew.entity.warehouseNumber!=null"> AND WAREHOUSE_NUMBER=#{ew.entity.warehouseNumber}</if>
<iftest="ew.entity.underdeliveryTolerance!=null"> AND UNDERDELIVERY_TOLERANCE=#{ew.entity.underdeliveryTolerance}</if>
<iftest="ew.entity.overdeliveryTolerance!=null"> AND OVERDELIVERY_TOLERANCE=#{ew.entity.overdeliveryTolerance}</if>
<iftest="ew.entity.unlimitedOverdelivery!=null"> AND UNLIMITED_OVERDELIVERY=#{ew.entity.unlimitedOverdelivery}</if>
<iftest="ew.entity.minimumDeliveryQty!=null"> AND MINIMUM_DELIVERY_QTY=#{ew.entity.minimumDeliveryQty}</if>
<iftest="ew.entity.maximumDeliveryQty!=null"> AND MAXIMUM_DELIVERY_QTY=#{ew.entity.maximumDeliveryQty}</if>
<iftest="ew.entity.toleranceDefinedIn!=null"> AND TOLERANCE_DEFINED_IN=#{ew.entity.toleranceDefinedIn}</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 SHOP_ORDER
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<iftest="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
<iftest="ew.entity.plannedWorkCenterBo!=null"> AND PLANNED_WORK_CENTER_BO=#{ew.entity.plannedWorkCenterBo}</if>
<iftest="ew.entity.plannedItemBo!=null"> AND PLANNED_ITEM_BO=#{ew.entity.plannedItemBo}</if>
<iftest="ew.entity.plannedBomBo!=null"> AND PLANNED_BOM_BO=#{ew.entity.plannedBomBo}</if>
<iftest="ew.entity.plannedRouterBo!=null"> AND PLANNED_ROUTER_BO=#{ew.entity.plannedRouterBo}</if>
<iftest="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<iftest="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
<iftest="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<iftest="ew.entity.qtyToBuild!=null"> AND QTY_TO_BUILD=#{ew.entity.qtyToBuild}</if>
<iftest="ew.entity.qtyOrdered!=null"> AND QTY_ORDERED=#{ew.entity.qtyOrdered}</if>
<iftest="ew.entity.qtyReleased!=null"> AND QTY_RELEASED=#{ew.entity.qtyReleased}</if>
<iftest="ew.entity.releasedDate!=null"> AND RELEASED_DATE=#{ew.entity.releasedDate}</if>
<iftest="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<iftest="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<iftest="ew.entity.scheduledStartDate!=null"> AND SCHEDULED_START_DATE=#{ew.entity.scheduledStartDate}</if>
<iftest="ew.entity.scheduledCompDate!=null"> AND SCHEDULED_COMP_DATE=#{ew.entity.scheduledCompDate}</if>
<iftest="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<iftest="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
<iftest="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
<iftest="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<iftest="ew.entity.customer!=null"> AND CUSTOMER=#{ew.entity.customer}</if>
<iftest="ew.entity.customerOrder!=null"> AND CUSTOMER_ORDER=#{ew.entity.customerOrder}</if>
<iftest="ew.entity.rmaSfcDataTypeBo!=null"> AND RMA_SFC_DATA_TYPE_BO=#{ew.entity.rmaSfcDataTypeBo}</if>
<iftest="ew.entity.rmaShopOrderDataTypeBo!=null"> AND RMA_SHOP_ORDER_DATA_TYPE_BO=#{ew.entity.rmaShopOrderDataTypeBo}</if>
<iftest="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
<iftest="ew.entity.transferSite!=null"> AND TRANSFER_SITE=#{ew.entity.transferSite}</if>
<iftest="ew.entity.transferType!=null"> AND TRANSFER_TYPE=#{ew.entity.transferType}</if>
<iftest="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
<iftest="ew.entity.shopOrderTypeBo!=null"> AND SHOP_ORDER_TYPE_BO=#{ew.entity.shopOrderTypeBo}</if>
<iftest="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
<iftest="ew.entity.endUnitNumber!=null"> AND END_UNIT_NUMBER=#{ew.entity.endUnitNumber}</if>
<iftest="ew.entity.reqSerialChange!=null"> AND REQ_SERIAL_CHANGE=#{ew.entity.reqSerialChange}</if>
<iftest="ew.entity.collectParentSerial!=null"> AND COLLECT_PARENT_SERIAL=#{ew.entity.collectParentSerial}</if>
<iftest="ew.entity.batchNumber!=null"> AND BATCH_NUMBER=#{ew.entity.batchNumber}</if>
<iftest="ew.entity.erpOrder!=null"> AND ERP_ORDER=#{ew.entity.erpOrder}</if>
<iftest="ew.entity.erpProductionVersion!=null"> AND ERP_PRODUCTION_VERSION=#{ew.entity.erpProductionVersion}</if>
<iftest="ew.entity.erpUnitOfMeasure!=null"> AND ERP_UNIT_OF_MEASURE=#{ew.entity.erpUnitOfMeasure}</if>
<iftest="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<iftest="ew.entity.inspectionLot!=null"> AND INSPECTION_LOT=#{ew.entity.inspectionLot}</if>
<iftest="ew.entity.inspectionGroupSize!=null"> AND INSPECTION_GROUP_SIZE=#{ew.entity.inspectionGroupSize}</if>
<iftest="ew.entity.erpPutawayStorloc!=null"> AND ERP_PUTAWAY_STORLOC=#{ew.entity.erpPutawayStorloc}</if>
<iftest="ew.entity.warehouseNumber!=null"> AND WAREHOUSE_NUMBER=#{ew.entity.warehouseNumber}</if>
<iftest="ew.entity.underdeliveryTolerance!=null"> AND UNDERDELIVERY_TOLERANCE=#{ew.entity.underdeliveryTolerance}</if>
<iftest="ew.entity.overdeliveryTolerance!=null"> AND OVERDELIVERY_TOLERANCE=#{ew.entity.overdeliveryTolerance}</if>
<iftest="ew.entity.unlimitedOverdelivery!=null"> AND UNLIMITED_OVERDELIVERY=#{ew.entity.unlimitedOverdelivery}</if>
<iftest="ew.entity.minimumDeliveryQty!=null"> AND MINIMUM_DELIVERY_QTY=#{ew.entity.minimumDeliveryQty}</if>
<iftest="ew.entity.maximumDeliveryQty!=null"> AND MAXIMUM_DELIVERY_QTY=#{ew.entity.maximumDeliveryQty}</if>
<iftest="ew.entity.toleranceDefinedIn!=null"> AND TOLERANCE_DEFINED_IN=#{ew.entity.toleranceDefinedIn}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
AND ${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
AND ${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 SHOP_ORDER
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<iftest="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<iftest="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<iftest="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<iftest="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
<iftest="ew.entity.plannedWorkCenterBo!=null"> AND PLANNED_WORK_CENTER_BO=#{ew.entity.plannedWorkCenterBo}</if>
<iftest="ew.entity.plannedItemBo!=null"> AND PLANNED_ITEM_BO=#{ew.entity.plannedItemBo}</if>
<iftest="ew.entity.plannedBomBo!=null"> AND PLANNED_BOM_BO=#{ew.entity.plannedBomBo}</if>
<iftest="ew.entity.plannedRouterBo!=null"> AND PLANNED_ROUTER_BO=#{ew.entity.plannedRouterBo}</if>
<iftest="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<iftest="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
<iftest="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
<iftest="ew.entity.qtyToBuild!=null"> AND QTY_TO_BUILD=#{ew.entity.qtyToBuild}</if>
<iftest="ew.entity.qtyOrdered!=null"> AND QTY_ORDERED=#{ew.entity.qtyOrdered}</if>
<iftest="ew.entity.qtyReleased!=null"> AND QTY_RELEASED=#{ew.entity.qtyReleased}</if>
<iftest="ew.entity.releasedDate!=null"> AND RELEASED_DATE=#{ew.entity.releasedDate}</if>
<iftest="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
<iftest="ew.entity.plannedCompDate!=null"> AND PLANNED_COMP_DATE=#{ew.entity.plannedCompDate}</if>
<iftest="ew.entity.scheduledStartDate!=null"> AND SCHEDULED_START_DATE=#{ew.entity.scheduledStartDate}</if>
<iftest="ew.entity.scheduledCompDate!=null"> AND SCHEDULED_COMP_DATE=#{ew.entity.scheduledCompDate}</if>
<iftest="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<iftest="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</if>
<iftest="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
<iftest="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<iftest="ew.entity.customer!=null"> AND CUSTOMER=#{ew.entity.customer}</if>
<iftest="ew.entity.customerOrder!=null"> AND CUSTOMER_ORDER=#{ew.entity.customerOrder}</if>
<iftest="ew.entity.rmaSfcDataTypeBo!=null"> AND RMA_SFC_DATA_TYPE_BO=#{ew.entity.rmaSfcDataTypeBo}</if>
<iftest="ew.entity.rmaShopOrderDataTypeBo!=null"> AND RMA_SHOP_ORDER_DATA_TYPE_BO=#{ew.entity.rmaShopOrderDataTypeBo}</if>
<iftest="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
<iftest="ew.entity.transferSite!=null"> AND TRANSFER_SITE=#{ew.entity.transferSite}</if>
<iftest="ew.entity.transferType!=null"> AND TRANSFER_TYPE=#{ew.entity.transferType}</if>
<iftest="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
<iftest="ew.entity.shopOrderTypeBo!=null"> AND SHOP_ORDER_TYPE_BO=#{ew.entity.shopOrderTypeBo}</if>
<iftest="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
<iftest="ew.entity.endUnitNumber!=null"> AND END_UNIT_NUMBER=#{ew.entity.endUnitNumber}</if>
<iftest="ew.entity.reqSerialChange!=null"> AND REQ_SERIAL_CHANGE=#{ew.entity.reqSerialChange}</if>
<iftest="ew.entity.collectParentSerial!=null"> AND COLLECT_PARENT_SERIAL=#{ew.entity.collectParentSerial}</if>
<iftest="ew.entity.batchNumber!=null"> AND BATCH_NUMBER=#{ew.entity.batchNumber}</if>
<iftest="ew.entity.erpOrder!=null"> AND ERP_ORDER=#{ew.entity.erpOrder}</if>
<iftest="ew.entity.erpProductionVersion!=null"> AND ERP_PRODUCTION_VERSION=#{ew.entity.erpProductionVersion}</if>
<iftest="ew.entity.erpUnitOfMeasure!=null"> AND ERP_UNIT_OF_MEASURE=#{ew.entity.erpUnitOfMeasure}</if>
<iftest="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<iftest="ew.entity.inspectionLot!=null"> AND INSPECTION_LOT=#{ew.entity.inspectionLot}</if>
<iftest="ew.entity.inspectionGroupSize!=null"> AND INSPECTION_GROUP_SIZE=#{ew.entity.inspectionGroupSize}</if>
<iftest="ew.entity.erpPutawayStorloc!=null"> AND ERP_PUTAWAY_STORLOC=#{ew.entity.erpPutawayStorloc}</if>
<iftest="ew.entity.warehouseNumber!=null"> AND WAREHOUSE_NUMBER=#{ew.entity.warehouseNumber}</if>
<iftest="ew.entity.underdeliveryTolerance!=null"> AND UNDERDELIVERY_TOLERANCE=#{ew.entity.underdeliveryTolerance}</if>
<iftest="ew.entity.overdeliveryTolerance!=null"> AND OVERDELIVERY_TOLERANCE=#{ew.entity.overdeliveryTolerance}</if>
<iftest="ew.entity.unlimitedOverdelivery!=null"> AND UNLIMITED_OVERDELIVERY=#{ew.entity.unlimitedOverdelivery}</if>
<iftest="ew.entity.minimumDeliveryQty!=null"> AND MINIMUM_DELIVERY_QTY=#{ew.entity.minimumDeliveryQty}</if>
<iftest="ew.entity.maximumDeliveryQty!=null"> AND MAXIMUM_DELIVERY_QTY=#{ew.entity.maximumDeliveryQty}</if>
<iftest="ew.entity.toleranceDefinedIn!=null"> AND TOLERANCE_DEFINED_IN=#{ew.entity.toleranceDefinedIn}</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">