Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/MyServiceTest.java
@@ -1,15 +1,10 @@ package com.vci.ubcs.example.controller; import com.alibaba.fastjson.JSONObject; import com.vci.ubcs.example.util.HttpUtils; import lombok.AllArgsConstructor; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.ArrayList; /** * @author ludc Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/PushIntegrationController.java
@@ -17,10 +17,10 @@ import java.util.List; /** * ç¼ç èµæºç®¡çç³»ç»ç»ä¸æ¨é * UBCSç¼ç èµæºç®¡çç³»ç»å¯¹ï¼ * ç¼ç èµæºç®¡çç³»ç»å¯¹å ¶ä»ç³»ç»çç»ä¸æ¨éï¼è¢«è°æ¹å®ä¹æ¹å¼ * UBCSç¼ç èµæºç®¡çç³»ç»å¯¹ * å ¶ä»éæçç³»ç»è¿è¡æ¨éçï¼ * æ¨éæ¾apiå®ä¹ç¤ºä¾ * æ¥åæ¨éçapiå®ä¹ç¤ºä¾ * @author ludc * @date 2024/2/27 20:31 */ Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/TestCalledIntegrationController.java
@@ -1,9 +1,18 @@ package com.vci.ubcs.example.controller; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.RestController; /** * æµè¯è°ç¨ç¼ç ç³»ç»ä»£ç 示ä¾çapiå®ä¹ * @author ludc * @date 2024/2/27 20:34 */ @AllArgsConstructor @RestController("/pushIntegration") public class TestCalledIntegrationController { } Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java
@@ -1,7 +1,12 @@ package com.vci.ubcs.example.service.impl; import com.vci.ubcs.example.service.ICalledIntegrationService; import com.vci.ubcs.example.util.HttpUtils; import com.vci.ubcs.example.util.WsClientUtil; import org.springframework.http.MediaType; import org.springframework.stereotype.Service; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; /** * ç»ä¸ç³è¯·æ¥å£ï¼UBCSç¼ç èµæºç®¡çç³»ç»ï¼è¢«å ¶ä»éæçç³»ç»çéç¨æ¥å£è°ç¨ç¤ºä¾ @@ -12,19 +17,67 @@ public class CalledIntegrationServiceImpl implements ICalledIntegrationService { /** * ç¼ç ç³»ç»ï¼ç»ä¸ç³è¯·æ¥å£è°ç¨ * ç»ä¸ç³è¯·æ¥å£URL */ private String UNIAPPLYURL = "http://localhost/ubcs-code/applyCode"; /** * æ åç³è¯·æ¥å£URL */ private String UNIAPPLYBZURL = "http://localhost/ubcs-code/applyCodeBZ"; /** * 对ç¼ç ç³»ç»çç»ä¸ç³è¯·æ¥å£è°ç¨ï¼restæ¹å¼ */ @Override public void sendApplyCodeByRest() { // ç»ç»æ°æ® MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); params.add("dataType","json"); //params.add("dataType","xml");æ ¹æ®éæ±èªè¡éæ© params.add("dataString","");//æ ¹æ®éæ±èªè¡ç»ç»jsonæ ¼å¼æè xmlæ ¼å¼çæ°æ® // æ¯xmlæ¶çæ ¼å¼ç¤ºä¾ï¼ /*<?xml version="1.0" encoding="UTF-8" standalone="no"?> <data systemId="PDM"> <user ip="localhost" trueName="pwdfree" userName="pwdfree"/> <classifys> <classify classCode="1045" fullclsfNamePath="" library="10"> <sections> <section name="åç±»" value="1045"/> </sections> <objects> <object code="" creator="pwdfree" id="MP.100001" operate="create" status="Released"> <prop key="partclassification" text="åç±»" value="1045"/> <prop key="c6e_partClass" text="Partåç±»" value="æ¯å¯"/> <prop key="c6e_drawingNo" text="å¾å·" value="1000021"/> <prop key="c6e_material" text="ææçå·" value="XXX"/> <prop key="c6e_blankStandard" text="æ¯å¯æ å" value="G235"/> <prop key="c6e_materialStandard" text="ææ¯æ å" value="AAAA"/> </object> </objects> </classify> </classifys> </data> */ // æ¯jsonæ¶çæ ¼å¼ç¤ºä¾ params.add( "dataString", "\"data\": { \"classifys\": { \"classify\": [ { \"classCode\": \"1025\", \"fullclsfNamePath\": \"\", \"library\": \"10\", \"sections\": { \"section\": [ { \"name\": \"åç±»å·\", \"value\": \"1025\" }, { \"name\": \"顺åºå·\", \"value\": \"\" } ] }, \"obejects\": { \"obeject\": [ { \"code\": \"\", \"id\": \"\", \"status\": \"Released\", \"operate\": \"create\", \"creator\": \"0000\", \"prop\": [ { \"key\": \"name\", \"text\": \"åç§°\", \"value\": \"\" } ] } ] } } ], \"systemId\": \"ERP\", \"user\": { \"ip\": \"127.0.0.1\", \"trueName\": \"00000\", \"userName\": \"test\" } } } " ); MultiValueMap<String, String> headers = new LinkedMultiValueMap<>(); String res = HttpUtils.post(UNIAPPLYURL,params,headers); } /** * ç¼ç ç³»ç»ï¼ç»ä¸ç³è¯·æ¥å£,ç¨WebServiceæ¹å¼è°ç¨ * 对ç¼ç ç³»ç»ç»ä¸ç³è¯·æ¥å£è°ç¨,WebServiceæ¹å¼ */ @Override public void sendApplyCodeByWebService() { MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); params.add("dataType","json"); MultiValueMap<String, String> headers = new LinkedMultiValueMap<>(); } } Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/util/WsClientUtil.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.vci.ubcs.example.util; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.springframework.util.StringUtils; public class WsClientUtil { /** * axis2è°ç¨å®¢æ·ç«¯ * * @param url è¯·æ±æå¡å°å * @param nameSpace å½åç©ºé´ * @param method æ¹æ³å * @param tarName åæ°åç§° * @param xmlData è¯·æ±æ¥æ * @param timeOutInMilliSeconds è¶ æ¶æ¶é´ * @return String ç±»åçååºæ¥æ© */ public static String sendMsg(String url, String nameSpace,String soapAction, String method, String tarName, String xmlData, long timeOutInMilliSeconds) throws Exception { ServiceClient serviceClient = new ServiceClient(); Options option = new Options(); option.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); option.setTransportInProtocol(Constants.TRANSPORT_HTTP); // å¼ä¸ºtargetNamespace+methodName if(StringUtils.isEmpty(soapAction)){ soapAction = nameSpace+method; } option.setAction(soapAction); EndpointReference epfs = new EndpointReference(url); option.setTo(epfs); serviceClient.setOptions(option); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace namespaceOM = fac.createOMNamespace(nameSpace, ""); OMElement element = fac.createOMElement(method, namespaceOM); OMElement theCityCode = fac.createOMElement(tarName, namespaceOM); theCityCode.setText(xmlData); element.addChild(theCityCode); // OMElement theUserID = fac.createOMElement("theUserID ", namespace); // theUserID.setText(""); // element.addChild(theUserID); OMElement resultOM = serviceClient.sendReceive(element); String result = resultOM.getFirstElement().getText(); System.out.println(result); return result; } } Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feign/IMdmInterJtClient.java
@@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import java.util.List; @@ -60,8 +61,8 @@ * @param dockingResultVO * @return è¿åå卿¯å¦æåä¿¡æ¯ */ @GetMapping(RETURNGROUPCODE) public R getApplyGroupCode( @RequestParam("dockingResultVO") DockingReturnStoreVO dockingResultVO); @PostMapping(RETURNGROUPCODE) public R getApplyGroupCode( @RequestBody DockingReturnStoreVO dockingResultVO); /*** * ä¸»æ°æ®æ¨¡åè§å¾åå¸ Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/DockingSystemConfigDTO.java
@@ -22,7 +22,6 @@ */ private static final long serialVersionUID = 4615707120053955466L; /** * è®¤è¯æ¹å¼ */ Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/UniversalInterfaceI.java
@@ -18,6 +18,7 @@ @WebService(targetNamespace = "http://code.ubcs.vci.com/",name = "universalInterface") public interface UniversalInterfaceI { /** * ç»ä¸ç³è¯·ç¼ç æ¥å£ * Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeDuckingSyncServiceImpl.java
@@ -118,7 +118,7 @@ @Value("${erp.item.bearer:bearer: Bearer 7fc32939-0a59-da71-a6e6-6b0d37b53e8a}") private String ERPXHDHAUTH; @Value("${erp.item.url:http://127.0.0.1:8080/api/pp/pp/v1.0}") @Value("${erp.item.url:http://127.0.0.1/api/pp/pp/ext/extend/v1.0}") private String ERPXHDHURL; @Value("${erp.item.tenant:10000}") @@ -321,7 +321,7 @@ headers.add("X-ECC-Current-Tenant",ERPXHDHTENANT); headers.add("Accept-Language","zh-CHS"); headers.add("Content-Type",MediaType.APPLICATION_JSON.toString()); String res = HttpUtils.request(ERPXHDHURL+"/getppModelByElem",paramString,headers, HttpMethod.POST,MediaType.APPLICATION_JSON); String res = HttpUtils.request(ERPXHDHURL+"/getppModelByElemNew",paramString,headers, HttpMethod.POST,MediaType.APPLICATION_JSON); // String res= mdmSearchItemCodeProvider.getppModelByElem(searchItemParam); SearchItemVO searchItemVO = JSONObject.toJavaObject(JSONObject.parseObject(res), SearchItemVO.class); if (searchItemVO != null) { Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -2186,7 +2186,6 @@ } } /** * å¤çæ¶é´æ ¼å¼ * @@ -2213,7 +2212,6 @@ }); } } /** * å¤çæä¸¾çå 容ï¼å¦æä¸å¨æä¸¾ä¸ï¼ä¼è¿å忬çå¼