集成wms服务模块
This commit is contained in:
@@ -0,0 +1,276 @@
|
||||
<?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">
|
||||
<mapper namespace="com.mhd.wms.domain.deliveTask.repository.mapper.DeliveTaskMapper">
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskPO" id="DeliveTaskResult">
|
||||
<result property="deliverTaskId" column="deliver_task_id" />
|
||||
<result property="taskNumber" column="task_number" />
|
||||
<result property="trackingNumber" column="tracking_number" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="taskType" column="task_type" />
|
||||
<result property="taskStatus" column="task_status" />
|
||||
<result property="taskDistribution" column="task_distribution" />
|
||||
<result property="taskDistributionTime" column="task_distribution_time" />
|
||||
<result property="taskDistributionId" column="task_distribution_id" />
|
||||
<result property="taskDistributionName" column="task_distribution_name" />
|
||||
<result property="operatorsBy" column="operators_by" />
|
||||
<result property="operatorsName" column="operators_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="reassignTime" column="reassign_time" />
|
||||
<result property="reassignById" column="reassign_by_id" />
|
||||
<result property="reassignByName" column="reassign_by_name" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskSumPO" id="DeliveTaskResultSum">
|
||||
<result property="receivedQuantity" column="receivedQuantity" />
|
||||
<result property="listingQuantity" column="listingQuantity" />
|
||||
<result property="pickQuantity" column="pickQuantity" />
|
||||
<result property="recheckQuantity" column="recheckQuantity" />
|
||||
<result property="displacementQuantity" column="displacementQuantity" />
|
||||
<result property="stockQuantity" column="stockQuantity" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.deliveTask.repository.po.DeliveTaskPO" id="DeliveTaskResultTabSum">
|
||||
<result property="designateSum" column="designateSum" />
|
||||
<result property="taskSum" column="taskSum" />
|
||||
</resultMap>
|
||||
<sql id="selectDeliveTaskPo">
|
||||
select deliver_task_id, task_number, tracking_number, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, task_type, task_status, task_distribution, task_distribution_time, task_distribution_id, task_distribution_name, operators_by, operators_name, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, reassign_time, reassign_by_id, reassign_by_name from delive_task
|
||||
</sql>
|
||||
|
||||
<sql id="selectDeliveTaskPo1">
|
||||
<where>
|
||||
del_flag = 1
|
||||
|
||||
<if test="taskNumber != null and taskNumber != ''">
|
||||
and task_number = #{taskNumber}
|
||||
</if>
|
||||
<if test="trackingNumber != null and trackingNumber != ''">
|
||||
and tracking_number = #{trackingNumber}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="taskType != null and taskType != 0 ">
|
||||
and task_type = #{taskType}
|
||||
</if>
|
||||
<if test="taskStatus != null ">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="taskDistribution != null ">
|
||||
and task_distribution = #{taskDistribution}
|
||||
</if>
|
||||
<if test="taskDistributionTime != null ">
|
||||
and task_distribution_time = #{taskDistributionTime}
|
||||
</if>
|
||||
<if test="taskDistributionId != null ">
|
||||
and task_distribution_id = #{taskDistributionId}
|
||||
</if>
|
||||
<if test="taskDistributionName != null and taskDistributionName != ''">
|
||||
and task_distribution_name like concat('%', #{taskDistributionName}, '%')
|
||||
</if>
|
||||
<if test="tabType != null and tabType==1">
|
||||
and operators_by = #{operatorsBy}
|
||||
</if>
|
||||
<if test="tabType != null and tabType==2">
|
||||
and (operators_by = ''
|
||||
OR operators_by IS NULL)
|
||||
</if>
|
||||
|
||||
<if test="operatorsName != null and operatorsName != ''">
|
||||
and operators_name like concat('%', #{operatorsName}, '%')
|
||||
</if>
|
||||
<if test="reassignTime != null ">
|
||||
and reassign_time = #{reassignTime}
|
||||
</if>
|
||||
<if test="reassignById != null ">
|
||||
and reassign_by_id = #{reassignById}
|
||||
</if>
|
||||
<if test="reassignByName != null and reassignByName != ''">
|
||||
and reassign_by_name like concat('%', #{reassignByName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="selectDeliveTaskPo2">
|
||||
|
||||
|
||||
<if test="taskNumber != null and taskNumber != ''">
|
||||
and task_number = #{taskNumber}
|
||||
</if>
|
||||
<if test="trackingNumber != null and trackingNumber != ''">
|
||||
and tracking_number = #{trackingNumber}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="taskType != null ">
|
||||
and task_type = #{taskType}
|
||||
</if>
|
||||
<if test="taskStatus != null ">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="taskDistribution != null ">
|
||||
and task_distribution = #{taskDistribution}
|
||||
</if>
|
||||
<if test="taskDistributionTime != null ">
|
||||
and task_distribution_time = #{taskDistributionTime}
|
||||
</if>
|
||||
<if test="taskDistributionId != null ">
|
||||
and task_distribution_id = #{taskDistributionId}
|
||||
</if>
|
||||
<if test="taskDistributionName != null and taskDistributionName != ''">
|
||||
and task_distribution_name like concat('%', #{taskDistributionName}, '%')
|
||||
</if>
|
||||
<if test="reassignTime != null ">
|
||||
and reassign_time = #{reassignTime}
|
||||
</if>
|
||||
<if test="reassignById != null ">
|
||||
and reassign_by_id = #{reassignById}
|
||||
</if>
|
||||
<if test="reassignByName != null and reassignByName != ''">
|
||||
and reassign_by_name like concat('%', #{reassignByName}, '%')
|
||||
</if>
|
||||
</sql>
|
||||
<select id="queryList" parameterType="com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO" resultMap="DeliveTaskResult">
|
||||
<include refid="selectDeliveTaskPo"/>
|
||||
<include refid="selectDeliveTaskPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="queryListApp" parameterType="com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO" resultMap="DeliveTaskResult">
|
||||
<include refid="selectDeliveTaskPo"/>
|
||||
<include refid="selectDeliveTaskPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="workbenchQuery" parameterType="java.lang.Long" resultMap="DeliveTaskResultSum">
|
||||
SELECT
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
stock_receipt_order
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND status < 3
|
||||
and operators_by = #{operatorsBy}
|
||||
) receivedQuantity,
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
stock_shelf_order
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND status < 3
|
||||
and operators_by = #{operatorsBy}
|
||||
) listingQuantity,
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
stock_out_task_order
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND status < 3
|
||||
and operators_by = #{operatorsBy}
|
||||
) pickQuantity,
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
stock_out_order
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND review = 1
|
||||
AND check_status < 3
|
||||
and check_operators_by = #{operatorsBy}
|
||||
) recheckQuantity,
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
shift_manage
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND audit_status = 3
|
||||
AND shift_status < 4
|
||||
and operators_by = #{operatorsBy}
|
||||
) displacementQuantity,
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
investigation_manage
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND audit_status = 3
|
||||
AND investigation_status < 4
|
||||
and operators_by = #{operatorsBy}
|
||||
) stockQuantity
|
||||
|
||||
</select>
|
||||
<select id="querySum" parameterType="com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO" resultMap="DeliveTaskResultTabSum">
|
||||
SELECT
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
delive_task
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND operators_by = #{operatorsBy}
|
||||
<include refid="selectDeliveTaskPo2"/>
|
||||
) designateSum,
|
||||
(
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
delive_task
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND (operators_by = ''
|
||||
OR operators_by IS NULL)
|
||||
<include refid="selectDeliveTaskPo2"/>
|
||||
) taskSum
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user