diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index ca60b7460..dac9c3f20 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -1195,9 +1195,23 @@ public class SIArchivesBiz { } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMap); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMap); - result.put(WelfareTypeEnum.OTHER.getValue(), otherMap); + // map根据key排序 + LinkedHashMap socialMapWithAscKey = socialMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundMapWithAscKey = fundMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherMapWithAscKey = otherMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey); + result.put(WelfareTypeEnum.OTHER.getValue(), otherMapWithAscKey); return result; } finally { sqlSession.close(); diff --git a/src/com/engine/salary/component/WeaFormOption.java b/src/com/engine/salary/component/WeaFormOption.java index 75ec121af..ba01d7c58 100644 --- a/src/com/engine/salary/component/WeaFormOption.java +++ b/src/com/engine/salary/component/WeaFormOption.java @@ -8,16 +8,30 @@ public class WeaFormOption implements Serializable { private String content; private boolean disabled; + private boolean canEdit; + + private boolean canDelete; + public WeaFormOption() { this.disabled = Boolean.FALSE; } public WeaFormOption(String id, String content) { this.disabled = Boolean.FALSE; + this.canEdit = Boolean.TRUE; + this.canDelete = Boolean.TRUE; this.id = id; this.content = content; } + public WeaFormOption(String id, String content, boolean canEdit, boolean canDelete) { + this.disabled = Boolean.FALSE; + this.id = id; + this.content = content; + this.canEdit = canEdit; + this.canDelete = canDelete; + } + public String getId() { return this.id; } @@ -34,6 +48,7 @@ public class WeaFormOption implements Serializable { this.content = content; } + public boolean isDisabled() { return this.disabled; } @@ -41,4 +56,20 @@ public class WeaFormOption implements Serializable { public void setDisabled(boolean disabled) { this.disabled = disabled; } + + public boolean isCanEdit() { + return canEdit; + } + + public void setCanEdit(boolean canEdit) { + this.canEdit = canEdit; + } + + public boolean isCanDelete() { + return canDelete; + } + + public void setCanDelete(boolean canDelete) { + this.canDelete = canDelete; + } } diff --git a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteListDTO.java b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteListDTO.java index a90d70267..f058c3d91 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AttendQuoteListDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AttendQuoteListDTO.java @@ -69,4 +69,14 @@ public class AttendQuoteListDTO { * 薪资核算状态。0:未核算、1:已核算 */ private Integer salaryAccountingStatus; + + /** + * 能否删除 + */ + private Boolean canDelete; + + /** + * 薪资账套id + */ + private Long salarySobId; } diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml index 2398a8325..68424e89e 100644 --- a/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml @@ -245,7 +245,7 @@ id , t1.salary_year_month, - t1.salary_sob_id, + t1.salary_sob_id AS salarySobId, t2.name AS salary_sob_name, t1.source_type, t1.attend_cycle, diff --git a/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml b/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml index 59e4d3e1b..557ff7364 100644 --- a/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml +++ b/src/com/engine/salary/mapper/salaryitem/SalaryItemMapper.xml @@ -462,7 +462,7 @@ WHERE delete_type = 0 - ORDER BY sorted_index DESC, id DESC + ORDER BY sorted_index DESC, create_time DESC diff --git a/src/com/engine/salary/mapper/taxagent/TaxAgentMapper.xml b/src/com/engine/salary/mapper/taxagent/TaxAgentMapper.xml index b68b5c25d..84e424805 100644 --- a/src/com/engine/salary/mapper/taxagent/TaxAgentMapper.xml +++ b/src/com/engine/salary/mapper/taxagent/TaxAgentMapper.xml @@ -45,7 +45,7 @@ FROM hrsa_tax_agent t WHERE delete_type = 0 - ORDER BY sorted_index DESC + ORDER BY sorted_index DESC, create_time DESC diff --git a/src/com/engine/salary/report/entity/dto/SalaryStatisticsDimensionListDTO.java b/src/com/engine/salary/report/entity/dto/SalaryStatisticsDimensionListDTO.java index 7d76e822b..f0fb237af 100644 --- a/src/com/engine/salary/report/entity/dto/SalaryStatisticsDimensionListDTO.java +++ b/src/com/engine/salary/report/entity/dto/SalaryStatisticsDimensionListDTO.java @@ -39,4 +39,10 @@ public class SalaryStatisticsDimensionListDTO { //是否默认") @JsonIgnore private Integer isDefault; + + // 能否删除 + private boolean canDelete; + + // 能否编辑 + private boolean canEdit; } diff --git a/src/com/engine/salary/report/service/SalaryStatisticsDimensionService.java b/src/com/engine/salary/report/service/SalaryStatisticsDimensionService.java index eb1619b08..7f3dd8b38 100644 --- a/src/com/engine/salary/report/service/SalaryStatisticsDimensionService.java +++ b/src/com/engine/salary/report/service/SalaryStatisticsDimensionService.java @@ -65,4 +65,11 @@ public interface SalaryStatisticsDimensionService { * @return */ Map delete(Collection ids); + + /** + * 获取默认薪酬统计维度 + * + * @return + */ + List listAllDefaultDimension(); } diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java index 10008f0b1..865015758 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsDimensionServiceImpl.java @@ -243,4 +243,9 @@ public class SalaryStatisticsDimensionServiceImpl extends Service implements Sal resultMap.put("msg", resultMsg); return resultMap; } + + @Override + public List listAllDefaultDimension() { + return getSalaryStatisticsDimensionMapper().listSome(SalaryStatisticsDimensionPO.builder().isDefault(NumberUtils.INTEGER_ONE).build()); + } } diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java index 38046076e..11619c545 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsDimensionWrapper.java @@ -12,9 +12,12 @@ import com.engine.salary.report.entity.dto.SalaryStatisticsDimensionListDTO; import com.engine.salary.report.entity.param.SalaryStatisticsDimensionQueryParam; import com.engine.salary.report.entity.param.SalaryStatisticsDimensionSaveParam; import com.engine.salary.report.entity.po.SalaryStatisticsDimensionPO; +import com.engine.salary.report.entity.po.SalaryStatisticsReportPO; import com.engine.salary.report.enums.SalaryStatisticsDimensionTypeEnum; import com.engine.salary.report.service.SalaryStatisticsDimensionService; +import com.engine.salary.report.service.SalaryStatisticsReportService; import com.engine.salary.report.service.impl.SalaryStatisticsDimensionServiceImpl; +import com.engine.salary.report.service.impl.SalaryStatisticsReportServiceImpl; import com.engine.salary.service.SalaryItemService; import com.engine.salary.service.impl.SalaryItemServiceImpl; import com.engine.salary.util.JsonUtil; @@ -47,6 +50,14 @@ public class SalaryStatisticsDimensionWrapper extends Service { return ServiceUtil.getService(SalaryItemServiceImpl.class, user); } + private SalaryStatisticsDimensionService getSalaryStatisticsDimensionService(User user) { + return ServiceUtil.getService(SalaryStatisticsDimensionServiceImpl.class, user); + } + + private SalaryStatisticsReportService getSalaryStatisticsReportService(User user) { + return ServiceUtil.getService(SalaryStatisticsReportServiceImpl.class, user); + } + /** * 薪酬统计维度列表 * @@ -57,14 +68,35 @@ public class SalaryStatisticsDimensionWrapper extends Service { PageInfo page = salaryStatisticsDimensionService(user).listPage(queryParam); List list = page.getList(); List dtoList= new ArrayList<>(); + + // 获取默认维度统计 + List defaultSalaryStatisticsDimensions = getSalaryStatisticsDimensionService(user).listAllDefaultDimension(); + List defaultDimensionIds = defaultSalaryStatisticsDimensions.stream().map(SalaryStatisticsDimensionPO::getId).collect(Collectors.toList()); + // 获取有薪资统计报表引用的统计维度 + Set haveUsedDimIds = new HashSet<>(); + List salaryStatisticsReports = getSalaryStatisticsReportService(user).listAll(); + salaryStatisticsReports.stream().forEach(report -> Collections.addAll(haveUsedDimIds, report.getDimension().split(","))); if (CollectionUtils.isNotEmpty(list)) { - dtoList = list.stream().map(m -> SalaryStatisticsDimensionListDTO.builder() - .id(m.getId()) - .dimName(m.getDimName()) - .remark(m.getRemark()) - .dimType(SalaryStatisticsDimensionTypeEnum.getDefaultLabelByValue(m.getDimType())) - .isDefault(m.getIsDefault()) - .build()).collect(Collectors.toList()); + list.stream().forEach(m -> { + SalaryStatisticsDimensionListDTO dto = SalaryStatisticsDimensionListDTO.builder() + .id(m.getId()) + .dimName(m.getDimName()) + .remark(m.getRemark()) + .dimType(SalaryStatisticsDimensionTypeEnum.getDefaultLabelByValue(m.getDimType())) + .isDefault(m.getIsDefault()) + .canEdit(true) + .canDelete(true) + .build(); + if (defaultDimensionIds.contains(dto.getId())){ + // 默认维度不允许修改、删除 + dto.setCanEdit(false); + dto.setCanDelete(false); + }else if(haveUsedDimIds.contains(dto.getId().toString())){ + // 被薪资统计报表引用的不能删除 + dto.setCanDelete(false); + } + dtoList.add(dto); + }); } PageInfo salaryStatisticsDimensionListDTOPageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize()); diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java index e207ea773..32d0e7914 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java @@ -127,6 +127,26 @@ public class SalaryStatisticsReportWrapper extends Service { List salaryStatisticsDimensions = getSalaryStatisticsDimensionService(user).listAll(); List statsDimOptions = salaryStatisticsDimensions.stream().map(sd -> new WeaFormOption(sd.getId().toString(), sd.getDimName())).collect(Collectors.toList()); + + // 获取默认维度统计 + List defaultSalaryStatisticsDimensions = getSalaryStatisticsDimensionService(user).listAllDefaultDimension(); + List defaultDimensionIds = defaultSalaryStatisticsDimensions.stream().map(SalaryStatisticsDimensionPO::getId).collect(Collectors.toList()); + // 获取有薪资统计报表引用的统计维度 + Set haveUsedDimIds = new HashSet<>(); + List salaryStatisticsReports = getSalaryStatisticsReportService(user).listAll(); + salaryStatisticsReports.stream().forEach(report -> Collections.addAll(haveUsedDimIds, report.getDimension().split(","))); + statsDimOptions.stream().forEach(option -> { + if (defaultDimensionIds.contains(Long.valueOf(option.getId()))){ + // 默认维度不允许修改、删除 + option.setCanDelete(false); + option.setCanEdit(false); + }else if(haveUsedDimIds.contains(option.getId())){ + // 被薪资统计报表引用的不能删除 + option.setCanEdit(true); + option.setCanDelete(false); + } + }); + // 1.构建基础信息表单 Map weaForm = new HashMap<>(); weaForm.put("statsDimOptions", statsDimOptions); diff --git a/src/com/engine/salary/service/SalaryAcctRecordService.java b/src/com/engine/salary/service/SalaryAcctRecordService.java index 5e1f16cbf..1ba3419bf 100644 --- a/src/com/engine/salary/service/SalaryAcctRecordService.java +++ b/src/com/engine/salary/service/SalaryAcctRecordService.java @@ -206,5 +206,5 @@ public interface SalaryAcctRecordService { List listBySalaryAcctEmpId(Long salaryAcctEmpId); - + List listSome(SalaryAcctRecordPO po); } diff --git a/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java b/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java index 177cca276..7f4b96a60 100644 --- a/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java +++ b/src/com/engine/salary/service/impl/AttendQuoteServiceImpl.java @@ -29,10 +29,7 @@ import weaver.hrm.User; import java.time.LocalDate; import java.time.YearMonth; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Set; +import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -62,9 +59,13 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic public PageInfo listPage(AttendQuoteQueryParam queryParam) { List declareMonth = queryParam.getSalaryYearMonth(); +// SalaryAcctRecordPO queryRecordParam = new SalaryAcctRecordPO(); if (CollectionUtils.isNotEmpty(declareMonth)) { queryParam.setSalaryYearMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList())); queryParam.setSalaryYearMonthDate(declareMonth.stream().map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList())); +// LocalDateRange salaryMonth = LocalDateRange.builder().fromDate(SalaryDateUtil.dateStrToLocalDate(declareMonth.get(0)+"-01 00:00:00")) +// .endDate(SalaryDateUtil.dateStrToLocalTime(declareMonth.get(1)+"-01 00:00:00")).build(); +// queryRecordParam.setSalaryMonths(salaryMonth); } @@ -77,9 +78,19 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic return new PageInfo<>(AttendQuoteListDTO.class); } queryParam.setSalarySobIds(salarySobIds); +// queryRecordParam.setSalarySobIds(salarySobIds); } + // 获取已经归档的记录 +// List salaryAcctRecordPOS = getSalaryAcctRecordService(user).listSome(queryRecordParam); +// List archivedRecords = salaryAcctRecordPOS.stream().filter(PO -> PO.getStatus() > SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue()) +// .map(PO -> SalaryDateUtil.getFormatYearMonth(PO.getSalaryMonth()) + PO.getSalarySobId()) +// .collect(Collectors.toList()); + + List list = getAttendQuoteMapper().list(queryParam); +// list.stream().forEach(DTO -> DTO.setCanDelete( !archivedRecords.contains( (SalaryDateUtil.getFormatYearMonth(DTO.getSalaryYearMonth()) + DTO.getSalarySobId().toString()) ) )); + return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, AttendQuoteListDTO.class); } @@ -98,6 +109,13 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic if (CollectionUtils.isNotEmpty(accountingAttendQuotes)) { throw new SalaryRunTimeException("已经核算完成的数据不能删除"); } + + List salaryAcctRecordPOS = getSalaryAcctRecordService(user).listSome(SalaryAcctRecordPO.builder().salarySobId(attendQuotes.get(0).getSalarySobId()) + .salaryMonth(attendQuotes.get(0).getSalaryYearMonth()).build()); + Optional haveArchived = salaryAcctRecordPOS.stream().filter(PO -> PO.getStatus() > SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue()).findFirst(); + if(haveArchived.isPresent()){ + throw new SalaryRunTimeException("已经核算完成的数据不能删除"); + } List unAccountingIds = attendQuotes.stream().filter(e -> e.getSalaryAccountingStatus().equals(0)).map(AttendQuoteListDTO::getId).collect(Collectors.toList()); // 1.删除未核算的考勤引用 biz.deleteByIds(unAccountingIds); diff --git a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java index 34a3d99f6..37cbfd652 100644 --- a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java @@ -52,8 +52,8 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic list.add(employeeIdColumn); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86185, "部门"), "department")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile")); - list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 1933, "工号"), "workcode")); + list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom")); if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) { list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth")); @@ -166,9 +166,23 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "otherBase"); } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns); - result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns); + // map根据value排序 + LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); + result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } @@ -225,9 +239,23 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 87159, "个人"), social + "otherPer"); } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns); - result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns); + // map根据value排序 + LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); + result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } @@ -284,9 +312,23 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100289, "单位"), social + "otherCom"); } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns); - result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns); + // map根据value排序 + LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); + result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index 9faa7fd87..ae330912a 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -392,9 +392,23 @@ public class SIExportServiceImpl extends Service implements SIExportService { social + "otherCom"); } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns); - result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns); + // map根据value排序 + LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); + result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } @@ -454,9 +468,23 @@ public class SIExportServiceImpl extends Service implements SIExportService { social + "otherPer"); } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns); - result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns); + // map根据value排序 + LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); + result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } @@ -605,9 +633,23 @@ public class SIExportServiceImpl extends Service implements SIExportService { otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "otherBase"); } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns); - result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns); + // map根据value排序 + LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() + .sorted(Map.Entry.comparingByValue()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); + result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } } diff --git a/src/com/engine/salary/service/impl/SIImportServiceImpl.java b/src/com/engine/salary/service/impl/SIImportServiceImpl.java index 4a5ffae54..ae235c3fc 100644 --- a/src/com/engine/salary/service/impl/SIImportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIImportServiceImpl.java @@ -225,7 +225,11 @@ public class SIImportServiceImpl extends Service implements SIImportService { * @return */ public Map welfareNameIdMap(WelfareTypeEnum welfareTypeEnum) { - return getICategoryMapper().listByWelfareType(welfareTypeEnum.getValue(),null).stream().collect(Collectors.toMap(ICategoryPO::getInsuranceName, ICategoryPO::getId)); +// return getICategoryMapper().listByWelfareType(welfareTypeEnum.getValue(),null).stream().collect(Collectors.toMap(ICategoryPO::getInsuranceName, ICategoryPO::getId)); + return getICategoryMapper().listByWelfareType(welfareTypeEnum.getValue(),null) + .stream() + .sorted(Comparator.comparing(ICategoryPO::getId)) + .collect(LinkedHashMap::new, (map, item) -> map.put(item.getInsuranceName(), item.getId()), LinkedHashMap::putAll); } public Map welfareMap() { diff --git a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java index 3a6476889..e1cf27275 100644 --- a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java @@ -219,7 +219,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic String socialComJson = insuranceAccountDetailPO.getSocialComJson(); if (StringUtils.isNotBlank(socialComJson)) { HashMap jsonMap = new HashMap<>(); - HashMap hashMap = JSON.parseObject(socialPerJson, new HashMap().getClass()); + HashMap hashMap = JSON.parseObject(socialComJson, new HashMap().getClass()); hashMap.forEach((k, v) -> { if (StringUtils.isNotBlank(v)) { v = new BigDecimal(v).negate().toPlainString(); @@ -254,7 +254,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic String fundComJson = insuranceAccountDetailPO.getFundComJson(); if (StringUtils.isNotBlank(fundComJson)) { HashMap jsonMap = new HashMap<>(); - HashMap hashMap = JSON.parseObject(fundPerJson, new HashMap().getClass()); + HashMap hashMap = JSON.parseObject(fundComJson, new HashMap().getClass()); hashMap.forEach((k, v) -> { if (StringUtils.isNotBlank(v)) { v = new BigDecimal(v).negate().toPlainString(); @@ -290,7 +290,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic String otherComJson = insuranceAccountDetailPO.getOtherComJson(); if (StringUtils.isNotBlank(otherComJson)) { HashMap jsonMap = new HashMap<>(); - HashMap hashMap = JSON.parseObject(otherPerJson, new HashMap().getClass()); + HashMap hashMap = JSON.parseObject(otherComJson, new HashMap().getClass()); hashMap.forEach((k, v) -> { if (StringUtils.isNotBlank(v)) { v = new BigDecimal(v).negate().toPlainString(); diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index d98a6d746..a3fdc6cc0 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -578,9 +578,23 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } }); - result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMap); - result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMap); - result.put(WelfareTypeEnum.OTHER.getValue(), otherMap); + // map根据key排序 + LinkedHashMap socialMapWithAscKey = socialMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap fundMapWithAscKey = fundMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + LinkedHashMap otherMapWithAscKey = otherMap.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, + LinkedHashMap::new)); + + result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey); + result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey); + result.put(WelfareTypeEnum.OTHER.getValue(), otherMapWithAscKey); return result; } diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 2877350c7..6801cb415 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -1082,7 +1082,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc } } SalarySysConfPO autoLock = getSalarySysConfService(user).getOneByCode(SalarySysConstant.EDIT_IMPORT_AUTO_LOCK); - if(autoLock != null){ + if(autoLock != null && StringUtils.equals(autoLock.getConfValue(),"1")){ // 导入的列都自动锁定 SalaryAcctResultUpdateLockStatusParam updateLockStatusParam = SalaryAcctResultUpdateLockStatusParam.builder() .salaryItemIds(excelSalaryItemIds) diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 434b74638..af5b48f39 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -789,4 +789,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe public List listBySalaryAcctEmpId(Long salaryAcctEmpId) { return getSalaryAcctResultService(user).listBySalaryAcctEmployeeId(salaryAcctEmpId); } + + @Override + public List listSome(SalaryAcctRecordPO po) { + return getSalaryAcctRecordMapper().listSome(po); + } } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index 92d335c4f..2c04d6137 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -541,7 +541,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe // 保存参数转换成薪资核算结果po List salaryAcctResultPOS = SalaryAcctResultBO.convert2PO(salaryAcctResultPOSOld, saveParam, salaryAcctEmployeePO, (long) user.getUID()); SalarySysConfPO autoLock = getSalarySysConfService(user).getOneByCode(SalarySysConstant.EDIT_IMPORT_AUTO_LOCK); - if(autoLock != null){ + if(autoLock != null && StringUtils.equals(autoLock.getConfValue(),"1")){ // 对比核算结果提取修改了哪些薪资项目 Set needLockItems = new HashSet<>(); Map oldResutMap = SalaryEntityUtil.convert2Map(salaryAcctResultPOSOld, SalaryAcctResultPO::getSalaryItemId); diff --git a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java index 9e95a4c43..2ce7e1916 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java @@ -42,6 +42,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import weaver.file.ImageFileManager; +import weaver.general.Util; import weaver.hrm.User; import java.io.InputStream; @@ -278,8 +279,9 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch // header.add(SalaryI18nUtil.getI18nLabel(87889, "薪资账套")); // header.add(SalaryI18nUtil.getI18nLabel(86319, "入职日期")); header.add(SalaryI18nUtil.getI18nLabel(86185, "部门")); + header.add(SalaryI18nUtil.getI18nLabel(1933, "工号")); header.add(SalaryI18nUtil.getI18nLabel(86186, "手机号")); - header.add(SalaryI18nUtil.getI18nLabel(86317, "工号")); + header.add(SalaryI18nUtil.getI18nLabel(15890, "员工状态")); // if (enableHr) { // header.add(SalaryI18nUtil.getI18nLabel(106277, "身份证号码")); // } @@ -350,8 +352,9 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch // row.add(e.get("salarySob").toString()); // row.add(e.get("hiredate")); row.add(e.get("departmentName")); - row.add(e.get("mobile") == null ? "" : e.get("mobile").toString()); row.add(Optional.ofNullable(e.get("workcode")).orElse("").toString()); + row.add(e.get("mobile") == null ? "" : e.get("mobile").toString()); + row.add(Util.null2String(e.get("employeeStatus"))); // if (enableHr) { // row.add(Optional.ofNullable(e.get("idNo")).orElse("").toString()); // } diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index 1dcf84c18..ebbf11d20 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -259,8 +259,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe * @param currentEmployeeId */ public void handleChangeData(Long currentEmployeeId) { - //开始同步中.... - Util_DataCache.setObjVal("salaryArchiveChangeSign", "1"); + // 所有增量人员列表 List taxAgentEmpChangeList = getTaxAgentEmpChangeService(user).listAllByModule(TaxAgentEmpChangeModuleEnum.SALARY_ARCHIVE); if (CollectionUtils.isEmpty(taxAgentEmpChangeList)) { @@ -303,8 +302,6 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe } /** 增量处理 end ***/ - //同步结束.... - Util_DataCache.setObjVal("salaryArchiveChangeSign", "0"); } @@ -459,7 +456,14 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资档案"); // 获取所有可被引用的薪资项目 List salaryItems = salaryItemMapper.getCanAdjustSalaryItems(); - String[] header = {SalaryI18nUtil.getI18nLabel(85429, "姓名"), SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), SalaryI18nUtil.getI18nLabel(86185, "部门"), SalaryI18nUtil.getI18nLabel(86176, "工号"), SalaryI18nUtil.getI18nLabel(86186, "手机号"), SalaryI18nUtil.getI18nLabel(91075, "状态"), SalaryI18nUtil.getI18nLabel(91075, "起始发薪日期"), SalaryI18nUtil.getI18nLabel(91075, "最后发薪日期")}; + String[] header = {SalaryI18nUtil.getI18nLabel(85429, "姓名"), + SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), + SalaryI18nUtil.getI18nLabel(86185, "部门"), + SalaryI18nUtil.getI18nLabel(86176, "工号"), + SalaryI18nUtil.getI18nLabel(86186, "手机号"), + SalaryI18nUtil.getI18nLabel(15890, "员工状态"), + SalaryI18nUtil.getI18nLabel(91075, "起始发薪日期"), + SalaryI18nUtil.getI18nLabel(91075, "最后发薪日期")}; // 2.表头 List headerList = new ArrayList<>(Arrays.asList(header)); for (SalaryItemPO salaryItem : salaryItems) { diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index 44fcad1c8..15fb6baef 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -351,7 +351,15 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM //生成薪资档案 String salaryArchiveChangeSign = (String) Util_DataCache.getObjVal("salaryArchiveChangeSign"); if (salaryArchiveChangeSign == null || "0".equals(salaryArchiveChangeSign)) { - getSalaryArchiveService(user).handleChangeData(1L); + try { + //开始同步中.... + Util_DataCache.setObjVal("salaryArchiveChangeSign", "1"); + getSalaryArchiveService(user).handleChangeData(1L); + }finally { + //同步结束.... + Util_DataCache.setObjVal("salaryArchiveChangeSign", "0"); + } + } //生成社保福利档案 String welSign = (String) Util_DataCache.getObjVal("welfareChangeSign"); diff --git a/src/com/engine/salary/util/SalaryEnumUtil.java b/src/com/engine/salary/util/SalaryEnumUtil.java index cf2abcd2c..0294bd14c 100644 --- a/src/com/engine/salary/util/SalaryEnumUtil.java +++ b/src/com/engine/salary/util/SalaryEnumUtil.java @@ -88,5 +88,4 @@ public class SalaryEnumUtil { } - } diff --git a/src/com/engine/salary/web/SalaryCommonController.java b/src/com/engine/salary/web/SalaryCommonController.java index 30b4dc313..ca7a439dc 100644 --- a/src/com/engine/salary/web/SalaryCommonController.java +++ b/src/com/engine/salary/web/SalaryCommonController.java @@ -1,7 +1,9 @@ package com.engine.salary.web; +import com.engine.common.util.ServiceUtil; import com.engine.salary.util.ResponseResult; import com.engine.salary.util.SalaryEnumUtil; +import com.engine.salary.wrapper.SalaryCommonWrapper; import lombok.extern.slf4j.Slf4j; import weaver.hrm.HrmUserVarify; import weaver.hrm.User; @@ -20,6 +22,10 @@ import java.util.Map; @Slf4j public class SalaryCommonController { + private SalaryCommonWrapper getSalaryCommonWrapper(User user) { + return ServiceUtil.getService(SalaryCommonWrapper.class, user); + } + @GET @Path("/enum/list") @Produces(MediaType.APPLICATION_JSON) @@ -29,4 +35,21 @@ public class SalaryCommonController { } + @GET + @Path("/cache/info") + @Produces(MediaType.APPLICATION_JSON) + public String getCacheInfo(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "key") String key) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getSalaryCommonWrapper(user)::getCacheInfo, key); + } + + @GET + @Path("/cache/remove") + @Produces(MediaType.APPLICATION_JSON) + public String removeCache(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "key") String key) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult(user).run(getSalaryCommonWrapper(user)::removeCache, key); + } + + } diff --git a/src/com/engine/salary/wrapper/SalaryCommonWrapper.java b/src/com/engine/salary/wrapper/SalaryCommonWrapper.java new file mode 100644 index 000000000..baec86d91 --- /dev/null +++ b/src/com/engine/salary/wrapper/SalaryCommonWrapper.java @@ -0,0 +1,23 @@ +package com.engine.salary.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.salary.service.SalaryCacheService; +import com.engine.salary.service.impl.SalaryCacheServiceImpl; +import weaver.hrm.User; + + +public class SalaryCommonWrapper extends Service { + + private SalaryCacheService getSalaryCacheService(User user) { + return ServiceUtil.getService(SalaryCacheServiceImpl.class, user); + } + + public String getCacheInfo(String key) { + return getSalaryCacheService(user).get(key); + } + + public void removeCache(String key) { + getSalaryCacheService(user).remove(key); + } +} diff --git a/src/com/engine/salary/wrapper/TaxAgentWrapper.java b/src/com/engine/salary/wrapper/TaxAgentWrapper.java index 86df32a70..a59de95cc 100644 --- a/src/com/engine/salary/wrapper/TaxAgentWrapper.java +++ b/src/com/engine/salary/wrapper/TaxAgentWrapper.java @@ -382,11 +382,6 @@ public class TaxAgentWrapper extends Service { String syncRange = Util.null2String(Util_DataCache.getObjVal(index)); if (StringUtils.isEmpty(syncRange)) { getTaxAgentManageRangeService(user).syncManageRange(taxAgentIds, index); -// try { -// TimeUnit.SECONDS.sleep(2); -// } catch (InterruptedException e) { -// -// } } else { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(135788, "人员范围同步过于频繁,请稍后再试")); } @@ -403,11 +398,6 @@ public class TaxAgentWrapper extends Service { String syncRange = Util.null2String(Util_DataCache.getObjVal(SalaryCacheKey.TAX_AGENT_MANAGE_RANGE_SYNC)); if (StringUtils.isEmpty(syncRange)) { getTaxAgentManageRangeService(user).syncManageRange(null, SalaryCacheKey.TAX_AGENT_MANAGE_RANGE_SYNC); -// try { -// TimeUnit.SECONDS.sleep(2); -// } catch (InterruptedException e) { -// -// } } else { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(135788, "人员范围同步过于频繁,请稍后再试")); }