From 6682a037f43649d40a94dbf59e40a5b2cc59dc37 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期二, 29 十一月 2022 16:51:20 +0800
Subject: [PATCH] #取消用户编号 直接获取用户码
---
src/main/java/com/zy/asrs/controller/OpenController.java | 147 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 113 insertions(+), 34 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/OpenController.java b/src/main/java/com/zy/asrs/controller/OpenController.java
index 498d446..d173e1a 100644
--- a/src/main/java/com/zy/asrs/controller/OpenController.java
+++ b/src/main/java/com/zy/asrs/controller/OpenController.java
@@ -4,7 +4,9 @@
import com.core.annotations.AppAuth;
import com.core.common.*;
import com.core.exception.CoolException;
+import com.zy.asrs.entity.TestMast;
import com.zy.asrs.entity.param.*;
+import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.OpenService;
import com.zy.common.model.DetlDto;
import com.zy.common.web.BaseController;
@@ -30,6 +32,8 @@
@Autowired
private OpenService openService;
+ @Autowired
+ private ApiLogService apiLogService;
@PostMapping("/order/matSync/default/v1")
@AppAuth(memo = "鍟嗗搧淇℃伅鍚屾鎺ュ彛")
@@ -44,40 +48,6 @@
return R.ok();
}
- @PostMapping("/rpc/watchDog/auth/v1")
- @AppAuth(memo = "蹇冭烦鎺ュ彛璋冪敤")
- public synchronized R hostName(@RequestHeader(required = false) String appkey,
- @RequestBody(required = false) HeartBeat param,
- HttpServletRequest request){
- auth(appkey, param, request);
- if (Cools.isEmpty(param)) {
- return R.parse(BaseRes.PARAM);
- }
-
- //........
- System.out.println(String.format("id:%s,hostName:%s,requestTime:%s",
- param.getId(),param.getHostName(),param.getRequestTime()));
-
- return R.ok();
- }
- @PostMapping("/rcp/pakIn/auth/v1")
- @AppAuth(memo = "鍏ュ簱閫氱煡鍗曟帴鍙h皟鐢�")
- public synchronized R combPack(@RequestHeader(required = false) String appkey,
- @RequestBody(required = false) CombParam param,
- HttpServletRequest request){
-
- auth(appkey, param, request);
- if (Cools.isEmpty(param)) {
- return R.parse(BaseRes.PARAM);
- }
- //鐢熸垚鍏ュ簱閫氱煡妗�
- openService.combPACK(param);
-
- Map<String,Boolean> map=new HashMap<>();
- map.put("isComplete",true);
- System.out.println(map);
- return R.ok(map);
- }
/****************************************************************************/
/********************************* 鎵撳寘涓婄嚎 **********************************/
/****************************************************************************/
@@ -236,4 +206,113 @@
System.out.println(JSON.toJSONString(param1));
}
+ /*...........................璧e窞鏂板..............浠ヤ笅.............璧e窞鏂板...........................*/
+ @PostMapping("/rpc/watchDog/auth/v1")
+// @AppAuth(memo = "蹇冭烦鎺ュ彛璋冪敤")
+ public synchronized R hostName(@RequestHeader(required = false) String appkey,
+ @RequestBody(required = false) HeartBeat param,
+ HttpServletRequest request){
+ appkey="ea1f0459efc02a79f046f982767939ae";
+ auth(appkey, param, request);
+ if (Cools.isEmpty(param)) {
+ return R.parse(BaseRes.PARAM);
+ }
+
+ //........
+ System.out.println(String.format("id:%s,hostName:%s,requestTime:%s",
+ param.getId(),param.getHostName(),param.getRequestTime()));
+
+ return R.ok();
+ }
+
+ @PostMapping("/rpc/pakIn/auth/v1")
+// @AppAuth(memo = "鍏ュ簱閫氱煡鍗曟帴鍙h皟鐢�")
+ public synchronized R combPack(@RequestHeader(required = false) String appkey,
+ @RequestBody(required = false) CombParam param,
+ HttpServletRequest request){
+ appkey="ea1f0459efc02a79f046f982767939ae";
+ auth(appkey, param, request);
+ if (Cools.isEmpty(param)) {
+ return R.parse(BaseRes.PARAM);
+ }
+ //鐢熸垚鍏ュ簱閫氱煡妗�
+ openService.combPACK(param);
+
+ Map<String,Boolean> map=new HashMap<>();
+ apiLogService.save(
+ "mes鐢宠鍏ュ簱",
+ "172.28.15.251",
+ null,
+ "127.0.0.1",
+ JSON.toJSONString("PackNo:"+param.getPackNo()
+ +" PackName:"+param.getPackName()
+ +" RequestTime:"+param.getRequestTime()
+ +" SettingTimes:"+param.getSettingTimes()),
+ "172.28.15.251",
+ true
+ );
+ map.put("isComplete",true);
+ return R.ok(map);
+ }
+ @PostMapping("/rpc/pakOut/auth/v1")
+// @AppAuth(memo = "鍑哄簱閫氱煡鍗曟帴鍙h皟鐢�")
+ public synchronized R combpakOut(@RequestHeader(required = false) String appkey,
+ @RequestBody(required = false) CombParam param,
+ HttpServletRequest request){
+
+ auth(appkey, param, request);
+ if (Cools.isEmpty(param)) {
+ return R.parse(BaseRes.PARAM);
+ }
+ //鍑哄簱寮�濮�
+ openService.combPackOut(param);
+
+ Map<String,Boolean> map=new HashMap<>();
+ map.put("isComplete",true);
+ return R.ok(map);
+ }
+
+ @PostMapping("/rpv/infoReview/auth/v1")
+// @AppAuth(memo = "娴嬭瘯鏉$爜淇℃伅澶嶆牳璇锋眰")
+ public synchronized R infoReview(@RequestHeader(required = false) String appkey,
+ @RequestBody(required = false) Review param,
+ HttpServletRequest request){
+ appkey="ea1f0459efc02a79f046f982767939ae";
+ auth(appkey, param, request);
+ if (Cools.isEmpty(param)) {
+ return R.parse(BaseRes.PARAM);
+ }
+ TestMast testMast = openService.infoReview(param);
+ if (testMast.getStatus()==3){
+ return R.ok();
+ }else if (testMast.getStatus()==2){
+ return R.error("绛夊緟鍛樺伐鎿嶄綔");
+ }
+ return R.error();
+ }
+ @PostMapping("/rpv/testFinish/auth/v1")
+// @AppAuth(memo = "娴嬭瘯瀹屾垚")
+ public synchronized R testFinish(@RequestHeader(required = false) String appkey,
+ @RequestBody(required = false) Review param,
+ HttpServletRequest request){
+ appkey="ea1f0459efc02a79f046f982767939ae";
+ auth(appkey, param, request);
+ Map<String,Boolean> map=new HashMap<>();
+
+ if (Cools.isEmpty(param)) {
+ return R.parse(BaseRes.PARAM);
+ }
+ if (param.getTestResult().equals("OK")){
+ map.put("isComplete",openService.testFinish(param));
+ }else if(param.getTestResult().equals("NG")){
+ openService.testNG(param);
+ map.put("isComplete",false);
+ }else{
+ map.put("isComplete",false);
+ }
+ return R.ok(map);
+ }
+
+ /*...........................璧e窞鏂板..............浠ヤ笂.............璧e窞鏂板...........................*/
+
}
--
Gitblit v1.9.1