Commit 8776aab4 authored by fangxinjiang's avatar fangxinjiang

商险到期调整

parent 0012a00d
...@@ -1721,14 +1721,7 @@ ...@@ -1721,14 +1721,7 @@
</sql> </sql>
<sql id="expire_sql_where"> <sql id="expire_sql_where">
<where> <where>
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null"> <if test="param != null">
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%') AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%')
...@@ -1742,7 +1735,6 @@ ...@@ -1742,7 +1735,6 @@
<if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''"> <if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''">
AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%') AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%')
</if> </if>
<if test="param.idList != null and param.idList.size() > 0"> <if test="param.idList != null and param.idList.size() > 0">
and a.id in and a.id in
<foreach collection="param.idList" item="param" index="index" open="(" close=")" <foreach collection="param.idList" item="param" index="index" open="(" close=")"
...@@ -1750,65 +1742,6 @@ ...@@ -1750,65 +1742,6 @@
#{param} #{param}
</foreach> </foreach>
</if> </if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--<if test="param.insuranceCitys != null and param.insuranceProvinces != null">
<if test="param.insuranceCitys.size() > 0 and param.insuranceProvinces.size() > 0">
and (
a.INSURANCE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
or a.INSURANCE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
)
</if>
</if>-->
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
<if test="param == null">
<!--数据权限判断-->
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if> </if>
</where> </where>
...@@ -1816,7 +1749,54 @@ ...@@ -1816,7 +1749,54 @@
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo"> <select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME <include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from from
(select * from t_insurance_detail a (select * from
(select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
) a ) a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
...@@ -1828,7 +1808,53 @@ ...@@ -1828,7 +1808,53 @@
<select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo"> <select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME <include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from from
(select * from t_insurance_detail a (select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null"> <if test="param != null and param.limitStart != null">
...@@ -1842,7 +1868,53 @@ ...@@ -1842,7 +1868,53 @@
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo"> <select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME <include refid="expire_export_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from from
(select * from t_insurance_detail a (select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null"> <if test="param != null and param.limitStart != null">
...@@ -1858,7 +1930,53 @@ ...@@ -1858,7 +1930,53 @@
<select id="noPageCountDiy" resultType="java.lang.Integer"> <select id="noPageCountDiy" resultType="java.lang.Integer">
select select
count(1) count(1)
from t_insurance_detail a from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<!--LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID <!--LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id--> LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment