From 1bd4203a391832f1f1217e08753b4ed570db3f3d Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 10 四月 2024 11:58:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java |   49 +++++++++++++++++++++++++++----------------------
 1 files changed, 27 insertions(+), 22 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 55b4ed4..cb1e6e2 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
@@ -2,12 +2,16 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.vci.base.common.utility.ObjectUtility;
+import com.vci.client.common.providers.ServiceProvider;
 import com.vci.corba.common.VCIError;
+import com.vci.corba.omd.qtm.QTInfo;
+import com.vci.corba.query.ObjectQueryService;
+import com.vci.corba.query.ObjectQueryServicePrx;
 import com.vci.frameworkcore.compatibility.SmUserQueryServiceI;
 import com.vci.mw.client.InvocationUtility;
 import com.vci.starter.web.annotation.Column;
 import com.vci.starter.web.constant.QueryOptionConstant;
-import com.vci.starter.web.constant.VciSystemVarConstants;
+import com.vci.corba.query.data.BtmRefQueryOption;
 import com.vci.starter.web.enumpck.BooleanEnum;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.DataGrid;
@@ -19,10 +23,11 @@
 import com.vci.web.pageModel.*;
 import com.vci.web.properties.WebProperties;
 import com.vci.web.service.*;
+import com.vci.web.util.Func;
 import com.vci.web.util.PlatformClientUtil;
 import com.vci.web.util.WebUtil;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.tools.ant.taskdefs.condition.Os;
+import org.apache.poi.ss.formula.functions.T;
 import org.dom4j.DocumentException;
 import org.dom4j.DocumentHelper;
 import org.omg.CORBA.IntHolder;
@@ -34,10 +39,8 @@
 import plm.bs.bom.clientobject.ClientBusinessObject;
 import plm.bs.bom.clientobject.ClientLinkObject;
 import plm.bs.bom.common.*;
-import plm.corba.qt.BtmRefQueryOption;
 import plm.corba.qt.KV;
 import plm.corba.qt.QTServiceOperations;
-import plm.corba.qt.QTWrapper;
 import plm.oq.objectQuery.common.*;
 
 import java.lang.reflect.Field;
@@ -140,7 +143,6 @@
 			});
 		}
 	}
-
 
 	/**
 	 * 鍒濆鍖栦笟鍔$被鍨�
@@ -465,7 +467,6 @@
 		return checkDataExsitByColumn(btmName,columnName,Arrays.asList(columnValues.split(",")));
 	}
 
-
 	/**
 	 * 鏍规嵁鏌ヨ鏉′欢鏉ユ煡璇笟鍔$被鍨嬩笅鐨勬暟鎹�
 	 * @param btmType 涓氬姟绫诲瀷鐨勫悕绉帮紝浼氳嚜鍔ㄥ彉鎴愬皬鍐�
@@ -567,7 +568,7 @@
 			clauseList.add("*");
 		}
 		setRightValueToQueryTemplate(qt,conditionMap);//璁剧疆瀵嗙骇鏌ヨ锛屽拰鏁版嵁鏉冮檺鎺у埗
-		List<BtmRefQueryOption> refOpts = new ArrayList<BtmRefQueryOption>();
+		List<com.vci.corba.query.data.BtmRefQueryOption> refOpts = new ArrayList<BtmRefQueryOption>();
 		List<String> enumAttrName = new ArrayList<String>();
 		List<String> thisQueryAttr = new ArrayList<String>();
 		if(clauseList!=null && clauseList.size()>0){
@@ -614,24 +615,27 @@
 		//璁剧疆鍒嗛〉淇℃伅鍜屾帓搴�
 		setPageAndOrderToQT(qt,ph);
 		try {
-			QTServiceOperations qtService = platformClientUtil.getQueryService();
+			// QTServiceOperations qtService = platformClientUtil.getQueryService();
+			ObjectQueryServicePrx qtService = ServiceProvider.getOQService();
 			if(qtService == null){
 				logger.error("娌℃湁鎵惧埌鏌ヨ鏈嶅姟");
 				throw new VciBaseException(msgCodePrefix+"qtServerNull", new String[]{});
 			}
 			IntHolder count = new IntHolder();
-			BusinessObject[] bos = null;
+			ObjectQueryService.FindBTMObjectsV3Result bos = null;
 			String invo = JSONObject.toJSONString(InvocationUtility.getInvocation());
 			try{
-				bos = qtService.findBTMObjectsV4(invo,qt.getId(), Tool.qtTOXMl(qt).asXML(),count,refOpts.toArray(new BtmRefQueryOption[0]));
+				//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){
-				bos = qtService.findBTMObjectsV4(invo,qt.getId(), Tool.qtTOXMl(qt).asXML(),count,refOpts.toArray(new BtmRefQueryOption[0]));
+				//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.length > 0) {
-				for (BusinessObject bo : bos) {
+			if (bos != null && bos.count > 0) {
+				for (com.vci.corba.omd.data.BusinessObject bo : bos.returnValue) {
 					ClientBusinessObject cbo = new ClientBusinessObject();
-					cbo.setBusinessObject(bo);
+					BusinessObject businessObject = Func.copyProperties(bo, BusinessObject.class);
+					cbo.setBusinessObject(businessObject);
 					queryEnumText(cbo,enumAttrName);
 					allCbos.add(cbo);
 				}
@@ -639,8 +643,8 @@
 			}
 			queryLcStatus(allCbos);
 		} catch (VCIError e) {
-//			logger.error(e.error_code,e);
-//			throw WebUtil.getVciBaseException(e);
+			//logger.error(e.error_code,e);
+			throw WebUtil.getVciBaseException(e);
 		}
 		return allCbos;
 	}
@@ -942,14 +946,15 @@
 		QueryTemplate qt = null;
 		try{
 			VciBaseUtil.alertNotNull(name,"鏌ヨ妯℃澘鐨勫悕绉�");
-			QTWrapper wrapper = platformClientUtil.getQueryService().getQT(name);
+			// QTWrapper wrapper = platformClientUtil.getQueryService().getQT(name);
+			QTInfo wrapper = ServiceProvider.getOMDService().getQTDService().getQT(name);
 			qt = Tool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), name);
 			//鍥犱负涔嬪墠骞冲彴鐨凾ool.replaceQTValues 娌℃湁澶勭悊 ${xxx}銆傦紝 涓轰簡蹇界暐澶у皬鍐欙紝鎴戜滑杩欓噷鍗曠嫭澶勭悊 weidy@2021-3-10
 			//鎴戜滑杞崲涓哄皬鍐�
 			Condition condition = qt.getCondition();
 			Map<String,String> replaceLowMap = new HashMap<>();
 			if(condition !=null && condition.getCIMap()!=null){
-				Map<String, String> systemVarValueMap = VciSystemVarConstants.getSystemVarValueMap();
+				// Map<String, String> systemVarValueMap = VciSystemVarConstants.getSystemVarValueMap();
 				if(!CollectionUtils.isEmpty(replaceMap)){
 					replaceMap.forEach((key,value)->{
 						replaceLowMap.put(key.toLowerCase(),value);
@@ -963,7 +968,7 @@
 						if(StringUtils.isNotBlank(value)){
 							if(value.contains("#")){
 								//绯荤粺鍙橀噺.鏀寔涓�涓�
-								lInfo.getValue().setOrdinaryValue(systemVarValueMap.getOrDefault(value.toUpperCase(),""));
+								//lInfo.getValue().setOrdinaryValue(systemVarValueMap.getOrDefault(value.toUpperCase(),""));
 							}else if(value.contains("${")){
 								//鏈�${xxxx}鐨勬柟寮�
 								if(!CollectionUtils.isEmpty(replaceLowMap)) {
@@ -981,8 +986,8 @@
 				});
 			}
 		}catch(VCIError e){
-//			logger.error(e.error_code,e);
-//			throw WebUtil.getVciBaseException(e);
+			//logger.error(e.error_code,e);
+			//throw WebUtil.getVciBaseException(e);
 		} catch (DocumentException e) {
 			logger.error("鏌ヨ妯℃澘杞崲",e);
 			throw new VciBaseException(this.msgCodePrefix + "qtError", new Object[]{name});

--
Gitblit v1.9.3