Browse Source

首页地图报错

main
不爱学习的石同学 12 months ago
parent
commit
9b5274da36
  1. 22
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneController.java
  2. 16
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java
  3. 14
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  4. 2
      src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java
  5. 2
      src/main/java/com/biutag/supervision/service/SubOneService.java
  6. 5
      src/main/java/com/biutag/supervision/service/SubOneVideoSuperviseService.java
  7. 27
      src/main/resources/mapper/NegativeMapper.xml

22
src/main/java/com/biutag/supervision/controller/subdatav/SubOneController.java

@ -28,9 +28,9 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
/** /**
* @Auther: sh * @Auther: sh
* @Date: 2024/12/4 16:30 * @Date: 2024/12/4 16:30
* @Description: 首页一级子 * @Description: 首页二级大
*/ */
@Tag(name = "首页一级子屏") @Tag(name = "首页二级大屏")
@RequestMapping("datav/sub1/") @RequestMapping("datav/sub1/")
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@ -42,7 +42,7 @@ public class SubOneController {
// region右边 // region右边
@Operation(summary = "获取首页一级子屏督察问题排名") @Operation(summary = "获取首页二级大屏督察问题排名")
@GetMapping("/getSubOneSupervisionRank") @GetMapping("/getSubOneSupervisionRank")
public Result<JSONObject> getSubOneSupervisionRank(@RequestParam Integer departPId, public Result<JSONObject> getSubOneSupervisionRank(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -67,13 +67,13 @@ public class SubOneController {
/** /**
* 获取一级子屏总览 * 获取首页二级大屏总览
* @param departPId 2级单位的id * @param departPId 2级单位的id
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return * @return
*/ */
@Operation(summary = "获取一级子屏总览") @Operation(summary = "获取首页二级大屏总览")
@GetMapping("/getSubOneOverView") @GetMapping("/getSubOneOverView")
public Result<JSONObject> getSubOneOverView(@RequestParam Integer departPId, public Result<JSONObject> getSubOneOverView(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -92,7 +92,7 @@ public class SubOneController {
* @param year 年份 * @param year 年份
* @return EchartsVo的list * @return EchartsVo的list
*/ */
@Operation(summary = "获取一级子屏问题趋势") @Operation(summary = "获取首页二级大屏问题趋势")
@GetMapping("/getSubOneTrend") @GetMapping("/getSubOneTrend")
public Result<JSONObject> getSubOneTrend(@RequestParam Integer departPId, @RequestParam Integer year) { public Result<JSONObject> getSubOneTrend(@RequestParam Integer departPId, @RequestParam Integer year) {
List<EchartsVo> superviseProTrend = subOneService.getSubOneTrend(departPId, year, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势 List<EchartsVo> superviseProTrend = subOneService.getSubOneTrend(departPId, year, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势
@ -114,7 +114,7 @@ public class SubOneController {
* @param departPId 2级单位的id * @param departPId 2级单位的id
* @return json格式的地图数据 * @return json格式的地图数据
*/ */
@Operation(summary = "获取一级子屏地图JSON") @Operation(summary = "获取二级大屏地图JSON")
@GetMapping("/getSubOneStreetMap") @GetMapping("/getSubOneStreetMap")
public Result<JSONObject> getSubOneStreetMap(@RequestParam Integer departPId) { public Result<JSONObject> getSubOneStreetMap(@RequestParam Integer departPId) {
List<CountyStreetDept> depts = countyStreetDeptService.getSubOneStreetMap(departPId); List<CountyStreetDept> depts = countyStreetDeptService.getSubOneStreetMap(departPId);
@ -131,8 +131,8 @@ public class SubOneController {
properties.put("name", dept.getName()); properties.put("name", dept.getName());
properties.put("id", dept.getId()); properties.put("id", dept.getId());
feature.put("properties", properties); // 第二个键值 feature.put("properties", properties); // 第二个键值
log.info("===========现在的id是=============="); // log.info("===========现在的id是==============");
log.info(dept.getId().toString()); // log.info(dept.getId().toString());
feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值 feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值
features.add(feature); features.add(feature);
@ -147,14 +147,14 @@ public class SubOneController {
// region右边 // region右边
/** /**
* 获取首页一级子屏案件核查排名 * 获取首页二级大屏案件核查排名
* *
* @param departPId 2级单位的id * @param departPId 2级单位的id
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return 总览和排名 * @return 总览和排名
*/ */
@Operation(summary = "获取首页一级子屏案件核查排名") @Operation(summary = "获取首页二级大屏案件核查排名")
@GetMapping("/getSubOneCaseVerifyRank") @GetMapping("/getSubOneCaseVerifyRank")
public Result<JSONObject> getSubOneCaseVerifyRank(@RequestParam Integer departPId, public Result<JSONObject> getSubOneCaseVerifyRank(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,

16
src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java

@ -139,7 +139,7 @@ public class SubOneVideoSuperviseController {
/** /**
* 视频督察二级大屏中央数据 * 视频督察二级大屏中央总览数据
* *
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
@ -156,8 +156,7 @@ public class SubOneVideoSuperviseController {
} }
// 获取视频督察大屏中央问题趋势统计 @Operation(summary = "视频督察二级数据大屏问题趋势统计")
@Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getSubOneVideoSuperviseTrend") @GetMapping("/getSubOneVideoSuperviseTrend")
public Result<JSONObject> getSubOneVideoSuperviseTrend(@RequestParam Integer departId, @RequestParam Integer year) { public Result<JSONObject> getSubOneVideoSuperviseTrend(@RequestParam Integer departId, @RequestParam Integer year) {
List<EchartsVo> videoSuperviseTrendList = subOneVideoSuperviseService.getSubOneVideoSuperviseTrend(String.valueOf(year), SPDC.getValue(), departId.toString()); List<EchartsVo> videoSuperviseTrendList = subOneVideoSuperviseService.getSubOneVideoSuperviseTrend(String.valueOf(year), SPDC.getValue(), departId.toString());
@ -166,5 +165,16 @@ public class SubOneVideoSuperviseController {
} }
@Operation(summary = "视频督察二级数据大屏问题类型占比")
@GetMapping("/getSubOneVideoSuperviseProblemTypeRate")
public Result<JSONObject> getSubOneVideoSuperviseProblemTypeRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> subOneVideoSuperviseProblemTypeRate = subOneVideoSuperviseService.getSubOneVideoSuperviseProblemTypeRate(departId, beginTime, endTime);
JSONObject jsonObject = new JSONObject().fluentPut("subOneVideoSuperviseProblemTypeRate", subOneVideoSuperviseProblemTypeRate);
return Result.success(jsonObject);
}
} }

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

@ -57,7 +57,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
" and sd1.LEVEL=2 AND sd1.statistics_group_id=3" + " and sd1.LEVEL=2 AND sd1.statistics_group_id=3" +
" ) " + " ) " +
"as temp on ng.involveDepartId=temp.id " + "as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode=(17, 18, 19, 20) " + "WHERE ng.checkStatus<>3 AND problemSourcesCode in (17, 18, 19, 20) " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") "AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer seleGlobalMapIconInfoAjhc(Date beginTime, Date endTime, Integer departId); Integer seleGlobalMapIconInfoAjhc(Date beginTime, Date endTime, Integer departId);
@ -401,4 +401,16 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getSubOneVideoSuperviseTrend(String year, String problemCode, String departId); List<EchartsVo> getSubOneVideoSuperviseTrend(String year, String problemCode, String departId);
@Select("SELECT npr.threeLevelContent AS `name`, " +
"COUNT(*) AS `value` " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"INNER JOIN negative_problem_relation npr " +
"on ng.id=npr.negativeId " +
"WHERE ng.problemSourcesCode=16 " +
"AND checkStatus <> 3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent ")
List<EchartsVo> getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime);
} }

2
src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java

@ -15,7 +15,7 @@ import java.io.Serializable;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class SubOneOverViewVo implements Serializable { public class SubOneOverViewVo implements Serializable {
// 首页大屏一级子屏的各种总览,从左到右对应 // 首页二级大屏总览的各种总览,从左到右对应
private Integer one; private Integer one;
private Integer two; private Integer two;
private Integer three; private Integer three;

2
src/main/java/com/biutag/supervision/service/SubOneService.java

@ -14,7 +14,7 @@ import java.util.List;
/** /**
* @Auther: sh * @Auther: sh
* @Date: 2024/12/12 15:59 * @Date: 2024/12/12 15:59
* @Description: 级子屏业务层 * @Description: 首页二级子屏业务层
*/ */
@RequiredArgsConstructor @RequiredArgsConstructor

5
src/main/java/com/biutag/supervision/service/SubOneVideoSuperviseService.java

@ -41,5 +41,10 @@ public class SubOneVideoSuperviseService {
List<EchartsVo> res = negativeMapper.getSubOneVideoSuperviseTrend(year, problemCode, departId); List<EchartsVo> res = negativeMapper.getSubOneVideoSuperviseTrend(year, problemCode, departId);
return res; return res;
} }
public List<EchartsVo> getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime) {
List<EchartsVo> res = negativeMapper.getSubOneVideoSuperviseProblemTypeRate(departId, beginTime, endTime);
return res;
}
} }

27
src/main/resources/mapper/NegativeMapper.xml

@ -85,7 +85,7 @@
GROUP BY m.monthName GROUP BY m.monthName
ORDER BY m.month ASC; ORDER BY m.month ASC;
</select> </select>
<!-- 首页级子屏的问题趋势 --> <!-- 首页级子屏的问题趋势 -->
<select id="getSubOneTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getSubOneTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(temp.`value`, 0) AS `value` SELECT m.month_name AS `name`, IFNULL(temp.`value`, 0) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
@ -102,7 +102,7 @@
ON temp.`month` = m.`month` ON temp.`month` = m.`month`
ORDER BY m.month ASC; ORDER BY m.month ASC;
</select> </select>
<!-- 首页级子屏的案件核查排行 --> <!-- 首页级子屏的案件核查排行 -->
<select id="getCaseVerifyRank" resultType="com.biutag.supervision.pojo.vo.RankVo"> <select id="getCaseVerifyRank" resultType="com.biutag.supervision.pojo.vo.RankVo">
SELECT temp.short_name AS label, SELECT temp.short_name AS label,
temp.id AS departId, temp.id AS departId,
@ -123,7 +123,7 @@
GROUP BY temp.short_name GROUP BY temp.short_name
ORDER BY denominator DESC; ORDER BY denominator DESC;
</select> </select>
<!-- 首页一级子屏的案件核查总览 --> <!-- 首页二级大屏的案件核查总览 -->
<select id="getCaseVerifyOverView" resultType="com.biutag.supervision.pojo.vo.SubOneOverViewVo"> <select id="getCaseVerifyOverView" resultType="com.biutag.supervision.pojo.vo.SubOneOverViewVo">
SELECT COUNT(DISTINCT ng.id) as one, SELECT COUNT(DISTINCT ng.id) as one,
COUNT( IF(checkIdCode!=3,checkIdCode,NULL)) AS two, COUNT( IF(checkIdCode!=3,checkIdCode,NULL)) AS two,
@ -141,7 +141,7 @@
AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; AND discoveryTime BETWEEN #{beginTime} AND #{endTime};
</select> </select>
<!-- 首页级大屏督察问题总览 --> <!-- 首页级大屏督察问题总览 -->
<select id="getSubOneSupervisionRankOverView" resultType="com.biutag.supervision.pojo.vo.SubOneOverViewVo"> <select id="getSubOneSupervisionRankOverView" resultType="com.biutag.supervision.pojo.vo.SubOneOverViewVo">
SELECT COUNT(DISTINCT ng.id) as one, SELECT COUNT(DISTINCT ng.id) as one,
count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as two, count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as two,
@ -159,8 +159,7 @@
<foreach collection="args" item="arg" open="(" separator="," close=")">#{arg}</foreach> <foreach collection="args" item="arg" open="(" separator="," close=")">#{arg}</foreach>
AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; AND discoveryTime BETWEEN #{beginTime} AND #{endTime};
</select> </select>
<!-- 首页二级大屏督察问题排行 -->
<!-- 首页一级大屏督察问题排行 -->
<select id="getSubOneSupervisionRank" resultType="com.biutag.supervision.pojo.vo.RankVo"> <select id="getSubOneSupervisionRank" resultType="com.biutag.supervision.pojo.vo.RankVo">
SELECT temp.short_name as label, SELECT temp.short_name as label,
temp.id AS departId, temp.id AS departId,
@ -181,14 +180,18 @@
GROUP BY label GROUP BY label
order by rate desc; order by rate desc;
</select> </select>
<!-- 视频督察二级大屏的问题趋势-->
<select id="getSubOneVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getSubOneVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(COUNT(ng.id), 0) AS `value` SELECT m.month_name AS `name`, IFNULL(COUNT(temp.id), 0) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.month LEFT JOIN (SELECT ng.*
inner JOIN sup_depart sd on ng.involveDepartId = sd.id and sd.pid = #{departId} FROM negative ng
AND YEAR(ng.discoveryTime) = #{year} INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id AND sd.pid = #{departId}) AS temp -- 加上 AS temp
AND ng.checkStatus != 3 ON DATE_FORMAT(temp.discoveryTime, '%m') = m.month
AND ng.problemSourcesCode = #{problemCode} AND YEAR(temp.discoveryTime) = #{year}
AND temp.checkStatus != 3
AND temp.problemSourcesCode = 16
GROUP BY m.month_name GROUP BY m.month_name
ORDER BY m.month ASC; ORDER BY m.month ASC;
</select> </select>

Loading…
Cancel
Save