Commit 0cc9adcd authored by huyuchen's avatar huyuchen

明细接口改造

parent 1a174203
......@@ -44,11 +44,11 @@ public class EkpSocialInfo {
private String fd_3adfe8c7e4cf7a;
private Date fd_3adfe8cb96c41e;
private String fd_3adfe8cb96c41e;
private Date fd_3adfe8cf632700;
private String fd_3adfe8cf632700;
private Date fd_3adfe8cff746bc;
private String fd_3adfe8cff746bc;
private Double fd_3adfeb4e8064a8;
......
......@@ -112,6 +112,7 @@
round(sum(ifnull(fd_3b35a5b03100c4,0)),2) as personYzc,
round(sum(ifnull(fd_3b35a5b0b04d54,0)),2) as dwYzc
from ekp_social_info
where fd_3adfe8c7e4cf7a = #{card} and DATE_FORMAT(fd_3adfe8cb96c41e,'%Y-%m') = #{month}
where fd_3adfe8c7e4cf7a = #{card} and fd_3adfe8cb96c41e = #{month}
</select>
</mapper>
......@@ -487,7 +487,7 @@ public class DoJointSocialTask {
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
socialParam.setFd_3adfe8cb96c41e(library.getSocialCreateMonth());
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
......@@ -718,8 +718,8 @@ public class DoJointSocialTask {
TSettleDomain settleDomain;
EkpPushFundParam fundParam;
List<EkpPushFundParam> paramList = new ArrayList<>();
for (TPaymentInfo library : unPushInfo) {
try {
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
......@@ -837,67 +837,41 @@ public class DoJointSocialTask {
} else {
fundParam.setFd_3b5cc487bb46fa(CommonConstants.EMPTY_STRING);
}
paramList.add(fundParam);
String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isEmpty(body) || body.length() != 32) {
paramList.add(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);
}
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(paramList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
for (String id : idList) {
paymentInfoMapper.updateBySocialPayment(id);
}
} catch (Exception e) {
} 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(e.getMessage());
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金批量插入失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
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);
}
}
} catch (Exception e) {
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(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
log.info("公积金推送实缴费用到EKP结束");
}
......
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