From 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4 Mon Sep 17 00:00:00 2001 From: whycrzg <ruanzhigang@whycst.com> Date: 星期二, 23 二月 2021 17:19:23 +0800 Subject: [PATCH] update --- src/main/java/com/fgkj/controller/Ld9/LD9_setparamController.java | 61 +++++++++++++++++++++--------- 1 files changed, 43 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/fgkj/controller/Ld9/LD9_setparamController.java b/src/main/java/com/fgkj/controller/Ld9/LD9_setparamController.java index b87da11..3c6ccd5 100644 --- a/src/main/java/com/fgkj/controller/Ld9/LD9_setparamController.java +++ b/src/main/java/com/fgkj/controller/Ld9/LD9_setparamController.java @@ -9,29 +9,42 @@ import com.fgkj.services.Ld9.LD9_setparamService; import com.fgkj.services.User_logService; import io.swagger.annotations.Api; -import org.springframework.beans.factory.annotation.Autowired; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; @RequestMapping("ld9SetParam") @RestController -@Api +@Api(tags = "ld9SetParam鎺ュ彛") public class LD9_setparamController{ - @Autowired + @Resource private LD9_setparamService service; - @Autowired + @Resource private User_logService uservice; - ///鏍规嵁璁惧id鍜屽崟浣撶紪鍙锋煡璇㈠弬鏁� - @GetMapping("byCondition") - public ServiceModel serchByCondition(@RequestBody BattInf binf) { - // BattInf binf=ActionUtil.getGson().fromJson(json, BattInf.class); + //鏍规嵁鐢垫睜缁刬d鍜屽崟浣撶紪鍙锋煡璇㈠弬鏁� + //鏍规嵁璁惧id鍜屽崟浣撶紪鍙锋煡璇㈠弬鏁� + @PostMapping("byCondition") + @ApiOperation(notes = "",value="鐢垫睜缁刬d/璁惧id 鍜屽崟浣撶紪鍙锋煡璇㈠弬鏁�") + public ServiceModel serchByCondition(@ApiParam(value = "绔欑偣", required = true) @RequestParam String stationName, + @ApiParam(value = "鐪�", required = true) @RequestParam String stationName1, + @ApiParam(value = "鍗曚綋缂栧彿", required = true) @RequestParam Integer num, + @ApiParam(value = "鐢垫睜缁刬d", required = true) @RequestParam Integer battGroupId) { + BattInf binf = new BattInf(); + binf.setStationName(stationName); + binf.setStationName1(stationName1); + binf.setNum(num); + binf.setBattGroupId(battGroupId); ServiceModel model=service.serchByCondition(binf); return model; } //鏍规嵁璁惧id淇敼鍙傛暟 - @PutMapping("dev_id") + @PutMapping("byDevId") + @ApiOperation(notes = "",value="璁惧id淇敼鍙傛暟") public ServiceModel update(@RequestBody LD9_setparam ld9) { // LD9_setparam ld9=ActionUtil.getGson().fromJson(json, LD9_setparam.class); ServiceModel model=service.update(ld9); @@ -52,18 +65,30 @@ } //鍙抽敭鏌ョ湅鍙傛暟鍜屽脊鍑烘鐨勫埛鏂版寜閽� - @GetMapping("devId") - public ServiceModel serchbyDev_id(@RequestBody LD9_setparam ld9) { - // LD9_setparam ld9=ActionUtil.getGson().fromJson(json, LD9_setparam.class); + @PostMapping("byDevId") + @ApiOperation(notes = "",value="鍙抽敭鏌ョ湅鍙傛暟鍜屽脊鍑烘鐨勫埛鏂版寜閽�") + public ServiceModel serchbyDev_id(@ApiParam(value = "dev_id", required = true) @RequestParam Integer dev_id, + @ApiParam(value = "cmd鍙傛暟", required = true) @RequestParam Integer num) { + LD9_setparam ld9 = new LD9_setparam(); + ld9.setNum(num); + ld9.setDev_id(dev_id); ServiceModel model = service.serchbyDev_id(ld9); return model; } - - - //鏍规嵁鐢垫睜缁刬d鏌ヨ鐢垫睜缁勫唴鍓嶄簲鐨勫唴闃绘暟鎹� - @GetMapping("byThirdBatt") - public ServiceModel serchByThirdBatt(@RequestBody BattInf binf){ - // BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class); + + + /** + * 鏍规嵁鐢垫睜缁刬d鏌ヨ鐢垫睜缁勫唴鍓嶄簲鐨勫唴闃绘暟鎹� + * 澶囨敞:鏍规嵁鏁版嵁灞備唬鐮佽〃鏄�,鏄剧ず鐨勬槸鍓嶅崄缁勬暟鎹� + * @return + */ + @PostMapping("byThirdBatt") + @ApiOperation(notes = "鏍规嵁鏁版嵁灞備唬鐮佽〃鏄�,鏄剧ず鐨勬槸鍓嶅崄缁勬暟鎹�",value="姹犵粍id鏌ヨ鐢垫睜缁勫唴鍓嶄簲鐨勫唴闃绘暟鎹�") + public ServiceModel serchByThirdBatt(@ApiParam(value = "groupIndexInFBSDevice", required = true) @RequestParam Integer groupIndexInFBSDevice, + @ApiParam(value = "fbsDeviceId", required = true) @RequestParam Integer fbsDeviceId) { + BattInf binf = new BattInf(); + binf.setGroupIndexInFBSDevice(groupIndexInFBSDevice); + binf.setFbsDeviceId(fbsDeviceId); ServiceModel model = service.serchByThirdBatt(binf); return model; } -- Gitblit v1.9.1