| | |
| | | |
| | | import com.whyc.dto.InterfaceParam; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Fbs9100Setparam; |
| | | import com.whyc.service.InterfaceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public Response getBattStationInfoByStationId(@RequestParam String stationId,@RequestParam String interfaceName){ |
| | | return service.getBattStationInfoByStationId(stationId,interfaceName); |
| | | } |
| | | |
| | | /** |
| | | * 核容放电: |
| | | * 获取参数: ①sendCmdGet |
| | | * 设置参数: ②sendCmdSet |
| | | * 启动: ①sendCmdGet |
| | | * 停止: ①sendCmdGet |
| | | * |
| | | * 内阻测试: |
| | | * 启动: ①sendCmdGet |
| | | * 停止: ①sendCmdGet |
| | | */ |
| | | @ApiOperation("发送指令,获取参数(启动|停止|获取参数)") |
| | | @GetMapping("sendCmdGet") |
| | | public Response sendCmdGet(@RequestParam int opCmd,@RequestParam Integer testCmd,@RequestParam int devId,@RequestParam int battGroupNum){ |
| | | return service.sendCmdGet(opCmd,testCmd,devId,battGroupNum); |
| | | } |
| | | |
| | | @ApiOperation("发送指令,设置参数") |
| | | @PostMapping("sendCmdSet") |
| | | public Response sendCmdSet(@RequestBody Fbs9100Setparam param){ |
| | | return service.sendCmdSet(param); |
| | | } |
| | | } |
| | |
| | | @Autowired |
| | | private BattMapInformationMapper mapMapper; |
| | | |
| | | @Autowired |
| | | private Fbs9100SetparamService fbs9100SetparamService; |
| | | |
| | | @Autowired |
| | | private Fbs9100SetparamMapper fbs9100SetparamMapper; |
| | | |
| | | public Response getBattinf(int pageNum, int pageSize, String interfaceNumber) { |
| | | //先验证 |
| | | int flag = decryptInterface(interfaceNumber); |
| | |
| | | return new Response().set(1, "越权访问"); |
| | | } |
| | | } |
| | | |
| | | public Response sendCmdGet(int opCmd, Integer testCmd, int devId, int battGroupNum) { |
| | | boolean bl=fbs9100SetparamService.sendCmdToFBS9100Dev2(opCmd,testCmd!=null?testCmd:0,devId,battGroupNum); |
| | | Fbs9100Setparam setparam=fbs9100SetparamMapper.serchbyDev_id(devId); |
| | | return new Response().setII(1,setparam,bl,bl==true?"查询成功!":"设置9100参数失败,请检查网络!"); |
| | | } |
| | | |
| | | public Response sendCmdSet(Fbs9100Setparam param) { |
| | | Long devId = param.getDevId(); |
| | | if (devId.toString().startsWith("61850")){ |
| | | return fbs9100SetparamService.update61850Param(param); |
| | | }else{ |
| | | return fbs9100SetparamService.update(param); |
| | | } |
| | | } |
| | | |
| | | } |