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.

74 lines
3.4 KiB

5 years ago
5 years 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.xjfast.mapper.CodelTrackMapper">
  4. <resultMap id="BaseResultMap" type="com.xjfast.entity.CodelTrack">
  5. <result column="id" jdbcType="INTEGER" property="id"/>
  6. <result column="target_country" jdbcType="VARCHAR" property="targetCountry"/>
  7. <result column="delivery_method" jdbcType="VARCHAR" property="deliveryMethod"/>
  8. <result column="weight" jdbcType="FLOAT" property="weight"/>
  9. <result column="payment_status" jdbcType="VARCHAR" property="paymentStatus"/>
  10. <result column="payment_amount" jdbcType="FLOAT" property="paymentAmount"/>
  11. <result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
  12. <result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/>
  13. <result column="updated_by" jdbcType="VARCHAR" property="updatedBy"/>
  14. <result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/>
  15. <result column="status" jdbcType="VARCHAR" property="status"/>
  16. <result column="logistics_billing" jdbcType="FLOAT" property="logisticsBilling"/>
  17. <result column="pickup_method" jdbcType="VARCHAR" property="pickupMethod"/>
  18. <result column="tax" jdbcType="VARCHAR" property="tax"/>
  19. <result column="del_no" jdbcType="VARCHAR" property="delNo"/>
  20. </resultMap>
  21. <select id="CodelTrackList" resultType="com.xjfast.entity.vo.CodelTrackVo">
  22. SELECT ch.DelNo,
  23. ch.Active,
  24. ch.DeliveryDate,
  25. ch.DelDate,
  26. ch.Receiver,
  27. ch.BillAirwayNo,
  28. f.ForwarderName,
  29. f.ForwarderNo,
  30. ct.target_country,
  31. ct.delivery_method,
  32. ct.weight,
  33. ct.operation,
  34. ct.payment_status,
  35. ct.payment_amount,
  36. ct.created_by,
  37. ct.created_date,
  38. ct.logistics_billing,
  39. ct.pickup_method,
  40. ct.tax,
  41. ct.del_no,
  42. wh.WareHouseID,
  43. wh.WareHouseName
  44. FROM CODelHeader ch
  45. LEFT JOIN Forwarder f ON (ch.ForwarderID = f.ForwarderNo)
  46. LEFT JOIN codel_track ct ON (ct.del_no = ch.DelNo)
  47. LEFT JOIN CODelDetail cd ON (cd.DelNo = ch.DelNo)
  48. LEFT JOIN WareHouse wh ON (wh.WareHouseID = cd.WarehouseID)
  49. <where>
  50. <if test="delNo != null and delNo != ''">
  51. ch.DelNo like '%'+#{delNo}+'%'
  52. </if>
  53. <if test="active != null and active != ''">
  54. and ch.Active = #{active}
  55. </if>
  56. <if test=" paymentStatus != null and paymentStatus != ''">
  57. and ct.payment_status = #{paymentStatus}
  58. </if>
  59. <if test="wareHouseName != null and wareHouseName != ''">
  60. and wh.WareHouseName = #{wareHouseName}
  61. </if>
  62. </where>
  63. </select>
  64. <select id="getPartOtherGroup2" resultType="java.lang.String">
  65. SELECT p.OtherGroup2
  66. FROM CODelDetail cd
  67. LEFT JOIN Part p ON (p.PartNo = cd.PartNo)
  68. <where>
  69. <if test="delNo != null and delNo != ''">
  70. cd.DelNo = #{delNo}
  71. </if>
  72. </where>
  73. </select>
  74. </mapper>