예제 #1
0
 @ResponseBody
 @RequestMapping(params = "method=getPrinterSerialNo")
 public String getPrinterSerialNo(String cameraSerialNo) {
   ICameraService cameraService = ServiceManager.getService(ICameraService.class);
   CameraConfigDTO cameraConfigDTO = cameraService.getCameraConfigBySerialNo(cameraSerialNo);
   return cameraConfigDTO != null ? cameraConfigDTO.getPrinter_serial_no() : null;
 }
예제 #2
0
 @ResponseBody
 @RequestMapping(params = "method=updateCameraConfigs")
 public String updateCameraConfig(HttpServletRequest request, CameraConfigDTO cameraConfigDTO) {
   ICameraService cameraService = ServiceManager.getService(ICameraService.class);
   cameraService.updateCameraConfig(cameraConfigDTO);
   return "/camera/cameraRecordList";
 }
예제 #3
0
 @RequestMapping(params = "method=toCameraConfigDetail")
 public Object toCameraConfig(HttpServletRequest request, String id, ModelMap model) {
   Map<String, Object> result = new HashMap<String, Object>();
   ICameraService cameraService = ServiceManager.getService(ICameraService.class);
   CameraConfigDTO cameraConfigDTO = cameraService.getCameraConfigByCameraId(id);
   if (cameraConfigDTO == null) {
     cameraConfigDTO = new CameraConfigDTO();
     cameraConfigDTO.setCamera_id(id);
   }
   model.addAttribute("cameraConfigDTO", cameraConfigDTO);
   return "/camera/cameraRecordContent";
 }
예제 #4
0
 /*
   初始化摄像头配置
 */
 @ResponseBody
 @RequestMapping(params = "method=initCameraConfigList")
 public Object initCameraConfigList(HttpServletRequest request, Integer page, Integer rows) {
   Long shopId = null;
   shopId = WebUtil.getShopId(request);
   ICameraService cameraService = ServiceManager.getService(ICameraService.class);
   Map<String, Object> result = new HashMap<String, Object>();
   try {
     int total = cameraService.getCountCameraConfigByShopId(StringUtil.valueOf(shopId));
     Pager pager = new Pager(total, page, rows);
     result.put("total", total);
     if (total > 0) {
       List<CameraConfigDTO> rowsList = new ArrayList<CameraConfigDTO>();
       rowsList = cameraService.getCameraConfigByShopId(shopId.toString());
       result.put("rows", rowsList);
     }
   } catch (Exception e) {
     LOG.error(e.getMessage(), e);
   }
   return result;
 }
예제 #5
0
 /*
   初始化到店车辆记录
 */
 @ResponseBody
 @RequestMapping(params = "method=initCameraRecordList")
 public Object initCameraRecordList(HttpServletRequest request, CameraSearchCondition condition) {
   Long shopId = null;
   shopId = WebUtil.getShopId(request);
   condition.setShopId(shopId.toString());
   ICameraService cameraService = ServiceManager.getService(ICameraService.class);
   Map<String, Object> result = new HashMap<String, Object>();
   try {
     int total = cameraService.getCameraRecordDTOListAccountByShopId(condition);
     Pager pager = new Pager(total, condition.getPage(), condition.getRows());
     result.put("total", total);
     List<CameraRecordDTO> rowsList = new ArrayList<CameraRecordDTO>();
     if (total > 0) {
       rowsList = cameraService.getCameraRecordListByShopId(pager, condition);
     }
     result.put("rows", rowsList);
   } catch (Exception e) {
     LOG.error(e.getMessage(), e);
   }
   return result;
 }
예제 #6
0
 @ResponseBody
 @RequestMapping(params = "method=getQueryVehicleNo")
 public Object getQueryVehicleNo(HttpServletRequest request, CameraSearchCondition condition) {
   ICameraService cameraService = ServiceManager.getService(ICameraService.class);
   return cameraService.getVehicle_nos(condition);
 }