253 lines
11 KiB
Java
253 lines
11 KiB
Java
|
|
//package com.engine.salary.wrapper;
|
||
|
|
//
|
||
|
|
//import com.engine.core.impl.Service;
|
||
|
|
//import com.weaver.common.distribution.genid.IdGenerator;
|
||
|
|
//import com.weaver.common.threadPool.ThreadPoolUtil;
|
||
|
|
//import com.weaver.common.threadPool.constant.ModulePoolEnum;
|
||
|
|
//import com.weaver.common.threadPool.entity.LocalRunnable;
|
||
|
|
//import com.weaver.datasecurity.interceptor.DSTenantKeyThreadVar;
|
||
|
|
//import com.weaver.framework.util.JsonUtil;
|
||
|
|
//import com.weaver.hrm.salary.common.excel.ExcelExportParam;
|
||
|
|
//import com.weaver.hrm.salary.entity.salaryacct.param.*;
|
||
|
|
//import com.weaver.hrm.salary.service.SalaryAcctExcelService;
|
||
|
|
//import com.weaver.teams.domain.EntityType;
|
||
|
|
//import com.weaver.teams.domain.user.SimpleEmployee;
|
||
|
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
//import org.springframework.stereotype.Component;
|
||
|
|
//
|
||
|
|
//import java.util.Map;
|
||
|
|
//
|
||
|
|
///**
|
||
|
|
// * 薪资核算导出导出
|
||
|
|
// * <p>Copyright: Copyright (c) 2022</p>
|
||
|
|
// * <p>Company: 泛微软件</p>
|
||
|
|
// *
|
||
|
|
// * @author qiantao
|
||
|
|
// * @version 1.0
|
||
|
|
// **/
|
||
|
|
//public class SalaryAcctExcelWrapper extends Service {
|
||
|
|
//
|
||
|
|
// @Autowired
|
||
|
|
// private SalaryAcctExcelService salaryAcctExcelService;
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 薪资核算人员导出
|
||
|
|
// *
|
||
|
|
// * @param queryParam
|
||
|
|
// * @param simpleEmployee
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @param eteamsId
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportSalaryAcctEmployee(SalaryAcctEmployeeQueryParam queryParam,
|
||
|
|
// SimpleEmployee simpleEmployee, String tenantKey, String eteamsId) {
|
||
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
||
|
|
// .setBiz(IdGenerator.generate())
|
||
|
|
// .setModule(EntityType.hrsa.name())
|
||
|
|
// .setFunction("acctEmployeeExportHandler");
|
||
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
||
|
|
// @Override
|
||
|
|
// public void execute() {
|
||
|
|
// try {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||
|
|
// salaryAcctExcelService.exportSalaryAcctEmployee(excelExportParam, queryParam, simpleEmployee, tenantKey, eteamsId);
|
||
|
|
// } finally {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.remove();
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// };
|
||
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportSalaryAcctEmployee", localRunnable);
|
||
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 薪资核算环比减少人员导出
|
||
|
|
// *
|
||
|
|
// * @param queryParam
|
||
|
|
// * @param simpleEmployee
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @param eteamsId
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportReducedEmployee(SalaryAcctEmployeeQueryParam queryParam,
|
||
|
|
// SimpleEmployee simpleEmployee, String tenantKey, String eteamsId) {
|
||
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
||
|
|
// .setBiz(IdGenerator.generate())
|
||
|
|
// .setModule(EntityType.hrsa.name())
|
||
|
|
// .setFunction("reducedEmployeeExportHandler");
|
||
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
||
|
|
// @Override
|
||
|
|
// public void execute() {
|
||
|
|
// try {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||
|
|
// salaryAcctExcelService.exportReducedEmployee(excelExportParam, queryParam, simpleEmployee, tenantKey, eteamsId);
|
||
|
|
// } finally {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.remove();
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// };
|
||
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportReducedEmployee", localRunnable);
|
||
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 薪资核算结果导出
|
||
|
|
// *
|
||
|
|
// * @param queryParam
|
||
|
|
// * @param simpleEmployee
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @param eteamsId
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportSalaryAcctResult(SalaryAcctResultQueryParam queryParam,
|
||
|
|
// SimpleEmployee simpleEmployee, String tenantKey, String eteamsId) {
|
||
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
||
|
|
// .setBiz(IdGenerator.generate())
|
||
|
|
// .setModule(EntityType.hrsa.name())
|
||
|
|
// .setFunction("salaryAcctResultExportHandler");
|
||
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
||
|
|
// @Override
|
||
|
|
// public void execute() {
|
||
|
|
// try {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||
|
|
// salaryAcctExcelService.exportSalaryAcctResult(excelExportParam, queryParam, simpleEmployee, tenantKey, eteamsId);
|
||
|
|
// } finally {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.remove();
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// };
|
||
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportSalaryAcctResult", localRunnable);
|
||
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 下载薪资核算导入模板
|
||
|
|
// *
|
||
|
|
// * @param param
|
||
|
|
// * @param simpleEmployee
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @param eteamsId
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportImportTemplate(SalaryAcctImportTemplateParam param,
|
||
|
|
// SimpleEmployee simpleEmployee, String tenantKey, String eteamsId) {
|
||
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
||
|
|
// .setBiz(IdGenerator.generate())
|
||
|
|
// .setModule(EntityType.hrsa.name())
|
||
|
|
// .setFunction("salaryAcctImportTemplateHandler");
|
||
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
||
|
|
// @Override
|
||
|
|
// public void execute() {
|
||
|
|
// try {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||
|
|
// salaryAcctExcelService.exportImportTemplate(excelExportParam, param, simpleEmployee, tenantKey, eteamsId);
|
||
|
|
// } finally {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.remove();
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// };
|
||
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportImportTemplate", localRunnable);
|
||
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 薪资核算线下对比结果导出
|
||
|
|
// *
|
||
|
|
// * @param queryParam
|
||
|
|
// * @param simpleEmployee
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @param eteamsId
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportComparisonResult(SalaryComparisonResultQueryParam queryParam,
|
||
|
|
// SimpleEmployee simpleEmployee, String tenantKey, String eteamsId) {
|
||
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
||
|
|
// .setBiz(IdGenerator.generate())
|
||
|
|
// .setModule(EntityType.hrsa.name())
|
||
|
|
// .setFunction("comparisonResultHandler");
|
||
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
||
|
|
// @Override
|
||
|
|
// public void execute() {
|
||
|
|
// try {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||
|
|
// salaryAcctExcelService.exportComparisonResult(excelExportParam, queryParam, simpleEmployee, tenantKey, eteamsId);
|
||
|
|
// } finally {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.remove();
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// };
|
||
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportComparisonResult", localRunnable);
|
||
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 薪资核算线下对比结果导入模板导出
|
||
|
|
// *
|
||
|
|
// * @param exportParam
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportComparisonResultTemplate(SalaryComparisonResultExportParam exportParam, String tenantKey) {
|
||
|
|
// return salaryAcctExcelService.exportComparisonResultTemplate(exportParam, tenantKey);
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 薪资核算结果校验异常导出
|
||
|
|
// *
|
||
|
|
// * @param exportParam
|
||
|
|
// * @param simpleEmployee
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @param eteamsId
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportCheckResult(SalaryCheckResultExportParam exportParam,
|
||
|
|
// SimpleEmployee simpleEmployee, String tenantKey, String eteamsId) {
|
||
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
||
|
|
// .setBiz(IdGenerator.generate())
|
||
|
|
// .setModule(EntityType.hrsa.name())
|
||
|
|
// .setFunction("salaryCheckResultHandler");
|
||
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
||
|
|
// @Override
|
||
|
|
// public void execute() {
|
||
|
|
// try {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||
|
|
// salaryAcctExcelService.exportCheckResult(excelExportParam, exportParam, simpleEmployee, tenantKey, eteamsId);
|
||
|
|
// } finally {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.remove();
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// };
|
||
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportCheckResult", localRunnable);
|
||
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// /**
|
||
|
|
// * 薪资核算结果校验异常明细导出
|
||
|
|
// *
|
||
|
|
// * @param checkResultId
|
||
|
|
// * @param simpleEmployee
|
||
|
|
// * @param tenantKey
|
||
|
|
// * @param eteamsId
|
||
|
|
// * @return
|
||
|
|
// */
|
||
|
|
// public Map<String, Object> exportCheckResultDetail(Long checkResultId,
|
||
|
|
// SimpleEmployee simpleEmployee, String tenantKey, String eteamsId) {
|
||
|
|
// ExcelExportParam excelExportParam = new ExcelExportParam()
|
||
|
|
// .setBiz(IdGenerator.generate())
|
||
|
|
// .setModule(EntityType.hrsa.name())
|
||
|
|
// .setFunction("salaryCheckResultDetailHandler");
|
||
|
|
// LocalRunnable localRunnable = new LocalRunnable() {
|
||
|
|
// @Override
|
||
|
|
// public void execute() {
|
||
|
|
// try {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.set(tenantKey);
|
||
|
|
// salaryAcctExcelService.exportCheckResultDetail(excelExportParam, checkResultId, simpleEmployee, tenantKey, eteamsId);
|
||
|
|
// } finally {
|
||
|
|
// DSTenantKeyThreadVar.tenantKey.remove();
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// };
|
||
|
|
// ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "exportCheckResultDetail", localRunnable);
|
||
|
|
// return JsonUtil.parseMap(excelExportParam, Object.class);
|
||
|
|
// }
|
||
|
|
//}
|