提交 | 用户 | 时间
|
0ca254
|
1 |
package com.jcdm.main.restful.factoryMes.controller; |
A |
2 |
|
|
3 |
import cn.hutool.http.HttpRequest; |
|
4 |
import cn.hutool.json.JSONUtil; |
|
5 |
import com.jcdm.main.restful.factoryMes.service.RestfulService; |
|
6 |
import com.jcdm.main.restful.qingYan.doman.ChildVO; |
|
7 |
import com.jcdm.main.restful.qingYan.doman.ParentVO; |
|
8 |
|
|
9 |
import java.text.SimpleDateFormat; |
|
10 |
import java.util.*; |
|
11 |
|
|
12 |
public class TestClass { |
|
13 |
public static void main(String[] args) { |
|
14 |
String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
|
15 |
|
|
16 |
// System.out.println(RestfulService.getProductionWorkOrderRequest("0RSPA001111111E4T0000007","POP230")); |
|
17 |
// System.out.println(RestfulService.getWorkReportResultFeedback("0RSPB001139E3AE4X0000007","POP230","2024-04-26 09:38:03")); |
|
18 |
List<ChildVO> childVOList = new ArrayList<>(); |
|
19 |
ParentVO vo = new ParentVO(); |
|
20 |
ChildVO childVO = new ChildVO(); |
|
21 |
childVO.setItemCode("XTSX_XTID"); |
|
22 |
childVO.setItemType("1"); |
|
23 |
childVO.setItemText("箱体码"); |
|
24 |
childVO.setItemValue("GLTEST02883333240429"); |
|
25 |
childVO.setCheckResult("1"); |
|
26 |
childVO.setCheckTime("2024-04-29 15:15:00"); |
|
27 |
// ChildVO childVO1 = new ChildVO(); |
|
28 |
// childVO1.setItemCode("XTSX_XTQXJG"); |
|
29 |
// childVO1.setItemType("3"); |
|
30 |
// childVO1.setItemText("箱体清洗结果"); |
|
31 |
// childVO1.setItemValue("S"); |
|
32 |
// childVO1.setCheckResult("1"); |
|
33 |
// childVO1.setCheckTime("2024-04-29 15:15:00"); |
|
34 |
// childVOList.add(childVO1); |
|
35 |
childVOList.add(childVO); |
|
36 |
vo.setSiteCode("3983"); |
|
37 |
vo.setRecordId("100000004"); |
|
38 |
vo.setStationCode("POP230"); |
|
39 |
vo.setProductNum("0RSPB001139E3AE4X0000007"); |
|
40 |
vo.setTotalResult("1"); |
|
41 |
vo.setCheckList(childVOList); |
|
42 |
System.out.println(HttpRequest.post(url).body(JSONUtil.toJsonStr(vo)).execute()); |
|
43 |
|
|
44 |
} |
|
45 |
} |