| | |
| | | * @param authUser |
| | | * @return |
| | | */ |
| | | private String addSaveBZCode(CodeBZApplyDTO codeBZApplyDTO, boolean authUser) throws Exception { |
| | | public String addSaveBZCode(CodeBZApplyDTO codeBZApplyDTO, boolean authUser) throws Exception { |
| | | String code=""; |
| | | VciBaseUtil.alertNotNull(codeBZApplyDTO.getCodeClassifyOid(), "主题库分类的主键", |
| | | codeBZApplyDTO.getTemplateOid(), "模板的主键", codeBZApplyDTO.getCodeRuleOid(), "编码规则的主键"); |
| | |
| | | LinkedList<CodeOrderSecDTO> newSecDTOList=new LinkedList<>(); |
| | | changeCodeOrderSecDTO(ruleVO,secDTOS,oldCode,newSecDTOList);//根据要求重新算码段码值 |
| | | if(!codeBZApplyDTO.isEditSeries()){//变更为标准 |
| | | if(!codeBZApplyDTO.isSeries()){//如果是表准,则需要将系列好流水置为null |
| | | //if(!codeBZApplyDTO.isSeries()){//如果是表准,则需要将系列好流水置为null |
| | | //因为是标准则控制码段中的系列流水码段值为空 |
| | | newSecDTOList.stream().forEach(codeOrderSecDTO -> { |
| | | if(codeCodeBasicSecMap.containsKey(codeOrderSecDTO.getSecOid())&&codeCodeBasicSecMap.get(codeOrderSecDTO.getSecOid()).getName().equals(secName)){ |
| | | codeOrderSecDTO.setSecValue(""); |
| | | } |
| | | }); |
| | | } |
| | | //} |
| | | orderDTO.setSecDTOList(newSecDTOList); |
| | | return createDataBZ(orderDTO,ruleVO,authUser); |
| | | }else{//变更为系列.则按照逻辑去处理 |
| | | |
| | | |
| | | orderDTO.setSecDTOList(newSecDTOList); |
| | | return createDataBZ(orderDTO,ruleVO,authUser); |
| | | } |
| | | return ""; |
| | | } |
| | | private String createDataBZ(CodeOrderDTO orderDTO, CodeRuleVO ruleVO,boolean authUser) throws Exception { |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public String addSaveBZCodeNotauthUser(CodeBZApplyDTO codeBZApplyDTO, boolean authUser) throws Exception { |
| | | return addSaveBZCode(codeBZApplyDTO,authUser); |
| | | } |
| | |
| | | toBo.setVersionSeq(Integer.valueOf(nextRevision.get("VERSIONSEQ").toString())); |
| | | toBo.setVersionValue(nextRevision.get("VERSIONVAL").toString()); |
| | | toBo.setLctid(fromBo.getLctid()); |
| | | toBo.setLcStatus("Editing"); |
| | | //toBo.setLcStatus("Editing"); |
| | | toBo.setLcStatus(CodeDefaultLC.RELEASED.getValue()); |
| | | toBo.setId(fromBo.getId()); |
| | | toBo.setName(fromBo.getName()); |
| | | toBo.setDescription(fromBo.getDescription()); |