| | |
| | | private BattDischarge_planService service; |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "除num外所有参数",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); |
| | |
| | | } |
| | | |
| | | @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);///--------- |
| | |
| | | |
| | | @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; |
| | |
| | | |
| | | 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); |
| | |
| | | |
| | | return model; |
| | | }*/ |
| | | |
| | | //8.1放电计划管理中进页面查询 |
| | | @GetMapping("battGroupInfo") |
| | | @ApiOperation(notes = "",value="放电计划管理中进页面查询") |
| | |
| | | |
| | | 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; |
| | |
| | | //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; |
| | | } |
| | |
| | | *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; |
| | | } |
| | |
| | | /*原则: |
| | | *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; |
| | | |