田源
2024-05-25 ba345976f0a6a67bcb20627e33251ded000a3d8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
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;
 
/**
 * 统一申请接口:UBCS编码资源管理系统,被其他集成的系统的通用接口调用示例
 * @author ludc
 * @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;
 
    /**
     * 对编码系统的统一申请接口调用,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方式
     */
    @Override
    public void sendApplyCodeByWebService() throws MalformedURLException, RemoteException {
        //使用sopui生成调用webservice接口的代码
        String dataType = "json"; //或者xml
        //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);
 
        // 如果是xml请自行构建xml格式,并将dataType改为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"; //或者xml
        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=\"压气机机匣尾部中心支架\"/>\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=\"压气机机匣尾部中心支架\"/>\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=======================");
    }
 
    /**
     * 对标准申码接口调用示例:rest方式,调用方式和统一申码接口没有区别,只是参数上有所调整
     */
    public void sendApplyCodeBZByRest(){
        // 组织数据
        MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
        params.add("dataType","json");
        //params.add("dataType","xml");根据需求自行选择
        // 是json时的格式示例
        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);
    }
 
    /**
     * 对标准申码接口调用示例:webservice方式,调用方式和统一申码接口没有区别,只是参数上有所调整
     */
    public void sendApplyCodeBZWebservice() throws RemoteException {
        //使用sopui生成调用webservice接口的代码
        String dataType = "json"; //或者xml
        // 是json时的格式示例
        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);
 
        // 如果是xml请自行构建xml格式,并将dataType改为xml
        String dataString = JSON.toJSONString(applyBZParamVO);
        // xml参数形式示例
        XStream xStream = new XStream(new DomDriver());
        String dataString1 = xStream.toXML(applyBZParamVO);
 
        String res = universalInterface.applyCodeForBZ(dataString,dataType);
 
    }
 
 
}