BTS停止基础上加上tb_li9130_setparam_plan表得is_statup设置为0
| | |
| | | @Autowired |
| | | private Fbs9100SetparamService service; |
| | | |
| | | @ApiOperation(value = "查询设备的参数",notes = "等10s响应") |
| | | @ApiOperation(value = "查询设备的参数", notes = "等10s响应") |
| | | @GetMapping("/serchdevParam") |
| | | public Response serchdevParam(@RequestParam int devId){ |
| | | return service.serchdevParam(devId); |
| | | public Response serchdevParam(@RequestParam int devId) { |
| | | return service.serchdevParam(devId); |
| | | } |
| | | |
| | | @ApiOperation(tags = "在线监测-实时监控",value = "在线监测-实时监控-BTS停止") |
| | | @ApiOperation(tags = "在线监测-实时监控", value = "在线监测-实时监控-BTS停止") |
| | | @GetMapping("serchbyDev_id") |
| | | public Response serchbyDev_id(@RequestParam int num, Integer testCmd,@RequestParam int devId,@RequestParam int battGroupNum){ |
| | | return service.serchbyDev_id(num,testCmd,devId,battGroupNum); |
| | | public Response serchbyDev_id(@RequestParam int num, Integer testCmd, @RequestParam int devId, @RequestParam int battGroupNum) { |
| | | return service.serchbyDev_id(num, testCmd, devId, battGroupNum); |
| | | } |
| | | |
| | | @ApiOperation(tags = "在线监测-实时监控",value = "在线监测-实时监控-重启设备") |
| | | @ApiOperation(tags = "在线监测-实时监控", value = "BTS停止基础上加上tb_li9130_setparam_plan表得is_statup设置为0") |
| | | @GetMapping("serchbyDev_id_li9130") |
| | | public Response serchbyDev_id_li9130(@RequestParam int num, Integer testCmd, @RequestParam int devId, @RequestParam int battGroupNum) { |
| | | return service.serchbyDev_id_li9130(num, testCmd, devId, battGroupNum); |
| | | } |
| | | |
| | | @ApiOperation(tags = "在线监测-实时监控", value = "在线监测-实时监控-重启设备") |
| | | @PostMapping("updateMaintain") |
| | | public Response updateMaintain(@RequestBody Fbs9100Setparam fbs9100Setparam){ |
| | | public Response updateMaintain(@RequestBody Fbs9100Setparam fbs9100Setparam) { |
| | | return service.updateMaintain(fbs9100Setparam); |
| | | } |
| | | @ApiOperation(tags = "在线监测-实时监控",value = "在线监测-实时监控-BTS放电参数设置",notes = "Fbs9100_setparamAction_action_update") |
| | | |
| | | @ApiOperation(tags = "在线监测-实时监控", value = "在线监测-实时监控-BTS放电参数设置", notes = "Fbs9100_setparamAction_action_update") |
| | | @PostMapping("update") |
| | | public Response update(@RequestBody Fbs9100Setparam fbs9100Setparam){ |
| | | public Response update(@RequestBody Fbs9100Setparam fbs9100Setparam) { |
| | | return service.update(fbs9100Setparam); |
| | | } |
| | | |
| | |
| | | import com.whyc.dto.FBS9100_ComBase; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.Fbs9100SetparamMapper; |
| | | import com.whyc.mapper.Li9130SetparamPlanMapper; |
| | | import com.whyc.pojo.Fbs9100Setparam; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | public class Fbs9100SetparamService { |
| | | @Resource |
| | | private Fbs9100SetparamMapper mapper; |
| | | @Resource |
| | | private Li9130SetparamPlanMapper li9130Mapper; |
| | | |
| | | //查询设备的参数 |
| | | public Response serchdevParam(int devId) { |
| | | sendCmdToFBS9100Dev(FBS9100_ComBase.CMD_GetDischargeParm,0,devId); |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | List list=mapper.selectList(wrapper); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().set(1,pageInfo); |
| | | sendCmdToFBS9100Dev(FBS9100_ComBase.CMD_GetDischargeParm, 0, devId); |
| | | QueryWrapper wrapper = new QueryWrapper(); |
| | | wrapper.eq("dev_id", devId); |
| | | List list = mapper.selectList(wrapper); |
| | | PageInfo pageInfo = new PageInfo(list); |
| | | return new Response().set(1, pageInfo); |
| | | } |
| | | |
| | | //右键查看参数和弹出框的刷新按钮-----BTS停止 |
| | | public Response serchbyDev_id(int num, Integer testCmd, int devId, int battGroupNum) { |
| | | boolean bl=sendCmdToFBS9100Dev2(num,testCmd!=null?testCmd:0,devId,battGroupNum); |
| | | Fbs9100Setparam setparam=mapper.serchbyDev_id(devId); |
| | | return new Response().setII(1,setparam,bl,bl==true?"查询成功!":"设置9100参数失败,请检查网络!"); |
| | | boolean bl = sendCmdToFBS9100Dev2(num, testCmd != null ? testCmd : 0, devId, battGroupNum); |
| | | Fbs9100Setparam setparam = mapper.serchbyDev_id(devId); |
| | | return new Response().setII(1, setparam, bl, bl == true ? "查询成功!" : "设置9100参数失败,请检查网络!"); |
| | | } |
| | | |
| | | //右键查看参数和弹出框的刷新按钮-----BTS停止基础上加上tb_li9130_setparam_plan表得is_statup设置为0 |
| | | public Response serchbyDev_id_li9130(int num, Integer testCmd, int devId, int battGroupNum) { |
| | | boolean bl = sendCmdToFBS9100Dev2(num, testCmd != null ? testCmd : 0, devId, battGroupNum); |
| | | //tb_li9130_setparam_plan表得is_statup设置为0 |
| | | UpdateWrapper wrapper = new UpdateWrapper(); |
| | | wrapper.set("is_startup", 0); |
| | | wrapper.eq("dev_id", devId); |
| | | int flag = li9130Mapper.update(null, wrapper); |
| | | Fbs9100Setparam setparam = mapper.serchbyDev_id(devId); |
| | | return new Response().setIII(1, setparam, bl, flag > 0, bl == true ? "查询成功!" : "设置9100参数失败,请检查网络!"); |
| | | } |
| | | |
| | | //离线养护功能-----重启设备 |
| | | public Response updateMaintain(Fbs9100Setparam fbs9100Setparam) { |
| | | boolean bl=false; |
| | | int flag=0; |
| | | String msg=""; |
| | | if(fbs9100Setparam.getOpCmd()==FBS9100_ComBase.CMD_ResetSystem){ |
| | | bl=sendCmdToFBS9100Dev(fbs9100Setparam.getOpCmd(),0,fbs9100Setparam.getDevId().intValue()); |
| | | if(bl){ |
| | | flag=1; |
| | | msg="重启成功!"; |
| | | }else{ |
| | | flag=0; |
| | | msg="重启失败,请检查网络!"; |
| | | boolean bl = false; |
| | | int flag = 0; |
| | | String msg = ""; |
| | | if (fbs9100Setparam.getOpCmd() == FBS9100_ComBase.CMD_ResetSystem) { |
| | | bl = sendCmdToFBS9100Dev(fbs9100Setparam.getOpCmd(), 0, fbs9100Setparam.getDevId().intValue()); |
| | | if (bl) { |
| | | flag = 1; |
| | | msg = "重启成功!"; |
| | | } else { |
| | | flag = 0; |
| | | msg = "重启失败,请检查网络!"; |
| | | } |
| | | }else{ |
| | | Boolean b=mapper.updateMaintain(fbs9100Setparam); |
| | | if(b){ |
| | | bl=sendCmdToFBS9100Dev(fbs9100Setparam.getOpCmd(),0,fbs9100Setparam.getDevId().intValue()); |
| | | if(bl){ |
| | | flag=1; |
| | | msg="修改成功!"; |
| | | }else{ |
| | | flag=0; |
| | | msg="启动离线养护失败,请检查网络!"; |
| | | } else { |
| | | Boolean b = mapper.updateMaintain(fbs9100Setparam); |
| | | if (b) { |
| | | bl = sendCmdToFBS9100Dev(fbs9100Setparam.getOpCmd(), 0, fbs9100Setparam.getDevId().intValue()); |
| | | if (bl) { |
| | | flag = 1; |
| | | msg = "修改成功!"; |
| | | } else { |
| | | flag = 0; |
| | | msg = "启动离线养护失败,请检查网络!"; |
| | | } |
| | | }else{ |
| | | flag=0; |
| | | msg="修改失败!"; |
| | | } else { |
| | | flag = 0; |
| | | msg = "修改失败!"; |
| | | } |
| | | } |
| | | return new Response().set(1,flag>0?true:false,msg); |