| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean editSave(CodeBasicSecDTO codeBasicSecDTO) throws VciBaseException { |
| | | public boolean editSave(CodeBasicSecDTO codeBasicSecDTO) throws ServerException { |
| | | VciBaseUtil.alertNotNull(codeBasicSecDTO, "需要添加的数据对象"); |
| | | KeyValue attrKv = checkAttrNullableBySecType(codeBasicSecDTO); |
| | | if (! "success".equals(attrKv.getKey())){ |
| | | if (!"success".equals(attrKv.getKey())){ |
| | | throw new VciBaseException(attrKv.getValue() + "不能为空"); |
| | | } |
| | | //将DTO转换为DO |
| | |
| | | codeReferConfigService.insert(codeReferConfigVO); |
| | | } |
| | | } |
| | | |
| | | // revisionModelUtil.copyFromDTOIgnore(codeBasicSecDTO, codeBasicSecDO);//此处的拷贝会把referValueInfo的值给覆盖掉,需要重新赋值 |
| | | // revisionModelUtil.copyFromDTOIgnore(codeBasicSecDTO, codeBasicSecDO);//此处的拷贝会把referValueInfo的值给覆盖掉,需要重新赋值 |
| | | BaseModel tempModel = new BaseModel(); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecDO, tempModel); |
| | | BeanUtil.copyProperties(codeBasicSecDTO, codeBasicSecDO,"referValueInfo"); |
| | |
| | | codeBasicSecDO.setDescription(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField("description", codeBasicSecDTO))); |
| | | |
| | | resBoolean = codeBasicSecMapper.updateById(codeBasicSecDO)>0; |
| | | // 从分类码段或固定码段改为其他码段时,判断用户是否选择了清空码值 |
| | | if(codeBasicSecDTO.getIsClearValue()){ |
| | | // 分类码值清空 |
| | | if(codeBasicSecDTO.getSecType().equals(CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue())){ |
| | | codeClassifyValueService.deleteClassifyValueBySecOid(codeBasicSecDTO.getOid()); |
| | | }else { |
| | | //固定码值清空 |
| | | fixedValueService.deleteFixedValueBySecOid(codeBasicSecDTO.getOid()); |
| | | } |
| | | } |
| | | //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | if(StringUtils.isNotBlank(codeBasicSecDO.getCodeFillSeparator())){ |
| | | DictBiz dictBiz = new DictBiz(); |