2022-04-13 14:18:00 +08:00
|
|
|
package com.engine.salary.wrapper;
|
|
|
|
|
|
2023-11-29 16:48:09 +08:00
|
|
|
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
2022-04-26 16:39:41 +08:00
|
|
|
import com.engine.common.util.ServiceUtil;
|
2022-04-13 14:18:00 +08:00
|
|
|
import com.engine.core.impl.Service;
|
2023-11-29 16:48:09 +08:00
|
|
|
import com.engine.salary.component.WeaTableColumnGroup;
|
2022-04-13 14:18:00 +08:00
|
|
|
import com.engine.salary.entity.salaryacct.dto.SalaryComparisonResultListDTO;
|
|
|
|
|
import com.engine.salary.entity.salaryacct.param.SalaryComparisonResultQueryParam;
|
2023-11-29 16:48:09 +08:00
|
|
|
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
2022-04-13 14:18:00 +08:00
|
|
|
import com.engine.salary.service.SalaryAcctRecordService;
|
|
|
|
|
import com.engine.salary.service.SalaryComparisonResultService;
|
|
|
|
|
import com.engine.salary.service.SalarySobEmpFieldService;
|
|
|
|
|
import com.engine.salary.service.SalarySobItemService;
|
2022-04-26 16:39:41 +08:00
|
|
|
import com.engine.salary.service.impl.SalaryComparisonResultServiceImpl;
|
2023-11-29 16:48:09 +08:00
|
|
|
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
2022-05-26 15:45:37 +08:00
|
|
|
import com.engine.salary.util.page.PageInfo;
|
2024-04-01 20:25:23 +08:00
|
|
|
|
2023-11-29 16:48:09 +08:00
|
|
|
import org.apache.commons.lang3.math.NumberUtils;
|
2022-04-26 16:39:41 +08:00
|
|
|
import weaver.hrm.User;
|
2022-04-13 14:18:00 +08:00
|
|
|
|
2023-11-15 17:12:52 +08:00
|
|
|
import java.util.HashMap;
|
2023-11-29 16:48:09 +08:00
|
|
|
import java.util.List;
|
2022-04-13 14:18:00 +08:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
2023-11-29 16:48:09 +08:00
|
|
|
import static com.engine.salary.sys.constant.SalarySysConstant.SALARY_ACCT_FIXED_COLUMNS;
|
|
|
|
|
|
2022-04-13 14:18:00 +08:00
|
|
|
/**
|
|
|
|
|
* 薪资核算线下对比结果
|
|
|
|
|
* <p>Copyright: Copyright (c) 2022</p>
|
|
|
|
|
* <p>Company: 泛微软件</p>
|
|
|
|
|
*
|
|
|
|
|
* @author qiantao
|
|
|
|
|
* @version 1.0
|
|
|
|
|
**/
|
|
|
|
|
public class SalaryComparisonResultWrapper extends Service {
|
|
|
|
|
|
|
|
|
|
|
2022-04-26 16:39:41 +08:00
|
|
|
private SalaryComparisonResultService getSalaryComparisonResultService(User user) {
|
|
|
|
|
return (SalaryComparisonResultService) ServiceUtil.getService(SalaryComparisonResultServiceImpl.class, user);
|
|
|
|
|
}
|
2023-11-29 16:48:09 +08:00
|
|
|
|
|
|
|
|
private SalarySysConfMapper getSalarySysConfMapper() {
|
|
|
|
|
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
|
|
|
|
}
|
2022-04-13 14:18:00 +08:00
|
|
|
|
|
|
|
|
private SalaryAcctRecordService salaryAcctRecordService;
|
|
|
|
|
|
|
|
|
|
private SalarySobEmpFieldService salarySobEmpFieldService;
|
|
|
|
|
|
|
|
|
|
private SalarySobItemService salarySobItemService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 薪资核算线下对比列表
|
|
|
|
|
*
|
|
|
|
|
* @param queryParam 列表查询条件
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2023-11-15 17:12:52 +08:00
|
|
|
public Map<String, Object> listPage(SalaryComparisonResultQueryParam queryParam) {
|
2023-11-16 16:56:50 +08:00
|
|
|
// 查询薪资核算线下对比列表(不包含隐藏薪资项目)
|
2022-04-26 16:39:41 +08:00
|
|
|
SalaryComparisonResultListDTO salaryComparisonResultListDTO = getSalaryComparisonResultService(user).listPageByParam(queryParam);
|
2022-04-13 14:18:00 +08:00
|
|
|
|
2022-05-26 15:45:37 +08:00
|
|
|
PageInfo<Map<String, Object>> pageInfo = salaryComparisonResultListDTO.getData();
|
2022-04-13 14:18:00 +08:00
|
|
|
|
2023-11-29 16:48:09 +08:00
|
|
|
List<WeaTableColumnGroup> weaTableColumns = salaryComparisonResultListDTO.getWeaTableColumns();
|
|
|
|
|
// 获取固定列头数
|
|
|
|
|
SalarySysConfPO salaryAcctFixedColumns = getSalarySysConfMapper().getOneByCode(SALARY_ACCT_FIXED_COLUMNS);
|
2024-04-01 20:25:23 +08:00
|
|
|
if (salaryAcctFixedColumns != null) {
|
2023-11-29 16:48:09 +08:00
|
|
|
int fixedNum = NumberUtils.isCreatable(salaryAcctFixedColumns.getConfValue()) ? Integer.valueOf(salaryAcctFixedColumns.getConfValue()) : 3;
|
|
|
|
|
if (fixedNum == 0) {
|
|
|
|
|
fixedNum = 3;
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < fixedNum; i++) {
|
|
|
|
|
weaTableColumns.get(i).setFixed("left");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-15 17:12:52 +08:00
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
datas.put("pageInfo", pageInfo);
|
2023-11-29 16:48:09 +08:00
|
|
|
datas.put("columns", weaTableColumns);
|
2023-11-15 17:12:52 +08:00
|
|
|
|
|
|
|
|
return datas;
|
2022-04-13 14:18:00 +08:00
|
|
|
}
|
|
|
|
|
}
|