薪酬系统-多语言,合并231201产品分支代码,并处理冲突,更新多语言译文脚本,将多个脚本合并为一个

This commit is contained in:
sy 2023-12-13 16:43:51 +08:00
parent 538633ece0
commit 8b0f04c020
33 changed files with 543245 additions and 37 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -638,7 +638,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId());
insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString());
//判断是否在起始缴纳月和最后缴纳月之间
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), otherPO.getOtherStartTime(), otherPO.getOtherEndTime());
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), otherPO.getOtherStartTime(), otherPO.getOtherEndTime(), user);
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) {
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(otherPO.getOtherSchemeId());
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class, user);
@ -796,7 +796,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId());
insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString());
//判断是否在起始缴纳月和最后缴纳月之间
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), fundPO.getFundStartTime(), fundPO.getFundEndTime());
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), fundPO.getFundStartTime(), fundPO.getFundEndTime(), user);
if ((NonPaymentEnum.YES.getValue() == fundPO.getNonPayment() || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) {
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(fundPO.getFundSchemeId());
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class, user);
@ -953,7 +953,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId());
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
//判断是否在起始缴纳月和最后缴纳月之间
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), socialPO.getSocialStartTime(), socialPO.getSocialEndTime(), user);
if ((NonPaymentEnum.YES.getValue().equals(socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) {
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialPO.getSocialSchemeId());
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class, user);
@ -1539,7 +1539,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId());
insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString());
//判断是否在起始缴纳月和最后缴纳月之间
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, otherPO.getOtherStartTime(), otherPO.getOtherEndTime());
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, otherPO.getOtherStartTime(), otherPO.getOtherEndTime(), user);
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) {
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(otherPO.getOtherSchemeId());
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class, user);
@ -1680,7 +1680,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId());
insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString());
//判断是否在起始缴纳月和最后缴纳月之间
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, fundPO.getFundStartTime(), fundPO.getFundEndTime());
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, fundPO.getFundStartTime(), fundPO.getFundEndTime(), user);
if ((Objects.equals(NonPaymentEnum.YES.getValue(), fundPO.getNonPayment()) || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) {
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(fundPO.getFundSchemeId());
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class, user);
@ -1820,7 +1820,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId());
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
//判断是否在起始缴纳月和最后缴纳月之间
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime(), user);
if ((Objects.equals(NonPaymentEnum.YES.getValue(), socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) {
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialPO.getSocialSchemeId());
encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class, user);
@ -1966,7 +1966,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId());
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
//判断是否在起始缴纳月和最后缴纳月之间
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime(), user);
if ((Objects.equals(NonPaymentEnum.YES.getValue(), socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) {
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialPO.getSocialSchemeId());

View File

@ -127,11 +127,11 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
public SalaryStatisticsPushDetail getPushDetail(SalaryStatisticsPushDetailParam param) {
SalaryStatisticsPushPO salaryStatisticsPushPO = getSalaryStatisticsPushMapper().getById(param.getId());
if (Objects.isNull(salaryStatisticsPushPO)) {
throw new SalaryRunTimeException("该分享记录不存在");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 542148, "数据不存在"));
}
Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID());
if (needAuth && salaryStatisticsPushPO.getCreator().compareTo(Long.valueOf(user.getUID())) != 0) {
throw new SalaryRunTimeException("无权查看该分享记录");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 542146, "您无权查看该数据!"));
}
SalaryStatisticsPushDetail result = new SalaryStatisticsPushDetail();
result.setDetailForm(buildDetailForm(salaryStatisticsPushPO));
@ -232,7 +232,7 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
public void cancel(Long id) {
SalaryStatisticsPushDetailPO detailPO = getSalaryStatisticsPushDetailService(user).getById(id);
if (ObjectUtils.isEmpty(detailPO)) {
throw new SalaryRunTimeException("该明细不存在");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 542148, "数据不存在"));
}
cancelSingle(detailPO);
}

View File

@ -221,7 +221,7 @@ public class SalaryStatisticsReportWrapper extends Service {
*/
public void duplicate(Long id) {
if (id == null) {
throw new SalaryRunTimeException("id为空");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),542257, "id为空"));
}
getSalaryStatisticsReportService(user).duplicate(id);
}
@ -302,7 +302,7 @@ public class SalaryStatisticsReportWrapper extends Service {
// 判断报表是否是登陆人创建的,或薪酬总管理员
Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID());
if (needAuth && NumberUtils.compare(po.getCreator().intValue(), user.getUID()) != 0) {
throw new SalaryRunTimeException("无权限查看该报表");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),545062, "无权限查看该报表"));
}
}
@ -501,7 +501,7 @@ public class SalaryStatisticsReportWrapper extends Service {
// 判断报表是否是登陆人创建的,或薪酬总管理员
Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID());
if (needAuth && NumberUtils.compare(po.getCreator().intValue(), user.getUID()) != 0) {
throw new SalaryRunTimeException("无权限查看该报表");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),545062, "无权限查看该报表"));
}
}
}

View File

