|
@@ -1,5 +1,86 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.InOutWarehouseTaskMapper">
|
|
<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.InOutWarehouseTaskMapper">
|
|
-
|
|
|
|
|
|
+ <!-- 获得出入库任务总数 -->
|
|
|
|
+ <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(i.id)
|
|
|
|
+ FROM in_out_warehouse_task i
|
|
|
|
+ WHERE
|
|
|
|
+ i.comp_id = #{compId}
|
|
|
|
+ and i.delete_flag = '0'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND i.task_status_key = '1'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND i.task_status_key = '3'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND i.task_status_key = '5'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 4">
|
|
|
|
+ AND i.task_status_key = '7'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <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},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+ <!-- 获得出入库任务列表 -->
|
|
|
|
+ <select id="getListByCondition" parameterType="Map"
|
|
|
|
+ resultType="com.yh.saas.plugin.yiliangyiyun.entity.InOutWarehouseTask">
|
|
|
|
+ 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
|
|
|
|
+ WHERE
|
|
|
|
+ i.comp_id = #{compId}
|
|
|
|
+ and i.delete_flag = '0'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND i.task_status_key = '1'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND i.task_status_key = '3'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND i.task_status_key = '5'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 4">
|
|
|
|
+ AND i.task_status_key = '7'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <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},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY i.task_status DESC , i.establish_date DESC
|
|
|
|
+ <if test="currentPage != null and currentPage != ''">
|
|
|
|
+ LIMIT ${startRecord}, ${pageSize}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|