| | |
| | | //备注 |
| | | cbo.setDescription(orderDTO.getDescription()); |
| | | cboList.add(cbo); |
| | | // |
| | | // cboList.add(cbo); |
| | | |
| | | List<String> codeList = productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(), cboList); |
| | | |
| | | |
| | | // List<String> charList = new ArrayList<>(); |
| | | // for (BaseModel baseModel : cboList) { |
| | | // charList.add(baseModel.getId()); |
| | | // } |
| | | batchSaveSelectChar(templateVO, cboList); |
| | | return codeList.size() > 0 ? codeList.get(0) : ""; |
| | | // return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | if (!CodeLevelTypeEnum.MIN.getValue().equalsIgnoreCase(attrVO.getClassifyInvokeLevel()) && !"min".equalsIgnoreCase(attrVO.getClassifyInvokeLevel())) { |
| | | //指定了层级的 |
| | | //注意,因为查询上级分类出来的层级是倒序的,即顶层节点是最大的值 |
| | | List<CodeClassifyVO> classifyVOS = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel()))).collect(Collectors.toList()); |
| | | List<CodeClassifyVO> classifyVOS = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> -o2.getDataLevel().compareTo(o1.getDataLevel()))).collect(Collectors.toList()); |
| | | int level = VciBaseUtil.getInt(attrVO.getClassifyInvokeLevel()); |
| | | if (classifyVOS.size() >= level && level > 0) { |
| | | classifyVO = classifyVOS.get(level - 1); |
| | |
| | | return dataList; |
| | | } |
| | | |
| | | /** |
| | | /** |
| | | * 根据当前申请编码的分类,逐层往上校验是否符合属于配置的中的分类子节点的分 |
| | | * 类,如果符合,则该分类申请的编码为集团码返回true,反之则为企业编码返回false |
| | | * @param parameter 传入数据,classifyGroupCode:配置的中的分类顶节点,oid:选择节点的oid |
| | | */ |
| | | @Override |
| | | public R checkGroupCode(Map<String, String> parameter) { |
| | | List<CodeClassify> codeClassifyList = classifyService.selectAllLevelParentByOid(parameter.get("oid")); |
| | | Set<String> configGroupCode = Arrays.stream(parameter.get("classifyGroupCode").split("#")).collect(Collectors.toSet()); |
| | | // Boolean checkGroupFlag = false;//是否查询到配置的顶层分类中 |
| | | for (int i = codeClassifyList.size()-1; i >= 0; i--) { |
| | | if(configGroupCode.contains(codeClassifyList.get(i).getId())){ |
| | | // checkGroupFlag = true; |
| | | return R.data("true"); |
| | | } |
| | | // if(checkGroupFlag && parameter.get("nowApplyCode").equals(codeClassifyList.get(i).getId())){ |
| | | // return R.data(true); |
| | | // } |
| | | } |
| | | return R.data("false"); |
| | | } |
| | | |
| | | /** |
| | | * 封装关键属性的查询语句 |
| | | * |
| | | * @param value 当前的值 |
| | |
| | | return phaseAttrService.listAttrByTemplateOidAndPhaseId(templateVO.getOid(), phase); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 路径上包含当前分类的所有分类信息 |
| | | * |
| | |
| | | CodeSecTypeEnum.CODE_FIXED_SEC.getValue(), |
| | | CodeSecTypeEnum.CODE_VARIABLE_SEC.getValue(), |
| | | CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue(), |
| | | CodeSecTypeEnum.CODE_REFER_SEC.getValue() |
| | | CodeSecTypeEnum.CODE_REFER_SEC.getValue(), |
| | | CodeSecTypeEnum.CODE_DATE_SEC.getValue() |
| | | ); |
| | | // 只读码段类型 |
| | | List<String> readOnlyTypes = Arrays.asList( |
| | | CodeSecTypeEnum.CODE_LEVEL_SEC.getValue(), |
| | | CodeSecTypeEnum.CODE_ATTR_SEC.getValue(), |
| | | CodeSecTypeEnum.CODE_DATE_SEC.getValue() |
| | | CodeSecTypeEnum.CODE_ATTR_SEC.getValue() |
| | | ); |
| | | // 隐藏码段类型 |
| | | /*List<String> hideType = Arrays.asList( |
| | |
| | | // 日期码段设置默认值 |
| | | if (secVO.getSecType().equals(CodeSecTypeEnum.CODE_DATE_SEC.getValue())) { |
| | | try { |
| | | secVO.setCodeDateFormatStr(Func.format(new Date(),secVO.getCodeDateFormatStr())); |
| | | secVO.setCodeDateValue(Func.format(new Date(),secVO.getCodeDateFormatStr())); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("日期码段日期格式配置有误,导致转换出错:"+e.getMessage()); |
| | | } |
| | |
| | | // 日期码段设置默认值 |
| | | if (secVO.getSecType().equals(CodeSecTypeEnum.CODE_DATE_SEC.getValue())) { |
| | | try { |
| | | secVO.setCodeDateFormatStr(Func.format(new Date(),secVO.getCodeDateFormatStr())); |
| | | secVO.setCodeDateValue(Func.format(new Date(),secVO.getCodeDateFormatStr())); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("日期码段日期格式配置有误,导致转换出错:"+e.getMessage()); |
| | | } |
| | |
| | | // 日期码段设置默认值 |
| | | if (secVO.getSecType().equals(CodeSecTypeEnum.CODE_DATE_SEC.getValue())) { |
| | | try { |
| | | secVO.setCodeDateFormatStr(Func.format(new Date(),secVO.getCodeDateFormatStr())); |
| | | secVO.setCodeDateValue(Func.format(new Date(),secVO.getCodeDateFormatStr())); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("日期码段日期格式配置有误,导致转换出错:"+e.getMessage()); |
| | | } |
| | |
| | | } else { |
| | | if (CollectionUtils.isEmpty(fullInfoBO.getParentClassifyVOs())) { |
| | | //说明已经是最高层级, |
| | | throw new VciBaseException("当前主题库分类,以及它的所有的上级分类都没有设置编码规则"); |
| | | throw new ServiceException("当前主题库分类,以及它的所有的上级分类都没有设置编码规则"); |
| | | } |
| | | List<CodeClassifyVO> parentClassifyVOList = fullInfoBO.getParentClassifyVOs().stream().sorted((o1, o2) -> o1.getDataLevel().compareTo(o2.getDataLevel())).collect(Collectors.toList()); |
| | | //从最高的level开始获取 |
| | |
| | | } |
| | | } |
| | | if (StringUtils.isBlank(codeRuleOid)) { |
| | | throw new VciBaseException("当前主题库分类,以及它的所有的上级分类都没有设置编码规则"); |
| | | throw new ServiceException("当前主题库分类,以及它的所有的上级分类都没有设置编码规则"); |
| | | } |
| | | } |
| | | return ruleService.getObjectHasSecByOid(codeRuleOid); |
| | |
| | | //使用业务类型查询 |
| | | R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getAllAttributeByBtmId(referConfigVO.getReferType()); |
| | | if (!allAttributeByBtmId.isSuccess()) { |
| | | throw new ServiceException("业务类型feign接口调用错误!"); |
| | | throw new ServiceException("业务类型feign接口调用错误;"+allAttributeByBtmId.getMsg()); |
| | | } |
| | | if (Func.isEmpty(allAttributeByBtmId.getData())) { |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | |
| | | if (listR.getData().isEmpty()) { |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | | } |
| | | // TODO:参照配置的模糊查询过滤条件暂未处理 |
| | | String namesql = ""; |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("name"))) { |
| | | String s = baseQueryObject.getConditionMap().get("name"); |
| | |
| | | treeWrapperOptions.setParentOid(queryObject.getParentOid()); |
| | | return revisionModelUtil.doList2Trees(codeClassifies, treeWrapperOptions, null); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean checkUnAttrUnEdit(String attrName) { |