|  | @@ -115,27 +115,37 @@
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |      <select id="statistics" resultType="java.util.Map">
 | 
	
		
			
				|  |  |          SELECT
 | 
	
		
			
				|  |  | -        a.id AS taskId,
 | 
	
		
			
				|  |  | +        c.id AS id,
 | 
	
		
			
				|  |  |          a.org_name AS '评价机构',
 | 
	
		
			
				|  |  | -        a.evaluate_org AS '被评价机构名称'
 | 
	
		
			
				|  |  | +        d.score AS '被评价机构名称'
 | 
	
		
			
				|  |  |          FROM
 | 
	
		
			
				|  |  | -        core_evaluate_task a
 | 
	
		
			
				|  |  | +        core_evaluate_task_user_content d LEFT JOIN
 | 
	
		
			
				|  |  | +        core_evaluate_task_user c ON d.task_user_id=c.id AND d.code=1 LEFT JOIN
 | 
	
		
			
				|  |  | +        core_evaluate_task a ON a.id=c.task_id
 | 
	
		
			
				|  |  |          LEFT JOIN core_evaluate_plan b ON a.plan_id = b.id
 | 
	
		
			
				|  |  |          WHERE
 | 
	
		
			
				|  |  |          a.`status` = 2
 | 
	
		
			
				|  |  | -        <if test="orgPath != null  and orgPath != ''">
 | 
	
		
			
				|  |  | -            AND a.org_path like concat(#{orgPath}, '%')
 | 
	
		
			
				|  |  | +        <if test="request.orgPath != null  and request.orgPath != ''">
 | 
	
		
			
				|  |  | +            AND a.org_path like concat(#{request.orgPath}, '%')
 | 
	
		
			
				|  |  |          </if>
 | 
	
		
			
				|  |  | -        <if test="planId != null">
 | 
	
		
			
				|  |  | -            AND b.id = #{planId}
 | 
	
		
			
				|  |  | +        <if test="request.planId != null">
 | 
	
		
			
				|  |  | +            AND b.id = #{request.planId}
 | 
	
		
			
				|  |  |          </if>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  | -<!--    <select id="getContentByTaskId" resultType="java.util.Map">
 | 
	
		
			
				|  |  | -        SELECT content, IF(content_type = 1, 0, score) score
 | 
	
		
			
				|  |  | -        FROM core_evaluate_task_content
 | 
	
		
			
				|  |  | -        WHERE task_id = #{taskId}
 | 
	
		
			
				|  |  | -    </select>-->
 | 
	
		
			
				|  |  | +  <select id="getContentByTaskId" resultType="java.util.Map">
 | 
	
		
			
				|  |  | +      SELECT
 | 
	
		
			
				|  |  | +          b.content,
 | 
	
		
			
				|  |  | +          IF
 | 
	
		
			
				|  |  | +              ( b.content_type = 1, 0, SUM( b.score ) ) score
 | 
	
		
			
				|  |  | +      FROM
 | 
	
		
			
				|  |  | +          core_evaluate_task_user_content b
 | 
	
		
			
				|  |  | +              LEFT JOIN core_evaluate_task_user a ON a.id = b.task_user_id AND b.`code`!=1
 | 
	
		
			
				|  |  | +      WHERE
 | 
	
		
			
				|  |  | +          a.id = #{id}
 | 
	
		
			
				|  |  | +      GROUP BY
 | 
	
		
			
				|  |  | +          b.content
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |      <select id="selectAppPageList" resultType="com.xunmei.core.evaluate.vo.CoreEvaluateTaskVO">
 | 
	
		
			
				|  |  |          SELECT
 | 
	
		
			
				|  |  |          a.id,
 |