| | |
| | | } |
| | | codeAllCodeService.updateBatchById(codeCbos); |
| | | } |
| | | |
| | | /** |
| | | * 申请单一编码 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public String addSaveCode(CodeOrderDTO orderDTO) throws Exception { |
| | | return addSaveCode(orderDTO,true); |
| | | return addSaveCode(orderDTO,true); |
| | | } |
| | | |
| | | /*** |
| | |
| | | public String addSaveCodeNotauthUser(CodeOrderDTO orderDTO, boolean authUser) throws Exception { |
| | | return addSaveCode(orderDTO,authUser); |
| | | } |
| | | |
| | | /** |
| | | * 申请单一编码 |
| | | * |
| | |
| | | //9.生成编码的信息 |
| | | // ClientBusinessObject cbo = boService.createCBOByBtmName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()); |
| | | BaseModel cbo = createCBOByBtmName(classifyFullInfo.getTopClassifyVO().getBtmTypeId()); |
| | | // //默认的属性都不用从前端拷贝 |
| | | // //设置编码需要的默认属性的内容 |
| | | //默认的属性都不用从前端拷贝 |
| | | //设置编码需要的默认属性的内容 |
| | | copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, false); |
| | | cbo.setOid(VciBaseUtil.getPk()); |
| | | cbo.setRevisionOid(VciBaseUtil.getPk()); |
| | |
| | | if(StringUtils.isNotBlank(orderDTO.getLcStatus())||StringUtils.isNotBlank(orderDTO.getData().get("lcStatus"))){ |
| | | cbo.setLcStatus(StringUtils.isNotBlank(orderDTO.getLcStatus())?orderDTO.getLcStatus():orderDTO.getData().get("lcStatus")); |
| | | } |
| | | // //TODO:因为默认的属性都不拷贝,目前集团码叫name,并没有从DTO拷贝到cbo里。增加一个单独处理,以后再看要不要调整 |
| | | //TODO:因为默认的属性都不拷贝,目前集团码叫name,并没有从DTO拷贝到cbo里。增加一个单独处理,以后再看要不要调整 |
| | | cbo.setName(orderDTO.getName() == null ? "" : orderDTO.getName()); |
| | | // //end -- modify by lihang @20220407 |
| | | //end -- modify by lihang @20220407 |
| | | List<BaseModel> cboList = new ArrayList<>(); |
| | | |
| | | //备注 |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断编码的码段是否输入或者选择了码值 |
| | |
| | | List<CodeClassifyTemplateAttrVO> selectAttrVOs = templateVO.getAttributes().stream().filter(s -> StringUtils.isNotBlank(s.getLibraryIdentification())).collect(Collectors.toList()); |
| | | |
| | | if (!CollectionUtils.isEmpty(selectAttrVOs)) { |
| | | // SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | selectAttrVOs.parallelStream().forEach(attrVO -> { |
| | | List<String> valuesList = new ArrayList<>(); |
| | | cboList.parallelStream().forEach(cbo -> { |
| | | // String value = cbo.get.getAttributeValue(attrVO.getId()); |
| | | //String value = cbo.get.getAttributeValue(attrVO.getId()); |
| | | |
| | | //将bean转为map,mybatis统一处理 |
| | | Map<String, String> map = null; |
| | | |
| | | // baseModels.stream().forEach(model-> { |
| | | //baseModels.stream().forEach(model-> { |
| | | try { |
| | | map = VciBaseUtil.convertBean2Map(cbo,null); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("类型转换错误:" + e.getMessage()); |
| | | } |
| | | // }); |
| | | //}); |
| | | |
| | | String value = map.get(attrVO.getId()); |
| | | if (StringUtils.isNotBlank(value)) { |