代码提交

topo_dev
liu 1 year ago
parent 36d31349ef
commit bdca697ef0

@ -124,14 +124,18 @@ public class ModelServiceImpl implements ModelService {
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
//保存原子指标结果表 // 非人工填写的,需要进行更新结果,人工填写的不更新(人工填写的编码,需要进行特殊处理)
ModelAtomicResult exist = modelAtomicResultMapper.selectByCaseIdAndAtomicId(analyseCaseDTO.getCaseId(), casePerson.getId(), atomicIndex.getId()); if (!"1".equals(atomicIndex.getIndexSource())){
if (exist == null) { //保存原子指标结果表
modelAtomicResultMapper.insert(result); ModelAtomicResult exist = modelAtomicResultMapper.selectByCaseIdAndAtomicId(analyseCaseDTO.getCaseId(), casePerson.getId(), atomicIndex.getId());
} else { if (exist == null) {
result.setId(exist.getId()); modelAtomicResultMapper.insert(result);
modelAtomicResultMapper.updateById(result); } else {
result.setId(exist.getId());
modelAtomicResultMapper.updateById(result);
}
} }
// 所有原子指标id,判断结果 // 所有原子指标id,判断结果
Set<String> checkAtomicResult = Set.of("-1", "0", "1"); Set<String> checkAtomicResult = Set.of("-1", "0", "1");
if (!checkAtomicResult.contains(result.getAtomicResult())) { if (!checkAtomicResult.contains(result.getAtomicResult())) {

Loading…
Cancel
Save