From 62d124efb138b7540d5d97b76945c44ce52afcee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 15 Mar 2023 22:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E9=83=A8=E4=BA=BA=E5=91=98=E7=BB=88?= =?UTF-8?q?=E6=9E=81=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryarchive/bo/SalaryArchiveBO.java | 5 + .../datacollection/UseEmployeeTypeEnum.java | 54 ++++++++ .../archive/SalaryArchiveItemMapper.xml | 126 ++++++------------ .../salaryacct/SalaryAcctEmployeeMapper.xml | 29 ++-- .../mapper/taxagent/TaxAgentEmpMapper.xml | 3 - .../engine/salary/service/ExtEmpService.java | 1 + .../salary/service/TaxAgentEmpService.java | 3 +- .../salary/service/TaxAgentService.java | 8 +- .../impl/AddUpDeductionServiceImpl.java | 2 - .../service/impl/ExtEmpServiceImpl.java | 2 +- .../impl/SalaryArchiveExcelServiceImpl.java | 8 -- .../impl/SalaryArchiveItemServiceImpl.java | 45 ++++--- .../impl/SalaryArchiveServiceImpl.java | 33 +++-- .../service/impl/TaxAgentEmpServiceImpl.java | 24 ++-- .../service/impl/TaxAgentServiceImpl.java | 25 +--- .../engine/salary/web/SIReportController.java | 4 - .../salary/web/SalaryArchiveController.java | 19 ++- .../wrapper/SalaryArchiveItemWrapper.java | 34 +++-- .../salary/wrapper/SalaryArchiveWrapper.java | 22 +-- 19 files changed, 237 insertions(+), 210 deletions(-) create mode 100644 src/com/engine/salary/enums/datacollection/UseEmployeeTypeEnum.java diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java index 2006e553a..555c2a1cb 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveBO.java @@ -385,4 +385,9 @@ public class SalaryArchiveBO { */ private List changeIds; } + + + public static boolean isNotExtEmp(SalaryArchivePO po) { + return po.getEmployeeType() == null || po.getEmployeeType() == 1; + } } diff --git a/src/com/engine/salary/enums/datacollection/UseEmployeeTypeEnum.java b/src/com/engine/salary/enums/datacollection/UseEmployeeTypeEnum.java new file mode 100644 index 000000000..09e31d614 --- /dev/null +++ b/src/com/engine/salary/enums/datacollection/UseEmployeeTypeEnum.java @@ -0,0 +1,54 @@ +package com.engine.salary.enums.datacollection; + +import com.engine.salary.enums.BaseEnum; + +import java.util.Arrays; +import java.util.Optional; + +/** + * 人员使用枚举 + *

Copyright: Copyright (c) 2022

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ +public enum UseEmployeeTypeEnum implements BaseEnum { + + ORG(0, "组织架构", 109125), + EXT(1, "非系统人员", 119127), + ALl(2, "所有人员", 119127), + ; + + private int value; + + private String defaultLabel; + + private int labelId; + + UseEmployeeTypeEnum(int value, String defaultLabel, int labelId) { + this.value = value; + this.defaultLabel = defaultLabel; + this.labelId = labelId; + } + + @Override + public Integer getValue() { + return value; + } + + @Override + public Integer getLabelId() { + return labelId; + } + + @Override + public String getDefaultLabel() { + return defaultLabel; + } + + public static String getNameByValue(String value) { + Optional optional = Arrays.stream(UseEmployeeTypeEnum.values()).filter(r -> r.getValue().toString().equals(value)).findFirst(); + return optional.isPresent() ? optional.get().name() : ""; + } +} diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml index ba93b03b2..db76c9cb2 100644 --- a/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml +++ b/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml @@ -536,32 +536,60 @@ SELECT FROM hrsa_salary_archive_item t1 - LEFT JOIN hrmresource e ON e.id = t1.employee_id - LEFT JOIN hrmdepartment d ON d.id = e.departmentid LEFT JOIN hrmresource o ON o.id = t1.operator LEFT JOIN hrsa_salary_item t2 ON t2.id = t1.salary_item_id WHERE t1.delete_type = 0 - AND e.status != '7' and (e.accounttype is null or e.accounttype = 0) AND t1.salary_item_id IN #{id} - - - AND - ( - e.lastname like CONCAT('%',#{param.keyword},'%') - OR d.departmentname like CONCAT('%',#{param.keyword},'%') - OR t2.name like CONCAT('%',#{param.keyword},'%') - ) - AND t2.name like CONCAT('%',#{param.adjustItem},'%') - + + AND t1.id IN + + #{id} + + + + + AND t1.employee_id = #{param.employeeId} + + + + AND t1.salary_archive_id = #{param.salaryArchiveId} + + + + AND d.id IN + + #{id} + + + + + AND t1.adjust_reason = #{param.adjustReason} + + + + AND (t1.effective_time BETWEEN #{param.effectiveTime[0]} AND #{param.effectiveTime[1]}) + + + + AND (t1.operate_time BETWEEN CONCAT(#{param.operateTime[0]},' 00:00:00') AND + CONCAT(#{param.operateTime[1]},' 23:59:59')) + + + + AND t1.operator IN + + #{id} + + ORDER BY t1.effective_time DESC,t1.id DESC t1.id, t1.employee_id, - e.lastname as username, - e.status AS employeeStatus, - d.departmentname AS departmentName, t1.effective_time, t1.adjust_reason, t2.name AS adjust_item, diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml index f399e37a6..d7f6e92c0 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml @@ -14,6 +14,7 @@ + @@ -44,13 +46,13 @@ . id , emp1.salary_acct_record_id, emp1.salary_sob_id, emp1.employee_id, emp1.tax_agent_id, emp1.salary_month, - emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key + emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key,emp1.employee_type INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key) + creator, create_time, update_time, delete_type, tenant_key,employee_type) VALUES ( @@ -63,14 +65,15 @@ #{emp.createTime}, #{emp.updateTime}, #{emp.deleteType}, - #{emp.tenantKey} + #{emp.tenantKey}, + #{emp.employeeType} ) INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key) + creator, create_time, update_time, delete_type, tenant_key,employee_type) select @@ -83,7 +86,8 @@ #{emp.createTime,jdbcType=DATE}, #{emp.updateTime,jdbcType=DATE}, #{emp.deleteType,jdbcType=INTEGER}, - #{emp.tenantKey,jdbcType=VARCHAR} + #{emp.tenantKey,jdbcType=VARCHAR}, + #{emp.employeeType,jdbcType=INTEGER} from dual @@ -91,7 +95,7 @@ INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key) + creator, create_time, update_time, delete_type, tenant_key,employee_type) VALUES ( #{emp.salaryAcctRecordId}, @@ -103,7 +107,8 @@ #{emp.createTime}, #{emp.updateTime}, #{emp.deleteType}, - #{emp.tenantKey} + #{emp.tenantKey}, + #{emp.employeeType} ) @@ -151,13 +156,13 @@ SELECT DISTINCT emp1.id, emp1.salary_acct_record_id, emp1.salary_sob_id, emp1.employee_id, emp1.tax_agent_id, emp1.salary_month, - emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key + emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key,emp1.employee_type FROM ( SELECT id, salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key + creator, create_time, update_time, delete_type, tenant_key,employee_type FROM hrsa_salary_acct_emp WHERE @@ -228,13 +233,13 @@ SELECT DISTINCT emp1.id, emp1.salary_acct_record_id, emp1.salary_sob_id, emp1.employee_id, emp1.tax_agent_id, emp1.salary_month, - emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key + emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key,emp1.employee_type FROM ( SELECT id, salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key + creator, create_time, update_time, delete_type, tenant_key,employee_type FROM hrsa_salary_acct_emp WHERE diff --git a/src/com/engine/salary/mapper/taxagent/TaxAgentEmpMapper.xml b/src/com/engine/salary/mapper/taxagent/TaxAgentEmpMapper.xml index d418e242d..bae6797bf 100644 --- a/src/com/engine/salary/mapper/taxagent/TaxAgentEmpMapper.xml +++ b/src/com/engine/salary/mapper/taxagent/TaxAgentEmpMapper.xml @@ -82,9 +82,6 @@ AND employee_type = #{employeeType} - - AND (employee_type is null or employee_type = 0) - AND tax_agent_id IN diff --git a/src/com/engine/salary/service/ExtEmpService.java b/src/com/engine/salary/service/ExtEmpService.java index 8aedeeb8d..d6f3b2d7d 100644 --- a/src/com/engine/salary/service/ExtEmpService.java +++ b/src/com/engine/salary/service/ExtEmpService.java @@ -43,5 +43,6 @@ public interface ExtEmpService { Collection getEmployeeByIdsAll(List ids); Collection listAllForReport(); + ExtEmpPO getById(Long id); } \ No newline at end of file diff --git a/src/com/engine/salary/service/TaxAgentEmpService.java b/src/com/engine/salary/service/TaxAgentEmpService.java index 6ea2779e4..06cf297b3 100644 --- a/src/com/engine/salary/service/TaxAgentEmpService.java +++ b/src/com/engine/salary/service/TaxAgentEmpService.java @@ -2,6 +2,7 @@ package com.engine.salary.service; import com.engine.salary.entity.taxagent.param.TaxAgentEmpSaveParam; import com.engine.salary.entity.taxagent.po.TaxAgentEmpPO; +import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import java.util.Collection; import java.util.List; @@ -29,7 +30,7 @@ public interface TaxAgentEmpService{ * @param taxAgentIds * @return */ - List listByTaxAgentIds(List taxAgentIds); + List listByTaxAgentIds(List taxAgentIds, UseEmployeeTypeEnum type); /** * 同步人员到本地关联表 diff --git a/src/com/engine/salary/service/TaxAgentService.java b/src/com/engine/salary/service/TaxAgentService.java index 2890f94b8..3794d51c8 100644 --- a/src/com/engine/salary/service/TaxAgentService.java +++ b/src/com/engine/salary/service/TaxAgentService.java @@ -243,11 +243,5 @@ public interface TaxAgentService { Boolean adminChangeCheck(TaxAgentAdminChangeCheckParam checkParam); - /** - * 获取个税扣缴义务人下的人员范围 - * - * @param taxAgentId - * @return - */ - Collection listEmployeeIdsInTaxAgent(Long taxAgentId); + } diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 2edf4c4ed..197fe9a87 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -662,8 +662,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction List accountedEmployeeData = getAccountedEmployeeData(DateUtil.format(yearMonth, "yyyy-MM")); for (TaxAgentPO taxAgent : taxAgents) { - Collection employeeIds = getTaxAgentService(user) - .listEmployeeIdsInTaxAgent(taxAgent.getId()); List employeePOs = getSpecialAddDeductionService(user) .getSpecialAddDeductionPOByEmployee(null, taxAgent.getId()); diff --git a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java index 0578a9dd4..3499db754 100644 --- a/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java +++ b/src/com/engine/salary/service/impl/ExtEmpServiceImpl.java @@ -157,7 +157,7 @@ public class ExtEmpServiceImpl extends Service implements ExtEmpService { } } } - return getExternalEmployeeMapper().getById(id); + return po; } diff --git a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java index 5260bf10f..53c8fbb48 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java @@ -14,7 +14,6 @@ import com.engine.salary.entity.salaryarchive.param.SalaryArchiveQueryParam; import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO; import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; -import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.param.TaxAgentRangeSaveParam; import com.engine.salary.entity.taxagent.po.TaxAgentPO; @@ -317,19 +316,12 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch long employeeId = user.getUID(); if (getTaxAgentService(user).isNeedAuth(employeeId)) { - List taxAgentEmployees = getTaxAgentService(user).listTaxAgentAndEmployee(employeeId); List taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList()); salaryArchives = salaryArchives.stream().filter(f -> // 作为管理员 taxAgentIdsAsAdmin.contains(f.getTaxAgentId()) - // 作为分管理员 -// || TaxAgentBO.checkTaxAgentAndEmployee(taxAgentEmployees, f.getTaxAgentId(), f.getEmployeeId()) -// || employeeId.equals(f.getModifier()) ).collect(Collectors.toList()); } - Map idNoEmpMap = -// enableHr ? salaryEmployeeService.mapByEmployeeIds(salaryArchives.stream().map(SalaryArchiveListDTO::getEmployeeId).distinct().collect(Collectors.toList()), tenantKey) -// : new HashMap<>(); if (queryParam.getHasData()) { List> listMaps = salaryArchiveService(user) diff --git a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java index d48072db8..080b330fe 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java @@ -11,12 +11,14 @@ import com.engine.salary.entity.salaryarchive.param.*; import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO; import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO; +import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salaryarchive.SalaryArchiveFieldTypeEnum; import com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum; import com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.service.SalaryArchiveItemService; +import com.engine.salary.service.TaxAgentService; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.excel.ExcelUtil; @@ -56,6 +58,10 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi return ServiceUtil.getService(SalaryArchiveItemServiceImpl.class, user); } + private TaxAgentService getTaxAgentService(User user) { + return ServiceUtil.getService(TaxAgentServiceImpl.class, user); + } + /** * 获取未生效 lt * @@ -179,7 +185,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi List salaryArchiveItems = Lists.newArrayList(); if (isNoNeedSalaryItem) { - salaryArchiveItems.addAll(getIneffectiveSalaryItems(saIds, salaryItemIds)); + salaryArchiveItems.addAll(getIneffectiveSalaryItems(saIds, salaryItemIds)); } else { List> partition = Lists.partition((List) saIds, 1000); Collection finalSalaryItemIds = salaryItemIds; @@ -216,31 +222,31 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(115437, "停薪列表禁止操作")); } SalaryArchiveItemPO salaryArchiveItem = null; - if (salaryArchiveItemSaveParam.getSalaryArchiveItemId() != null ) { + if (salaryArchiveItemSaveParam.getSalaryArchiveItemId() != null) { salaryArchiveItem = salaryArchiveItemMapper.getById(salaryArchiveItemSaveParam.getSalaryArchiveItemId()); if (salaryArchiveItem == null || !salaryArchiveItem.getSalaryArchiveId().equals(salaryArchiveId)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100428, "该薪资档案的薪资项目的调整记录不存在")); } if (salaryArchiveItemSaveParam.getSalaryArchiveItems().size() > 1) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(149535, "单个调整不能处理多个薪资项目")); - } else if (!salaryArchiveItems.get(0).getSalaryItemId().equals(salaryArchiveItem.getSalaryItemId())){ - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 149539, "单个调薪的目标项目和调整明细项目id不一致")); + } else if (!salaryArchiveItems.get(0).getSalaryItemId().equals(salaryArchiveItem.getSalaryItemId())) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(149539, "单个调薪的目标项目和调整明细项目id不一致")); } } // 构建更新PO - SalaryArchiveItemPO updateSalaryArchiveItemPO = buildUpdateSalaryArchiveItemPO(salaryArchiveItemSaveParam,salaryArchiveItems,salaryItemIds,salaryArchiveItem); + SalaryArchiveItemPO updateSalaryArchiveItemPO = buildUpdateSalaryArchiveItemPO(salaryArchiveItemSaveParam, salaryArchiveItems, salaryItemIds, salaryArchiveItem); salaryArchiveItemMapper.updateIgnoreNull(updateSalaryArchiveItemPO); } return StringUtils.EMPTY; } /** - * @description 构建薪资档案中调薪的更新PO * @return null + * @description 构建薪资档案中调薪的更新PO * @author Harryxzy * @date 2022/11/14 14:24 */ - private SalaryArchiveItemPO buildUpdateSalaryArchiveItemPO(SalaryArchiveItemSaveParam salaryArchiveItemSaveParam,List salaryArchiveItems,List salaryItemIds,SalaryArchiveItemPO salaryArchiveItem) { + private SalaryArchiveItemPO buildUpdateSalaryArchiveItemPO(SalaryArchiveItemSaveParam salaryArchiveItemSaveParam, List salaryArchiveItems, List salaryItemIds, SalaryArchiveItemPO salaryArchiveItem) { // 获取所有可被引用的薪资项目 List salaryItems = getSalaryArchiveItemService(user).getCanAdjustSalaryItems(); // 获取生效+未生效的数据 @@ -267,8 +273,8 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi } // 修改了生效日期 - if(!salaryArchiveItemSaveParam.getEffectiveTime().equals(salaryArchiveItem.getEffectiveTime())){ - boolean isEffectiveTimeRepeat = list.stream().anyMatch(it -> it.getEffectiveTime().equals(saveEffectiveTime)); + if (!salaryArchiveItemSaveParam.getEffectiveTime().equals(salaryArchiveItem.getEffectiveTime())) { + boolean isEffectiveTimeRepeat = list.stream().anyMatch(it -> it.getEffectiveTime().equals(saveEffectiveTime)); if (isEffectiveTimeRepeat) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(153539, "已经存在该生效日期的调整记录,请修改生效日期")); } @@ -276,9 +282,9 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi // 1.检验是否可以调整 // if (effectiveSalaryItem != null) { - // 当前已经生效的时间 + // 当前已经生效的时间 // Date effectiveTime = effectiveSalaryItem.getEffectiveTime(); - // 1.1 如果保存的生效日期早于<当前已生效 + // 1.1 如果保存的生效日期早于<当前已生效 // if (saveEffectiveTime.before(effectiveTime)) { // if(salaryArchiveItemSaveParam.getCanOperator() == Boolean.TRUE){ // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100429, "生效日期不可早于当前已生效的调整日期")); @@ -545,9 +551,9 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98299, "参数错误,薪资项目不存在或已被删除")); } // if (salaryArchiveItem.getEffectiveTime().after(new Date())) { - salaryArchiveItem.setDeleteType(1); - // 删除未生效数据 - salaryArchiveItemMapper.updateById(salaryArchiveItem); + salaryArchiveItem.setDeleteType(1); + // 删除未生效数据 + salaryArchiveItemMapper.updateById(salaryArchiveItem); // } else { // throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98299, "该薪资项目已生效不可删除")); // } @@ -561,7 +567,16 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi */ @Override public List getCanAdjustSalaryItems() { - return salaryItemMapper.getCanAdjustSalaryItems(); + Collection taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin((long) user.getUID()); + List taxAgentIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId, Collectors.toList()); + + List canAdjustSalaryItems = salaryItemMapper.getCanAdjustSalaryItems(); + canAdjustSalaryItems = canAdjustSalaryItems.stream() + .filter(item -> item.getSharedType() == null + || 0 == item.getSharedType() + || (StringUtils.isNotBlank(item.getTaxAgentIds()) && SalaryEntityUtil.judgeIntersection(taxAgentIds, Arrays.stream(item.getTaxAgentIds().split(",")).map(Long::valueOf).collect(Collectors.toList())))) + .collect(Collectors.toList()); + return canAdjustSalaryItems; } diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index a016c3f48..65a0d5a8a 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -925,14 +925,6 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe public Map queryTabTotal() { long currentEmployeeId = user.getUID(); -// // 1.历史数据处理 -// handleHistory(currentEmployeeId); -// // 2.待停薪自动处理 -// handleSuspendData(currentEmployeeId); -// // 3.增量数据处理 -// handleChangeData(currentEmployeeId); - - // tab页签数量 Map result = new HashMap<>(); @@ -941,7 +933,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe //获取管理的人员范围 List taxAgentEmployeeDTOS = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); Map> taxAgentEmployeesMap = SalaryEntityUtil.convert2Map(taxAgentEmployeeDTOS, TaxAgentManageRangeEmployeeDTO::getTaxAgentId, TaxAgentManageRangeEmployeeDTO::getEmployeeList); - List list = null; + List list = new ArrayList<>(); if (needAuth) { // 获取作为管理员的所有个税扣缴义务人列表 Collection taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin(currentEmployeeId); @@ -966,17 +958,23 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe long fixedTotal = 0L; long suspendTotal = 0L; long stopTotal = 0L; + long extTotal = 0L; for (SalaryArchivePO sa : list) { - if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.PENDING.getValue())) { - pendingTotal += 1; - } else if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.FIXED.getValue()) || sa.getRunStatus().equals(SalaryArchiveStatusEnum.SUSPEND.getValue())) { - fixedTotal += 1; - if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.SUSPEND.getValue())) { - suspendTotal += 1; + Integer employeeType = sa.getEmployeeType(); + if (employeeType == null || employeeType == 0) { + if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.PENDING.getValue())) { + pendingTotal += 1; + } else if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.FIXED.getValue()) || sa.getRunStatus().equals(SalaryArchiveStatusEnum.SUSPEND.getValue())) { + fixedTotal += 1; + if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.SUSPEND.getValue())) { + suspendTotal += 1; + } + } else if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue()) || sa.getRunStatus().equals(SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue())) { + stopTotal += 1; } - } else if (sa.getRunStatus().equals(SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue()) || sa.getRunStatus().equals(SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue())) { - stopTotal += 1; + } else { + extTotal += 1; } } @@ -984,6 +982,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe result.put(SalaryArchiveListTypeEnum.FIXED.getValue(), fixedTotal); result.put(SalaryArchiveListTypeEnum.SUSPEND.getValue(), suspendTotal); result.put(SalaryArchiveListTypeEnum.STOP.getValue(), stopTotal); + result.put(SalaryArchiveListTypeEnum.EXT.getValue(), extTotal); return result; } diff --git a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java index 84ed0b59d..cc2d23985 100644 --- a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java @@ -8,6 +8,7 @@ import com.engine.salary.entity.taxagent.param.TaxAgentEmpSaveParam; import com.engine.salary.entity.taxagent.po.TaxAgentEmpChangePO; import com.engine.salary.entity.taxagent.po.TaxAgentEmpPO; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; +import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum; import com.engine.salary.enums.taxagent.TaxAgentEmpChangeTypeEnum; import com.engine.salary.mapper.taxagent.TaxAgentEmpMapper; @@ -56,11 +57,20 @@ public class TaxAgentEmpServiceImpl extends Service implements TaxAgentEmpServic } @Override - public List listByTaxAgentIds(List taxAgentIds) { + public List listByTaxAgentIds(List taxAgentIds, UseEmployeeTypeEnum type) { if (CollectionUtils.isEmpty(taxAgentIds)) { return Lists.newArrayList(); } - return getTaxAgentEmpMapper().listSome(TaxAgentEmpPO.builder().taxAgentIds(taxAgentIds).build()); + TaxAgentEmpPO param = TaxAgentEmpPO.builder().taxAgentIds(taxAgentIds).build(); + if (type == UseEmployeeTypeEnum.ORG) { + param.setEmployeeType(DataCollectionEmployeeTypeEnum.ORGANIZATION.getValue()); + } + + if (type == UseEmployeeTypeEnum.EXT) { + param.setEmployeeType(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue()); + } + + return getTaxAgentEmpMapper().listSome(param); } @Override @@ -69,7 +79,7 @@ public class TaxAgentEmpServiceImpl extends Service implements TaxAgentEmpServic return; } List taxAgentIds = taxAgentEmpSaveParamList.stream().map(TaxAgentEmpSaveParam::getTaxAgentId).collect(Collectors.toList()); - List taxAgentEmployeeExistList = this.listByTaxAgentIds(taxAgentIds); + List taxAgentEmployeeExistList = this.listByTaxAgentIds(taxAgentIds, UseEmployeeTypeEnum.ORG); Date now = new Date(); // 关联表 List taxAgentEmployeeAddList = Lists.newArrayList(); @@ -162,7 +172,7 @@ public class TaxAgentEmpServiceImpl extends Service implements TaxAgentEmpServic return; } List taxAgentIds = taxAgentEmpSaveParamList.stream().map(TaxAgentEmpSaveParam::getTaxAgentId).collect(Collectors.toList()); - List taxAgentEmployeeExistList = this.listExtByTaxAgentIds(taxAgentIds); + List taxAgentEmployeeExistList = this.listByTaxAgentIds(taxAgentIds, UseEmployeeTypeEnum.ORG); Date now = new Date(); // 关联表 List taxAgentEmployeeAddList = Lists.newArrayList(); @@ -252,10 +262,4 @@ public class TaxAgentEmpServiceImpl extends Service implements TaxAgentEmpServic } } - private List listExtByTaxAgentIds(List taxAgentIds) { - if (CollectionUtils.isEmpty(taxAgentIds)) { - return Lists.newArrayList(); - } - return getTaxAgentEmpMapper().listSome(TaxAgentEmpPO.builder().employeeType(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue()).taxAgentIds(taxAgentIds).build()); - } } diff --git a/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java index e6319ddc2..e9c4d6749 100644 --- a/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentServiceImpl.java @@ -21,6 +21,7 @@ import com.engine.salary.entity.taxagent.param.TaxAgentAdminChangeCheckParam; import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam; import com.engine.salary.entity.taxagent.param.TaxAgentSaveParam; import com.engine.salary.entity.taxagent.po.*; +import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum; import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum; import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum; import com.engine.salary.enums.taxagent.TaxAgentRoleTypeEnum; @@ -32,7 +33,6 @@ import com.engine.salary.mapper.datacollection.OtherDeductionMapper; import com.engine.salary.mapper.salarysob.SalarySobMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.*; -import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; @@ -137,7 +137,7 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { return convert2TaxAgentEmployeePO(employees); } - public List convert2TaxAgentEmployeePO(List dataCollectionEmployees){ + public List convert2TaxAgentEmployeePO(List dataCollectionEmployees) { List result = new ArrayList<>(); dataCollectionEmployees.stream().forEach(PO -> { TaxAgentEmployeePO taxAgentEmployeePO = new TaxAgentEmployeePO(); @@ -285,7 +285,7 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { List taxAgents = getTaxAgentMapper().listAll(); List taxAgentIds = taxAgents.stream().map(TaxAgentPO::getId).collect(Collectors.toList()); - List taxAgentEmployees = getTaxAgentEmpService(user).listByTaxAgentIds(taxAgentIds); + List taxAgentEmployees = getTaxAgentEmpService(user).listByTaxAgentIds(taxAgentIds, UseEmployeeTypeEnum.ORG); if (CollectionUtils.isEmpty(taxAgentEmployees)) { return Lists.newArrayList(); @@ -602,7 +602,7 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { List taxAgentIds = allTaxAgents.stream().map(TaxAgentPO::getId).collect(Collectors.toList()); List employees = getSalaryEmployeeService(user).listEmployee(); - List allEmployees =convert2TaxAgentEmployeePO(employees); + List allEmployees = convert2TaxAgentEmployeePO(employees); if (employeeStatus != null) { List personnelStatusList; // 查询人员状态 @@ -626,13 +626,6 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { if (CollectionUtils.isNotEmpty(adminTaxAgentIds)) { taxAgentManageRangeEmployeeList.addAll(getTaxAgentEmp(allTaxAgents, adminTaxAgentIds, allEmployees)); } - // 2.根据作为非管理员查找自己作为分管理员, 对应的管理范围人员 - List noAdminTaxAgentIds = allTaxAgents.stream() - .map(TaxAgentPO::getId) - .filter(id -> !adminTaxAgentIds.contains(id)).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(noAdminTaxAgentIds)) { -// taxAgentManageRangeEmployeeList.addAll(getTaxAgentSubAdminEmp(allTaxAgents, noAdminTaxAgentIds, allEmployees)); - } return taxAgentManageRangeEmployeeList; } @@ -720,7 +713,7 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { */ private List getTaxAgentEmp(List allTaxAgents, List taxAgentIds, List allEmployees) { List taxAgentManageRangeEmployeeList = Lists.newArrayList(); - List taxAgentEmps = getTaxAgentEmpService(user).listByTaxAgentIds(taxAgentIds); + List taxAgentEmps = getTaxAgentEmpService(user).listByTaxAgentIds(taxAgentIds, UseEmployeeTypeEnum.ALl); taxAgentEmps = taxAgentEmps.stream().filter(f -> allEmployees.stream().anyMatch(e -> e.getEmployeeId().equals(f.getEmployeeId()))).collect(Collectors.toList()); @@ -772,12 +765,4 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService { return taxAgentEmployeeList; } - @Override - public Collection listEmployeeIdsInTaxAgent(Long taxAgentId) { - List taxAgentEmpPOS = getTaxAgentEmpService(user).listByTaxAgentIds(Collections.singletonList(taxAgentId)); - - return SalaryEntityUtil.properties(taxAgentEmpPOS, TaxAgentEmpPO::getEmployeeId); - } - - } diff --git a/src/com/engine/salary/web/SIReportController.java b/src/com/engine/salary/web/SIReportController.java index f75e130c4..55b602525 100644 --- a/src/com/engine/salary/web/SIReportController.java +++ b/src/com/engine/salary/web/SIReportController.java @@ -11,7 +11,6 @@ import com.engine.salary.wrapper.SalaryArchiveItemWrapper; import io.swagger.v3.oas.annotations.parameters.RequestBody; import weaver.hrm.HrmUserVarify; import weaver.hrm.User; -import weaver.login.AuthenticUtil; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -21,10 +20,8 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; -import java.util.Arrays; import java.util.Map; import java.util.Optional; -import java.util.Vector; /** * 福利报表 @@ -70,7 +67,6 @@ public class SIReportController { String pageSize = Optional.ofNullable(request.getParameter("pageSize")).orElse("10"); salaryItemAdjustRecordQueryParam.setCurrent(Integer.valueOf(current)); salaryItemAdjustRecordQueryParam.setPageSize(Integer.valueOf(pageSize)); - getSalaryArchiveItemWrapper(user).adjustRecordList(salaryItemAdjustRecordQueryParam); return new ResponseResult>(user).run(getSalaryArchiveItemWrapper(user)::adjustRecordList, salaryItemAdjustRecordQueryParam); } } diff --git a/src/com/engine/salary/web/SalaryArchiveController.java b/src/com/engine/salary/web/SalaryArchiveController.java index 226e72c65..e7cf41913 100644 --- a/src/com/engine/salary/web/SalaryArchiveController.java +++ b/src/com/engine/salary/web/SalaryArchiveController.java @@ -225,6 +225,7 @@ public class SalaryArchiveController { /** * 外部人员列表 + * * @param request * @param response * @param queryParam @@ -239,7 +240,6 @@ public class SalaryArchiveController { } - /** * 取消停薪 * @@ -411,9 +411,15 @@ public class SalaryArchiveController { boolean isInit = SalaryArchiveImportTypeEnum.INIT.getValue().equals(queryParam.getImportType()); boolean isSalaryItemAdjust = SalaryArchiveImportTypeEnum.SALARYITEMADJUST.getValue().equals(queryParam.getImportType()); + boolean isExtEmp = queryParam.isExtSalaryArchiveList(); + // 名称 String finalNameI18n = SalaryI18nUtil.getI18nLabel(101601, "薪资档案导入模板-") + SalaryI18nUtil.getI18nLabel(listTypeEnum.getLabelId(), listTypeEnum.getDefaultLabel()); + if (isExtEmp) { + finalNameI18n += "-非系统人员"; + } + if (isFixedList) { // 初始化 if (isInit) { @@ -496,6 +502,12 @@ public class SalaryArchiveController { if (StringUtils.isNotBlank(listType)) { param.setListType(SalaryArchiveListTypeEnum.parseByValue(listType)); } + //1标识外部人员 + String extSalaryArchiveList = request.getParameter("extSalaryArchiveList"); + extSalaryArchiveList ="1"; + if (StringUtils.isNotBlank(extSalaryArchiveList)) { + param.setExtSalaryArchiveList("1".equals(extSalaryArchiveList)); + } return param; } @@ -736,8 +748,8 @@ public class SalaryArchiveController { /** - * @description 编辑前获取薪资项目调整信息 * @return String + * @description 编辑前获取薪资项目调整信息 * @author Harryxzy * @date 2022/11/15 9:25 */ @@ -750,8 +762,8 @@ public class SalaryArchiveController { } /** - * @description 单个档案的薪资项目调整的编辑 * @return String + * @description 单个档案的薪资项目调整的编辑 * @author Harryxzy * @date 2022/11/11 13:50 */ @@ -944,7 +956,6 @@ public class SalaryArchiveController { /******** 个税扣缴义务人调整记录 end ***********************************************************************************************/ - @GET @Path("/handleRepeatData") @Produces(MediaType.APPLICATION_JSON) diff --git a/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java b/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java index 49d527a06..98d9815a5 100644 --- a/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java @@ -2,6 +2,7 @@ package com.engine.salary.wrapper; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveItemFormDTO; import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO; import com.engine.salary.entity.salaryarchive.dto.SingleSalaryItemAdjustRecordListDTO; @@ -15,12 +16,8 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum; import com.engine.salary.exception.SalaryRunTimeException; -import com.engine.salary.service.SalaryArchiveItemService; -import com.engine.salary.service.SalaryItemService; -import com.engine.salary.service.TaxAgentService; -import com.engine.salary.service.impl.SalaryArchiveItemServiceImpl; -import com.engine.salary.service.impl.SalaryItemServiceImpl; -import com.engine.salary.service.impl.TaxAgentServiceImpl; +import com.engine.salary.service.*; +import com.engine.salary.service.impl.*; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.wrapper.proxy.SalaryArchiveItemWrapperProxy; @@ -56,6 +53,15 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt return (TaxAgentService) ServiceUtil.getService(TaxAgentServiceImpl.class, user); } + private SalaryArchiveService getSalaryArchiveService(User user) { + return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user); + } + + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + + /** * 构建薪资项目基础信息表单 * @@ -217,6 +223,8 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt List salaryItemList = getSalaryArchiveItemService(user).getCanAdjustSalaryItems(); List salaryItemIds = salaryItemList.stream().map(SalaryItemPO::getId).collect(Collectors.toList()); + DataCollectionEmployee employee = getSalaryEmployeeService(user).getEmployeeById(queryParam.getEmployeeId()); + List listAll = getSalaryArchiveItemService(user).salaryItemAdjustRecordList(SalaryItemAdjustRecordQueryParam.builder().build(), salaryItemIds); PageInfo list = getSalaryArchiveItemService(user).salaryItemAdjustRecordListPage(queryParam, salaryItemIds); List listResult = list.getList(); @@ -228,7 +236,9 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt Optional optional = listAll.stream().filter(f -> f.getSalaryArchiveId().equals(m.getSalaryArchiveId()) && f.getSalaryItemId().equals(m.getSalaryItemId())).findFirst(); m.setAdjustBefore(optional.isPresent() ? optional.get().getAdjustAfter() : ""); - m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus()))); + m.setUsername(employee.getUsername()); + m.setDepartmentName(employee.getDepartmentName()); + m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(employee.getStatus()))); m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason())); }); @@ -242,7 +252,9 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt * @return */ public PageInfo singleSalaryItemAdjustRecordList(SingleSalaryItemAdjustRecordQueryParam queryParam) { - if (queryParam.getSalaryArchiveId() == null) { + Long salaryArchiveId = queryParam.getSalaryArchiveId(); + + if (salaryArchiveId == null) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100425, "薪资档案id不能为空")); } // 获取所有可被引用的薪资项目 @@ -266,8 +278,8 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt } Optional optional = listAll.stream() .filter(f -> f.getSalaryArchiveId().equals(m.getSalaryArchiveId())) - .filter(f ->f.getSalaryItemId().equals(m.getSalaryItemId())) - .filter(f->f.getEffectiveTime().before(m.getEffectiveTime())) + .filter(f -> f.getSalaryItemId().equals(m.getSalaryItemId())) + .filter(f -> f.getEffectiveTime().before(m.getEffectiveTime())) .findFirst(); m.setAdjustBefore(optional.isPresent() ? optional.get().getAdjustAfter() : ""); @@ -279,7 +291,7 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt }); List salaryItemPageIds = resultList.stream().map(SingleSalaryItemAdjustRecordListDTO::getSalaryItemId).collect(Collectors.toList()); - List effectiveSalaryItems = getSalaryArchiveItemService(user).getEffectiveSalaryItems(queryParam.getSalaryArchiveId(), salaryItemPageIds); + List effectiveSalaryItems = getSalaryArchiveItemService(user).getEffectiveSalaryItems(salaryArchiveId, salaryItemPageIds); // 行记录按钮权限控制 for (int i = 0; i < resultList.size(); i++) { SingleSalaryItemAdjustRecordListDTO singleSalaryItemAdjustRecord = resultList.get(i); diff --git a/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java b/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java index 59c1d2da1..f6e49b738 100644 --- a/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryArchiveWrapper.java @@ -306,6 +306,7 @@ public class SalaryArchiveWrapper extends Service { /** * 外部人员 + * * @param queryParam * @return */ @@ -316,7 +317,6 @@ public class SalaryArchiveWrapper extends Service { } - /** * 获取薪资档案详情表单 * @@ -438,15 +438,17 @@ public class SalaryArchiveWrapper extends Service { * @return */ public XSSFWorkbook downloadTemplate(SalaryArchiveQueryParam queryParam) { - if (queryParam.getListType() == null) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(109712, "列表类型必传")); - } else { - // 定薪列表导入有调薪导入和初始化导入 - if (queryParam.getListType().equals(SalaryArchiveListTypeEnum.FIXED.getValue())) { - Optional optional = Arrays.stream(SalaryArchiveImportTypeEnum.values()) - .filter(e -> StringUtils.isNotEmpty(queryParam.getImportType()) && e.getValue().equals(queryParam.getImportType())).findFirst(); - if (!optional.isPresent()) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100593, "导入类型不正确")); + if(!queryParam.isExtSalaryArchiveList()){ + if (queryParam.getListType() == null) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(109712, "列表类型必传")); + } else { + // 定薪列表导入有调薪导入和初始化导入 + if (queryParam.getListType().equals(SalaryArchiveListTypeEnum.FIXED.getValue())) { + Optional optional = Arrays.stream(SalaryArchiveImportTypeEnum.values()) + .filter(e -> StringUtils.isNotEmpty(queryParam.getImportType()) && e.getValue().equals(queryParam.getImportType())).findFirst(); + if (!optional.isPresent()) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100593, "导入类型不正确")); + } } } }