From 51f6e3d555d9e6021fd2470bb39f6befca9aa895 Mon Sep 17 00:00:00 2001 From: whycrzg <ruanzhigang@whycst.com> Date: 星期一, 01 二月 2021 11:57:51 +0800 Subject: [PATCH] update --- src/main/java/com/fgkj/controller/BattDischarge_planController.java | 59 +++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/fgkj/controller/BattDischarge_planController.java b/src/main/java/com/fgkj/controller/BattDischarge_planController.java index 7ad355f..70dcc2c 100644 --- a/src/main/java/com/fgkj/controller/BattDischarge_planController.java +++ b/src/main/java/com/fgkj/controller/BattDischarge_planController.java @@ -22,17 +22,17 @@ private BattDischarge_planService service; @PostMapping("/") - @ApiOperation(notes = "闄um澶栨墍鏈夊弬鏁�",value="鏂板") + @ApiOperation(notes = "{ \"battgroupid\": 1000002, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-30 11:04:21\", \"discharge_starttime1\": \"2020-12-30 11:04:21\", \"discharge_stoptime\": \"2020-12-30 11:04:21\", \"discharge_stoptime1\": \"2020-12-30 11:04:21\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }",value="鏂板") public ServiceModel add(@RequestBody BattDischarge_plan plan){ // BattDischarge_plan plan = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattDischarge_plan.class); ServiceModel model =service.add(plan); return model; } - + //8.1鎵归噺娣诲姞鐢垫睜璁″垝 @PostMapping("/batch") - @ApiOperation(notes = "",value="鎵归噺娣诲姞鐢垫睜璁″垝") + @ApiOperation(notes = "[{ \"battgroupid\": 1000002, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-30 11:04:21\", \"discharge_starttime1\": \"2020-12-30 11:04:21\", \"discharge_stoptime\": \"2020-12-30 11:04:21\", \"discharge_stoptime1\": \"2020-12-30 11:04:21\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }]",value="鎵归噺娣诲姞鐢垫睜璁″垝") public ServiceModel addPro(@RequestBody List<BattDischarge_plan> list){ // List<BattDischarge_plan> plans = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<BattDischarge_plan>>(){}.getType()); ServiceModel model = service.addPro(list); @@ -41,17 +41,17 @@ } @PutMapping("/") - @ApiOperation(notes = "",value="淇敼") + @ApiOperation(notes = "{ \"formattime\": \"\", \"num\": 11, \"battgroupid\": 0, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-31 11:52:56\", \"discharge_starttime1\": \"2020-12-31 11:52:56\", \"discharge_stoptime\": \"2020-12-31 11:52:56\", \"discharge_stoptime1\": \"2020-12-31 11:52:56\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }",value="淇敼") public ServiceModel update(@RequestBody BattDischarge_plan plan){ // BattDischarge_plan plan = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattDischarge_plan.class); ServiceModel model = service.update(plan);///--------- return model; } - + //8.1鎵归噺淇敼鏀剧數璁″垝鐨勫紑濮嬫椂闂� @PutMapping("/batch") - @ApiOperation(notes = "",value="鎵归噺淇敼鏀剧數璁″垝鐨勫紑濮嬫椂闂�") + @ApiOperation(notes = "[{ \"num\":1, \"battgroupid\": 1000002, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-30 11:04:21\", \"discharge_starttime1\": \"2020-12-30 11:04:21\", \"discharge_stoptime\": \"2020-12-30 11:04:21\", \"discharge_stoptime1\": \"2020-12-30 11:04:21\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }]",value="鎵归噺淇敼鏀剧數璁″垝鐨勫紑濮嬫椂闂�") public ServiceModel updatePro(@RequestBody List<BattDischarge_plan> plans){ // List<BattDischarge_plan> plans = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<BattDischarge_plan>>(){}.getType()); ServiceModel model = service.updatePro(plans);///--------- @@ -61,8 +61,9 @@ @DeleteMapping("/") @ApiOperation(notes = "",value="鍒犻櫎") - public ServiceModel del(@RequestBody BattDischarge_plan plan){ - // BattDischarge_plan plan = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattDischarge_plan.class); + public ServiceModel del(@RequestParam Integer num) { + BattDischarge_plan plan = new BattDischarge_plan(); + plan.setNum(num); ServiceModel model = service.del(plan); return model; @@ -75,12 +76,11 @@ return model; } - + //8.1鏀剧數璁″垝鏌ヨ - @GetMapping("byCondition") - @ApiOperation(notes = "",value="鏀剧數璁″垝鏌ヨ") + @PostMapping("byCondition") + @ApiOperation(notes = "{ \"binf\": { \"stationName\": \"\", \"stationName1\": \"\", \"battGroupId\": 0 },\"pageBean\": { \"pageSize\": 3, \"pageNum\": 0 },\"bplan\": { \"discharge_starttime\": \"2001-02-01 08:16:35\", \"discharge_starttime1\": \"2021-02-01 08:16:35\", \"discharge_state\": 0 } }",value="鏀剧數璁″垝鏌ヨ") public ServiceModel serchByCondition(@RequestBody Batt_Maint_Dealarm bmd){ - // Batt_Maint_Dealarm bmd = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_Maint_Dealarm.class); User_inf uinf=(User_inf) ActionUtil.getUser(); bmd.setUinf(uinf); ServiceModel model = service.serchByCondition(bmd); @@ -94,6 +94,7 @@ return model; }*/ + //8.1鏀剧數璁″垝绠$悊涓繘椤甸潰鏌ヨ @GetMapping("battGroupInfo") @ApiOperation(notes = "",value="鏀剧數璁″垝绠$悊涓繘椤甸潰鏌ヨ") @@ -103,13 +104,19 @@ return model; } + + //鏂扮増娣诲姞鏀剧數璁″垝鏌ヨ<鎺掗櫎璁剧疆杩囨斁鐢佃鍒掔殑鐢垫睜缁�> - @GetMapping("battPlan") - @ApiOperation(notes = "",value="鏂扮増娣诲姞鏀剧數璁″垝鏌ヨ<鎺掗櫎璁剧疆杩囨斁鐢佃鍒掔殑鐢垫睜缁�>") - public ServiceModel serchBattPlan(@RequestBody BattInf binf){ - // BattInf binf= getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,BattInf.class); - User_inf uinf=(User_inf) ActionUtil.getUser(); + @PostMapping("battPlan") + @ApiOperation(notes = "stationId 绛夊洓涓弬鏁颁负妯$硦鏌ヨ 缁撴灉闆嗭細{ \"code\": 1, \"msg\": \"鏌ヨ鎴愬姛!\", \"data\": [{ \"stationId\": \"42010007\", \"stationName\": \"灞辫タ鐪�-澶師甯�-杩庢辰鍖�-灞�鏈烘埧119-灞�鏈烘埧绔�-1\", \"fbsDeviceId\": 910000001\"fparam\": { \"hourRate\": 0, \"disCurr\": 0, \"disCap\": 0, \"disTime\": 0, \"groupVol_Low\": 0, \"monomerVol_Low\": 0, \"monomerLowCount\": 0, \"battGroupNum\": 0, \"onlineLowAction\": 0, \"dCVolHighLimit\": 0, \"chargeCurrSet\": 0, \"offLineYH_Cycle\": 0, \"offLineYHTimes\": 0, \"offLineYHOnceCycle\": 0, \"onLineVol_Low\": 0 } }]}",value="鏂扮増娣诲姞鏀剧數璁″垝鏌ヨ<鎺掗櫎璁剧疆杩囨斁鐢佃鍒掔殑鐢垫睜缁�>") + public ServiceModel serchBattPlan(@RequestParam String stationId,@RequestParam String stationName1,@RequestParam String stationName2,@RequestParam String stationName5) { + BattInf binf = new BattInf(); + User_inf uinf = (User_inf) ActionUtil.getUser(); binf.setNum(uinf.getuId()); + binf.setStationId(stationId); + binf.setStationName1(stationName1); + binf.setStationName2(stationName2); + binf.setStationName5(stationName5); ServiceModel model = service.serchBattPlan(binf); return model; @@ -117,9 +124,9 @@ //8.1鏌ヨ鏈紑濮嬫斁鐢电殑鏀剧數璁″垝鎬绘暟 @GetMapping("nums") @ApiOperation(notes = "",value="鏌ヨ鏈紑濮嬫斁鐢电殑鏀剧數璁″垝鎬绘暟") - public ServiceModel searchNums() { - User_inf uinf=(User_inf) ActionUtil.getUser(); - ServiceModel model = service.searchNums(uinf); + public ServiceModelOnce searchNums() { + User_inf uinf = (User_inf) ActionUtil.getUser(); + ServiceModelOnce model = service.searchNums(uinf); return model; } @@ -133,9 +140,9 @@ *num: 鎬绘暟*/ @GetMapping("state") @ApiOperation(notes = "",value="鏀剧數璁″垝绠$悊涓ゼ鐘跺浘(鏀剧數璁″垝缁熻鏌ヨ)") - public ServiceModel searchState(){ - User_inf uinf=(User_inf) ActionUtil.getUser(); - ServiceModel model = service.searchState(uinf); + public ServiceModelOnce searchState() { + User_inf uinf = (User_inf) ActionUtil.getUser(); + ServiceModelOnce model = service.searchState(uinf); return model; } @@ -144,13 +151,13 @@ /*鍘熷垯锛� *1.鍚屾満鎴�(鎴栬澶�)鍚屼竴鏃堕棿鍙兘涓�缁勭數姹犵粍鏀剧數 *2.鍚屾満鎴�(鎴栬澶�)鍐呯數姹犵粍鏀剧數鏃堕棿鐩搁殧鑷冲皯3澶�*/ - @GetMapping("/judgePlan") + @PostMapping("/judgePlan") @ApiOperation(notes = "鍘熷垯锛歕n" + "\t\t\t *1.鍚屾満鎴�(鎴栬澶�)鍚屼竴鏃堕棿鍙兘涓�缁勭數姹犵粍鏀剧數\n" + "\t\t\t *2.鍚屾満鎴�(鎴栬澶�)鍐呯數姹犵粍鏀剧數鏃堕棿鐩搁殧鑷冲皯3澶�",value="鎵归噺娣诲姞浣滀笟璁″垝/淇敼浣滀笟璁″垝鏃舵椂鍏堟娴嬭鍒掔殑鍙鎬�") - public ServiceModel judgePlan(@RequestBody List<BattDischarge_plan> listAll){ + public ServiceModelOnce judgePlan(@RequestBody List<BattDischarge_plan> listAll){ // List<BattDischarge_plan> listAll= getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<BattDischarge_plan>>(){}.getType()); - ServiceModel model = service.judgePlan(listAll); + ServiceModelOnce model = service.judgePlan(listAll); return model; -- Gitblit v1.9.1