|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | result.put("msg", "系统正忙,请稍后再试"); | 
|---|
|  |  |  | result.put("msg", "系统错误,请联系管理员!原因如下:"+e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | result.put("msg", be.getMessage()); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | result.put("msg", "系统正忙,请稍后再试"); | 
|---|
|  |  |  | result.put("msg", "系统错误,请联系管理员!原因如下:"+e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | result.put("msg", be.getMessage()); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | //result.put("msg", "系统正忙,请稍后再试"); | 
|---|
|  |  |  | result.put("msg", e.getMessage()); | 
|---|
|  |  |  | result.put("msg", "系统错误,请联系管理员!原因如下:"+e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | // 1.0 实际标准值 | 
|---|
|  |  |  | resultMap.put("standard", ResourceUtil.getValue(parameters.get("macKey") + "-standard")); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | resultMap.put("average", 90.0384 + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) / 5); | 
|---|
|  |  |  | //resultMap.put("average", 90.0384 + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) / 5); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | resultMap.put("AQI", 236.71 + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) / 5); | 
|---|
|  |  |  | //resultMap.put("AQI", 236.71 + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) / 5); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 2.0 本月平均值 | 
|---|
|  |  |  | 
|---|
|  |  |  | average = historyMapper.getMonthAverageBySensor(parameters); | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(average)) { | 
|---|
|  |  |  | avg = (Double) average.get("average"); | 
|---|
|  |  |  | if ("e11".equals(macKey) || "e15".equals(macKey) || "e16".equals(macKey)) { | 
|---|
|  |  |  | avg *= 1000.0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String[] macKeyValues = ResourceUtil.getArrValue(macKey); | 
|---|
|  |  |  | int index = -1; | 
|---|