核算异常信息
This commit is contained in:
parent
404db31695
commit
ff8dcf1769
|
|
@ -37,6 +37,15 @@ public class ExcelResult implements Serializable {
|
|||
private String formulaId;
|
||||
private String dataType;
|
||||
|
||||
public ExcelResult() {
|
||||
}
|
||||
|
||||
public ExcelResult(boolean status, Object data, String errorMsg) {
|
||||
this.status = status;
|
||||
this.data = data;
|
||||
this.errorMsg = errorMsg;
|
||||
}
|
||||
|
||||
public String getExpress() {
|
||||
return express;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
|
|||
return runSQL(expressFormula, formulaVars);
|
||||
}
|
||||
log.error("express execute fail, {} not in ReferenceTypeEnum ", expressFormula.getReferenceType());
|
||||
return new ExcelResult();
|
||||
return new ExcelResult(false, "", "");
|
||||
}
|
||||
|
||||
private ExcelResult runSQL(ExpressFormula expressFormula, List<FormulaVar> formulaVars) {
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
|
|||
Map<Long, SalarySobBackItemPO> salarySobBackItemMap = SalaryEntityUtil.convert2Map(salarySobBackItems, SalarySobBackItemPO::getSalaryItemId);
|
||||
List<SalaryAcctResultTempPO> salaryAcctResultTempPOS = Lists.newArrayList();
|
||||
// 开始核算
|
||||
String noticeMsg = "";
|
||||
StringBuilder noticeMsg = new StringBuilder();
|
||||
for (SalaryAcctEmployeePO salaryAcctEmployeePO : salaryAcctCalculateBO.getSalaryAcctEmployeePOS()) {
|
||||
Long salaryAcctEmployeePOId = salaryAcctEmployeePO.getId();
|
||||
//1 获取当前薪资核算人员的公式中的变量的值
|
||||
|
|
@ -203,8 +203,8 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
|
|||
//公式异常
|
||||
if (!result.isStatus()) {
|
||||
String username = empInfo.stream().filter(emp -> StringUtils.equals("employeeInfo_username", emp.getFieldId())).findFirst().map(CalculateFormulaVarBO.FormulaVarValue::getFieldValue).orElse("");
|
||||
String errorMsg = username + "的" + salaryItemPO.getName() + "核算异常,原因:" + result.getErrorMsg();
|
||||
noticeMsg = noticeMsg + errorMsg + "/n";
|
||||
String errorMsg = String.format("%s的%s核算异常,原因:%s /n ", username, salaryItemPO.getName(), result.getErrorMsg());
|
||||
noticeMsg.append(errorMsg);
|
||||
}
|
||||
} else {
|
||||
// 处理取值类型为“输入/导入”的薪资项目
|
||||
|
|
@ -257,7 +257,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
|
|||
// 更新薪资核算进度
|
||||
getSalaryAcctProgressService(user).getAndAddCalculatedQty(SalaryCacheKey.ACCT_PROGRESS + salaryAcctCalculateBO.getSalaryAcctRecordPO().getId(),
|
||||
salaryAcctCalculateBO.getSalaryAcctEmployeePOS().size(),
|
||||
noticeMsg
|
||||
noticeMsg.toString()
|
||||
);
|
||||
// 记录子线程执行结果
|
||||
salaryAcctCalculateBO.getResults().add(new SalaryAcctCalculateBO.Result(true, StringUtils.EMPTY));
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class SalaryFormulaServiceImpl extends Service implements SalaryFormulaSe
|
|||
}
|
||||
|
||||
private FormulaRunService getFormulaRunService(User user) {
|
||||
return (FormulaRunService) ServiceUtil.getService(FormulaRunServiceImpl.class, user);
|
||||
return ServiceUtil.getService(FormulaRunServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private RemoteExcelService getRemoteExcelService(User user) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue