| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.ydtech.modules.inv.dao.InvSourceMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.inv.model.po.InvSource">
- <id property="insuranceId" column="insurance_id" jdbcType="BIGINT"/>
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="insuranceName" column="insurance_name" jdbcType="VARCHAR"/>
- <result property="insuranceDept" column="insurance_dept" jdbcType="VARCHAR"/>
- <result property="insuranceDeptId" column="insurance_dept_id" jdbcType="BIGINT"/>
- <result property="risk" column="risk" jdbcType="VARCHAR"/>
- <result property="jqPolicyId" column="jq_policy_id" jdbcType="BIGINT"/>
- <result property="jqPremiumTax" column="jq_premium_tax" jdbcType="DECIMAL"/>
- <result property="jqPremium" column="jq_premium" jdbcType="DECIMAL"/>
- <result property="syPolicyId" column="sy_policy_id" jdbcType="BIGINT"/>
- <result property="syPremiumTax" column="sy_premium_tax" jdbcType="DECIMAL"/>
- <result property="syPremium" column="sy_premium" jdbcType="DECIMAL"/>
- <result property="nonCarPolicyId" column="non_car_policy_id" jdbcType="BIGINT"/>
- <result property="nonCarPremiumTax" column="non_car_premium_tax" jdbcType="DECIMAL"/>
- <result property="nonCarPremium" column="non_car_premium" jdbcType="DECIMAL"/>
- <result property="insuredName" column="insured_name" jdbcType="VARCHAR"/>
- <result property="licenseno" column="licenseno" jdbcType="VARCHAR"/>
- <result property="signingTime" column="signing_time" jdbcType="TIMESTAMP"/>
- <result property="clearingTime" column="clearing_time" jdbcType="TIMESTAMP"/>
- <result property="taxamount" column="taxamount" jdbcType="DECIMAL"/>
- <result property="jqReceivableRatio" column="jq_receivable_ratio" jdbcType="INTEGER"/>
- <result property="jqPremiumRatio" column="jq_premium_ratio" jdbcType="INTEGER"/>
- <result property="jqNonCopyingRatio" column="jq_non_copying_ratio" jdbcType="INTEGER"/>
- <result property="syReceivableRatio" column="sy_receivable_ratio" jdbcType="INTEGER"/>
- <result property="syPremiumRatio" column="sy_premium_ratio" jdbcType="INTEGER"/>
- <result property="syNonCopyingRatio" column="sy_non_copying_ratio" jdbcType="INTEGER"/>
- <result property="nonCarReceivableRatio" column="non_car_receivable_ratio" jdbcType="INTEGER"/>
- <result property="nonCarPremiumRatio" column="non_car_premium_ratio" jdbcType="INTEGER"/>
- <result property="nonCarNonCopyingRatio" column="non_car_non_copying_ratio" jdbcType="INTEGER"/>
- <result property="premium" column="premium" jdbcType="DECIMAL"/>
- <result property="nonCopying" column="non_copying" jdbcType="DECIMAL"/>
- <result property="receivable" column="receivable" jdbcType="DECIMAL"/>
- <result property="maxJqReceivableRatio" column="max_jq_receivable_ratio" jdbcType="INTEGER"/>
- <result property="maxSyReceivableRatio" column="max_sy_receivable_ratio" jdbcType="INTEGER"/>
- <result property="maxNonCarReceivableRatio" column="max_non_car_receivable_ratio" jdbcType="INTEGER"/>
- <result property="maxReceivable" column="max_receivable" jdbcType="VARCHAR"/>
- <result property="clearingState" column="clearing_state" jdbcType="CHAR"/>
- </resultMap>
- <sql id="Base_Column_List">
- insurance_id,id,insurance_name,
- insurance_dept,insurance_dept_id,risk,
- jq_policy_id,jq_premium_tax,jq_premium,
- sy_policy_id,sy_premium_tax,sy_premium,
- non_car_policy_id,non_car_premium_tax,non_car_premium,
- insured_name,licenseno,signing_time,
- clearing_time,taxamount,jq_receivable_ratio,
- jq_premium_ratio,jq_non_copying_ratio,sy_receivable_ratio,
- sy_premium_ratio,sy_non_copying_ratio,non_car_receivable_ratio,
- non_car_premium_ratio,non_car_non_copying_ratio,premium,
- non_copying,receivable,max_jq_receivable_ratio,
- max_sy_receivable_ratio,max_non_car_receivable_ratio,max_receivable,
- clearing_state
- </sql>
- <update id="syncStatus">
- UPDATE inv_source ins
- JOIN inv_settlement_source iss ON ins.jq_policy_id = iss.jq_policy_id
- AND ins.sy_policy_id = iss.sy_policy_id
- AND ins.non_car_policy_id = iss.non_car_policy_id
- AND ins.licenseno = iss.licenseno
- SET ins.clearing_state = 1,
- ins.clearing_time = iss.agency_settlement_time;
- </update>
- </mapper>
|