From d5d0d1c7a84b996b9bbcebfaf2c2c95f1a5a3678 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期五, 11 十月 2024 08:39:15 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java | 66 ++++++++++++++++++++++++++------ 1 files changed, 53 insertions(+), 13 deletions(-) diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java index 0b24e21..3a9e7f3 100644 --- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java +++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java @@ -1,45 +1,85 @@ package com.mes.downstorage.controller; +import com.mes.downstorage.entity.DownStorageCage; import com.mes.downstorage.entity.DownStorageCageDetails; +import com.mes.downstorage.entity.request.CacheWornRequest; import com.mes.downstorage.service.DownStorageCageDetailsService; import com.mes.downstorage.service.DownStorageCageService; +import com.mes.utils.Result; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; -@Api(tags = "缂撳瓨") +@Api(description = "缂撳瓨") @RestController -@RequestMapping("/api/unLoadGlass/downstorage") +@RequestMapping("/downStorage") public class DownStorageCageDetailsController { @Autowired private DownStorageCageDetailsService downStorageCageDetailsService; @Autowired private DownStorageCageService downStorageCageService; - + @ApiOperation("娣诲姞鐜荤拑") @PostMapping("/add") public String addDownStorageCageDetails(@RequestBody DownStorageCageDetails details) { downStorageCageDetailsService.addDownStorageCageDetails(details); return "Details added successfully"; } - @GetMapping("/leisure") - public List<Map> getLeisureData() { - return downStorageCageService.getCacheInfo(); + + + //鏌ヨ纾ㄨ竟缂撳瓨鐞嗙墖绗煎唴璇︽儏 + @ApiOperation("鏌ヨ缂撳瓨鐞嗙墖绗煎唴璇︽儏") + @GetMapping("/selectStorageCage") + @ResponseBody + public Result selectDownStorageCage () { + List<Map<String, Object>> list=downStorageCageService.selectDownStorageCages(); + return Result.build(200,"鎴愬姛",list); } - private static final int START_VALUE = 0; - private static final int END_VALUE = 5; - @GetMapping("/leisure2") - public List<DownStorageCageDetails> getLeisureData2() { - // 璋冪敤Service灞傝幏鍙栨暟鎹� - return downStorageCageService.getCacheOut(START_VALUE, END_VALUE); +// +// @ApiOperation("娣诲姞缂撳瓨鐞嗙墖绗间俊鎭� 鍔熻兘锛氱鍐呯粦瀹氱幓鐠� 鍙傛暟(DownStorageCageDetails downStorageCageDetails)") +// @PostMapping("/insertEdgStorageCage") +// @ResponseBody +// public Result insertEdgStorageCage(@RequestBody DownStorageCageDetails downStorageCageDetails) { +// boolean isSucess=downStorageCageService.updatedownStorageCageDetails(downStorageCageDetails); +// return Result.build(200,"娣诲姞鎴愬姛",1); +// } + + + + @ApiOperation("淇敼缂撳瓨鐞嗙墖绗间俊鎭� 鍔熻兘锛氬绗煎唴鏍呮牸杩涜銆愬惎鐢�/绂佺敤銆�/ 銆愭洿鎹€�戠鍐呮爡鏍肩幓鐠冧俊鎭�") + @PostMapping("/updateDownStorageCage") + @ResponseBody + public Result updateDownStorageCage(@RequestBody DownStorageCage downStorageCage) { + boolean isSucess=downStorageCageService.updateDownStorageCage(downStorageCage); + return Result.build(200,"鏇存崲鎴愬姛",isSucess); + } + @ApiOperation("鍒犻櫎缂撳瓨鐞嗙墖绗间俊鎭� 鍔熻兘锛氬绗煎唴鏍呮牸鐜荤拑杩涜銆愭竻闄ゃ��") + @PostMapping("/deleteDownStorageCage") + @ResponseBody + public Result deleteDownStorageCage(@RequestBody CacheWornRequest cacheWornRequest) { + downStorageCageService.deleteDownStorageCage(cacheWornRequest); +// boolean isSucess=downStorageCageService.updateDownStorageCageDetails(downStorageCageId,downStorageCageDetails); + return Result.build(200,"鍒犻櫎鎴愬姛",1); } - // Other CRUD operations can be defined here + + @ApiOperation("淇敼鐜荤拑鐘舵�� 鍔熻兘锛氬绗煎唴鏍呮牸鐜荤拑杩涜銆愮牬鎹�/鎷胯蛋銆� ") + @PostMapping("/ReportStatus") + @ResponseBody + public Result edgReportStatus(@RequestBody Map<String, String> arguments) { + String downStorageCageDetailsId=arguments.get("glassId"); + int controlsId=Integer.valueOf(arguments.get("controlsId")); + boolean isSucess=downStorageCageDetailsService.identWorn(downStorageCageDetailsId,controlsId); + return Result.build(200,"銆愮牬鎹�/鎷胯蛋銆戞垚鍔�",1); + } + + } -- Gitblit v1.8.0