InvPayableStatementMapper.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.ydtech.modules.inv.dao.InvPayableStatementMapper">
  6. <resultMap id="BaseResultMap" type="com.ydtech.modules.inv.model.InvPayableStatement">
  7. <id property="id" column="id" jdbcType="INTEGER"/>
  8. <result property="businessChannel" column="business_channel" jdbcType="VARCHAR"/>
  9. <result property="signingDate" column="signing_date" jdbcType="DATE"/>
  10. <result property="numberPlate" column="number_plate" jdbcType="VARCHAR"/>
  11. <result property="insured" column="insured" jdbcType="VARCHAR"/>
  12. <result property="insuranceCompany" column="insurance_company" jdbcType="VARCHAR"/>
  13. <result property="dangerous" column="dangerous" jdbcType="VARCHAR"/>
  14. <result property="orderChannel" column="order_channel" jdbcType="VARCHAR"/>
  15. <result property="strongCross" column="strong_cross" jdbcType="DECIMAL"/>
  16. <result property="travelTax" column="travel_tax" jdbcType="DECIMAL"/>
  17. <result property="business" column="business" jdbcType="DECIMAL"/>
  18. <result property="strongCrossProportion" column="strong_cross_proportion" jdbcType="VARCHAR"/>
  19. <result property="travelTaxProportion" column="travel_tax_proportion" jdbcType="VARCHAR"/>
  20. <result property="businessProportion" column="business_proportion" jdbcType="VARCHAR"/>
  21. <result property="handle" column="handle" jdbcType="VARCHAR"/>
  22. </resultMap>
  23. <sql id="Base_Column_List">
  24. id
  25. ,business_channel,signing_date,
  26. number_plate,insured,insurance_company,
  27. dangerous,order_channel,strong_cross,
  28. travel_tax,business,strong_cross_proportion,
  29. travel_tax_proportion,business_proportion,handle
  30. </sql>
  31. <insert id="insertBatch">
  32. INSERT INTO inv_payable_statement(business_channel, signing_date, number_plate, insured, insurance_company,
  33. dangerous, order_channel, strong_cross, travel_tax, business, strong_cross_proportion, travel_tax_proportion,
  34. business_proportion, handle)VALUES
  35. <foreach collection='invPayableStatements' item='invPayableStatement' separator=','>
  36. (#{invPayableStatement.businessChannel},
  37. #{invPayableStatement.signingDate},
  38. #{invPayableStatement.numberPlate},
  39. #{invPayableStatement.insured},
  40. #{invPayableStatement.insuranceCompany},
  41. #{invPayableStatement.dangerous},
  42. #{invPayableStatement.orderChannel},
  43. #{invPayableStatement.strongCross},
  44. #{invPayableStatement.travelTax},
  45. #{invPayableStatement.business},
  46. #{invPayableStatement.strongCrossProportion},
  47. #{invPayableStatement.travelTaxProportion},
  48. #{invPayableStatement.businessProportion},
  49. #{invPayableStatement.handle})
  50. </foreach>
  51. </insert>
  52. <select id="selectBySigningDateAndNumberPlate" resultMap="BaseResultMap" parameterType="java.util.List">
  53. select * from inv_payable_statement where (signing_date, number_plate) in (
  54. <foreach collection='invPayableStatements' item='invPayableStatement' separator=','>
  55. (#{invPayableStatement.signingDate},
  56. #{invPayableStatement.numberPlate})
  57. </foreach>)
  58. </select>
  59. </mapper>