@ -1742,7 +1742,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
if(!checkBalancePayInsurance(updatePO)) {
isError = true;
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(0, "导入数据中存在福利档案中未设置的福利项缴纳数值!"));
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(user.getLanguage(), 545928, "导入数据中存在福利档案中未设置的福利项缴纳数值!"));
excelComments.add(errorMessageMap);
} else {
updateInsuranceAccountDetailList.add(updatePO);
@ -2995,7 +2995,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
public String getTotalSign(String total) {
if (StringUtils.isNotBlank(total)) {
return total.contains(SalaryI18nUtil.getI18nLabel(0,"社保")) ? "social" : (total.contains(SalaryI18nUtil.getI18nLabel(0,"公积金")) ? "fund" : "other" );
return total.contains(SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967,"社保")) ? "social" : (total.contains(SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969,"公积金")) ? "fund" : "other" );
} else {
return "";
}
@ -3403,7 +3403,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
if(!checkBalancePayInsurance(createPO)) {
isError = true;
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(0, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!"));
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(user.getLanguage(),545746, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!"));
excelComments.add(errorMessageMap);
}
@ -3430,7 +3430,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
if(!checkBalancePayInsurance(updatePO)) {
isError = true;
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(0, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!"));
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(user.getLanguage(),545746, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!"));
excelComments.add(errorMessageMap);
}
@ -3708,7 +3708,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
.paymentOrganization(po.getPaymentOrganization())
.build());
if (commonAccountPO != null) {
encryptUtil.decrypt(commonAccountPO, InsuranceAccountDetailPO.class);
encryptUtil.decrypt(commonAccountPO, InsuranceAccountDetailPO.class, user);
//判断社保缴纳福利项是否合规
boolean socialPayFlag = true;
Map<String, String> socialPerPayMap = JSON.parseObject(po.getSocialPerJson(), new HashMap<String, String>().getClass());

View File

@ -120,7 +120,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
.paymentOrganization(paymentOrganization)
.build());
if (socialSchemePOList.size() > 0) {
encryptUtil.decryptList(socialSchemePOList, InsuranceArchivesSocialSchemePO.class);
encryptUtil.decryptList(socialSchemePOList, InsuranceArchivesSocialSchemePO.class, user);
socialSchemePO = socialSchemePOList.get(0);
}
@ -129,7 +129,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
.paymentOrganization(paymentOrganization)
.build());
if (fundSchemePOList.size() > 0) {
encryptUtil.decryptList(fundSchemePOList, InsuranceArchivesFundSchemePO.class);
encryptUtil.decryptList(fundSchemePOList, InsuranceArchivesFundSchemePO.class, user);
fundSchemePO = fundSchemePOList.get(0);
}
@ -138,7 +138,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
.paymentOrganization(paymentOrganization)
.build());
if (otherSchemePOList.size() > 0) {
encryptUtil.decryptList(otherSchemePOList, InsuranceArchivesOtherSchemePO.class);
encryptUtil.decryptList(otherSchemePOList, InsuranceArchivesOtherSchemePO.class, user);
otherSchemePO = otherSchemePOList.get(0);
}
@ -153,7 +153,9 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
socialMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
Map<String, String> comMap = new HashMap<>();
@ -185,7 +187,9 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId());
fundMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
Map<String, String> comMap = new HashMap<>();
@ -217,7 +221,9 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId());
otherMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
Map<String, String> comMap = new HashMap<>();
@ -252,7 +258,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
//入参判断
if (param.getPaymentOrganization() == null || StringUtils.isBlank(param.getBillMonth()) || param.getEmployeeId() == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "参数错误"));
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 389204, "参数错误"));
}
Long employeeId = param.getEmployeeId();
@ -268,7 +274,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
.build());
if (banlanceAccountPO != null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补差数据已存在,不可重复新增!"));
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),545747, "补差数据已存在,不可重复新增!"));
}
InsuranceAccountDetailPO insuranceAccountDetailPO = new InsuranceAccountDetailPO();
@ -319,13 +325,13 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
// 其他福利档案
accountOtherByData(insuranceAccountDetailPO, param);
account(insuranceAccountDetailPO);
encryptUtil.encrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
encryptUtil.encrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class, user);
getInsuranceAccountDetailMapper().batchSaveAccountDetails(Collections.singletonList(insuranceAccountDetailPO));
//刷新bill_batch表中统计信息
getSIAccountService(user).refreshBillBatch(paymentOrganization, billMonth);
} else {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!"));
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),545746, "补差数据中存在福利档案中未设置的福利项缴纳数值,请检查补差缴纳信息!"));
}
}

View File

