Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT.git

albertshaw 8 years ago
parent
commit
b01e81f0dc

+ 5 - 5
schema/permission.sql

@@ -40,9 +40,9 @@ values
 
 insert into `permission`(`id`, `url`, `name`) 
 values
-(UUID(), 'api/admin/standard', '标准定情况--企业参与国家标准或行业标准制定情况明细列表'), 
-(UUID(), 'api/admin/', '标准定情况--企业参与国家标准或行业标准制定情况明细新增及修改'), 
-(UUID(), 'api/admin/deleteStandard', '标准定情况--删除标准制定情况记录');
+(UUID(), 'api/admin/standard', '标准定情况--企业参与国家标准或行业标准制定情况明细列表'), 
+(UUID(), 'api/admin/', '标准定情况--企业参与国家标准或行业标准制定情况明细新增及修改'), 
+(UUID(), 'api/admin/deleteStandard', '标准定情况--删除标准制定情况记录');
 
 insert into `permission`(`id`, `url`, `name`) 
 values
@@ -206,13 +206,13 @@ values
 
 insert into `permission`(`id`, `url`, `name`) 
 values
-(UUID(), '/api/admin/notice/unreadCount', '通知管理--未读通知数量'), 
+(UUID(), 'api/admin/notice/unreadCount', '通知管理--未读通知数量'), 
 (UUID(), 'api/admin/notice/unread', '通知管理--未读通知列表'),
 (UUID(), 'api/admin/notice/readed', '通知管理--已读通知列表');
 
 insert into `permission`(`id`, `url`, `name`) 
 values
-(UUID(), '/api/admin/patent/patentList', '专利申请管理--专利列表'),
+(UUID(), 'api/admin/patent/patentList', '专利申请管理--专利列表'),
 (UUID(), 'api/admin/patent/apply', '专利申请管理--新增专利申请'),
 (UUID(), 'api/admin/patent/detail', '专利申请管理--专利详情'),
 (UUID(), 'api/admin/patent/logs', '专利申请管理--专利流转状态'), 

File diff suppressed because it is too large
+ 995 - 55
src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java


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

@@ -312,7 +312,9 @@
 	<if test="authEndTime != null">
 	    and ci.authorized_date <![CDATA[ < ]]> #{authEndTime,jdbcType=TIMESTAMP}
 	</if>
-	group by ci.id
+	<if test="principal != null">
+		group by ci.id
+	</if>
 	order by ci.serial_number desc
   	<if test="page_sql!=null">
 		${page_sql}
@@ -363,7 +365,9 @@
 	<if test="authEndTime != null">
 	    and ci.authorized_date <![CDATA[ < ]]> #{authEndTime,jdbcType=TIMESTAMP}
 	</if>
-	group by ci.id
+	<if test="principal != null">
+		group by ci.id
+	</if>
   </select>
   
   <update id="deleteByPrimaryKeys" parameterType="java.util.List">

+ 15 - 8
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -280,13 +280,13 @@
 	from org_cognizance c 
 	LEFT JOIN organization_identity i on c.uid = i.uid
 	LEFT JOIN admin a on c.consultant = a.id 
+	<if test="principal != null">
+		left join org_cognizance_log l on c.id=l.cid 
+	</if>
 	where c.deleted_sign = 0
-	
-	
 	<if test="principal != null">
