Commit 8aa94b20 authored by 位宇华's avatar 位宇华

--代码提交

parent eb873996
......@@ -46,7 +46,7 @@ public class SalaryCurrentRuleServiceImpl implements SalaryCurrentRuleService {
if (!StringUtils.equalsAny(mineCode, "010105")) {
List<SalaryExpenseSourceModel> sourceModels = salaryMapper.getSources(mineCode);
salaryExcelModels.forEach(salary -> sourceModels.forEach(source -> {
if (StringUtils.equals(salary.getOrg(), source.getOrg())) {
if (StringUtils.contains(salary.getOrg(), source.getOrg())) {
salary.setSourceExpenses(source.getExpenseSource());
}
}));
......
package com.ruoyi.system.support;
import com.alibaba.fastjson.JSON;
import com.ruoyi.system.constant.CoalConstant;
import com.ruoyi.system.mapper.SalaryMapper;
import com.ruoyi.system.model.newrule.NewRuleRequestModel;
......@@ -125,14 +126,7 @@ public class CurrentRuleSalarySupport {
* @return
*/
private static List<SalaryExcelModel> getLxMineSalaryData(List<NewRuleRequestModel> newRuleSalaryRequestModelList) {
newRuleSalaryRequestModelList = newRuleSalaryRequestModelList.stream().map(v -> {
v.setColoumn(v.getColoumn().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setRow(v.getRow().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setMineid(v.getMineid().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setValue(v.getValue().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setWageMonth(v.getWageMonth().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
return v;
}).collect(Collectors.toList());
ReplaceSpace(newRuleSalaryRequestModelList);
List<SalaryExcelModel> salaryExcelModelList = getSalaryMapping(newRuleSalaryRequestModelList);
salaryExcelModelList.forEach(v -> {
if (StringUtils.isNotBlank(v.getSumSalary())) {
......@@ -144,6 +138,8 @@ public class CurrentRuleSalarySupport {
return salaryExcelModelList.stream().filter(v -> !StringUtils.containsAny(v.getOrg(), "小计", "总计", "合计")).collect(Collectors.toList());
}
/**
* 东欢坨矿
*
......@@ -151,6 +147,7 @@ public class CurrentRuleSalarySupport {
* @return
*/
private static List<SalaryExcelModel> getDhtMineSalaryData(List<NewRuleRequestModel> newRuleSalaryRequestModelList) {
ReplaceSpace(newRuleSalaryRequestModelList);
return getSalaryMapping(newRuleSalaryRequestModelList);
}
......@@ -264,4 +261,14 @@ public class CurrentRuleSalarySupport {
BigDecimal multiply = new BigDecimal(sumSalary).multiply(new BigDecimal(coefficient));
return multiply.setScale(2, RoundingMode.HALF_UP).toString();
}
private static void ReplaceSpace(List<NewRuleRequestModel> newRuleSalaryRequestModelList) {
newRuleSalaryRequestModelList.forEach(v->{
v.setColoumn(v.getColoumn().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setRow(v.getRow().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setMineid(v.getMineid().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setValue(v.getValue().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
v.setWageMonth(v.getWageMonth().replaceAll(StringUtils.SPACE, StringUtils.EMPTY));
});
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment