From 3123dbd3a5be75999f368fbe4aa722e3877074ab Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期五, 14 六月 2024 15:52:28 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java
index 5851554..3d98ea2 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java
@@ -36,7 +36,7 @@
     private  EngineeringService engineeringService;
     @Autowired
     private OptimizeProjectService optimizeProjectService;
-    @ApiOperation("鏄剧ず姝e湪鍑虹墖鐨勫伐绋嬩俊鎭�")
+    @ApiOperation("鏄剧ず閫夋嫨鐨勫伐绋嬩俊鎭�")
     @GetMapping("/prioritylist") //鏌ヨ鐜板湪涓婄墖鏈虹殑鐜荤拑淇℃伅
     @ResponseBody
     public Result<List<UpPattenUsage>> prioritylist() {
@@ -49,10 +49,34 @@
     @PostMapping("/selectUpPattenUsage") //鏌ヨ鐜板湪涓婄墖鏈虹殑鐜荤拑淇℃伅
     @ResponseBody
     public Result<List<UpPattenUsage>> selectUpPattenUsage(@RequestBody Engineering engineering) {
-        List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId());
-        return Result.build(200, "", upPattenUsages);
+        List<UpPattenUsage> upPattenUsages=null;
+        UpPattenUsage upPattenUsage = upPattenUsageService.selectedEngineering(engineering.getEngineerId());
+        if(upPattenUsage == null){
+            upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId());
+        }else {
+            upPattenUsages= upPattenUsageService.selectUpPattenUsage(upPattenUsage);
         }
 
+        if (!upPattenUsages.isEmpty()) {
+            return Result.build(200, "鎴愬姛", upPattenUsages);
+        }else {
+            return Result.build(100, "澶辫触", upPattenUsages);
+        }
+
+        }
+
+    @ApiOperation("鍒囨崲鍘熺墖涓婄墖鐘舵��")
+    @PostMapping("/updateGlassState") //鏌ヨ鐜板湪涓婄墖鏈虹殑鐜荤拑淇℃伅
+    @ResponseBody
+    public Result<Boolean> updateGlassState(@RequestBody UpPattenUsage upPattenUsage) {
+        Boolean whether = upPattenUsageService.updateGlassState(upPattenUsage);
+        if (whether){
+            return Result.build(200, "鎴愬姛", whether);
+        }else {
+            return Result.build(100, "澶辫触", whether);
+        }
+
+    }
 
 }
 

--
Gitblit v1.8.0