|
@@ -10,6 +10,10 @@ import org.springframework.web.bind.annotation.PostMapping;
|
10
|
10
|
import org.springframework.web.bind.annotation.RequestBody;
|
11
|
11
|
import org.springframework.web.bind.annotation.ResponseBody;
|
12
|
12
|
import org.springframework.web.bind.annotation.RestController;
|
|
13
|
+import org.springframework.web.client.RestClientException;
|
|
14
|
+import org.springframework.web.client.RestTemplate;
|
|
15
|
+
|
|
16
|
+import java.util.Date;
|
13
|
17
|
|
14
|
18
|
|
15
|
19
|
@RestController
|
|
@@ -30,4 +34,21 @@ public class DataController {
|
30
|
34
|
int dbi = teDataMapper.insert(teData);
|
31
|
35
|
return dbi+" success";
|
32
|
36
|
}
|
|
37
|
+
|
|
38
|
+ /**
|
|
39
|
+ * 组装待打点并发送
|
|
40
|
+ */
|
|
41
|
+ public void sendTestAgain(){
|
|
42
|
+ String url ="http://local.wxlxit.com:61001/equipmentTestingStart";
|
|
43
|
+ TeData teData = new TeData();
|
|
44
|
+ teData.setEquipmentID("hljcbk1001");
|
|
45
|
+ teData.setStime(new Date());
|
|
46
|
+ // TODO: 2022/2/10
|
|
47
|
+ teData.setRotationxy("根据第一次返回底产生-第二次待打点");
|
|
48
|
+
|
|
49
|
+ RestTemplate restTemplate = new RestTemplate();
|
|
50
|
+ restTemplate.postForObject(url, teData, String.class);
|
|
51
|
+
|
|
52
|
+ }
|
|
53
|
+
|
33
|
54
|
}
|