Commit 5c5dc71b authored by zhenbin wang's avatar zhenbin wang

feature-wzb:bug修复

parent 3691d45c
...@@ -398,35 +398,64 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -398,35 +398,64 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
salaryImportsSuccessList.stream().forEach(e -> { salaryImportsSuccessList.stream().forEach(e -> {
TMinSalary selectOne = new TMinSalary(); TMinSalary selectOne = new TMinSalary();
selectOne.setId(e.getId()); selectOne.setId(e.getId());
if (e.getLocation().contains("/")) {
String location[] = e.getLocation().split("/"); String location[] = e.getLocation().split("/");
if(location.length>1) { if (location.length > 1) {
for (int i = 0; i < location.length; i++) { for (int i = 0; i < location.length; i++) {
if (i == CommonConstants.ZERO_INT) { if (i == CommonConstants.ZERO_INT) {
int province = baseMapper.selectByAreaName(location[i]); int province = baseMapper.selectByAreaName(location[i]);
selectOne.setProvince(province); selectOne.setProvince(province);
} }
if (i == CommonConstants.ONE_INT) { if (i == CommonConstants.ONE_INT) {
int city = baseMapper.selectByAreaName(location[i]); int city = baseMapper.selectByAreaName(location[i]);
selectOne.setCity(city); selectOne.setCity(city);
} }
if (i == CommonConstants.TWO_INT) { if (i == CommonConstants.TWO_INT) {
int town = baseMapper.selectByAreaName(location[i]); int town = baseMapper.selectByAreaName(location[i]);
selectOne.setTown(town); selectOne.setTown(town);
; ;
}
} }
} }
if (CommonConstants.START.equals(e.getStatus())) {
selectOne.setStatus(CommonConstants.ONE_INT);
}
if (CommonConstants.STOP.equals(e.getStatus())) {
selectOne.setStatus(CommonConstants.TWO_INT);
}
selectOne.setSalaryBase(e.getSalaryBase());
selectOne.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(selectOne);
} }
if (CommonConstants.START.equals(e.getStatus())) { if (e.getLocation().contains("-")) {
selectOne.setStatus(CommonConstants.ONE_INT); String location[] = e.getLocation().split("-");
} if (location.length > 1) {
if (CommonConstants.STOP.equals(e.getStatus())) { for (int i = 0; i < location.length; i++) {
selectOne.setStatus(CommonConstants.TWO_INT); if (i == CommonConstants.ZERO_INT) {
int province = baseMapper.selectByAreaName(location[i]);
selectOne.setProvince(province);
}
if (i == CommonConstants.ONE_INT) {
int city = baseMapper.selectByAreaName(location[i]);
selectOne.setCity(city);
}
if (i == CommonConstants.TWO_INT) {
int town = baseMapper.selectByAreaName(location[i]);
selectOne.setTown(town);
;
}
}
}
if (CommonConstants.START.equals(e.getStatus())) {
selectOne.setStatus(CommonConstants.ONE_INT);
}
if (CommonConstants.STOP.equals(e.getStatus())) {
selectOne.setStatus(CommonConstants.TWO_INT);
}
selectOne.setSalaryBase(e.getSalaryBase());
selectOne.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(selectOne);
} }
selectOne.setSalaryBase(e.getSalaryBase());
selectOne.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(selectOne);
}); });
} }
} }
......
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