薪酬系统-多语言,枚举类defaultLabel值获取多语言环境下的对应值的逻辑优化
This commit is contained in:
parent
c79563d606
commit
65da8930a1
|
|
@ -1262,6 +1262,7 @@ public class SIArchivesBiz extends Service {
|
|||
InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getSocialId());
|
||||
InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getFundId());
|
||||
InsuranceArchivesOtherSchemePO otherItem = otherSchemePOMap.get(item.getOtherId());
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(item.getUserStatus());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("employeeName", item.getUserName());
|
||||
map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : "");
|
||||
|
|
@ -1275,7 +1276,8 @@ public class SIArchivesBiz extends Service {
|
|||
map.put("siSchemeId", item.getSiSchemeId());
|
||||
map.put("fundSchemeId", item.getFundSchemeId());
|
||||
map.put("otherSchemeId", item.getOtherSchemeId());
|
||||
map.put("status", item.getUserStatus() != null ? UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()) : "");
|
||||
// map.put("status", item.getUserStatus() != null ? UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()) : "");
|
||||
map.put("status", item.getUserStatus() != null ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()) : "");
|
||||
map.put("baseInfo", item.getBaseInfoId());
|
||||
map.put("paymentOrganization", item.getPaymentOrganization());
|
||||
if (socialItem != null) {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ public class SISchemeBiz extends Service {
|
|||
.id((long) (Math.random() * 10000))
|
||||
.insuranceId(item.getId())
|
||||
.insuranceName(item.getInsuranceName())
|
||||
.paymentScope(e.getDefaultLabel())
|
||||
// .paymentScope(e.getDefaultLabel())
|
||||
.paymentScope(SalaryI18nUtil.getI18nLabel(user.getLanguage(),e.getLabelId(), e.getDefaultLabel()))
|
||||
.rententionRule(String.valueOf(RententionRuleEnum.ROUND.getValue()))
|
||||
.cycleSetting("000000000000")
|
||||
.paymentCycle("0")
|
||||
|
|
@ -137,7 +138,8 @@ public class SISchemeBiz extends Service {
|
|||
}
|
||||
insuranceSchemeDetailDTO.setInsuranceName(item.getInsuranceName());
|
||||
insuranceSchemeDetailDTO.setRententionRule(String.valueOf(insuranceSchemeDetailPO.getRententionRule()));
|
||||
insuranceSchemeDetailDTO.setPaymentScope(e.getDefaultLabel());
|
||||
// insuranceSchemeDetailDTO.setPaymentScope(e.getDefaultLabel());
|
||||
insuranceSchemeDetailDTO.setPaymentScope(SalaryI18nUtil.getI18nLabel(user.getLanguage(),e.getLabelId(), e.getDefaultLabel()));
|
||||
|
||||
}
|
||||
insuranceSchemeDetailDTO.setPaymentScopeValue(e.getValue());
|
||||
|
|
|
|||
|
|
@ -10,11 +10,13 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveTaxAgentDataDTO;
|
|||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -39,7 +41,8 @@ public class SalaryAcctEmployeeBO {
|
|||
*/
|
||||
public static List<SalaryAccEmployeeListDTO> convert2EmployeeListDTO(List<SalaryAcctEmployeePO> salaryAccountingEmployees,
|
||||
List<TaxAgentPO> taxAgents,
|
||||
List<DataCollectionEmployee> simpleEmployees) {
|
||||
List<DataCollectionEmployee> simpleEmployees,
|
||||
User user) {
|
||||
if (CollectionUtils.isEmpty(salaryAccountingEmployees)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
@ -56,6 +59,7 @@ public class SalaryAcctEmployeeBO {
|
|||
.taxAgentName(taxAgentNameMap.getOrDefault(e.getTaxAgentId(), StringUtils.EMPTY))
|
||||
.build();
|
||||
}
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(NumberUtils.toInt(simpleEmployee.getStatus()));
|
||||
return SalaryAccEmployeeListDTO.builder()
|
||||
.id(e.getId())
|
||||
.employeeId(simpleEmployee.getEmployeeId())
|
||||
|
|
@ -64,7 +68,8 @@ public class SalaryAcctEmployeeBO {
|
|||
.taxAgentName(taxAgentNameMap.getOrDefault(e.getTaxAgentId(), StringUtils.EMPTY))
|
||||
.departmentId(simpleEmployee.getDepartmentId())
|
||||
.departmentName(simpleEmployee.getDepartmentName())
|
||||
.status(UserStatusEnum.getDefaultLabelByValue(NumberUtils.toInt(simpleEmployee.getStatus())))
|
||||
// .status(UserStatusEnum.getDefaultLabelByValue(NumberUtils.toInt(simpleEmployee.getStatus())))
|
||||
.status(SalaryI18nUtil.getI18nLabel(user.getLanguage(),userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()))
|
||||
.mobile(simpleEmployee.getMobile())
|
||||
.jobNum(simpleEmployee.getWorkcode())
|
||||
.hireDate(simpleEmployee.getCompanystartdate())
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
|||
import com.engine.salary.entity.siexport.po.AccountExportPO;
|
||||
import com.engine.salary.entity.siexport.po.ExcelAccountExportPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.mapper.sicategory.ICategoryMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
|
|
@ -23,7 +24,6 @@ import java.util.*;
|
|||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.engine.salary.enums.UserStatusEnum.getDefaultLabelByValue;
|
||||
|
||||
/**
|
||||
* @Author: sy
|
||||
|
|
@ -128,7 +128,7 @@ public class InsuranceComparisonResultBO {
|
|||
* 构建福利核算线下对比结果
|
||||
*
|
||||
*/
|
||||
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS, Map<Long, String> schemeIdNameMap) {
|
||||
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS, Map<Long, String> schemeIdNameMap, User user) {
|
||||
|
||||
Map<String, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getWorkcode);
|
||||
// Map<String, List<AccountExportPO>> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode);
|
||||
|
|
@ -145,6 +145,8 @@ public class InsuranceComparisonResultBO {
|
|||
// 记录线下值和系统值之间是否存在差异
|
||||
map.put("different", "false");
|
||||
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(accountExportPO.getUserStatus());
|
||||
|
||||
//设置基本字段信息和类型
|
||||
map.put("userName", accountExportPO.getUserName());
|
||||
map.put("userName" + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue());
|
||||
|
|
@ -154,7 +156,7 @@ public class InsuranceComparisonResultBO {
|
|||
map.put("mobile" + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue());
|
||||
map.put("workcode", accountExportPO.getWorkcode());
|
||||
map.put("workcode" + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue());
|
||||
map.put("employeeStatus", accountExportPO.getUserStatus() == null ? "" : getDefaultLabelByValue(accountExportPO.getUserStatus()));
|
||||
map.put("employeeStatus", accountExportPO.getUserStatus() == null ? "" : SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
map.put("employeeStatus" + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue());
|
||||
map.put("socialPayOrg", paymentMap.get(accountExportPO.getSocialPayOrg()) == null ? "" : paymentMap.get(accountExportPO.getSocialPayOrg()).getName());
|
||||
map.put("socialPayOrg" + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue());
|
||||
|
|
|
|||
|
|
@ -62,16 +62,16 @@ public enum SalaryDataSourceEnum implements BaseEnum<Integer> {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
SalaryDataSourceEnum[] enumAry = SalaryDataSourceEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// SalaryDataSourceEnum[] enumAry = SalaryDataSourceEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.enums;
|
||||
|
||||
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -35,18 +34,19 @@ public enum SalaryRoundingModeEnum implements BaseEnum<Integer> {
|
|||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
SalaryRoundingModeEnum[] enumAry = SalaryRoundingModeEnum.values();
|
||||
for (int i = 0; i < Arrays.asList(enumAry).size(); i++) {
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// SalaryRoundingModeEnum[] enumAry = SalaryRoundingModeEnum.values();
|
||||
// for (int i = 0; i < Arrays.asList(enumAry).size(); i++) {
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
|
|
|
|||
|
|
@ -56,16 +56,16 @@ public enum SalaryValueTypeEnum implements BaseEnum<Integer> {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
SalaryValueTypeEnum[] enumAry = SalaryValueTypeEnum.values();
|
||||
for (int i = 0; i < Arrays.asList(enumAry).size(); i++) {
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// SalaryValueTypeEnum[] enumAry = SalaryValueTypeEnum.values();
|
||||
// for (int i = 0; i < Arrays.asList(enumAry).size(); i++) {
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,18 @@ public enum UserStatusEnum implements BaseEnum {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
Optional<UserStatusEnum> optional = Arrays.stream(UserStatusEnum.values()).filter(r -> r.getValue().equals(value)).findFirst();
|
||||
return optional.isPresent() ? optional.get().defaultLabel : "";
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// Optional<UserStatusEnum> optional = Arrays.stream(UserStatusEnum.values()).filter(r -> r.getValue().equals(value)).findFirst();
|
||||
// return optional.isPresent() ? optional.get().defaultLabel : "";
|
||||
// }
|
||||
|
||||
public static UserStatusEnum parseByValue(Integer value) {
|
||||
for (UserStatusEnum optionalAdjustReason : UserStatusEnum.values()) {
|
||||
if (Objects.equals(optionalAdjustReason.getValue(), value)) {
|
||||
return optionalAdjustReason;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<Map<String, String>> getList() {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.enums.datacollection;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 考勤引用-来源
|
||||
|
|
@ -37,17 +38,26 @@ public enum AttendQuoteFieldSourceTypeEnum {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
AttendQuoteFieldSourceTypeEnum[] enumAry = AttendQuoteFieldSourceTypeEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// AttendQuoteFieldSourceTypeEnum[] enumAry = AttendQuoteFieldSourceTypeEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
public static AttendQuoteFieldSourceTypeEnum parseByValue(int value) {
|
||||
for (AttendQuoteFieldSourceTypeEnum optionalAdjustReason : AttendQuoteFieldSourceTypeEnum.values()) {
|
||||
if (Objects.equals(optionalAdjustReason.getValue(), value)) {
|
||||
return optionalAdjustReason;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getNameByValue(Integer value) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.enums.datacollection;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 考勤引用-来源
|
||||
|
|
@ -37,16 +38,25 @@ public enum AttendQuoteFieldTypeEnum {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
AttendQuoteFieldTypeEnum[] enumAry = AttendQuoteFieldTypeEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// AttendQuoteFieldTypeEnum[] enumAry = AttendQuoteFieldTypeEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
public static AttendQuoteFieldTypeEnum parseByValue(int value) {
|
||||
for (AttendQuoteFieldTypeEnum optionalAdjustReason : AttendQuoteFieldTypeEnum.values()) {
|
||||
if (Objects.equals(optionalAdjustReason.getValue(), value)) {
|
||||
return optionalAdjustReason;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.enums.datacollection;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 考勤引用-来源
|
||||
|
|
@ -37,16 +38,25 @@ public enum AttendQuoteSourceTypeEnum {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
AttendQuoteSourceTypeEnum[] enumAry = AttendQuoteSourceTypeEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// AttendQuoteSourceTypeEnum[] enumAry = AttendQuoteSourceTypeEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
public static AttendQuoteSourceTypeEnum parseByValue(int value) {
|
||||
for (AttendQuoteSourceTypeEnum optionalAdjustReason : AttendQuoteSourceTypeEnum.values()) {
|
||||
if (Objects.equals(optionalAdjustReason.getValue(), value)) {
|
||||
return optionalAdjustReason;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,16 +35,16 @@ public enum IndividualTaxWithholdingAgentStatusEnum {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
IndividualTaxWithholdingAgentStatusEnum[] enumAry = IndividualTaxWithholdingAgentStatusEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// IndividualTaxWithholdingAgentStatusEnum[] enumAry = IndividualTaxWithholdingAgentStatusEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ public enum SalaryArchiveFieldTypeEnum implements BaseEnum<String> {
|
|||
return this.defaultLabel;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(String value, Long employeeId, String tenantKey) {
|
||||
Optional<SalaryArchiveFieldTypeEnum> optional = Arrays.stream(SalaryArchiveFieldTypeEnum.values()).filter(r->r.getValue().equals(value)).findFirst();
|
||||
return optional.isPresent()? SalaryI18nUtil.getI18nLabel(optional.get().getLabelId(), optional.get().getDefaultLabel()):"";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(String value, Long employeeId, String tenantKey) {
|
||||
// Optional<SalaryArchiveFieldTypeEnum> optional = Arrays.stream(SalaryArchiveFieldTypeEnum.values()).filter(r->r.getValue().equals(value)).findFirst();
|
||||
// return optional.isPresent()? SalaryI18nUtil.getI18nLabel(optional.get().getLabelId(), optional.get().getDefaultLabel()):"";
|
||||
// }
|
||||
|
||||
public static String getNameByValue(String value) {
|
||||
Optional<SalaryArchiveFieldTypeEnum> optional = Arrays.stream(SalaryArchiveFieldTypeEnum.values()).filter(r->r.getValue().equals(value)).findFirst();
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ public enum SalaryArchiveItemAdjustReasonEnum {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
public static String getDefaultLabelByValue(String value) {
|
||||
Optional<SalaryArchiveItemAdjustReasonEnum> optionalAdjustReason = Arrays.stream(SalaryArchiveItemAdjustReasonEnum.values()).filter(r->r.getValue().equals(value)).findFirst();
|
||||
return optionalAdjustReason.isPresent()? SalaryI18nUtil.getI18nLabel(optionalAdjustReason.get().getLabelId(), optionalAdjustReason.get().getDefaultLabel()):"";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(String value) {
|
||||
// Optional<SalaryArchiveItemAdjustReasonEnum> optionalAdjustReason = Arrays.stream(SalaryArchiveItemAdjustReasonEnum.values()).filter(r->r.getValue().equals(value)).findFirst();
|
||||
// return optionalAdjustReason.isPresent()? SalaryI18nUtil.getI18nLabel(optionalAdjustReason.get().getLabelId(), optionalAdjustReason.get().getDefaultLabel()):"";
|
||||
// }
|
||||
|
||||
public static SalaryArchiveItemAdjustReasonEnum parseByValue(String value) {
|
||||
for (SalaryArchiveItemAdjustReasonEnum optionalAdjustReason : SalaryArchiveItemAdjustReasonEnum.values()) {
|
||||
|
|
|
|||
|
|
@ -45,18 +45,18 @@ public enum MessageChannelEnum implements BaseEnum<Integer> {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
MessageChannelEnum[] enumAry = MessageChannelEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// MessageChannelEnum[] enumAry = MessageChannelEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
public static String getNameByValue(Integer value) {
|
||||
if (value == null) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.engine.salary.enums.BaseEnum;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 工资单开关项
|
||||
|
|
@ -43,17 +44,26 @@ public enum SalarySendStatusEnum implements BaseEnum<Integer> {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
SalarySendStatusEnum[] enumAry = SalarySendStatusEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// SalarySendStatusEnum[] enumAry = SalarySendStatusEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
public static SalarySendStatusEnum parseByValue(int value) {
|
||||
for (SalarySendStatusEnum optionalAdjustReason : SalarySendStatusEnum.values()) {
|
||||
if (Objects.equals(optionalAdjustReason.getValue(), value)) {
|
||||
return optionalAdjustReason;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getNameByValue(Integer value) {
|
||||
|
|
|
|||
|
|
@ -55,16 +55,16 @@ public enum SalaryDataTypeEnum implements BaseEnum<String> {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(String value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
SalaryDataTypeEnum[] enumAry = SalaryDataTypeEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (enumAry[i].getValue().equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(String value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// SalaryDataTypeEnum[] enumAry = SalaryDataTypeEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (enumAry[i].getValue().equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ public enum SalarySendGrantTypeEnum {
|
|||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(String value, Long employeeId, String tenantKey) {
|
||||
return Arrays.stream(SalarySendGrantTypeEnum.values()).filter(r -> r.getValue().equals(value)).findFirst()
|
||||
.map(SalarySendGrantTypeEnum::getDefaultLabel)
|
||||
.orElse(StrUtil.EMPTY);
|
||||
}
|
||||
// public static String getDefaultLabelByValue(String value, Long employeeId, String tenantKey) {
|
||||
// return Arrays.stream(SalarySendGrantTypeEnum.values()).filter(r -> r.getValue().equals(value)).findFirst()
|
||||
// .map(SalarySendGrantTypeEnum::getDefaultLabel)
|
||||
// .orElse(StrUtil.EMPTY);
|
||||
// }
|
||||
|
||||
public SalarySendGrantTypeEnum fromValue(String value) {
|
||||
for (SalarySendGrantTypeEnum salarySendGrantTypeEnum : values()) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.engine.salary.enums.BaseEnum;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
public enum PaymentScopeEnum implements BaseEnum<Integer> {
|
||||
SCOPE_COMPANY(1, SalaryI18nUtil.getI18nLabel(1851, "公司"), 1851),
|
||||
|
|
@ -32,16 +33,25 @@ public enum PaymentScopeEnum implements BaseEnum<Integer> {
|
|||
return this.defaultLable;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value){
|
||||
if (value == null) {
|
||||
return "";
|
||||
};
|
||||
PaymentScopeEnum[] enumAry = PaymentScopeEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
// public static String getDefaultLabelByValue(Integer value){
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// };
|
||||
// PaymentScopeEnum[] enumAry = PaymentScopeEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
public static PaymentScopeEnum parseByValue(Integer value) {
|
||||
for (PaymentScopeEnum optionalAdjustReason : PaymentScopeEnum.values()) {
|
||||
if (Objects.equals(optionalAdjustReason.getValue(), value)) {
|
||||
return optionalAdjustReason;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,16 +49,16 @@ public enum RententionRuleEnum implements BaseEnum<Integer> {
|
|||
return this.defaultLabel;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
RententionRuleEnum[] enumAry = RententionRuleEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// public static String getDefaultLabelByValue(Integer value) {
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// }
|
||||
// RententionRuleEnum[] enumAry = RententionRuleEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.engine.salary.enums.BaseEnum;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public enum WelfareTypeEnum implements BaseEnum<Integer> {
|
||||
|
|
@ -39,16 +40,26 @@ public enum WelfareTypeEnum implements BaseEnum<Integer> {
|
|||
return this.defaultLabel;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value){
|
||||
if (value == null) {
|
||||
return "";
|
||||
};
|
||||
WelfareTypeEnum[] enumAry = WelfareTypeEnum.values();
|
||||
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
return enumAry[i].getDefaultLabel();
|
||||
// public static String getDefaultLabelByValue(Integer value){
|
||||
// if (value == null) {
|
||||
// return "";
|
||||
// };
|
||||
// WelfareTypeEnum[] enumAry = WelfareTypeEnum.values();
|
||||
// for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
|
||||
// if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
|
||||
// return enumAry[i].getDefaultLabel();
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
public static WelfareTypeEnum parseByValue(Integer value) {
|
||||
for (WelfareTypeEnum optionalAdjustReason : WelfareTypeEnum.values()) {
|
||||
if (Objects.equals(optionalAdjustReason.getValue(), value)) {
|
||||
return optionalAdjustReason;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,11 +180,13 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
|||
Map<Long, DataCollectionEmployee> innerEmployeeMap = simpleEmployeeList.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, v -> v));
|
||||
salaryStatisticsEmployeeListDTOs.forEach(e -> {
|
||||
DataCollectionEmployee simpleEmployee = innerEmployeeMap.get(e.getId());
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(Integer.parseInt(simpleEmployee.getStatus()));
|
||||
e.setName(Objects.isNull(simpleEmployee) ? "" : simpleEmployee.getUsername());
|
||||
e.setSubCompany(simpleEmployee.getSubcompanyName());
|
||||
e.setDepartment(simpleEmployee.getDepartmentName());
|
||||
e.setPosition(simpleEmployee.getJobtitleName());
|
||||
e.setStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())));
|
||||
// e.setStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())));
|
||||
e.setStatus(SalaryI18nUtil.getI18nLabel(user.getLanguage(),userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
e.setJobNum(simpleEmployee.getWorkcode());
|
||||
e.setIdNo(simpleEmployee.getIdNo());
|
||||
});
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
list.forEach(item -> {
|
||||
Map<String, Object> record = new HashMap<>();
|
||||
DataCollectionEmployee simpleEmployee = collect.get(item.getEmployeeId());
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(Integer.parseInt(simpleEmployee.getStatus()));
|
||||
|
||||
record.put("id", item.getId());
|
||||
record.put("employeeId", item.getEmployeeId());
|
||||
record.put("billMonth", item.getBillMonth());
|
||||
|
|
@ -81,7 +83,8 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put("department", simpleEmployee.getDepartmentName());
|
||||
record.put("supplementaryMonth", item.getSupplementaryMonth());
|
||||
record.put("mobile", simpleEmployee.getMobile());
|
||||
record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())) : "");
|
||||
// record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())) : "");
|
||||
record.put("employeeStatus", simpleEmployee.getStatus() != null ? SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()) : "");
|
||||
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
|
||||
record.put("workcode", StringUtils.isBlank(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode());
|
||||
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(user.getLanguage(),from.getLabelId(), from.getDefaultLabel()));
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
List<Column> weaTableColumns = InsuranceComparisonResultBO.buildTableColumns4ComparisonResult(insuranceBaseSet, insurancePerPaySet, insuranceComPaySet, user);
|
||||
//4-通过线上线下两份数据获得对比结果
|
||||
Map<Long, String> schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap();
|
||||
List<Map<String, Object>> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap);
|
||||
List<Map<String, Object>> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, user);
|
||||
|
||||
// 系统值和线下值一致的人员
|
||||
if (queryParam.isOnlyDiffEmployee()) {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,9 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
public class SIArchivesServiceImpl extends Service implements SIArchivesService {
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
private SIArchivesBiz getSiArchivesBiz(User user) {
|
||||
return ServiceUtil.getService(SIArchivesBiz.class, user);
|
||||
}
|
||||
|
||||
private TaxAgentService getTaxAgentService(User user) {
|
||||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
|
|
@ -112,7 +114,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
@Override
|
||||
public Map<String, Object> getPaymentForm(Map<String, Object> params) {
|
||||
Map<String, Object> apidatas = new HashMap<>(16);
|
||||
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
WelfareTypeEnum welfareTypeEnum = (WelfareTypeEnum) params.get("welfareTypeEnum");
|
||||
Long employeeId = Long.valueOf(Util.null2String(params.get("employeeId")));
|
||||
String schemeIdStr = Util.null2String(params.get("schemeId"));
|
||||
|
|
@ -122,15 +124,14 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
schemeId = Long.valueOf(schemeIdStr);
|
||||
}
|
||||
|
||||
apidatas = siArchivesBiz.getPaymentForm(user, welfareTypeEnum, employeeId, (long) user.getUID(), schemeId, paymentOrganization);
|
||||
apidatas = getSiArchivesBiz(user).getPaymentForm(user, welfareTypeEnum, employeeId, (long) user.getUID(), schemeId, paymentOrganization);
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String insert(InsuranceArchivesSaveParam param) {
|
||||
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
siArchivesBiz.insert(param, (long) user.getUID(), user);
|
||||
getSiArchivesBiz(user).insert(param, (long) user.getUID(), user);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -172,8 +173,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
}
|
||||
|
||||
Map<String, Object> apidatas = new HashMap<>(16);
|
||||
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
apidatas = siArchivesBiz.listPage(param, (long) user.getUID());
|
||||
|
||||
apidatas = getSiArchivesBiz(user).listPage(param, (long) user.getUID());
|
||||
|
||||
log.info("各操作计时 {}", sw.prettyPrint());
|
||||
return apidatas;
|
||||
|
|
@ -185,7 +186,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
*/
|
||||
private void handleHistoryData(long currentEmployeeId) {
|
||||
//如果触发历史数据处理,则进行一次全量增员
|
||||
if (siArchivesBiz.createOldInsuranceBaseInfo(currentEmployeeId)) {
|
||||
if (getSiArchivesBiz(user).createOldInsuranceBaseInfo(currentEmployeeId)) {
|
||||
|
||||
//批量增员
|
||||
List<InsuranceArchivesBaseInfoPO> allBaseInfoList = getInsuranceBaseInfoMapper().listAll();
|
||||
|
|
@ -471,8 +472,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
@Override
|
||||
public Map<String, Object> getSearchCondition(Map<String, Object> param) {
|
||||
Map<String, Object> apidatas = new HashMap<>(16);
|
||||
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
apidatas = siArchivesBiz.getSearchCondition(user);
|
||||
apidatas = getSiArchivesBiz(user).getSearchCondition(user);
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
|
@ -499,8 +499,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (insuranceArchivesEmployeePOS == null) {
|
||||
insuranceArchivesEmployeePOS = new ArrayList<>();
|
||||
}
|
||||
List<Map<String, Object>> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS);
|
||||
List<WeaTableColumn> columns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID());
|
||||
List<Map<String, Object>> records = getSiArchivesBiz(user).buildTableData(insuranceArchivesEmployeePOS);
|
||||
List<WeaTableColumn> columns = getSiArchivesBiz(user).buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID());
|
||||
|
||||
//工作簿list
|
||||
List<List<Object>> excelSheetData = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@ public class SICategoryServiceImpl extends Service implements SICategoryService
|
|||
}
|
||||
List<ICategoryListDTO> list = getICategoryMapper().listCustomInsurance(welfareType);
|
||||
list.stream().forEach(DTO -> {
|
||||
DTO.setWelfareTypeSpan( buildWelfareType(new Integer(DTO.getWelfareType())).getDefaultLabel() ); ;
|
||||
WelfareTypeEnum welfareTypeEnum = WelfareTypeEnum.parseByValue(Integer.valueOf(DTO.getWelfareType()));
|
||||
// DTO.setWelfareTypeSpan( buildWelfareType(new Integer(DTO.getWelfareType())).getDefaultLabel() );
|
||||
DTO.setWelfareTypeSpan(SalaryI18nUtil.getI18nLabel(user.getLanguage(), welfareTypeEnum.getLabelId(), welfareTypeEnum.getDefaultLabel()));
|
||||
DTO.setPaymentScopeSpan( buildPaymentScope( DTO.getPaymentScope()));
|
||||
});
|
||||
PageInfo<ICategoryListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, ICategoryListDTO.class);
|
||||
|
|
@ -138,17 +140,29 @@ public class SICategoryServiceImpl extends Service implements SICategoryService
|
|||
}
|
||||
|
||||
private ICategoryDTO convertICategoryPO2DTO(ICategoryPO iCategoryPO){
|
||||
// return ICategoryDTO.builder().id(iCategoryPO.getId()).insuranceName(iCategoryPO.getInsuranceName())
|
||||
// .welfareType(iCategoryPO.getWelfareType())
|
||||
// .welfareTypeSpan(WelfareTypeEnum.getDefaultLabelByValue(iCategoryPO.getWelfareType()))
|
||||
// .paymentScope(iCategoryPO.getPaymentScope())
|
||||
// .paymentScopeSpan(buildPaymentScope(iCategoryPO.getPaymentScope()))
|
||||
// .isUse(iCategoryPO.getIsUse()).build();
|
||||
WelfareTypeEnum welfareTypeEnum = WelfareTypeEnum.parseByValue(iCategoryPO.getWelfareType());
|
||||
return ICategoryDTO.builder().id(iCategoryPO.getId()).insuranceName(iCategoryPO.getInsuranceName())
|
||||
.welfareType(iCategoryPO.getWelfareType())
|
||||
.welfareTypeSpan(WelfareTypeEnum.getDefaultLabelByValue(iCategoryPO.getWelfareType()))
|
||||
.welfareTypeSpan(SalaryI18nUtil.getI18nLabel(user.getLanguage(),welfareTypeEnum.getLabelId(), welfareTypeEnum.getDefaultLabel()))
|
||||
.paymentScope(iCategoryPO.getPaymentScope())
|
||||
.paymentScopeSpan(buildPaymentScope(iCategoryPO.getPaymentScope()))
|
||||
.isUse(iCategoryPO.getIsUse()).build();
|
||||
|
||||
}
|
||||
|
||||
private String buildPaymentScope(String paymentScope) {
|
||||
List<String> paymentScopes = Arrays.asList(paymentScope.split(","));
|
||||
List<String> collect = paymentScopes.stream().map(scope -> PaymentScopeEnum.getDefaultLabelByValue(SalaryEntityUtil.string2Integer(scope))).collect(Collectors.toList());
|
||||
// List<String> collect = paymentScopes.stream().map(scope -> PaymentScopeEnum.getDefaultLabelByValue(SalaryEntityUtil.string2Integer(scope))).collect(Collectors.toList());
|
||||
List<String> collect = paymentScopes.stream().map(scope -> {
|
||||
PaymentScopeEnum paymentScopeEnum = PaymentScopeEnum.parseByValue(SalaryEntityUtil.string2Integer(scope));
|
||||
return SalaryI18nUtil.getI18nLabel(user.getLanguage(),paymentScopeEnum.getLabelId(), paymentScopeEnum.getDefaultLabel());
|
||||
}).collect(Collectors.toList());
|
||||
return StringUtils.join(collect, ",");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
|||
import com.engine.salary.entity.siexport.param.InsuranceExportParam;
|
||||
import com.engine.salary.entity.siexport.po.AccountExportPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.BillStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.EmployeeStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||
|
|
@ -46,8 +47,6 @@ import java.util.*;
|
|||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.engine.salary.enums.UserStatusEnum.getDefaultLabelByValue;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
|
|
@ -215,6 +214,8 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
Map<Long, String> schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap();
|
||||
Map<Long, TaxAgentPO> paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgentPO::getId, Function.identity()));
|
||||
list.forEach(item -> {
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(item.getUserStatus());
|
||||
|
||||
Map<String, Object> record = new HashMap<>();
|
||||
record.put("billMonth", item.getBillMonth());
|
||||
record.put("billStatus", SalaryEnumUtil.enumMatchByValue(item.getBillStatus(), BillStatusEnum.values(), BillStatusEnum.class));
|
||||
|
|
@ -223,7 +224,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
record.put("supplementaryMonth", item.getSupplementaryMonth());
|
||||
record.put("mobile", item.getTelephone());
|
||||
record.put("workcode", item.getWorkcode());
|
||||
record.put("employeeStatus", item.getUserStatus() == null ? "" : getDefaultLabelByValue(item.getUserStatus()));
|
||||
record.put("employeeStatus", item.getUserStatus() == null ? "" : SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
|
||||
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(user.getLanguage(),from.getLabelId(), from.getDefaultLabel()));
|
||||
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId());
|
||||
InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId());
|
||||
InsuranceArchivesOtherSchemePO otherItem = otherSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId());
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(item.getUserStatus());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("employeeName", item.getUserName());
|
||||
map.put("employeeId", item.getEmployeeId());
|
||||
|
|
@ -288,7 +289,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("jobNum", item.getJobNum());
|
||||
map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : "");
|
||||
map.put("mobile", item.getTelephone());
|
||||
map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()));
|
||||
// map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()));
|
||||
map.put("status", item.getUserStatus() == null ? "" : SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
if (socialItem != null) {
|
||||
map.put("socialName", getSiSchemeService().querySchemeName(socialItem.getSocialSchemeId()));
|
||||
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
List<Long> taxAgentIds = tempList.stream().map(SalaryAcctEmployeePO::getTaxAgentId).distinct().collect(Collectors.toList());
|
||||
List<TaxAgentPO> taxAgents = getTaxAgentService(user).listByIds(taxAgentIds);
|
||||
// 转换成列表数据
|
||||
salaryAccEmployeeListDTOS.addAll(SalaryAcctEmployeeBO.convert2EmployeeListDTO(tempList, taxAgents, simpleEmployees));
|
||||
salaryAccEmployeeListDTOS.addAll(SalaryAcctEmployeeBO.convert2EmployeeListDTO(tempList, taxAgents, simpleEmployees, user));
|
||||
}
|
||||
List<List<Object>> rows = Lists.newArrayListWithExpectedSize(salaryAccEmployeeListDTOS.size());
|
||||
for (SalaryAccEmployeeListDTO dto : salaryAccEmployeeListDTOS) {
|
||||
|
|
|
|||
|
|
@ -611,9 +611,13 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
}
|
||||
Optional<SalaryItemAdjustRecordListDTO> optional = listAll.stream().filter(f -> f.getSalaryArchiveId().equals(m.getSalaryArchiveId()) && f.getSalaryItemId().equals(m.getSalaryItemId())).findFirst();
|
||||
m.setAdjustBefore(optional.isPresent() ? optional.get().getAdjustAfter() : "");
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(Integer.parseInt(m.getEmployeeStatus()));
|
||||
// m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus())));
|
||||
m.setEmployeeStatus(SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
|
||||
m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus())));
|
||||
m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
SalaryArchiveItemAdjustReasonEnum salaryArchiveItemAdjustReasonEnum = SalaryArchiveItemAdjustReasonEnum.parseByValue(m.getAdjustReason());
|
||||
// m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
m.setAdjustReason(SalaryI18nUtil.getI18nLabel(user.getLanguage(), salaryArchiveItemAdjustReasonEnum.getLabelId(), salaryArchiveItemAdjustReasonEnum.getDefaultLabel()));
|
||||
});
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -419,7 +419,9 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
// 3.组装数据
|
||||
List<Map<String, Object>> listMaps = new ArrayList<>();
|
||||
salaryArchives.forEach(e -> {
|
||||
e.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(e.getEmployeeStatus())));
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(Integer.parseInt(e.getEmployeeStatus()));
|
||||
// e.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(e.getEmployeeStatus())));
|
||||
e.setEmployeeStatus(SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("id", e.getId());
|
||||
|
|
|
|||
|
|
@ -225,7 +225,10 @@ public class SalaryArchiveTaxAgentServiceImpl extends Service implements SalaryA
|
|||
Optional<TaxAgentPO> optionalAfter = taxAgentList.stream().filter(t -> t.getId().toString().equals(m.getAdjustAfter())).findFirst();
|
||||
m.setAdjustAfter(optionalAfter.isPresent() ? optionalAfter.get().getName() : "");
|
||||
|
||||
m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus())));
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(Integer.parseInt(m.getEmployeeStatus()));
|
||||
// m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus())));
|
||||
m.setEmployeeStatus(SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
|
||||
SalaryArchiveTaxAgentAdjustReasonEnum salaryArchiveTaxAgentAdjustReasonEnum = SalaryArchiveTaxAgentAdjustReasonEnum.parseByValue(m.getAdjustReason());
|
||||
m.setAdjustReason(SalaryI18nUtil.getI18nLabel(user.getLanguage(),salaryArchiveTaxAgentAdjustReasonEnum.getLabelId(), salaryArchiveTaxAgentAdjustReasonEnum.getValue()));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1312,10 +1312,13 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
queryParam.setOrderRule(orderRule);
|
||||
List<SalarySendInfoListDTO> list = salarySendInfoMapper.list(queryParam);
|
||||
list.forEach(e -> {
|
||||
SalarySendStatusEnum salarySendStatusEnum = SalarySendStatusEnum.parseByValue(Integer.parseInt(e.getSendStatus()));
|
||||
// 发放状态
|
||||
e.setSendStatus(SalarySendStatusEnum.getDefaultLabelByValue(Integer.valueOf(e.getSendStatus())));
|
||||
// e.setSendStatus(SalarySendStatusEnum.getDefaultLabelByValue(Integer.valueOf(e.getSendStatus())));
|
||||
e.setSendStatus(SalaryI18nUtil.getI18nLabel(user.getLanguage(),salarySendStatusEnum.getLabelId(), salarySendStatusEnum.getDefaultLabel()));
|
||||
});
|
||||
|
||||
|
||||
// 3.添加行记录
|
||||
// 3.表数据
|
||||
for (SalarySendInfoListDTO dto : list) {
|
||||
|
|
|
|||
|
|
@ -51,8 +51,9 @@ public class TransMethod {
|
|||
* @param sourceType
|
||||
* @return
|
||||
*/
|
||||
public static String fieldSourceType(String sourceType) {
|
||||
return AttendQuoteFieldSourceTypeEnum.getDefaultLabelByValue(Integer.valueOf(sourceType));
|
||||
public static String fieldSourceType(String sourceType, User user) {
|
||||
AttendQuoteFieldSourceTypeEnum attendQuoteFieldSourceTypeEnum = AttendQuoteFieldSourceTypeEnum.parseByValue(Integer.parseInt(sourceType));
|
||||
return SalaryI18nUtil.getI18nLabel(user.getLanguage(), attendQuoteFieldSourceTypeEnum.getLabelId(), attendQuoteFieldSourceTypeEnum.getDefaultLabel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -61,8 +62,9 @@ public class TransMethod {
|
|||
* @param sourceType
|
||||
* @return
|
||||
*/
|
||||
public static String fieldType(String sourceType) {
|
||||
return AttendQuoteFieldTypeEnum.getDefaultLabelByValue(Integer.valueOf(sourceType));
|
||||
public static String fieldType(String sourceType, User user) {
|
||||
AttendQuoteFieldTypeEnum attendQuoteFieldTypeEnum = AttendQuoteFieldTypeEnum.parseByValue(Integer.parseInt(sourceType));
|
||||
return SalaryI18nUtil.getI18nLabel(user.getLanguage(), attendQuoteFieldTypeEnum.getLabelId(), attendQuoteFieldTypeEnum.getDefaultLabel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -71,8 +73,9 @@ public class TransMethod {
|
|||
* @param sourceType
|
||||
* @return
|
||||
*/
|
||||
public static String sourceType(String sourceType) {
|
||||
return AttendQuoteSourceTypeEnum.getDefaultLabelByValue(Integer.valueOf(sourceType));
|
||||
public static String sourceType(String sourceType, User user) {
|
||||
AttendQuoteSourceTypeEnum attendQuoteSourceTypeEnum = AttendQuoteSourceTypeEnum.parseByValue(Integer.parseInt(sourceType));
|
||||
return SalaryI18nUtil.getI18nLabel(user.getLanguage(), attendQuoteSourceTypeEnum.getLabelId(), attendQuoteSourceTypeEnum.getDefaultLabel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -81,8 +84,9 @@ public class TransMethod {
|
|||
* @param roundingMode
|
||||
* @return
|
||||
*/
|
||||
public static String roundingMode(String roundingMode) {
|
||||
return SalaryRoundingModeEnum.getDefaultLabelByValue(Integer.valueOf(roundingMode));
|
||||
public static String roundingMode(String roundingMode, User user) {
|
||||
SalaryRoundingModeEnum salaryRoundingModeEnum = SalaryRoundingModeEnum.parseByValue(Integer.parseInt(roundingMode));
|
||||
return SalaryI18nUtil.getI18nLabel(user.getLanguage(), salaryRoundingModeEnum.getLabelId(), salaryRoundingModeEnum.getDefaultLabel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -90,16 +94,18 @@ public class TransMethod {
|
|||
* @param datasource
|
||||
* @return
|
||||
*/
|
||||
public static String datasource(String datasource) {
|
||||
return SalaryValueTypeEnum.getDefaultLabelByValue(Integer.valueOf(datasource));
|
||||
public static String datasource(String datasource, User user) {
|
||||
SalaryValueTypeEnum salaryValueTypeEnum = SalaryValueTypeEnum.parseByValue(Integer.parseInt(datasource));
|
||||
return SalaryI18nUtil.getI18nLabel(user.getLanguage(), salaryValueTypeEnum.getLabelId(), salaryValueTypeEnum.getDefaultLabel());
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段类型
|
||||
* @return
|
||||
*/
|
||||
public static String dataType(String dataType) {
|
||||
return SalaryDataTypeEnum.getDefaultLabelByValue(dataType);
|
||||
public static String dataType(String dataType, User user) {
|
||||
SalaryDataTypeEnum salaryDataTypeEnum = SalaryDataTypeEnum.parseByValue(dataType);
|
||||
return SalaryI18nUtil.getI18nLabel(user.getLanguage(),salaryDataTypeEnum.getLabelId(), salaryDataTypeEnum.getDefaultLabel());
|
||||
}
|
||||
|
||||
public static String buildSalaryCycle(String salaryCycle,String salaryCycleFromDay, User user) {
|
||||
|
|
|
|||
|
|
@ -55,9 +55,14 @@ public class AttendQuoteFieldWrapper extends Service {
|
|||
List<AttendQuoteFieldListDTO> list = page.getList();
|
||||
list.forEach(m->{
|
||||
Integer sourceType = Integer.valueOf(m.getSourceType());
|
||||
m.setSourceType(AttendQuoteFieldSourceTypeEnum.getDefaultLabelByValue(sourceType));
|
||||
AttendQuoteFieldSourceTypeEnum attendQuoteFieldSourceTypeEnum = AttendQuoteFieldSourceTypeEnum.parseByValue(sourceType);
|
||||
// m.setSourceType(AttendQuoteFieldSourceTypeEnum.getDefaultLabelByValue(sourceType));
|
||||
m.setSourceType(SalaryI18nUtil.getI18nLabel(user.getLanguage(), attendQuoteFieldSourceTypeEnum.getLabelId(), attendQuoteFieldSourceTypeEnum.getDefaultLabel()));
|
||||
m.setSourceTypeValue(AttendQuoteFieldSourceTypeEnum.getNameByValue(sourceType));
|
||||
m.setFieldType(AttendQuoteFieldTypeEnum.getDefaultLabelByValue(Integer.valueOf(m.getFieldType())));
|
||||
|
||||
AttendQuoteFieldTypeEnum attendQuoteFieldTypeEnum = AttendQuoteFieldTypeEnum.parseByValue(Integer.parseInt(m.getFieldType()));
|
||||
// m.setFieldType(AttendQuoteFieldTypeEnum.getDefaultLabelByValue(Integer.valueOf(m.getFieldType())));
|
||||
m.setFieldType(SalaryI18nUtil.getI18nLabel(user.getLanguage(), attendQuoteFieldTypeEnum.getLabelId(), attendQuoteFieldTypeEnum.getDefaultLabel()));
|
||||
});
|
||||
page.setList(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import com.engine.salary.service.SalarySobService;
|
|||
import com.engine.salary.service.impl.AttendQuoteServiceImpl;
|
||||
import com.engine.salary.service.impl.SalarySobServiceImpl;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -58,7 +59,11 @@ public class AttendQuoteWrapper extends Service {
|
|||
|
||||
List<AttendQuoteListDTO> list = page.getList();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(m -> m.setSourceType(AttendQuoteSourceTypeEnum.getDefaultLabelByValue(Integer.valueOf(m.getSourceType()))));
|
||||
// list.forEach(m -> m.setSourceType(AttendQuoteSourceTypeEnum.getDefaultLabelByValue(Integer.valueOf(m.getSourceType()))));
|
||||
list.forEach(m -> {
|
||||
AttendQuoteSourceTypeEnum attendQuoteSourceTypeEnum = AttendQuoteSourceTypeEnum.parseByValue(Integer.parseInt(m.getSourceType()));
|
||||
m.setSourceType(SalaryI18nUtil.getI18nLabel(user.getLanguage(), attendQuoteSourceTypeEnum.getLabelId(), attendQuoteSourceTypeEnum.getDefaultLabel()));
|
||||
});
|
||||
page.setList(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public class SalaryAcctEmployeeWrapper extends Service {
|
|||
List<Long> taxAgentIds = list.stream().map(SalaryAcctEmployeePO::getTaxAgentId).collect(Collectors.toList());
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);
|
||||
// 转换成列表dto
|
||||
List<SalaryAccEmployeeListDTO> salaryAccEmployeeListDTOS = SalaryAcctEmployeeBO.convert2EmployeeListDTO(list, taxAgentPOS, simpleEmployees);
|
||||
List<SalaryAccEmployeeListDTO> salaryAccEmployeeListDTOS = SalaryAcctEmployeeBO.convert2EmployeeListDTO(list, taxAgentPOS, simpleEmployees, user);
|
||||
PageInfo<SalaryAccEmployeeListDTO> pageInfo = new PageInfo<SalaryAccEmployeeListDTO>(salaryAccEmployeeListDTOS, SalaryAccEmployeeListDTO.class);
|
||||
pageInfo.setTotal(page.getTotal());
|
||||
pageInfo.setPageSize(page.getPageSize());
|
||||
|
|
|
|||
|
|
@ -228,8 +228,13 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
Optional<SalaryItemAdjustRecordListDTO> 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.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(Integer.parseInt(m.getEmployeeStatus()));
|
||||
// m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus())));
|
||||
m.setEmployeeStatus(SalaryI18nUtil.getI18nLabel(user.getLanguage(),userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
|
||||
SalaryArchiveItemAdjustReasonEnum salaryArchiveItemAdjustReasonEnum = SalaryArchiveItemAdjustReasonEnum.parseByValue(m.getAdjustReason());
|
||||
// m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
m.setAdjustReason(SalaryI18nUtil.getI18nLabel(user.getLanguage(),salaryArchiveItemAdjustReasonEnum.getLabelId(), salaryArchiveItemAdjustReasonEnum.getDefaultLabel()));
|
||||
});
|
||||
|
||||
return list;
|
||||
|
|
@ -271,7 +276,9 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
.findFirst();
|
||||
m.setAdjustBefore(optional.isPresent() ? optional.get().getAdjustAfter() : "");
|
||||
|
||||
m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
SalaryArchiveItemAdjustReasonEnum salaryArchiveItemAdjustReasonEnum = SalaryArchiveItemAdjustReasonEnum.parseByValue(m.getAdjustReason());
|
||||
// m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
m.setAdjustReason(SalaryI18nUtil.getI18nLabel(user.getLanguage(),salaryArchiveItemAdjustReasonEnum.getLabelId(), salaryArchiveItemAdjustReasonEnum.getDefaultLabel()));
|
||||
|
||||
SingleSalaryItemAdjustRecordListDTO singleSalaryItemAdjustRecordList = new SingleSalaryItemAdjustRecordListDTO();
|
||||
BeanUtils.copyProperties(m, singleSalaryItemAdjustRecordList);
|
||||
|
|
@ -353,7 +360,9 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
Optional<SalaryItemAdjustRecordListDTO> optional = listAll.stream().filter(f -> f.getSalaryArchiveId().equals(m.getSalaryArchiveId()) && f.getSalaryItemId().equals(m.getSalaryItemId())).findFirst();
|
||||
m.setAdjustBefore(optional.isPresent() ? optional.get().getAdjustAfter() : "");
|
||||
|
||||
m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
SalaryArchiveItemAdjustReasonEnum salaryArchiveItemAdjustReasonEnum = SalaryArchiveItemAdjustReasonEnum.parseByValue(m.getAdjustReason());
|
||||
// m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
m.setAdjustReason(SalaryI18nUtil.getI18nLabel(user.getLanguage(),salaryArchiveItemAdjustReasonEnum.getLabelId(), salaryArchiveItemAdjustReasonEnum.getDefaultLabel()));
|
||||
|
||||
SingleSalaryItemAdjustRecordListDTO singleSalaryItemAdjustRecordList = new SingleSalaryItemAdjustRecordListDTO();
|
||||
BeanUtils.copyProperties(m, singleSalaryItemAdjustRecordList);
|
||||
|
|
|
|||
|
|
@ -182,7 +182,9 @@ public class SalaryArchiveTaxAgentWrapper extends Service {
|
|||
Optional<TaxAgentListDTO> optionalAfter = taxAgentList.stream().filter(t -> t.getId().toString().equals(m.getAdjustAfter())).findFirst();
|
||||
m.setAdjustAfter(optionalAfter.isPresent() ? optionalAfter.get().getName() : "");
|
||||
|
||||
m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus())));
|
||||
UserStatusEnum userStatusEnum = UserStatusEnum.parseByValue(Integer.parseInt(m.getEmployeeStatus()));
|
||||
// m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(m.getEmployeeStatus())));
|
||||
m.setEmployeeStatus(SalaryI18nUtil.getI18nLabel(user.getLanguage(), userStatusEnum.getLabelId(), userStatusEnum.getDefaultLabel()));
|
||||
|
||||
SalaryArchiveTaxAgentAdjustReasonEnum salaryArchiveTaxAgentAdjustReasonEnum = SalaryArchiveTaxAgentAdjustReasonEnum.parseByValue(m.getAdjustReason());
|
||||
m.setAdjustReason(SalaryI18nUtil.getI18nLabel(user.getLanguage(),salaryArchiveTaxAgentAdjustReasonEnum.getLabelId(), salaryArchiveTaxAgentAdjustReasonEnum.getValue()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue