| | |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.log.enums.OperatorType; |
| | | import com.ruoyi.integration.api.feignClient.SwitchwayGateClient; |
| | | import com.ruoyi.integration.api.vo.SwitchwayGateReq; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | public class TVehicleRampController { |
| | | |
| | | private final TVehicleRampService vehicleRampService; |
| | | |
| | | @Resource |
| | | private SwitchwayGateClient switchwayGateClient; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | public TVehicleRampController(TVehicleRampService vehicleRampService) { |
| | |
| | | @ApiOperation(tags = {"后台-车道"},value = "开关闸车道") |
| | | @PostMapping(value = "/openOrDown") |
| | | public AjaxResult<String> openOrDown(@RequestBody TVehicleRamp dto) { |
| | | // TODO 硬件 开关闸车道 |
| | | return AjaxResult.success(); |
| | | SwitchwayGateReq req = new SwitchwayGateReq(); |
| | | req.setAction(dto.getAction()); |
| | | req.setChannel(dto.getCarportNum()); |
| | | Boolean data = switchwayGateClient.gateService(req).getData(); |
| | | return data ? AjaxResult.success() : AjaxResult.error("操作失败"); |
| | | } |
| | | |
| | | } |