diff --git a/resource/commons-jexl3-3.2.1.jar b/resource/commons-jexl3-3.2.1.jar new file mode 100644 index 000000000..4a3b9269d Binary files /dev/null and b/resource/commons-jexl3-3.2.1.jar differ diff --git a/src/com/engine/salary/wrapper/SalaryItemWrapper.java b/src/com/engine/salary/wrapper/SalaryItemWrapper.java index 3ee703c3d..177bce13c 100644 --- a/src/com/engine/salary/wrapper/SalaryItemWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryItemWrapper.java @@ -1,9 +1,7 @@ package com.engine.salary.wrapper; -import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.component.SalaryWeaTable; import com.engine.salary.component.WeaFormOption; import com.engine.salary.entity.salaryformula.ExpressFormula; import com.engine.salary.entity.salaryitem.bo.SalaryItemBO; @@ -69,42 +67,6 @@ public class SalaryItemWrapper extends Service { * @param searchParam 查询参数 * @return */ - public Map listPage(SalaryItemSearchParam searchParam) { - - SalaryWeaTable table = new SalaryWeaTable(user, SalaryItemListDTO.class); - - String fields = " t.id" + - " , t.name" + - " , t.code" + - " , t.system_type" + - " , t.sys_salary_item_id" + - " , t.use_default as useDefault" + - " , t.use_in_employee_salary as useInEmployeeSalary" + - " , t.rounding_mode as roundingMode" + - " , t.pattern" + - " , t.value_type as valueType" + - " , t.formula_id" + - " , t.description" + - " , t.can_edit" + - " , t.data_type as dataType" + - " , t.can_delete"; - - String from = "from hrsa_salary_item t"; - - table.setBackfields(fields); - table.setSqlform(from); - table.setSqlwhere(SalaryItemSearchParam.makeSqlWhere(searchParam)); - table.setSqlorderby("t.id DESC"); - table.setSqlprimarykey("t.id"); - table.setSqlisdistinct("false"); - - WeaResultMsg result = new WeaResultMsg(false); - result.putAll(table.makeDataResult()); - result.success(); - return result.getResultMap(); - - } - public PageInfo listPageV2(SalaryItemSearchParam searchParam) { // 1、查询薪资项目 @@ -175,24 +137,11 @@ public class SalaryItemWrapper extends Service { } // 查询公式详情 Set formulaIds = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId); -// todo List expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds); + List expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds); // 转换成薪资项目列表dto - return SalaryItemBO.convert2ListDTO(salaryItemPOS, null); + return SalaryItemBO.convert2ListDTO(salaryItemPOS, expressFormulas); } -// /** -// * 薪资项目列表的高级搜索 -// * -// * @return -// */ -// public WeaSearchCondition getSearchCondition() { -// WeaSearchCondition searchCondition = SalaryFormatUtil.getInstance() -// .buildCondition(SalaryItemSearchConditionDTO.class, new SalaryItemSearchConditionDTO(), "salaryItemCondition"); -// // "其他条件"不要 -// searchCondition.getGroups().remove(1); -// return searchCondition; -// } - /** * 薪资项目详情 * @@ -211,17 +160,16 @@ public class SalaryItemWrapper extends Service { if (Objects.isNull(salaryItemPO) && Objects.isNull(sysSalaryItemPO)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98299, "参数错误,薪资项目不存在或已被删除")); } - //todo 公式详情 -// ExpressFormula expressFormula; + ExpressFormula expressFormula; // // 转换成薪资项目详情dto if (Objects.isNull(salaryItemPO)) { salaryItemFormDTO = SysSalaryItemBO.convert2FormDTO(sysSalaryItemPO); -// expressFormula = getSalaryFormulaService(user).getExpressFormula(sysSalaryItemPO.getFormulaId()); + expressFormula = getSalaryFormulaService(user).getExpressFormula(sysSalaryItemPO.getFormulaId()); } else { salaryItemFormDTO = SalaryItemBO.convert2FormDTO(salaryItemPO); -// expressFormula = getSalaryFormulaService(user).getExpressFormula(salaryItemPO.getFormulaId()); + expressFormula = getSalaryFormulaService(user).getExpressFormula(salaryItemPO.getFormulaId()); } -// salaryItemFormDTO.setFormulaContent(Optional.ofNullable(expressFormula).map(ExpressFormula::getFormula).orElse("")); + salaryItemFormDTO.setFormulaContent(Optional.ofNullable(expressFormula).map(ExpressFormula::getFormula).orElse("")); } return salaryItemFormDTO; }