fix:优化业绩指标导入功能
This commit is contained in:
parent
3597a58b9e
commit
8e2a9316f3
@ -112,14 +112,20 @@ public class ZhPerformanceIndicatorsServiceImpl extends ServiceImpl<ZhPerformanc
|
||||
zhPerformanceIndicator.setProjectReviewSupportIndex(data.getColJ());
|
||||
}
|
||||
|
||||
if (zhPerformanceIndicator.getIndex() == null || zhPerformanceIndicator.getIndex().isEmpty()) {
|
||||
throw new RuntimeException("第" + data.getRowNum() + "行【指标】不能为空!");
|
||||
}
|
||||
|
||||
ZhPerformanceIndicators sqlPI = baseMapper.selectOne(new LambdaQueryWrapper<ZhPerformanceIndicators>()
|
||||
.eq(ZhPerformanceIndicators::getUnit, unit)
|
||||
.eq(ZhPerformanceIndicators::getIndex, data.getIndex())
|
||||
.eq(ZhPerformanceIndicators::getUnit, zhPerformanceIndicator.getUnit())
|
||||
.eq(ZhPerformanceIndicators::getIndex, zhPerformanceIndicator.getIndex())
|
||||
.eq(ZhPerformanceIndicators::getDeleteFlag, 0)
|
||||
);
|
||||
if (sqlPI != null) {
|
||||
String id = sqlPI.getId();
|
||||
BeanUtil.copyProperties(zhPerformanceIndicator, sqlPI);
|
||||
sqlPI.setUpdateTime(new Date());
|
||||
sqlPI.setId(id);
|
||||
updateNum.addAndGet(baseMapper.updateById(sqlPI));
|
||||
} else {
|
||||
zhPerformanceIndicator.setId(IdUtils.fastSimpleUUID());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user