/** * 获取log动态 * * @param model * @param id * @return * @throws WebException */ @RequestMapping("stateLog") public String getStateLog(ModelMap model, String id) throws WebException { try { List<RfidLog> logList = logisticsRfidService.getRfidStateLog(id); model.put("id", id); model.put("logList", logList); return "manage/rfid/window/stateLog"; } catch (Exception e) { SxjLogger.error("查询log动态信息错误", e, this.getClass()); throw new WebException("查询log动态信息错误"); } }
/** * 停用 * * @param id * @param model * @return * @throws WebException */ @RequestMapping("disable") public @ResponseBody Map<String, String> disable(String id, ModelMap model) throws WebException { Map<String, String> map = new HashMap<String, String>(); try { LogisticsRfidEntity win = new LogisticsRfidEntity(); win.setId(id); win.setRfidState(RfidStateEnum.DISABLE); logisticsRfidService.updateLogistics(win); map.put("isOK", "ok"); } catch (Exception e) { SxjLogger.error("停用物流RFID错误", e, this.getClass()); map.put("error", e.getMessage()); } return map; }
/** * 查询列表 * * @param query * @param model * @return * @throws WebException */ @RequestMapping("query") public String queryLogistics(LogisticsRfidQuery query, ModelMap model) throws WebException { try { query.setPagable(true); List<LogisticsRfidEntity> list = logisticsRfidService.queryLogistics(query); LabelStateEnum[] Label = LabelStateEnum.values(); RfidStateEnum[] rfid = RfidStateEnum.values(); RfidTypeEnum[] type = RfidTypeEnum.values(); model.put("Label", Label); model.put("rfid", rfid); model.put("type", type); model.put("query", query); model.put("list", list); return "manage/rfid/logistics/logistics-list"; } catch (Exception e) { SxjLogger.error("查询门窗RFID错误", e, this.getClass()); throw new WebException("查询门窗RFID错误"); } }