update swagger API battDevAlarmData ect and 跨域 tags
| | |
| | | import com.fgkj.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | //发布新公告 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "KEY announce_time VALUE 2018/7/7 11:11:00",value="发布新公告") |
| | | public ServiceModel add(@RequestParam Date announce_time, @RequestParam String message, @RequestParam String note) { |
| | | public ServiceModel add(@ApiParam(value = "时间" ,required = true)@RequestParam Date announce_time, @ApiParam(value = "消息" ,required = true)@RequestParam String message, @ApiParam(value = "备注" ,required = true)@RequestParam String note) { |
| | | Announce a= new Announce(); |
| | | a.setAnnounce_time(announce_time); |
| | | a.setMessage(message); |
| | |
| | | import com.fgkj.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | |
| | | //查询落后单体总数 |
| | | @GetMapping("nums") |
| | | @ApiOperation(notes = "",value="查询落后单体总数") |
| | | @ApiOperation(notes = "获取当前session 中的 uName",value="查询落后单体总数") |
| | | public ServiceModel searchNums() { |
| | | User_inf userInf=(User_inf) ActionUtil.getUser(); |
| | | // User_inf userInf=new User_inf(); |
| | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //落后单体查询:根据条件查询落后单体 |
| | | @GetMapping("byInfo") |
| | | @ApiOperation(notes = "",value="落后单体查询:根据条件查询落后单体") |
| | | @PostMapping("byInfo") |
| | | @ApiOperation(notes = "{ \"pageBean\": { \"pageNum\": 1, \"pageSize\": 5 },\"binf\": { \"battGroupId\": 0, \"stationName1\": \"\", \"stationName\": \"\", \"battProductDate\": \"2000-12-12 00:00:00\", \"battProductDate1\": \"2020-12-12 00:00:00\" } }",value="落后单体查询:根据条件查询落后单体") |
| | | public ServiceModel serchByInfo(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | // Batt_Maint_Dealarm bmd = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_Maint_Dealarm.class); |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | |
| | | import com.fgkj.dto.BadBatt_mon_flag; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.services.BadBatt_mon_flagService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.ibatis.annotations.Property; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | //往标识表中插入一笔数据 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="往标识表中插入一笔数据") |
| | | public ServiceModel add(@RequestBody BadBatt_mon_flag monFlag) { |
| | | // BadBatt_mon_flag monflag = getGson().fromJson(json, BadBatt_mon_flag.class); |
| | | public ServiceModel add(@ApiParam(value = "计数",required = true) @RequestParam Integer count) { |
| | | BadBatt_mon_flag monFlag =new BadBatt_mon_flag(); |
| | | monFlag.setCount(count); |
| | | ServiceModel model = service.add(monFlag); |
| | | return model; |
| | | } |
| | |
| | | } |
| | | //跨域访问获取所有电池组的信息<-------跨域-----------> |
| | | @GetMapping("inform_ky") |
| | | @ApiOperation(notes = "跨域",value="跨域访问获取所有电池组的信息") |
| | | @ApiOperation(tags = "跨域", notes = "",value="跨域访问获取所有电池组的信息") |
| | | public ServiceModel searchInform_ky(){ |
| | | //isAllowHeaders(); //允许跨域访问 |
| | | |
| | |
| | | } |
| | | //修改电池组信息<-------跨域-----------> |
| | | @PutMapping("ky") |
| | | @ApiOperation(notes = "跨域",value="修改电池组信息") |
| | | @ApiOperation(tags = "跨域", notes = "",value="修改电池组信息") |
| | | public ServiceModel update_ky(@RequestBody List<BattInf> list) { |
| | | // List<BattInf> list= getGson("yyyy-MM-dd").fromJson(json, new TypeToken<List<BattInf>>(){}.getType()); |
| | | |
| | |
| | | } |
| | | //删除电池组<-------跨域-----------> |
| | | @DeleteMapping("ky") |
| | | @ApiOperation(notes = "跨域",value="删除电池组") |
| | | @ApiOperation(tags = "跨域", notes = "",value="删除电池组") |
| | | public ServiceModel delete_ky(@RequestBody List<BattInf> list) { |
| | | // List<BattInf> list= getGson("yyyy-MM-dd").fromJson(json, new TypeToken<List<BattInf>>(){}.getType()); |
| | | |
| | |
| | | import com.fgkj.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | //添加关注 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="添加关注") |
| | | public ServiceModel add(@RequestBody Batt_attention attention) { |
| | | // Batt_attention attention = getGson().fromJson(json, Batt_attention.class); |
| | | public ServiceModel add(@RequestParam Integer battGroupId,@RequestParam Integer monNum,@ApiParam(value = "ID")@RequestParam Integer uid) { |
| | | Batt_attention attention = new Batt_attention(); |
| | | User_inf uinf = (User_inf)ActionUtil.getUser(); |
| | | // User_inf uinf = new User_inf(); |
| | | // uinf.setuId(1001); |
| | | attention.setUid(uinf.getuId()); |
| | | attention.setBattGroupId(battGroupId); |
| | | attention.setMonNum(monNum); |
| | | attention.setUid(uid); |
| | | ServiceModel model = service.add(attention); |
| | | { |
| | | String msg="添加对"+attention.getBattGroupId()+"电池组的"+attention.getMonNum()+"单体的关注"; |
| | |
| | | //取消关注 |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="取消关注") |
| | | public ServiceModel delete(@RequestBody Batt_attention attention) { |
| | | // Batt_attention attention = getGson().fromJson(json, Batt_attention.class); |
| | | public ServiceModel delete(@RequestParam Integer battGroupId,@RequestParam Integer monNum,@ApiParam(value = "ID",required = true)@RequestParam Integer uid) { |
| | | Batt_attention attention = new Batt_attention(); |
| | | User_inf uinf = (User_inf)ActionUtil.getUser(); |
| | | attention.setUid(uinf.getuId()); |
| | | attention.setBattGroupId(battGroupId); |
| | | attention.setMonNum(monNum); |
| | | attention.setUid(uid); |
| | | ServiceModel model = service.delete(attention); |
| | | { |
| | | String msg="取消对"+attention.getBattGroupId()+"电池组的"+attention.getMonNum()+"号单体的关注"; |
| | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //根据电池组的筛选条件,查询单体的实际电压 |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "",value="根据电池组的筛选条件,查询单体的实际电压") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "{ \"binf\": { \"stationName1\": \"\", \"stationName\": \"\", \"battGroupId\": 0, \"monNum\": 0 },\"pageBean\": { \"pageNum\": 1, \"pageSize\": 3 } }",value="根据电池组的筛选条件,查询单体的实际电压") |
| | | public ServiceModel serchByCondition(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | // Batt_Maint_Dealarm bmd = getGson().fromJson(json, Batt_Maint_Dealarm.class); |
| | | User_inf uinf = (User_inf)ActionUtil.getUser(); |
| | |
| | | //关注之前识别是否关注过 |
| | | @GetMapping("judge") |
| | | @ApiOperation(notes = "",value="关注之前识别是否关注过") |
| | | public ServiceModel judgeInOrNot(@RequestBody Batt_attention attention) { |
| | | // Batt_attention attention = getGson().fromJson(json, Batt_attention.class); |
| | | public ServiceModel judgeInOrNot(@RequestParam Integer battGroupId,@RequestParam Integer monNum,@ApiParam(value = "ID",required = true)@RequestParam Integer uid) { |
| | | Batt_attention attention = new Batt_attention(); |
| | | User_inf uinf = (User_inf)ActionUtil.getUser(); |
| | | attention.setUid(uinf.getuId()); |
| | | attention.setBattGroupId(battGroupId); |
| | | attention.setMonNum(monNum); |
| | | attention.setUid(uid); |
| | | ServiceModel model = service.judgeInOrNot(attention); |
| | | |
| | | return model; |
| | |
| | | import com.fgkj.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("battDevAlarmData") |
| | |
| | | @Resource |
| | | private Battalarm_dataService battAlarmDataService; |
| | | |
| | | |
| | | |
| | | //3.3设备告警实时查询 |
| | | @GetMapping("byInfo") |
| | | @ApiOperation(notes = "",value="设备告警实时查询") |
| | | @PostMapping("byInfo") |
| | | @ApiOperation(notes = "{ \"pageBean\": { \"pageNum\": 1, \"pageSize\": 3 },\"stationName\": \"\", \"stationName1\": \"\", \"alm_type\": \"\" }",value="设备告警实时查询") |
| | | public ServiceModel getByInfo(@RequestBody Batt_devalarm_data bdd) { |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | bdd.setUinf(uinf); |
| | | ServiceModel model= service.serchByInfo(bdd); |
| | | |
| | | ServiceModel model= service.serchByInfo(bdd); |
| | | return model; |
| | | } |
| | | |
| | | //3.4设备告警历史记录查询 |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "",value="设备告警历史记录查询") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "{ \"pageBean\": { \"pageNum\": 1, \"pageSize\": 3 },\"binf\": { \"stationName\": \"湖北省\", \"stationName1\": \"湖北省\" },\"adata_H\": { \"alm_start_time\": \"2017-12-15 09:09:57\", \"alm_start_time1\": \"2020-12-15 09:09:57\" } }",value="设备告警历史记录查询") |
| | | public ServiceModel serchByCondition(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | bmd.setUinf(uinf); |
| | | ServiceModel model = service.serchByCondition(bmd); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //3.4设备实时告警(确认告警)<多数据修改> |
| | | @PutMapping("/batch") |
| | | @ApiOperation(notes = "",value="设备实时告警(确认告警)<多数据修改>") |
| | | @ApiOperation(notes = "[{ \"alm_is_confirmed\": \"0\", \"alm_confirmed_time\": \"2020-11-19 16:26:01\", \"num\": \"226\" }]",value="设备实时告警(确认告警)<多数据修改>") |
| | | public ServiceModel updatePro(@RequestBody List<Batt_devalarm_data> list) { |
| | | ServiceModel model = service.updatePro(list); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //3.4设备实时告警(取消告警)<多数据修改> |
| | | @PutMapping("/cancelBatch") |
| | | @ApiOperation(notes = "",value="设备实时告警(取消告警)<多数据修改>") |
| | | @ApiOperation(notes = "[{ \"num\": 0, \"record_id\": 0, \"alm_end_time\": \"2021-01-28 08:22:34\", \"alm_cleared_type\": 0, \"note\": \"\", \"stationName\": \"\" }]",value="设备实时告警(取消告警)<多数据修改>") |
| | | public ServiceModel cancelPro(@RequestBody List<Batt_devalarm_data> list) { |
| | | ServiceModel model = service.cancelPro(list); |
| | | |
| | |
| | | |
| | | //3.4设备实时告警/历史告警(删除告警)<多数据删除> |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(notes = "",value="设备实时告警/历史告警(删除告警)<多数据删除>") |
| | | @ApiOperation(notes = "[{ \"alm_is_confirmed\": \"0\", \"alm_confirmed_time\": \"2020-11-19 16:26:01\", \"num\": \"226\" }]",value="设备实时告警/历史告警(删除告警)<多数据删除>") |
| | | public ServiceModel deletePro(@RequestBody List<Batt_devalarm_data> list) { |
| | | ServiceModel model = service.deletePro(list); |
| | | |
| | |
| | | //点击项目下方的滚动,查询该设备告警的实时信息 |
| | | @GetMapping("devAlarm") |
| | | @ApiOperation(notes = "",value="点击项目下方的滚动,查询该设备告警的实时信息") |
| | | public ServiceModel serchDev_alarm(@RequestBody Batt_devalarm_data ddata) { |
| | | public ServiceModel serchDev_alarm(@ApiParam(value = "ID" ,required = true)@RequestParam Integer dev_id, @ApiParam(value = "类型" ,required = true)@RequestParam Integer alm_type, @ApiParam(value = "开始时间段格式 2021/01/28 08:22:34" ,required = true)@RequestParam Date alm_start_time) { |
| | | Batt_devalarm_data ddata= new Batt_devalarm_data(); |
| | | ddata.setDev_id(dev_id); |
| | | ddata.setAlm_type(alm_type); |
| | | ddata.setAlm_start_time(alm_start_time); |
| | | ServiceModel model = service.serchDev_alarm(ddata); |
| | | |
| | | return model; |
| | |
| | | //根据设备id查询设备是否存在设备告警 |
| | | @GetMapping("levelDevAlarmOrBattAlarm_ky") |
| | | @ApiOperation(notes = "",value="设备id查询设备是否存在设备告警") |
| | | public ServiceModel serchlevelDev_alarmOrBatt_alarm_ky(@RequestBody BattInf binf){ |
| | | public ServiceModel serchlevelDev_alarmOrBatt_alarm_ky(@ApiParam(value = "电池组ID",required = true)@RequestParam Integer battGroupId,@ApiParam(value = "设备id" ,required = true)@RequestParam Integer fbsDeviceId){ |
| | | BattInf binf= new BattInf(); |
| | | binf.setBattGroupId(battGroupId); |
| | | binf.setFbsDeviceId(fbsDeviceId); |
| | | int level_d=service.serchlevelDev_alarm(binf); |
| | | int level_b=battAlarmDataService.serchlevelBatt_alarm(binf); |
| | | String status=""; |
| | |
| | | * @param obj |
| | | * @return |
| | | */ |
| | | @GetMapping("devAlarm_ky") |
| | | @ApiOperation(notes = "",value="查询设备实时告警记录(跨域新增)") |
| | | public ServiceModel searchDevAlarm_ky(@RequestBody Batt_devalarm_data ddata ) { |
| | | @PostMapping("devAlarm_ky") |
| | | @ApiOperation(tags = "跨域", notes = "",value="查询设备实时告警记录(跨域新增)") |
| | | public ServiceModel searchDevAlarm_ky(@ApiParam(value = "设备ID",required = true)@RequestParam Integer dev_id ) { |
| | | Batt_devalarm_data ddata=new Batt_devalarm_data(); |
| | | ddata.setDev_id(dev_id); |
| | | ServiceModel model = service.searchDevAlarm(ddata); |
| | | |
| | | return model; |
| | |
| | | |
| | | //3.4设备实时告警(确认告警)<多数据修改><-----------跨域-------------> |
| | | @PutMapping("ky") |
| | | @ApiOperation(notes = "跨域",value="设备实时告警(确认告警)<多数据修改>") |
| | | @ApiOperation(tags = "跨域", notes = "[{ \"num\": 0, \"alm_is_confirmed\": 0, \"alm_confirmed_time\": \"2021-01-28 08:22:34\", \"note\": \"\", \"stationName\": \"\" }]",value="设备实时告警(确认告警)<多数据修改>") |
| | | public ServiceModel updatePro_ky(@RequestBody List<Batt_devalarm_data> list) { |
| | | ServiceModel model = service.updatePro(list); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //3.4设备实时告警(取消告警)<多数据修改><-----------跨域-------------> |
| | | @PutMapping("/cancelBatch_ky") |
| | | @ApiOperation(notes = "跨域",value="设备实时告警(取消告警)<多数据修改>") |
| | | @ApiOperation(tags = "跨域", notes = "[{ \"num\": 0, \"record_id\": 0, \"alm_end_time\": \"2021-01-28 08:22:34\", \"alm_cleared_type\": 0, \"note\": \"\", \"stationName\": \"\" }]", value = "设备实时告警(取消告警)<多数据修改> 跨域") |
| | | public ServiceModel cancelPro_ky(@RequestBody List<Batt_devalarm_data> list) { |
| | | // List<Batt_devalarm_data> list = getGson().fromJson(json,new TypeToken<List<Batt_devalarm_data>>(){}.getType()); |
| | | ServiceModel model = service.cancelPro(list); |
| | |
| | | |
| | | //3.4设备实时告警/(删除告警)<多数据删除><-----------跨域-------------> |
| | | @DeleteMapping("/batch_ky") |
| | | @ApiOperation(notes = "跨域",value="设备实时告警/(删除告警)<多数据删除>") |
| | | @ApiOperation(tags = "跨域", notes = "[{ \"num\": 0 }] ",value="设备实时告警/(删除告警)<多数据删除>") |
| | | public ServiceModel deletePro_ky(@RequestBody List<Batt_devalarm_data> list) { |
| | | // List<Batt_devalarm_data> list = getGson().fromJson(json,new TypeToken<List<Batt_devalarm_data>>(){}.getType()); |
| | | ServiceModel model = service.deletePro(list); |
| | |
| | | private Batt_devalarm_data_historyService service; |
| | | |
| | | //3.4设备告警历史记录查询 |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "",value="设备告警历史记录查询") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "{ \"pageBean\": { \"pageNum\": 1, \"pageSize\": 3 },\"binf\": { \"stationName\": \"\", \"stationName1\": \"\" },\"adata_H\": { \"alm_start_time\": \"2000-12-15 09:09:57\", \"alm_start_time1\": \"2020-12-15 09:09:57\" } }",value="设备告警历史记录查询") |
| | | public ServiceModel serchByCondition(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | // Batt_Maint_Dealarm bmd = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_Maint_Dealarm.class); |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | |
| | | |
| | | //3.4设备历史告警(删除告警)<多数据删除> |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="设备历史告警(删除告警)<多数据删除>") |
| | | @ApiOperation(notes = "[{ \"num\":1, \"stationName\":\"\", \"note\":\"\" }]",value="设备历史告警(删除告警)<多数据删除>") |
| | | public ServiceModel deletePro(@RequestBody List<Batt_devalarm_data_history> list) { |
| | | // List<Batt_devalarm_data_history> list = getGson().fromJson(json,new TypeToken<List<Batt_devalarm_data_history>>(){}.getType()); |
| | | ServiceModel model = service.deletePro(list); |
| | |
| | | } |
| | | //跨域访问查询电池组的单体数据 < ! ---- ---- 跨域访问 ------------> |
| | | @GetMapping("byCondition_ky") |
| | | @ApiOperation(notes = "跨域访问",value="跨域访问查询电池组的单体数据") |
| | | @ApiOperation(tags = "跨域", notes = "跨域访问",value="跨域访问查询电池组的单体数据 跨域访问") |
| | | public ServiceModel serchByCondition_ky(@RequestBody Batt_rtdata rtdata){ |
| | | //ActionUtil.isAllowHeaders(); |
| | | ServiceModel model = new ServiceModel(); |
| | |
| | | } |
| | | //实时监测中的查询实时组端信息 <!-- 跨域访问 ---> |
| | | @GetMapping("byCondition_ky") |
| | | @ApiOperation(notes = "跨域访问",value="实时监测中的查询实时组端信息") |
| | | @ApiOperation(tags = "跨域", notes = "",value="实时监测中的查询实时组端信息 跨域访问") |
| | | public ServiceModel serchByCondition_ky(@RequestBody Batt_rtstate rtstate){ |
| | | //ActionUtil.isAllowHeaders(); //允许跨域访问 |
| | | // rtstate = ActionUtil.getGson().fromJson(json, Batt_rtstate.class); |
| | |
| | | } |
| | | //3.1电池告警实时查询<***********跨域专用**************> |
| | | @GetMapping("byCondition_ky") |
| | | @ApiOperation(notes = "跨域专用",value="电池告警实时查询") |
| | | @ApiOperation(tags = "跨域", notes = "",value="电池告警实时查询 跨域访问") |
| | | public ServiceModel serchByCondition_ky(@RequestBody BattInf binf){ |
| | | // BattInf binf=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class); |
| | | ServiceModel model=service.serchByCondition_ky(binf); |
| | |
| | | } |
| | | // 3.1电池告警实时查询(确认告警)<***********跨域专用**************> |
| | | @PutMapping("/ky") |
| | | @ApiOperation(notes = "跨域专用",value="电池告警实时查询(确认告警)") |
| | | @ApiOperation(tags = "跨域", notes = "",value="电池告警实时查询(确认告警) 跨域专用") |
| | | public ServiceModel update_ky(@RequestBody List<Battalarm_data> list) { |
| | | /*ServiceModel model=new ServiceModel(); |
| | | if(bads!=null && bads.length()>0){ |
| | |
| | | } |
| | | // 3.1电池告警实时查询(取消告警)<***********跨域专用**************> |
| | | @PutMapping("/cancelAlarm_ky") |
| | | @ApiOperation(notes = "跨域专用",value="电池告警实时查询(取消告警)") |
| | | @ApiOperation(tags = "跨域", notes = "",value="电池告警实时查询(取消告警) 跨域专用") |
| | | public ServiceModel cancelalarm_ky(@RequestBody List<Battalarm_data> list) { |
| | | /*ServiceModel model=new ServiceModel(); |
| | | if(bads!=null && bads.length()>0){ |
| | |
| | | } |
| | | //3.1/3.2电池告警查询(删除记录)<***********跨域专用**************> |
| | | @DeleteMapping("/ky") |
| | | @ApiOperation(notes = "跨域专用",value="电池告警查询(删除记录)") |
| | | @ApiOperation(tags = "跨域", notes = "",value="电池告警查询(删除记录) 跨域专用") |
| | | public ServiceModel delete_ky(@RequestBody List<Battalarm_data> list) { |
| | | /*ServiceModel model=new ServiceModel(); |
| | | if(bads!=null && bads.length()>0){ |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("history_ky") |
| | | @ApiOperation(notes = "跨域访问",value="历史数据查询") |
| | | @ApiOperation(tags = "跨域", notes = "",value="历史数据查询 跨域专用") |
| | | public ServiceModel findhistory_ky(@RequestBody Batttestdata btd){ |
| | | // btd = ActionUtil.getGson().fromJson(json, Batttestdata.class); |
| | | ServiceModel model = service.serchByCondition_ky(btd); |
| | |
| | | /* 根据电池组id查询电池组的inf表中的放电信息 <!------ 跨域访问 ---------> |
| | | */ |
| | | @GetMapping("battTestInfDataById_ky") |
| | | @ApiOperation(notes = "跨域访问",value="根据电池组id查询电池组的inf表中的放电信息") |
| | | @ApiOperation(tags = "跨域", notes = "",value="根据电池组id查询电池组的inf表中的放电信息 跨域专用") |
| | | public ServiceModel searchBattTestInfDataById_ky(@RequestBody Batttestdata_inf bti){ |
| | | // Batttestdata_inf bti = ActionUtil.getGson().fromJson(json, Batttestdata_inf.class); |
| | | model=service.serchByCondition_ky(bti); |
| | |
| | | |
| | | //-----------跨域实现(启动,停止)设备放电 |
| | | @PutMapping("update_ky") |
| | | @ApiOperation(notes = "",value="跨域实现(启动,停止)设备放电") |
| | | @ApiOperation(tags = "跨域", notes = "",value="跨域实现(启动,停止)设备放电") |
| | | public ServiceModel update_ky(@RequestBody Fbs9100_setparam fbs) { |
| | | { String msg=""; |
| | | if(fbs.getNum()==FBS9100_ComBase.CMD_SetDischargeParm){ |
| | |
| | | |
| | | //-----------跨域根据机房编号和维护区查询放电机房的信息和放电参数 |
| | | @GetMapping("byCondition_ky") |
| | | @ApiOperation(notes = "",value="跨域根据机房编号和维护区查询放电机房的信息和放电参数") |
| | | @ApiOperation(tags = "跨域", notes = "",value="跨域根据机房编号和维护区查询放电机房的信息和放电参数") |
| | | public ServiceModel serchByCondition_ky(@RequestBody BattInf binf){ |
| | | ServiceModel model = service.serchByCondition(binf); |
| | | return model; |
| | |
| | | |
| | | //11.1FBS9100设备通信状态查询 <-- 跨域 --> |
| | | @GetMapping("byConditionKy") |
| | | @ApiOperation(notes = "跨域",value="FBS9100设备通信状态查询") |
| | | @ApiOperation(tags = "跨域", notes = "",value="FBS9100设备通信状态查询") |
| | | public ServiceModel serchByCondition_ky(){ |
| | | //isAllowHeaders(); //允许跨域访问 |
| | | ServiceModel model = service.serchByCondition_ky(); |
| | |
| | | |
| | | //查询电池组最近一次告警等级 |
| | | @Select("select alm_level from db_alarm.tb_battalarm_data where battgroupid=#{battGroupId} order by alm_start_time desc limit 1") |
| | | public int serchlevelBatt_alarm(BattInf binf); |
| | | public Integer serchlevelBatt_alarm(BattInf binf); |
| | | |
| | | //紫晶山西根据设备id和电池组id查询机房告警信息 |
| | | public int seachStationAlarm(BattInf binf); |
| | |
| | | |
| | | //Perry新增 |
| | | public int serchlevelBatt_alarm(BattInf binf) { |
| | | return mapper.serchlevelBatt_alarm(binf); |
| | | Integer res = mapper.serchlevelBatt_alarm(binf); |
| | | if (null != res) { |
| | | return res; |
| | | } else { |
| | | return -1; |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) throws ParseException { |