albertshaw 8 years ago
parent
commit
929253eda4

+ 1 - 4
src/main/java/com/goafanti/common/mapper/ContractMapper.xml

@@ -359,7 +359,7 @@
   
   <select id="findManageContractCount" resultType="java.lang.Integer"
 		parameterType="String">
-   select count(1)
+   select count(distinct(c.id))
    from contract c 
 		LEFT JOIN organization_identity oi on oi.uid = c.uid
 		LEFT JOIN admin a on a.id = c.founder
@@ -397,9 +397,6 @@
    <if test="unitName !=null">
     and oi.unit_name= #{unitName,jdbcType=VARCAHR}
   </if>
-  <if test="principal != null">
-	group by c.id
-  </if>
   </select>
   
   <select id="selectContractDetail" parameterType="java.lang.String" resultType="com.goafanti.contract.bo.ContractDetail">

+ 1 - 4
src/main/java/com/goafanti/common/mapper/CopyrightInfoMapper.xml

@@ -348,7 +348,7 @@
   </select>
   
   <select id="findListCount" resultType="java.lang.Integer"  parameterType="String">
-  	select count(*)
+  	select count(distinct(ci.id))
 	from copyright_info ci 
 	left join organization_identity oi on ci.uid = oi.uid
 	<if test="principal != null">
@@ -394,9 +394,6 @@
 	<if test="authEndTime != null">
 	    and ci.authorized_date <![CDATA[ < ]]> #{authEndTime,jdbcType=TIMESTAMP}
 	</if>
-	<if test="principal != null">
-		group by ci.id
-	</if>
   </select>
   
   <update id="deleteByPrimaryKeys" parameterType="java.util.List">

+ 1 - 4
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -356,7 +356,7 @@
   </select>
   
    <select id="findCognizanceBoCount" resultType="java.lang.Integer" parameterType="String">
-  	select count(1)
+  	select count(distinct(c.id))
 	from org_cognizance c 
 	LEFT JOIN organization_identity i on c.uid = i.uid
 	<if test="principal != null">
@@ -378,9 +378,6 @@
 	<if test="locationProvince != null">
 		and i.licence_province = #{locationProvince, jdbcType=INTEGER}
 	</if>
-	<if test="principal != null">
-		group by c.id
-	</if>
 	</select>
 	
 	

+ 1 - 4
src/main/java/com/goafanti/common/mapper/PatentCostMapper.xml

@@ -198,7 +198,7 @@
 
 	<select id="findApplicationFeeCount" resultType="java.lang.Integer"
 		parameterType="java.lang.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 patent_cost c on p.id = c.pid
@@ -217,9 +217,6 @@
 			and p.patent_application_date <![CDATA[ < ]]>
 			#{pEnd,jdbcType=TIMESTAMP}
 		</if>
-		<if test="principal != null">
-			group by p.id
-		</if>
 	</select>
 	
  <insert id="batchInsert" parameterType="com.goafanti.common.model.PatentCost">

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

@@ -687,7 +687,7 @@
 
 	<select id="findManagePatentCount" resultType="java.lang.Integer"
 		parameterType="String">
-		select count(1)
+		select count(distinct(p.id))
 		from patent_info p
 		LEFT JOIN organization_identity o on
 		p.uid = o.uid
@@ -753,9 +753,6 @@
 			and
 			o.licence_province=#{locationProvince,jdbcType=INTEGER}
 		</if>
-		<if test="principal != null">
-			group by p.id
-		</if>
 	</select>
 
 	<select id="findManagePendingPaymentListByPage" resultType="com.goafanti.patent.bo.PatentPendingBo"

+ 1 - 4
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -403,7 +403,7 @@
   </select>
   
   <select id="findTechProjectManageCount" resultType="java.lang.Integer" parameterType="String">
- 	select count(1)  
+ 	select count(distinct(p.id))  
 	 	FROM  tech_project p
 		LEFT JOIN organization_identity i on i.uid = p.uid
 		LEFT JOIN tech_website w on p.department = w.id 
@@ -426,9 +426,6 @@
     <if test="unitName != null" >
     	and i.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
     </if>
-     <if test="principal != null">
-		group by p.id
-	</if>
   </select>
   
   <select id="selectProjectDetail" resultType="com.goafanti.techproject.bo.TechProjectDetailBo" parameterType="java.lang.String">