|
|
|
@ -143,7 +143,7 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + |
|
|
|
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + |
|
|
|
"WHERE problemSourcesCode IN (13) " + |
|
|
|
"WHERE problemSourcesCode IN (13,14,15) " + |
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime};") |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime};") |
|
|
|
DayTimeSuperviseVo getSupervisionRank(Date beginTime, Date endTime, Integer groupId); |
|
|
|
DayTimeSuperviseVo getSupervisionRank(Date beginTime, Date endTime, Integer groupId); |
|
|
|
@ -159,7 +159,7 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
"ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " + |
|
|
|
"ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + |
|
|
|
"WHERE problemSourcesCode IN (13) " + |
|
|
|
"WHERE problemSourcesCode IN (13,14,15) " + |
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
@ -169,7 +169,7 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " + |
|
|
|
@Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " + |
|
|
|
"WHERE ng.id = npr.negativeId " + |
|
|
|
"WHERE ng.id = npr.negativeId " + |
|
|
|
"AND ng.problemSourcesCode in (13, 15) " + |
|
|
|
"AND ng.problemSourcesCode in (13,14, 15) " + |
|
|
|
"and ng.checkStatus<>3 " + |
|
|
|
"and ng.checkStatus<>3 " + |
|
|
|
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND oneLevelContent is NOT NULL " + |
|
|
|
"AND oneLevelContent is NOT NULL " + |
|
|
|
@ -185,7 +185,7 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
"COALESCE(ROUND(COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id) * 100, 1), 0) AS completedRate " + |
|
|
|
"COALESCE(ROUND(COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id) * 100, 1), 0) AS completedRate " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + |
|
|
|
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13, 15) " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13,14, 15) " + |
|
|
|
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ") |
|
|
|
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ") |
|
|
|
SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); |
|
|
|
SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
@ -198,8 +198,22 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
"COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " + |
|
|
|
"COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + |
|
|
|
"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 completedNumber , " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " + |
|
|
|
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " + |
|
|
|
"SUM(CASE " + |
|
|
|
"COUNT( DISTINCT nb.blameIdCode ) AS personNum, " + |
|
|
|
" WHEN nb.type = 'personal' " + |
|
|
|
|
|
|
|
" AND nb.handleResultName != '' " + |
|
|
|
|
|
|
|
" AND nb.handleResultName IS NOT NULL " + |
|
|
|
|
|
|
|
" AND nb.handleResultName != '不予追责' " + |
|
|
|
|
|
|
|
" THEN 1 " + |
|
|
|
|
|
|
|
" ELSE 0 " + |
|
|
|
|
|
|
|
" END) AS personNum, " + |
|
|
|
|
|
|
|
" SUM(CASE " + |
|
|
|
|
|
|
|
" WHEN nb.type = 'department' " + |
|
|
|
|
|
|
|
" AND nb.handleResultName != '' " + |
|
|
|
|
|
|
|
" AND nb.handleResultName IS NOT NULL " + |
|
|
|
|
|
|
|
" AND nb.handleResultName != '不予追责' " + |
|
|
|
|
|
|
|
" THEN 1 " + |
|
|
|
|
|
|
|
" ELSE 0 " + |
|
|
|
|
|
|
|
" END) AS relationOrg, "+ |
|
|
|
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + |
|
|
|
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + |
|
|
|
"FROM sup_depart sd " + |
|
|
|
"FROM sup_depart sd " + |
|
|
|
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + |
|
|
|
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + |
|
|
|
@ -251,6 +265,7 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
"INNER JOIN negative ng ON sd.id = ng.involveDepartId " + |
|
|
|
"INNER JOIN negative ng ON sd.id = ng.involveDepartId " + |
|
|
|
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + |
|
|
|
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + |
|
|
|
"WHERE problemSourcesCode = 16 " + |
|
|
|
"WHERE problemSourcesCode = 16 " + |
|
|
|
|
|
|
|
"and ng.checkStatus in (1, 2) "+ |
|
|
|
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}") |
|
|
|
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}") |
|
|
|
VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime); |
|
|
|
VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime); |
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -284,16 +299,17 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
@Select("SELECT " + |
|
|
|
@Select("SELECT " + |
|
|
|
"sd.short_name AS `name`, " + |
|
|
|
"sd.short_name AS `name`, " + |
|
|
|
"sd.id AS departId, " + |
|
|
|
"sd.id AS departId, " + |
|
|
|
"COUNT( DISTINCT ng.id) AS discoverProblem, " + |
|
|
|
"COUNT(DISTINCT ng.id) as total, "+ |
|
|
|
|
|
|
|
"COUNT( DISTINCT ng.id AND ng.checkStatus <> 3 ) AS discoverProblem, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completionProblem, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completionProblem, " + |
|
|
|
"COUNT( DISTINCT ng.involveDepartId) AS relativeOrg, " + |
|
|
|
"COUNT( DISTINCT ng.involveDepartId) AS relativeOrg, " + |
|
|
|
"COUNT( DISTINCT nb.blameName ) AS relativePer, " + |
|
|
|
"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 " + |
|
|
|
"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 " + |
|
|
|
"FROM sup_depart sd " + |
|
|
|
"LEFT JOIN negative ng ON sd.id=ng.second_involve_depart_id " + |
|
|
|
"LEFT JOIN negative ng ON sd.id=ng.second_involve_depart_id " + |
|
|
|
"AND checkStatus <>3 " + |
|
|
|
"AND problemSourcesCode = 16 " + |
|
|
|
"AND problemSourcesCode =16 " + |
|
|
|
|
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"and checkStatus in (1, 2) "+ |
|
|
|
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + |
|
|
|
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + |
|
|
|
"WHERE sd.statistics_group_id=3 " + |
|
|
|
"WHERE sd.statistics_group_id=3 " + |
|
|
|
"GROUP BY sd.short_name; ") |
|
|
|
"GROUP BY sd.short_name; ") |
|
|
|
@ -561,12 +577,12 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
@Select("SELECT " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " + |
|
|
|
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + |
|
|
|
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13) " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13,14,15) " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND sd.statistics_group_id=10 " + |
|
|
|
"AND sd.statistics_group_id=10 " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} ") |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} ") |
|
|
|
@ -574,12 +590,12 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
@Select("SELECT " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " + |
|
|
|
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + |
|
|
|
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13) " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13,14,15) " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND sd.statistics_group_id!=10 " + |
|
|
|
"AND sd.statistics_group_id!=10 " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} ") |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} ") |
|
|
|
@ -588,12 +604,12 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
@Select("SELECT " + |
|
|
|
@Select("SELECT " + |
|
|
|
"sd.short_name AS label, " + |
|
|
|
"sd.short_name AS label, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS denominator, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS denominator, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13) " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13,14,15) " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND sd.statistics_group_id=10 " + |
|
|
|
"AND sd.statistics_group_id=10 " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
@ -605,11 +621,11 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
"sd.short_name AS label, " + |
|
|
|
"sd.short_name AS label, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS denominator, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS denominator, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + |
|
|
|
"ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13) " + |
|
|
|
"WHERE ng.problemSourcesCode IN (13,14,15) " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND ng.second_involve_depart_id=#{departId} " + |
|
|
|
"AND sd.statistics_group_id!=10 " + |
|
|
|
"AND sd.statistics_group_id!=10 " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
@ -621,8 +637,8 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
"sd.id AS departId, " + |
|
|
|
"sd.id AS departId, " + |
|
|
|
"count( DISTINCT ng.id) AS denominator, " + |
|
|
|
"count( DISTINCT ng.id) AS denominator, " + |
|
|
|
"count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + |
|
|
|
"count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " + |
|
|
|
"FROM sup_depart sd " + |
|
|
|
"FROM sup_depart sd " + |
|
|
|
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id=10 AND sd.pid=#{departId} " + |
|
|
|
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id=10 AND sd.pid=#{departId} " + |
|
|
|
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + |
|
|
|
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + |
|
|
|
@ -636,9 +652,9 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
@Select("SELECT sd.short_name as label, " + |
|
|
|
@Select("SELECT sd.short_name as label, " + |
|
|
|
"sd.id AS departId, " + |
|
|
|
"sd.id AS departId, " + |
|
|
|
"count( DISTINCT ng.id) AS denominator, " + |
|
|
|
"count( DISTINCT ng.id) AS denominator, " + |
|
|
|
"count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + |
|
|
|
"count( DISTINCT IF(ng.processing_status='completed', ng.id, NULL )) AS numerator, " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " + |
|
|
|
"ROUND( COUNT(DISTINCT if(ng.processing_status='completed', ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " + |
|
|
|
"FROM sup_depart sd " + |
|
|
|
"FROM sup_depart sd " + |
|
|
|
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " + |
|
|
|
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " + |
|
|
|
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + |
|
|
|
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + |
|
|
|
@ -689,9 +705,9 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
@Select("SELECT " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " + |
|
|
|
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + |
|
|
|
"ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"WHERE problemSourcesCode IN (15) " + |
|
|
|
"WHERE problemSourcesCode IN (15) " + |
|
|
|
@ -703,9 +719,9 @@ public interface NegativeMapper extends BaseMapper<Negative> { |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
@Select("SELECT " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT(DISTINCT ng.id) AS proTotal, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " + |
|
|
|
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + |
|
|
|
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS changed, " + |
|
|
|
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + |
|
|
|
"ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + |
|
|
|
"FROM negative ng " + |
|
|
|
"FROM negative ng " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + |
|
|
|
"WHERE problemSourcesCode IN (15) " + |
|
|
|
"WHERE problemSourcesCode IN (15) " + |
|
|
|
|