| | |
| | | } |
| | | }*/ |
| | | } catch (Exception e) { |
| | | log.error( "部门数据接收失败:",e); |
| | | mesg=e.getMessage(); |
| | | e.printStackTrace(); |
| | | throw new ServiceException(e.getMessage()); |
| | |
| | | String buildSqlwhere=""; |
| | | List<CodeSectionValueVO> codeSectionValueVOList=new ArrayList<>(); |
| | | if(coderefersecSearchVO!=null) { |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | String valueField= coderefersecSearchVO.getValueField(); |
| | | if(StringUtils.isNotBlank(valueField)){ |
| | | condtionMap.put(valueField,sectypeValue); |
| | | } |
| | | if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.DEFAULT.getValue()) || coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.GRID.getValue())) {//默认样式/列表 |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | List<CodeSrchCondConfigVO> codeSrchCondConfigVOList = coderefersecSearchVO.getCodeSrchCondConfigVOS(); |
| | | |
| | | if (!CollectionUtils.isEmpty(codeSrchCondConfigVOList)) { |
| | | codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> { |
| | | condtionMap.put(codeSrchCondConfigVO.getFilterField() + codeSrchCondConfigVO.getFilterType(), codeSrchCondConfigVO.getFilterValue()); |
| | | }); |
| | | } |
| | | if(!CollectionUtils.isEmpty(condtionMap)) { |
| | | buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap); |
| | | } |
| | | |
| | | //使用传入的业务类型查询表 |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId)); |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | |
| | | sb.append(buildSqlwhere); |
| | | } |
| | | List<Map> ListMap = commonsMapper.selectBySql(sb.toString()); |
| | | String valueField = coderefersecSearchVO.getValueField(); |
| | | //String valueField = coderefersecSearchVO.getValueField(); |
| | | String textField = coderefersecSearchVO.getTextField(); |
| | | final int[] num = {0}; |
| | | if (!CollectionUtils.isEmpty(ListMap)) { |
| | |
| | | }); |
| | | } |
| | | }else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.TREE.getValue())) {//树形 |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | |
| | | //使用传入的业务类型查询表 |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId)); |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | |
| | | codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> { |
| | | condtionMap.put(codeSrchCondConfigVO.getFilterField() + codeSrchCondConfigVO.getFilterType(), codeSrchCondConfigVO.getFilterValue()); |
| | | }); |
| | | } |
| | | if(!CollectionUtils.isEmpty(condtionMap)) { |
| | | buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap); |
| | | } |
| | | |
| | | //if("all".equals(coderefersecSearchVO.getLoadType())) { |
| | | String parentOidSql = ""; |
| | | if(StringUtils.isNotBlank(parentValue)){ |
| | |
| | | sb.append(buildSqlwhere); |
| | | } |
| | | List<Map> ListMap = commonsMapper.selectBySql(sb.toString()); |
| | | String valueField = coderefersecSearchVO.getValueField(); |
| | | String textField = coderefersecSearchVO.getTextField(); |
| | | final int[] num = {0}; |
| | | if (!CollectionUtils.isEmpty(ListMap)) { |
| | |
| | | if(!CollectionUtils.isEmpty(codeSectionValueVOList)){ |
| | | Map<String, CodeSectionValueVO> codeSectionValueVOMap = codeSectionValueVOList.stream().collect(Collectors.toMap(s -> s.getValue(), t -> t, (o1, o2) -> o2)); |
| | | if(!codeSectionValueVOMap.containsKey(sectypeValue)){ |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值,在编码系统不存在"; |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值【"+sectypeValue+"】,在编码系统不存在"; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | }else{ |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值,在编码系统不存在"; |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值【"+sectypeValue+"】,在编码系统不存在"; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | } |
| | |
| | | String dataValue = sourceKeyValueMap.get(sourceKey); |
| | | if (attrMapConfigMap.containsKey(sourceKey)) { |
| | | String targetKey = attrMapConfigMap.get(sourceKey); |
| | | log.info("xxxxx属性映射值:sourceKey【"+sourceKey+"】——》+targetKey"+targetKey+":"+dataValue); |
| | | keyValueMap.put(targetKey, StringUtils.isBlank(dataValue)?"":dataValue); |
| | | } |
| | | }); |