Commit a1758433 authored by hongguangwu's avatar hongguangwu

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

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
parents 11785e0f 0cd180d0
...@@ -1076,7 +1076,25 @@ public class InsurancesConstants { ...@@ -1076,7 +1076,25 @@ public class InsurancesConstants {
*/ */
public static final String IMPORT_TOO_LONG = "一次性导入不可超过20000条,请分批导入"; public static final String IMPORT_TOO_LONG = "一次性导入不可超过20000条,请分批导入";
/**
* 结算类型不一致
*/
public static final String SETTLE_TYPE_ATYPISM = "结算类型不一致";
/**
* 预估已推送
*/
public static final String ESTIMATE_IS_PUSH = "预估已推送";
/**
* 实缴已推送,请分批导入
*/
public static final String ACTUAL_IS_PUSH = "实缴已推送";
/**
* 结算id不一致,请分批导入
*/
public static final String SETTLE_ID_ATYPISM = "结算id不一致";
......
...@@ -161,6 +161,12 @@ public class TInsuranceEkp implements Serializable { ...@@ -161,6 +161,12 @@ public class TInsuranceEkp implements Serializable {
@Schema(description = "推送类型(1推送预估费用,2推送实缴费用,3变更结算信息,4推送作废信息,5推送预估红冲信息,6推送实缴红冲信息)") @Schema(description = "推送类型(1推送预估费用,2推送实缴费用,3变更结算信息,4推送作废信息,5推送预估红冲信息,6推送实缴红冲信息)")
private Integer pushType; private Integer pushType;
/**
* 不重发原因
*/
private String notResendMessage;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -65,15 +65,10 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -65,15 +65,10 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
String defaultSettleId = byId.getDefaultSettleId(); String defaultSettleId = byId.getDefaultSettleId();
String s = null; String s = null;
String settleType = tInsuranceEkp.getSettleType(); String settleType = tInsuranceEkp.getSettleType();
if(InsurancesConstants.ACTUAL_SETTLE_BILL.equals(settleType)){
settleType = CommonConstants.ONE_STRING;
}
if(InsurancesConstants.ESTIMATE_SETTLE_BILL.equals(settleType)){
settleType = CommonConstants.ZERO_STRING;
}
Integer pushType = tInsuranceEkp.getPushType(); Integer pushType = tInsuranceEkp.getPushType();
//商险结算信息 //商险结算信息
TInsuranceSettle insuranceSettle = tInsuranceSettleService.getById(tInsuranceEkp.getDefaultSettleId()); TInsuranceSettle insuranceSettle = tInsuranceSettleService.getById(tInsuranceEkp.getDefaultSettleId());
//结算id是否一致
boolean settleIdEquals = tInsuranceEkp.getDefaultSettleId().equals(defaultSettleId); boolean settleIdEquals = tInsuranceEkp.getDefaultSettleId().equals(defaultSettleId);
//预估是否已发送 //预估是否已发送
boolean estimatePush = Common.isEmpty(insuranceSettle) || insuranceSettle.getIsEstimatePush() == CommonConstants.ZERO_INT; boolean estimatePush = Common.isEmpty(insuranceSettle) || insuranceSettle.getIsEstimatePush() == CommonConstants.ZERO_INT;
...@@ -89,6 +84,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -89,6 +84,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
detailUpdate.eq(TInsuranceDetail :: getId,tInsuranceEkp.getDetailId()); detailUpdate.eq(TInsuranceDetail :: getId,tInsuranceEkp.getDetailId());
LambdaUpdateWrapper<TInsuranceEkp> ekpUpdate = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceEkp> ekpUpdate = new LambdaUpdateWrapper<>();
ekpUpdate.eq(TInsuranceEkp :: getId,tInsuranceEkp.getId()); ekpUpdate.eq(TInsuranceEkp :: getId,tInsuranceEkp.getId());
//ekp结算信息
SettleVo settleVo = tInsuranceDetailService.getInsuranceDetailSettleStatus(tInsuranceEkp.getDetailId(), tInsuranceEkp.getDefaultSettleId());
if(settleType.equals(CommonConstants.ZERO_STRING)){ if(settleType.equals(CommonConstants.ZERO_STRING)){
ekpParam.setEstimateStatus(EkpConstants.HAVE); ekpParam.setEstimateStatus(EkpConstants.HAVE);
}else{ }else{
...@@ -96,12 +93,26 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -96,12 +93,26 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
} }
//预估新增重发 //预估新增重发
if(CommonConstants.ONE_INT == pushType){ if(CommonConstants.ONE_INT == pushType){
//如果结算类型不一致,结算类型不为空且已预估发送,结算id不一致 //如果结算类型不一致,预估已推送,结算id不一致,结算信息不为空
if(!settleTypeEquals || !estimatePush || !settleIdEquals){ if(!settleTypeEquals || !settleIdEquals || !estimatePush){
if(!settleTypeEquals){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,CommonConstants.TWO_INT);
}
if(!settleIdEquals){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,CommonConstants.TWO_INT);
}
if(!estimatePush){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,CommonConstants.TWO_INT);
}
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
update(ekpUpdate); update(ekpUpdate);
if(!Common.isEmpty(settleVo)){
settleUpdate.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now())
.set(TInsuranceSettle ::getIsEstimatePush,CommonConstants.ONE_INT);
tInsuranceSettleService.update(settleUpdate);
}
continue; continue;
}else{ } else{
ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = ekpInsuranceUtil.sendToEkp(ekpParam);
...@@ -109,7 +120,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -109,7 +120,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
settleUpdate.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now()) settleUpdate.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now())
.set(TInsuranceSettle ::getIsEstimatePush,CommonConstants.ONE_INT); .set(TInsuranceSettle ::getIsEstimatePush,CommonConstants.ONE_INT);
tInsuranceSettleService.update(settleUpdate); tInsuranceSettleService.update(settleUpdate);
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
...@@ -118,7 +130,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -118,7 +130,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
} }
//实缴新增重发 //实缴新增重发
if(CommonConstants.TWO_INT == pushType){ if(CommonConstants.TWO_INT == pushType){
//如果结算类型不一致,结算类型不为空且已发送,结算id不一致 //如果结算类型不一致,实缴已推送,结算id不一致,则不再推送
if(!settleTypeEquals || !actualPush || !settleIdEquals){ if(!settleTypeEquals || !actualPush || !settleIdEquals){
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
update(ekpUpdate); update(ekpUpdate);
...@@ -131,15 +143,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -131,15 +143,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
settleUpdate.set(TInsuranceSettle :: getActualPushTime,LocalDateTime.now()) settleUpdate.set(TInsuranceSettle :: getActualPushTime,LocalDateTime.now())
.set(TInsuranceSettle ::getIsActualPush,CommonConstants.ONE_INT); .set(TInsuranceSettle ::getIsActualPush,CommonConstants.ONE_INT);
tInsuranceSettleService.update(settleUpdate); tInsuranceSettleService.update(settleUpdate);
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
} }
} }
} }
//ekp结算信息
SettleVo settleVo = tInsuranceDetailService.getInsuranceDetailSettleStatus(tInsuranceEkp.getDetailId(), tInsuranceEkp.getDefaultSettleId());
//实缴结算状态 //实缴结算状态
String actualStatus = null; String actualStatus = null;
//预缴结算状态 //预缴结算状态
...@@ -153,7 +164,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -153,7 +164,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
//变更结算信息 //变更结算信息
if(CommonConstants.THREE_INT == pushType){ if(CommonConstants.THREE_INT == pushType){
//如果结算类型不一致,结算类型不为空且已发送,结算id不一致 //如果结算类型不一致,结算类型不为空且已发送,结算id不一致
if(!settleTypeEquals || !settleIdEquals || !eStatus || !aStatus){ if(!settleIdEquals || !eStatus || !aStatus){
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
update(ekpUpdate); update(ekpUpdate);
continue; continue;
...@@ -161,7 +172,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -161,7 +172,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setInteractiveType(InsurancesConstants.UPDATE_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.UPDATE_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = ekpInsuranceUtil.sendToEkp(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
...@@ -176,9 +188,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -176,9 +188,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = ekpInsuranceUtil.sendToEkp(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
detailUpdate.set(TInsuranceDetail :: getDefaultSettleId,null); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
tInsuranceDetailService.update(detailUpdate); .set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT);
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
...@@ -193,7 +204,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -193,7 +204,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = ekpInsuranceUtil.sendToEkp(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
...@@ -206,7 +218,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -206,7 +218,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setActualPremium(actualPremium.negate()); ekpParam.setActualPremium(actualPremium.negate());
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = ekpInsuranceUtil.sendToEkp(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
...@@ -224,7 +237,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -224,7 +237,8 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = ekpInsuranceUtil.sendToEkp(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
...@@ -236,13 +250,13 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -236,13 +250,13 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = ekpInsuranceUtil.sendToEkp(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT); ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
update(ekpUpdate); update(ekpUpdate);
}else{ }else{
break; break;
} }
} }
} }
return R.ok("发送成功"); return R.ok("发送成功");
}else{ }else{
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/> <result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="pushTime" column="PUSH_TIME" jdbcType="TIMESTAMP"/> <result property="pushTime" column="PUSH_TIME" jdbcType="TIMESTAMP"/>
<result property="pushType" column="PUSH_TYPE" jdbcType="TINYINT"/> <result property="pushType" column="PUSH_TYPE" jdbcType="TINYINT"/>
<result property="settleType" column="SETTLE_TYPE" jdbcType="TINYINT"/> <result property="settleType" column="SETTLE_TYPE" jdbcType="VARCHAR"/>
<result property="notResendMessage" column="NOT_RESEND_MESSAGE" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA, POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM, DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG, SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
CREATE_TIME,PUSH_TIME,PUSH_TYPE,SETTLE_TYPE CREATE_TIME,PUSH_TIME,PUSH_TYPE,SETTLE_TYPE,NOT_RESEND_MESSAGE
</sql> </sql>
<select id="getEkpRefundList" resultMap="BaseResultMap"> <select id="getEkpRefundList" resultMap="BaseResultMap">
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
t_insurance_ekp t_insurance_ekp
where where
RESEND_FLAG = 0 RESEND_FLAG = 0
order by CREATE_TIME asc
</select> </select>
......
...@@ -3156,7 +3156,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3156,7 +3156,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
libraryFundInfoList = forecastLibraryService.list(Wrappers.<TForecastLibrary>query().lambda() libraryFundInfoList = forecastLibraryService.list(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, sf.getEmpIdcard()) .eq(TForecastLibrary::getEmpIdcard, sf.getEmpIdcard())
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT) .eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.eq(TForecastLibrary::getSettleDomainId,sf.getSettleDomain()) .eq(TForecastLibrary::getSettleDomainId,sf.getSettleDomainFund())
.eq(TForecastLibrary::getProvidentPayMonth, DateUtil.addMonth(1 - i))); .eq(TForecastLibrary::getProvidentPayMonth, DateUtil.addMonth(1 - i)));
if (Common.isNotNull(libraryFundInfoList)) { if (Common.isNotNull(libraryFundInfoList)) {
for (TForecastLibrary library :libraryFundInfoList) { for (TForecastLibrary library :libraryFundInfoList) {
...@@ -4047,8 +4047,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4047,8 +4047,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} }
//判断是否为按人次收费
int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem() if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem()
...@@ -4057,10 +4055,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4057,10 +4055,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式只有按人次和人数收费 //预估模式只有按人次和人数收费
if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { if (!isExist) {
isSum = 1;
}
if (!isExist || isSum == 1) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee()); settleDomain.getManagementFee());
...@@ -4072,11 +4067,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4072,11 +4067,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
isSum = 2;
} else { } else {
gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(),settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(),settleDomain.getManagementFee());
} }
if (!isExist || isSum ==2) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), gMoney); settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), gMoney);
} }
...@@ -4087,10 +4081,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4087,10 +4081,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (!isExist) {
isSum = 3;
}
if (!isExist || isSum == 3) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee()); settleDomain.getRiskFundFee());
...@@ -4102,11 +4093,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4102,11 +4093,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
isSum = 4;
} else { } else {
money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee());
} }
if (!isExist || isSum == 4) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), money); settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), money);
} }
......
...@@ -1594,11 +1594,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1594,11 +1594,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
//删除停缴月以后的收入数据 //删除停缴月以后的收入数据
List<TIncomeDetail> updateList = detailService.list(Wrappers.<TIncomeDetail>query().lambda() List<TIncomeDetail> updateList = detailService.list(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, library.getEmpIdcard()) .eq(TIncomeDetail::getEmpIdcard,library.getEmpIdcard())
.eq(TIncomeDetail::getDeptId, library.getSettleDomainId()) .eq(TIncomeDetail::getDeptId,library.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING) .eq(TIncomeDetail::getSourceType,CommonConstants.TWO_STRING)
.eq(TIncomeDetail::getPayMonth, library.getSocialPayMonth())); .eq(TIncomeDetail::getPayMonth,library.getProvidentPayMonth()));
if (Common.isNotNull(updateList)) { if (Common.isNotNull(updateList)) {
for (TIncomeDetail upd : updateList) { for (TIncomeDetail upd : updateList) {
TIncomeDetail detail = new TIncomeDetail(); TIncomeDetail detail = new TIncomeDetail();
...@@ -1809,7 +1809,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1809,7 +1809,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isSaveAndUpdate = true; isSaveAndUpdate = true;
} else { } else {
if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT
|| BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) { || BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) {
library.setCreateBy(userId); library.setCreateBy(userId);
library.setCreateName(userName); library.setCreateName(userName);
library.setCreateTime(LocalDateTime.now()); library.setCreateTime(LocalDateTime.now());
...@@ -2661,8 +2661,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2661,8 +2661,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
//判断是否为按人次收费
int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
...@@ -2671,11 +2669,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2671,11 +2669,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式只有按人次和人数收费 if (!isExist) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
isSum = 1;
}
if (!isExist || isSum == 1) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee(), sourceType); settleDomain.getManagementFee(), sourceType);
...@@ -2687,11 +2681,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2687,11 +2681,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
isSum = 2;
} else { } else {
gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getManagementFee());
} }
if (!isExist || isSum == 2) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, sourceType); gMoney, sourceType);
...@@ -2704,10 +2697,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2704,10 +2697,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (!isExist) {
isSum = 3;
}
if (!isExist || isSum == 3) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee(), sourceType); settleDomain.getRiskFundFee(), sourceType);
...@@ -2719,11 +2709,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2719,11 +2709,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
isSum = 4;
} else { } else {
money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee());
} }
if (!isExist || isSum == 4) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, sourceType); money, sourceType);
......
...@@ -2697,7 +2697,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2697,7 +2697,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} else { } else {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda() exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard()) .eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth()) .eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth())
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId()) .eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING)); .eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING));
} }
...@@ -2711,20 +2711,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2711,20 +2711,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
//判断是否为按人次收费
int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && (settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
|| settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING))) { && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag)))) {
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式只有按人次和人数收费 //预估模式只有按人次和人数收费
if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { if (!exitFlag) {
isSum = 1;
}
if (!exitFlag || isSum == 1) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee(), socialFundFlag); settleDomain.getManagementFee(), socialFundFlag);
...@@ -2736,7 +2732,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2736,7 +2732,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
isSum = 2;
} else { } else {
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getManagementFee());
...@@ -2744,22 +2739,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2744,22 +2739,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getManagementFee());
} }
} }
if (!exitFlag || isSum == 2) { if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag); gMoney, socialFundFlag);
} }
} }
} }
if (Common.isNotNull(settleDomain.getRiskServerItem()) && (settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
|| settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING))) { && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag)))) {
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (!exitFlag) {
isSum = 3;
}
if (!exitFlag || isSum == 3) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee(), socialFundFlag); settleDomain.getRiskFundFee(), socialFundFlag);
...@@ -2771,7 +2764,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2771,7 +2764,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
isSum = 4;
} else { } else {
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getRiskFundFee());
...@@ -2779,7 +2771,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2779,7 +2771,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getRiskFundFee());
} }
} }
if (!exitFlag || isSum == 4) { if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag); money, socialFundFlag);
......
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