From f07aca58c4e1d96c8e75c90b021b00c593bcffff Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期二, 28 五月 2024 11:36:17 +0800 Subject: [PATCH] 1、平台接口修改以及web端后台的修改。 2、对平台的更新jar包上传。 --- Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java | 45 ++++++++++++++++++++------------------------- 1 files changed, 20 insertions(+), 25 deletions(-) diff --git a/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java b/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java index 314c589..b75e0f4 100644 --- a/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java +++ b/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSONObject; import com.vci.base.common.utility.ObjectUtility; import com.vci.client.common.providers.ServiceProvider; +import com.vci.corba.common.PLException; import com.vci.corba.common.VCIError; import com.vci.corba.omd.qtm.QTInfo; import com.vci.corba.query.ObjectQueryService; @@ -226,7 +227,7 @@ Optional.ofNullable(btmTypeVO.getAttributes()).orElseGet(()->new ArrayList<>()).stream().forEach(attribute->{ try { cbo.setAttributeValueWithNoCheck(attribute.getId(),attribute.getDefaultValue()); - } catch (VCIError vciError) { + } catch (PLException vciError) { if(logger.isErrorEnabled()){ logger.error("璁剧疆灞炴�х殑鍊肩殑鏃跺�欏嚭鐜颁簡閿欒",vciError); } @@ -617,25 +618,19 @@ logger.error("娌℃湁鎵惧埌鏌ヨ鏈嶅姟"); throw new VciBaseException(msgCodePrefix+"qtServerNull", new String[]{}); } - IntHolder count = new IntHolder(); +// IntHolder count = new IntHolder(); ObjectQueryService.FindBTMObjectsV3Result bos = null; - String invo = JSONObject.toJSONString(InvocationUtility.getInvocation()); +// String invo = JSONObject.toJSONString(InvocationUtility.getInvocation()); try{ //bos = qtService.findBTMObjectsV3(invo,qt.getId(), Tool.qtTOXMl(qt).asXML(),count,refOpts.toArray(new BtmRefQueryOption[0])); bos = qtService.findBTMObjectsV3(qt.getId(), Tool.qtTOXMl(qt).asXML(), refOpts.toArray(new BtmRefQueryOption[0])); - }catch (VCIError e){ + }catch (PLException e){ //bos = qtService.findBTMObjectsV4(invo,qt.getId(), Tool.qtTOXMl(qt).asXML(),count,refOpts.toArray(new BtmRefQueryOption[0])); bos = qtService.findBTMObjectsV3(qt.getId(), Tool.qtTOXMl(qt).asXML(), refOpts.toArray(new BtmRefQueryOption[0])); } if (bos != null && bos.count > 0) { for (com.vci.corba.omd.data.BusinessObject bo : bos.returnValue) { com.vci.client.bof.ClientBusinessObject cbo = new com.vci.client.bof.ClientBusinessObject(); -// BusinessObject businessObject = new BusinessObject(bo.oid, bo.revisionid, bo.nameoid, bo.btName, bo.isLastR ? 1 : 0, bo.isFirstR ? 1 : 0, -// bo.isLastV ? 1 : 0, bo.isFirstV ? 1 : 0, bo.creator, String.valueOf(bo.createTime), bo.modifier, String.valueOf(bo.modifyTime), -// bo.revisionRule, bo.versionRule, bo.revisionSeq, bo.revisionValue, bo.versionSeq, -// bo.versionValue, bo.lctId, bo.lcStatus, String.valueOf(bo.ts), bo.id, bo.name, bo.description, -// bo.owner,null, null, null, null, -// bo.fromVersion, copyToAttributeValue(bo.newAttrValList), copyToAttributeValue(bo.hisAttrValList)); cbo.setBusinessObject(bo); queryEnumText(cbo,enumAttrName); allCbos.add(cbo); @@ -643,8 +638,7 @@ //鍥犱负淇敼浜嗘煡璇㈢殑鏂瑰紡锛屾墍浠ュ氨涓嶉渶瑕佸崟鐙煡璇㈠弬鐓� } queryLcStatus(allCbos); - } catch (VCIError e) { - //logger.error(e.error_code,e); + } catch (PLException e) { throw WebUtil.getVciBaseException(e); } return allCbos; @@ -997,10 +991,10 @@ } }); } - }catch(VCIError e){ + }catch(PLException e){ //logger.error(e.error_code,e); //throw WebUtil.getVciBaseException(e); - } catch (DocumentException e) { + } catch (DocumentException | VCIError e) { logger.error("鏌ヨ妯℃澘杞崲",e); throw new VciBaseException(this.msgCodePrefix + "qtError", new Object[]{name}); } @@ -1048,11 +1042,11 @@ try{ // count = platformClientUtil.getQueryService().findTotalCount(); count = Integer.parseInt(String.valueOf(ServiceProvider.getOQService().findTotalCount(qt.getId(), Tool.qtTOXMl(qt).asXML()))); - }catch (VCIError e) { + }catch (PLException e) { try { // count = platformClientUtil.getQueryService().findTotalCount(qt.getId(), Tool.qtTOXMl(qt).asXML()); count = Integer.parseInt(String.valueOf(ServiceProvider.getOQService().findTotalCount(qt.getId(), Tool.qtTOXMl(qt).asXML()))); - }catch (VCIError ee) { + }catch (PLException ee) { // logger.error(ee.error_code,ee); // throw WebUtil.getVciBaseException(ee); } @@ -1210,7 +1204,7 @@ dataList.add(data); } } - } catch (VCIError e) { + } catch (PLException e) { throw WebUtil.getVciBaseException(e); } return dataList; @@ -1284,9 +1278,9 @@ sql = sql.replaceAll(" FROM "," from "); } - AttributeValue[] ava = null; + com.vci.corba.omd.data.AttributeValue[] ava = null; if(conditionMap!=null&&!conditionMap.isEmpty()){ - ava = new AttributeValue[conditionMap.size()]; + ava = new com.vci.corba.omd.data.AttributeValue[conditionMap.size()]; Iterator<String> it = conditionMap.keySet().iterator(); int i = 0 ; while(it.hasNext()){ @@ -1295,15 +1289,16 @@ if(value == null){ value = ""; } - AttributeValue av = new AttributeValue(key, value); + com.vci.corba.omd.data.AttributeValue av = new com.vci.corba.omd.data.AttributeValue(key, value); ava[i] = av; i++; } }else{ - ava = new AttributeValue[0]; + ava = new com.vci.corba.omd.data.AttributeValue[0]; } try { - String[][] results =platformClientUtil.getBOFactoryService().getSqlQueryResult(sql, ava); +// String[][] results =platformClientUtil.getBOFactoryService().getSqlQueryResult(sql, ava); + String[][] results =ServiceProvider.getBOFService().getSqlQueryResult(sql, ava); if(results.length>0){ if(selectKeys==null) { String selectSql = sql.substring(sql.toLowerCase(Locale.ROOT).indexOf("select") + 6, sql.toLowerCase(Locale.ROOT).indexOf(" from")).trim(); @@ -1340,7 +1335,7 @@ }else{ return new ArrayList<Map>(); } - } catch (VCIError e) { + } catch (PLException e) { // logger.error(e.error_code,e); throw WebUtil.getVciBaseException(e); } @@ -1636,7 +1631,7 @@ } else { cbo.setAttributeValueWithNoCheck(attrName.toLowerCase(), value); } - } catch (VCIError e) { + } catch (PLException e) { throw WebUtil.getVciBaseException(e); } } @@ -2345,7 +2340,7 @@ cboArray2Bo(batchCbos.getUpdateCboArray()), cloArray2Lo(batchCbos.getUpdateCloArray()), cboArray2Bo(batchCbos.getDeleteCboArray()), cloArray2Lo(batchCbos.getDeleteCloArray())); - } catch (VCIError e) { + } catch (PLException e) { throw WebUtil.getVciBaseException(e); } } -- Gitblit v1.9.3