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
* @return
*/
@Operation(summary = "数据大屏问题趋势统计(按月)")
@GetMapping("/getGobalRecentlyTrendByMonth")
public Result<JSONObject> getGobalRecentlyTrendByMonth(@RequestParam Integer year) {
List<RecentTrendByMonthVo> recentTrendVoList = dataGobalService.getGobalRecentlyTrendByMonth(String.valueOf(year));
ArrayList<String> monthList = 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);
@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 " +
"GROUP BY monthTime " +
"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` ")
List<EchartsVo> selectProblemRate(Date beginTime, Date endTime);
@Select("SELECT (@row_number := @row_number + 1) AS sort, sorted_results.label, sorted_results.value " +
"FROM " +
"(SELECT npr.threeLevelContent AS label, COUNT(*) AS value " +
"FROM negative_problem_relation npr " +
"WHERE npr.threeLevelContent IS NOT NULL " +
"GROUP BY label " +
"ORDER BY value DESC) " +
"AS sorted_results, (SELECT @row_number := 0) AS t;")
@Select("SELECT threeLevelContent as name, count(*) as `value` " +
"FROM negative_problem_relation " +
"WHERE negativeId " +
"in ( SELECT id FROM negative WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime}) " +
"GROUP BY threeLevelContent " +
"ORDER BY VALUE DESC ")
List<StrongProblemRank> selectStrongProblemRank(Date beginTime, Date endTime);
@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
*/
public List<StrongProblemRank> getStrongProblemRank(Date beginTime, Date endTime) {
// 1.获取这段时间的negative id
//
List<StrongProblemRank> res= negativeProblemRelationMapper.selectStrongProblemRank(beginTime, endTime);
return res;
}

Loading…
Cancel
Save