| | |
| | | /** |
| | | * 查询日均值 |
| | | */ |
| | | Double selectDayAvg(@Param("time") String time, @Param("name") String name); |
| | | double selectDayAvg(@Param("time") String time, @Param("name") String name); |
| | | |
| | | /** |
| | | * 查询累计值 |
| | | */ |
| | | Double selectAccumulate(@Param("start") Integer start, @Param("end") Integer end, @Param("name") String name); |
| | | double selectAccumulate(@Param("start") Integer start, @Param("end") Integer end, @Param("name") String name); |
| | | |
| | | /** |
| | | * 查询年累计值 |
| | | */ |
| | | Double selectYearAccumulate(@Param("time") String time, @Param("name") String name); |
| | | double selectYearAccumulate(@Param("time") String time, @Param("name") String name); |
| | | |
| | | /** |
| | | * 根据时间查询溯源 |
| | |
| | | List<String> list = new ArrayList<>(); |
| | | for (SuYuan700 su : suList) { |
| | | List<String> sub = new ArrayList<>(); |
| | | sub.add(DateUtils.getYyyyMmDdHh(su.getCreateTime())); |
| | | if (null != su.getAddr1()) |
| | | sub.add(su.getAddr1() + ",概率:" + (su.getOdds1() * 100) + "%,X:" + su.getX1() + ",Y:" + su.getY1()); |
| | | if (null != su.getAddr2()) |
| | |
| | | String name = "AI-" + (i < 10 ? "0" : "") + i; |
| | | double rjz = mapper.selectDayAvg(yyyymmdd + "%", name); |
| | | double lj = mapper.selectAccumulate(start, end, name); |
| | | double lastLj = mapper.selectYearAccumulate(lastYear, name); |
| | | double lastLj = mapper.selectYearAccumulate(lastYear + "%", name); |
| | | double ljtb = CalculateUtils.round2((lj - lastLj) / lastLj * 100); |
| | | MonitorPointPosition point = commonService.select3dCheckPointByName(name); |
| | | String id = point.getId().substring(0, point.getId().lastIndexOf("_") + 1) + "0"; |
| | | List<SuYuan700> suList = mapper.selectSuYuanByTime(id, yyyy_mm_dd + " 00:00:00", yyyy_mm_dd + " 23:00:00"); |
| | | String ys = getYs(suList); |
| | | |
| | | list.add(new DayExcel("" + rjz, "" + lj, "" + ljtb, ys, "", "", "")); |
| | | list.add(new DayExcel("" + rjz, "" + lj, ljtb + "%", ys, "", "", "")); |
| | | } |
| | | |
| | | String filePath = createExcel("day", yesterday, list); |
| | |
| | | |
| | | <!-- 查询日均值 --> |
| | | <select id="selectDayAvg" resultType="java.lang.Double"> |
| | | select format(avg(value), 2) |
| | | from yssh_qxsh |
| | | where time like #{time} and name = #{name}; |
| | | </select> |
| | | |
| | | <!-- 查询日均值 --> |
| | | <select id="selectDayAvg" resultType="java.lang.Double"> |
| | | select format(avg(value), 2) |
| | | select ifnull(format(avg(value), 2), 0) |
| | | from yssh_qxsh |
| | | where time like #{time} and name = #{name}; |
| | | </select> |
| | | |
| | | <!-- 查询累计值 --> |
| | | <select id="selectAccumulate" resultType="java.lang.Double"> |
| | | select format(avg(value), 2) |
| | | select ifnull(format(avg(value), 2), 0) |
| | | from yssh_qxsh |
| | | where time between #{start} and #{end} and name = #{name}; |
| | | </select> |
| | | |
| | | <!-- 查询年累计值 --> |
| | | <select id="selectYearAccumulate" resultType="java.lang.Double"> |
| | | select format(avg(value), 2) |
| | | select ifnull(format(avg(value), 2), 0) |
| | | from yssh_qxsh |
| | | where time like #{time} and name = #{name}; |
| | | </select> |