| | |
| | | |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.DEFAULT_SYNC_ATTR_LIST; |
| | | import static com.vci.ubcs.code.enumpack.CodeSecTypeEnum.CODE_CLASSIFY_SEC; |
| | | import static com.vci.ubcs.code.enumpack.CodeSecTypeEnum.CODE_REFER_SEC; |
| | | |
| | | /*** |
| | | * 统一接口 |
| | |
| | | } |
| | | }catch (Throwable e){ |
| | | errorid[0] ="101"; |
| | | log.error("接口参数:传入数据参数解析失败",e); |
| | | throw new Throwable("接口参数:传入数据参数解析失败"); |
| | | } |
| | | ClassfysVO classfysVO = interParameterVO.getData().getClassifys(); |
| | |
| | | } catch (Throwable e) { |
| | | List<ApplyDataVO> applyDataVOList= classVO.getObjects().getObject(); |
| | | objerrorCode="1"; |
| | | log.error("编码申请失败:",e); |
| | | if(!CollectionUtils.isEmpty(applyDataVOList)) { |
| | | applyDataVOList.stream().forEach(applyDataVO -> { |
| | | XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO(); |
| | |
| | | resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO); |
| | | } |
| | | e.printStackTrace(); |
| | | log.error(e.getMessage()); |
| | | //log.error(e.getMessage()); |
| | | }finally { |
| | | XMLResultClassfyVO resultClassfyVO = new XMLResultClassfyVO(); |
| | | resultClassfyVO.setClassCode(classVO.getClassCode()); |
| | |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | msg="申请编码失败:"+e.getMessage(); |
| | | log.error(msg); |
| | | //log.error(msg); |
| | | log.error("编码申请失败:",e); |
| | | /* XMLResultSystemVO XMLResultSystemVO=new XMLResultSystemVO(); |
| | | XMLResultSystemVO.setErrorid(errorid); |
| | | XMLResultSystemVO.setMsg("申请编码失败:->"+e.getMessage()); |
| | |
| | | this.saveLogs(systemId, systemId, data, resultStr, issucess[0], msg, "applyCode"); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | log.error(e.getMessage()); |
| | | //log.error(e.getMessage()); |
| | | log.error("保存日志出错,原因:",e); |
| | | } |
| | | } |
| | | log.info("返回参数:"+resultStr); |
| | |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemCode.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | log.error("用户鉴权失败:",e); |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | masterDataList = personData.getMasterData(); |
| | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("数据保存失败:",e); |
| | | mesg=e.getMessage(); |
| | | e.printStackTrace(); |
| | | throw new ServiceException(e.getMessage()); |
| | |
| | | success.set(false); |
| | | message = "人员数据接收失败:"+e.getMessage(); |
| | | msg = "人员数据接收失败:"+e.getMessage(); |
| | | log.error( "人员数据接收失败:",e); |
| | | //组织返回结果 |
| | | boolean finalSuccess = success.get(); |
| | | String finalMessage = message; |
| | |
| | | //记录日志 |
| | | this.saveLogs(systemCode, systemCode, data, resultStr, success.get(), msg, "syncDataForPerson"); |
| | | }catch (Throwable e){ |
| | | log.error( "日志保存失败:",e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemCode.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | log.error( "用户鉴权失败:",e); |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | orgMasterDataList = orgData.getMasterData(); |
| | |
| | | success.set(false); |
| | | message = "部门数据接收失败:"+e.getMessage(); |
| | | msg = "部门数据接收失败:"+e.getMessage(); |
| | | log.error( "部门数据接收失败:",e); |
| | | //组织返回结果 |
| | | boolean finalSuccess = success.get(); |
| | | String finalMessage = message; |
| | |
| | | //记录日志 |
| | | this.saveLogs(systemCode, systemCode, data, resultStr, success.get(), msg, "syncDataForOrg"); |
| | | }catch (Throwable e){ |
| | | log.error( "保存日志失败:",e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid = "1"; |
| | | log.error("用户鉴权失败",e); |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | |
| | | mdmIOService.batchSyncEditDatas(codeClassifyVO,dataObjectVO, resultDataObjectDetailDOs,isCodeOrGroupCode); |
| | | log.info("end:修改数据执行完毕"); |
| | | } catch (Throwable e) { |
| | | msg="编码更改/状态更改/删除:"; |
| | | log.error(msg,e); |
| | | List<ApplyDataVO> applyDataVOList= classVO.getObjects().getObject(); |
| | | objerrorCode="1"; |
| | | if(!CollectionUtils.isEmpty(applyDataVOList)) { |
| | |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | msg="编码更改/状态更改/删除:"+e.getMessage(); |
| | | log.error(msg,e); |
| | | /* XMLResultSystemVO XMLResultSystemVO=new XMLResultSystemVO(); |
| | | XMLResultSystemVO.setErrorid(errorid); |
| | | XMLResultSystemVO.setMsg("申请编码失败:->"+e.getMessage()); |
| | |
| | | //记录日志 |
| | | this.saveLogs(systemId, systemId, data, resultStr, issucess[0], msg, "syncEditData"); |
| | | }catch (Throwable e){ |
| | | log.error("保存日志失败",e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | errorid = "101"; |
| | | msg="接口参数:传入数据参数解析失败"; |
| | | e.printStackTrace(); |
| | | log.error("接口参数:传入数据参数解析失败",e); |
| | | throw new Throwable("接口参数:传入数据参数解析失败"); |
| | | } |
| | | QueryData queryData=queryClassifyVO.getData(); |
| | |
| | | resultData.setLibrary(libraryVo); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | |
| | | msg="查询分类失败:"+e.getMessage(); |
| | | log.error(msg,e); |
| | | }finally { |
| | | resultData.setErrorid(errorid); |
| | | resultData.setMsg(msg); |
| | |
| | | //记录日志 |
| | | this.saveLogs(systemId, systemId, data, resultStr, issucess, msg, "queryClassify"); |
| | | }catch (Throwable e){ |
| | | log.error("保存日志信息失败:",e); |
| | | e.printStackTrace(); |
| | | } |
| | | log.info("返回参数:"+resultStr); |
| | |
| | | errorid = "101"; |
| | | msg = "接口参数:传入数据参数解析失败"; |
| | | e.printStackTrace(); |
| | | log.error( "接口参数:传入数据参数解析失败",e); |
| | | throw new Throwable("接口参数:传入数据参数解析失败"); |
| | | } |
| | | CondtionsVO condtionsVO=dataCondtionsVO.getCondtions(); |
| | |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid = "1"; |
| | | log.error("用户鉴权失败",e); |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | CondtionVO condtionVO= condtionsVO.getCondtion(); |
| | |
| | | } |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | |
| | | msg="查询数据失败:"+e.getMessage(); |
| | | log.error(msg,e); |
| | | }finally { |
| | | resultDataVO.setErrorid(errorid); |
| | | resultDataVO.setMsg(msg); |
| | |
| | | try { //记录日志 |
| | | this.saveLogs(systemId, systemId, data, resultStr, issucess, msg, "queryData"); |
| | | }catch (Throwable e){ |
| | | log.error("保存日志信息失败:",e); |
| | | e.printStackTrace(); |
| | | } |
| | | log.info("返回参数:"+resultStr); |
| | |
| | | } catch (Throwable e) { |
| | | errorid = "101"; |
| | | msg = "接口参数:传入数据参数解析失败"; |
| | | log.error(msg,e); |
| | | e.printStackTrace(); |
| | | throw new Throwable("接口参数:传入数据参数解析失败"); |
| | | } |
| | |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid = "1"; |
| | | log.error("用户鉴权失败",e); |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | |
| | |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | msg="查询分类失败:"+e.getMessage(); |
| | | log.error("查询分类失败:",e); |
| | | }finally { |
| | | resultClassifyRuleData.setErrorid(errorid); |
| | | resultClassifyRuleData.setMsg(msg); |
| | |
| | | //记录日志 |
| | | this.saveLogs(systemId, systemId, data, resultStr, issucess, msg, "queryClassifyRule"); |
| | | }catch (Throwable e){ |
| | | log.error("保存日志信息失败:",e); |
| | | e.printStackTrace(); |
| | | } |
| | | log.info("返回参数:"+resultStr); |
| | |
| | | } |
| | | } catch (Throwable e) { |
| | | errorid[0] = "101"; |
| | | log.error("接口参数:传入数据参数解析失败:",e); |
| | | throw new Throwable("接口参数:传入数据参数解析失败"); |
| | | } |
| | | classfyBZVO = applyBZParamVO.getData().getClassify(); |
| | |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid[0] = "1"; |
| | | log.error("用户鉴权失败:",e); |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | //这是账号信息 |
| | |
| | | } catch (Throwable e) { |
| | | objerrorCode = "1"; |
| | | msg="编码申请失败:" +e.getMessage(); |
| | | log.error(msg,e); |
| | | e.printStackTrace(); |
| | | }finally { |
| | | XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO(); |
| | |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | msg="申请编码失败:"+e.getMessage(); |
| | | log.error(msg,e); |
| | | }finally { |
| | | XMLResultSystemVO xmlResultSystemVO=new XMLResultSystemVO(); |
| | | xmlResultSystemVO.setClassifys(resultClassfyVOList); |
| | |
| | | //记录日志 |
| | | this.saveLogs(systemId, systemId, data, resultStr, issucess[0], msg, "applyCodeForBZ"); |
| | | }catch (Throwable e){ |
| | | log.error("保存日志信息失败:",e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | } |
| | | }catch (Throwable e){ |
| | | objerrorCode="100"; |
| | | log.error("获取分类信息失败:",e); |
| | | throw new Throwable("获取分类信息失败:"+e.getMessage()); |
| | | } |
| | | return classifyVO; |
| | |
| | | } |
| | | }catch (Throwable e){ |
| | | objerrorCode="100"; |
| | | log.error("获取分类信息失败:",e); |
| | | throw new Throwable("获取分类信息失败:"+e.getMessage()); |
| | | } |
| | | return classifyVO; |
| | |
| | | Map<String,String> errorMap=new HashMap<>(); |
| | | for(CodeBasicSecVO codeBasicSecVO: codeBasicSecVOS) { |
| | | String sectype = codeBasicSecVO.getSecType(); |
| | | String newSecName=codeBasicSecVO.getName(); |
| | | // String newSecName=codeBasicSecVO.getName(); |
| | | String classifySecOid= codeBasicSecVO.getOid(); |
| | | String message=""; |
| | | if (!sectype.equals(CodeSecTypeEnum.CODE_SERIAL_SEC.getValue())) { |
| | |
| | | CodeOrderSecDTO.setSecOid(codeBasicSecVO.getOid()); |
| | | String sectypeValue = sectionVOMap.get(name); |
| | | log.info("码段值:"+sectypeValue); |
| | | CodeSecTypeEnum secType = CodeSecTypeEnum.forValue(sectype); |
| | | if(CODE_CLASSIFY_SEC.equals(secType)) {//如果是分类的话,则需要匹配传过来的分类代号与 |
| | | // CodeSecTypeEnum secType = CodeSecTypeEnum.forValue(sectype); |
| | | if(CODE_CLASSIFY_SEC.getValue().equals(sectype)) {//如果是分类的话,则需要匹配传过来的分类代号与 |
| | | //先简称是否有关联模板,有模板要先删除 |
| | | List<CodeClassifyValue> codeClassifyValueDOList = codeClassifyValueService.list(Wrappers.<CodeClassifyValue>query().lambda().eq(CodeClassifyValue::getCodeClassifySecOid,classifySecOid)); |
| | | |
| | | if (!CollectionUtils.isEmpty(codeClassifyValueDOList)) { |
| | | Map<String, CodeClassifyValue> codeClassifyValueDOMap = codeClassifyValueDOList.stream().collect(Collectors.toMap(s -> s.getId(), t -> t, (o1, o2) -> o2)); |
| | | if(codeClassifyValueDOMap.containsKey(sectypeValue)){ |
| | |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | } |
| | | }else if(CODE_REFER_SEC.getValue().equals(sectype)){ |
| | | String referBtmId=codeBasicSecVO.getReferBtmId(); |
| | | String btmName=codeBasicSecVO.getReferBtmName(); |
| | | String referConfig= codeBasicSecVO.getReferConfig(); |
| | | CoderefersecSearchVO coderefersecSearchVO=new CoderefersecSearchVO(); |
| | | if(StringUtils.isNotBlank(referConfig)){ |
| | | coderefersecSearchVO = JSONObject.toJavaObject(JSONObject.parseObject(referConfig), CoderefersecSearchVO.class); |
| | | } |
| | | String buildSqlwhere=""; |
| | | List<CodeSectionValueVO> codeSectionValueVOList=new ArrayList<>(); |
| | | if(coderefersecSearchVO!=null) { |
| | | 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()); |
| | | }); |
| | | buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap); |
| | | } |
| | | |
| | | //使用传入的业务类型查询表 |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId)); |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | | } |
| | | String referTable = listR.getData().get(0).getTableName(); |
| | | StringBuffer sb = new StringBuffer(); |
| | | sb.append(" select * from "); |
| | | sb.append(referTable); |
| | | sb.append(" where 1=1 "); |
| | | if (StringUtils.isNotBlank(buildSqlwhere)) { |
| | | 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)) { |
| | | ListMap.stream().forEach(map -> { |
| | | num[0]++; |
| | | String id = Func.isNull(map.getOrDefault("OID".toUpperCase(Locale.ROOT), "")) ? "" : map.getOrDefault("OID".toUpperCase(Locale.ROOT), "").toString(); |
| | | String value = Func.isNull(map.getOrDefault(valueField.toUpperCase(Locale.ROOT), "")) ? "" : map.getOrDefault(valueField.toUpperCase(Locale.ROOT), "").toString(); |
| | | String text = Func.isNull(map.getOrDefault(textField.toUpperCase(Locale.ROOT), "")) ? "" : map.getOrDefault(textField.toUpperCase(Locale.ROOT), "").toString(); |
| | | String description = Func.isNull(map.getOrDefault("description".toUpperCase(Locale.ROOT), "")) ? "" : map.getOrDefault("description".toUpperCase(Locale.ROOT), "").toString(); |
| | | CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num[0] + "", value, id, "", description); |
| | | codeSectionValueVOList.add(sectionValueVO); |
| | | }); |
| | | } |
| | | }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) { |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | | } |
| | | String referTable = listR.getData().get(0).getTableName(); |
| | | |
| | | String oidFieldName = StringUtils.isNotBlank(coderefersecSearchVO.getParentUsedField())?coderefersecSearchVO.getParentUsedField():coderefersecSearchVO.getValueField(); |
| | | String parentValue =coderefersecSearchVO.getParentValue(); |
| | | String parentFieldName =StringUtils.isBlank(coderefersecSearchVO.getParentFieldName())?"":coderefersecSearchVO.getParentFieldName(); |
| | | List<CodeSrchCondConfigVO> codeSrchCondConfigVOList = coderefersecSearchVO.getCodeSrchCondConfigVOS(); |
| | | List<CodeShowFieldConfigVO> codeShowFieldConfigVOS=coderefersecSearchVO.getCodeShowFieldConfigVOS(); |
| | | if (!CollectionUtils.isEmpty(codeSrchCondConfigVOList)) { |
| | | codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> { |
| | | condtionMap.put(codeSrchCondConfigVO.getFilterField() + codeSrchCondConfigVO.getFilterType(), codeSrchCondConfigVO.getFilterValue()); |
| | | }); |
| | | buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap); |
| | | } |
| | | |
| | | //if("all".equals(coderefersecSearchVO.getLoadType())) { |
| | | String parentOidSql = ""; |
| | | if(StringUtils.isNotBlank(parentValue)){ |
| | | String temp=parentValue; |
| | | if(temp.startsWith(QueryOptionConstant.IN)){ |
| | | temp = temp.substring((QueryOptionConstant.IN).length()).trim(); |
| | | parentOidSql = " in " + ((temp.startsWith("(") && temp.endsWith(")"))?temp:"(" + temp + ")"); |
| | | }else if(temp.startsWith(QueryOptionConstant.NOTIN)){ |
| | | parentOidSql = " not in " + ((temp.startsWith("(") && temp.endsWith(")"))?temp:"(" + temp + ")"); |
| | | }else if(temp.startsWith(QueryOptionConstant.NOTEQUAL)){ |
| | | temp = temp.substring((QueryOptionConstant.NOTEQUAL).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.NOTEQUAL + " " + ((temp.startsWith("'") && temp.endsWith("'"))?temp:"'" + temp + "'"); |
| | | }else if(temp.startsWith(QueryOptionConstant.MORETHAN)){ |
| | | temp = temp.substring((QueryOptionConstant.MORETHAN).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.MORETHAN + " " + ((temp.startsWith("'") && temp.endsWith("'"))?temp:"'" + temp + "'"); |
| | | }else if(temp.startsWith(QueryOptionConstant.MORE)){ |
| | | temp = temp.substring((QueryOptionConstant.MORE).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.MORE + " " + ((temp.startsWith("'") && temp.endsWith("'"))?temp:"'" + temp + "'"); |
| | | }else if(temp.startsWith(QueryOptionConstant.LESSTHAN)){ |
| | | temp = temp.substring((QueryOptionConstant.LESSTHAN).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.LESSTHAN + " " + ((temp.startsWith("'") && temp.endsWith("'"))?temp:"'" + temp + "'"); |
| | | }else if(temp.startsWith(QueryOptionConstant.LESS)){ |
| | | temp = temp.substring((QueryOptionConstant.LESS).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.LESS + " " + ((temp.startsWith("'") && temp.endsWith("'"))?temp:"'" + temp + "'"); |
| | | }else if (temp.startsWith(QueryOptionConstant.ISNOTNULL)) { |
| | | parentOidSql = " is not null"; |
| | | } else if (temp.startsWith(QueryOptionConstant.ISNULL)) { |
| | | parentOidSql = " is null"; |
| | | } else if(temp.contains("*")){ |
| | | parentOidSql = " like " + ((temp.startsWith("'") && temp.endsWith("'"))?temp:"'" + temp + "'").replace("*","%"); |
| | | }else { |
| | | parentOidSql = " = " + ((temp.startsWith("'") && temp.endsWith("'"))?temp:"'" + temp + "'"); |
| | | } |
| | | } |
| | | //查询全部的信息 |
| | | buildSqlwhere+= " and oid in (select oid from " +referTable + " START WITH " + coderefersecSearchVO.getParentFieldName() + " "+ |
| | | parentOidSql + |
| | | " CONNECT BY PRIOR " + oidFieldName + " = " + parentFieldName + ")"; |
| | | StringBuffer sb = new StringBuffer(); |
| | | sb.append(" select * from "); |
| | | sb.append(referTable); |
| | | sb.append(" where 1=1 "); |
| | | if (StringUtils.isNotBlank(buildSqlwhere)) { |
| | | 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)) { |
| | | ListMap.stream().forEach(map -> { |
| | | num[0]++; |
| | | String id =Func.isNull(map.getOrDefault("OID".toUpperCase(Locale.ROOT), ""))?"":map.getOrDefault("OID".toUpperCase(Locale.ROOT), "").toString(); |
| | | String value =Func.isNull(map.getOrDefault(valueField.toUpperCase(Locale.ROOT), ""))?"":map.getOrDefault(valueField.toUpperCase(Locale.ROOT), "").toString(); |
| | | String text =Func.isNull(map.getOrDefault(textField.toUpperCase(Locale.ROOT), ""))?"":map.getOrDefault(textField.toUpperCase(Locale.ROOT), "").toString(); |
| | | String description =Func.isNull(map.getOrDefault("description".toUpperCase(Locale.ROOT), ""))?"":map.getOrDefault("description".toUpperCase(Locale.ROOT), "").toString(); |
| | | String pid =Func.isNull(map.getOrDefault(parentFieldName.toUpperCase(Locale.ROOT), ""))?"":map.getOrDefault(parentFieldName.toUpperCase(Locale.ROOT), "").toString(); |
| | | CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num[0] + "", value, text, pid, description); |
| | | codeSectionValueVOList.add(sectionValueVO); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | 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()+",其对应的值,在编码系统不存在"; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | }else{ |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值,在编码系统不存在"; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | } |
| | | if(StringUtils.isBlank(sectypeValue)&&!newSecName.equals(secName)){ |
| | | message="传入的分类码段:【" + name + " 】的值不允许为空"; |
| | | |
| | | if(StringUtils.isBlank(sectypeValue)&&!name.equals(secName)){ |
| | | message="传入的码段:【" + name + " 】的值不允许为空"; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | CodeOrderSecDTO.setSecValue(sectypeValue); |
| | |
| | | } catch (Throwable e) { |
| | | objerrorCode = "1"; |
| | | e.printStackTrace(); |
| | | log.error("集成系统属性配置文件读取失败:",e); |
| | | throw new Throwable("集成系统标识为:【" + systemId + "】,分类库为:【" + libray + "】的集成属性配置文件读取失败"); |
| | | } |
| | | // String path = stringStringMap.get(systemId); |
| | |
| | | dataObjectVO.setRowData(rowDataList); |
| | | }catch (Throwable e){ |
| | | objerrorCode="1"; |
| | | throw new Throwable("组织数据映射值失败"); |
| | | log.error("组织属性映射值失败:",e); |
| | | throw new Throwable("组织属性映射值失败"); |
| | | } |
| | | } |
| | | |
| | |
| | | } catch (Throwable e) { |
| | | objerrorCode = "1"; |
| | | e.printStackTrace(); |
| | | log.error("集成属性配置文件读取失败:",e); |
| | | throw new Throwable("集成系统标识为:【" + systemId + "】,分类库为:【" + libray + "】的集成属性配置文件读取失败"); |
| | | } |
| | | // String path = stringStringMap.get(systemId); |
| | |
| | | dataObjectVO.setRowData(rowDataList); |
| | | }catch (Throwable e){ |
| | | objerrorCode="1"; |
| | | throw new Throwable("组织数据映射值失败"); |
| | | log.error("组织属性映射值失败:",e); |
| | | throw new Throwable("组织属性映射值失败"); |
| | | } |
| | | } |
| | | |