InvSourceMapper.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.InvSourceMapper">
  6. <resultMap id="BaseResultMap" type="com.ydtech.modules.inv.model.po.InvSource">
  7. <id property="insuranceId" column="insurance_id" jdbcType="BIGINT"/>
  8. <id property="id" column="id" jdbcType="BIGINT"/>
  9. <result property="insuranceName" column="insurance_name" jdbcType="VARCHAR"/>
  10. <result property="insuranceDept" column="insurance_dept" jdbcType="VARCHAR"/>
  11. <result property="insuranceDeptId" column="insurance_dept_id" jdbcType="BIGINT"/>
  12. <result property="risk" column="risk" jdbcType="VARCHAR"/>
  13. <result property="jqPolicyId" column="jq_policy_id" jdbcType="BIGINT"/>
  14. <result property="jqPremiumTax" column="jq_premium_tax" jdbcType="DECIMAL"/>
  15. <result property="jqPremium" column="jq_premium" jdbcType="DECIMAL"/>
  16. <result property="syPolicyId" column="sy_policy_id" jdbcType="BIGINT"/>
  17. <result property="syPremiumTax" column="sy_premium_tax" jdbcType="DECIMAL"/>
  18. <result property="syPremium" column="sy_premium" jdbcType="DECIMAL"/>
  19. <result property="nonCarPolicyId" column="non_car_policy_id" jdbcType="BIGINT"/>
  20. <result property="nonCarPremiumTax" column="non_car_premium_tax" jdbcType="DECIMAL"/>
  21. <result property="nonCarPremium" column="non_car_premium" jdbcType="DECIMAL"/>
  22. <result property="insuredName" column="insured_name" jdbcType="VARCHAR"/>
  23. <result property="licenseno" column="licenseno" jdbcType="VARCHAR"/>
  24. <result property="signingTime" column="signing_time" jdbcType="TIMESTAMP"/>
  25. <result property="clearingTime" column="clearing_time" jdbcType="TIMESTAMP"/>
  26. <result property="taxamount" column="taxamount" jdbcType="DECIMAL"/>
  27. <result property="jqReceivableRatio" column="jq_receivable_ratio" jdbcType="INTEGER"/>
  28. <result property="jqPremiumRatio" column="jq_premium_ratio" jdbcType="INTEGER"/>
  29. <result property="jqNonCopyingRatio" column="jq_non_copying_ratio" jdbcType="INTEGER"/>
  30. <result property="syReceivableRatio" column="sy_receivable_ratio" jdbcType="INTEGER"/>
  31. <result property="syPremiumRatio" column="sy_premium_ratio" jdbcType="INTEGER"/>
  32. <result property="syNonCopyingRatio" column="sy_non_copying_ratio" jdbcType="INTEGER"/>
  33. <result property="nonCarReceivableRatio" column="non_car_receivable_ratio" jdbcType="INTEGER"/>
  34. <result property="nonCarPremiumRatio" column="non_car_premium_ratio" jdbcType="INTEGER"/>
  35. <result property="nonCarNonCopyingRatio" column="non_car_non_copying_ratio" jdbcType="INTEGER"/>
  36. <result property="premium" column="premium" jdbcType="DECIMAL"/>
  37. <result property="nonCopying" column="non_copying" jdbcType="DECIMAL"/>
  38. <result property="receivable" column="receivable" jdbcType="DECIMAL"/>
  39. <result property="maxJqReceivableRatio" column="max_jq_receivable_ratio" jdbcType="INTEGER"/>
  40. <result property="maxSyReceivableRatio" column="max_sy_receivable_ratio" jdbcType="INTEGER"/>
  41. <result property="maxNonCarReceivableRatio" column="max_non_car_receivable_ratio" jdbcType="INTEGER"/>
  42. <result property="maxReceivable" column="max_receivable" jdbcType="VARCHAR"/>
  43. <result property="clearingState" column="clearing_state" jdbcType="CHAR"/>
  44. </resultMap>
  45. <sql id="Base_Column_List">
  46. insurance_id,id,insurance_name,
  47. insurance_dept,insurance_dept_id,risk,
  48. jq_policy_id,jq_premium_tax,jq_premium,
  49. sy_policy_id,sy_premium_tax,sy_premium,
  50. non_car_policy_id,non_car_premium_tax,non_car_premium,
  51. insured_name,licenseno,signing_time,
  52. clearing_time,taxamount,jq_receivable_ratio,
  53. jq_premium_ratio,jq_non_copying_ratio,sy_receivable_ratio,
  54. sy_premium_ratio,sy_non_copying_ratio,non_car_receivable_ratio,
  55. non_car_premium_ratio,non_car_non_copying_ratio,premium,
  56. non_copying,receivable,max_jq_receivable_ratio,
  57. max_sy_receivable_ratio,max_non_car_receivable_ratio,max_receivable,
  58. clearing_state
  59. </sql>
  60. <update id="syncStatus">
  61. UPDATE inv_source ins
  62. JOIN inv_settlement_source iss ON ins.jq_policy_id = iss.jq_policy_id
  63. AND ins.sy_policy_id = iss.sy_policy_id
  64. AND ins.non_car_policy_id = iss.non_car_policy_id
  65. AND ins.licenseno = iss.licenseno
  66. SET ins.clearing_state = 1,
  67. ins.clearing_time = iss.agency_settlement_time;
  68. </update>
  69. </mapper>