Commit 1ba63982 authored by huyuchen's avatar huyuchen

商险优化

parent 1ec1f9d0
...@@ -405,10 +405,10 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -405,10 +405,10 @@ public class TEmployeeContractInfo extends BaseEntity {
private String auditRemark; private String auditRemark;
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理3内部员工
*/ */
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE) @ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)") @Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
@Size(max = 1, message = "员工类型不可超过1位") @Size(max = 1, message = "员工类型不可超过1位")
private String empNatrue; private String empNatrue;
......
...@@ -59,10 +59,10 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -59,10 +59,10 @@ public class TEmployeeInfo extends BaseEntity {
private String empCode; private String empCode;
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理3内部员工
*/ */
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE) @ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)") @Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
@NotNull(message = "员工类型不可为空") @NotNull(message = "员工类型不可为空")
@Size(max = 1, message = "员工类型不可超过1位") @Size(max = 1, message = "员工类型不可超过1位")
private String empNatrue; private String empNatrue;
......
...@@ -66,9 +66,9 @@ public class TEmployeeProject extends BaseEntity { ...@@ -66,9 +66,9 @@ public class TEmployeeProject extends BaseEntity {
private String empCode; private String empCode;
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理3内部员工
*/ */
@Schema(description ="员工类型(字典值,0外包1派遣2代理)") @Schema(description ="员工类型(字典值,0外包1派遣2代理3内部员工)")
@NotNull(message = "员工类型不能为空") @NotNull(message = "员工类型不能为空")
@Size(max = 1, message = "员工类型不可超过1位") @Size(max = 1, message = "员工类型不可超过1位")
private String empNatrue; private String empNatrue;
......
...@@ -22,10 +22,10 @@ public class EmpAddDispatchVo extends TEmployeeInfo { ...@@ -22,10 +22,10 @@ public class EmpAddDispatchVo extends TEmployeeInfo {
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理3内部员工
*/ */
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE) @ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)") @Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
private String empNatrue; private String empNatrue;
/** /**
......
...@@ -117,7 +117,7 @@ public class EmployeeContractExportVO implements Serializable { ...@@ -117,7 +117,7 @@ public class EmployeeContractExportVO implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型") @ExcelProperty("员工类型")
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE) @ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)") @Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
private String empNatrue; private String empNatrue;
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
......
...@@ -57,7 +57,9 @@ public class DoJointTask { ...@@ -57,7 +57,9 @@ public class DoJointTask {
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.THREE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.THREE_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) { } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
......
...@@ -1670,98 +1670,97 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1670,98 +1670,97 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detailList.add(detail); detailList.add(detail);
try { try {
if (detail.getBuyType() != CommonConstants.FOUR_INT && if (detail.getBuyType() != CommonConstants.FOUR_INT &&
CommonConstants.ONE_INT == detail.getSettleType()) { CommonConstants.ONE_INT == detail.getSettleType() &&
if (new BigDecimal(success.getActualPremium()).compareTo(actualMoney) != 0) { new BigDecimal(success.getActualPremium()).compareTo(actualMoney) != 0) {
//获取项目信息 //获取项目信息
TSettleDomain settleDomain = new TSettleDomain(); TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null; List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null; R<TSettleDomainListVo> listVo = null;
listVo = archivesDaprUtil.selectSettleDomainSelectVoByNo(detail.getDeptNo()); listVo = archivesDaprUtil.selectSettleDomainSelectVoByNo(detail.getDeptNo());
if (Common.isNotNull(listVo)) { if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO(); settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo :settleDomainR) { for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo,settleDomain); BeanUtils.copyProperties(vo, settleDomain);
}
} }
} }
BigDecimal gMoney = BigDecimal.ZERO; }
Boolean isBl = false; BigDecimal gMoney = BigDecimal.ZERO;
if (Common.isNotNull(settleDomain)) { boolean isBl = false;
// 含有商险,则计算收入 if (Common.isNotNull(settleDomain)) {
if (settleDomain.getMrSettleType().equals(CommonConstants.TWO_STRING)) { // 含有商险,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem() if (settleDomain.getMrSettleType().equals(CommonConstants.TWO_STRING)) {
.contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem()
if (CommonConstants.ONE_STRING.equals(settleDomain.getManagementType())) { .contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
gMoney = BigDecimalUtils.safeMultiply(actualMoney, if (CommonConstants.ONE_STRING.equals(settleDomain.getManagementType())) {
settleDomain.getManagementFee().divide(new BigDecimal("100"), gMoney = BigDecimalUtils.safeMultiply(actualMoney,
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); settleDomain.getManagementFee().divide(new BigDecimal("100"),
isBl = true; CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP));
} isBl = true;
//判断是否存在当月的商险收入数据
TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setSourceId(detail.getId());
if (isBl) {
incomeDetail.setMoney(gMoney);
}else {
incomeDetail.setMoney(actualMoney);
}
incomeDetail.setFeeType(CommonConstants.ONE_STRING);
//判断是否存在当月的商险收入数据
R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if (Common.isNotNull(detailInfoList) && detailInfoList.getCode() == CommonConstants.SUCCESS
&& detailInfoList.getData().getDetailList().size() > 0) {
//生成红冲数据
for (TIncomeDetail detailInfo : detailInfoList.getData().getDetailList()) {
TIncomeDetail detail1 = new TIncomeDetail();
BeanCopyUtils.copyProperties(detailInfo, detail1);
detail1.setId(CommonConstants.NULL);
detail1.setRedData(CommonConstants.ONE_STRING);
detail1.setMoney(detailInfo.getMoney().negate());
socialDaprUtils.createTIncomeDetail(detail1);
break;
}
}
} }
if (Common.isNotNull(settleDomain.getRiskServerItem()) && settleDomain.getRiskServerItem() //判断是否存在当月的商险收入数据
.contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { TIncomeDetail incomeDetail = new TIncomeDetail();
if (CommonConstants.ONE_STRING.equals(settleDomain.getRiskFundType())) { incomeDetail.setSourceId(detail.getId());
gMoney = BigDecimalUtils.safeMultiply(actualMoney, if (isBl) {
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), incomeDetail.setMoney(gMoney);
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); } else {
isBl = true; incomeDetail.setMoney(actualMoney);
} }
//判断是否存在当月的商险收入数据 incomeDetail.setFeeType(CommonConstants.ONE_STRING);
TIncomeDetail incomeDetail = new TIncomeDetail(); //判断是否存在当月的商险收入数据
incomeDetail.setSourceId(detail.getId()); R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
incomeDetail.setFeeType(CommonConstants.TWO_STRING); if (Common.isNotNull(detailInfoList) && detailInfoList.getCode() == CommonConstants.SUCCESS
if (isBl) { && !detailInfoList.getData().getDetailList().isEmpty()) {
incomeDetail.setMoney(gMoney); //生成红冲数据
}else { for (TIncomeDetail detailInfo : detailInfoList.getData().getDetailList()) {
incomeDetail.setMoney(actualMoney); TIncomeDetail detail1 = new TIncomeDetail();
BeanCopyUtils.copyProperties(detailInfo, detail1);
detail1.setId(CommonConstants.NULL);
detail1.setRedData(CommonConstants.ONE_STRING);
detail1.setMoney(detailInfo.getMoney().negate());
socialDaprUtils.createTIncomeDetail(detail1);
break;
} }
//判断是否存在当月的商险收入数据 }
R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail); }
if (Common.isNotNull(detailInfoList) && detailInfoList.getCode() == CommonConstants.SUCCESS if (Common.isNotNull(settleDomain.getRiskServerItem()) && settleDomain.getRiskServerItem()
&& detailInfoList.getData().getDetailList().size() > 0) { .contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
//生成红冲数据 if (CommonConstants.ONE_STRING.equals(settleDomain.getRiskFundType())) {
for (TIncomeDetail detailInfo : detailInfoList.getData().getDetailList()) { gMoney = BigDecimalUtils.safeMultiply(actualMoney,
TIncomeDetail detail1 = new TIncomeDetail(); settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
BeanCopyUtils.copyProperties(detailInfo, detail1); CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP));
detail1.setId(CommonConstants.NULL); isBl = true;
detail1.setRedData(CommonConstants.ONE_STRING); }
detail1.setMoney(detailInfo.getMoney().negate()); //判断是否存在当月的商险收入数据
socialDaprUtils.createTIncomeDetail(detail1); TIncomeDetail incomeDetail = new TIncomeDetail();
break; incomeDetail.setSourceId(detail.getId());
} incomeDetail.setFeeType(CommonConstants.TWO_STRING);
if (isBl) {
incomeDetail.setMoney(gMoney);
} else {
incomeDetail.setMoney(actualMoney);
}
//判断是否存在当月的商险收入数据
R<TIncomeDetailReturnVo> detailInfoList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if (Common.isNotNull(detailInfoList) && detailInfoList.getCode() == CommonConstants.SUCCESS
&& !detailInfoList.getData().getDetailList().isEmpty()) {
//生成红冲数据
for (TIncomeDetail detailInfo : detailInfoList.getData().getDetailList()) {
TIncomeDetail detail1 = new TIncomeDetail();
BeanCopyUtils.copyProperties(detailInfo, detail1);
detail1.setId(CommonConstants.NULL);
detail1.setRedData(CommonConstants.ONE_STRING);
detail1.setMoney(detailInfo.getMoney().negate());
socialDaprUtils.createTIncomeDetail(detail1);
break;
} }
} }
} }
} }
//生成收入数据
createInsuranceInfo(detail);
} }
//生成收入数据
createInsuranceInfo(detail);
} }
}catch (Exception e){ }catch (Exception e){
log.error("收入数据同步处理失败:"+e); log.error("收入数据同步处理失败:"+e);
......
...@@ -515,10 +515,10 @@ public class TForecastLibrary extends BaseEntity { ...@@ -515,10 +515,10 @@ public class TForecastLibrary extends BaseEntity {
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理)
*/ */
@ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理)", maxLength = 1) @ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理3内部员工)", maxLength = 1)
@Length(max = 1, message = "员工类型(字典值,0外包1派遣2代理)不能超过1个字符") @Length(max = 1, message = "员工类型(字典值,0外包1派遣2代理3内部员工)不能超过1个字符")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型(字典值,0外包1派遣2代理)") @ExcelProperty("员工类型(字典值,0外包1派遣2代理3内部员工)")
private String empNatrue; private String empNatrue;
/** /**
* 单位补缴利息 * 单位补缴利息
......
...@@ -554,13 +554,13 @@ public class TForecastLibraryVo extends RowIndex implements Serializable { ...@@ -554,13 +554,13 @@ public class TForecastLibraryVo extends RowIndex implements Serializable {
@ExcelProperty("项目名称") @ExcelProperty("项目名称")
private String deptName; private String deptName;
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理3内部员工
*/ */
@Length(max = 1, message = "员工类型(字典值,0外包1派遣2代理) 不能超过1 个字符") @Length(max = 1, message = "员工类型(字典值,0外包1派遣2代理3内部员工) 不能超过1 个字符")
@ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理)", maxLength = 1) @ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理3内部员工)", maxLength = 1)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)") @Schema(description = "员工类型(字典值,0外包1派遣2代理3内部员工)")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型(字典值,0外包1派遣2代理)") @ExcelProperty("员工类型(字典值,0外包1派遣2代理3内部员工)")
private String empNatrue; private String empNatrue;
/** /**
* 单位补缴利息 * 单位补缴利息
......
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