|
@@ -4,81 +4,81 @@
|
|
<!-- 获得出入库任务总数 -->
|
|
<!-- 获得出入库任务总数 -->
|
|
<select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
<select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
SELECT
|
|
SELECT
|
|
- COUNT(i.id)
|
|
|
|
- FROM in_out_warehouse_task i
|
|
|
|
|
|
+ COUNT(id)
|
|
|
|
+ FROM in_out_warehouse_task
|
|
WHERE
|
|
WHERE
|
|
- i.comp_id = #{compId}
|
|
|
|
- and i.delete_flag = '0'
|
|
|
|
|
|
+ comp_id = #{compId}
|
|
|
|
+ and delete_flag = '0'
|
|
<if test="searchType != null and searchType != ''">
|
|
<if test="searchType != null and searchType != ''">
|
|
<if test="searchType == 1">
|
|
<if test="searchType == 1">
|
|
- AND i.task_status_key = '1'
|
|
|
|
|
|
+ AND task_status_key = '1'
|
|
</if>
|
|
</if>
|
|
<if test="searchType == 2">
|
|
<if test="searchType == 2">
|
|
- AND i.task_status_key = '3'
|
|
|
|
|
|
+ AND task_status_key = '3'
|
|
</if>
|
|
</if>
|
|
<if test="searchType == 3">
|
|
<if test="searchType == 3">
|
|
- AND i.task_status_key = '5'
|
|
|
|
|
|
+ AND task_status_key = '5'
|
|
</if>
|
|
</if>
|
|
<if test="searchType == 4">
|
|
<if test="searchType == 4">
|
|
- AND i.task_status_key = '7'
|
|
|
|
|
|
+ AND task_status_key = '7'
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
- AND (lower(i.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.move_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.send_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.receive_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
|
|
+ AND (lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(move_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(send_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(receive_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
<!-- 获得出入库任务列表 -->
|
|
<!-- 获得出入库任务列表 -->
|
|
<select id="getListByCondition" parameterType="Map"
|
|
<select id="getListByCondition" parameterType="Map"
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.InOutWarehouseTask">
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.InOutWarehouseTask">
|
|
SELECT
|
|
SELECT
|
|
- i.id,
|
|
|
|
- i.contract_no as contractNo,
|
|
|
|
- i.in_out_task_no as inOutTaskNo,
|
|
|
|
- i.move_task_no as moveTaskNo,
|
|
|
|
- i.warehouse_name as warehouseName,
|
|
|
|
- i.in_out_type as inOutType,
|
|
|
|
- i.goods_name as goodsName,
|
|
|
|
- i.weight as weight,
|
|
|
|
- i.predict_date as predictDate,
|
|
|
|
- i.publisher as publisher,
|
|
|
|
- i.task_status as taskStatus,
|
|
|
|
- i.establish_date as establishDate,
|
|
|
|
- i.send_warehouse as sendWarehouse,
|
|
|
|
- i.receive_warehouse as receiveWarehouse,
|
|
|
|
- i.delivery_volume as deliveryVolume,
|
|
|
|
- i.storage_volume as storageVolume,
|
|
|
|
- i.stock_return as stockReturn,
|
|
|
|
- i.transport_loss as transportLoss,
|
|
|
|
- FROM in_out_warehouse_task i
|
|
|
|
|
|
+ id,
|
|
|
|
+ contract_no as contractNo,
|
|
|
|
+ in_out_task_no as inOutTaskNo,
|
|
|
|
+ move_task_no as moveTaskNo,
|
|
|
|
+ warehouse_name as warehouseName,
|
|
|
|
+ in_out_type as inOutType,
|
|
|
|
+ goods_name as goodsName,
|
|
|
|
+ weight as weight,
|
|
|
|
+ predict_date as predictDate,
|
|
|
|
+ publisher as publisher,
|
|
|
|
+ task_status as taskStatus,
|
|
|
|
+ establish_date as establishDate,
|
|
|
|
+ send_warehouse as sendWarehouse,
|
|
|
|
+ receive_warehouse as receiveWarehouse,
|
|
|
|
+ delivery_volume as deliveryVolume,
|
|
|
|
+ storage_volume as storageVolume,
|
|
|
|
+ stock_return as stockReturn,
|
|
|
|
+ transport_loss as transportLoss
|
|
|
|
+ FROM in_out_warehouse_task
|
|
WHERE
|
|
WHERE
|
|
- i.comp_id = #{compId}
|
|
|
|
- and i.delete_flag = '0'
|
|
|
|
|
|
+ comp_id = #{compId}
|
|
|
|
+ and delete_flag = '0'
|
|
<if test="searchType != null and searchType != ''">
|
|
<if test="searchType != null and searchType != ''">
|
|
<if test="searchType == 1">
|
|
<if test="searchType == 1">
|
|
- AND i.task_status_key = '1'
|
|
|
|
|
|
+ AND task_status_key = '1'
|
|
</if>
|
|
</if>
|
|
<if test="searchType == 2">
|
|
<if test="searchType == 2">
|
|
- AND i.task_status_key = '3'
|
|
|
|
|
|
+ AND task_status_key = '3'
|
|
</if>
|
|
</if>
|
|
<if test="searchType == 3">
|
|
<if test="searchType == 3">
|
|
- AND i.task_status_key = '5'
|
|
|
|
|
|
+ AND task_status_key = '5'
|
|
</if>
|
|
</if>
|
|
<if test="searchType == 4">
|
|
<if test="searchType == 4">
|
|
- AND i.task_status_key = '7'
|
|
|
|
|
|
+ AND task_status_key = '7'
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
- AND (lower(i.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.move_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.send_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
- OR lower(i.receive_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
|
|
+ AND (lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(move_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(send_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(receive_warehouse) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
</if>
|
|
</if>
|
|
- ORDER BY i.task_status DESC , i.establish_date DESC
|
|
|
|
|
|
+ ORDER BY task_status DESC , establish_date DESC
|
|
<if test="currentPage != null and currentPage != ''">
|
|
<if test="currentPage != null and currentPage != ''">
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
</if>
|
|
</if>
|