@ -878,7 +878,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
List<Object> finalWeaTableColumns = new ArrayList<>();
// 查询薪资核算所用的薪资账套的员工信息字段
List<SalarySobEmpFieldPO> salarySobEmpFieldPOS = getSalarySobEmpFieldService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
List<SalarySobEmpFieldDTO> salarySobEmpFieldDTOS = new SalarySobItemAggregateBO().buildEmpField(salarySobEmpFieldPOS);
List<SalarySobEmpFieldDTO> salarySobEmpFieldDTOS = new SalarySobItemAggregateBO().buildEmpField(salarySobEmpFieldPOS, user);
salarySobEmpFieldDTOS.stream().forEach(empField -> finalWeaTableColumns.add(new WeaTableColumnGroup("150", SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()), SalaryI18nUtil.getI18nLabel(0, empField.getFieldName()))));
for (WeaTableColumnGroup tableColumn : weaTableColumns) {
WeaTableColumnGroup columnGroupItem = (WeaTableColumnGroup) tableColumn;
@ -1012,8 +1012,8 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
Map<String, Long> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getName, TaxAgentPO::getId);
// 薪资核算人员信息字段
List<SalarySobEmpFieldPO> salarySobEmpFieldPOS = getSalarySobEmpFieldService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
List<String> salarySobEmpFields = SalaryEntityUtil.properties(new SalarySobItemAggregateBO().buildEmpField(salarySobEmpFieldPOS), SalarySobEmpFieldDTO::getFieldName, Collectors.toList());
List<String> excludeFields = Arrays.asList("个税扣缴义务人", "部门", "姓名");
List<String> salarySobEmpFields = SalaryEntityUtil.properties(new SalarySobItemAggregateBO().buildEmpField(salarySobEmpFieldPOS, user), SalarySobEmpFieldDTO::getFieldName, Collectors.toList());
List<String> excludeFields = Arrays.asList(SalaryI18nUtil.getI18nLabel(user.getLanguage(),537996, "个税扣缴义务人"), SalaryI18nUtil.getI18nLabel(user.getLanguage(),27511,"部门"), SalaryI18nUtil.getI18nLabel(user.getLanguage(),25034,"姓名"));
salarySobEmpFields = salarySobEmpFields.stream().filter(field -> !excludeFields.contains(field)).collect(Collectors.toList());
// 索引(用于计算进度)
int index = 0;

View File

@ -438,7 +438,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
// 获取薪资项目信息
SalaryItemPO salaryItemPO = salaryItemBiz.getById(param.getSalaryItemId());
if (salaryItemPO == null) {
throw new SalaryRunTimeException("薪资项目不存在或已被删除");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 544767, "薪资项目不存在或已被删除"));
}
// 获取薪资账套中薪资项目信息
List<SalarySobItemPO> salarySobItemPOS = getSalarySobItemService(user).listBySalaryItemIds(Collections.singleton(param.getSalaryItemId()));

View File

@ -9,6 +9,7 @@ import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import org.jetbrains.annotations.NotNull;
import weaver.general.BaseBean;
import weaver.hrm.User;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -548,7 +549,7 @@ public class SalaryDateUtil {
}
@NotNull
public static Boolean monthInRange(String billMonth, String startMonth, String endMonth) {
public static Boolean monthInRange(String billMonth, String startMonth, String endMonth, User user) {
billMonth = billMonth + "-01";
Date billMonthDate = SalaryDateUtil.dateStrToLocalDate(billMonth);
Boolean inDataRange = true;
@ -556,7 +557,7 @@ public class SalaryDateUtil {
startMonth = startMonth + "-01";
Date socialStartDate = SalaryDateUtil.dateStrToLocalDate(startMonth);
if(socialStartDate == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "年月解析异常,请检查档案中相关数据设置") + ":" + startMonth.substring(0, startMonth.length() - 3));
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),545745, "年月解析异常,请检查档案中相关数据设置") + ":" + startMonth.substring(0, startMonth.length() - 3));
} else if (billMonthDate.before(socialStartDate)) {
inDataRange = false;
}
@ -565,7 +566,7 @@ public class SalaryDateUtil {
endMonth = endMonth + "-01";
Date socialEndDate = SalaryDateUtil.dateStrToLocalDate(endMonth);
if(socialEndDate == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "年月解析异常,请检查档案中相关数据设置") + ":" + endMonth.substring(0, endMonth.length() - 3));
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),545745, "年月解析异常,请检查档案中相关数据设置") + ":" + endMonth.substring(0, endMonth.length() - 3));
} else if (billMonthDate.after(socialEndDate)) {
inDataRange = false;
}

View File

@ -598,7 +598,7 @@ public class SalaryArchiveWrapper extends Service {
public List<SalaryArchiveFormDTO> getSalaryArchiveInfoV2(SalaryArchiveProcessQueryParam param) {
if (param.getEmployeeId() == null) {
throw new SalaryRunTimeException("人员id为空!");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),542596, "人员id为空"));
}
SalaryArchivePO po = SalaryArchivePO.builder().employeeId(param.getEmployeeId()).build();
if (param.getTaxAgentId() != null) {
@ -610,7 +610,7 @@ public class SalaryArchiveWrapper extends Service {
List<SalaryArchivePO> list = getSalaryArchiveService(user).listSome(po);
if (CollectionUtils.isEmpty(list)) {
throw new SalaryRunTimeException("薪资档案不存在!");
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),542356, "薪资档案不存在!"));
}
return list.stream().map(a -> getFrom(a.getId())).collect(Collectors.toList());