PDA下发任务栏领取任务修改

This commit is contained in:
秦鸿展
2026-04-28 08:46:44 +08:00
parent 6d61e14a5e
commit 749cb50282
22 changed files with 522 additions and 60 deletions
@@ -138,6 +138,78 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</where>
</sql>
<!-- PDA 下发任务列表:与 del_flag、top_organization_id、warehouse_id、task_status、task_distribution_id 为主条件,不按 operators_by/tabType 过滤 -->
<sql id="selectDeliveTaskPoApp1">
<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="organizationIdList != null and organizationIdList.size() > 0">
and organization_id in
<foreach collection="organizationIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</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="taskType != null and taskType == 7 and (handoverQueryType == null or handoverQueryType == 1)">
and EXISTS (SELECT 1 FROM handover_task_order hto WHERE hto.task_number = delive_task.tracking_number AND hto.del_flag = 1 AND hto.status = 1)
</if>
<if test="taskType != null and taskType == 7 and handoverQueryType == 2">
and EXISTS (SELECT 1 FROM handover_task_order hto WHERE hto.task_number = delive_task.tracking_number AND hto.del_flag = 1 AND hto.status = 2)
</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="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="organizationId != null ">
and organization_id = #{organizationId}
@@ -208,7 +280,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="queryListApp" parameterType="com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO" resultMap="DeliveTaskResult">
<include refid="selectDeliveTaskPo"/>
<include refid="selectDeliveTaskPo1"/>
<include refid="selectDeliveTaskPoApp1"/>
order by create_time desc
</select>
<select id="workbenchQuery" parameterType="java.lang.Long" resultMap="DeliveTaskResultSum">
@@ -165,6 +165,9 @@
<if test="receiveTimeEnd != null and receiveTimeEnd != ''">
and date_format(a.receive_time, '%Y-%m-%d') &lt;= #{receiveTimeEnd}
</if>
<if test="onlyReceived != null and onlyReceived == 1">
and a.receive_time is not null
</if>
<choose>
<when test="delFlag != null">
and a.del_flag = #{delFlag}
@@ -147,8 +147,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where IN_ORDER_NUMBER = #{inOrderNumber} and LOT_NUMBER = #{lotNumber}
</update>
<update id="updateOmsInventorySynchronization">
update "NGWL_TEST_OMS".RESERVATION_MATERIAL_INVENTORY set INVENTORY_QUANTITY = INVENTORY_QUANTITY - #{quantity},
ALLOCATION_QUANTITY= ALLOCATION_QUANTITY - #{quantity}
update "NGWL_TEST_OMS".RESERVATION_MATERIAL_INVENTORY set INVENTORY_QUANTITY = INVENTORY_QUANTITY - #{checkQuantity},
ALLOCATION_QUANTITY= ALLOCATION_QUANTITY - #{checkQuantity}
where IN_ORDER_NUMBER = #{inOrderNumber} and LOT_NUMBER = #{lotNo}
</update>
</mapper>