| | |
| | | * @return 执行结果 |
| | | * @throws VciBaseException 参数为空,唯一项,必输项不通过时会抛出异常 |
| | | */ |
| | | @Override |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean addSave(CodeBasicSecDTO codeBasicSecDTO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(codeBasicSecDTO, "需要添加的数据对象",codeBasicSecDTO.getPkCodeRule(),"编码规则的主键"); |
| | |
| | | //引用码段的时候,需要判断参照的信息是否正确 |
| | | if(CodeSecTypeEnum.CODE_REFER_SEC.getValue().equalsIgnoreCase(codeBasicSecDO.getSecType())){ |
| | | if(StringUtils.isBlank(codeBasicSecDO.getReferConfig())){ |
| | | throw new VciBaseException("引用码段的时候,需要填写 参照配置的内容"); |
| | | throw new VciBaseException("引用码段的时候,需要填写参照配置的内容"); |
| | | } |
| | | try{ |
| | | //JSONObject.parseObject(codeBasicSecDO.getReferConfig(), UIFormReferVO.class); |
| | |
| | | wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleVO.getOid()) |
| | | .eq(CodeBasicSec::getSerialDependFlag,"true") |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | .orderByAsc(CodeBasicSec::getOrderNum); |
| | | //.orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | List<CodeBasicSec> codeBasicSecList = this.list(wrapper); |
| | | if(!CollectionUtils.isEmpty(codeBasicSecList)){ |
| | | List<CodeBasicSecVO> codeBasicSecVOS = codeBasicSecDO2VOs(codeBasicSecList); |
| | |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleOid) |
| | | .in(CodeBasicSec::getOid,codeBasicSecOidList) |
| | | .eq(CodeBasicSec::getSerialDependFlag,"true") |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | //TODO: SerialDependOrder本来是用来流水排序的,但是现在的逻辑是按照orderuNum排序的 |
| | | .orderByAsc(CodeBasicSec::getOrderNum); //.orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | List<CodeBasicSec> codeBasicSecList = this.list(wrapper); |
| | | |
| | | //按流水依赖顺序,处理流水依赖码段的值 |
| | |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleOid) |
| | | .in(CodeBasicSec::getOid,codeBasicSecOidList) |
| | | .eq(CodeBasicSec::getSerialDependFlag,"true") |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | .orderByAsc(CodeBasicSec::getOrderNum); //.orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | |
| | | List<CodeBasicSec> codeBasicSecList = this.list(wrapper); |
| | | //按流水依赖顺序,处理流水依赖码段的值 |
| | | List<String> serialDependValueList = new ArrayList<>(); |