You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
5.8 KiB

4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.gaotao.modules.automatedWarehouse.mapper.OrderTaskMapper">
  4. <!-- rqrq - 查询订单任务列表 -->
  5. <select id="searchOrderTaskList" parameterType="WmsOrderTaskData" resultType="WmsOrderTaskData">
  6. SELECT
  7. t.id,
  8. t.site,
  9. t.task_no AS taskNo,
  10. t.item_no AS itemNo,
  11. t.source_type AS sourceType,
  12. t.source_bill_no AS sourceBillNo,
  13. t.source_line_id AS sourceLineId,
  14. t.part_no AS partNo,
  15. t.qty,
  16. t.batch_no AS batchNo,
  17. t.serial_no AS serialNo,
  18. t.from_location AS fromLocation,
  19. t.to_location AS toLocation,
  20. t.pallet_id AS palletId,
  21. t.agv_code AS agvCode,
  22. t.priority,
  23. t.status,
  24. t.wms_send_time AS wmsSendTime,
  25. t.wcs_receive_time AS wcsReceiveTime,
  26. t.start_time AS startTime,
  27. t.complete_time AS completeTime,
  28. t.error_code AS errorCode,
  29. t.error_msg AS errorMsg,
  30. t.created_by AS createdBy,
  31. t.created_time AS createdTime,
  32. t.updated_time AS updatedTime,
  33. t.wcs_task_id AS wcsTaskId,
  34. t.finish_qty AS finishQty,
  35. t.wms_status AS wmsStatus,
  36. t.to_area AS toArea
  37. FROM wms_order_task t WITH (NOLOCK)
  38. WHERE t.site = #{query.site}
  39. <if test="query.taskNo != null and query.taskNo != ''">
  40. AND t.task_no LIKE '%' + #{query.taskNo} + '%'
  41. </if>
  42. <if test="query.sourceBillNo != null and query.sourceBillNo != ''">
  43. AND t.source_bill_no LIKE '%' + #{query.sourceBillNo} + '%'
  44. </if>
  45. <if test="query.sourceType != null and query.sourceType != ''">
  46. AND t.source_type = #{query.sourceType}
  47. </if>
  48. <if test="query.status != null and query.status != ''">
  49. AND t.status = #{query.status}
  50. </if>
  51. <if test="query.palletId != null and query.palletId != ''">
  52. AND t.pallet_id LIKE '%' + #{query.palletId} + '%'
  53. </if>
  54. <if test="query.startDate != null and query.startDate != ''">
  55. AND CONVERT(DATE, t.created_time) &gt;= #{query.startDate}
  56. </if>
  57. <if test="query.endDate != null and query.endDate != ''">
  58. AND CONVERT(DATE, t.created_time) &lt;= #{query.endDate}
  59. </if>
  60. ORDER BY t.created_time DESC, t.task_no, t.item_no
  61. </select>
  62. <!-- rqrq - 查询订单任务明细列表 -->
  63. <select id="searchOrderTaskDetailList" resultType="WmsOrderTaskDetail">
  64. SELECT
  65. d.id,
  66. d.site,
  67. d.task_no AS taskNo,
  68. d.item_no AS itemNo,
  69. d.seq_no AS seqNo,
  70. d.action_type AS actionType,
  71. d.comment,
  72. d.from_location AS fromLocation,
  73. d.to_location AS toLocation,
  74. d.agv_code AS agvCode,
  75. d.status,
  76. d.start_time AS startTime,
  77. d.complete_time AS completeTime,
  78. d.error_code AS errorCode,
  79. d.error_msg AS errorMsg,
  80. d.pallet_id AS palletId,
  81. d.wms_status AS wmsStatus
  82. FROM wms_order_task_detail d WITH (NOLOCK)
  83. WHERE d.site = #{site}
  84. AND d.task_no = #{taskNo}
  85. AND d.item_no = #{itemNo}
  86. ORDER BY d.seq_no
  87. </select>
  88. <!-- rqrq - 查询订单关联的运输任务列表 -->
  89. <select id="searchTransportTaskList" resultType="WmsTransportTask">
  90. SELECT
  91. t.id,
  92. t.site,
  93. t.task_no AS taskNo,
  94. t.item_no AS itemNo,
  95. t.source_type AS sourceType,
  96. t.source_bill_no AS sourceBillNo,
  97. t.source_line_id AS sourceLineId,
  98. t.part_no AS partNo,
  99. t.qty,
  100. t.batch_no AS batchNo,
  101. t.serial_no AS serialNo,
  102. t.from_location AS fromLocation,
  103. t.to_location AS toLocation,
  104. t.pallet_id AS palletId,
  105. t.agv_code AS agvCode,
  106. t.priority,
  107. t.status,
  108. t.wms_send_time AS wmsSendTime,
  109. t.wcs_receive_time AS wcsReceiveTime,
  110. t.start_time AS startTime,
  111. t.complete_time AS completeTime,
  112. t.error_code AS errorCode,
  113. t.error_msg AS errorMsg,
  114. t.created_by AS createdBy,
  115. t.created_time AS createdTime,
  116. t.updated_time AS updatedTime,
  117. t.wcs_task_id AS wcsTaskId,
  118. t.finish_qty AS finishQty,
  119. t.wms_status AS wmsStatus,
  120. t.pallet_type AS palletType,
  121. t.to_area AS toArea
  122. FROM wms_transport_task t WITH (NOLOCK)
  123. WHERE t.site = #{site}
  124. AND t.source_bill_no = #{sourceBillNo}
  125. AND t.source_line_id = #{sourceLineId}
  126. ORDER BY t.created_time DESC, t.task_no, t.item_no
  127. </select>
  128. <!-- rqrq - 查询运输任务明细列表 -->
  129. <select id="searchTransportTaskDetailList" resultType="WmsTransportTaskDetail">
  130. SELECT
  131. d.id,
  132. d.site,
  133. d.task_no AS taskNo,
  134. d.item_no AS itemNo,
  135. d.seq_no AS seqNo,
  136. d.action_type AS actionType,
  137. d.comment,
  138. d.from_location AS fromLocation,
  139. d.to_location AS toLocation,
  140. d.agv_code AS agvCode,
  141. d.status,
  142. d.start_time AS startTime,
  143. d.complete_time AS completeTime,
  144. d.error_code AS errorCode,
  145. d.error_msg AS errorMsg
  146. FROM wms_transport_task_detail d WITH (NOLOCK)
  147. WHERE d.site = #{site}
  148. AND d.task_no = #{taskNo}
  149. AND d.item_no = #{itemNo}
  150. ORDER BY d.seq_no
  151. </select>
  152. </mapper>