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.

50 lines
2.7 KiB

  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.CodelheaderMapper">
  4. <resultMap id="BaseResultMap" type="com.xjfast.entity.Codelheader">
  5. <id column="Site" jdbcType="VARCHAR" property="site"/>
  6. <id column="DelNo" jdbcType="VARCHAR" property="delno"/>
  7. <result column="DelDate" jdbcType="TIMESTAMP" property="deldate"/>
  8. <result column="UserName" jdbcType="VARCHAR" property="username"/>
  9. <result column="EnteredDate" jdbcType="TIMESTAMP" property="entereddate"/>
  10. <result column="Receiver" jdbcType="VARCHAR" property="receiver"/>
  11. <result column="DelAddID" jdbcType="VARCHAR" property="deladdid"/>
  12. <result column="BillAirwayNo" jdbcType="VARCHAR" property="billairwayno"/>
  13. <result column="ForwarderID" jdbcType="VARCHAR" property="forwarderid"/>
  14. <result column="CustomerID" jdbcType="VARCHAR" property="customerid"/>
  15. <result column="Remark" jdbcType="VARCHAR" property="remark"/>
  16. <result column="CreditFlag" jdbcType="CHAR" property="creditflag"/>
  17. <result column="PayerCustomerID" jdbcType="VARCHAR" property="payercustomerid"/>
  18. <result column="CommonDelFlag" jdbcType="CHAR" property="commondelflag"/>
  19. <result column="EmailCanSendFlag" jdbcType="CHAR" property="emailcansendflag"/>
  20. <result column="PrintTotalBoxCount" jdbcType="INTEGER" property="printtotalboxcount"/>
  21. <result column="PrintBoxSeqNo" jdbcType="INTEGER" property="printboxseqno"/>
  22. </resultMap>
  23. <sql id="Base_Column_List">
  24. Site
  25. , DelNo, DelDate, UserName, EnteredDate, Receiver, DelAddID, BillAirwayNo, ForwarderID,
  26. CustomerID, Remark, CreditFlag, PayerCustomerID, CommonDelFlag, EmailCanSendFlag,
  27. PrintTotalBoxCount, PrintBoxSeqNo
  28. </sql>
  29. <select id="searchCodelheader" resultType="com.xjfast.entity.vo.CodelheaderVo"
  30. parameterType="com.xjfast.entity.query.CodelheaderQuery">
  31. SELECT h.*,d.ShipQty,d.PartNo,d.WarehouseID
  32. FROM CODelHeader h
  33. LEFT JOIN CODelDetail d on (d.DelNo = h.DelNo)
  34. <where>
  35. <if test="active != null and active != ''">
  36. h.Active = #{active}
  37. </if>
  38. <if test="partNo != null and partNo != '' ">
  39. and d.PartNo = #{partNo}
  40. </if>
  41. <if test="warehouseId != null and warehouseId != '' ">
  42. and d.WarehouseID = #{warehouseId}
  43. </if>
  44. <if test="deliverydate != null ">
  45. and CONVERT(varchar(10),h.DeliveryDate,120) <![CDATA[>=]]> CONVERT(varchar(10),#{deliverydate},120)
  46. </if>
  47. </where>
  48. </select>
  49. </mapper>