| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.whyc.carCamera.Acs.AcsMain; |
| | | import com.whyc.dto.CarCamera; |
| | | import com.whyc.mapper.CarCameraInfMapper; |
| | | import com.whyc.mapper.CarCameraMapper; |
| | | import com.whyc.pojo.CarCamera; |
| | | import com.whyc.dto.Login; |
| | | import com.whyc.pojo.CarCameraInf; |
| | | import com.whyc.pojo.Response; |
| | | import javafx.scene.effect.Bloom; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | |
| | | @Service |
| | | public class CarCameraService { |
| | | @Autowired(required = false) |
| | | private AcsMain acsMain; |
| | | |
| | | @Autowired(required = false) |
| | | private CarCameraMapper cameraMapper; |
| | | @Autowired(required = false) |
| | | private CarCameraInfMapper infMapper; |
| | | |
| | | //获取门禁状态 |
| | | public Response getCarCamera(Login login) { |
| | |
| | | Boolean bl=acsMain.controllCarCamera(login); |
| | | return new Response().set(1,bl,"控制门禁"); |
| | | } |
| | | |
| | | //获取门禁状态 |
| | | public Response getCarCameraRt(Login login) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("ip",login.getIp()); |
| | | wrapper.last("limit 1"); |
| | | CarCameraInf carCameraInf=infMapper.selectOne(wrapper); |
| | | QueryWrapper wrapper1=new QueryWrapper(); |
| | | wrapper1.eq("carCameraId",carCameraInf.getCarcameraId()); |
| | | wrapper1.last("limit 1"); |
| | | CarCamera carCamera=cameraMapper.selectOne(wrapper1); |
| | | return new Response().setII(1,carCamera!=null,carCamera,"获取门禁状态"); |
| | | } |
| | | } |