From 3c4b340b58d0d0bdbc3db74b5721586dd964f86c Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期五, 08 十一月 2024 14:49:29 +0800
Subject: [PATCH] 义乌上片后端接口及前端页面样式与调用
---
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