| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -436,9 +436,9 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									/ IFNULL(itemCount.itemCloseAndScoreNum,0),4),0) * 100 satisfactionRatio, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ROUND(IFNULL(IFNULL(issueCount.thisMonthIssueToItemCount,0) / IFNULL(issueCount.issueNum,0),0),4) * 100 issueToProjectRatio, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IFNULL(itemCount.selfSolveProjectNum,0) selfSolveProjectCount, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            0 AS transferRightRatio, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            0 AS transferRightRatioFz, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            0 AS transferRightRatioFm, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IFNULL(tmpp.transferRightRatio,0) AS transferRightRatio, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IFNULL(tmpp.transferRightRatioFz,0) AS transferRightRatioFz, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IFNULL(tmpp.transferRightRatioFm,0) AS transferRightRatioFm, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IFNULL(itemCount.itemSatisfiedNum,0) * 0.6 + IFNULL(itemCount.itemVeryNum,0) satisfactionRatioFz, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IFNULL(itemCount.itemCloseAndScoreNum,0) satisfactionRatioFm, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IFNULL(issueCount.thisMonthIssueToItemCount,0) issueToProjectRatioFz, | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -475,7 +475,25 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth, jdbcType=VARCHAR} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            group by item.GRID_ID | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ) itemCount on itemCount.DEPT_ID = sd.ID | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        left join ( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            SELECT | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                tt.CREATED_DEPT_ID, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                IF(tt.csCount = 0, 100.0000, IFNULL(ROUND((tt.csCount - tt.thCount) / tt.csCount, 4)*100, 0.0000)) AS transferRightRatio, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                (tt.csCount - tt.thCount) AS transferRightRatioFz, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                tt.csCount AS transferRightRatioFm | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            FROM | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                (SELECT tmp1.CREATED_DEPT_ID, COUNT(tmp1.ID) AS csCount, IFNULL(CASE WHEN tmp1.DEL_FLAG = '1' THEN SUM(1) ELSE SUM(0) END, 0) AS thCount | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                 FROM( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                         SELECT eid.`ID`, eid.`CREATED_DEPT_ID`, eid.`CREATED_TIME`, eid.`ITEM_ID`, eid.`DEL_FLAG` | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                         FROM `esua_epdc_events`.`epdc_item_dept` eid | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                         WHERE date_format(eid.CREATED_TIME, '%Y-%m') = #{yearMonth, jdbcType=VARCHAR} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                           AND eid.`ID` NOT IN( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                             SELECT tmp.id | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                             FROM( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                     SELECT t.`ITEM_ID`, t.`ID`, MIN(t.`CREATED_TIME`)  FROM `esua_epdc_events`.`epdc_item_dept` t | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                     WHERE date_format(t.CREATED_TIME, '%Y-%m') = #{yearMonth, jdbcType=VARCHAR} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                     GROUP BY t.`ITEM_ID`)  tmp) GROUP BY eid.`CREATED_DEPT_ID`, eid.`ITEM_HANDLE_ID`) tmp1 GROUP BY tmp1.CREATED_DEPT_ID) tt | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ) tmpp on tmpp.CREATED_DEPT_ID = sd.ID | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        where | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        sd.DEL_FLAG = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        and sd.id not in ( | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |