Commit 5dadfe34 authored by 位宇华's avatar 位宇华

--代码提交

parent 5bc36f76
...@@ -48,25 +48,20 @@ public class SalaryCurrentRuleServiceImpl implements SalaryCurrentRuleService { ...@@ -48,25 +48,20 @@ public class SalaryCurrentRuleServiceImpl implements SalaryCurrentRuleService {
salary.setSourceExpenses(source.getExpenseSource()); salary.setSourceExpenses(source.getExpenseSource());
} }
})); }));
// System.err.println(JSON.toJSONString(salaryExcelModels));
int count = salaryMapper.exist(mineCode, salaryDate); int count = salaryMapper.exist(mineCode, salaryDate);
if (count > 0) { if (count > 0) {
//salaryMapper.delete(salaryDate, mineCode);
List<String> stringList = salaryMapper.selectByDateAndMineCode(salaryDate, mineCode); List<String> stringList = salaryMapper.selectByDateAndMineCode(salaryDate, mineCode);
if (!CollectionUtils.isEmpty(stringList)) { if (!CollectionUtils.isEmpty(stringList)) {
List<SalaryExcelModel> includeCollect = salaryExcelModels.stream().filter(value -> stringList.contains(value.getOrg())).collect(Collectors.toList()); List<SalaryExcelModel> includeCollect = salaryExcelModels.stream().filter(value -> stringList.contains(value.getOrg())).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(includeCollect)) { if (!CollectionUtils.isEmpty(includeCollect)) {
System.err.println(JSON.toJSONString(includeCollect));
includeCollect.forEach(salaryMapper::updateByDateAndProject); includeCollect.forEach(salaryMapper::updateByDateAndProject);
} }
List<SalaryExcelModel> noIncludeCollect = salaryExcelModels.stream().filter(value -> !stringList.contains(value.getOrg())).collect(Collectors.toList()); List<SalaryExcelModel> noIncludeCollect = salaryExcelModels.stream().filter(value -> !stringList.contains(value.getOrg())).collect(Collectors.toList());
System.err.println(JSON.toJSONString(noIncludeCollect));
if (!CollectionUtils.isEmpty(noIncludeCollect)) { if (!CollectionUtils.isEmpty(noIncludeCollect)) {
salaryMapper.save(noIncludeCollect); salaryMapper.save(noIncludeCollect);
} }
} }
}else { }else {
System.err.println(JSON.toJSONString(salaryExcelModels));
salaryMapper.save(salaryExcelModels); salaryMapper.save(salaryExcelModels);
} }
}); });
......
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