Commit fe36ac57 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 4c7594e8 a18935c2
......@@ -228,6 +228,12 @@ public class EkpInsuranceUtil {
}else{
pushParam.setFd_3b0a5937928c8c(CommonConstants.EMPTY_STRING);
}
//是否bro客户
if(null != param.getBpoFlag()){
pushParam.setFd_3b178f8ba1a91c(param.getBpoFlag());
}else{
pushParam.setFd_3b178f8ba1a91c(CommonConstants.EMPTY_STRING);
}
return pushParam;
}
}
......
......@@ -125,6 +125,13 @@ public class EKPInsurancePushParam {
*/
private String fd_3b0a5937928c8c;
/**
* 是否为BPO业务(是、否)
*/
private String fd_3b178f8ba1a91c;
......
......@@ -315,8 +315,12 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "减员id")
private String refundId;
/**
* EKP的 是否BPO: 是 否
*/
@Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore
private String bpoFlag;
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -176,4 +177,11 @@ public class EkpInteractiveParam implements Serializable {
*/
@Schema(description = "状态:有,无")
private String estimateStatus;
/**
* EKP的 是否BPO: 是 否
*/
@Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore
private String bpoFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -170,4 +171,11 @@ public class InsuranceAddParam implements Serializable {
*/
@JsonIgnore
private Integer insuranceHandleCity;
/**
* EKP的 是否BPO: 是 否
*/
@Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore
private String bpoFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -183,4 +184,11 @@ public class InsuranceBatchParam implements Serializable {
*/
@JsonIgnore
private LocalDate policyEnd;
/**
* EKP的 是否BPO: 是 否
*/
@Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore
private String bpoFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -100,4 +101,11 @@ public class InsuranceReplaceParam implements Serializable {
@JsonIgnore
private Integer settleType;
/**
* EKP的 是否BPO: 是 否
*/
@Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore
private String bpoFlag;
}
......@@ -1494,8 +1494,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(StringUtils.isNotBlank(defaultSettleId)){
TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if(Optional.ofNullable(settle).isPresent()){
Integer isActualPush = settle.getIsActualPush();
//如果当前实缴信息未推送,则新增实缴单推送
if(settle.getIsActualPush() == CommonConstants.ZERO_INT){
if(CommonConstants.ZERO_INT == isActualPush){
//保费存储
settle.setActualPremium(new BigDecimal(success.getActualPremium()));
settle.setIsActualPush(CommonConstants.ZERO_INT);
......@@ -1516,7 +1517,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如果当前实缴信息已推送,且金额与本次不一致,则推送实缴更新
BigDecimal bigDecimal = new BigDecimal(success.getActualPremium());
boolean b = bigDecimal.compareTo(detail.getActualPremium()) == CommonConstants.ZERO_INT;
if(CommonConstants.ONE_INT == settle.getIsActualPush() && b){
if(CommonConstants.ONE_INT == isActualPush && !b){
//推送保费更新
settle.setActualPremium(bigDecimal);
settle.setIsActualPush(CommonConstants.ZERO_INT);
......@@ -1533,21 +1534,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
});
}else{
//推送保费更新
settle.setActualPremium(bigDecimal);
settle.setIsActualPush(CommonConstants.ZERO_INT);
settle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(settle);
//调EKP更新实际保费
detail.setActualPremium(bigDecimal);
threadPool.execute(() ->{
String s = pushEstimate(detail,CommonConstants.FOUR_INT);
if(StringUtils.isNotBlank(s)){
settle.setActualPushTime(LocalDateTime.now());
settle.setIsActualPush(CommonConstants.ONE_INT);
tInsuranceSettleService.updateById(settle);
}
});
//推送保费更新
settle.setActualPremium(bigDecimal);
settle.setIsActualPush(CommonConstants.ZERO_INT);
settle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(settle);
//调EKP更新实际保费
detail.setActualPremium(bigDecimal);
threadPool.execute(() ->{
String s = pushEstimate(detail,CommonConstants.FOUR_INT);
if(StringUtils.isNotBlank(s)){
settle.setActualPushTime(LocalDateTime.now());
settle.setIsActualPush(CommonConstants.ONE_INT);
tInsuranceSettleService.updateById(settle);
}});
}
}
}
......@@ -1936,6 +1936,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
param.setBpoFlag(projectSetInfoVo.getBpoFlag());
param.setSettleType(Integer.parseInt(settleType));
}
}
......@@ -2309,6 +2310,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}else {
param.setSettleType(Integer.parseInt(settleType));
}
param.setBpoFlag(projectSetInfoVo.getBpoFlag());
param.setDeptId(projectSetInfoVo.getId());
}
}
......@@ -2692,6 +2694,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}else {
param.setSettleType(Integer.parseInt(settleType));
param.setDeptId(projectSetInfoVo.getId());
param.setBpoFlag(projectSetInfoVo.getBpoFlag());
}
}
}
......
......@@ -57,6 +57,7 @@
<result property="createUserDeptId" column="CREATE_USER_DEPT_ID" jdbcType="VARCHAR"/>
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptId" column="DEPT_ID" jdbcType="VARCHAR"/>
<result property="bpoFlag" column="BPO_FLAG" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,EMP_NAME,
......@@ -69,7 +70,7 @@
ACTUAL_PREMIUM,ESTIMATE_PREMIUM,SIGN_FLAG,
BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME,
CREATE_BY,CREATE_NAME,CREATE_TIME,BPO_FLAG,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME,ORDER_NO,CREATE_USER_DEPT_ID,CREATE_USER_DEPT_NAME
</sql>
......@@ -136,9 +137,6 @@
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${tEmployeeInfo.authSql}
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保不分页查询-->
......
......@@ -197,7 +197,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
} catch (Exception e) {
log.error(e.getMessage());
log.error("薪资导入异常:",e);
return R.failed("数据导入解析失败!");
}
......
......@@ -730,7 +730,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
String[] areaArray;
String checkRes;
for (TPaymentInfoVo infoVo : list) {
atomicLine.incrementAndGet();
......@@ -775,12 +774,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
infoVo.getEmpIdcard() + "的社保数据(请查验社保缴纳地)"));
continue;
}
//如果导入项目数大于办理成功项目数给提示,少于给进,有问题自行删除后导入
checkRes = checkRepeatInfo(socialInfo, infoVo);
if (null != checkRes) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), checkRes));
continue;
}
//查看缴纳月是否为空
if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
......@@ -1045,60 +1038,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return errorMessageList;
}
private String concatStr(String socialType) {
return "存在未办理成功的险种:" + socialType + ",请办理成功后,再行导入!";
}
/**
* 验证部分办理失败的导入是否有超出部分的数据导入
*
* @param socialInfo
* @param infoVo
* @return
* @Author fxj
* @Date 2021-06-21
**/
private String checkRepeatInfo(TSocialFundInfo socialInfo, TPaymentInfoVo infoVo) {
if (checkHandleMoney(socialInfo.getPensionHandle(),
infoVo.getUnitPensionMoney(), infoVo.getPersonalPensionMoney())) {
return concatStr("养老");
}
if (checkHandleMoney(socialInfo.getMedicalHandle(),
infoVo.getUnitMedicalMoney(), infoVo.getPersonalMedicalMoney())) {
return concatStr("医疗");
}
if (checkHandleMoney(socialInfo.getUnemployHandle(),
infoVo.getUnitUnemploymentMoney(), infoVo.getPersonalUnemploymentMoney())) {
return concatStr("失业");
}
if (checkHandleMoney(socialInfo.getWorkInjuryHandle(),
infoVo.getUnitInjuryMoney(), BigDecimal.ZERO)) {
return concatStr("工伤");
}
if (checkHandleMoney(socialInfo.getBirthHandle(),
infoVo.getUnitBirthMoney(), BigDecimal.ZERO)) {
return concatStr("生育");
}
if (CommonConstants.ONE_STRING.equals(socialInfo.getIsIllness()) &&
(Common.isBlankToBigDecimalZero(infoVo.getUnitBigmailmentMoney()).compareTo(
BigDecimal.ZERO) > CommonConstants.ZERO_INT ||
Common.isBlankToBigDecimalZero(infoVo.getPersonalBigmailmentMoney()).compareTo(
BigDecimal.ZERO) > CommonConstants.ZERO_INT)) {
return "无大病,无需导入大病!";
}
if (checkHandleMoney(socialInfo.getBigailmentHandle(),
infoVo.getUnitBigmailmentMoney(), infoVo.getPersonalBigmailmentMoney())) {
return concatStr("大病");
}
return null;
}
private boolean checkHandleMoney(String handleStatus, BigDecimal unitMoney, BigDecimal personalMoney) {
return CommonConstants.TWO_STRING.equals(handleStatus) &&
(Common.isBlankToBigDecimalZero(unitMoney).compareTo(BigDecimal.ZERO) > CommonConstants.ZERO_INT ||
Common.isBlankToBigDecimalZero(personalMoney).compareTo(BigDecimal.ZERO) > CommonConstants.ZERO_INT);
}
/**
* 拼接排序字段并插入
*
......@@ -1728,7 +1667,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
String[] areaArray;
String checkRes;
for (TPaymentHeFeiVo infoVo : list) {
atomicLine.incrementAndGet();
......@@ -1765,12 +1703,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
"的社保数据(请查验社保缴纳地)"));
continue;
}
//如果导入项目数大于办理成功项目数给提示,少于给进,有问题自行删除后导入
checkRes = checkRepeatInfoThree(socialInfo, infoVo, type);
if (null != checkRes) {
errorMessageList.add(new ErrorMessage(infoVo.getRowIndex(), checkRes));
continue;
}
//查看缴纳月是否为空
if (!Common.isNotNull(infoVo.getSocialPayMonth())) {
......@@ -2068,46 +2000,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return s;
}
/**
* 验证部分办理失败的导入是否有超出部分的数据导入
*
* @param socialInfo
* @param infoVo
* @return
* @Author huyc
* @Date 2022-07-27
**/
private String checkRepeatInfoThree(TSocialFundInfo socialInfo, TPaymentHeFeiVo infoVo, String type) {
if (CommonConstants.ZERO_STRING.equals(type)) {
if (PaymentConstants.PENSION_RISK.equals(infoVo.getRiskType())
&& checkHandleMoney(socialInfo.getPensionHandle(),
infoVo.getUnitMoney(), infoVo.getPersonalMoney())) {
return concatStr(PaymentConstants.PENSION);
}
if (PaymentConstants.UNEMPLOYEEMENT_RISK.equals(infoVo.getRiskType())
&& checkHandleMoney(socialInfo.getUnemployHandle(),
infoVo.getUnitMoney(), infoVo.getPersonalMoney())) {
return concatStr(PaymentConstants.UNEMPLOYEEMENT);
}
if (PaymentConstants.INJURY_RISK.equals(infoVo.getRiskType())
&& checkHandleMoney(socialInfo.getWorkInjuryHandle(),
infoVo.getUnitMoney(), infoVo.getPersonalMoney())) {
return concatStr(PaymentConstants.INJURY);
}
} else if (CommonConstants.ONE_STRING.equals(type)) {
if (checkHandleMoney(socialInfo.getMedicalHandle(),
infoVo.getUnitMedicalMoney(), infoVo.getPersonalMedicalMoney())) {
return concatStr(PaymentConstants.MEDICAL);
}
if (CommonConstants.ONE_STRING.equals(socialInfo.getIsIllness()) &&
(BigDecimalUtils.isNullToZero(infoVo.getUnitBigailmentMoney()).compareTo(
BigDecimal.ZERO) != CommonConstants.ZERO_INT)) {
return "无大病,无需导入大病!";
}
}
return null;
}
//比对缴纳地是否一致
private TSocialFundInfo checkAddress(String[] areaArray, HashMap<String, String> areaMap, TSocialFundInfo s) {
if (null == areaArray || null == areaMap || null == s) {
......
......@@ -1172,12 +1172,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
// 默认合同名称为代理社保 合同类型为其他
info.setContractNameAdd(PreDispatchConstants.CONTRACT_NAME);
info.setContractTypeAdd(CommonConstants.THREE_STRING);
info.setContractStartAdd(info.getContractStart());
info.setContractTypeAdd(CommonConstants.ONE_STRING);
info.setContractStartAdd(DateUtil.getFirstDayString(info.getPensionStart()));
// 默认为开始时间后的两年时间
info.setContractEndAdd(info.getContractEnd());
info.setContractEndAdd(DateUtil.getFirstDayString(DateUtil.getYearAndMonth(info.getPensionStart(),24)));
// 默认合同期限2年
info.setContractTermAdd(Integer.toString(Common.getYearOfTime(info.getContractStart(), info.getContractEnd())));
info.setContractTermAdd(CommonConstants.TWO_STRING);
// 默认工时制 综合工时制2
info.setWorkingHoursAdd(CommonConstants.TWO_STRING);
......
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