|
@@ -67,18 +67,37 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
|
|
|
@Override
|
|
|
public boolean saveBatchDto(List<ResponsibilityIndicatorInfoUpdateDTO> infoUpdateDTOs) {
|
|
|
for (ResponsibilityIndicatorInfoUpdateDTO entity : infoUpdateDTOs) {
|
|
|
- ResponsibilityIndicatorInfo indicatorInfo = baseMapper.selectById(entity.getId());
|
|
|
|
|
|
- indicatorInfo.setQuantifiedValue(entity.getQuantifiedValue());//量化值
|
|
|
- indicatorInfo.setNonQuantifiedValue(entity.getNonQuantifiedValue());//非量化值
|
|
|
- indicatorInfo.setUpdateTime(new Date());//更新时间
|
|
|
- indicatorInfo.setUpdateBy(entity.getUpdateBy());//更新者
|
|
|
- indicatorInfo.setRemark(entity.getRemark());//备注
|
|
|
-
|
|
|
- boolean b = super.saveOrUpdate(indicatorInfo);
|
|
|
- if(!b){
|
|
|
- throw new CustomException("更新失败");
|
|
|
+ if (null != entity && null != entity.getId() && !"".equals(entity.getId().trim())) {
|
|
|
+ ResponsibilityIndicatorInfo indicatorInfo = baseMapper.selectById(entity.getId());
|
|
|
+
|
|
|
+ indicatorInfo.setQuantifiedValue(entity.getQuantifiedValue());//量化值
|
|
|
+ indicatorInfo.setNonQuantifiedValue(entity.getNonQuantifiedValue());//非量化值
|
|
|
+ indicatorInfo.setUpdateTime(new Date());//更新时间
|
|
|
+ indicatorInfo.setUpdateBy(entity.getUpdateBy());//更新者
|
|
|
+ indicatorInfo.setRemark(entity.getRemark());//备注
|
|
|
+ boolean b = super.saveOrUpdate(indicatorInfo);
|
|
|
+ if(!b){
|
|
|
+ throw new CustomException("更新失败");
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ ResponsibilityIndicatorInfo addInfo = new ResponsibilityIndicatorInfo();
|
|
|
+ addInfo.setDeptResponsibilityId(entity.getDeptResponsibilityId());
|
|
|
+ addInfo.setOrganizationEvaluationRuleId(entity.getOrganizationEvaluationRuleId());
|
|
|
+ addInfo.setIndicatorId(entity.getIndicatorId());
|
|
|
+// addInfo.setIndicatorDictionaryId(entity.getIndicatorDictionaryId());
|
|
|
+ addInfo.setOptionCode(entity.getOptionCode());
|
|
|
+ addInfo.setIsQuantified(entity.getIsQuantified());
|
|
|
+ addInfo.setQuantifiedValue(entity.getQuantifiedValue());
|
|
|
+ addInfo.setNonQuantifiedValue(entity.getNonQuantifiedValue());
|
|
|
+ addInfo.setRemark(entity.getRemark());//备注
|
|
|
+ addInfo.setCreateTime(new Date());
|
|
|
+ boolean b = super.saveOrUpdate(addInfo);
|
|
|
+ if(!b){
|
|
|
+ throw new CustomException("新增失败");
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
return true;
|
|
|
}
|