Commit 689b4679 authored by huyuchen's avatar huyuchen

明细接口改造

parent 81f8a720
......@@ -31,6 +31,8 @@ import java.util.stream.Collectors;
@Service
public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFundInfo> implements EkpFundInfoService {
private static final Random rand = new Random();
/**
//@Description: 公积金明细推送至ekp
//@Author: huyc
......@@ -268,7 +270,7 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
socialInfo.setFd_3add9edfbc6f7e("未结算");
//单号
socialInfo.setFd_3adfe95c169c48("GJJ" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.DATE_PATTERN)
+ socialParam.getFd_3b0afbaf10df2c().substring(socialParam.getFd_3b0afbaf10df2c().length() -4 ));
+ rand.nextInt(999999));
}
/**
......
......@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.Optional;
import java.util.Random;
/**
* @author huyc
......@@ -24,6 +25,8 @@ import java.util.Optional;
@Service
public class EkpManagerInfoServiceImpl extends ServiceImpl<EkpManagerInfoMapper, EkpManagerInfo> implements EkpManagerInfoService {
private static final Random rand = new Random();
/**
* //@Description: 工资明细推送至ekp
* //@Author: huyc
......@@ -110,6 +113,6 @@ public class EkpManagerInfoServiceImpl extends ServiceImpl<EkpManagerInfoMapper,
managerInfo.setFd_3adfefaaef583e("未收");
//单号
managerInfo.setFd_3adfef7f5d2b52("GLF" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.DATE_PATTERN)
+ incomeParam.getFd_3b13dae9bd70f8().substring(incomeParam.getFd_3b13dae9bd70f8().length() -4 ));
+ rand.nextInt(999999));
}
}
......@@ -30,6 +30,8 @@ import java.util.stream.Collectors;
@Service
public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo> implements EkpSalaryInfoService {
private static final Random rand = new Random();
/**
//@Description: 工资明细推送至ekp
//@Author: huyc
......@@ -245,7 +247,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
salaryInfo.setFd_3adfeec7ccdd1c(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee203f86b2()) ? null : Double.parseDouble(salaryParam.getFd_3adfee203f86b2()));
//单号
salaryInfo.setFd_3adfedfa4410aa("GZ" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.DATE_PATTERN)
+ salaryParam.getFd_3b10af838eab5c().substring(salaryParam.getFd_3b10af838eab5c().length() -4 ));
+ rand.nextInt(999999));
}
/**
......
......@@ -33,6 +33,7 @@ import java.util.stream.Collectors;
@Service
public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements EkpSocialInfoService {
private static final Random rand = new Random();
/**
//@Description: 社保明细推送至ekp
//@Author: huyc
......@@ -346,7 +347,7 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
socialInfo.setFd_3add9eed23894a("未付");
//单号
socialInfo.setFd_3adfe95c169c48("SB" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.DATE_PATTERN)
+ socialParam.getFd_3b0afbe1f94a08().substring(socialParam.getFd_3b0afbe1f94a08().length() -4 ));
+ rand.nextInt(999999));
}
......
......@@ -675,27 +675,29 @@ public class DoJointSocialTask {
socialParam.setYgFlag(CommonConstants.ZERO_STRING);
insertList.add(socialParam);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushSocialInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
String idList = vo.getPaymentIdSum();
if (Common.isNotNull(idList)) {
paymentInfoMapper.updateBySocialPaymentList(idList.substring(0,idList.length()-1));
}
List<TPaymentSocialPush> list = vo.getUnPushInfo();
if (!list.isEmpty()) {
socialPushService.saveBatch(list);
if (!insertList.isEmpty()) {
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushSocialInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
String idList = vo.getPaymentIdSum();
if (Common.isNotNull(idList)) {
paymentInfoMapper.updateBySocialPaymentList(idList.substring(0, idList.length() - 1));
}
List<TPaymentSocialPush> list = vo.getUnPushInfo();
if (!list.isEmpty()) {
socialPushService.saveBatch(list);
}
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
}
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("社保实缴费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......@@ -845,22 +847,24 @@ public class DoJointSocialTask {
}
paramList.add(fundParam);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(paramList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
if (!Common.isEmpty(vo.getPaymentIds())) {
paymentInfoMapper.batchUpdateFundPaymentByList(vo.getPaymentIds());
if (!paramList.isEmpty()) {
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(paramList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
if (!Common.isEmpty(vo.getPaymentIds())) {
paymentInfoMapper.batchUpdateFundPaymentByList(vo.getPaymentIds());
}
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金批量插入失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
}
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING);
error.setCreateUserName("公积金实缴费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金批量插入失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......@@ -1139,21 +1143,23 @@ public class DoJointSocialTask {
socialParam.setFd_3b5cc58d1a70fe(adress.toString());
insertList.add(socialParam);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushSocialInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
forecastLibraryMapper.updatePushStatus(idList);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
if (!insertList.isEmpty()) {
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushSocialInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
forecastLibraryMapper.updatePushStatus(idList);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("社保预估费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
}
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......@@ -1323,21 +1329,23 @@ public class DoJointSocialTask {
fundParam.setFd_3b5cc487bb46fa(adress.toString());
insertList.add(fundParam);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
forecastLibraryMapper.updatePushStatus(idList);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
if (!insertList.isEmpty()) {
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(insertList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
forecastLibraryMapper.updatePushStatus(idList);
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.TWO_STRING);
error.setCreateUserName("公积金预估费用推送");
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.save(error);
}
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......
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