Commit 4b70308d authored by fangxinjiang's avatar fangxinjiang

优化-fxj

parent 5d878343
...@@ -472,6 +472,11 @@ public class InsurancesConstants { ...@@ -472,6 +472,11 @@ public class InsurancesConstants {
* 商险待投保,无法登记保单保费 * 商险待投保,无法登记保单保费
*/ */
public static final String BUY_HANDLE_ONE_NOT_REGISTERED = "商险待投保,无法登记保单保费"; public static final String BUY_HANDLE_ONE_NOT_REGISTERED = "商险待投保,无法登记保单保费";
/**
* 商险待投保,无法登记保单保费
*/
public static final String BUY_HANDLE_SIX_NOT_REGISTERED = "商险待缴费,无法登记保单保费";
/** /**
* 商险投保中,无法登记保单保费 * 商险投保中,无法登记保单保费
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity; package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -116,6 +114,7 @@ public class EkpInsurancesInfo { ...@@ -116,6 +114,7 @@ public class EkpInsurancesInfo {
private String fd_3af9197b31071c; private String fd_3af9197b31071c;
@Schema(description = "实际结算月份") @Schema(description = "实际结算月份")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Date fd_3af9d11088facc; private Date fd_3af9d11088facc;
@Schema(description = "有无预估") @Schema(description = "有无预估")
......
...@@ -51,7 +51,7 @@ public class InsuranceListVO implements Serializable { ...@@ -51,7 +51,7 @@ public class InsuranceListVO implements Serializable {
* 购买月数 * 购买月数
*/ */
@Schema(description = "购买月数") @Schema(description = "购买月数")
private Long buyMonth; private String buyMonth;
/** /**
* 项目名称 * 项目名称
......
...@@ -295,7 +295,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -295,7 +295,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceList = baseMapper.getInsuranceListPage(page,param); insuranceList = baseMapper.getInsuranceListPage(page,param);
// 购买月数 // 购买月数
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){ if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()))); insuranceList.getRecords().forEach(e -> e.setBuyMonth(null==e.getPurchaseCycle()?String.valueOf(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())):(e.getPurchaseCycle().indexOf("个月")==-1?e.getPurchaseCycle():e.getPurchaseCycle().indexOf("个月")==-1?e.getPurchaseCycle():e.getPurchaseCycle().substring(0,e.getPurchaseCycle().indexOf("个月")))));
} }
return insuranceList; return insuranceList;
} }
...@@ -321,7 +321,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -321,7 +321,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceListVO> insuranceList = baseMapper.getInsuranceList(param); List<InsuranceListVO> insuranceList = baseMapper.getInsuranceList(param);
// 购买月数 // 购买月数
if (CollectionUtils.isNotEmpty(insuranceList)){ if (CollectionUtils.isNotEmpty(insuranceList)){
insuranceList.forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()))); insuranceList.forEach(e -> e.setBuyMonth(null==e.getPurchaseCycle()?String.valueOf(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())):(e.getPurchaseCycle().indexOf("个月")==-1?e.getPurchaseCycle():e.getPurchaseCycle().indexOf("个月")==-1?e.getPurchaseCycle():e.getPurchaseCycle().substring(0,e.getPurchaseCycle().indexOf("个月")))));
TInsuranceOperate tInsuranceOperate; TInsuranceOperate tInsuranceOperate;
for (InsuranceListVO listVO : insuranceList) { for (InsuranceListVO listVO : insuranceList) {
if (CommonConstants.FOUR_INT == listVO.getBuyHandleStatus()) { if (CommonConstants.FOUR_INT == listVO.getBuyHandleStatus()) {
...@@ -365,7 +365,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -365,7 +365,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
IPage<InsuranceListVO> insuranceList = baseMapper.getInsuranceHandleListPage(page,param); IPage<InsuranceListVO> insuranceList = baseMapper.getInsuranceHandleListPage(page,param);
// 购买月数 // 购买月数
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){ if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()))); insuranceList.getRecords().forEach(e -> e.setBuyMonth(null==e.getPurchaseCycle()?String.valueOf(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())):(e.getPurchaseCycle().indexOf("个月")==-1?e.getPurchaseCycle():e.getPurchaseCycle().indexOf("个月")==-1?e.getPurchaseCycle():e.getPurchaseCycle().substring(0,e.getPurchaseCycle().indexOf("个月")))));
} }
return insuranceList; return insuranceList;
} }
...@@ -424,6 +424,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -424,6 +424,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CollectionUtils.isNotEmpty(listSuccess)){ if (CollectionUtils.isNotEmpty(listSuccess)){
List<TInsuranceSettle> settleList = new ArrayList<>(); List<TInsuranceSettle> settleList = new ArrayList<>();
List<String> sourceIdCardList = new ArrayList<>(); List<String> sourceIdCardList = new ArrayList<>();
List<TInsuranceDetail> pushList = new ArrayList<>();
for (InsuranceAddParam success : listSuccess) { for (InsuranceAddParam success : listSuccess) {
TInsuranceDetail detail = new TInsuranceDetail(); TInsuranceDetail detail = new TInsuranceDetail();
BeanCopyUtils.copyProperties(success,detail); BeanCopyUtils.copyProperties(success,detail);
...@@ -450,14 +451,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -450,14 +451,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
sourceIdCardList.add(detail.getEmpIdcardNo()); sourceIdCardList.add(detail.getEmpIdcardNo());
baseMapper.insert(detail); baseMapper.insert(detail);
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){ if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//生成收入数据 pushList.add(detail);
createInsuranceInfo(detail,mapSelectVo.get(detail.getDeptNo()));
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.SEVEN_STRING); updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.SEVEN_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.SEVEN_STRING); updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.SEVEN_STRING);
//异步任务推送
List<TInsuranceDetail> successList = new ArrayList<>();
successList.add(detail);
doJointInsuranceTask.pushEstime(successList);
}else { }else {
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.THREE_STRING); updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.THREE_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.THREE_STRING); updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.THREE_STRING);
...@@ -470,6 +466,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -470,6 +466,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
,InsurancesConstants.ADD,null,CommonConstants.ONE_INT)); ,InsurancesConstants.ADD,null,CommonConstants.ONE_INT));
} }
} }
if (Common.isNotNull(pushList)){
for (TInsuranceDetail detail : pushList){
//生成收入数据
createInsuranceInfo(detail,mapSelectVo.get(detail.getDeptNo()));
}
//异步任务推送
doJointInsuranceTask.pushEstime(pushList);
}
List<String> replaceIdList = new ArrayList<>(); List<String> replaceIdList = new ArrayList<>();
for (TInsuranceDetail d : detailList) { for (TInsuranceDetail d : detailList) {
replaceIdList.add(d.getId()); replaceIdList.add(d.getId());
...@@ -4758,6 +4762,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -4758,6 +4762,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.BUY_HANDLE_ONE_NOT_REGISTERED); param.setErrorMessage(InsurancesConstants.BUY_HANDLE_ONE_NOT_REGISTERED);
continue; continue;
} }
if (detail.getBuyHandleStatus() == CommonConstants.SIX_INT){
param.setErrorMessage(InsurancesConstants.BUY_HANDLE_SIX_NOT_REGISTERED);
continue;
}
if (detail.getBuyHandleStatus() == CommonConstants.TWO_INT){ if (detail.getBuyHandleStatus() == CommonConstants.TWO_INT){
param.setErrorMessage(InsurancesConstants.BUY_HANDLE_TWO_NOT_REGISTERED); param.setErrorMessage(InsurancesConstants.BUY_HANDLE_TWO_NOT_REGISTERED);
continue; continue;
......
...@@ -798,6 +798,11 @@ public class DoJointInsuranceTask { ...@@ -798,6 +798,11 @@ public class DoJointInsuranceTask {
if ("0".equals(param.getIsJfcd())){ if ("0".equals(param.getIsJfcd())){
//见费出单 实缴的应收为0 //见费出单 实缴的应收为0
info.setFd_3adfe6e30f2a3c(0.00); info.setFd_3adfe6e30f2a3c(0.00);
//特殊处理下是否见费出单 是否全部结算为是
//见费出单 是否全部结算 都是 是
info.setFd_3b13b2ecc164aa("是");
//实际结算月份置空
info.setFd_3af9d11088facc(null);
} }
insurancesInfoMapper.updateById(info); insurancesInfoMapper.updateById(info);
} }
......
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
a.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
a.SETTLE_MONTH as settleMonth, a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName, a.DEPT_NAME as projectName,
a.IS_ADRESS as isAdress a.IS_ADRESS as isAdress,a.PURCHASE_CYCLE as purchaseCycle
from t_insurance_detail a from t_insurance_detail a
where a.DELETE_FLAG = 0 where a.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
......
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