From b5d91d60a294e1c12a44c79490b761821b3d9f44 Mon Sep 17 00:00:00 2001 From: xiejun <xj@2023> Date: 星期五, 30 六月 2023 18:05:57 +0800 Subject: [PATCH] 顶层批量申请接口导入完善 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java index c324801..ff970e7 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java @@ -1895,9 +1895,30 @@ getFieldIndexMap(titleRowData, attrNameIdMap, fieldIndexMap); Map<String, String> cboOidMap = new HashMap<>(); cboOidMap.put("id", QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])) + ")"); - R<BtmTypeVO> r= btmTypeClient.getDetail(templateVO.getBtmTypeId()); - BtmTypeVO btmTypeVO =r.getData(); - String tableName=btmTypeVO.getTableName(); + String tableName =""; + try { + R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId()); + if(r.getCode()!=200) { + throw new Throwable(r.getMsg()); + } + BtmTypeVO btmTypeVO = r.getData(); + if (btmTypeVO == null) { + throw new Throwable("鏍规嵁涓氬姟绫诲瀷鏈煡璇㈠埌涓氬姟绫诲瀷瀵硅薄锛�"); + } + tableName = btmTypeVO.getTableName(); + if (StringUtils.isBlank(tableName)) { + throw new Throwable("鏍规嵁涓氬姟绫诲瀷鏈煡璇㈠埌涓氬姟绫诲瀷鐩稿叧鑱旂殑琛�"); + } + }catch (Throwable e){ + log.error("鏌ヨ涓氬姟瀵硅薄琛�"+e); + XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO=new XMLResultDataObjectDetailDO(); + xmlResultDataObjectDetailDO.setErrorid("103"); + xmlResultDataObjectDetailDO.setMsg("鏌ヨ涓氬姟瀵硅薄琛�"+e); + xmlResultDataObjectDetailDO.setId(""); + xmlResultDataObjectDetailDO.setCode(""); + resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO); + return; + } StringBuffer sb=new StringBuffer(); sb.append(" select * from "); @@ -3829,8 +3850,8 @@ }else{ if (!CollectionUtils.isEmpty(conditionMap)) { Map<String, String> andConditionMap = new HashMap<>(); - andConditionMap.put("islastr", "1"); - andConditionMap.put("islastv", "1"); + andConditionMap.put("lastr", "1"); + andConditionMap.put("lastv", "1"); conditionMap.putAll(andConditionMap); PageHelper pageHelper = new PageHelper(-1); pageHelper.addDefaultDesc("id"); -- Gitblit v1.9.3