| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | //将DTO转换为DO |
| | | CodeRule codeRule = selectByOid(codeRuleDTO.getOid()); |
| | | revisionModelUtil.copyFromDTOIgnore(codeRuleDTO, codeRule); |
| | | if(!codeRule.getOwner().equals(codeRuleDTO.getOwner())){ |
| | | codeRule.setOwner(codeRuleDTO.getOwner()); |
| | | } |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(codeRule); |
| | | return R.status(codeRuleMapper.updateById(codeRule)>0); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public R checkLikeCodeRule(String oid) throws VciBaseException { |
| | | CodeRuleVO codeRuleVO = getObjectByOid(oid); |
| | | // 1、去掉流水码段,计算出其他码段值长度,在已发布的规则中比对出长度一致的编码规则 |
| | | HashMap<String, Object> condtionMap = new HashMap<>(); |
| | | condtionMap.put("pkCodeRule_equal",codeRuleVO.getOid()); |
| | | condtionMap.put("secType_notequal", CodeSecTypeEnum.CODE_SERIAL_SEC); |
| | | codeRuleVO.setSecVOList(codeBasicSecService.listCodeBasicSecByRuleOid(condtionMap)); |
| | | // 1、查询出当前要发布的规则 |
| | | CodeRuleVO codeRuleVO = getObjectHasSecByOid(oid); |
| | | // 2、找出与当前发布的规则码段顺序一致的规则 |
| | | if(Func.isNotEmpty(codeRuleVO.getSecVOList())){ |
| | | String secType = codeRuleVO.getSecVOList().stream().map(CodeBasicSecVO::getSecType).collect(Collectors.joining(",")); |
| | | |
| | | } |
| | | |
| | | // TODO 待完善 |
| | | |
| | | |
| | |
| | | //如果有lcstatus的类的话 |
| | | vo.setLcStatusText(CodeRuleLC.getTextByValue(vo.getLcStatus())); |
| | | if (hasSec) { |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | condtionMap.put("pkCodeRule",vo.getOid()); |
| | | List<CodeBasicSecVO> codeBasicSecVOS = codeBasicSecService.listCodeBasicSecByRuleOid(condtionMap); |
| | | List<CodeBasicSecVO> codeBasicSecVOS = codeBasicSecService.listCodeBasicSecByRuleOid(vo.getOid()); |
| | | //查询码段 |
| | | vo.setSecVOList(codeBasicSecVOS); |
| | | } |