Commit 280b9fc7 authored by fangxinjiang's avatar fangxinjiang

商险 提醒

parent c4485f32
......@@ -10,6 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* @Author fxj
......@@ -246,4 +247,15 @@ public class TBusinessInsuranceVo implements Serializable {
* 消息提醒备注
*/
private String expireRemark;
/**
* 商险购买地省
*/
@Schema(name = "商险购买地省")
private List<String> insuranceProvinces;
/**
* 商险购买地
*/
@Schema(name = "商险购买地市")
private List<String> insuranceCitys;
}
......@@ -7412,10 +7412,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
citys.add(res.getCity());
}
}
condition.setBusinessInsuranceProvId(provinces);
condition.setBusinessInsuranceAddrId(citys);
condition.setInsuranceProvinces(provinces);
condition.setInsuranceCitys(citys);
}
condition.setCreateUserId(SecurityUtils.getUser().getId());
condition.setCreateName(SecurityUtils.getUser().getId());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){
return baseMapper.getInsuranceExpireWarnVoPage(page, condition, sdRes.getData().getListSelectVO());
}
......
......@@ -1528,23 +1528,49 @@
t.USER_DEPT_NAME
</sql>
<sql id="expire_sql_param">
SELECT
re.TO_EMP_NAME 'toEmpName',tir.FROM_EMP_NAME 'fromEmpName' ,tir.CREATE_TIME 'fromReplaceTime',re.CREATE_TIME 'toReplaceTime',
<include refid="selectParamsVo"/>
,EXPIRE_REMARK expireRemark,EXPIRE_IGNORE_FLAG expireIgnoreFlag
FROM t_insurance_detail t
JOIN (SELECT max(POLICY_END) POLICY_END, EMP_IDCARD_NO,BUY_STANDARD, INSURANCE_TYPE
FROM t_business_insurance
WHERE INVALID_FLAG = '0'
<!-- 状态 3.已办理 5:待结算(已输入保单号)6:已结算 7: 结算中(工资、社保)8:扫描出账中 9 -->
AND STATUS in('3','5','6','7','8','9')
GROUP BY EMP_IDCARD_NO,BUY_STANDARD, INSURANCE_TYPE) cig
ON t.EMP_IDCARD_NO = cig.EMP_IDCARD_NO AND t.POLICY_END = cig.POLICY_END AND t.BUY_STANDARD = cig.BUY_STANDARD and
t.INSURANCE_TYPE = cig.INSURANCE_TYPE
join t_insurance_company tic on t.INSURANCE_COMPANY = tic.ID
join t_insurance_type p on t.INSURANCE_TYPE=p.ID
left join t_insurance_replace tir on t.ID = tir.INSURANCE_ID
LEFT JOIN (select l.* from t_insurance_replace l left join t_business_insurance tbi on l.TO_INSURANCE_ID = tbi.ID where tbi.invalid_Flag='0' and STATUS!=4 ) re ON t.id= re.INSURANCE_ID
select
a.id,
a.EMP_NAME,
a.EMP_IDCARD_NO,
a.DEPT_NAME,
a.DEPT_NO,
a.INSURANCE_COMPANY_NAME,
a.INSURANCE_TYPE_NAME,
a.POLICY_START,
a.POLICY_END,
a.BUY_STANDARD,
a.ACTUAL_PREMIUM,
a.CREATE_NAME,
a.CREATE_TIME,
a.BUY_HANDLE_STATUS,
a.POLICY_NO,
a.MEDICAL_QUOTA,
a.DIE_DISABLE_QUOTA,
a.SETTLE_TYPE,
a.SETTLE_MONTH,
a.INVOICE_NO,
r2.REPLACE_TIME,
a.POLICY_EFFECT,
a.UNIT_NAME,
a.UNIT_NO,
a.REMARK,
a.INSURANCE_PROVINCE_NAME,
a.INSURANCE_CITY_NAME,
a.IS_EFFECT,
a.POST,
r.fromEmpName,
r.toEmpName,
r.REPLACE_TIME as "toReplaceTime",
a.IS_OVERDUE,
a.ESTIMATE_PREMIUM,
rf.REFUND_MONEY,
rf.CREATE_TIME as "refundCreateTime",
rf.CREATE_NAME as "refundCreateUser",
a.CREATE_USER_DEPT_NAME
from t_insurance_detail 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
</sql>
<sql id="expire_sql_where">
......
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