WmsDocOrderDetailsMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.ams.order.mapper.WmsDocOrderDetailsMapper">
  6. <resultMap type="WmsDocOrderDetails" id="WmsDocOrderDetailsResult">
  7. <result property="orderNo" column="order_no" />
  8. <result property="orderLineNo" column="order_line_no" />
  9. <result property="customerId" column="customer_id" />
  10. <result property="sku" column="sku" />
  11. <result property="lineStatus" column="line_status" />
  12. <result property="qtyOrdered" column="qty_ordered" />
  13. <result property="qtyOrderedEach" column="qty_ordered_each" />
  14. <result property="qtySoftAllocated" column="qty_soft_allocated" />
  15. <result property="qtySoftallocatedEach" column="qty_softallocated_each" />
  16. <result property="qtyAllocated" column="qty_allocated" />
  17. <result property="qtyAllocatedEach" column="qty_allocated_each" />
  18. <result property="qtyPicked" column="qty_picked" />
  19. <result property="qtyPickedEach" column="qty_picked_each" />
  20. <result property="qtyPacked" column="qty_packed" />
  21. <result property="qtyPackedEach" column="qty_packed_each" />
  22. <result property="qtyShipped" column="qty_shipped" />
  23. <result property="qtyShippedEach" column="qty_shipped_each" />
  24. <result property="uom" column="uom" />
  25. <result property="lotatt01" column="lotatt01" />
  26. <result property="lotatt02" column="lotatt02" />
  27. <result property="lotatt03" column="lotatt03" />
  28. <result property="lotatt04" column="lotatt04" />
  29. <result property="lotatt05" column="lotatt05" />
  30. <result property="lotatt06" column="lotatt06" />
  31. <result property="lotatt07" column="lotatt07" />
  32. <result property="lotatt08" column="lotatt08" />
  33. <result property="lotatt09" column="lotatt09" />
  34. <result property="lotatt10" column="lotatt10" />
  35. <result property="lotatt11" column="lotatt11" />
  36. <result property="lotatt12" column="lotatt12" />
  37. <result property="lotatt13" column="lotatt13" />
  38. <result property="lotatt14" column="lotatt14" />
  39. <result property="lotatt15" column="lotatt15" />
  40. <result property="lotatt16" column="lotatt16" />
  41. <result property="lotatt17" column="lotatt17" />
  42. <result property="lotatt18" column="lotatt18" />
  43. <result property="packId" column="pack_id" />
  44. <result property="pickZone" column="pick_zone" />
  45. <result property="location" column="location" />
  46. <result property="lotnum" column="lotnum" />
  47. <result property="remark" column="remark" />
  48. <result property="createTime" column="create_time" />
  49. <result property="createBy" column="create_by" />
  50. <result property="updateTime" column="update_time" />
  51. <result property="updateBy" column="update_by" />
  52. <result property="netWeight" column="net_weight" />
  53. <result property="grossWeight" column="gross_weight" />
  54. <result property="cubic" column="cubic" />
  55. <result property="dEdi01" column="d_edi_01" />
  56. <result property="dEdi02" column="d_edi_02" />
  57. <result property="dEdi03" column="d_edi_03" />
  58. <result property="dEdi04" column="d_edi_04" />
  59. <result property="dEdi05" column="d_edi_05" />
  60. <result property="dEdi06" column="d_edi_06" />
  61. <result property="dEdi07" column="d_edi_07" />
  62. <result property="dEdi08" column="d_edi_08" />
  63. <result property="dEdi09" column="d_edi_09" />
  64. <result property="dEdi10" column="d_edi_10" />
  65. <result property="dEdi11" column="d_edi_11" />
  66. <result property="dEdi12" column="d_edi_12" />
  67. <result property="dEdi13" column="d_edi_13" />
  68. <result property="dEdi14" column="d_edi_14" />
  69. <result property="dEdi15" column="d_edi_15" />
  70. <result property="dEdi16" column="d_edi_16" />
  71. <result property="dEdi17" column="d_edi_17" />
  72. <result property="dEdi18" column="d_edi_18" />
  73. <result property="dEdi19" column="d_edi_19" />
  74. <result property="dEdi20" column="d_edi_20" />
  75. <result property="traceId" column="trace_id" />
  76. <result property="softAllocationRule" column="soft_allocation_rule" />
  77. <result property="allocationRule" column="allocation_rule" />
  78. <result property="userdefine1" column="userdefine1" />
  79. <result property="userdefine2" column="userdefine2" />
  80. <result property="userdefine3" column="userdefine3" />
  81. <result property="userdefine4" column="userdefine4" />
  82. <result property="userdefine5" column="userdefine5" />
  83. </resultMap>
  84. <resultMap type="com.ruoyi.ams.order.vo.StockOrderVO" id="StockOrderVOResult">
  85. <result property="orderNo" column="order_no"></result>
  86. <result property="orderLineNo" column="order_line_no"></result>
  87. <result property="allocationId" column="allocation_id"></result>
  88. <result property="sku" column="sku"></result>
  89. <result property="sn" column="sn"></result>
  90. <result property="pickQty" column="pick_qty"></result>
  91. </resultMap>
  92. <sql id="selectWmsDocOrderDetailsVo">
  93. select order_no, order_line_no, customer_id, sku, line_status, qty_ordered, qty_ordered_each, qty_soft_allocated, qty_softallocated_each, qty_allocated, qty_allocated_each, qty_picked, qty_picked_each, qty_packed, qty_packed_each, qty_shipped, qty_shipped_each, uom, lotatt01, lotatt02, lotatt03, lotatt04, lotatt05, lotatt06, lotatt07, lotatt08, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17, lotatt18, pack_id, pick_zone, location, lotnum, remark, create_time, create_by, update_time, update_by, net_weight, gross_weight, cubic, d_edi_01, d_edi_02, d_edi_03, d_edi_04, d_edi_05, d_edi_06, d_edi_07, d_edi_08, d_edi_09, d_edi_10, d_edi_11, d_edi_12, d_edi_13, d_edi_14, d_edi_15, d_edi_16, d_edi_17, d_edi_18, d_edi_19, d_edi_20, trace_id, soft_allocation_rule, allocation_rule, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5 from wms_doc_order_details
  94. </sql>
  95. <select id="selectWmsDocOrderDetailsList" parameterType="WmsDocOrderDetails" resultMap="WmsDocOrderDetailsResult">
  96. <include refid="selectWmsDocOrderDetailsVo"/>
  97. where order_no = #{orderNo} and order_line_no = #{orderLineNo}
  98. </select>
  99. <select id="selectWmsDocOrderDetailsByOrderNo" parameterType="String" resultMap="WmsDocOrderDetailsResult">
  100. <include refid="selectWmsDocOrderDetailsVo"/>
  101. where order_no = #{orderNo}
  102. </select>
  103. <insert id="insertWmsDocOrderDetails" parameterType="WmsDocOrderDetails">
  104. insert into wms_doc_order_details
  105. <trim prefix="(" suffix=")" suffixOverrides=",">
  106. <if test="orderNo != null">order_no,</if>
  107. <if test="orderLineNo != null">order_line_no,</if>
  108. <if test="customerId != null and customerId != ''">customer_id,</if>
  109. <if test="sku != null and sku != ''">sku,</if>
  110. <if test="lineStatus != null and lineStatus != ''">line_status,</if>
  111. <if test="qtyOrdered != null">qty_ordered,</if>
  112. <if test="qtyOrderedEach != null">qty_ordered_each,</if>
  113. <if test="qtySoftAllocated != null">qty_soft_allocated,</if>
  114. <if test="qtySoftallocatedEach != null">qty_softallocated_each,</if>
  115. <if test="qtyAllocated != null">qty_allocated,</if>
  116. <if test="qtyAllocatedEach != null">qty_allocated_each,</if>
  117. <if test="qtyPicked != null">qty_picked,</if>
  118. <if test="qtyPickedEach != null">qty_picked_each,</if>
  119. <if test="qtyPacked != null">qty_packed,</if>
  120. <if test="qtyPackedEach != null">qty_packed_each,</if>
  121. <if test="qtyShipped != null">qty_shipped,</if>
  122. <if test="qtyShippedEach != null">qty_shipped_each,</if>
  123. <if test="uom != null">uom,</if>
  124. <if test="lotatt01 != null">lotatt01,</if>
  125. <if test="lotatt02 != null">lotatt02,</if>
  126. <if test="lotatt03 != null">lotatt03,</if>
  127. <if test="lotatt04 != null">lotatt04,</if>
  128. <if test="lotatt05 != null">lotatt05,</if>
  129. <if test="lotatt06 != null">lotatt06,</if>
  130. <if test="lotatt07 != null">lotatt07,</if>
  131. <if test="lotatt08 != null">lotatt08,</if>
  132. <if test="lotatt09 != null">lotatt09,</if>
  133. <if test="lotatt10 != null">lotatt10,</if>
  134. <if test="lotatt11 != null">lotatt11,</if>
  135. <if test="lotatt12 != null">lotatt12,</if>
  136. <if test="lotatt13 != null">lotatt13,</if>
  137. <if test="lotatt14 != null">lotatt14,</if>
  138. <if test="lotatt15 != null">lotatt15,</if>
  139. <if test="lotatt16 != null">lotatt16,</if>
  140. <if test="lotatt17 != null">lotatt17,</if>
  141. <if test="lotatt18 != null">lotatt18,</if>
  142. <if test="packId != null">pack_id,</if>
  143. <if test="pickZone != null">pick_zone,</if>
  144. <if test="location != null">location,</if>
  145. <if test="lotnum != null">lotnum,</if>
  146. <if test="remark != null">remark,</if>
  147. <if test="createTime != null">create_time,</if>
  148. <if test="createBy != null">create_by,</if>
  149. <if test="updateTime != null">update_time,</if>
  150. <if test="updateBy != null">update_by,</if>
  151. <if test="netWeight != null">net_weight,</if>
  152. <if test="grossWeight != null">gross_weight,</if>
  153. <if test="cubic != null">cubic,</if>
  154. <if test="dEdi01 != null">d_edi_01,</if>
  155. <if test="dEdi02 != null">d_edi_02,</if>
  156. <if test="dEdi03 != null">d_edi_03,</if>
  157. <if test="dEdi04 != null">d_edi_04,</if>
  158. <if test="dEdi05 != null">d_edi_05,</if>
  159. <if test="dEdi06 != null">d_edi_06,</if>
  160. <if test="dEdi07 != null">d_edi_07,</if>
  161. <if test="dEdi08 != null">d_edi_08,</if>
  162. <if test="dEdi09 != null">d_edi_09,</if>
  163. <if test="dEdi10 != null">d_edi_10,</if>
  164. <if test="dEdi11 != null">d_edi_11,</if>
  165. <if test="dEdi12 != null">d_edi_12,</if>
  166. <if test="dEdi13 != null">d_edi_13,</if>
  167. <if test="dEdi14 != null">d_edi_14,</if>
  168. <if test="dEdi15 != null">d_edi_15,</if>
  169. <if test="dEdi16 != null">d_edi_16,</if>
  170. <if test="dEdi17 != null">d_edi_17,</if>
  171. <if test="dEdi18 != null">d_edi_18,</if>
  172. <if test="dEdi19 != null">d_edi_19,</if>
  173. <if test="dEdi20 != null">d_edi_20,</if>
  174. <if test="traceId != null">trace_id,</if>
  175. <if test="softAllocationRule != null">soft_allocation_rule,</if>
  176. <if test="allocationRule != null">allocation_rule,</if>
  177. <if test="userdefine1 != null">userdefine1,</if>
  178. <if test="userdefine2 != null">userdefine2,</if>
  179. <if test="userdefine3 != null">userdefine3,</if>
  180. <if test="userdefine4 != null">userdefine4,</if>
  181. <if test="userdefine5 != null">userdefine5,</if>
  182. </trim>
  183. <trim prefix="values (" suffix=")" suffixOverrides=",">
  184. <if test="orderNo != null">#{orderNo},</if>
  185. <if test="orderLineNo != null">#{orderLineNo},</if>
  186. <if test="customerId != null and customerId != ''">#{customerId},</if>
  187. <if test="sku != null and sku != ''">#{sku},</if>
  188. <if test="lineStatus != null and lineStatus != ''">#{lineStatus},</if>
  189. <if test="qtyOrdered != null">#{qtyOrdered},</if>
  190. <if test="qtyOrderedEach != null">#{qtyOrderedEach},</if>
  191. <if test="qtySoftAllocated != null">#{qtySoftAllocated},</if>
  192. <if test="qtySoftallocatedEach != null">#{qtySoftallocatedEach},</if>
  193. <if test="qtyAllocated != null">#{qtyAllocated},</if>
  194. <if test="qtyAllocatedEach != null">#{qtyAllocatedEach},</if>
  195. <if test="qtyPicked != null">#{qtyPicked},</if>
  196. <if test="qtyPickedEach != null">#{qtyPickedEach},</if>
  197. <if test="qtyPacked != null">#{qtyPacked},</if>
  198. <if test="qtyPackedEach != null">#{qtyPackedEach},</if>
  199. <if test="qtyShipped != null">#{qtyShipped},</if>
  200. <if test="qtyShippedEach != null">#{qtyShippedEach},</if>
  201. <if test="uom != null">#{uom},</if>
  202. <if test="lotatt01 != null">#{lotatt01},</if>
  203. <if test="lotatt02 != null">#{lotatt02},</if>
  204. <if test="lotatt03 != null">#{lotatt03},</if>
  205. <if test="lotatt04 != null">#{lotatt04},</if>
  206. <if test="lotatt05 != null">#{lotatt05},</if>
  207. <if test="lotatt06 != null">#{lotatt06},</if>
  208. <if test="lotatt07 != null">#{lotatt07},</if>
  209. <if test="lotatt08 != null">#{lotatt08},</if>
  210. <if test="lotatt09 != null">#{lotatt09},</if>
  211. <if test="lotatt10 != null">#{lotatt10},</if>
  212. <if test="lotatt11 != null">#{lotatt11},</if>
  213. <if test="lotatt12 != null">#{lotatt12},</if>
  214. <if test="lotatt13 != null">#{lotatt13},</if>
  215. <if test="lotatt14 != null">#{lotatt14},</if>
  216. <if test="lotatt15 != null">#{lotatt15},</if>
  217. <if test="lotatt16 != null">#{lotatt16},</if>
  218. <if test="lotatt17 != null">#{lotatt17},</if>
  219. <if test="lotatt18 != null">#{lotatt18},</if>
  220. <if test="packId != null">#{packId},</if>
  221. <if test="pickZone != null">#{pickZone},</if>
  222. <if test="location != null">#{location},</if>
  223. <if test="lotnum != null">#{lotnum},</if>
  224. <if test="remark != null">#{remark},</if>
  225. <if test="createTime != null">#{createTime},</if>
  226. <if test="createBy != null">#{createBy},</if>
  227. <if test="updateTime != null">#{updateTime},</if>
  228. <if test="updateBy != null">#{updateBy},</if>
  229. <if test="netWeight != null">#{netWeight},</if>
  230. <if test="grossWeight != null">#{grossWeight},</if>
  231. <if test="cubic != null">#{cubic},</if>
  232. <if test="dEdi01 != null">#{dEdi01},</if>
  233. <if test="dEdi02 != null">#{dEdi02},</if>
  234. <if test="dEdi03 != null">#{dEdi03},</if>
  235. <if test="dEdi04 != null">#{dEdi04},</if>
  236. <if test="dEdi05 != null">#{dEdi05},</if>
  237. <if test="dEdi06 != null">#{dEdi06},</if>
  238. <if test="dEdi07 != null">#{dEdi07},</if>
  239. <if test="dEdi08 != null">#{dEdi08},</if>
  240. <if test="dEdi09 != null">#{dEdi09},</if>
  241. <if test="dEdi10 != null">#{dEdi10},</if>
  242. <if test="dEdi11 != null">#{dEdi11},</if>
  243. <if test="dEdi12 != null">#{dEdi12},</if>
  244. <if test="dEdi13 != null">#{dEdi13},</if>
  245. <if test="dEdi14 != null">#{dEdi14},</if>
  246. <if test="dEdi15 != null">#{dEdi15},</if>
  247. <if test="dEdi16 != null">#{dEdi16},</if>
  248. <if test="dEdi17 != null">#{dEdi17},</if>
  249. <if test="dEdi18 != null">#{dEdi18},</if>
  250. <if test="dEdi19 != null">#{dEdi19},</if>
  251. <if test="dEdi20 != null">#{dEdi20},</if>
  252. <if test="traceId != null">#{traceId},</if>
  253. <if test="softAllocationRule != null">#{softAllocationRule},</if>
  254. <if test="allocationRule != null">#{allocationRule},</if>
  255. <if test="userdefine1 != null">#{userdefine1},</if>
  256. <if test="userdefine2 != null">#{userdefine2},</if>
  257. <if test="userdefine3 != null">#{userdefine3},</if>
  258. <if test="userdefine4 != null">#{userdefine4},</if>
  259. <if test="userdefine5 != null">#{userdefine5},</if>
  260. </trim>
  261. </insert>
  262. <update id="updateWmsDocOrderDetails" parameterType="WmsDocOrderDetails">
  263. update wms_doc_order_details
  264. <trim prefix="SET" suffixOverrides=",">
  265. <if test="customerId != null and customerId != ''">customer_id = #{customerId},</if>
  266. <if test="sku != null and sku != ''">sku = #{sku},</if>
  267. <if test="lineStatus != null and lineStatus != ''">line_status = #{lineStatus},</if>
  268. <if test="qtyOrdered != null">qty_ordered = #{qtyOrdered},</if>
  269. <if test="qtyOrderedEach != null">qty_ordered_each = #{qtyOrderedEach},</if>
  270. <if test="qtySoftAllocated != null">qty_soft_allocated = #{qtySoftAllocated},</if>
  271. <if test="qtySoftallocatedEach != null">qty_softallocated_each = #{qtySoftallocatedEach},</if>
  272. <if test="qtyAllocated != null">qty_allocated = #{qtyAllocated},</if>
  273. <if test="qtyAllocatedEach != null">qty_allocated_each = #{qtyAllocatedEach},</if>
  274. <if test="qtyPicked != null">qty_picked = #{qtyPicked},</if>
  275. <if test="qtyPickedEach != null">qty_picked_each = #{qtyPickedEach},</if>
  276. <if test="qtyPacked != null">qty_packed = #{qtyPacked},</if>
  277. <if test="qtyPackedEach != null">qty_packed_each = #{qtyPackedEach},</if>
  278. <if test="qtyShipped != null">qty_shipped = #{qtyShipped},</if>
  279. <if test="qtyShippedEach != null">qty_shipped_each = #{qtyShippedEach},</if>
  280. <if test="uom != null">uom = #{uom},</if>
  281. <if test="lotatt01 != null">lotatt01 = #{lotatt01},</if>
  282. <if test="lotatt02 != null">lotatt02 = #{lotatt02},</if>
  283. <if test="lotatt03 != null">lotatt03 = #{lotatt03},</if>
  284. <if test="lotatt04 != null">lotatt04 = #{lotatt04},</if>
  285. <if test="lotatt05 != null">lotatt05 = #{lotatt05},</if>
  286. <if test="lotatt06 != null">lotatt06 = #{lotatt06},</if>
  287. <if test="lotatt07 != null">lotatt07 = #{lotatt07},</if>
  288. <if test="lotatt08 != null">lotatt08 = #{lotatt08},</if>
  289. <if test="lotatt09 != null">lotatt09 = #{lotatt09},</if>
  290. <if test="lotatt10 != null">lotatt10 = #{lotatt10},</if>
  291. <if test="lotatt11 != null">lotatt11 = #{lotatt11},</if>
  292. <if test="lotatt12 != null">lotatt12 = #{lotatt12},</if>
  293. <if test="lotatt13 != null">lotatt13 = #{lotatt13},</if>
  294. <if test="lotatt14 != null">lotatt14 = #{lotatt14},</if>
  295. <if test="lotatt15 != null">lotatt15 = #{lotatt15},</if>
  296. <if test="lotatt16 != null">lotatt16 = #{lotatt16},</if>
  297. <if test="lotatt17 != null">lotatt17 = #{lotatt17},</if>
  298. <if test="lotatt18 != null">lotatt18 = #{lotatt18},</if>
  299. <if test="packId != null">pack_id = #{packId},</if>
  300. <if test="pickZone != null">pick_zone = #{pickZone},</if>
  301. <if test="location != null">location = #{location},</if>
  302. <if test="lotnum != null">lotnum = #{lotnum},</if>
  303. <if test="remark != null">remark = #{remark},</if>
  304. <if test="createTime != null">create_time = #{createTime},</if>
  305. <if test="createBy != null">create_by = #{createBy},</if>
  306. <if test="updateTime != null">update_time = #{updateTime},</if>
  307. <if test="updateBy != null">update_by = #{updateBy},</if>
  308. <if test="netWeight != null">net_weight = #{netWeight},</if>
  309. <if test="grossWeight != null">gross_weight = #{grossWeight},</if>
  310. <if test="cubic != null">cubic = #{cubic},</if>
  311. <if test="dEdi01 != null">d_edi_01 = #{dEdi01},</if>
  312. <if test="dEdi02 != null">d_edi_02 = #{dEdi02},</if>
  313. <if test="dEdi03 != null">d_edi_03 = #{dEdi03},</if>
  314. <if test="dEdi04 != null">d_edi_04 = #{dEdi04},</if>
  315. <if test="dEdi05 != null">d_edi_05 = #{dEdi05},</if>
  316. <if test="dEdi06 != null">d_edi_06 = #{dEdi06},</if>
  317. <if test="dEdi07 != null">d_edi_07 = #{dEdi07},</if>
  318. <if test="dEdi08 != null">d_edi_08 = #{dEdi08},</if>
  319. <if test="dEdi09 != null">d_edi_09 = #{dEdi09},</if>
  320. <if test="dEdi10 != null">d_edi_10 = #{dEdi10},</if>
  321. <if test="dEdi11 != null">d_edi_11 = #{dEdi11},</if>
  322. <if test="dEdi12 != null">d_edi_12 = #{dEdi12},</if>
  323. <if test="dEdi13 != null">d_edi_13 = #{dEdi13},</if>
  324. <if test="dEdi14 != null">d_edi_14 = #{dEdi14},</if>
  325. <if test="dEdi15 != null">d_edi_15 = #{dEdi15},</if>
  326. <if test="dEdi16 != null">d_edi_16 = #{dEdi16},</if>
  327. <if test="dEdi17 != null">d_edi_17 = #{dEdi17},</if>
  328. <if test="dEdi18 != null">d_edi_18 = #{dEdi18},</if>
  329. <if test="dEdi19 != null">d_edi_19 = #{dEdi19},</if>
  330. <if test="dEdi20 != null">d_edi_20 = #{dEdi20},</if>
  331. <if test="traceId != null">trace_id = #{traceId},</if>
  332. <if test="softAllocationRule != null">soft_allocation_rule = #{softAllocationRule},</if>
  333. <if test="allocationRule != null">allocation_rule = #{allocationRule},</if>
  334. <if test="userdefine1 != null">userdefine1 = #{userdefine1},</if>
  335. <if test="userdefine2 != null">userdefine2 = #{userdefine2},</if>
  336. <if test="userdefine3 != null">userdefine3 = #{userdefine3},</if>
  337. <if test="userdefine4 != null">userdefine4 = #{userdefine4},</if>
  338. <if test="userdefine5 != null">userdefine5 = #{userdefine5},</if>
  339. </trim>
  340. where order_no = #{orderNo} and order_line_no = #{orderLineNo}
  341. </update>
  342. <delete id="deleteWmsDocOrderDetailsByOrderNo" parameterType="String">
  343. delete from wms_doc_order_details where order_no = #{orderNo}
  344. </delete>
  345. <delete id="deleteWmsDocOrderDetailsByOrderNos" parameterType="String">
  346. delete from wms_doc_order_details where order_no in
  347. <foreach item="orderNo" collection="array" open="(" separator="," close=")">
  348. #{orderNo}
  349. </foreach>
  350. </delete>
  351. <update id="updateOrderDetailsStock">
  352. update wms_doc_order_details set qty_allocated = qty_allocated + #{qty},qty_allocated_each = qty_allocated_each + #{qty},line_status = #{status}
  353. where order_no = #{orderNo} and order_line_no = #{orderLoneNo}
  354. </update>
  355. <select id="selectStockOrder" resultMap="StockOrderVOResult">
  356. select
  357. h.order_no,de.order_line_no,ad.allocation_id,de.sku,de.d_edi_02,ifnull(ad.pick_qty,0) pick_qty
  358. from wms_doc_order_header h
  359. left join wms_doc_order_details de on h.order_no = de.order_no
  360. left join act_allocation_details ad on de.order_no = ad.order_no and de.order_line_no = ad.line_no
  361. left join base_sku sk on de.sku = sk.sku
  362. left join wms_box_info box on ad.pick_to_location = box.location_id
  363. where box.box_no = #{palletNo}
  364. </select>
  365. <select id="selectWmsDocOrderDetailsByNoLineNo" resultMap="WmsDocOrderDetailsResult">
  366. select * from wms_doc_order_details where order_no = #{orderNo} and order_line_no = #{orderLineNo}
  367. </select>
  368. <delete id="deleteWmsDocAsnDetailsByOrderNoLineNo">
  369. delete from wms_doc_order_details where order_no = #{orderNo} and order_line_no = #{orderLineNo}
  370. </delete>
  371. </mapper>