Merge branch 'feature/acctV2' into develop
This commit is contained in:
commit
fa5f8b7da0
|
|
@ -4,8 +4,8 @@ import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
|
|||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.enums.SalaryOnOffEnum;
|
||||
import com.engine.salary.mapper.salaryitem.SalaryItemMapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.PageUtil;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
||||
|
|
@ -92,10 +92,9 @@ public class SalaryItemBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SalaryItemMapper mapper = sqlSession.getMapper(SalaryItemMapper.class);
|
||||
// PageUtil.start(searchParam.getPageNum(), searchParam.getPageSize());
|
||||
return PageHelper.startPage(searchParam.getCurrent(), searchParam.getPageSize()).doSelectPageInfo(mapper::listAll);
|
||||
// List<SalaryItemPO> salaryItemPOS = mapper.listAll();
|
||||
|
||||
PageUtil.start(searchParam.getCurrent(), searchParam.getPageSize());
|
||||
List<SalaryItemPO> salaryItemPOList = mapper.listByParam(searchParam);
|
||||
return new PageInfo<SalaryItemPO>(salaryItemPOList);
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.engine.salary.biz;
|
|||
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobMapper;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
||||
|
|
@ -11,8 +10,13 @@ import java.util.List;
|
|||
|
||||
public class SalarySobBiz {
|
||||
public SalarySobPO getById(Long id) {
|
||||
SalarySobMapper mapper = MapperProxyFactory.getProxy(SalarySobMapper.class);
|
||||
return mapper.getById(id);
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SalarySobMapper mapper = sqlSession.getMapper(SalarySobMapper.class);
|
||||
return mapper.getById(id);
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,17 +27,17 @@ public class ExpressFormula {
|
|||
/**
|
||||
* 用途
|
||||
*/
|
||||
private String use;
|
||||
private String useFor;
|
||||
/**
|
||||
* 引用类型
|
||||
*/
|
||||
private String referenceType;
|
||||
/**
|
||||
* 返回类型
|
||||
* 返回类型,number,string
|
||||
*/
|
||||
private String returnType;
|
||||
/**
|
||||
* 校验类型
|
||||
* 校验类型,number,string
|
||||
*/
|
||||
private String validateType;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.cloudstore.eccom.pc.table.WeaTableType;
|
|||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.SalaryTableOperate;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
|
@ -32,32 +33,39 @@ public class SalaryItemListDTO {
|
|||
private Long id;
|
||||
|
||||
@SalaryTableColumn(text = "名称", width = "10%", column = "name")
|
||||
@TableTitle(title = "名称",dataIndex = "name",key = "name")
|
||||
private String name;
|
||||
|
||||
//薪资档案引用
|
||||
@SalaryTableColumn(text = "薪资档案引用", width = "10%", column = "useInEmployeeSalary")
|
||||
@TableTitle(title = "薪资档案引用",dataIndex = "useInEmployeeSalary",key = "useInEmployeeSalary")
|
||||
private Integer useInEmployeeSalary;
|
||||
|
||||
//默认使用
|
||||
@SalaryTableColumn(text = "默认使用", width = "10%", column = "useDefault")
|
||||
@TableTitle(title = "默认使用",dataIndex = "useDefault",key = "useDefault")
|
||||
private Integer useDefault;
|
||||
|
||||
//进位规则
|
||||
@SalaryTableColumn(text = "进位规则", width = "10%", column = "roundingMode",transmethod = "com.engine.salary.transmethod.TransMethod.roundingMode")
|
||||
@TableTitle(title = "进位规则",dataIndex = "roundingMode",key = "roundingMode")
|
||||
private String roundingMode;
|
||||
|
||||
//保留小数位
|
||||
@SalaryTableColumn(text = "保留小数位", width = "10%", column = "pattern")
|
||||
@TableTitle(title = "保留小数位",dataIndex = "pattern",key = "pattern")
|
||||
private Integer pattern;
|
||||
|
||||
//取值方式
|
||||
@SalaryTableColumn(text = "取值方式", width = "10%", column = "valueType",transmethod = "com.engine.salary.transmethod.TransMethod.datasource")
|
||||
@TableTitle(title = "取值方式",dataIndex = "valueType",key = "valueType")
|
||||
private String valueType;
|
||||
|
||||
/**
|
||||
* @see SalaryDataTypeEnum
|
||||
*/
|
||||
@SalaryTableColumn(text = "字段类型", width = "10%", column = "dataType",transmethod = "com.engine.salary.transmethod.TransMethod.dataType")
|
||||
@TableTitle(title = "字段类型",dataIndex = "dataType",key = "dataType")
|
||||
private String dataType;
|
||||
|
||||
//公式id
|
||||
|
|
@ -67,16 +75,21 @@ public class SalaryItemListDTO {
|
|||
private String formulaContent;
|
||||
|
||||
@SalaryTableColumn(text = "个税申报表对应字段", width = "10%", column = "taxDeclarationColumn")
|
||||
@TableTitle(title = "个税申报表对应字段",dataIndex = "taxDeclarationColumn",key = "taxDeclarationColumn")
|
||||
private String taxDeclarationColumn;
|
||||
|
||||
//备注
|
||||
@SalaryTableColumn(text = "备注", width = "10%", column = "description")
|
||||
@TableTitle(title = "备注",dataIndex = "description",key = "description")
|
||||
private String description;
|
||||
|
||||
|
||||
//是否可以编辑
|
||||
private boolean canEdit;
|
||||
|
||||
//是否可以删除
|
||||
private boolean canDelete;
|
||||
|
||||
@SalaryTableColumn(text = "操作", width = "20%", column = "operate")
|
||||
private String operate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryformula.ExpressFormula;
|
||||
import com.engine.salary.entity.salaryformula.po.FormulaVar;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface FormulaRunService {
|
||||
|
||||
Object run(ExpressFormula expressFormula, List<FormulaVar> formulaVars, DataCollectionEmployee simpleEmployee);
|
||||
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ import com.engine.salary.entity.salaryitem.param.SalaryItemSaveParam;
|
|||
import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.enums.SalarySystemTypeEnum;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryformula.ExpressFormula;
|
||||
import com.engine.salary.entity.salaryformula.po.FormulaVar;
|
||||
import com.engine.salary.service.FormulaRunService;
|
||||
import org.apache.commons.jexl3.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FormulaRunServiceImpl extends Service implements FormulaRunService {
|
||||
@Override
|
||||
public Object run(ExpressFormula expressFormula, List<FormulaVar> formulaVars, DataCollectionEmployee simpleEmployee) {
|
||||
|
||||
|
||||
String formula = expressFormula.getFormula();
|
||||
|
||||
JexlBuilder jexlBuilder = new JexlBuilder();
|
||||
// 创建Jexl表达式引擎
|
||||
JexlEngine jexlEngine = jexlBuilder.create();
|
||||
// 创建Jexl表达式解析器
|
||||
JexlScript jexlScript = jexlEngine.createScript(formula);
|
||||
// 创建Jexl表达式变量上下文
|
||||
JexlContext jexlContext = new MapContext();
|
||||
formulaVars.forEach(v->{
|
||||
jexlContext.set(v.getFieldId(),v.getContent());
|
||||
});
|
||||
// 执行Jexl表达式,得到结果
|
||||
Object execute = jexlScript.execute(jexlContext);
|
||||
return execute;
|
||||
}
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcctCalculateService {
|
||||
|
||||
|
||||
|
||||
private SalaryAcctResultService getSalaryAcctResultService(User user) {
|
||||
return (SalaryAcctResultService) ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -53,43 +53,45 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
|
|||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||
return (SalaryEmployeeService) ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private SalaryArchiveService getSalaryArchiveService(User user) {
|
||||
return (SalaryArchiveService) ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private AddUpSituationService getAddUpSituationService(User user) {
|
||||
return (AddUpSituationService) ServiceUtil.getService(AddUpSituationServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private AddUpDeductionService getAddUpDeductionService(User user) {
|
||||
return (AddUpDeductionService) ServiceUtil.getService(AddUpDeductionServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private OtherDeductionService getOtherDeductionService(User user) {
|
||||
return (OtherDeductionService) ServiceUtil.getService(OtherDeductionServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
// private SIAccountService siAccountService;
|
||||
|
||||
|
||||
|
||||
private AttendQuoteDataService getAttendQuoteDataService(User user) {
|
||||
return (AttendQuoteDataService) ServiceUtil.getService(AttendQuoteDataServiceImpl.class, user);
|
||||
}
|
||||
|
||||
// private ExcelRunService excelRunService;
|
||||
|
||||
|
||||
private FormulaRunService getFormulaRunService(User user) {
|
||||
return (FormulaRunService) ServiceUtil.getService(FormulaRunServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalaryAcctResultTempService getSalaryAcctResultTempService(User user) {
|
||||
return (SalaryAcctResultTempService) ServiceUtil.getService(SalaryAcctResultTempServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalaryAcctProgressService salaryAcctProgressService;
|
||||
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return (SalaryAcctEmployeeService) ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -244,12 +246,17 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
|
|||
private String runExpressFormula(ExpressFormula expressFormula, Map<String, String> formulaVarValueMap, DataCollectionEmployee simpleEmployee) {
|
||||
// 给公式中的变量填入值
|
||||
List<FormulaVar> formulaVars = ExpressFormulaBO.buildFormulaVar4Accounting(expressFormula, formulaVarValueMap);
|
||||
|
||||
String formula = expressFormula.getFormula();
|
||||
|
||||
|
||||
// todo 运行公式
|
||||
// ExcelResult excelResult = excelRunService.run(expressFormula, formulaVars, simpleEmployee);
|
||||
Object run = getFormulaRunService(user).run(expressFormula, formulaVars, simpleEmployee);
|
||||
// if (excelResult.isStatus()) {
|
||||
// return excelResult.getStringData();
|
||||
// }
|
||||
return StringUtils.EMPTY;
|
||||
return run.toString();
|
||||
// return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import com.engine.salary.service.SalaryItemService;
|
|||
import com.engine.salary.service.SalarySobItemService;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.hrm.User;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.engine.salary.entity.salaryitem.param.SysSalaryItemSearchParam;
|
|||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.wrapper.SalaryItemWrapper;
|
||||
import com.engine.salary.wrapper.SysSalaryItemWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
|
|
@ -58,7 +59,7 @@ public class SalaryItemController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listSalaryItem(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryItemSearchParam searchParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryItemSearchParam, Map<String, Object>>().run(getSalaryItemWrapper(user)::listPage, searchParam);
|
||||
return new ResponseResult<SalaryItemSearchParam, PageInfo<SalaryItemListDTO>>().run(getSalaryItemWrapper(user)::listPageV2, searchParam);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -75,7 +76,7 @@ public class SalaryItemController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listCanDeleteSalaryItem(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryItemSearchParam searchParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryItemSearchParam, Map<String, Object>>().run(getSalaryItemWrapper(user)::listPage4CanDelete, searchParam);
|
||||
return new ResponseResult<SalaryItemSearchParam, PageInfo<SalaryItemListDTO>>().run(getSalaryItemWrapper(user)::listPage4CanDelete, searchParam);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ 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;
|
||||
import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO;
|
||||
import com.engine.salary.entity.salaryitem.dto.SalaryItemFormDTO;
|
||||
|
|
@ -20,11 +21,13 @@ import com.engine.salary.service.SalaryFormulaService;
|
|||
import com.engine.salary.service.SalaryItemService;
|
||||
import com.engine.salary.service.SalarySobItemService;
|
||||
import com.engine.salary.service.SysSalaryItemService;
|
||||
import com.engine.salary.service.impl.SalaryFormulaServiceImpl;
|
||||
import com.engine.salary.service.impl.SalaryItemServiceImpl;
|
||||
import com.engine.salary.service.impl.SalarySobItemServiceImpl;
|
||||
import com.engine.salary.service.impl.SysSalaryItemServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.valid.RuntimeTypeEnum;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -51,7 +54,10 @@ public class SalaryItemWrapper extends Service {
|
|||
return (SysSalaryItemService) ServiceUtil.getService(SysSalaryItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryFormulaService salaryFormulaService;
|
||||
private SalaryFormulaService getSalaryFormulaService(User user) {
|
||||
return (SalaryFormulaService) ServiceUtil.getService(SalaryFormulaServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalarySobItemService getSalarySobItemService(User user) {
|
||||
return (SalarySobItemService) ServiceUtil.getService(SalarySobItemServiceImpl.class, user);
|
||||
|
|
@ -97,45 +103,45 @@ public class SalaryItemWrapper extends Service {
|
|||
result.success();
|
||||
return result.getResultMap();
|
||||
|
||||
|
||||
// // 1、查询薪资项目
|
||||
// PageInfo<SalaryItemPO> page = getSalaryItemService(user).listPageByParam(searchParam);
|
||||
// List<SalaryItemPO> salaryItemList = page.getList();
|
||||
//
|
||||
// //最终返回的分页对象
|
||||
// PageInfo<SalaryItemListDTO> salaryItemListDTOPage = new PageInfo<>();
|
||||
//
|
||||
// if (CollectionUtils.isNotEmpty(salaryItemList)) {
|
||||
// //2、填充公式内容
|
||||
// Set<Long> formulaIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getFormulaId);
|
||||
// // todo 查询公式
|
||||
// List<ExpressFormula> expressFormulas = salaryFormulaService.listExpressFormula(formulaIds);
|
||||
// // 转换成薪资项目列表dto
|
||||
// salaryItemListDTOPage.setList(SalaryItemBO.convert2ListDTO(salaryItemList, expressFormulas));
|
||||
//
|
||||
// //3、被引用的薪资项目不能删除
|
||||
// // 查询被账套引用的薪资项目
|
||||
// Set<Long> salaryItemIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getId);
|
||||
// List<SalarySobItemPO> salarySobItemPOS = salarySobItemService.listBySalaryItemIds(salaryItemIds);
|
||||
// }
|
||||
|
||||
// // 构建前端所需的数据格式
|
||||
// WeaTable<SalaryItemListDTO> weaTable = SalaryFormatUtil.<SalaryItemListDTO>getInstance().buildTable(SalaryItemListDTO.class, dtoPage);
|
||||
// // 被薪资账套引用的薪资项目不可删除
|
||||
// if (com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isNotEmpty(salarySobItems)) {
|
||||
// Set<Long> salaryItemIds = SalaryEntityUtil.properties(salarySobItems, SalarySobItemPO::getSalaryItemId);
|
||||
// for (int i = 0; i < page.getRecords().size(); i++) {
|
||||
// SalaryItemPO salaryItemPO = page.getRecords().get(i);
|
||||
// if (salaryItemIds.contains(salaryItemPO.getId())) {
|
||||
// Permission permission = weaTable.getOperatesPermission().get(i).get(1);
|
||||
// permission.setVisible(false);
|
||||
// permission.setDisabled(true);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
public PageInfo<SalaryItemListDTO> listPageV2(SalaryItemSearchParam searchParam) {
|
||||
|
||||
// 1、查询薪资项目
|
||||
PageInfo<SalaryItemPO> page = getSalaryItemService(user).listPageByParam(searchParam);
|
||||
List<SalaryItemPO> salaryItemList = page.getList();
|
||||
|
||||
//最终返回的分页对象
|
||||
PageInfo<SalaryItemListDTO> salaryItemListDTOPage = new PageInfo<>(SalaryItemListDTO.class);
|
||||
salaryItemListDTOPage.setPageSize(page.getPageSize());
|
||||
salaryItemListDTOPage.setPageNum(page.getPageNum());
|
||||
salaryItemListDTOPage.setTotal(page.getTotal());
|
||||
|
||||
// 被薪资账套引用的薪资项目
|
||||
List<SalarySobItemPO> salarySobItems = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(salaryItemList)) {
|
||||
//2、填充公式内容
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getFormulaId);
|
||||
List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
// 转换成薪资项目列表dto
|
||||
List<SalaryItemListDTO> salaryItemListDTOS = SalaryItemBO.convert2ListDTO(salaryItemList, expressFormulas);
|
||||
//3、被引用的薪资项目不能删除
|
||||
Set<Long> salaryItemIds = SalaryEntityUtil.properties(salaryItemList, SalaryItemPO::getId);
|
||||
salarySobItems = getSalarySobItemService(user).listBySalaryItemIds(salaryItemIds);
|
||||
if (CollectionUtils.isNotEmpty(salarySobItems)) {
|
||||
Set<Long> salaryItemIdsUseBySob = SalaryEntityUtil.properties(salarySobItems, SalarySobItemPO::getSalaryItemId);
|
||||
salaryItemListDTOS.forEach(dto->{
|
||||
if (salaryItemIdsUseBySob.contains(dto.getId())){
|
||||
dto.setCanDelete(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
salaryItemListDTOPage.setList(salaryItemListDTOS);
|
||||
}
|
||||
|
||||
return salaryItemListDTOPage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -144,7 +150,7 @@ public class SalaryItemWrapper extends Service {
|
|||
* @param searchParam 查询人员
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> listPage4CanDelete(SalaryItemSearchParam searchParam) {
|
||||
public PageInfo<SalaryItemListDTO> listPage4CanDelete(SalaryItemSearchParam searchParam) {
|
||||
// 查询所有薪资账套中的薪资项目副本
|
||||
List<SalarySobItemPO> salarySobItemPOS = getSalarySobItemService(user).list();
|
||||
// 被引用的薪资项目id
|
||||
|
|
@ -152,8 +158,7 @@ public class SalaryItemWrapper extends Service {
|
|||
// 排除被引用的薪资项目(被引用的薪资项目不可以删除)
|
||||
searchParam.setExcludeIds(salaryItemIds);
|
||||
// 转换成前端所需的数据格式
|
||||
Map<String, Object> map = listPage(searchParam);
|
||||
return map;
|
||||
return listPageV2(searchParam);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +175,7 @@ public class SalaryItemWrapper extends Service {
|
|||
}
|
||||
// 查询公式详情
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId);
|
||||
// todo List<ExpressFormula> expressFormulas = salaryFormulaService.listExpressFormula(formulaIds);
|
||||
// todo List<ExpressFormula> expressFormulas = getSalaryFormulaService(user).listExpressFormula(formulaIds);
|
||||
// 转换成薪资项目列表dto
|
||||
return SalaryItemBO.convert2ListDTO(salaryItemPOS, null);
|
||||
}
|
||||
|
|
@ -211,10 +216,10 @@ public class SalaryItemWrapper extends Service {
|
|||
// // 转换成薪资项目详情dto
|
||||
if (Objects.isNull(salaryItemPO)) {
|
||||
salaryItemFormDTO = SysSalaryItemBO.convert2FormDTO(sysSalaryItemPO);
|
||||
// expressFormula = salaryFormulaService.getExpressFormula(sysSalaryItemPO.getFormulaId());
|
||||
// expressFormula = getSalaryFormulaService(user).getExpressFormula(sysSalaryItemPO.getFormulaId());
|
||||
} else {
|
||||
salaryItemFormDTO = SalaryItemBO.convert2FormDTO(salaryItemPO);
|
||||
// expressFormula = salaryFormulaService.getExpressFormula(salaryItemPO.getFormulaId());
|
||||
// expressFormula = getSalaryFormulaService(user).getExpressFormula(salaryItemPO.getFormulaId());
|
||||
}
|
||||
// salaryItemFormDTO.setFormulaContent(Optional.ofNullable(expressFormula).map(ExpressFormula::getFormula).orElse(""));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue