From 58e1c4e2bdc8e4f8b647d7c2b9e5e5656a00b445 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 17 五月 2024 11:06:43 +0800
Subject: [PATCH] 集成申请,历史数据导入,关键属性查重多线程导致判重失误问题

---
 Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java |  428 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 423 insertions(+), 5 deletions(-)

diff --git a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java
index 2f5feda..e9bb79c 100644
--- a/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java
+++ b/Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java
@@ -1,7 +1,22 @@
 package com.vci.ubcs.example.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
+import com.vci.ubcs.example.apply.*;
+import com.vci.ubcs.example.applybz.*;
 import com.vci.ubcs.example.service.ICalledIntegrationService;
+import com.vci.ubcs.example.service.UniversalInterface;
+import com.vci.ubcs.example.util.HttpUtils;
+import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+
+import java.net.MalformedURLException;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 缁熶竴鐢宠鎺ュ彛锛歎BCS缂栫爜璧勬簮绠$悊绯荤粺锛岃鍏朵粬闆嗘垚鐨勭郴缁熺殑閫氱敤鎺ュ彛璋冪敤绀轰緥
@@ -9,22 +24,425 @@
  * @date 2024/2/27 20:34
  */
 @Service
+@AllArgsConstructor
 public class CalledIntegrationServiceImpl implements ICalledIntegrationService {
 
     /**
-     * 缂栫爜绯荤粺锛岀粺涓�鐢宠鎺ュ彛璋冪敤
+     * 缁熶竴鐢宠鎺ュ彛URL
+     */
+    private final String UNIAPPLYURL = "http://localhost:37000/ubcs-code/applyCode";
+
+    /**
+     * 鏍囧噯鐢宠鎺ュ彛URL
+     */
+    private final String UNIAPPLYBZURL = "http://localhost:37000/ubcs-code/applyCodeBZ";
+
+    private final UniversalInterface universalInterface;
+
+    /**
+     * 瀵圭紪鐮佺郴缁熺殑缁熶竴鐢宠鎺ュ彛璋冪敤锛宺est鏂瑰紡
      */
     @Override
     public void sendApplyCodeByRest() {
-
-
+        // 缁勭粐鏁版嵁
+        MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+        params.add("dataType","json");
+        //params.add("dataType","xml");鏍规嵁闇�姹傝嚜琛岄�夋嫨
+        params.add("dataString","");//鏍规嵁闇�姹傝嚜琛岀粍缁噅son鏍煎紡鎴栬�厁ml鏍煎紡鐨勬暟鎹�
+        // 鏄痻ml鏃剁殑鏍煎紡绀轰緥锛�
+        /*<?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>
+         */
+        // 鏄痡son鏃剁殑鏍煎紡绀轰緥
+        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);
     }
 
     /**
-     * 缂栫爜绯荤粺锛岀粺涓�鐢宠鎺ュ彛,鐢╓ebService鏂瑰紡璋冪敤
+     * 瀵圭紪鐮佺郴缁熺粺涓�鐢宠鎺ュ彛璋冪敤,WebService鏂瑰紡
      */
     @Override
