From d7c55e6c4d27a1640a8b8dd728aa3201be8c1e57 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期一, 24 六月 2024 13:05:30 +0800
Subject: [PATCH] update login check API
---
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java | 49 ++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
index d2bfa5e..85fdce9 100644
--- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
@@ -2,8 +2,12 @@
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.pmsGlobal.pojoBa.BaUser;
+import com.dy.pmsGlobal.pojoPlt.PltProductionLine;
+import com.dy.pmsGlobal.pojoPlt.PltStation;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast;
+import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -23,18 +27,34 @@
this.sv = workOrderSv;
}
/**
+ * 鏌ヨ鐢ㄦ埛淇℃伅
+ * @param
+ * @return
+ */
+ @GetMapping(path="getUserInfo")
+ public BaseResponse<BaUser> getUserInfo(String userId) throws Exception {
+ BaUser userInfo = sv.getUserInfo(userId);
+ return BaseResponseUtils.buildSuccess(userInfo);
+ }
+ /**
+ * 鏌ヨ宸ョ珯鏄惁宸茬粡琚崰鐢�
+ * @param
+ * @return
+ */
+ @GetMapping(path="getStationInfo")
+ public BaseResponse<PltStation> getStationInfo(String stationId){
+ PltStation stationInfo = sv.getStationInfo(stationId);
+ return BaseResponseUtils.buildSuccess(stationInfo);
+ }
+ /**
* 鏌ヨ宸ョ珯鏄惁宸茬粡琚崰鐢�
* @param
* @return
*/
@GetMapping(path="checkStationUsed")
- public BaseResponse<Boolean> isStationUsed(QueryVo last){
- String message = sv.checkStationUsed(last);
- if ("FALSE".equals(message.split("\\^")[0])) {
- return BaseResponseUtils.buildFail(message.split("\\^")[1]);
- } else {
- return BaseResponseUtils.buildSuccess(true);
- }
+ public BaseResponse<StaAssemblyWorkLast> checkStationUsed(QueryVo last){
+ StaAssemblyWorkLast stationInfo = sv.checkStationUsed(last);
+ return BaseResponseUtils.buildSuccess(stationInfo);
}
/**
* 鏌ヨ鍏ㄩ儴鎵ц涓殑缁勮浠诲姟娓呭崟
@@ -60,6 +80,21 @@
List<PrAssemblyPlan> list = sv.selectList(params);
return BaseResponseUtils.buildSuccess(list);
}*/
+ /**
+ * 鏌ヨ鍏ㄩ儴鎵ц涓殑缁勮浠诲姟娓呭崟
+ * @param
+ * @return
+ */
+ @PostMapping(path="save")
+ public BaseResponse<Boolean> save(@RequestBody @Valid QueryVo last){
+ int count = sv.save(last);
+ if (count <= 0) {
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+ } else {
+ return BaseResponseUtils.buildSuccess(true);
+ }
+ }
+
@GetMapping(path = "test")
public BaseResponse test() {
log.info("test");
--
Gitblit v1.8.0