Commit 1f4fc6c8 authored by hongguangwu's avatar hongguangwu

1.5.6-打日志

parent eb04ba3b
......@@ -839,10 +839,17 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
public R<String> backSalaryByApplyNo(String applyNo) {
if (Common.isNotNull(applyNo)){
Date start = new Date();
String pat = "yyyy-MM-dd HH:mm:ss";
String startStr = DateUtil.formatDatePatten(start, pat);
log.error("开始退表,时间:"+startStr+";毫秒数:"+start.getTime());
List<TSalaryStandard> salaryList = this.list(Wrappers.<TSalaryStandard>query().lambda().eq(TSalaryStandard::getApplyNo,applyNo));
if (salaryList != null && !salaryList.isEmpty()) {
TSalaryStandard ss = salaryList.get(0);
if (ss.getStatus() != SalaryConstants.STATUS[6]) {
Date start2 = new Date();
startStr = DateUtil.formatDatePatten(start2, pat);
log.error("2,时间:"+startStr+";毫秒数:"+start2.getTime()+";时间差:"+(start2.getTime()-start.getTime()));
// 通知EKP
EkpSalaryBackParam param = new EkpSalaryBackParam();
param.setFd_3b3c293745e7b4(ss.getDeptName());
......@@ -858,6 +865,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.backStandardToEKP(param);
}
Date start3 = new Date();
startStr = DateUtil.formatDatePatten(start3, pat);
log.error("3,发送EKP返回了,时间:"+startStr+";毫秒数:"+start3.getTime()+";时间差:"+(start3.getTime()-start2.getTime()));
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
// 更新薪资为确认不通过
ss.setStatus(SalaryConstants.STATUS[6]);
......@@ -866,21 +876,39 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
ss.setBackTime(new Date());
ss.setBackEkpId(sendBack);
this.updateById(ss);
Date start4 = new Date();
startStr = DateUtil.formatDatePatten(start4, pat);
log.error("4,更新主表,时间:"+startStr+";毫秒数:"+start4.getTime()+";时间差:"+(start4.getTime()-start3.getTime()));
// 更新报账表
salaryAccountService.backSalaryBySalaryId(ss.getId());
Date start5 = new Date();
startStr = DateUtil.formatDatePatten(start5, pat);
log.error("5,更新报账表,时间:"+startStr+";毫秒数:"+start5.getTime()+";时间差:"+(start5.getTime()-start4.getTime()));
TIncome income = new TIncome();
income.setApplyNo(applyNo);
// 删除收入对应编号的明细
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tincome/inner/deleteIncomeAndDetailByApplyNo", income
, Object.class, SecurityConstants.FROM_IN);
Date start6 = new Date();
startStr = DateUtil.formatDatePatten(start6, pat);
log.error("6,更新社保服务的收入表,时间:"+startStr+";毫秒数:"+start6.getTime()+";时间差:"+(start6.getTime()-start5.getTime()));
// 添加流程进展明细
if (user != null) {
ss.setRemark(" ");
this.saveRecordLog(ss, user, CommonConstants.ZERO_STRING, "从EKP退表");
Date start7 = new Date();
startStr = DateUtil.formatDatePatten(start7, pat);
log.error("7,添加流程进展明细,时间:"+startStr+";毫秒数:"+start7.getTime()+";时间差:"+(start7.getTime()-start6.getTime()));
}
Date start8 = new Date();
startStr = DateUtil.formatDatePatten(start8, pat);
log.error("8,终点站,时间:"+startStr+";毫秒数:"+start8.getTime()+";时间差8-6:"+(start8.getTime()-start6.getTime()));
return R.ok();
} else {
Date start9 = new Date();
startStr = DateUtil.formatDatePatten(start9, pat);
log.error("9,异常了,时间:"+startStr+";毫秒数:"+start9.getTime()+";时间差9-3:"+(start9.getTime()-start3.getTime()));
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
......@@ -891,6 +919,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
Date start10 = new Date();
startStr = DateUtil.formatDatePatten(start10, pat);
log.error("10,异常了,时间:"+startStr+";毫秒数:"+start10.getTime()+";时间差10-9:"+(start10.getTime()-start9.getTime()));
return R.failed("连续两次请求EKP,均未接收到EKP删除成功的返回信息,不予退回");
}
} else {
......
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