2023-08-08 09:21:14 +08:00
|
|
|
|
package com.engine.salary.wrapper;
|
|
|
|
|
|
|
|
|
|
|
|
import com.cloudstore.dev.api.util.Util_DataCache;
|
|
|
|
|
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
|
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
|
|
import com.engine.salary.cache.SalaryCacheKey;
|
|
|
|
|
|
import com.engine.salary.component.SalaryWeaTable;
|
|
|
|
|
|
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
|
|
|
|
|
import com.engine.salary.entity.employeedeclare.bo.EmployeeDeclareList;
|
|
|
|
|
|
import com.engine.salary.entity.employeedeclare.dto.*;
|
|
|
|
|
|
import com.engine.salary.entity.employeedeclare.param.*;
|
|
|
|
|
|
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
|
|
|
|
|
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
|
|
|
|
|
import com.engine.salary.enums.SalaryOnOffEnum;
|
|
|
|
|
|
import com.engine.salary.enums.employeedeclare.*;
|
|
|
|
|
|
import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
|
2023-08-08 19:39:53 +08:00
|
|
|
|
import com.engine.salary.exception.SalaryRunTimeException;
|
2023-08-17 09:22:09 +08:00
|
|
|
|
import com.engine.salary.service.*;
|
|
|
|
|
|
import com.engine.salary.service.impl.*;
|
2023-08-08 09:21:14 +08:00
|
|
|
|
import com.engine.salary.util.SalaryDateUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryEntityUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryEnumUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
|
|
|
|
|
import com.engine.salary.util.page.Column;
|
|
|
|
|
|
import com.engine.salary.util.page.PageInfo;
|
|
|
|
|
|
import com.engine.salary.util.page.SalaryPageUtil;
|
|
|
|
|
|
import com.engine.salary.util.valid.ValidUtil;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
2023-08-17 09:22:09 +08:00
|
|
|
|
import com.google.common.collect.Maps;
|
2023-08-08 09:21:14 +08:00
|
|
|
|
import com.weaver.util.threadPool.ThreadPoolUtil;
|
|
|
|
|
|
import com.weaver.util.threadPool.constant.ModulePoolEnum;
|
|
|
|
|
|
import com.weaver.util.threadPool.entity.LocalRunnable;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @description: 人员报送(人员)
|
|
|
|
|
|
* @author: xiajun
|
|
|
|
|
|
* @modified By: xiajun
|
|
|
|
|
|
* @date: Created in 9/2/22 3:49 PM
|
|
|
|
|
|
* @version:v1.0
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
|
public class EmployeeDeclareWrapper extends Service {
|
|
|
|
|
|
|
|
|
|
|
|
private TaxAgentService getTaxAgentService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private EmployeeDeclareService getEmployeeDeclareService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(EmployeeDeclareServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-17 09:22:09 +08:00
|
|
|
|
private ExtEmpService getExtEmpService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(ExtEmpServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-08 09:21:14 +08:00
|
|
|
|
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-08 19:39:53 +08:00
|
|
|
|
private SalaryCacheService getSalaryCacheService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SalaryCacheServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-08 09:21:14 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送的个税扣缴义务人列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public PageInfo<TaxAgentDeclareListDTO> taxAgentDeclareList(TaxAgentDeclareListQueryParam queryParam) {
|
|
|
|
|
|
// 判断是否是“总管理员”
|
|
|
|
|
|
Boolean isChief = getTaxAgentService(user).isChief(Long.valueOf(user.getUID()));
|
|
|
|
|
|
// 是否开启分权
|
|
|
|
|
|
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
|
|
|
|
|
// 查询个税扣缴义务人
|
|
|
|
|
|
List<TaxAgentPO> taxAgents = Lists.newArrayList();
|
|
|
|
|
|
if (!openDevolution || isChief) {
|
|
|
|
|
|
taxAgents = getTaxAgentService(user).listAll();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
taxAgents = new ArrayList<>(getTaxAgentService(user).listAllTaxAgentsAsAdmin(Long.valueOf(user.getUID())));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotEmpty(queryParam.getTaxAgentName())) {
|
|
|
|
|
|
taxAgents = taxAgents.stream().filter(e -> StringUtils.contains(e.getName(), queryParam.getTaxAgentName())).collect(Collectors.toList());
|
|
|
|
|
|
}
|
|
|
|
|
|
// 分页
|
|
|
|
|
|
List<TaxAgentPO> taxAgentPOS = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), taxAgents);
|
|
|
|
|
|
List<TaxAgentDeclareListDTO> dtoList = Lists.newArrayList();
|
|
|
|
|
|
for (TaxAgentPO taxAgent : taxAgentPOS) {
|
|
|
|
|
|
TaxAgentDeclareListDTO dto = new TaxAgentDeclareListDTO().setId(taxAgent.getId()).setTaxAgentName(taxAgent.getName());
|
|
|
|
|
|
dtoList.add(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), dtoList, TaxAgentDeclareListDTO.class);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-全部人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> list(EmployeeDeclareListQueryParam queryParam) {
|
|
|
|
|
|
ValidUtil.doValidator(queryParam);
|
2023-08-18 09:27:16 +08:00
|
|
|
|
PageInfo<EmployeeDeclareListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), EmployeeDeclareListDTO.class);
|
2023-08-08 09:21:14 +08:00
|
|
|
|
List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareService(user).listByParam(queryParam);
|
2023-08-18 09:27:16 +08:00
|
|
|
|
pageInfo.setTotal(employeeDeclarePOS.size());
|
2023-08-08 09:21:14 +08:00
|
|
|
|
employeeDeclarePOS = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), employeeDeclarePOS);
|
|
|
|
|
|
List<EmployeeDeclareListDTO> convert = getEmployeeDeclareService(user).convert(employeeDeclarePOS);
|
|
|
|
|
|
pageInfo.setList(convert);
|
|
|
|
|
|
|
|
|
|
|
|
// // 判断是否开启分部
|
|
|
|
|
|
// boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey);
|
|
|
|
|
|
// if (!subcompanySupport) {
|
|
|
|
|
|
// weaTable.getColumns().stream()
|
|
|
|
|
|
// .filter(e -> Objects.equals(e.getDataIndex(), "subCompanyName"))
|
|
|
|
|
|
// .findAny()
|
|
|
|
|
|
// .ifPresent(weaTableColumn -> weaTableColumn.setHide(true));
|
|
|
|
|
|
// }
|
|
|
|
|
|
SalaryWeaTable<EmployeeDeclareListDTO> table = new SalaryWeaTable<>(user, EmployeeDeclareListDTO.class);
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
|
datas.put("pageInfo", pageInfo);
|
|
|
|
|
|
datas.put("dataKey", result.getResultMap());
|
|
|
|
|
|
return datas;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-本月新增人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> list4Add(EmployeeDeclareAddListQueryParam queryParam) {
|
|
|
|
|
|
List<EmployeeDeclarePO> addPOList = getEmployeeDeclareService(user).list4AddByParam(queryParam);
|
|
|
|
|
|
PageInfo<EmployeeDeclarePO> addPoPageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), addPOList, EmployeeDeclarePO.class);
|
|
|
|
|
|
List<EmployeeDeclareListDTO> addDTOList = getEmployeeDeclareService(user).convert(addPoPageInfo.getList());
|
|
|
|
|
|
// 分页
|
2023-08-15 20:48:09 +08:00
|
|
|
|
PageInfo<EmployeeDeclareListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), EmployeeDeclareListDTO.class);
|
2023-08-08 09:21:14 +08:00
|
|
|
|
pageInfo.setList(addDTOList);
|
|
|
|
|
|
pageInfo.setTotal(addPOList.size());
|
|
|
|
|
|
|
|
|
|
|
|
// // 判断是否开启分部
|
|
|
|
|
|
// boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey);
|
|
|
|
|
|
// if (!subcompanySupport) {
|
|
|
|
|
|
// weaTable.getColumns().stream()
|
|
|
|
|
|
// .filter(e -> Objects.equals(e.getDataIndex(), "subCompanyName"))
|
|
|
|
|
|
// .findAny()
|
|
|
|
|
|
// .ifPresent(weaTableColumn -> weaTableColumn.setHide(true));
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
SalaryWeaTable<EmployeeDeclareListDTO> table = new SalaryWeaTable<>(user, EmployeeDeclareListDTO.class);
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
|
datas.put("pageInfo", pageInfo);
|
|
|
|
|
|
datas.put("dataKey", result.getResultMap());
|
|
|
|
|
|
return datas;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-本月信息变动人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> list4Update(EmployeeDeclareListQueryParam queryParam) {
|
|
|
|
|
|
PageInfo<EmployeeDeclarePO> poPageInfo = getEmployeeDeclareService(user).listPage4UpdateByParam(queryParam);
|
|
|
|
|
|
List<EmployeeDeclareListDTO> dtoList = getEmployeeDeclareService(user).convert(poPageInfo.getList());
|
|
|
|
|
|
PageInfo<EmployeeDeclareListDTO> dtoPageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), dtoList, EmployeeDeclareListDTO.class);
|
|
|
|
|
|
dtoPageInfo.setTotal(poPageInfo.getTotal());
|
|
|
|
|
|
// 查询上个月报送的人员
|
|
|
|
|
|
Set<Long> employeeIds = SalaryEntityUtil.properties(poPageInfo.getList(), EmployeeDeclarePO::getEmployeeId);
|
|
|
|
|
|
List<EmployeeDeclarePO> preTaxCycleEmployeeDeclares = getEmployeeDeclareService(user).listByTaxCycleAndTaxAgentIdAndEmployeeIds(
|
2023-08-15 20:48:09 +08:00
|
|
|
|
SalaryDateUtil.plusMonths(queryParam.getTaxCycle(), -1), queryParam.getTaxAgentId(), employeeIds);
|
2023-08-08 09:21:14 +08:00
|
|
|
|
// 获取修改了哪些字段
|
|
|
|
|
|
Map<Long, Set<String>> updatedFieldMap = EmployeeDeclareList.getUpdatedField(poPageInfo.getList(), preTaxCycleEmployeeDeclares);
|
2023-08-08 19:39:53 +08:00
|
|
|
|
for (EmployeeDeclareListDTO employeeDeclareListDTO : (List<EmployeeDeclareListDTO>) dtoPageInfo.getList()) {
|
2023-08-08 09:21:14 +08:00
|
|
|
|
Set<String> updatedDataIndexSet = updatedFieldMap.get(employeeDeclareListDTO);
|
|
|
|
|
|
employeeDeclareListDTO.setUpdatedDataIndexSet(updatedDataIndexSet);
|
|
|
|
|
|
}
|
|
|
|
|
|
// // 判断是否开启分部
|
|
|
|
|
|
// boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey);
|
|
|
|
|
|
// if (!subcompanySupport) {
|
|
|
|
|
|
// weaTable.getColumns().stream()
|
|
|
|
|
|
// .filter(e -> Objects.equals(e.getDataIndex(), "subCompanyName"))
|
|
|
|
|
|
// .findAny()
|
|
|
|
|
|
// .ifPresent(weaTableColumn -> weaTableColumn.setHide(true));
|
|
|
|
|
|
// }
|
|
|
|
|
|
SalaryWeaTable<EmployeeDeclareListDTO> table = new SalaryWeaTable<>(user, EmployeeDeclareListDTO.class);
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
|
datas.put("pageInfo", dtoPageInfo);
|
|
|
|
|
|
datas.put("dataKey", result.getResultMap());
|
|
|
|
|
|
return datas;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-本月报送失败人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public PageInfo<EmployeeDeclareFailListDTO> list4Fail(EmployeeDeclareFailListQueryParam queryParam) {
|
|
|
|
|
|
PageInfo<EmployeeDeclarePO> poPageInfo = getEmployeeDeclareService(user).listPage4FailByParam(queryParam);
|
|
|
|
|
|
List<EmployeeDeclareFailListDTO> dtoList = getEmployeeDeclareService(user).convert2FailListDTO(poPageInfo.getList());
|
|
|
|
|
|
PageInfo<EmployeeDeclareFailListDTO> dtoPageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
|
|
|
|
|
dtoList, EmployeeDeclareFailListDTO.class);
|
|
|
|
|
|
// 判断是否开启分部
|
|
|
|
|
|
// boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey);
|
|
|
|
|
|
// if (!subcompanySupport) {
|
|
|
|
|
|
// weaTable.getColumns().stream()
|
|
|
|
|
|
// .filter(e -> Objects.equals(e.getDataIndex(), "subCompanyName"))
|
|
|
|
|
|
// .findAny()
|
|
|
|
|
|
// .ifPresent(weaTableColumn -> weaTableColumn.setHide(true));
|
|
|
|
|
|
// }
|
|
|
|
|
|
return dtoPageInfo;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-获取新建或编辑的表单
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> getForm(Long id) {
|
|
|
|
|
|
// 证件类型默认"居民身份证"
|
|
|
|
|
|
EmployeeDeclarePO employeeDeclare;
|
|
|
|
|
|
EmployeeDeclareFromDTO employeeDeclareFrom = new EmployeeDeclareFromDTO()
|
|
|
|
|
|
.setCardType(CardTypeEnum.RESIDENT_IDENTITY_CARDS)
|
|
|
|
|
|
.setGender(GenderEnum.MALE)
|
|
|
|
|
|
.setEmploymentStatus(EmploymentStatusEnum.NORMAL)
|
|
|
|
|
|
.setEmploymentType(EmploymentTypeEnum.EMPLOYEE)
|
|
|
|
|
|
.setDisability(SalaryOnOffEnum.OFF)
|
|
|
|
|
|
.setLonelyOld(SalaryOnOffEnum.OFF)
|
|
|
|
|
|
.setMartyrDependents(SalaryOnOffEnum.OFF)
|
|
|
|
|
|
.setDeductExpenses(SalaryOnOffEnum.ON);
|
|
|
|
|
|
if (Objects.nonNull(id)) {
|
|
|
|
|
|
employeeDeclare = getEmployeeDeclareService(user).getById(id);
|
|
|
|
|
|
// 查询人员信息
|
2023-08-17 09:22:09 +08:00
|
|
|
|
Map<String, Object> employeeMap = Maps.newHashMap();
|
2023-08-08 09:21:14 +08:00
|
|
|
|
if (Objects.equals(employeeDeclare.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
|
2023-08-17 09:22:09 +08:00
|
|
|
|
DataCollectionEmployee simpleEmployee = getSalaryEmployeeService(user).getEmployeeById(employeeDeclare.getEmployeeId());
|
|
|
|
|
|
employeeMap.put("id", simpleEmployee.getEmployeeId());
|
|
|
|
|
|
employeeMap.put("name", simpleEmployee.getUsername());
|
|
|
|
|
|
employeeMap.put("_entityType", EmployeeTypeEnum.ORGANIZATION);
|
2023-08-08 09:21:14 +08:00
|
|
|
|
} else {
|
2023-08-17 09:22:09 +08:00
|
|
|
|
DataCollectionEmployee extEmployee = getExtEmpService(user).getEmployeeById(employeeDeclare.getEmployeeId());
|
|
|
|
|
|
employeeMap.put("id",extEmployee.getEmployeeId());
|
|
|
|
|
|
employeeMap.put("name", extEmployee.getUsername());
|
|
|
|
|
|
employeeMap.put("_entityType", EmployeeTypeEnum.EXT_EMPLOYEE);
|
2023-08-08 09:21:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
employeeDeclareFrom.setId(employeeDeclare.getId())
|
|
|
|
|
|
.setTaxAgentId(employeeDeclare.getTaxAgentId())
|
2023-08-17 09:22:09 +08:00
|
|
|
|
.setEmployee(Collections.singletonList(employeeMap))
|
2023-08-08 09:21:14 +08:00
|
|
|
|
.setEmployeeName(employeeDeclare.getEmployeeName())
|
|
|
|
|
|
.setJobNum(employeeDeclare.getJobNum())
|
|
|
|
|
|
.setNationality(SalaryI18nUtil.getI18nLabel(94731, "中国"))
|
|
|
|
|
|
.setCardType(CardTypeEnum.RESIDENT_IDENTITY_CARDS)
|
|
|
|
|
|
.setCardNum(employeeDeclare.getCardNum())
|
|
|
|
|
|
.setGender(SalaryEnumUtil.enumMatchByValue(employeeDeclare.getGender(), GenderEnum.class))
|
2023-08-15 20:48:09 +08:00
|
|
|
|
.setBirthday(employeeDeclare.getBirthday())
|
2023-08-08 09:21:14 +08:00
|
|
|
|
.setEmploymentStatus(SalaryEnumUtil.enumMatchByValue(employeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.class))
|
|
|
|
|
|
.setMobile(employeeDeclare.getMobile())
|
|
|
|
|
|
.setEmploymentType(SalaryEnumUtil.enumMatchByValue(employeeDeclare.getEmploymentType(), EmploymentTypeEnum.class))
|
2023-08-15 20:48:09 +08:00
|
|
|
|
.setEmploymentDate(employeeDeclare.getEmploymentDate())
|
|
|
|
|
|
.setDismissDate(employeeDeclare.getDismissDate())
|
2023-08-08 09:21:14 +08:00
|
|
|
|
.setDisability(SalaryEnumUtil.enumMatchByValue(employeeDeclare.getDisability(), SalaryOnOffEnum.class))
|
|
|
|
|
|
.setDisabilityCardNo(employeeDeclare.getDisabilityCardNo())
|
|
|
|
|
|
.setLonelyOld(SalaryEnumUtil.enumMatchByValue(employeeDeclare.getLonelyOld(), SalaryOnOffEnum.class))
|
|
|
|
|
|
.setMartyrDependents(SalaryEnumUtil.enumMatchByValue(employeeDeclare.getMartyrDependents(), SalaryOnOffEnum.class))
|
|
|
|
|
|
.setMartyrDependentsCardNo(employeeDeclare.getMartyrDependentsCardNo())
|
|
|
|
|
|
.setDeductExpenses(SalaryEnumUtil.enumMatchByValue(employeeDeclare.getDeductExpenses(), SalaryOnOffEnum.class));
|
|
|
|
|
|
} else {
|
|
|
|
|
|
employeeDeclare = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
PageInfo<EmployeeDeclareFromDTO> pageInfo = new PageInfo<>(EmployeeDeclareFromDTO.class);
|
|
|
|
|
|
List<Column> columns = pageInfo.getColumns();
|
|
|
|
|
|
|
|
|
|
|
|
List<String> readOnlyColumns = new ArrayList<>();
|
|
|
|
|
|
columns.stream().forEach(column -> {
|
|
|
|
|
|
if (Objects.nonNull(column) && StringUtils.equals(column.getKey(), "employee")) {
|
|
|
|
|
|
readOnlyColumns.add(column.getKey());
|
|
|
|
|
|
}
|
|
|
|
|
|
if (employeeDeclare != null
|
|
|
|
|
|
&& Objects.equals(employeeDeclare.getDeclareStatus(), DeclareStatusEnum.DECLARE_SUCCESS.getValue())
|
|
|
|
|
|
&& (StringUtils.equals(column.getKey(), "employeeName") || StringUtils.equals(column.getKey(), "cardNum"))) {
|
|
|
|
|
|
readOnlyColumns.add(column.getKey());
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
|
datas.put("data", employeeDeclareFrom);
|
|
|
|
|
|
datas.put("columns", columns);
|
|
|
|
|
|
datas.put("readOnlyColumns", readOnlyColumns);
|
|
|
|
|
|
return datas;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 人员报送-批量编辑的表单
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public WeaForm getBatchUpdateForm() {
|
|
|
|
|
|
// WeaForm weaForm = new WeaForm();
|
|
|
|
|
|
// WeaFormItem batchUpdateItem = new WeaFormItem(WeaFormItemType.SELECT);
|
|
|
|
|
|
// List<WeaFormOption> options = new ArrayList<>();
|
|
|
|
|
|
// options.add(new WeaFormOption("employmentStatus", SalaryI18nUtil.getI18nLabel(91075, "状态")));
|
|
|
|
|
|
// options.add(new WeaFormOption("employmentType", SalaryI18nUtil.getI18nLabel(156396, "任职受雇从业类型")));
|
|
|
|
|
|
// options.add(new WeaFormOption("employmentDate", SalaryI18nUtil.getI18nLabel(156409, "任职受雇从业日期")));
|
|
|
|
|
|
// options.add(new WeaFormOption("dismissDate", SalaryI18nUtil.getI18nLabel(95228, "离职日期")));
|
|
|
|
|
|
// options.add(new WeaFormOption("deductExpenses", SalaryI18nUtil.getI18nLabel(156402, "是否扣除减除费用")));
|
|
|
|
|
|
// batchUpdateItem.setOptions(options);
|
|
|
|
|
|
//
|
|
|
|
|
|
// Map<String, Object> otherParams = new HashMap<>();
|
|
|
|
|
|
// WeaFormSalaryItem employmentStatus = new WeaFormSalaryItem(WeaFormItemType.SELECT);
|
|
|
|
|
|
// employmentStatus.setRequired(true);
|
|
|
|
|
|
// employmentStatus.setOptions(enum2Option(EmploymentStatusEnum.class));
|
|
|
|
|
|
// otherParams.put("employmentStatus", employmentStatus);
|
|
|
|
|
|
// WeaFormSalaryItem employmentType = new WeaFormSalaryItem(WeaFormItemType.SELECT);
|
|
|
|
|
|
// employmentType.setRequired(true);
|
|
|
|
|
|
// employmentType.setOptions(enum2Option(EmploymentTypeEnum.class));
|
|
|
|
|
|
// otherParams.put("employmentType", employmentType);
|
|
|
|
|
|
// WeaFormSalaryItem employmentDate = new WeaFormSalaryItem(WeaFormItemType.DATEPICKER);
|
|
|
|
|
|
// employmentDate.setRequired(true);
|
|
|
|
|
|
// otherParams.put("employmentDate", employmentDate);
|
|
|
|
|
|
// WeaFormSalaryItem dismissDate = new WeaFormSalaryItem(WeaFormItemType.DATEPICKER);
|
|
|
|
|
|
// dismissDate.setRequired(true);
|
|
|
|
|
|
// otherParams.put("dismissDate", dismissDate);
|
|
|
|
|
|
// WeaFormSalaryItem deductExpenses = new WeaFormSalaryItem(WeaFormItemType.RADIO);
|
|
|
|
|
|
// deductExpenses.setRequired(true);
|
|
|
|
|
|
// deductExpenses.setOptions(enum2Option(SalaryOnOffEnum.class));
|
|
|
|
|
|
// otherParams.put("deductExpenses", deductExpenses);
|
|
|
|
|
|
// batchUpdateItem.setOtherParams(otherParams);
|
|
|
|
|
|
// weaForm.getItems().put("batchUpdateItem", batchUpdateItem);
|
|
|
|
|
|
//
|
|
|
|
|
|
// List<WeaFormLayout> firstLine = new ArrayList<>();
|
|
|
|
|
|
// firstLine.add(new WeaFormLayout("batchUpdateItem", SalaryI18nUtil.getI18nLabel(145214, "批量编辑项目"), new String[]{"batchUpdateItem"}));
|
|
|
|
|
|
// List<WeaFormLayout> secondLine = new ArrayList<>();
|
|
|
|
|
|
// secondLine.add(new WeaFormLayout("itemValue", SalaryI18nUtil.getI18nLabel(145215, "批量编辑为"), new String[]{"itemValue"}));
|
|
|
|
|
|
// weaForm.getLayout().add(firstLine);
|
|
|
|
|
|
// weaForm.getLayout().add(secondLine);
|
|
|
|
|
|
// return weaForm;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// private <T extends BaseEnum> List<WeaFormOption> enum2Option(Class<T> optionsEnum) {
|
|
|
|
|
|
// BaseEnum[] enumConstants = optionsEnum.getEnumConstants();
|
|
|
|
|
|
// List<WeaFormOption> weaFormOptions = Lists.newArrayListWithExpectedSize(enumConstants.length);
|
|
|
|
|
|
// for (BaseEnum enumConstant : enumConstants) {
|
|
|
|
|
|
// weaFormOptions.add(new WeaFormOption(enumConstant.name(),
|
|
|
|
|
|
// SalaryI18nUtil.getI18nLabel(enumConstant.getLabelId(), enumConstant.getDefaultLabel())));
|
|
|
|
|
|
// }
|
|
|
|
|
|
// return weaFormOptions;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 人员报送-获取高级搜索条件
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public WeaSearchCondition getSearchCondition() {
|
|
|
|
|
|
// EmployeeDeclareConditionDTO employeeDeclareCondition = new EmployeeDeclareConditionDTO();
|
|
|
|
|
|
// WeaSearchCondition searchCondition = SalaryFormatUtil.<EmployeeDeclareConditionDTO>getInstance()
|
|
|
|
|
|
// .buildCondition(EmployeeDeclareConditionDTO.class, employeeDeclareCondition, "employeeDeclareCondition");
|
|
|
|
|
|
// // "其他条件"不要
|
|
|
|
|
|
// searchCondition.getGroups().remove(1);
|
|
|
|
|
|
// searchCondition.getItems().forEach((k, v) -> {
|
|
|
|
|
|
// if (Objects.equals(k, "employmentDate") || Objects.equals(k, "dismissDate")) {
|
|
|
|
|
|
// Map<String, Object> otherParams = new HashMap<>();
|
|
|
|
|
|
// otherParams.put("isRange", "true");
|
|
|
|
|
|
// v.setOtherParams(otherParams);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
|
|
|
// return searchCondition;
|
|
|
|
|
|
// }
|
2023-08-08 19:39:53 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-新增人员/编辑人员保存
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param saveParam
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void save(EmployeeDeclareSaveParam saveParam) {
|
|
|
|
|
|
getEmployeeDeclareService(user).save(saveParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-09 18:35:09 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 批量编辑
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param batchUpdateParam
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void batchUpdate(EmployeeDeclareBatchUpdateParam batchUpdateParam) {
|
|
|
|
|
|
getEmployeeDeclareService(user).batchUpdate(batchUpdateParam);
|
|
|
|
|
|
}
|
2023-08-08 09:21:14 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-删除
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param ids
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void deleteByIds(Collection<Long> ids) {
|
|
|
|
|
|
getEmployeeDeclareService(user).deleteByIds(ids);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-刷新数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param refreshParam
|
|
|
|
|
|
*/
|
|
|
|
|
|
public String refresh(EmployeeDeclareRefreshParam refreshParam) {
|
|
|
|
|
|
EmployeeDeclareRateDTO employeeDeclareRate = new EmployeeDeclareRateDTO()
|
|
|
|
|
|
.setIndex(UUID.randomUUID().toString())
|
|
|
|
|
|
.setStatus(true)
|
|
|
|
|
|
.setFinish(false)
|
|
|
|
|
|
.setMsg("");
|
|
|
|
|
|
|
|
|
|
|
|
Util_DataCache.setObjVal(SalaryCacheKey.EMPLOYEE_DECLARE + "-" + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
|
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
getEmployeeDeclareService(user).refresh(refreshParam, Long.valueOf(user.getUID()));
|
|
|
|
|
|
employeeDeclareRate.setFinish(true);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("刷新数据失败:{}", e.getMessage(), e);
|
|
|
|
|
|
employeeDeclareRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
Util_DataCache.setObjVal(SalaryCacheKey.EMPLOYEE_DECLARE + "-" + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "refresh", localRunnable);
|
|
|
|
|
|
return employeeDeclareRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-获取人员报送的整体情况
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param employeeDeclareParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public EmployeeDeclareInfoDTO getDeclareInfo(EmployeeDeclareParam employeeDeclareParam) {
|
|
|
|
|
|
return getEmployeeDeclareService(user).getDeclareInfo(employeeDeclareParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-08 19:39:53 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-全部报送
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
*/
|
|
|
|
|
|
public String declare(EmployeeDeclareParam param) {
|
|
|
|
|
|
EmployeeDeclareRateDTO employeeDeclareRate = new EmployeeDeclareRateDTO()
|
|
|
|
|
|
.setIndex(UUID.randomUUID().toString())
|
|
|
|
|
|
.setStatus(true)
|
|
|
|
|
|
.setFinish(false)
|
|
|
|
|
|
.setMsg("");
|
|
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.EMPLOYEE_DECLARE + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
2023-08-08 09:21:14 +08:00
|
|
|
|
// if (!cacheResult) {
|
|
|
|
|
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156513, "全部报送失败"));
|
|
|
|
|
|
// }
|
2023-08-08 19:39:53 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
getEmployeeDeclareService(user).declare(param);
|
|
|
|
|
|
employeeDeclareRate.setFinish(true);
|
|
|
|
|
|
} catch (SalaryRunTimeException e) {
|
|
|
|
|
|
employeeDeclareRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("全部报送失败:{}", e.getMessage(), e);
|
|
|
|
|
|
employeeDeclareRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187472, "系统错误,请联系管理员:") + e.getMessage());
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.EMPLOYEE_DECLARE + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "declare", localRunnable);
|
|
|
|
|
|
return employeeDeclareRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 人员报送-获取报送结果反馈
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param param
|
|
|
|
|
|
*/
|
|
|
|
|
|
public String getDeclareFeedback(EmployeeDeclareParam param) {
|
|
|
|
|
|
EmployeeDeclareRateDTO employeeDeclareRate = new EmployeeDeclareRateDTO()
|
|
|
|
|
|
.setIndex(UUID.randomUUID().toString())
|
|
|
|
|
|
.setStatus(true)
|
|
|
|
|
|
.setFinish(false)
|
|
|
|
|
|
.setMsg("");
|
|
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.EMPLOYEE_DECLARE + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
2023-08-08 09:21:14 +08:00
|
|
|
|
// if (!cacheResult) {
|
|
|
|
|
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 156514, "获取报送结果反馈失败"));
|
|
|
|
|
|
// }
|
2023-08-08 19:39:53 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
getEmployeeDeclareService(user).getDeclareFeedback(param, employeeDeclareRate);
|
|
|
|
|
|
employeeDeclareRate.setFinish(true);
|
|
|
|
|
|
} catch (SalaryRunTimeException e) {
|
|
|
|
|
|
employeeDeclareRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("获取报送结果反馈失败:{}", e.getMessage(), e);
|
|
|
|
|
|
employeeDeclareRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187472, "系统错误,请联系管理员:") + e.getMessage());
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.EMPLOYEE_DECLARE + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "getDeclareFeedback", localRunnable);
|
|
|
|
|
|
return employeeDeclareRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-09 18:35:09 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取人员报送相关后端接口是否已经完成
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param index
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public EmployeeDeclareRateDTO getRate(String index) {
|
2023-08-15 20:48:09 +08:00
|
|
|
|
return getSalaryCacheService(user).get(SalaryCacheKey.EMPLOYEE_DECLARE + index);
|
2023-08-09 18:35:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-08 09:21:14 +08:00
|
|
|
|
// /**
|
|
|
|
|
|
// * 人员报送-导出本月全部的人员
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @param queryParam
|
|
|
|
|
|
// * @param simpleEmployee
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public Map<String, Object> export(EmployeeDeclareListQueryParam queryParam, SimpleEmployee simpleEmployee) {
|
|
|
|
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
|
|
|
|
|
// .setBiz(String.valueOf(IdGenerator.generate()))
|
|
|
|
|
|
// .setModule(EntityType.hrmsalary.name())
|
|
|
|
|
|
// .setFunction("exportEmployeeDeclare");
|
|
|
|
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
// public void execute() {
|
|
|
|
|
|
// employeeDeclareExcelService.export(excelExportParam, queryParam, simpleEmployee);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// };
|
|
|
|
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportEmployeeDeclare", localRunnable);
|
|
|
|
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 人员报送-导出本月新增的人员
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @param queryParam
|
|
|
|
|
|
// * @param simpleEmployee
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public Map<String, Object> export4Add(EmployeeDeclareAddListQueryParam queryParam, SimpleEmployee simpleEmployee) {
|
|
|
|
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
|
|
|
|
|
// .setBiz(String.valueOf(IdGenerator.generate()))
|
|
|
|
|
|
// .setModule(EntityType.hrmsalary.name())
|
|
|
|
|
|
// .setFunction("exportEmployeeDeclare4Add");
|
|
|
|
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
// public void execute() {
|
|
|
|
|
|
// employeeDeclareExcelService.export4Add(excelExportParam, queryParam, simpleEmployee);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// };
|
|
|
|
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportEmployeeDeclare4Add", localRunnable);
|
|
|
|
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 人员报送-导出本月信息变动的人员
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @param queryParam
|
|
|
|
|
|
// * @param simpleEmployee
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public Map<String, Object> export4Update(EmployeeDeclareListQueryParam queryParam, SimpleEmployee simpleEmployee) {
|
|
|
|
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
|
|
|
|
|
// .setBiz(String.valueOf(IdGenerator.generate()))
|
|
|
|
|
|
// .setModule(EntityType.hrmsalary.name())
|
|
|
|
|
|
// .setFunction("exportEmployeeDeclare4Update");
|
|
|
|
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
// public void execute() {
|
|
|
|
|
|
// employeeDeclareExcelService.export4Update(excelExportParam, queryParam, simpleEmployee);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// };
|
|
|
|
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportEmployeeDeclare4Update", localRunnable);
|
|
|
|
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 人员报送-导出本月报送失败的人员
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @param queryParam
|
|
|
|
|
|
// * @param simpleEmployee
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public Map<String, Object> export4Fail(EmployeeDeclareFailListQueryParam queryParam, SimpleEmployee simpleEmployee) {
|
|
|
|
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
|
|
|
|
|
// .setBiz(String.valueOf(IdGenerator.generate()))
|
|
|
|
|
|
// .setModule(EntityType.hrmsalary.name())
|
|
|
|
|
|
// .setFunction("exportEmployeeDeclare4Fail");
|
|
|
|
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
// public void execute() {
|
|
|
|
|
|
// employeeDeclareExcelService.export4Fail(excelExportParam, queryParam, simpleEmployee);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// };
|
|
|
|
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportEmployeeDeclare4Fail", localRunnable);
|
|
|
|
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 人员报送-导出导入模板
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @param importParam
|
|
|
|
|
|
// * @param simpleEmployee
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// public Map<String, Object> exportTemplate(EmployeeDeclareImportParam importParam, SimpleEmployee simpleEmployee) {
|
|
|
|
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
|
|
|
|
|
// .setBiz(String.valueOf(IdGenerator.generate()))
|
|
|
|
|
|
// .setModule(EntityType.hrmsalary.name())
|
|
|
|
|
|
// .setFunction("exportEmployeeDeclareTemplate");
|
|
|
|
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
// public void execute() {
|
|
|
|
|
|
// employeeDeclareExcelService.exportTemplate(excelExportParam, importParam, simpleEmployee);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// };
|
|
|
|
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportEmployeeDeclareTemplate", localRunnable);
|
|
|
|
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
|
|
|
|
|
// }
|
|
|
|
|
|
}
|