Browse Source

fix-视频督察二级大屏--问题趋势数量不对

master
buaixuexideshitongxue 2 weeks ago
parent
commit
1a8a5997fb
  1. 26
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  2. 33
      src/main/resources/mapper/SupTaskProblemMapper.xml

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

@ -203,20 +203,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime);
// @Select("SELECT " +
// " sd.short_name as label, " +
// "COUNT(DISTINCT ng.id) AS denominator, " +
// "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
// "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " +
// "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS value " +
// "FROM negative ng " +
// "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
// "WHERE problemSourcesCode IN (27,28,29,30) " +
// "AND sd.statistics_group_id=#{groupId} " +
// "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
// " GROUP BY sd.short_name " +
// " ORDER BY value desc ")
// List<AuditNegativeVo> getAuditNegativeVo(Date beginTime, Date endTime,String groupId);
@Select("SELECT " + @Select("SELECT " +
@ -681,17 +667,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<OrganizeProblemRankVo> getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId); List<OrganizeProblemRankVo> getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId);
List<EchartsVo> getSubOneVideoSuperviseTrend(@Param("year") String year, @Param("problemCode") String problemCode, @Param("departIds") List<String> departIds); List<EchartsVo> getSubOneVideoSuperviseTrend(@Param("year") String year, @Param("problemCode") String problemCode, @Param("departIds") List<String> departIds);
// @Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
// "COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " +
// "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
// "COUNT(DISTINCT nb.blameName) AS relativePer, " +
// "IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completionRate " +
// "FROM sup_depart sd " +
// "INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " +
// "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
// "WHERE ng.checkStatus IN ('1','2') " +
// "AND problemSourcesCode = 16 " +
// "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ")
@Select("SELECT " + @Select("SELECT " +
"COUNT(DISTINCT ng.id) total, " + "COUNT(DISTINCT ng.id) total, " +
"COUNT(DISTINCT IF(ng.checkStatus IN ('1','2'), ng.id, NULL)) AS discoverProblem, " + "COUNT(DISTINCT IF(ng.checkStatus IN ('1','2'), ng.id, NULL)) AS discoverProblem, " +

33
src/main/resources/mapper/SupTaskProblemMapper.xml

@ -53,18 +53,29 @@
ORDER BY m.`month` ASC; ORDER BY m.`month` ASC;
</select> </select>
<!-- 视频督察二级大屏的问题趋势(查实)--> <!-- 视频督察二级大屏的问题趋势(查实)-->
<select id="getSubOneVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getSubOneVideoSuperviseTrend"
SELECT m.month_name AS `name`, IFNULL(COUNT(temp.id), 0) AS `value` resultType="com.biutag.supervision.pojo.vo.EchartsVo">
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 (SELECT ng.* LEFT JOIN (
FROM negative ng SELECT ng.id, ng.crtTime
INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id AND sd.pid = #{departId}) AS temp -- 加上 AS temp FROM negative ng
ON DATE_FORMAT(temp.crtTime, '%m') = m.month WHERE ng.problemSourcesCode = #{problemCode}
AND YEAR(temp.crtTime) = #{year} AND YEAR(ng.crtTime) = #{year}
AND temp.checkStatus != 3 AND ng.involveDepartId IN
AND temp.problemSourcesCode = 16 <foreach collection="departIds"
GROUP BY m.month_name item="did"
ORDER BY m.month ASC; open="("
close=")"
separator=",">
#{did}
</foreach>
) temp
ON DATE_FORMAT(temp.crtTime, '%m') = m.month
GROUP BY m.month_name, m.month
ORDER BY m.month ASC
</select> </select>
<!-- 案件核查二级大屏的问题趋势--> <!-- 案件核查二级大屏的问题趋势-->

Loading…
Cancel
Save