-    public void sendApplyCodeByWebService() {
+    public void sendApplyCodeByWebService() throws MalformedURLException, RemoteException {
+        //浣跨敤sopui鐢熸垚璋冪敤webservice鎺ュ彛鐨勪唬鐮�
+        String dataType = "json"; //鎴栬�厁ml
+        //String 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\"}}}";
+
+        // 璇锋眰鐨勪富瑕佸弬鏁扮粍寤�
+        InterParameterVO interParameterVO = new InterParameterVO();
+        RootDataVO rootDataVO = new RootDataVO();
+
+        ClassfysVO classfysVO = new ClassfysVO();
+        List<ClassfyVO> classfyVOList = new ArrayList<>();
+        ClassfyVO classfyVO = new ClassfyVO();
+        classfyVO.setLibrary("10");
+        classfyVO.setClassCode("1025");
+
+        ApplyDatasVO applyDatasVO = new ApplyDatasVO();
+        List<ApplyDataVO> applyDataVOList = new ArrayList<>();
+        ApplyDataVO applyDataVO = new ApplyDataVO();
+        applyDataVO.setCode("");
+        applyDataVO.setCreator("0000");
+        applyDataVO.setEditor("0000");
+        applyDataVO.setId("");
+        applyDataVO.setOperate("create");
+        applyDataVO.setStatus("Released");
+        ArrayList<ProppertyVO> proppertyVOS = new ArrayList<>();
+        ProppertyVO proppertyVO = new ProppertyVO();
+        proppertyVO.setKey("name");
+        proppertyVO.setText("鍚嶇О");
+        proppertyVO.setValue("");
+        proppertyVOS.add(proppertyVO);
+        applyDataVO.setProp(proppertyVOS);
+
+        applyDataVOList.add(applyDataVO);
+        applyDatasVO.setObject(applyDataVOList);
+        classfyVO.setObjects(applyDatasVO);
+
+
+        SectionsVO sectionsVO = new SectionsVO();
+        List<SectionVO> sectionVOList = new ArrayList<>();
+        sectionVOList.add(new SectionVO("鍒嗙被鍙�","1025"));
+        sectionVOList.add(new SectionVO("椤哄簭鍙�","1025"));
+        sectionsVO.setSection(sectionVOList);
+        classfyVO.setSections(sectionsVO);
+
+        classfysVO.setClassify(classfyVOList);
+        rootDataVO.setClassifys(classfysVO);
+
+        UserVO userVO = new UserVO();
+        userVO.setIp("127.0.0.1");
+        userVO.setTrueName("19861111");
+        userVO.setUserName("19861111");
+        rootDataVO.setUser(userVO);
+        rootDataVO.setSystemId("PDM");
+
+        interParameterVO.setData(rootDataVO);
+
+        // 濡傛灉鏄痻ml璇疯嚜琛屾瀯寤簒ml鏍煎紡锛屽苟灏哾ataType鏀逛负xml
+        String dataString = JSON.toJSONString(interParameterVO);
+        // xml鍙傛暟褰㈠紡绀轰緥
+        XStream xStream = new XStream(new DomDriver());
+        String dataString1 = xStream.toXML(interParameterVO);
+
+        String res = universalInterface.applyCode(dataString,dataType);
+    }
+
+    /**
+     * 瀵圭紪鐮佺郴缁熺粺涓�鐢宠鎺ュ彛璋冪敤,WebService鏂瑰紡
+     */
+    @Override
+    public void sendApplyCodeByWebServicexml(int frequency) throws MalformedURLException, RemoteException {
+        //浣跨敤sopui鐢熸垚璋冪敤webservice鎺ュ彛鐨勪唬鐮�
+        String dataType = "xml"; //鎴栬�厁ml
+        String dataString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+                "<data systemId=\"PDM\">\n" +
+                "    <user ip=\"130.31.92.101\" trueName=\"鐜嬬惇\" userName=\"19851584\"/>\n" +
+                "    <classifys>\n" +
+                "        <classify classCode=\"1025\" fullclsfNamePath=\"\" library=\"10\">\n" +
+                "            <sections>\n" +
+                "                <section name=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "            </sections>\n" +
+                "            <objects>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2548M16G02\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2548M16G02\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"楂樺帇娑¤疆闈欐瀵嗗皝鍦圽"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2548M16P06\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2548M16P06\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"娉曞叞鐩榎"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2548M16P02\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2548M16P02\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"鐒婃帴娉曞叞鐩榎"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2548M16P05\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2548M16P05\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"闃查缃‐"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2548M16P03\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2548M16P03\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"灏佷弗铚傜獫\"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2548M16P04\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2548M16P04\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"铚傜獫灏佷弗杈筡"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2551M46P01\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2551M46P01\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"澹充綋鍥哄畾鐜痋"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2552M51G07\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2552M51G07\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"鍘嬫皵鏈烘満鍖e熬閮ㄤ腑蹇冩敮鏋禱"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2552M51P08\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2552M51P08\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"鍘嬫皵鏈烘満鍖e熬閮ㄤ腑蹇冩敮鏋禱"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"2552M51P02\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"2552M51P02\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"鍘嬫皵鏈哄熬閮ㄤ腑蹇冩敮鏋禱"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"4127T52P06\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1025\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"4127T52P06\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"璁捐闆剁粍浠禱"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"閿�瀛怽"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                </object>\n" +
+                "            </objects>\n" +
+                "        </classify>\n" +
+                "        <classify classCode=\"1040\" fullclsfNamePath=\"\" library=\"10\">\n" +
+                "            <sections>\n" +
+                "                <section name=\"鍒嗙被\" value=\"1040\"/>\n" +
+                "            </sections>\n" +
+                "            <objects>\n" +
+                "                <object code=\"\" creator=\"19851584\" id=\"LEAP 1B-ZP1\" operate=\"create\" status=\"Released\">\n" +
+                "                    <prop key=\"partclassification\" text=\"鍒嗙被\" value=\"1040\"/>\n" +
+                "                    <prop key=\"c6e_drawingNo\" text=\"鍥惧彿\" value=\"LEAP 1B-ZP1\"/>\n" +
+                "                    <prop key=\"c6e_partClass\" text=\"Part鍒嗙被\" value=\"鍒堕�犺繃绋嬩欢\"/>\n" +
+                "                    <prop key=\"c6e_hash\" text=\"鍝堝笇鐮乗" value=\"/\"/>\n" +
+                "                    <prop key=\"c6e_partName\" text=\"鍚嶇О\" value=\"LEAP 1B鍙戝姩鏈轰氦浠樹欢\"/>\n" +
+                "                </object>\n" +
+                "            </objects>\n" +
+                "        </classify>\n" +
+                "    </classifys>\n" +
+                "</data>";
+
+        for (int i = 0; i <= frequency; i++) {
+            String res = universalInterface.applyCode(dataString,dataType);
+            System.out.println("绗�"+i+"娆℃墽琛岋紝杩斿洖缁撴灉锛�"+res);
+        }
+        System.out.println("=================END=======================");
+    }
+
+    /**
+     * 瀵规爣鍑嗙敵鐮佹帴鍙h皟鐢ㄧず渚嬶細rest鏂瑰紡锛岃皟鐢ㄦ柟寮忓拰缁熶竴鐢崇爜鎺ュ彛娌℃湁鍖哄埆锛屽彧鏄弬鏁颁笂鏈夋墍璋冩暣
+     */
+    public void sendApplyCodeBZByRest(){
+        // 缁勭粐鏁版嵁
+        MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+        params.add("dataType","json");
+        //params.add("dataType","xml");鏍规嵁闇�姹傝嚜琛岄�夋嫨
+        // 鏄痡son鏃剁殑鏍煎紡绀轰緥
+        ApplyBZParamVO applyBZParamVO = new ApplyBZParamVO();
+        ApplyBZVO applyBZVO = new ApplyBZVO();
+        ClassfyBZVO classfyBZVO = new ClassfyBZVO();
+        classfyBZVO.setClassCode("BZHWJ");
+        classfyBZVO.setLibrary("standard");
+
+        SectionsVO sectionsVO = new SectionsVO();
+        List<SectionVO> sectionVOList = new ArrayList<>();
+        SectionVO sectionVO = new SectionVO();
+        sectionVO.setName("鏂囦欢鍒嗙被");
+        sectionVO.setValue("BJT");
+        sectionVOList.add(sectionVO);
+
+        SectionVO sectionVO1 = new SectionVO();
+        sectionVO.setName("鏂囦欢鍒嗙被");
+        sectionVO.setValue("BJT");
+        sectionVOList.add(sectionVO1);
+
+        SectionVO sectionVO2 = new SectionVO();
+        sectionVO.setName("鍒嗛殧绗�");
+        sectionVO.setValue("-");
+        sectionVOList.add(sectionVO2);
+
+        SectionVO sectionVO3 = new SectionVO();
+        sectionVO.setName("骞翠唬鍙�");
+        sectionVO.setValue("2024");
+        sectionVOList.add(sectionVO3);
+
+        SectionVO sectionVO4 = new SectionVO();
+        sectionVO.setName("椤哄簭鍙�");
+        sectionVO.setValue("");
+        sectionVOList.add(sectionVO3);
+
+        sectionsVO.setSection(sectionVOList);
+        classfyBZVO.setSections(sectionsVO);
+
+        ApplyBZDatasVO applyBZDatasVO = new ApplyBZDatasVO();
+        ArrayList<ApplyBZDataVO> applyBZDataVOS = new ArrayList<>();
+        ApplyBZDataVO applyBZDataVO = new ApplyBZDataVO();
+        applyBZDataVO.setCode("");
+        // 淇鏃跺繀浼�
+        applyBZDataVO.setOldCode("");
+        applyBZDataVO.setCreator("19822111");
+        // 鏄惁淇涓虹郴鍒�
+        applyBZDataVO.setEditSeriesFlag(false);
+        // 鏄惁涓虹郴鍒楃敵璇�
+        applyBZDataVO.setSeriesFlag(false);
+        // 鍙戝竷鏃堕棿
+        applyBZDataVO.setReleaseTime("2024-3-21");
+        applyBZDataVO.setId("cassafaf11332213678sdf12673626222");
+        // 鏂囨。涓�氬父浼氭湁鎻忚堪锛�1鏄敵鐮侊紝2鏄慨璁�
+        applyBZDataVO.setOperationType("1");
+        applyBZDataVO.setStatus("Released");
+        // 骞翠唬鍙�
+        applyBZDataVO.setYearNumber("2024");
+        // 娴佹按鍙�
+        applyBZDataVO.setSeriesFlow("");
+
+        List<ProppertyVO> proppertyVOS = new ArrayList<>();
+        ProppertyVO proppertyVO = new ProppertyVO();
+        proppertyVO.setText("鍚嶇О");
+        proppertyVO.setKey("娴嬭瘯-棣栦欢閴村畾");
+        proppertyVO.setValue("standardName");
+        proppertyVOS.add(proppertyVO);
+        ProppertyVO proppertyVO1 = new ProppertyVO();
+        proppertyVO1.setText("鍙戝竷鏃ユ湡");
+        proppertyVO1.setKey("2024-3-21");
+        proppertyVO1.setValue("publishDate");
+        proppertyVOS.add(proppertyVO1);
+        applyBZDataVO.setProp(proppertyVOS);
+        applyBZDatasVO.setObject(applyBZDataVOS);
+
+        classfyBZVO.setObjects(applyBZDatasVO);
+        applyBZVO.setClassify(classfyBZVO);
+        UserVO userVO = new UserVO();
+        userVO.setIp("127.0.0.1");
+        userVO.setTrueName("19861111");
+        userVO.setUserName("19861111");
+        applyBZVO.setUser(userVO);
+        applyBZVO.setSystemId("standardization");
+        applyBZParamVO.setData(applyBZVO);
+
+        // xml鍙傛暟褰㈠紡绀轰緥
+        XStream xStream = new XStream(new DomDriver());
+        String dataString1 = xStream.toXML(applyBZParamVO);
+
+        params.add("dataString",JSON.toJSONString(applyBZParamVO));
+
+        MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
+        String res = HttpUtils.post(UNIAPPLYBZURL,params,headers);
+    }
+
+    /**
+     * 瀵规爣鍑嗙敵鐮佹帴鍙h皟鐢ㄧず渚嬶細webservice鏂瑰紡,璋冪敤鏂瑰紡鍜岀粺涓�鐢崇爜鎺ュ彛娌℃湁鍖哄埆锛屽彧鏄弬鏁颁笂鏈夋墍璋冩暣
+     */
+    public void sendApplyCodeBZWebservice() throws RemoteException {
+        //浣跨敤sopui鐢熸垚璋冪敤webservice鎺ュ彛鐨勪唬鐮�
+        String dataType = "json"; //鎴栬�厁ml
+        // 鏄痡son鏃剁殑鏍煎紡绀轰緥
+        ApplyBZParamVO applyBZParamVO = new ApplyBZParamVO();
+        ApplyBZVO applyBZVO = new ApplyBZVO();
+        ClassfyBZVO classfyBZVO = new ClassfyBZVO();
+        classfyBZVO.setClassCode("BZHWJ");
+        classfyBZVO.setLibrary("standard");
+
+        SectionsVO sectionsVO = new SectionsVO();
+        List<SectionVO> sectionVOList = new ArrayList<>();
+        sectionsVO.setSection(sectionVOList);
+        classfyBZVO.setSections(sectionsVO);
+
+        ApplyBZDatasVO applyBZDatasVO = new ApplyBZDatasVO();
+        ArrayList<ApplyBZDataVO> applyBZDataVOS = new ArrayList<>();
+        ApplyBZDataVO applyBZDataVO = new ApplyBZDataVO();
+        applyBZDataVO.setCode("");
+        // 淇鏃跺繀浼�
+        applyBZDataVO.setOldCode("");
+        applyBZDataVO.setCreator("19822111");
+        // 鏄惁淇涓虹郴鍒�
+        applyBZDataVO.setEditSeriesFlag(false);
+        // 鏄惁涓虹郴鍒楃敵璇�
+        applyBZDataVO.setSeriesFlag(false);
+        // 鍙戝竷鏃堕棿
+        applyBZDataVO.setReleaseTime("2024-3-21");
+        applyBZDataVO.setId("cassafaf11332213678sdf12673626222");
+        // 鏂囨。涓�氬父浼氭湁鎻忚堪锛�1鏄敵鐮侊紝2鏄慨璁�
+        applyBZDataVO.setOperationType("1");
+        applyBZDataVO.setStatus("Released");
+        // 骞翠唬鍙�
+        applyBZDataVO.setYearNumber("2024");
+        // 娴佹按鍙�
+        applyBZDataVO.setSeriesFlow("");
+
+        List<ProppertyVO> proppertyVOS = new ArrayList<>();
+        ProppertyVO proppertyVO = new ProppertyVO();
+        proppertyVO.setText("鍚嶇О");
+        proppertyVO.setKey("娴嬭瘯-棣栦欢閴村畾");
+        proppertyVO.setValue("standardName");
+        proppertyVOS.add(proppertyVO);
+        ProppertyVO proppertyVO1 = new ProppertyVO();
+        proppertyVO1.setText("鍙戝竷鏃ユ湡");
+        proppertyVO1.setKey("2024-3-21");
+        proppertyVO1.setValue("publishDate");
+        proppertyVOS.add(proppertyVO1);
+        applyBZDataVO.setProp(proppertyVOS);
+        applyBZDatasVO.setObject(applyBZDataVOS);
+
+        classfyBZVO.setObjects(applyBZDatasVO);
+        applyBZVO.setClassify(classfyBZVO);
+        UserVO userVO = new UserVO();
+        userVO.setIp("127.0.0.1");
+        userVO.setTrueName("19861111");
+        userVO.setUserName("19861111");
+        applyBZVO.setUser(userVO);
+        applyBZVO.setSystemId("standardization");
+        applyBZParamVO.setData(applyBZVO);
+
+        // 濡傛灉鏄痻ml璇疯嚜琛屾瀯寤簒ml鏍煎紡锛屽苟灏哾ataType鏀逛负xml
+        String dataString = JSON.toJSONString(applyBZParamVO);
+        // xml鍙傛暟褰㈠紡绀轰緥
+        XStream xStream = new XStream(new DomDriver());
+        String dataString1 = xStream.toXML(applyBZParamVO);
+
+        String res = universalInterface.applyCodeForBZ(dataString,dataType);
 
     }
+
+
 }

--
Gitblit v1.9.3