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.

104 lines
4.2 KiB

10 months ago
4 months ago
10 months ago
5 months ago
10 months ago
8 months ago
6 months ago
5 months ago
5 months ago
6 months ago
5 months ago
8 months ago
6 months ago
5 months ago
8 months ago
10 months ago
6 months ago
10 months ago
8 months ago
6 months ago
10 months ago
6 months ago
10 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="ecssMapper">
  4. <select id="searchTemplateList" resultType="EcssTemplate">
  5. select * from ecss_template
  6. <where>
  7. buNo=#{buNo}
  8. <if test="name != null and name != ''">
  9. and name like '%'+#{name}+'%'
  10. </if>
  11. <if test="type != null and type != ''">
  12. AND type = #{type}
  13. </if>
  14. <if test="customName != null and customName != ''">
  15. AND customName = #{customName}
  16. </if>
  17. <if test="shippingMode != null and shippingMode != ''">
  18. AND shippingMode like '%'+#{shippingMode}+'%'
  19. </if>
  20. </where>
  21. order by CreateDate desc
  22. </select>
  23. <select id="searchWalMartOrderList" resultType="EcssWalMartOrder">
  24. select * from ecss_walMartOrder
  25. <where>
  26. sku=#{sku} and qty=#{qty}
  27. <if test="so != null and so != ''">
  28. and so like '%'+#{so}+'%'
  29. </if>
  30. </where>
  31. </select>
  32. <select id="searchEcssCoDelNotifyDetail" resultType="java.util.Map">
  33. select a.*,#{cmcInvoice} as cmcInvoice,#{shippingMode} as shippingMode,#{destination} as destination,
  34. CONVERT(varchar(10), #{readyDate}, 120) AS readyDate,a.salesOrder as salesOrder,
  35. CASE WHEN a.modifyFlag = 1 THEN '是' ELSE '否' END AS modifyFlagString
  36. from ecss_CoDelNotifydetail a
  37. <where>
  38. And a.site = #{site}
  39. AND a.delNo = #{delNo}
  40. </where>
  41. order by a.item_no
  42. </select>
  43. <select id="searchCoDelPalletData" resultType="java.util.Map">
  44. select c.salesOrder as salesOrder,b.po_no as customerPO,b.part_no,b.qty,
  45. a.box_qty as boxQty,b.rolls,b.pn,a.gross_weight as grossWeight,a.net_weight as netWeight,
  46. #{cmcInvoice} as cmcInvoice,#{shippingMode} as shippingMode,#{destination} as destination,
  47. c.cmc_comment,CONVERT(varchar(10), #{readyDate}, 120) AS readyDate,
  48. CASE WHEN c.modifyFlag = 1 THEN '是' ELSE '否' END AS modifyFlagString
  49. from ecss_CoDelBoxList a
  50. left join ecss_CoDelPalletDetail b on a.site=b.site and a.bu_no=b.bu_no and a.delNo=b.delNo and a.item_no=b.seq_no
  51. left join ecss_CoDelNotifydetail c on b.site=c.site and b.bu_no=c.bu_no and b.delNo=c.delNo and b.notify_detail_item_no=c.item_no
  52. where a.site=#{site} and a.bu_no=#{buNo} and a.delNo=#{delNo} and b.site is not null
  53. </select>
  54. <select id="searchEcssCoDelNotifyDetailList" resultType="java.util.Map">
  55. select a.item_no,a.customerPO,a.part_no,a.part_description,a.currency,
  56. CONVERT(DECIMAL(20, 0), a.qty) as qty,CONVERT(DECIMAL(20, 5), a.tp) as unitPrice,b.hsCode,
  57. a.upc,a.so,a.ttl_amount,a.pn,h.hsCodeDesc,h.hsCodeDescEn,a.cmc_comment,
  58. CASE WHEN a.modifyFlag = 1 THEN '是' ELSE '否' END AS modifyFlag
  59. from ecss_CoDelNotifydetail a
  60. left join part b on a.site=b.site and a.part_no=b.part_no
  61. left join ecss_hsCode h on b.hsCode=h.HsCode and a.site=h.site and b.hsCodeDesc=h.hsCodeDesc
  62. <where>
  63. And a.site = #{site}
  64. AND a.delNo = #{delNo}
  65. </where>
  66. order by a.item_no
  67. </select>
  68. <select id="getEcssCoDelNotifyDetailData" resultType="java.util.Map">
  69. select b.hsCodeDesc,b.hsCode,h.hsCodeDescEn
  70. from ecss_CoDelNotifyDetail a
  71. left join part b on a.site=b.site and a.part_no=b.part_no
  72. left join ecss_hsCode h on b.hsCode=h.HsCode and a.site=h.site and b.hsCodeDesc=h.hsCodeDesc
  73. where a.site =#{site} and a.delNo=#{delNo}
  74. GROUP BY b.hsCodeDesc,b.hsCode,h.hsCodeDescEn
  75. </select>
  76. <select id="getCustomerInfo" resultType="java.util.Map">
  77. select DISTINCT vcus.ccusname,vcusp.ccontactname,vcusp.cnative
  78. from ecss_custdev_mes_cmc_customer vcus
  79. LEFT JOIN ecss_custdev_mes_cmc_customer_person vcusp on vcus.ccuscode=vcusp.ccuscode
  80. where vcus.ccusname=#{ccusname}
  81. </select>
  82. <select id="getCustomerAdd" resultType="java.util.Map">
  83. select DISTINCT vcus.ccusname,vcusa.cDeliverAdd,vcusa.cDeliverUnit, vcus.country,vcusa.deliverycountry
  84. from ecss_custdev_mes_cmc_customer vcus
  85. left join ecss_custdev_mes_cmc_customer_addr vcusa on vcus.ccuscode=vcusa.ccuscode
  86. where vcus.ccusname=#{ccusname}
  87. </select>
  88. <select id="getCustomerList" resultType="java.util.Map">
  89. select * from ecss_custdev_mes_cmc_customer
  90. <where>
  91. <if test="ccusname != null and ccusname != ''">
  92. and ccusname like '%'+#{ccusname}+'%'
  93. </if>
  94. </where>
  95. </select>
  96. </mapper>