-		and c.id in (SELECT l.pid FROM org_cognizance_log l where l.principal = #{principal,jdbcType=VARCHAR})
+		and l.principal = #{principal,jdbcType=VARCHAR}
 	</if>
-	
 	<if test="unitName != null">
 		and i.unit_name like  CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
 	</if>
@@ -296,6 +296,9 @@
 	<if test="locationProvince != null">
 		and i.location_province = #{locationProvince, jdbcType=VARCHAR}
 	</if>
+	<if test="principal != null">
+		group by c.id
+	</if>
      order by c.serial_number desc
 	<if test="page_sql!=null">
 		${page_sql}
@@ -303,14 +306,15 @@
   </select>
   
    <select id="findCognizanceBoCount" resultType="java.lang.Integer" parameterType="String">
-  select count(1)
+  	select count(1)
 	from org_cognizance c 
 	LEFT JOIN organization_identity i on c.uid = i.uid
-	LEFT JOIN admin a on c.consultant = a.id 
+	<if test="principal != null">
+		left join org_cognizance_log l on c.id=l.cid 
+	</if>
 	where c.deleted_sign = 0  
-
 	<if test="principal != null">
-		and c.id in (SELECT l.pid FROM org_cognizance_log l where l.principal = #{principal,jdbcType=VARCHAR})
+		and l.principal = #{principal,jdbcType=VARCHAR}
 	</if>
 	
 	<if test="uid != null">
@@ -322,6 +326,9 @@
 	<if test="locationProvince != null">
 		and i.location_province = #{locationProvince, jdbcType=VARCHAR}
 	</if>
+	<if test="principal != null">
+		group by c.id
+	</if>
 	</select>
 	
 	

+ 42 - 14
src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml

@@ -588,12 +588,13 @@
 		LEFT JOIN organization_identity o on p.uid =
 		o.uid
 		LEFT JOIN admin a on a.id = p.author
+		<if test="principal != null">
+			left join patent_log l on p.id=l.pid
+		</if>
 		where p.deleted_sign = 0
-		
 		<if test="principal != null">
-			and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
+			and  l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
-
 		<if test="serialNumber != null">
 			and p.serial_number = #{serialNumber,jdbcType=INTEGER}
 		</if>
@@ -642,6 +643,9 @@
 			and o.location_province =
 			#{locationProvince,jdbcType=VARCHAR}
 		</if>
+		<if test="principal != null">
+			group by p.id
+		</if>
 		ORDER BY p.serial_number DESC
 		<if test="page_sql!=null">
 			${page_sql}
@@ -656,10 +660,12 @@
 		LEFT JOIN organization_identity o on
 		p.uid = o.uid
 		LEFT JOIN admin a on a.id = p.author
+		<if test="principal != null">
+			left join patent_log l on p.id=l.pid
+		</if>
 		where p.deleted_sign = 0
-		
 		<if test="principal != null">
-			and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
+			and  l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
 		
 		<if test="serialNumber != null">
@@ -710,6 +716,9 @@
 			and
 			o.location_province=#{locationProvince,jdbcType=VARCHAR}
 		</if>
+		<if test="principal != null">
+			group by p.id
+		</if>
 	</select>
 
 	<select id="findManagePendingPaymentListByPage" resultType="com.goafanti.patent.bo.PatentPendingBo"
@@ -724,16 +733,21 @@
 		from patent_info p
 		INNER JOIN patent_cost c on p.id = c.pid
 		LEFT JOIN organization_identity o on p.uid = o.id
+		<if test="principal != null">
+			left join patent_log l on p.id=l.pid
+		</if>
 		where p.deleted_sign = 0 
-		
 		<if test="principal != null">
-			and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
+			and l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
 		
 		<if test="locationProvince != null">
 			and o.location_province =
 			#{locationProvince,jdbcType=VARCHAR}
 		</if>
+		<if test="principal != null">
+			group by p.id
+		</if>
 		ORDER BY p.serial_number DESC
 		<if test="page_sql!=null">
 			${page_sql}
@@ -746,17 +760,20 @@
 		from patent_info p 
 		INNER JOIN patent_cost c on p.id = c.pid
 		LEFT JOIN organization_identity o on p.uid = o.id 
+		<if test="principal != null">
+			left join patent_log l on p.id=l.pid
+		</if>
 		where p.deleted_sign = 0 
-		
 		<if test="principal != null">
-			and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
+			and l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
-		
 		<if test="locationProvince != null">
 			and o.location_province =
 			#{locationProvince,jdbcType=VARCHAR}
 		</if>
-		
+		<if test="principal != null">
+			group by p.id
+		</if>
 	</select>
 
 	<select id="findNoticeOfCorrectionListByPage" parameterType="String"
@@ -772,11 +789,14 @@
 		FROM patent_info p
 		LEFT JOIN organization_identity o ON o.uid = p.uid
     	LEFT JOIN admin a on a.id = p.author
+    	<if test="principal != null">
+			left join patent_log l on p.id=l.pid
+		</if>
 		where p.patent_state in
 		(6,8) and p.deleted_sign = 0
 		
 		<if test="principal != null">
-			and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
+			and l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
 		
 		<if test="serialNumber != null">
@@ -811,6 +831,9 @@
 			and
 			o.location_province=#{locationProvince,jdbcType=VARCHAR}
 		</if>
+		<if test="principal != null">
+			group by p.id
+		</if>
 		order by p.serial_number DESC
 		<if test="page_sql!=null">
 			${page_sql}
@@ -823,11 +846,13 @@
 		FROM patent_info p
 		LEFT JOIN organization_identity o ON o.uid = p.uid
     	LEFT JOIN admin a on a.id = p.author
+    	<if test="principal != null">
+			left join patent_log l on p.id=l.pid
+		</if>
 		where p.patent_state in
 		(6,8) and p.deleted_sign = 0
-		
 		<if test="principal != null">
-			and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
+			and l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
 		
 		<if test="serialNumber != null">
@@ -862,6 +887,9 @@
 			and
 			o.location_province=#{locationProvince,jdbcType=VARCHAR}
 		</if>
+		<if test="principal != null">
+			group by p.id
+		</if>
 	</select>
 
 	<update id="batchDeleteByPrimaryKey" parameterType="java.util.List">

+ 23 - 9
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -341,10 +341,17 @@
 	  FROM  tech_project p
 		LEFT JOIN organization_identity i on i.uid = p.uid
 		LEFT JOIN admin a on p.consultant = a.id 
-    LEFT JOIN tech_website w on p.department = w.id where p.deleted_sign = 0 
-    <if test = "principal != null">
-    and p.id in (select  l.pid from tech_project_log l where l.principal = #{principal,jdbcType = VARCHAR})
-    </if>
+   	    LEFT JOIN tech_website w on p.department = w.id 
+    <if test="principal != null">
+		left join tech_project_log l on p.id=l.pid
+	</if>
+	 where p.deleted_sign = 0 
+	 <if test="principal != null">
+		and l.principal = #{principal,jdbcType=VARCHAR}
+	</if>
+	 <if test="principal != null">
+		group by p.id
+	</if>
     ) x where x.wd = 0 or x.wd is null
     <if test="province != null">
     	and x.province = #{province,jdbcType=VARCHAR}
@@ -371,12 +378,19 @@
 	  FROM  tech_project p
 		LEFT JOIN organization_identity i on i.uid = p.uid
 		LEFT JOIN admin a on p.consultant = a.id 
-    LEFT JOIN tech_website w on p.department = w.id where p.deleted_sign = 0 
-    <if test = "principal != null">
-    and p.id in (select  l.pid from tech_project_log l where l.principal = #{principal,jdbcType = VARCHAR})
-    </if>
+    LEFT JOIN tech_website w on p.department = w.id 
+    <if test="principal != null">
+		left join tech_project_log l on p.id=l.pid
+	</if>
+	 where p.deleted_sign = 0 
+	 <if test="principal != null">
+		and l.principal = #{principal,jdbcType=VARCHAR}
+	</if>
+	 <if test="principal != null">
+		group by p.id
+	</if> 
     ) x where x.wd = 0 or x.wd is null
-		 <if test="province != null">
+	<if test="province != null">
     	and x.province = #{province,jdbcType=VARCHAR}
     </if>
     <if test="unitName != null" >