albertshaw 8 years ago
parent
commit
1ad8003efd

+ 4 - 7
src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml

@@ -780,7 +780,7 @@
 			#{locationProvince,jdbcType=INTEGER}
 		</if>
 		<if test="principal != null">
-			group by p.id
+			group by p.id,o.id,c.id
 		</if>
 		ORDER BY p.serial_number DESC
 		<if test="page_sql!=null">
@@ -790,7 +790,7 @@
 
 	<select id="findManagePendingPaymentCount" resultType="java.lang.Integer"
 		parameterType="String">
-		select count(1)
+		select count(distinct(p.id))
 		from patent_info p 
 		INNER JOIN patent_cost c on p.id = c.pid
 		LEFT JOIN organization_identity o on p.uid = o.id 
@@ -805,9 +805,6 @@
 			and o.licence_province =
 			#{locationProvince,jdbcType=INTEGER}
 		</if>
-		<if test="principal != null">
-			group by p.id
-		</if>
 	</select>
 
 	<select id="findNoticeOfCorrectionListByPage" parameterType="String"
@@ -873,7 +870,7 @@
 			o.licence_province=#{locationProvince,jdbcType=INTEGER}
 		</if>
 		<if test="principal != null">
-			group by p.id
+			group by p.id,o.id
 		</if>
 		order by p.serial_number DESC
 		<if test="page_sql!=null">
@@ -883,7 +880,7 @@
 
 	<select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer"
 		parameterType="String">
-		select count(1)
+		select count(distinct(p.id))
 		FROM patent_info p
 		LEFT JOIN organization_identity o ON o.uid = p.uid
     	LEFT JOIN admin a on a.id = p.author

+ 2 - 2
src/main/java/com/goafanti/common/mapper/PatentRegistrationMapper.xml

@@ -235,7 +235,7 @@
 		</if>
 		 where p.deleted_sign = 0
 		<if test="principal != null">
-			group by p.id
+			group by p.id,o.id,r.id
 		</if>
 		order by p.serial_number DESC
 		<if test="page_sql!=null">
@@ -244,7 +244,7 @@
   </select>
   
   <select id="findRecieveSendCount" resultType="java.lang.Integer">
-  	select count(1)
+  	select count(distinct(p.id))
 	from patent_info p 
 	LEFT  JOIN patent_registration r  on p.id = r.pid
 	LEFT JOIN organization_identity o on o.uid = p.uid