| | |
| | | package com.fgkj.controller.ram; |
| | | |
| | | import com.fgkj.dto.BattInf; |
| | | import com.fgkj.dto.PageBean; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.dto.ram.Fbs9100_state; |
| | |
| | | private Fbs9100_stateService service; |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="添加") |
| | | @ApiOperation(notes = "dev_id 唯一 {\n" + |
| | | " \"dev_ip\": \"\",\n" + |
| | | " \"dev_id\": 618500009,\n" + |
| | | " \"op_cmd\": 0,\n" + |
| | | " \"dev_datetime\": \"\",\n" + |
| | | " \"dev_testtype\": 0,\n" + |
| | | " \"dev_testgroupnum\": 0,\n" + |
| | | " \"dev_workstate\": 0,\n" + |
| | | " \"dev_alarmstate\": 0,\n" + |
| | | " \"dev_onlinevollow\": 0,\n" + |
| | | " \"dev_eachgroup_battsum\": 0,\n" + |
| | | " \"dev_captest_onlinevol\": 0.0,\n" + |
| | | " \"dev_captest_groupvol\": 0.0,\n" + |
| | | " \"dev_captest_curr\": 0.0,\n" + |
| | | " \"dev_captest_cap\": 0.0,\n" + |
| | | " \"dev_captest_timelong\": 0,\n" + |
| | | " \"dev_restest_moncount\": 0,\n" + |
| | | " \"dev_restest_monindex\": 0,\n" + |
| | | " \"dev_commcount\": 0,\n" + |
| | | " \"dev_errcommcount\": 0\n" + |
| | | "}",value="添加") |
| | | public ServiceModel add(@RequestBody Fbs9100_state state) { |
| | | // Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class); |
| | | ServiceModel model = service.add(state); |
| | |
| | | } |
| | | |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="修改") |
| | | @ApiOperation(notes = "{\n" + |
| | | "\t\"dev_ip\":\"\",\n" + |
| | | " \"dev_id\":\"-\",\n" + |
| | | " \"op_cmd\":\"-\",\n" + |
| | | " \"dev_datetime\":\"-\",\n" + |
| | | " \"dev_testtype\":\"-\",\n" + |
| | | " \"dev_testgroupnum\":\"-\",\n" + |
| | | " \"dev_workstate\":\"-\",\n" + |
| | | " \"dev_alarmstate\":\"-\",\n" + |
| | | " \"dev_onlinevollow\":\"-\",\n" + |
| | | " \"dev_eachgroup_battsum\":\"-\",\n" + |
| | | " \"dev_captest_onlinevol\":\"-\",\n" + |
| | | " \"dev_captest_groupvol\":\"-\",\n" + |
| | | " \"dev_captest_curr\":\"-\",\n" + |
| | | " \"dev_captest_cap\":\"-\",\n" + |
| | | " \"dev_captest_timelong\":\"-\",\n" + |
| | | " \"dev_restest_moncount\":\"-\",\n" + |
| | | " \"dev_restest_monindex\":\"-\",\n" + |
| | | " \"dev_commcount\":\"-\",\n" + |
| | | " \"dev_errcommcount\":\"-\",\n" + |
| | | " \"num\":\"-\"\n" + |
| | | "}",value="修改") |
| | | public ServiceModel update(@RequestBody Fbs9100_state state) { |
| | | // Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class); |
| | | ServiceModel model = service.update(state); |
| | |
| | | |
| | | //fbs9600设备内阻测试 |
| | | @PutMapping("/updatePro") |
| | | @ApiOperation(notes = "",value="fbs9600设备内阻测试") |
| | | @ApiOperation(notes = "[\n" + |
| | | " {\n" + |
| | | " \"op_cmd\": \"1\",\n" + |
| | | " \"dev_id\": \"-\"\n" + |
| | | " }\n" + |
| | | "]",value="fbs9600设备内阻测试") |
| | | public ServiceModel updatePro(@RequestBody List<Fbs9100_state> list) { |
| | | // List<Fbs9100_state> list =getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, new TypeToken<List<Fbs9100_state>>(){}.getType()); |
| | | ServiceModel model = service.updatePro(list); |
| | |
| | | |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel delete(@RequestBody Fbs9100_state state) { |
| | | public ServiceModel delete(@RequestParam Integer num) { |
| | | Fbs9100_state state = new Fbs9100_state(); |
| | | state.setNum(num); |
| | | // Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class); |
| | | ServiceModel model = service.delete(state); |
| | | return model; |
| | |
| | | } |
| | | |
| | | //11.1FBS9100设备通信状态查询 |
| | | @GetMapping("byCondition") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "",value="FBS9100设备通信状态查询") |
| | | public ServiceModel serchByCondition(@RequestBody Fbs9100_state state){ |
| | | // Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class); |
| | | public ServiceModel serchByCondition(@RequestParam Integer dev_errcommcount,@RequestParam Integer pageNum,@RequestParam Integer pageSize) { |
| | | Fbs9100_state state = new Fbs9100_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); |
| | |
| | | } |
| | | |
| | | //实时监测界面根据dev_alarmstate状态判断接触器状态 |
| | | @GetMapping("contactorState") |
| | | @PostMapping("contactorState") |
| | | @ApiOperation(notes = "",value="实时监测界面根据dev_alarmstate状态判断接触器状态") |
| | | public ServiceModel serchContactorState(@RequestBody Fbs9100_state state) { |
| | | // Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class); |
| | | public ServiceModel serchContactorState(@RequestParam Integer dev_id) { |
| | | Fbs9100_state state = new Fbs9100_state(); |
| | | state.setDev_id(dev_id); |
| | | ServiceModel model = service.serchContactorState(state); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | //放电测试界面根据设备id查询网络拓扑图 |
| | | @GetMapping("byInfo") |
| | | @PostMapping("byInfo") |
| | | @ApiOperation(notes = "",value="放电测试界面根据设备id查询网络拓扑图") |
| | | public ServiceModel serchByInfo(@RequestBody BattInf binf) { |
| | | // BattInf binf = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class); |
| | | public ServiceModel serchByInfo(@RequestParam Integer battGroupId) { |
| | | BattInf binf = new BattInf(); |
| | | binf.setBattGroupId(battGroupId); |
| | | ServiceModel model = service.serchByInfo(binf); |
| | | |
| | | return model; |
| | |
| | | } |
| | | |
| | | //查询61850设备的6种工作状态 |
| | | @GetMapping("devWorkState") |
| | | @PostMapping("devWorkState") |
| | | @ApiOperation(notes = "",value="查询61850设备的6种工作状态") |
| | | public ServiceModel searchDevWorkstate(@RequestBody Fbs9100_state state){ |
| | | // Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class); |
| | | public ServiceModel searchDevWorkstate(@RequestParam Integer dev_id,@RequestParam Integer dev_workstate){ |
| | | Fbs9100_state state = new Fbs9100_state(); |
| | | state.setDev_id(dev_id); |
| | | state.setDev_workstate(dev_workstate); |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | //用户id暂存在num中 |
| | | state.setNum(uinf.getuId()); |
| | |
| | | |
| | | //11.1FBS9100设备通信状态查询 <-- 跨域 --> |
| | | @GetMapping("byConditionKy") |
| | | @ApiOperation(notes = "跨域",value="FBS9100设备通信状态查询") |
| | | @ApiOperation(tags = "跨域", notes = "",value="FBS9100设备通信状态查询 跨域") |
| | | public ServiceModel serchByCondition_ky(){ |
| | | //isAllowHeaders(); //允许跨域访问 |
| | | ServiceModel model = service.serchByCondition_ky(); |