Commit 4f712cbf authored by fangxinjiang's avatar fangxinjiang

商险到期调整

parent 06731025
......@@ -351,6 +351,8 @@ public interface CommonConstants {
// 给量大的表导出使用
int EXCEL_EXPORT_LIMIT_3 = 30000;
int EXCEL_EXPORT_LIMIT_1 = 10000;
String USER = "用户";
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
......@@ -12,6 +15,12 @@ import java.util.List;
*/
@Data
public class InsuranceSearchVo extends TBusinessInsuranceVo{
/**
* 商险购买地
*/
@Schema(name = "商险购买地市")
private String insuranceHandleCityName;
private List<String> idList;
/**
......
......@@ -206,6 +206,13 @@ public class InsuranceWarnExportVo implements Serializable {
@ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市")
private String insuranceCityName;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市")
private String insuranceHandleCityName;
/**
* 是否有效 0有效 1无效
*/
......
......@@ -286,8 +286,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param,
@Param("domains")List<TSettleDomainSelectVo> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<TSettleDomainSelectVo> domains);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<TSettleDomainSelectVo> listSelectVO);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO);
......
......@@ -7431,11 +7431,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
condition.setInsuranceProvinces(provinces);
condition.setInsuranceCitys(citys);
}
IPage<TBusinessInsuranceVo> recordsPage = new Page<>();
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize();
int limitEnd = (int)page.getSize();
condition.setLimitStart(limitStart);
condition.setLimitEnd(limitEnd);
recordsPage.setPages(page.getPages());
recordsPage.setSize(page.getSize());
recordsPage.setCurrent(page.getCurrent());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())) {
return baseMapper.getInsuranceExpireWarnVoPage(page, condition, sdRes.getData().getListSelectVO());
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getListSelectVO()));
}else {
return baseMapper.getInsuranceExpireWarnVoPage(page, condition, null);
recordsPage.setRecords(baseMapper.pageDiy(condition, null));
}
return recordsPage;
}
@Override
......@@ -7661,10 +7672,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_1) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_1);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet(InsurancesConstants.INSURANCE_ALERT_EXPORT+index).build();
......
......@@ -1641,17 +1641,24 @@
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
AND a.EMP_IDCARD_NO like CONCAT('%' ,#{param.empIdcardNo},'%')
</if>
<if test="param.insuranceCityName != null and param.insuranceCityName.trim() != ''">
AND a.INSURANCE_CITY_NAME like CONCAT(#{param.insuranceCityName},'%')
</if>
<if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''">
AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%')
</if>
<if test="param.idList != null and param.idList.size() > 0">
and a.id in
<foreach collection="param.idList" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
<if test="param.insuranceProvinces != null and param.insuranceProvinces != null">
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
and a.INSURANCE_PROVINCE in
or a.INSURANCE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
......@@ -1659,15 +1666,16 @@
</if>
</if>
<if test="param.insuranceCitys != null and param.insuranceCitys != null">
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
and a.INSURANCE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")" separator=",">
or a.INSURANCE_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 != null and param.insuranceProvinces != null">
<if test="param.insuranceCitys.size() > 0 and param.insuranceProvinces.size() > 0">
and (
a.INSURANCE_PROVINCE in
......@@ -1682,51 +1690,87 @@
</foreach>
)
</if>
</if>-->
<if test="param == null">
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.SETTLEMENT_ORGAN in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
</if>
)
</if>
<!--数据权限判断-->
AND (a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.SETTLEMENT_ORGAN in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
<if test="param == null">
<!--数据权限判断-->
AND (a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.SETTLEMENT_ORGAN in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
)
</where>
</sql>
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>
from t_insurance_detail a
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from t_insurance_detail a
<include refid="expire_sql_where"/>
) a
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 t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>
from t_insurance_detail a
<select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from t_insurance_detail a
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd}
</if>
) a
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 t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>
from
(select * from t_insurance_detail a
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd}
</if>
)a
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 t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
group by a.id
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer">
select
count(1)
from t_insurance_detail 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 t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id-->
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<update id="batchexpireIgnore">
<if test="idList != null and idList.size() > 0">
......
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