Merge branch 'release/2.9.5.2309.01' into release/个税一期
This commit is contained in:
commit
2ff2e8d48b
|
|
@ -504,7 +504,12 @@ public class SIAccountBiz extends Service {
|
|||
//TransactionStatus status = transactionManager.getTransaction(new DefaultTransactionDefinition());
|
||||
String billMonth = param.getBillMonth();
|
||||
try {
|
||||
List<InsuranceAccountDetailTempPO> list = getSIAccountDetailTempMapper().getListByEmployeeIdsAndBillMonth(ids, billMonth, param.getPaymentOrganization());
|
||||
// List<InsuranceAccountDetailTempPO> list = getSIAccountDetailTempMapper().getListByEmployeeIdsAndBillMonth(ids, billMonth, param.getPaymentOrganization());
|
||||
List<InsuranceAccountDetailTempPO> list = new ArrayList<>();
|
||||
List<List<Long>> partitionDetailTempInfo = Lists.partition((List<Long>) ids, 100);
|
||||
partitionDetailTempInfo.forEach(part -> list.addAll(
|
||||
getSIAccountDetailTempMapper().getListByEmployeeIdsAndBillMonth(part, billMonth, param.getPaymentOrganization())));
|
||||
|
||||
encryptUtil.decryptList(list, InsuranceAccountDetailTempPO.class);
|
||||
Integer paymentStatus = 0;
|
||||
log.info("核算明细临时表 hrsa_bill_detail_temp待处理数量:{}", list.size());
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ import com.engine.salary.formlua.entity.parameter.DataType;
|
|||
import com.engine.salary.formlua.entity.standard.ExcelResult;
|
||||
import com.engine.salary.service.FormulaRunService;
|
||||
import com.engine.salary.sys.enums.OpenEnum;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.ql.util.express.DefaultContext;
|
||||
import com.ql.util.express.ExpressRunner;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -35,8 +33,6 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
|
|||
|
||||
private static ExpressRunner runner = new ExpressRunner(true, false);
|
||||
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
private final BaseBean baseBean = new BaseBean();
|
||||
|
||||
private final Boolean isLog = "true".equals(baseBean.getPropValue("hrmSalary", "log"));
|
||||
|
|
@ -85,24 +81,25 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
|
|||
String openDecrypt = "";
|
||||
String result = "";
|
||||
try {
|
||||
JsonNode jsonNode = objectMapper.readTree(extendParam);
|
||||
Map<String, String> map = JsonUtil.parseMap(extendParam, String.class);
|
||||
//返回值配置
|
||||
JsonNode sqlReturnKeyNode = jsonNode.get("sqlReturnKey");
|
||||
if (sqlReturnKeyNode != null) {
|
||||
sqlReturnKey = sqlReturnKeyNode.asText().trim();
|
||||
sqlReturnKey = map.getOrDefault("sqlReturnKey", "");
|
||||
if (StringUtils.isNotBlank(sqlReturnKey)) {
|
||||
sqlReturnKey = sqlReturnKey.trim();
|
||||
}
|
||||
//数据源配置
|
||||
JsonNode datasourceNode = jsonNode.get("datasource");
|
||||
if (datasourceNode != null) {
|
||||
JsonNode datasourceIdNode = datasourceNode.get("datasourceId");
|
||||
if (datasourceIdNode != null) {
|
||||
datasourceId = datasourceIdNode.asText();
|
||||
String datasourceJson = map.getOrDefault("datasource", "");
|
||||
if (StringUtils.isNotBlank(datasourceJson)) {
|
||||
Map<String, String> datasourceIdMap = JsonUtil.parseMap(datasourceJson, String.class);
|
||||
String datasourceIdNode = datasourceIdMap.getOrDefault("datasourceId","");
|
||||
if (StringUtils.isNotBlank(datasourceIdNode)) {
|
||||
datasourceId = datasourceIdNode;
|
||||
}
|
||||
}
|
||||
//是否需要解密
|
||||
JsonNode decrypt = jsonNode.get("openDecrypt");
|
||||
if (decrypt != null) {
|
||||
openDecrypt = decrypt.asText().trim();
|
||||
String decrypt = map.get("openDecrypt");
|
||||
if (StringUtils.isNotBlank(decrypt)) {
|
||||
openDecrypt = decrypt.trim();
|
||||
}
|
||||
|
||||
//解析sql
|
||||
|
|
@ -155,23 +152,23 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
|
|||
|
||||
private ExcelResult runFormula(ExpressFormula expressFormula, List<FormulaVar> formulaVars) {
|
||||
|
||||
if (isLog) {
|
||||
log.info("FORMULA ExpressFormula {} {}", expressFormula.getFormula(), expressFormula.getFormulaRunScript());
|
||||
}
|
||||
|
||||
//是否是自定义函数
|
||||
boolean isCustomFunction = true;
|
||||
|
||||
String extendParam = expressFormula.getExtendParam();
|
||||
try {
|
||||
JsonNode jsonNode = objectMapper.readTree(extendParam);
|
||||
Map<String, String> map = JsonUtil.parseMap(extendParam, String.class);
|
||||
//返回值配置
|
||||
JsonNode isCustomFunctionNode = jsonNode.get("isCustomFunction");
|
||||
if (isCustomFunctionNode != null) {
|
||||
isCustomFunction = StringUtils.equals(isCustomFunctionNode.asText().trim(), "1");
|
||||
String isCustomFunctionNode = map.getOrDefault("isCustomFunction", "");
|
||||
if (StringUtils.isNotBlank(isCustomFunctionNode)) {
|
||||
isCustomFunction = StringUtils.equals(isCustomFunctionNode.trim(), "1");
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
log.error("express execute fail, sql extendParam parse fail", e);
|
||||
}
|
||||
|
||||
if (isLog) {
|
||||
log.info("FORMULA ExpressFormula {} {}", expressFormula.getFormula(), expressFormula.getFormulaRunScript());
|
||||
} catch (Exception e) {
|
||||
log.error("express execute fail, extendParam parse fail {}", extendParam, e);
|
||||
}
|
||||
|
||||
String formula = expressFormula.getFormulaRunScript();
|
||||
|
|
|
|||
|
|
@ -18,11 +18,9 @@ import com.engine.salary.mapper.formula.FormulaVarMapper;
|
|||
import com.engine.salary.service.FormulaRunService;
|
||||
import com.engine.salary.service.RemoteExcelService;
|
||||
import com.engine.salary.service.SalaryFormulaService;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.common.collect.Lists;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -47,7 +45,6 @@ import java.util.stream.Collectors;
|
|||
**/
|
||||
@Slf4j
|
||||
public class SalaryFormulaServiceImpl extends Service implements SalaryFormulaService {
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
private FormulaMapper getFormulaMapper() {
|
||||
return MapperProxyFactory.getProxy(FormulaMapper.class);
|
||||
|
|
@ -171,12 +168,9 @@ public class SalaryFormulaServiceImpl extends Service implements SalaryFormulaSe
|
|||
|
||||
String sqlReturnKey = "";
|
||||
try {
|
||||
JsonNode jsonNode = objectMapper.readTree(extendParam);
|
||||
JsonNode sqlReturnKeyNode = jsonNode.get("sqlReturnKey");
|
||||
if (sqlReturnKeyNode != null) {
|
||||
sqlReturnKey = sqlReturnKeyNode.asText();
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
Map<String, String> map = JsonUtil.parseMap(extendParam, String.class);
|
||||
sqlReturnKey = map.getOrDefault("sqlReturnKey", "");
|
||||
} catch (Exception e) {
|
||||
log.error("express execute fail, sql extendParam parse fail", e);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
|
||||
// 控件数据
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("effectiveTime", effectiveTime + "");
|
||||
data.put("effectiveTime", effectiveTime == null ? null : effectiveTime + "");
|
||||
data.put("adjustReason", adjustReason);
|
||||
data.put("description", description);
|
||||
data.put("adjustReasonList", SalaryArchiveItemAdjustReasonEnum.getList());
|
||||
|
|
|
|||
Loading…
Reference in New Issue