PolineMapper.xml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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.gyee.viewticket.mapper.ticket.PolineMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.gyee.viewticket.model.ticket.Poline">
  6. <id column="ID" property="id" />
  7. <result column="PONUM" property="ponum" />
  8. <result column="POLINENUM" property="polinenum" />
  9. <result column="ITEMNUM" property="itemnum" />
  10. <result column="DESCRIPTION" property="description" />
  11. <result column="WAREHOUSE" property="warehouse" />
  12. <result column="ORDERQTY" property="orderqty" />
  13. <result column="ORDERUNIT" property="orderunit" />
  14. <result column="CONVERSION" property="conversion" />
  15. <result column="UNITCOST" property="unitcost" />
  16. <result column="TAXUNITCOST" property="taxunitcost" />
  17. <result column="LINECOST" property="linecost" />
  18. <result column="TAXLINECOST" property="taxlinecost" />
  19. <result column="RECEIVEDQTY" property="receivedqty" />
  20. <result column="RECEIVEDUNITCOST" property="receivedunitcost" />
  21. <result column="RECEIVEDTOTALCOST" property="receivedtotalcost" />
  22. <result column="TAXCODE" property="taxcode" />
  23. <result column="TAXRATE" property="taxrate" />
  24. <result column="TAX" property="tax" />
  25. <result column="REJECTEDQTY" property="rejectedqty" />
  26. <result column="VENDELIVERYDATE" property="vendeliverydate" />
  27. <result column="ENTERDATE" property="enterdate" />
  28. <result column="ENTERBY" property="enterby" />
  29. <result column="REQUESTEDBY" property="requestedby" />
  30. <result column="REQDELIVERYDATE" property="reqdeliverydate" />
  31. <result column="MANUFACTURER" property="manufacturer" />
  32. <result column="MODELNUM" property="modelnum" />
  33. <result column="SERVICE" property="service" />
  34. <result column="STOCKTYPE" property="stocktype" />
  35. <result column="REMARK" property="remark" />
  36. <result column="LOCATION" property="location" />
  37. <result column="RECEIPTSCOMPLETE" property="receiptscomplete" />
  38. <result column="INSPECTION" property="inspection" />
  39. <result column="LOADEDCOST" property="loadedcost" />
  40. <result column="PRORATED" property="prorated" />
  41. <result column="PRORATECOST" property="proratecost" />
  42. <result column="WONUM" property="wonum" />
  43. <result column="TASKNUM" property="tasknum" />
  44. <result column="BUDNUM" property="budnum" />
  45. <result column="BUDITEM" property="buditem" />
  46. </resultMap>
  47. <!-- 通用查询结果列 -->
  48. <sql id="Base_Column_List">
  49. ID, PONUM, POLINENUM, ITEMNUM, DESCRIPTION, WAREHOUSE, ORDERQTY, ORDERUNIT, CONVERSION, UNITCOST, TAXUNITCOST, LINECOST, TAXLINECOST, RECEIVEDQTY, RECEIVEDUNITCOST, RECEIVEDTOTALCOST, TAXCODE, TAXRATE, TAX, REJECTEDQTY, VENDELIVERYDATE, ENTERDATE, ENTERBY, REQUESTEDBY, REQDELIVERYDATE, MANUFACTURER, MODELNUM, SERVICE, STOCKTYPE, REMARK, LOCATION, RECEIPTSCOMPLETE, INSPECTION, LOADEDCOST, PRORATED, PRORATECOST, WONUM, TASKNUM, BUDNUM, BUDITEM
  50. </sql>
  51. <select id="selectPolinePageList" resultType="java.util.Map">
  52. SELECT
  53. p.ponum,
  54. p.status,
  55. p.statusdate,
  56. p.vendor,
  57. p.totalcost,
  58. p.totaltax,
  59. p.sitenum,
  60. p.description,
  61. l.itemnum,
  62. l.warehouse,
  63. l.orderqty,
  64. l.orderunit,
  65. l.unitcost,
  66. l.linecost,
  67. l.enterdate,
  68. l.enterby,
  69. i.modelnum
  70. FROM
  71. POLINE l
  72. LEFT JOIN Po p ON p.ponum = l.ponum
  73. LEFT JOIN ITEM i on i.itemnum = l.itemnum
  74. <where>
  75. <if test=" '' != vendor and null != vendor ">
  76. and p.vendor like '%${vendor}%'
  77. </if>
  78. <if test=" '' != warehouse and null != warehouse ">
  79. and l.warehouse like '%${warehouse}%'
  80. </if>
  81. <if test=" '' != ponum and null != ponum ">
  82. and p.ponum like '%${ponum}%'
  83. </if>
  84. <if test=" '' != starttime and starttime !=null and endtime !=null and '' != endtime">
  85. and l.enterdate &gt;= #{starttime} and l.enterdate &lt;= #{endtime}
  86. </if>
  87. </where>
  88. </select>
  89. </mapper>