jar
This commit is contained in:
parent
f2b56fedeb
commit
9971e9a760
Binary file not shown.
|
|
@ -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<String, Object> listPage(SalaryItemSearchParam searchParam) {
|
||||
|
||||
SalaryWeaTable<SalaryItemListDTO> table = new SalaryWeaTable<SalaryItemListDTO>(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<SalaryItemListDTO> listPageV2(SalaryItemSearchParam searchParam) {
|
||||
|
||||
// 1、查询薪资项目
|
||||
|
|
@ -175,24 +137,11 @@ public class SalaryItemWrapper extends Service {
|
|||
}
|
||||
// 查询公式详情
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId);
|
||||
// todo List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
// 转换成薪资项目列表dto
|
||||
return SalaryItemBO.convert2ListDTO(salaryItemPOS, null);
|
||||
return SalaryItemBO.convert2ListDTO(salaryItemPOS, expressFormulas);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 薪资项目列表的高级搜索
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// public WeaSearchCondition getSearchCondition() {
|
||||
// WeaSearchCondition searchCondition = SalaryFormatUtil.<SalaryItemSearchConditionDTO>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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue