Commit 008795fc authored by huyuchen's avatar huyuchen

优化修改

parent a86851e9
......@@ -30,7 +30,7 @@ public class EmployeeConstants {
public static final String FILE_ROVINCE_MUST = "更新档案市,档案省必填";
public static final String FILE_CITY_MUST = "更新档案县,档案市必填";
public static final String DEPT_NO_ERROR = "项目编码错误";
public static final String DEPT_NO_EXIST = "根据项目编码未找到项目";
public static final String DEPT_NO_EXIST = "未找到对应的项目或者项目已停止合作,请核实";
public static final String CHECK_ERROR = "校验服务错误,请联系管理员!";
public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!";
public static final String SITUATION_SIX = "作废";
......
......@@ -670,6 +670,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isEmpty(fileSource)) {
return R.failed("人员档案来源必填!(4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)");
}
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, employeeInfo.getDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(tSettleDomain)) {
return R.failed("对应项目编码的项目已停止合作");
}
TEmployeeInfo check = new TEmployeeInfo();
check.setEmpName(employeeInfo.getEmpName());
check.setEmpIdcard(employeeInfo.getEmpIdcard());
......
......@@ -6,12 +6,13 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
import lombok.AllArgsConstructor;
......@@ -36,6 +37,7 @@ public class DoJointSalaryAsyncTask {
private final DaprSocialProperties socialProperties;
private final TSalaryStandardMapper salaryStandardMapper;
private final RedisUtil redisUtil;
/**
* @Description: 收入
......@@ -164,6 +166,7 @@ public class DoJointSalaryAsyncTask {
TIncomeDetail detail;
Integer value;
BigDecimal money;
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (TSalaryAccount account : salaryAccountList) {
value = detailMap.get(account.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING
+ account.getDeptId() + CommonConstants.DOWN_LINE_STRING + isManage
......@@ -171,6 +174,7 @@ public class DoJointSalaryAsyncTask {
+ CommonConstants.FOUR_STRING);
if (Common.isEmpty(value) || value == 0) {
detail = new TIncomeDetail();
detail.setRedisKey(redisKey);
detail.setPayMonth(account.getSalaryMonth());
detail.setDeptId(account.getDeptId());
detail.setDeptName(account.getDeptName());
......@@ -206,6 +210,18 @@ public class DoJointSalaryAsyncTask {
}
}
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
R<Boolean> saveR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tincome/inner/saveSalaryPushIncome", income, Boolean.class, SecurityConstants.FROM_IN);
if (saveR == null || saveR.getCode() == CommonConstants.ONE_INT || Boolean.FALSE.equals(saveR.getData())) {
return false;
}
}
redisUtil.remove(redisKey);
}
return true;
}
......
......@@ -242,4 +242,13 @@ public class TIncome{
@TableField(exist = false)
@ExcelIgnore
private String authSql;
@TableField(exist = false)
private String redisKey;
/**
* 来源id
*/
@TableField(exist = false)
private String sourceId;
}
......@@ -227,4 +227,7 @@ public class TIncomeDetail {
// 查询时框定范围使用
@TableField(exist = false)
private List<String> idCardList;
@TableField(exist = false)
private String redisKey;
}
......@@ -183,6 +183,18 @@ public class TIncomeController {
return tIncomeService.saveDetail(tIncomeDetail,false);
}
/**
* @Description: 薪资新增收入明细-详情表,同时统计;采用同步操作,因为薪资本身就是异步
* @Author: hgw
* @Date: 2022-11-29 17:29:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Inner
@PostMapping("/inner/saveSalaryPushIncome")
public Boolean saveSalaryPushIncome(@RequestBody TIncome income) {
return tIncomeService.savePushIncome(income);
}
/**
* @Description: 定时任务统计表未推送数据推送;
* @Author: huyc
......
......@@ -25,7 +25,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import javax.servlet.http.HttpServletResponse;
......@@ -60,13 +59,15 @@ public interface TIncomeService extends IService<TIncome> {
**/
boolean saveDetail(TIncomeDetail tIncomeDetail,boolean synFlag);
boolean savePushIncome(TIncome income);
/**
* @Description: 新增收入明细-详情表,同时统计;
* @Author: huyc
* @Date: 2022/9/9 11:42
* @return:
**/
boolean saveBathDetail(TIncomeDetail tIncomeDetail, TPaymentInfo paymentInfo);
boolean saveBathDetail(TIncomeDetail tIncomeDetail, String paymentId);
void pushDetail();
......
......@@ -85,6 +85,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private final ArchivesDaprUtil archivesDaprUtil;
private final RedisUtil redisUtil;
@Autowired
private DoJointSocialTask doJointSocialTask;
......@@ -317,6 +319,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List<TForecastLibrary> libraryFundInfoListFund = new ArrayList<>();
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (TForecastLibrary library : saveLibraryMap.values()) {
if (Common.isEmpty(library.getSocialId()) && Common.isEmpty(library.getProvidentId())) {
continue;
......@@ -341,7 +344,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
&& CommonConstants.FOUR_STRING.equals(socialFundInfo.getSocialStatus())
|| CommonConstants.THREE_STRING.equals(socialFundInfo.getSocialStatus()))) {
//办理成功生成收入
createIncomeInfo(library,true,mapSelectVo);
createIncomeInfo(library,true,mapSelectVo,redisKey);
if (CommonConstants.ZERO_INT == library.getDataPush()) {
libraryFundInfoListSocial.add(library);
}
......@@ -354,12 +357,20 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(socialFundInfoF) && (Common.isNotNull(socialFundInfoF.getFundId())
&& CommonConstants.THREE_STRING.equals(socialFundInfoF.getFundStatus()))) {
//办理成功生成收入
createIncomeInfo(library,true,mapSelectVo);
createIncomeInfo(library,true,mapSelectVo,redisKey);
if (CommonConstants.ZERO_INT == library.getDataPush()) {
libraryFundInfoListFund.add(library);
}
}
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomeT(income);
}
redisUtil.remove(redisKey);
}
//推送社保明细
if (Common.isNotNull(libraryFundInfoListSocial)) {
pushForecastInfo(libraryFundInfoListSocial,true, mapSelectVo);
......@@ -1615,14 +1626,24 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TIncomeDetail::getPayMonth, library.getSocialPayMonth())
.eq(TIncomeDetail::getMrSettleType, CommonConstants.ONE_STRING));
if (Common.isNotNull(updateList)) {
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (TIncomeDetail upd : updateList) {
TIncomeDetail detail = new TIncomeDetail();
BeanCopyUtils.copyProperties(upd, detail);
detail.setRedisKey(redisKey);
detail.setId(CommonConstants.NULL);
detail.setRedData(CommonConstants.ONE_STRING);
detail.setMoney(detail.getMoney().negate());
incomeService.saveDetail(detail,false);
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomeAssoT(income);
}
redisUtil.remove(redisKey);
}
}
}
......@@ -1655,14 +1676,24 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TIncomeDetail::getPayMonth,library.getProvidentPayMonth())
.eq(TIncomeDetail::getMrSettleType, CommonConstants.ONE_STRING));
if (Common.isNotNull(updateList)) {
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (TIncomeDetail upd : updateList) {
TIncomeDetail detail = new TIncomeDetail();
BeanCopyUtils.copyProperties(upd, detail);
detail.setId(CommonConstants.NULL);
detail.setRedisKey(redisKey);
detail.setRedData(CommonConstants.ONE_STRING);
detail.setMoney(detail.getMoney().negate());
incomeService.saveDetail(detail,false);
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomeAssoT(income);
}
redisUtil.remove(redisKey);
}
}
}
......@@ -1887,13 +1918,22 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.in(TForecastLibrary::getSocialPayMonth, payMonthList));
if (Common.isNotNull(librarySocialInfoList)) {
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (TForecastLibrary library : librarySocialInfoList) {
//办理成功生成收入
createIncomeInfo(library, synFlag, mapSelectVo);
createIncomeInfo(library, synFlag, mapSelectVo,redisKey);
if (CommonConstants.ZERO_INT == library.getDataPush()) {
librarySocialInfoList1.add(library);
}
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomeT(income);
}
redisUtil.remove(redisKey);
}
if (Common.isNotNull(librarySocialInfoList1)) {
this.pushForecastInfo(librarySocialInfoList1,synFlag,mapSelectVo);
}
......@@ -2221,6 +2261,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List<TForecastLibrary> libraryFundInfoListFund = new ArrayList<>();
//社保收入
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
if (Common.isNotNull(socialFundInfo.getSocialId())
&& CommonConstants.FOUR_STRING.equals(socialFundInfo.getSocialStatus())
|| CommonConstants.THREE_STRING.equals(socialFundInfo.getSocialStatus())) {
......@@ -2235,7 +2276,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(librarySocialInfoList)) {
for (TForecastLibrary library : librarySocialInfoList) {
//办理成功生成收入
createIncomeInfo(library,true, mapSelectVo);
createIncomeInfo(library,true, mapSelectVo,redisKey);
if (CommonConstants.ZERO_INT == library.getDataPush()) {
libraryFundInfoListSocial.add(library);
}
......@@ -2257,13 +2298,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(libraryFundInfoList)) {
for (TForecastLibrary library : libraryFundInfoList) {
//办理成功生成收入
createIncomeInfo(library,true, mapSelectVo);
createIncomeInfo(library,true, mapSelectVo,redisKey);
if (CommonConstants.ZERO_INT == library.getDataPush()) {
libraryFundInfoListFund.add(library);
}
}
}
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomeT(income);
}
redisUtil.remove(redisKey);
}
//推送社保明细
if (Common.isNotNull(libraryFundInfoListSocial)) {
pushForecastInfo(libraryFundInfoListSocial,true,mapSelectVo);
......@@ -2434,7 +2483,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
public void createIncomeInfo(TForecastLibrary library,boolean synFlag,Map<String,TSettleDomainSelectVo> mapSelectVo) {
public void createIncomeInfo(TForecastLibrary library,boolean synFlag,Map<String,TSettleDomainSelectVo> mapSelectVo,
String redisKey) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
if (Common.isNotNull(mapSelectVo)) {
......@@ -2479,7 +2529,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//预估模式
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee(), sourceType, synFlag);
settleDomain.getManagementFee(), sourceType, synFlag,redisKey);
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(sourceType)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
......@@ -2488,7 +2538,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//预估模式
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee(), sourceType, synFlag);
settleDomain.getRiskFundFee(), sourceType, synFlag,redisKey);
}
}
}
......@@ -2504,10 +2554,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public void createIncomeInsurance(TForecastLibrary library, TSettleDomain settleDomain, String feeType,
String charges, String feeMode, BigDecimal money, String sourceType
,boolean synFlag) {
,boolean synFlag, String redisKey) {
//生成收入数据
TIncomeDetail detail = new TIncomeDetail();
detail.setCreateTime(DateUtil.getCurrentDateTime());
detail.setRedisKey(redisKey);
detail.setDeptName(settleDomain.getDepartName());
detail.setDeptNo(settleDomain.getDepartNo());
detail.setDeptId(settleDomain.getId());
......
......@@ -37,7 +37,6 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper;
......@@ -280,6 +279,12 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
}
@Override
public boolean savePushIncome(TIncome income) {
doJointSocialTask.asynchronousEkpIncomeAssoT(income);
return true;
}
/**
* @Description: 新增收入明细-详情表,同时统计;
* @Author: hgw
......@@ -287,7 +292,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @return: boolean
**/
@Override
public boolean saveBathDetail(TIncomeDetail tIncomeDetail, TPaymentInfo paymentInfo) {
public boolean saveBathDetail(TIncomeDetail tIncomeDetail, String paymentId) {
if (Common.isEmpty(tIncomeDetail.getEmpIdcard())
|| Common.isEmpty(tIncomeDetail.getDeptId())
|| Common.isEmpty(tIncomeDetail.getPayMonth())) {
......@@ -309,10 +314,10 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
tIncomeDetailService.save(tIncomeDetail);
// 不存在,直接新增
if (incomeList == null || incomeList.isEmpty()) {
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
return this.savePaymentIncome(tIncomeDetail,paymentId);
} else {
// 核心判断
return this.copyCore(tIncomeDetail, incomeList, detailList,paymentInfo,true);
return this.copyCore(tIncomeDetail, incomeList, detailList,paymentId,true);
}
}
......@@ -403,6 +408,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
income.setSendStatus(CommonConstants.ZERO_STRING);
income.setApplyNo(tIncomeDetail.getApplyNo());
this.save(income);
if (Common.isNotNull(tIncomeDetail.getRedisKey())) {
income.setRedisKey(tIncomeDetail.getRedisKey());
}
long start = System.currentTimeMillis();
if (synFlag){
doJointSocialTask.asynchronousEkpIncome(income);
......@@ -414,14 +422,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
// 复制并保存
private boolean savePaymentIncome(TIncomeDetail tIncomeDetail, TPaymentInfo paymentInfo) {
private boolean savePaymentIncome(TIncomeDetail tIncomeDetail, String paymentId) {
TIncome income = new TIncome();
BeanUtil.copyProperties(tIncomeDetail, income);
income.setSendStatus(CommonConstants.ZERO_STRING);
income.setApplyNo(tIncomeDetail.getApplyNo());
this.save(income);
long start = System.currentTimeMillis();
doJointSocialTask.asynchronousEkpIncomePayment(income,paymentInfo);
income.setSourceId(paymentId);
doJointSocialTask.asynchronousEkpIncomePayment(income,paymentId);
log.error("线程执行耗时:"+ (System.currentTimeMillis()-start));
return true;
}
......@@ -571,7 +580,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @return: boolean
**/
private boolean copyCore(TIncomeDetail tIncomeDetail, List<TIncome> incomeList, List<TIncomeDetail> detailList,
TPaymentInfo paymentInfo,boolean synFlag) {
String paymentId,boolean synFlag) {
if (Common.isNotNull(tIncomeDetail.getSourceId())) {
// 如果该id、该类型的金额已存在,则不允许重复生成推送
TIncomeDetail a = new TIncomeDetail();
......@@ -587,8 +596,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
// 判断,比例,直接加
if (CommonConstants.ONE_STRING.equals(tIncomeDetail.getFeeMode())) {
if (Common.isNotNull(paymentInfo)) {
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
if (Common.isNotNull(paymentId)) {
return this.savePaymentIncome(tIncomeDetail,paymentId);
} else {
return this.saveIncome(tIncomeDetail,synFlag);
}
......@@ -643,8 +652,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if (CommonConstants.ZERO_STRING.equals(tIncomeDetail.getRedData())) {
if (incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null
|| incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) {
if (Common.isNotNull(paymentInfo)) {
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
if (Common.isNotNull(paymentId)) {
return this.savePaymentIncome(tIncomeDetail,paymentId);
} else {
return this.saveIncome(tIncomeDetail,synFlag);
}
......@@ -652,8 +661,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
} else {
// 红冲判断:当本类型是最大值,才可以红冲
if (this.redDateJudge(tIncomeDetail, numMap)) {
if (Common.isNotNull(paymentInfo)) {
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
if (Common.isNotNull(paymentId)) {
return this.savePaymentIncome(tIncomeDetail,paymentId);
} else {
return this.saveIncome(tIncomeDetail,synFlag);
}
......@@ -690,8 +699,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
}
}
if (Common.isNotNull(paymentInfo)) {
tPaymentInfoMapper.updateBySocialIncomeFlag(paymentInfo.getId());
if (Common.isNotNull(paymentId)) {
tPaymentInfoMapper.updateBySocialIncomeFlag(paymentId);
}
return true;
}
......
......@@ -2565,8 +2565,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
createPaymentSocialInfoReal(user, searchVo,mapSelectVo);
createPaymentFundInfoReal(user, searchVo,mapSelectVo);
//推送社保公积金收入数据
createPaymentInfoIncomeReal(user, searchVo,mapSelectVo);
createPaymentFundIncomeReal(user, searchVo,mapSelectVo);
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
createPaymentInfoIncomeReal(user, searchVo,mapSelectVo,redisKey);
createPaymentFundIncomeReal(user, searchVo,mapSelectVo,redisKey);
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomePaymentT(income);
}
redisUtil.remove(redisKey);
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
......@@ -2601,6 +2610,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (int j = 0; j < i; j++) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
......@@ -2610,10 +2620,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo);
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo,redisKey);
}
}
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomePaymentT(income);
}
redisUtil.remove(redisKey);
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
......@@ -2631,6 +2649,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
String redisKey = String.valueOf(UUID.randomUUID()).replaceAll("-", "") + "_incomePush";
for (int j = 0; j < i; j++) {
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
......@@ -2639,10 +2658,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo);
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo,redisKey);
}
}
}
//推送失败的数据重新推送
if (Common.isNotNull(redisUtil.get(redisKey))) {
List<TIncome> list = (List<TIncome>) redisUtil.get(redisKey);
for (TIncome income:list) {
doJointSocialTask.asynchronousEkpIncomePaymentT(income);
}
redisUtil.remove(redisKey);
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
......@@ -2714,7 +2741,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
Map<String,TSettleDomainSelectVo> mapSelectVo,String redisKey) {
searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialIncomeCount(searchVo,user.getId());
if (count > 0) {
......@@ -2725,7 +2752,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo);
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo,redisKey);
}
}
}
......@@ -2733,7 +2760,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
Map<String,TSettleDomainSelectVo> mapSelectVo,String redisKey) {
searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentFundIncomeCount(searchVo,user.getId());
if (count > 0) {
......@@ -2744,7 +2771,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo);
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo,redisKey);
}
}
}
......@@ -2804,7 +2831,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
Map<String,TSettleDomainSelectVo> mapSelectVo,String redisKey) {
List<TIncomeDetail> exitIncome;
TSettleDomain settleDomain;
try {
......@@ -2877,7 +2904,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag);
gMoney, socialFundFlag,redisKey);
}
}
}
......@@ -2908,7 +2935,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag);
money, socialFundFlag,redisKey);
}
}
}
......@@ -2923,10 +2950,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType,
String charges, String feeMode, BigDecimal money, String sourceType) {
String charges, String feeMode, BigDecimal money, String sourceType,
String redisKey) {
//生成收入数据
TIncomeDetail detail = new TIncomeDetail();
detail.setCreateTime(DateUtil.getCurrentDateTime());
detail.setRedisKey(redisKey);
detail.setDeptName(settleDomain.getDepartName());
detail.setDeptNo(settleDomain.getDepartNo());
detail.setDeptId(settleDomain.getId());
......@@ -2952,7 +2981,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
detail.setMrSettleType(settleDomain.getMrSettleType());
detail.setId(CommonConstants.NULL);
detail.setRedData(CommonConstants.ZERO_STRING);
incomeService.saveBathDetail(detail,library);
incomeService.saveBathDetail(detail,library.getId());
}
/**
......
......@@ -5,6 +5,7 @@ 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;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil;
......@@ -26,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -61,6 +63,9 @@ public class DoJointSocialTask {
@Autowired
private TForecastLibraryMapper forecastLibraryMapper;
@Autowired
private RedisUtil redisUtil;
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
......@@ -72,8 +77,15 @@ public class DoJointSocialTask {
log.info("推送收入到EKP-线程开始");
try {
String sendBack = this.getSendBack(income);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = this.getSendBack(income);
if ((Common.isEmpty(sendBack) || sendBack.length() != 32) && Common.isNotNull(income.getRedisKey())) {
List<TIncome> list;
if (Common.isNotNull(income.getRedisKey()) && Common.isNotNull(redisUtil.get(income.getRedisKey()))) {
list = (List<TIncome>) redisUtil.get(income.getRedisKey());
} else {
list = new ArrayList<>();
}
list.add(income);
redisUtil.set(income.getRedisKey(), list);
}
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
......@@ -110,8 +122,15 @@ public class DoJointSocialTask {
log.info("推送收入到EKP-线程开始");
try {
String sendBack = this.getSendBack(income);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = this.getSendBack(income);
if ((Common.isEmpty(sendBack) || sendBack.length() != 32) && Common.isNotNull(income.getRedisKey())) {
List<TIncome> list;
if (Common.isNotNull(redisUtil.get(income.getRedisKey()))) {
list = (List<TIncome>) redisUtil.get(income.getRedisKey());
} else {
list = new ArrayList<>();
}
list.add(income);
redisUtil.set(income.getRedisKey(),list);
}
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
......@@ -152,12 +171,19 @@ public class DoJointSocialTask {
* @return: void
**/
@Async
public void asynchronousEkpIncomePayment(TIncome income,TPaymentInfo paymentInfo) {
public void asynchronousEkpIncomePayment(TIncome income,String paymentId) {
log.info("推送收入到EKP-线程开始");
try {
String sendBack = this.getSendBack(income);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = this.getSendBack(income);
if ((Common.isEmpty(sendBack) || sendBack.length() != 32) && Common.isNotNull(income.getRedisKey())) {
List<TIncome> list;
if (Common.isNotNull(redisUtil.get(income.getRedisKey()))) {
list = (List<TIncome>) redisUtil.get(income.getRedisKey());
} else {
list = new ArrayList<>();
}
list.add(income);
redisUtil.set(income.getRedisKey(),list);
}
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
......@@ -165,7 +191,51 @@ public class DoJointSocialTask {
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
incomeMapper.updateById(income);
paymentInfoMapper.updateBySocialIncomePayment(paymentInfo.getId());
paymentInfoMapper.updateBySocialIncomePayment(paymentId);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(sendBack);
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.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送收入到EKP错误", e);
}
log.info("推送收入到EKP结束");
}
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
* @Date: 2022-7-8
* @return: void
**/
@Async
public void asynchronousEkpIncomePaymentT(TIncome income) {
log.info("推送收入到EKP-线程开始");
try {
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
paymentInfoMapper.updateBySocialIncomePayment(income.getSourceId());
incomeMapper.updateById(income);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
......@@ -362,268 +432,301 @@ public class DoJointSocialTask {
log.info("推送社保实缴费用到EKP-线程开始");
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);
List<EkpPushSocialParam> paramList = new ArrayList<>();
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);
}
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(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);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushSocialParam s:paramList) {
try {
String body = ekpSocialUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbe1f94a08());
} 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.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(body);
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
}
} catch(Exception 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.setLinkId(s.getFd_3b0afbe1f94a08());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保实缴费用到EKP错误", e);
}
}
}
log.info("推送社保实缴费用到EKP结束");
}
......@@ -638,6 +741,7 @@ public class DoJointSocialTask {
log.info("推送公积金实缴费用到EKP-线程开始");
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
List<EkpPushFundParam> paramList = new ArrayList<>();
for (TPaymentInfo library : unPushInfo) {
try {
//获取项目信息
......@@ -763,7 +867,7 @@ public class DoJointSocialTask {
}
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
paramList.add(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(library.getId());
......@@ -791,6 +895,38 @@ public class DoJointSocialTask {
log.error("公积金推送实缴费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushFundParam s:paramList) {
try {
String body = ekpFundUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbaf10df2c());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(s.getFd_3b0afbaf10df2c());
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(s.getFd_3b0afbaf10df2c());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
}
}
log.info("公积金推送实缴费用到EKP结束");
}
......@@ -815,6 +951,7 @@ public class DoJointSocialTask {
log.info("推送社保预估费用到EKP-线程开始");
TSettleDomain settleDomain;
EkpPushSocialParam socialParam;
List<EkpPushSocialParam> paramList = new ArrayList<>();
for (TForecastLibrary library : unPushInfo) {
try {
//获取项目信息
......@@ -1040,7 +1177,7 @@ public class DoJointSocialTask {
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpSocialUtil.sendToEKP(socialParam);
paramList.add(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
......@@ -1069,6 +1206,38 @@ public class DoJointSocialTask {
log.error("推送社保预估费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushSocialParam s:paramList) {
try {
String body = ekpSocialUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbe1f94a08());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(s.getFd_3b0afbe1f94a08());
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(s.getFd_3b0afbe1f94a08());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送社保预估费用到EKP错误", e);
}
}
}
log.info("推送社保预估费用到EKP结束");
}
......@@ -1089,6 +1258,7 @@ public class DoJointSocialTask {
log.info("推送公积金预估费用到EKP-线程开始");
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
List<EkpPushFundParam> paramList = new ArrayList<>();
for (TForecastLibrary library : unPushInfo) {
try {
//获取项目信息
......@@ -1212,7 +1382,7 @@ public class DoJointSocialTask {
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
body = ekpFundUtil.sendToEKP(fundParam);
paramList.add(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setDataPush(CommonConstants.ONE_INT);
......@@ -1241,9 +1411,120 @@ public class DoJointSocialTask {
log.error("推送公积金预估费用到EKP错误", e);
}
}
//推送失败的数据重新推送
if (!paramList.isEmpty()) {
for (EkpPushFundParam s:paramList) {
try {
String body = ekpFundUtil.sendToEKP(s);
if (Common.isNotNull(body) && body.length() == 32) {
paymentInfoMapper.updateBySocialPayment(s.getFd_3b0afbaf10df2c());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(s.getFd_3b0afbaf10df2c());
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(s.getFd_3b0afbaf10df2c());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送公积金预估费用到EKP错误", e);
}
}
}
log.info("推送公积金预估费用到EKP结束");
}
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
* @Date: 2022-7-8
* @return: void
**/
@Async
public void asynchronousEkpIncomeT(TIncome income) {
log.info("推送收入到EKP-线程开始");
try {
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
incomeMapper.updateById(income);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(sendBack);
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.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送收入到EKP错误", e);
}
log.info("推送收入到EKP结束");
}
public void asynchronousEkpIncomeAssoT(TIncome income) {
log.info("推送收入到EKP-线程开始");
try {
String sendBack = this.getSendBack(income);
income.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
income.setSendStatus(CommonConstants.ONE_STRING);
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
incomeMapper.updateById(income);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(sendBack);
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.FOUR_STRING);
error.setCreateUserName("收入表推送");
error.setLinkId(income.getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("推送收入到EKP错误", e);
}
log.info("推送收入到EKP结束");
}
public void asynchronousEkpForecastFundAsso(List<TForecastLibrary> unPushInfo,
Map<String, TSettleDomainSelectVo> selectVoMap) {
initEkpForecastFund(unPushInfo, selectVoMap);
......
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