Commit 7a471189 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.2' into MVP1.2

parents 87488125 cad93bb2
......@@ -341,58 +341,6 @@ public class TEmployeeProjectController {
return tEmployeeProjectService.updateEmployeeSalaryStatus(vo);
}
/**
* 查询项目档案在档人数
* @author hyc
* @param deptNo
* @date 2022-12-12 17:45
* @return R
*/
@Operation(summary = "查询项目档案在档人数", description = "查询项目档案在档人数")
@PostMapping("/selectInUseEmployeeProjectCount")
public R selectInUseEmployeeProjectCount(@RequestBody String deptNo) {
return tEmployeeProjectService.selectInUseEmployeeProjectCount(deptNo);
}
/**
* 查询项目员工合同在用数
* @author hyc
* @param deptNo
* @date 2022-12-12 17:45
* @return R
*/
@Operation(summary = "查询项目员工合同在用数", description = "查询项目员工合同在用数")
@PostMapping("/selectInUseEmployeeContractCount")
public R selectInUseEmployeeContractCount(@RequestBody String deptNo) {
return tEmployeeProjectService.selectInUseEmployeeContractCount(deptNo);
}
/**
* 查询社保在保人数
* @author hyc
* @param deptNo
* @date 2022-12-12 17:45
* @return R
*/
@Operation(summary = "查询社保在保人数", description = "查询社保在保人数")
@PostMapping("/selectInUseSocialCount")
public R selectInUseSocialCount(@RequestBody String deptNo) {
return tEmployeeProjectService.selectInUseSocialCount(deptNo);
}
/**
* 查询公积金在保人数
* @author hyc
* @param deptNo
* @date 2022-12-12 17:45
* @return R
*/
@Operation(summary = "查询公积金在保人数", description = "查询公积金在保人数")
@PostMapping("/selectInUseFundCount")
public R selectInUseFundCount(@RequestBody String deptNo) {
return tEmployeeProjectService.selectInUseFundCount(deptNo);
}
/**
* 查询项目对应的数据
* @author hyc
......
......@@ -226,14 +226,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
**/
void everyDayUpdateEmployeContractStatus();
R selectInUseEmployeeProjectCount(String deptNo);
R selectInUseEmployeeContractCount(String deptNo);
R selectInUseSocialCount(String deptNo);
R selectInUseFundCount(String deptNo);
R<List<TSettleDomainDataVo>> selectSettleMentData(List<String> deptNoList);
}
......@@ -1416,49 +1416,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
baseMapper.everyDayUpdateEmployeContractStatus();
}
@Override
public R selectInUseEmployeeProjectCount(String deptNo) {
//查询项目档案在档人数
return R.ok(baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,deptNo)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)));
}
@Override
public R selectInUseEmployeeContractCount(String deptNo) {
//项目员工合同在用数
return R.ok(baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,deptNo)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeProject::getContractStatus,CommonConstants.ONE_INT)));
}
@Override
public R selectInUseSocialCount(String deptNo) {
//查询社保在保人数
return R.ok(baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,deptNo)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)
.and(obj -> obj.eq(TEmployeeProject::getSocialStatus, CommonConstants.ONE_INT)
.or().eq(TEmployeeProject::getSocialStatus, CommonConstants.TWO_INT)
.or().eq(TEmployeeProject::getSocialStatus, CommonConstants.THREE_INT))));
}
@Override
public R selectInUseFundCount(String deptNo) {
//查询公积金在保人数
return R.ok(baseMapper.selectCount(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,deptNo)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)
.and(obj -> obj.eq(TEmployeeProject::getFundStatus, CommonConstants.ONE_INT)
.or().eq(TEmployeeProject::getFundStatus, CommonConstants.TWO_INT)
.or().eq(TEmployeeProject::getFundStatus, CommonConstants.THREE_INT))));
}
@Override
public R<List<TSettleDomainDataVo>> selectSettleMentData(List<String> deptNoList) {
List<TSettleDomainDataVo> list = new ArrayList<>();
......
......@@ -35,8 +35,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
......@@ -2419,368 +2417,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public void initEkpPushSocialParam(List<TForecastLibrary> unPushInfo, boolean synFlag,
Map<String, TSettleDomainSelectVo> selectVoMap) {
TSettleDomain settleDomain;
EkpPushSocialParam socialParam;
for (TForecastLibrary library : unPushInfo) {
//获取项目信息
settleDomain = selectVoMap.get(library.getDeptNo());
if (Common.isEmpty(settleDomain)){
ServiceUtil.runTimeExceptionDiy("获取结算主体异常,请检查传参和档案服务状态!");
}
if (CommonConstants.ZERO_STRING.equals(settleDomain.getSocialType())) {
continue;
}
socialParam = new EkpPushSocialParam();
//员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
if (Common.isNotNull(library.getUnitPensionFee())) {
socialParam.setFd_3af9ec80a9de7a(library.getUnitPensionFee().toString());
} else {
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
}
//单位医疗金额
if (Common.isNotNull(library.getUnitMedicalFee())) {
socialParam.setFd_3af9eba5899c90(library.getUnitMedicalFee().toString());
} else {
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
}
//单位工伤金额
if (Common.isNotNull(library.getUnitWorkInjuryFee())) {
socialParam.setFd_3af9eba684f592(library.getUnitWorkInjuryFee().toString());
} else {
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
}
//单位失业金额
if (Common.isNotNull(library.getUnitUnemploymentFee())) {
socialParam.setFd_3af9eba5f6e19e(library.getUnitUnemploymentFee().toString());
} else {
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
}
//单位生育金额
if (Common.isNotNull(library.getUnitBirthFee())) {
socialParam.setFd_3af9eba71c0138(library.getUnitBirthFee().toString());
} else {
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
}
//单位大病金额
if (Common.isNotNull(library.getUnitBitailmentFee())) {
socialParam.setFd_3af9eba863c0ee(library.getUnitBitailmentFee().toString());
} else {
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
}
//个人养老金额
if (Common.isNotNull(library.getPersonalPensionFee())) {
socialParam.setFd_3af9ebbd791662(library.getPersonalPensionFee().toString());
} else {
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
}
//个人医疗金额
if (Common.isNotNull(library.getPersonalMedicalFee())) {
socialParam.setFd_3af9ebbdd9797e(library.getPersonalMedicalFee().toString());
} else {
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
}
//单位社保合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3adfeb4e8064a8(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
}
//个人社保合计
if (Common.isNotNull(library.getPersonalSocialSum())) {
socialParam.setFd_3adfeb52a4d2e2(library.getPersonalSocialSum().toString());
} else {
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
}
//预估个人大病救助
if (Common.isNotNull(library.getPersonalBigailmentFee())) {
socialParam.setFd_3af9ebbf3e8be2(library.getPersonalBigailmentFee().toString());
} else {
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
}
//预估个人失业
if (Common.isNotNull(library.getPersonalUnemploymentFee())) {
socialParam.setFd_3af9ebbe29ce1c(library.getPersonalUnemploymentFee().toString());
} else {
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
}
//结算状态
if (Common.isNotNull(library.getSalarySocialFlag())) {
if (CommonConstants.ONE_STRING.equals(library.getSalarySocialFlag())) {
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_ISFLAG);
} else {
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
}
} else {
socialParam.setFd_3add9ea428879a(CommonConstants.EMPTY_STRING);
}
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_ONE);
//是否有预估
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getDeptNo());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getDeptName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(settleDomain.getCustomerName())) {
socialParam.setFd_3adfe8c81a0e42(settleDomain.getCustomerName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHouseholdName())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHouseholdName());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
//预估合计
if (Common.isNotNull(library.getSumAll())) {
socialParam.setFd_3af9ed7e813b86(library.getSumAll().toString());
} else {
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
}
//实缴单位合计
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
//实缴个人补缴利息
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
//实缴单位医疗
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
//预估个人补缴利息
if (Common.isNotNull(library.getPersonalInterestFee())) {
socialParam.setFd_3af9ebbecc4aa8(library.getPersonalInterestFee().toString());
} else {
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
}
//预估单位补缴利息
if (Common.isNotNull(library.getUnitInterestFee())) {
socialParam.setFd_3af9eba7c3da5e(library.getUnitInterestFee().toString());
} else {
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
}
//实缴单位养老
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
//实缴个人失业
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
//实缴单位补缴利息
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
//实缴单位大病救助
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
//实缴单位工伤
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
//实缴合计
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
//实缴个人医疗
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
//实缴单位失业
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
//实缴个人养老
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
//实缴个人大病救助
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
// synFlag=true 异步推送 synFlag=false 非异步推送 兼容批量办理处理 fxj
if (synFlag){
doJointSocialTask.asynchronousEkpForecastSocial(socialParam, library);
}else {
doJointSocialTask.asynchronousEkpForecastSocialAsso(socialParam, library);
}
}
}
public void initEkpPushFundParam(List<TForecastLibrary> unPushInfo, boolean synFlag,
Map<String, TSettleDomainSelectVo> selectVoMap) {
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
for (TForecastLibrary library : unPushInfo) {
//获取项目信息
settleDomain = selectVoMap.get(library.getDeptNo());
if (Common.isEmpty(settleDomain)){
ServiceUtil.runTimeExceptionDiy("获取结算主体异常,请检查传参和档案服务状态!");
}
if (CommonConstants.ZERO_STRING.equals(settleDomain.getFundType())) {
continue;
}
fundParam = new EkpPushFundParam();
//员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
if (Common.isNotNull(library.getUnitFundSum())) {
fundParam.setFd_3adfeb4e8064a8(library.getUnitFundSum().toString());
} else {
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
}
//预估个人代缴
if (Common.isNotNull(library.getPersonalFundSum())) {
fundParam.setFd_3adfeb52a4d2e2(library.getPersonalFundSum().toString());
} else {
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
}
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
if (Common.isNotNull(library.getSalaryFundFlag())) {
if (CommonConstants.ONE_STRING.equals(library.getSalaryFundFlag())) {
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_ISFLAG);
} else {
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
}
} else {
fundParam.setFd_3add9ea428879a(CommonConstants.EMPTY_STRING);
}
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_ONE);
//是否有预估
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getDeptNo());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getDeptName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//单位代缴
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
//个人代缴
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
//客户名称
if (Common.isNotNull(settleDomain.getCustomerName())) {
fundParam.setFd_3adfe8c81a0e42(settleDomain.getCustomerName());
} else {
fundParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//公积金账户
if (Common.isNotNull(library.getProvidentHouseholdName())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHouseholdName());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
if (Common.isNotNull(library.getSumAll())) {
fundParam.setFd_3adfeb7b624f06(library.getSumAll().toString());
}
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
if (synFlag){
doJointSocialTask.asynchronousEkpForecastFund(fundParam, library);
}else {
doJointSocialTask.asynchronousEkpForecastFundAsso(fundParam, library);
}
// synFlag=true 异步推送 synFlag=false 非异步推送 兼容批量办理处理 fxj
if (synFlag) {
doJointSocialTask.asynchronousEkpForecastSocial(unPushInfo, selectVoMap);
} else {
doJointSocialTask.asynchronousEkpForecastSocialAsso(unPushInfo, selectVoMap);
}
}
......@@ -2856,6 +2497,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
public void initEkpPushFundParam(List<TForecastLibrary> unPushInfo, boolean synFlag,
Map<String, TSettleDomainSelectVo> selectVoMap) {
if (synFlag) {
doJointSocialTask.asynchronousEkpForecastFund(unPushInfo, selectVoMap);
} else {
doJointSocialTask.asynchronousEkpForecastFundAsso(unPushInfo, selectVoMap);
}
}
public void createIncomeInsurance(TForecastLibrary library, TSettleDomain settleDomain, String feeType,
String charges, String feeMode, BigDecimal money, String sourceType
,boolean synFlag) {
......
......@@ -45,8 +45,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
......@@ -2517,7 +2515,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this){
if (Common.isNotNull(unPushs)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushs,mapSelectVo);
doJointSocialTask.asynchronousEkpPaymentSocial(unPushs, mapSelectVo);
}
}
}
......@@ -2546,7 +2544,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushFundParam(unPushInfo,mapSelectVo);
doJointSocialTask.asynchronousEkpPaymentFund(unPushInfo, mapSelectVo);
}
}
}
......@@ -2688,7 +2686,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushInfo,mapSelectVo);
doJointSocialTask.asynchronousEkpPaymentSocial(unPushInfo, mapSelectVo);
}
}
}
......@@ -2708,7 +2706,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushFundParam(unPushInfo,mapSelectVo);
doJointSocialTask.asynchronousEkpPaymentFund(unPushInfo, mapSelectVo);
}
}
}
......@@ -2764,380 +2762,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return paymentVo;
}
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
TSettleDomain settleDomain;
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
EkpPushSocialParam socialParam = new EkpPushSocialParam();
//员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
// 缴纳地
if (Common.isNotNull(library.getSocialPayAddr())){
socialParam.setFd_3b5cc58d1a70fe(library.getSocialPayAddr());
}else {
socialParam.setFd_3b5cc58d1a70fe(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
}
}catch (Exception e) {
log.error("生成社保明细异常",e);
}
}
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
TSettleDomain settleDomain;
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
EkpPushFundParam fundParam = new EkpPushFundParam();
//员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//预估个人代缴
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
// hgw2022-9-30 12:03:48根绝倩倩需求变更
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
//公积金缴纳地
if (Common.isNotNull(library.getProvidentPayAddr())) {
fundParam.setFd_3b5cc487bb46fa(library.getProvidentPayAddr());
} else {
fundParam.setFd_3b5cc487bb46fa(CommonConstants.EMPTY_STRING);
}
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
}
}catch (Exception e) {
log.error("生成公积金明细异常",e);
}
}
public void signIncomeFlag(List<TPaymentInfo> updateList) {
//获取所有的项目编码
List<String> deptNoList = updateList.stream().map(TPaymentInfo::getSettleDomainCode).collect(Collectors.toList());
......
package com.yifu.cloud.plus.v1.yifu.social.util;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
......@@ -25,6 +27,8 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 主要执行人员档案的员工类型同步更新
......@@ -354,38 +358,272 @@ public class DoJointSocialTask {
* @return: void
**/
@Async
public void asynchronousEkpPaymentSocial(EkpPushSocialParam socialParam, TPaymentInfo library) {
public void asynchronousEkpPaymentSocial(List<TPaymentInfo> unPushInfo, Map<String, TSettleDomainSelectVo> mapSelectVo) {
log.info("推送社保实缴费用到EKP-线程开始");
try {
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
TSettleDomain settleDomain;
EkpPushSocialParam socialParam;
for (TPaymentInfo library : unPushInfo) {
try {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
socialParam = new EkpPushSocialParam();
//员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
// 缴纳地
if (Common.isNotNull(library.getSocialPayAddr())) {
socialParam.setFd_3b5cc58d1a70fe(library.getSocialPayAddr());
} else {
socialParam.setFd_3b5cc58d1a70fe(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch(Exception e){
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
log.info("推送社保实缴费用到EKP结束");
}
......@@ -396,37 +634,162 @@ public class DoJointSocialTask {
* @return: void
**/
@Async
public void asynchronousEkpPaymentFund(EkpPushFundParam fundParam, TPaymentInfo library) {
public void asynchronousEkpPaymentFund(List<TPaymentInfo> unPushInfo, Map<String, TSettleDomainSelectVo> mapSelectVo) {
log.info("推送公积金实缴费用到EKP-线程开始");
try {
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
} else {
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
for (TPaymentInfo library : unPushInfo) {
try {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
fundParam = new EkpPushFundParam();
//员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//预估个人代缴
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
// hgw2022-9-30 12:03:48根绝倩倩需求变更
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
//公积金缴纳地
if (Common.isNotNull(library.getProvidentPayAddr())) {
fundParam.setFd_3b5cc487bb46fa(library.getProvidentPayAddr());
} else {
fundParam.setFd_3b5cc487bb46fa(CommonConstants.EMPTY_STRING);
}
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
log.info("公积金推送实缴费用到EKP结束");
}
......@@ -438,45 +801,273 @@ public class DoJointSocialTask {
* @return: void
**/
@Async
public void asynchronousEkpForecastSocial(EkpPushSocialParam socialParam, TForecastLibrary library) {
ekpForecastSocial(socialParam, library);
public void asynchronousEkpForecastSocial(List<TForecastLibrary> unPushInfo,
Map<String, TSettleDomainSelectVo> selectVoMap) {
ekpForecastSocial(unPushInfo, selectVoMap);
}
public void asynchronousEkpForecastSocialAsso(EkpPushSocialParam socialParam, TForecastLibrary library) {
ekpForecastSocial(socialParam, library);
public void asynchronousEkpForecastSocialAsso(List<TForecastLibrary> unPushInfo,
Map<String, TSettleDomainSelectVo> selectVoMap) {
ekpForecastSocial(unPushInfo, selectVoMap);
}
private void ekpForecastSocial(EkpPushSocialParam socialParam, TForecastLibrary library) {
private void ekpForecastSocial(List<TForecastLibrary> unPushInfo,
Map<String, TSettleDomainSelectVo> selectVoMap) {
log.info("推送社保预估费用到EKP-线程开始");
try {
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSettleDomain settleDomain;
EkpPushSocialParam socialParam;
for (TForecastLibrary library : unPushInfo) {
try {
//获取项目信息
settleDomain = selectVoMap.get(library.getDeptNo());
if (Common.isEmpty(settleDomain)) {
ServiceUtil.runTimeExceptionDiy("获取结算主体异常,请检查传参和档案服务状态!");
}
if (CommonConstants.ZERO_STRING.equals(settleDomain.getSocialType())) {
continue;
}
socialParam = new EkpPushSocialParam();
//员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
if (Common.isNotNull(library.getUnitPensionFee())) {
socialParam.setFd_3af9ec80a9de7a(library.getUnitPensionFee().toString());
} else {
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
}
//单位医疗金额
if (Common.isNotNull(library.getUnitMedicalFee())) {
socialParam.setFd_3af9eba5899c90(library.getUnitMedicalFee().toString());
} else {
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
}
//单位工伤金额
if (Common.isNotNull(library.getUnitWorkInjuryFee())) {
socialParam.setFd_3af9eba684f592(library.getUnitWorkInjuryFee().toString());
} else {
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
}
//单位失业金额
if (Common.isNotNull(library.getUnitUnemploymentFee())) {
socialParam.setFd_3af9eba5f6e19e(library.getUnitUnemploymentFee().toString());
} else {
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
}
//单位生育金额
if (Common.isNotNull(library.getUnitBirthFee())) {
socialParam.setFd_3af9eba71c0138(library.getUnitBirthFee().toString());
} else {
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
}
//单位大病金额
if (Common.isNotNull(library.getUnitBitailmentFee())) {
socialParam.setFd_3af9eba863c0ee(library.getUnitBitailmentFee().toString());
} else {
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
}
//个人养老金额
if (Common.isNotNull(library.getPersonalPensionFee())) {
socialParam.setFd_3af9ebbd791662(library.getPersonalPensionFee().toString());
} else {
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
}
//个人医疗金额
if (Common.isNotNull(library.getPersonalMedicalFee())) {
socialParam.setFd_3af9ebbdd9797e(library.getPersonalMedicalFee().toString());
} else {
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
}
//单位社保合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3adfeb4e8064a8(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
}
//个人社保合计
if (Common.isNotNull(library.getPersonalSocialSum())) {
socialParam.setFd_3adfeb52a4d2e2(library.getPersonalSocialSum().toString());
} else {
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
}
//预估个人大病救助
if (Common.isNotNull(library.getPersonalBigailmentFee())) {
socialParam.setFd_3af9ebbf3e8be2(library.getPersonalBigailmentFee().toString());
} else {
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
}
//预估个人失业
if (Common.isNotNull(library.getPersonalUnemploymentFee())) {
socialParam.setFd_3af9ebbe29ce1c(library.getPersonalUnemploymentFee().toString());
} else {
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
}
//结算状态
if (Common.isNotNull(library.getSalarySocialFlag())) {
if (CommonConstants.ONE_STRING.equals(library.getSalarySocialFlag())) {
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_ISFLAG);
} else {
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
}
} else {
socialParam.setFd_3add9ea428879a(CommonConstants.EMPTY_STRING);
}
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_ONE);
//是否有预估
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getDeptNo());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getDeptName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(settleDomain.getCustomerName())) {
socialParam.setFd_3adfe8c81a0e42(settleDomain.getCustomerName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHouseholdName())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHouseholdName());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
//预估合计
if (Common.isNotNull(library.getSumAll())) {
socialParam.setFd_3af9ed7e813b86(library.getSumAll().toString());
} else {
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
}
//实缴单位合计
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
//实缴个人补缴利息
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
//实缴单位医疗
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
//预估个人补缴利息
if (Common.isNotNull(library.getPersonalInterestFee())) {
socialParam.setFd_3af9ebbecc4aa8(library.getPersonalInterestFee().toString());
} else {
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
}
//预估单位补缴利息
if (Common.isNotNull(library.getUnitInterestFee())) {
socialParam.setFd_3af9eba7c3da5e(library.getUnitInterestFee().toString());
} else {
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
}
//实缴单位养老
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
//实缴个人失业
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
//实缴单位补缴利息
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
//实缴单位大病救助
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
//实缴单位工伤
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
//实缴合计
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
//实缴个人医疗
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
//实缴单位失业
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
//实缴个人养老
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
//实缴个人大病救助
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保预估费用到EKP错误", e);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保预估费用到EKP错误", e);
}
log.info("推送社保预估费用到EKP结束");
}
......@@ -488,48 +1079,183 @@ public class DoJointSocialTask {
* @return: void
**/
@Async
public void asynchronousEkpForecastFund(EkpPushFundParam fundParam, TForecastLibrary library) {
initEkpForecastFund(fundParam, library);
public void asynchronousEkpForecastFund(List<TForecastLibrary> unPushInfo,
Map<String, TSettleDomainSelectVo> selectVoMap) {
initEkpForecastFund(unPushInfo, selectVoMap);
}
private void initEkpForecastFund(EkpPushFundParam fundParam, TForecastLibrary library) {
initEkpForecastFund(fundParam, library);
private void initEkpForecastFund(List<TForecastLibrary> unPushInfo,
Map<String, TSettleDomainSelectVo> selectVoMap) {
log.info("推送公积金预估费用到EKP-线程开始");
try {
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
for (TForecastLibrary library : unPushInfo) {
try {
//获取项目信息
settleDomain = selectVoMap.get(library.getDeptNo());
if (Common.isEmpty(settleDomain)) {
ServiceUtil.runTimeExceptionDiy("获取结算主体异常,请检查传参和档案服务状态!");
}
if (CommonConstants.ZERO_STRING.equals(settleDomain.getFundType())) {
continue;
}
fundParam = new EkpPushFundParam();
//员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
if (Common.isNotNull(library.getUnitFundSum())) {
fundParam.setFd_3adfeb4e8064a8(library.getUnitFundSum().toString());
} else {
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
}
//预估个人代缴
if (Common.isNotNull(library.getPersonalFundSum())) {
fundParam.setFd_3adfeb52a4d2e2(library.getPersonalFundSum().toString());
} else {
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
}
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
if (Common.isNotNull(library.getSalaryFundFlag())) {
if (CommonConstants.ONE_STRING.equals(library.getSalaryFundFlag())) {
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_ISFLAG);
} else {
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
}
} else {
fundParam.setFd_3add9ea428879a(CommonConstants.EMPTY_STRING);
}
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_ONE);
//是否有预估
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getDeptNo());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getDeptName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//单位代缴
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
//个人代缴
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
//客户名称
if (Common.isNotNull(settleDomain.getCustomerName())) {
fundParam.setFd_3adfe8c81a0e42(settleDomain.getCustomerName());
} else {
fundParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//公积金账户
if (Common.isNotNull(library.getProvidentHouseholdName())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHouseholdName());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
if (Common.isNotNull(library.getSumAll())) {
fundParam.setFd_3adfeb7b624f06(library.getSumAll().toString());
}
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
forecastLibraryMapper.updateById(library);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(library.getId());
error.setTitle(body);
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送公积金预估费用到EKP错误", e);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(library.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送公积金预估费用到EKP错误", e);
}
log.info("推送公积金预估费用到EKP结束");
}
public void asynchronousEkpForecastFundAsso(EkpPushFundParam fundParam, TForecastLibrary library) {
initEkpForecastFund(fundParam, library);
public void asynchronousEkpForecastFundAsso(List<TForecastLibrary> unPushInfo,
Map<String, TSettleDomainSelectVo> selectVoMap) {
initEkpForecastFund(unPushInfo, selectVoMap);
}
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
return sb.toString();
}
}
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