Merge branch 'release/2.8.4.2306.02' into feature/短信验证码
This commit is contained in:
commit
8612f0e5b2
|
|
@ -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<String, String> socialMapWithAscKey = socialMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundMapWithAscKey = fundMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,4 +69,14 @@ public class AttendQuoteListDTO {
|
|||
* 薪资核算状态。0:未核算、1:已核算
|
||||
*/
|
||||
private Integer salaryAccountingStatus;
|
||||
|
||||
/**
|
||||
* 能否删除
|
||||
*/
|
||||
private Boolean canDelete;
|
||||
|
||||
/**
|
||||
* 薪资账套id
|
||||
*/
|
||||
private Long salarySobId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@
|
|||
WHERE
|
||||
delete_type = 0
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY sorted_index DESC, id DESC
|
||||
ORDER BY sorted_index DESC, create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="listByParamOrderById" resultType="com.engine.salary.entity.salaryitem.po.SalaryItemPO">
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
AND tax_agent_id = #{taxAgentId}
|
||||
</if>
|
||||
<include refid="listSomeParamSql"/>
|
||||
ORDER BY id DESC
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
FROM hrsa_tax_agent t
|
||||
WHERE delete_type = 0
|
||||
<include refid="paramSql"/>
|
||||
ORDER BY sorted_index DESC
|
||||
ORDER BY sorted_index DESC, create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
|
|
|
|||
|
|
@ -39,4 +39,10 @@ public class SalaryStatisticsDimensionListDTO {
|
|||
//是否默认")
|
||||
@JsonIgnore
|
||||
private Integer isDefault;
|
||||
|
||||
// 能否删除
|
||||
private boolean canDelete;
|
||||
|
||||
// 能否编辑
|
||||
private boolean canEdit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,4 +65,11 @@ public interface SalaryStatisticsDimensionService {
|
|||
* @return
|
||||
*/
|
||||
Map<String, Object> delete(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取默认薪酬统计维度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SalaryStatisticsDimensionPO> listAllDefaultDimension();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,4 +243,9 @@ public class SalaryStatisticsDimensionServiceImpl extends Service implements Sal
|
|||
resultMap.put("msg", resultMsg);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalaryStatisticsDimensionPO> listAllDefaultDimension() {
|
||||
return getSalaryStatisticsDimensionMapper().listSome(SalaryStatisticsDimensionPO.builder().isDefault(NumberUtils.INTEGER_ONE).build());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<SalaryStatisticsDimensionPO> page = salaryStatisticsDimensionService(user).listPage(queryParam);
|
||||
List<SalaryStatisticsDimensionPO> list = page.getList();
|
||||
List<SalaryStatisticsDimensionListDTO> dtoList= new ArrayList<>();
|
||||
|
||||
// 获取默认维度统计
|
||||
List<SalaryStatisticsDimensionPO> defaultSalaryStatisticsDimensions = getSalaryStatisticsDimensionService(user).listAllDefaultDimension();
|
||||
List<Long> defaultDimensionIds = defaultSalaryStatisticsDimensions.stream().map(SalaryStatisticsDimensionPO::getId).collect(Collectors.toList());
|
||||
// 获取有薪资统计报表引用的统计维度
|
||||
Set<String> haveUsedDimIds = new HashSet<>();
|
||||
List<SalaryStatisticsReportPO> 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<SalaryStatisticsDimensionListDTO> salaryStatisticsDimensionListDTOPageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
|
|
|
|||
|
|
@ -127,6 +127,26 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
List<SalaryStatisticsDimensionPO> salaryStatisticsDimensions = getSalaryStatisticsDimensionService(user).listAll();
|
||||
|
||||
List<WeaFormOption> statsDimOptions = salaryStatisticsDimensions.stream().map(sd -> new WeaFormOption(sd.getId().toString(), sd.getDimName())).collect(Collectors.toList());
|
||||
|
||||
// 获取默认维度统计
|
||||
List<SalaryStatisticsDimensionPO> defaultSalaryStatisticsDimensions = getSalaryStatisticsDimensionService(user).listAllDefaultDimension();
|
||||
List<Long> defaultDimensionIds = defaultSalaryStatisticsDimensions.stream().map(SalaryStatisticsDimensionPO::getId).collect(Collectors.toList());
|
||||
// 获取有薪资统计报表引用的统计维度
|
||||
Set<String> haveUsedDimIds = new HashSet<>();
|
||||
List<SalaryStatisticsReportPO> 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<String, Object> weaForm = new HashMap<>();
|
||||
weaForm.put("statsDimOptions", statsDimOptions);
|
||||
|
|
|
|||
|
|
@ -206,5 +206,5 @@ public interface SalaryAcctRecordService {
|
|||
List<SalaryAcctResultPO> listBySalaryAcctEmpId(Long salaryAcctEmpId);
|
||||
|
||||
|
||||
|
||||
List<SalaryAcctRecordPO> listSome(SalaryAcctRecordPO po);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<AttendQuoteListDTO> listPage(AttendQuoteQueryParam queryParam) {
|
||||
|
||||
List<String> 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<SalaryAcctRecordPO> salaryAcctRecordPOS = getSalaryAcctRecordService(user).listSome(queryRecordParam);
|
||||
// List<String> archivedRecords = salaryAcctRecordPOS.stream().filter(PO -> PO.getStatus() > SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue())
|
||||
// .map(PO -> SalaryDateUtil.getFormatYearMonth(PO.getSalaryMonth()) + PO.getSalarySobId())
|
||||
// .collect(Collectors.toList());
|
||||
|
||||
|
||||
List<AttendQuoteListDTO> 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<SalaryAcctRecordPO> salaryAcctRecordPOS = getSalaryAcctRecordService(user).listSome(SalaryAcctRecordPO.builder().salarySobId(attendQuotes.get(0).getSalarySobId())
|
||||
.salaryMonth(attendQuotes.get(0).getSalaryYearMonth()).build());
|
||||
Optional<SalaryAcctRecordPO> haveArchived = salaryAcctRecordPOS.stream().filter(PO -> PO.getStatus() > SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue()).findFirst();
|
||||
if(haveArchived.isPresent()){
|
||||
throw new SalaryRunTimeException("已经核算完成的数据不能删除");
|
||||
}
|
||||
List<Long> unAccountingIds = attendQuotes.stream().filter(e -> e.getSalaryAccountingStatus().equals(0)).map(AttendQuoteListDTO::getId).collect(Collectors.toList());
|
||||
// 1.删除未核算的考勤引用
|
||||
biz.deleteByIds(unAccountingIds);
|
||||
|
|
|
|||
|
|
@ -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<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundColumnsWithAscValue = fundColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundColumnsWithAscValue = fundColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundColumnsWithAscValue = fundColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundColumnsWithAscValue = fundColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundColumnsWithAscValue = fundColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundColumnsWithAscValue = fundColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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,7 +225,11 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
* @return
|
||||
*/
|
||||
public Map<String, Long> 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<Long, String> welfareMap() {
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic
|
|||
String socialComJson = insuranceAccountDetailPO.getSocialComJson();
|
||||
if (StringUtils.isNotBlank(socialComJson)) {
|
||||
HashMap<String, String> jsonMap = new HashMap<>();
|
||||
HashMap<String, String> hashMap = JSON.parseObject(socialPerJson, new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> hashMap = JSON.parseObject(socialComJson, new HashMap<String, String>().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<String, String> jsonMap = new HashMap<>();
|
||||
HashMap<String, String> hashMap = JSON.parseObject(fundPerJson, new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> hashMap = JSON.parseObject(fundComJson, new HashMap<String, String>().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<String, String> jsonMap = new HashMap<>();
|
||||
HashMap<String, String> hashMap = JSON.parseObject(otherPerJson, new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> hashMap = JSON.parseObject(otherComJson, new HashMap<String, String>().getClass());
|
||||
hashMap.forEach((k, v) -> {
|
||||
if (StringUtils.isNotBlank(v)) {
|
||||
v = new BigDecimal(v).negate().toPlainString();
|
||||
|
|
|
|||
|
|
@ -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<String, String> socialMapWithAscKey = socialMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundMapWithAscKey = fundMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> 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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -789,4 +789,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
public List<SalaryAcctResultPO> listBySalaryAcctEmpId(Long salaryAcctEmpId) {
|
||||
return getSalaryAcctResultService(user).listBySalaryAcctEmployeeId(salaryAcctEmpId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalaryAcctRecordPO> listSome(SalaryAcctRecordPO po) {
|
||||
return getSalaryAcctRecordMapper().listSome(po);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
// 保存参数转换成薪资核算结果po
|
||||
List<SalaryAcctResultPO> 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<Long> needLockItems = new HashSet<>();
|
||||
Map<Long, SalaryAcctResultPO> oldResutMap = SalaryEntityUtil.convert2Map(salaryAcctResultPOSOld, SalaryAcctResultPO::getSalaryItemId);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -259,8 +259,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
* @param currentEmployeeId
|
||||
*/
|
||||
public void handleChangeData(Long currentEmployeeId) {
|
||||
//开始同步中....
|
||||
Util_DataCache.setObjVal("salaryArchiveChangeSign", "1");
|
||||
|
||||
// 所有增量人员列表
|
||||
List<TaxAgentEmpChangePO> 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<SalaryItemPO> 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<Object> headerList = new ArrayList<>(Arrays.asList(header));
|
||||
for (SalaryItemPO salaryItem : salaryItems) {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -88,5 +88,4 @@ public class SalaryEnumUtil {
|
|||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<String, String>(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<String, String>(user).run(getSalaryCommonWrapper(user)::removeCache, key);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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, "人员范围同步过于频繁,请稍后再试"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue