Browse Source

首页大屏1.5

main
parent
commit
4171a21a5e
  1. 4
      src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java
  2. 2
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  3. 14
      src/main/java/com/biutag/supervision/mapper/NegativeProblemRelationMapper.java
  4. 3
      src/main/java/com/biutag/supervision/service/DataGobalService.java

4
src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java

@ -119,15 +119,13 @@ public class DataGobalController {
/** /**
* 数据大屏问题趋势统计按月 * 数据大屏问题趋势统计按月展示
*
* @param year * @param year
* @return * @return
*/ */
@Operation(summary = "数据大屏问题趋势统计(按月)") @Operation(summary = "数据大屏问题趋势统计(按月)")
@GetMapping("/getGobalRecentlyTrendByMonth") @GetMapping("/getGobalRecentlyTrendByMonth")
public Result<JSONObject> getGobalRecentlyTrendByMonth(@RequestParam Integer year) { public Result<JSONObject> getGobalRecentlyTrendByMonth(@RequestParam Integer year) {
List<RecentTrendByMonthVo> recentTrendVoList = dataGobalService.getGobalRecentlyTrendByMonth(String.valueOf(year)); List<RecentTrendByMonthVo> recentTrendVoList = dataGobalService.getGobalRecentlyTrendByMonth(String.valueOf(year));
ArrayList<String> monthList = new ArrayList<>(); ArrayList<String> monthList = new ArrayList<>();
ArrayList<String> totalList = new ArrayList<>(); ArrayList<String> totalList = new ArrayList<>();

2
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -36,7 +36,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> selectBusinessRate(Date beginTime,Date endTime); List<EchartsVo> selectBusinessRate(Date beginTime,Date endTime);
@Select("SELECT DATE_FORMAT(ng.crtTime, '%Y-%m') AS monthTime, COUNT(*) total FROM negative ng " + @Select("SELECT DATE_FORMAT(ng.discoveryTime, '%Y-%m') AS monthTime, COUNT(*) total FROM negative ng " +
"WHERE YEAR(ng.discoveryTime)=#{year} and checkStatus=1 " + "WHERE YEAR(ng.discoveryTime)=#{year} and checkStatus=1 " +
"GROUP BY monthTime " + "GROUP BY monthTime " +
"order BY monthTime asc") "order BY monthTime asc")

14
src/main/java/com/biutag/supervision/mapper/NegativeProblemRelationMapper.java

@ -19,14 +19,12 @@ public interface NegativeProblemRelationMapper extends BaseMapper<NegativeProble
"GROUP BY `name` ") "GROUP BY `name` ")
List<EchartsVo> selectProblemRate(Date beginTime, Date endTime); List<EchartsVo> selectProblemRate(Date beginTime, Date endTime);
@Select("SELECT (@row_number := @row_number + 1) AS sort, sorted_results.label, sorted_results.value " + @Select("SELECT threeLevelContent as name, count(*) as `value` " +
"FROM " + "FROM negative_problem_relation " +
"(SELECT npr.threeLevelContent AS label, COUNT(*) AS value " + "WHERE negativeId " +
"FROM negative_problem_relation npr " + "in ( SELECT id FROM negative WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime}) " +
"WHERE npr.threeLevelContent IS NOT NULL " + "GROUP BY threeLevelContent " +
"GROUP BY label " + "ORDER BY VALUE DESC ")
"ORDER BY value DESC) " +
"AS sorted_results, (SELECT @row_number := 0) AS t;")
List<StrongProblemRank> selectStrongProblemRank(Date beginTime, Date endTime); List<StrongProblemRank> selectStrongProblemRank(Date beginTime, Date endTime);
@Select("SELECT sd1.short_name, count(*) value " + @Select("SELECT sd1.short_name, count(*) value " +

3
src/main/java/com/biutag/supervision/service/DataGobalService.java

@ -132,6 +132,9 @@ public class DataGobalService {
* @return * @return
*/ */
public List<StrongProblemRank> getStrongProblemRank(Date beginTime, Date endTime) { public List<StrongProblemRank> getStrongProblemRank(Date beginTime, Date endTime) {
// 1.获取这段时间的negative id
//
List<StrongProblemRank> res= negativeProblemRelationMapper.selectStrongProblemRank(beginTime, endTime); List<StrongProblemRank> res= negativeProblemRelationMapper.selectStrongProblemRank(beginTime, endTime);
return res; return res;
} }

Loading…
Cancel
Save