| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.google.gson.Gson; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | |
| | | import java.util.List; |
| | | //人脸比对检测车厢异常开启 |
| | | @RestController |
| | | @Api(tags = "人脸比对检测车厢异常开启") |
| | | @RequestMapping("/hk") |
| | | public class FaceImgController { |
| | | |
| | |
| | | @Autowired |
| | | private IEventLogService iEventLogService; |
| | | |
| | | |
| | | @ApiOperation(value = "人脸对比图片") |
| | | @RequestMapping(value = "/faceImg", method = RequestMethod.POST) |
| | | public void saveOrUpdate(HttpServletRequest request) throws IOException, ServletException { |
| | | OssSetting os = new Gson().fromJson(settingService.get(SettingConstant.LOCAL_OSS).getValue(), OssSetting.class); |
| | |
| | | return; |
| | | } |
| | | |
| | | String format = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm"); |
| | | Date date1 = new Date(); |
| | | long time = date1.getTime()-2*60*1000; |
| | | Date date = new Date(time); |
| | | String format1 = DateUtil.format(date,"yyyy-MM-dd HH:mm:ss"); |
| | | String format2 = DateUtil.format(date1,"yyyy-MM-dd HH:mm:ss"); |
| | | QueryWrapper<Alarm> awrapper = new QueryWrapper<>(); |
| | | awrapper.between("create_time",format+"00",format+"59"); |
| | | awrapper.between("create_time",format1,format2); |
| | | awrapper.eq("car_no",one.getCarNo()); |
| | | awrapper.eq("type",5); |
| | | List<Alarm> list = iAlarmService.list(awrapper); |