| | |
| | | package com.fgkj.controller.ram; |
| | | |
| | | import com.fgkj.dto.BattInf; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.dto.User_log; |
| | | import com.fgkj.dto.*; |
| | | import com.fgkj.dto.ram.Fbs9600_state; |
| | | import com.fgkj.mapper.FBS9100_ComBase; |
| | | import com.fgkj.mapper.UinfDaoFactory; |
| | |
| | | private User_logService uservice; |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="添加") |
| | | @ApiOperation(notes = "{\n" + |
| | | " \"op_cmd\": 0,\n" + |
| | | " \"dev_alarmstate\": 0,\n" + |
| | | " \"dev_commcount\": 0,\n" + |
| | | " \"dev_errcommcount\": 0,\n" + |
| | | " \"dev_id\": 0,\n" + |
| | | " \"dev_ip\": \"\",\n" + |
| | | " \"dev_workstate\": 0\n" + |
| | | "}",value="添加") |
| | | public ServiceModel add(@RequestBody Fbs9600_state state) { |
| | | ServiceModel model = service.add(state); |
| | | |
| | |
| | | //bts显示屏启动放电 |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="bts显示屏启动放电") |
| | | public ServiceModel update(@RequestBody Fbs9600_state state) { |
| | | public ServiceModel update(@RequestParam Integer num,@RequestParam Integer dev_id) { |
| | | Fbs9600_state state = new Fbs9600_state(); |
| | | state.setNum(num); |
| | | state.setDev_id(dev_id); |
| | | ServiceModel model = service.update(state); |
| | | { String msg=""; |
| | | if(state.getNum()==FBS9100_ComBase.CMD_Start){ |
| | | msg="启动"+state.getDev_id()+"的设备放电"; |
| | | if(num==FBS9100_ComBase.CMD_Start){ |
| | | msg="启动"+dev_id+"的设备放电"; |
| | | }else if(state.getNum()==FBS9100_ComBase.CMD_Stop){ |
| | | msg="停止"+state.getDev_id()+"的设备放电"; |
| | | msg="停止"+dev_id+"的设备放电"; |
| | | } |
| | | User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg); |
| | | uservice.add(ulog);//将用户的操作记录下来 |
| | |
| | | |
| | | //fbs9600设备内阻测试 |
| | | @PutMapping("updatePro") |
| | | @ApiOperation(notes = "",value="fbs9600设备内阻测试") |
| | | @ApiOperation(notes = "[{ \"dev_id\": \"-\", \"op_cmd\": \"-\" }]",value="fbs9600设备内阻测试") |
| | | public ServiceModel updatePro(@RequestBody List<Fbs9600_state> list) { |
| | | ServiceModel model = service.updatePro(list); |
| | | |
| | |
| | | |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel delete(@RequestBody Fbs9600_state state) { |
| | | public ServiceModel delete(@RequestParam Integer num) { |
| | | Fbs9600_state state = new Fbs9600_state(); |
| | | state.setNum(num); |
| | | ServiceModel model = service.delete(state); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | //11.1FBS9600设备通信状态查询 |
| | | @GetMapping("byCondition") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "",value="FBS9600设备通信状态查询") |
| | | public ServiceModel serchByCondition(@RequestBody Fbs9600_state state){ |
| | | public ServiceModel serchByCondition(@RequestParam Integer dev_errcommcount,@RequestParam Integer pageNum,@RequestParam Integer pageSize){ |
| | | Fbs9600_state state = new Fbs9600_state(); |
| | | state.setDev_errcommcount(dev_errcommcount); |
| | | PageBean pageBean = new PageBean(); |
| | | pageBean.setPageNum(pageNum); |
| | | pageBean.setPageSize(pageSize); |
| | | state.setPageBean(pageBean); |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | state.setNum(uinf.getuId());//将用户id存放在Fbs9100_state的num中用于处理用户管理的机房问题 |
| | | ServiceModel model = service.serchByCondition(state); |
| | |
| | | } |
| | | |
| | | //放电测试添加fbs9600设备的添加电池组的操作 |
| | | @GetMapping("byInfo") |
| | | @PostMapping("byInfo") |
| | | @ApiOperation(notes = "",value="放电测试添加fbs9600设备的添加电池组的操作") |
| | | public ServiceModel serchByInfo(@RequestBody BattInf binf){ |
| | | public ServiceModel serchByInfo(@RequestParam String stationName,@RequestParam String stationName1,@RequestParam Integer battGroupId){ |
| | | BattInf binf = new BattInf(); |
| | | binf.setStationName(stationName); |
| | | binf.setStationName1(stationName1); |
| | | binf.setBattGroupId(battGroupId); |
| | | ServiceModel model= service.serchByInfo(binf); |
| | | |
| | | return model; |