|
@@ -30,7 +30,11 @@
|
|
<result property="companyId" column="company_id"/>
|
|
<result property="companyId" column="company_id"/>
|
|
<result property="policyNo" column="policy_no"/>
|
|
<result property="policyNo" column="policy_no"/>
|
|
<result property="finishTime" column="finish_time"/>
|
|
<result property="finishTime" column="finish_time"/>
|
|
|
|
+ <result property="commission" column="commission_"/>
|
|
|
|
+
|
|
<association property="agent" column="agent_id" select="com.jpsoft.picc.modules.base.dao.InsuranceAgentDAO.get"></association>
|
|
<association property="agent" column="agent_id" select="com.jpsoft.picc.modules.base.dao.InsuranceAgentDAO.get"></association>
|
|
|
|
+ <association property="definition" column="definition_id" select="com.jpsoft.picc.modules.base.dao.InsuranceDefinitionDAO.get"></association>
|
|
|
|
+ <association property="company" column="company_id" select="com.jpsoft.picc.modules.base.dao.CompanyDAO.get"></association>
|
|
</resultMap>
|
|
</resultMap>
|
|
<insert id="insert" parameterType="com.jpsoft.picc.modules.business.entity.InsurancePolicy">
|
|
<insert id="insert" parameterType="com.jpsoft.picc.modules.business.entity.InsurancePolicy">
|
|
<!--
|
|
<!--
|
|
@@ -43,7 +47,7 @@
|
|
(id_,definition_id,status_,process_status,insurance_fee,start_time,end_time,
|
|
(id_,definition_id,status_,process_status,insurance_fee,start_time,end_time,
|
|
number_,account_bank,issuing_bank,singl_number,transfer_time,
|
|
number_,account_bank,issuing_bank,singl_number,transfer_time,
|
|
agent_id,insurance_policy_file,no_,effective_date,del_flag,create_by,create_time,update_by,update_time,
|
|
agent_id,insurance_policy_file,no_,effective_date,del_flag,create_by,create_time,update_by,update_time,
|
|
- company_id,latest_application_id,policy_no,finish_time)
|
|
|
|
|
|
+ company_id,latest_application_id,policy_no,finish_time,commission)
|
|
values
|
|
values
|
|
(
|
|
(
|
|
#{id,jdbcType=VARCHAR}
|
|
#{id,jdbcType=VARCHAR}
|
|
@@ -71,6 +75,7 @@
|
|
,#{latestApplicationId,jdbcType=VARCHAR}
|
|
,#{latestApplicationId,jdbcType=VARCHAR}
|
|
,#{policyNo,jdbcType=VARCHAR}
|
|
,#{policyNo,jdbcType=VARCHAR}
|
|
,#{finishTime,jdbcType= TIMESTAMP }
|
|
,#{finishTime,jdbcType= TIMESTAMP }
|
|
|
|
+ ,#{commission,jdbcType= NUMERIC }
|
|
)
|
|
)
|
|
]]>
|
|
]]>
|
|
</insert>
|
|
</insert>
|
|
@@ -152,6 +157,9 @@
|
|
<if test="finishTime!=null">
|
|
<if test="finishTime!=null">
|
|
finish_time=#{finishTime,jdbcType= TIMESTAMP },
|
|
finish_time=#{finishTime,jdbcType= TIMESTAMP },
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="commission!=null">
|
|
|
|
+ commission_=#{commission,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
where id_=#{id}
|
|
where id_=#{id}
|
|
</update>
|
|
</update>
|
|
@@ -327,4 +335,52 @@
|
|
${sort.name} ${sort.order}
|
|
${sort.name} ${sort.order}
|
|
</foreach>
|
|
</foreach>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="hisSearch" parameterType="hashmap" resultMap="InsurancePolicyMap">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ SELECT * FROM business_insurance_policy a LEFT JOIN
|
|
|
|
+ base_company b on a.company_id=b.id_
|
|
|
|
+ ]]>
|
|
|
|
+ <where>
|
|
|
|
+ and a.del_flag = false and b.del_flag = false
|
|
|
|
+ <if test="searchParams.status0 != null">
|
|
|
|
+ and (a.status_ = #{searchParams.status0} or a.status_ = #{searchParams.status1})
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.definitionId != null">
|
|
|
|
+ and a.definition_id = #{searchParams.definitionId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.companyName != null">
|
|
|
|
+ and b.name_ like #{searchParams.companyName}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.promoter != null">
|
|
|
|
+ and b.promoter_ like #{searchParams.promoter}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.agentId != null">
|
|
|
|
+ and a.agent_id = #{searchParams.agentId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.startCreat != null">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ and a.create_time >= #{searchParams.startCreat}
|
|
|
|
+ ]]>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.endCreat != null">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ and a.create_time <= #{searchParams.endCreat}
|
|
|
|
+ ]]>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.startFinish != null">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ and a.finish_time >= #{searchParams.startFinish}
|
|
|
|
+ ]]>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.endFinish != null">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ and a.finish_time <= #{searchParams.endFinish}
|
|
|
|
+ ]]>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ <foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
|
+ ${sort.name} ${sort.order}
|
|
|
|
+ </foreach>
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|