|
|
<?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.gaotao.modules.automatedWarehouse.mapper.OrderTaskMapper">
<!-- rqrq - 查询订单任务列表 --> <select id="searchOrderTaskList" parameterType="WmsOrderTaskData" resultType="WmsOrderTaskData"> SELECT t.id, t.site, t.task_no AS taskNo, t.item_no AS itemNo, t.source_type AS sourceType, t.source_bill_no AS sourceBillNo, t.source_line_id AS sourceLineId, t.part_no AS partNo, t.qty, t.batch_no AS batchNo, t.serial_no AS serialNo, t.from_location AS fromLocation, t.to_location AS toLocation, t.pallet_id AS palletId, t.agv_code AS agvCode, t.priority, t.status, t.wms_send_time AS wmsSendTime, t.wcs_receive_time AS wcsReceiveTime, t.start_time AS startTime, t.complete_time AS completeTime, t.error_code AS errorCode, t.error_msg AS errorMsg, t.created_by AS createdBy, t.created_time AS createdTime, t.updated_time AS updatedTime, t.wcs_task_id AS wcsTaskId, t.finish_qty AS finishQty, t.wms_status AS wmsStatus, t.to_area AS toArea FROM wms_order_task t WITH (NOLOCK) WHERE t.site = #{query.site} <if test="query.taskNo != null and query.taskNo != ''"> AND t.task_no LIKE '%' + #{query.taskNo} + '%' </if> <if test="query.sourceBillNo != null and query.sourceBillNo != ''"> AND t.source_bill_no LIKE '%' + #{query.sourceBillNo} + '%' </if> <if test="query.sourceType != null and query.sourceType != ''"> AND t.source_type = #{query.sourceType} </if> <if test="query.status != null and query.status != ''"> AND t.status = #{query.status} </if> <if test="query.palletId != null and query.palletId != ''"> AND t.pallet_id LIKE '%' + #{query.palletId} + '%' </if> <if test="query.startDate != null and query.startDate != ''"> AND CONVERT(DATE, t.created_time) >= #{query.startDate} </if> <if test="query.endDate != null and query.endDate != ''"> AND CONVERT(DATE, t.created_time) <= #{query.endDate} </if> ORDER BY t.created_time DESC, t.task_no, t.item_no </select>
<!-- rqrq - 查询订单任务明细列表 --> <select id="searchOrderTaskDetailList" resultType="WmsOrderTaskDetail"> SELECT d.id, d.site, d.task_no AS taskNo, d.item_no AS itemNo, d.seq_no AS seqNo, d.action_type AS actionType, d.comment, d.from_location AS fromLocation, d.to_location AS toLocation, d.agv_code AS agvCode, d.status, d.start_time AS startTime, d.complete_time AS completeTime, d.error_code AS errorCode, d.error_msg AS errorMsg, d.pallet_id AS palletId, d.wms_status AS wmsStatus FROM wms_order_task_detail d WITH (NOLOCK) WHERE d.site = #{site} AND d.task_no = #{taskNo} AND d.item_no = #{itemNo} ORDER BY d.seq_no </select>
<!-- rqrq - 查询订单关联的运输任务列表 --> <select id="searchTransportTaskList" resultType="WmsTransportTask"> SELECT t.id, t.site, t.task_no AS taskNo, t.item_no AS itemNo, t.source_type AS sourceType, t.source_bill_no AS sourceBillNo, t.source_line_id AS sourceLineId, t.part_no AS partNo, t.qty, t.batch_no AS batchNo, t.serial_no AS serialNo, t.from_location AS fromLocation, t.to_location AS toLocation, t.pallet_id AS palletId, t.agv_code AS agvCode, t.priority, t.status, t.wms_send_time AS wmsSendTime, t.wcs_receive_time AS wcsReceiveTime, t.start_time AS startTime, t.complete_time AS completeTime, t.error_code AS errorCode, t.error_msg AS errorMsg, t.created_by AS createdBy, t.created_time AS createdTime, t.updated_time AS updatedTime, t.wcs_task_id AS wcsTaskId, t.finish_qty AS finishQty, t.wms_status AS wmsStatus, t.pallet_type AS palletType, t.to_area AS toArea FROM wms_transport_task t WITH (NOLOCK) WHERE t.site = #{site} AND t.source_bill_no = #{sourceBillNo} AND t.source_line_id = #{sourceLineId} ORDER BY t.created_time DESC, t.task_no, t.item_no </select>
<!-- rqrq - 查询运输任务明细列表 --> <select id="searchTransportTaskDetailList" resultType="WmsTransportTaskDetail"> SELECT d.id, d.site, d.task_no AS taskNo, d.item_no AS itemNo, d.seq_no AS seqNo, d.action_type AS actionType, d.comment, d.from_location AS fromLocation, d.to_location AS toLocation, d.agv_code AS agvCode, d.status, d.start_time AS startTime, d.complete_time AS completeTime, d.error_code AS errorCode, d.error_msg AS errorMsg FROM wms_transport_task_detail d WITH (NOLOCK) WHERE d.site = #{site} AND d.task_no = #{taskNo} AND d.item_no = #{itemNo} ORDER BY d.seq_no </select>
</mapper>
|