瀏覽代碼

Accept Merge Request #144 debug : (master -> test)

Merge Request: debug
Created By: @Antiloveg
Accepted By: @Antiloveg
URL: https://coding.net/t/aft/p/AFT/git/merge/144
Antiloveg 8 年之前
父節點
當前提交
64a7c95969

+ 1 - 1
src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java

@@ -331,7 +331,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		Calendar cal = Calendar.getInstance();
 		OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(uid, cal.get(Calendar.YEAR) - 1);
 
-		if (null == ratepay) {
+		if (null == ratepay || StringUtils.isBlank(ratepay.getTaxReturnUrl())) {
 			return res;
 		}
 

+ 10 - 0
src/main/java/com/goafanti/cognizance/bo/CognizanceBo.java

@@ -46,6 +46,16 @@ public class CognizanceBo {
 	private String	founder;
 
 	private String	contractId;
+	
+	private Integer contractNumber;
+	
+	public Integer getContractNumber() {
+		return contractNumber;
+	}
+
+	public void setContractNumber(Integer contractNumber) {
+		this.contractNumber = contractNumber;
+	}
 
 	public String getContractId() {
 		return contractId;

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

@@ -134,6 +134,6 @@
 		LEFT JOIN admin aa on aa.id = cl.operator
 		LEFT JOIN admin a on a.id = cl.principal
 		where cl.cid = #{cid,jdbcType=VARCHAR}
-		order by cl.record_time desc
+		order by cl.record_time 
     </select>
 </mapper>

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

@@ -314,7 +314,7 @@
     and c.serialNumber = #{serialNumber,jdbcType=INTEGER}
   </if>
   <if test="id !=null">
-    and c.id = #{id,jdbcType=VARCAHR}
+    and c.id = #{id,jdbcType=VARCHAR}
   </if>
   <if test="type !=null">
     and c.type = #{type,jdbcType=INTEGER}
@@ -359,8 +359,8 @@
   <if test="principal != null">
 	and cl.principal = #{principal,jdbcType=VARCHAR}
   </if>
-  <if test="id != null">
-	and cl.id = #{id,jdbcType=VARCHAR}
+ <if test="id !=null">
+    and c.id = #{id,jdbcType=VARCHAR}
   </if>
   <if test="serialNumber !=null">
     and c.serialNumber = #{serialNumber,jdbcType=INTEGER}

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

@@ -291,11 +291,12 @@
 	concat(oi.first_contacts,'  ', oi.first_mobile) as firstContact,
 	concat(oi.second_contacts,'  ', oi.second_mobile) as secondContact,
 	concat(oi.third_contacts,'  ', oi.third_mobile) as thirdContact,
-	a.name as principal, ad.name as founder
+	a.name as principal, ad.name as founder, c.serial_number as contractNumber
 	from copyright_info ci 
 	left join organization_identity oi on ci.uid = oi.uid
 	left join admin a on ci.principal = a.id
 	left join admin ad on ci.founder = ad.id
+	left join contract c on c.id = ci.contract_id
 	<if test="principal != null">
 	left join contract_log cl on ci.contract_id=cl.cid
 	</if>

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

@@ -120,7 +120,7 @@
    	left join admin a on cl.principal = a.id
    	left join admin b on cl.operator = b.id
     where cl.cid = #{id,jdbcType=VARCHAR} 
-    order by cl.record_time desc
+    order by cl.record_time 
   </select>
   
    <insert id="batchInsert" parameterType="com.goafanti.common.model.CopyrightLog">

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

@@ -121,6 +121,6 @@
 		LEFT JOIN admin a on a.id = ocl.principal
 		LEFT JOIN admin ad on ad.id = ocl.operator
 	where ocl.cid = #{cid,jdbcType=VARCHAR}
-	ORDER BY ocl.record_time DESC
+	ORDER BY ocl.record_time 
   </select>
 </mapper>

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

@@ -324,11 +324,12 @@
     CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
     CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
     CONCAT(i.third_contacts,'  ', i.third_mobile) as thirdContacts,
-    ad.name as founder
+    ad.name as founder, ct.serial_number as contractNumber
 	from org_cognizance c 
 	LEFT JOIN organization_identity i on c.uid = i.uid
 	LEFT JOIN admin a on c.consultant = a.id 
 	LEFT JOIN admin ad on c.founder = ad.id 
+	left join contract ct on ct.id = c.contract_id
 	<if test="principal != null">
 		left join contract_log l on c.contract_id=l.cid 
 	</if>

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

@@ -608,12 +608,13 @@
 		p.patent_application_date as
 		patentApplicationDate, p.authorized_date as authorizedDate,
 		a.name as
-		author, ad.name as founder, p.contract_id as contractId
+		author, ad.name as founder, c.serial_number as contractNumber
 		from patent_info p
 		LEFT JOIN organization_identity o on p.uid =
 		o.uid
 		LEFT JOIN admin a on a.id = p.author
 		LEFT JOIN admin ad on ad.id = p.founder
+		LEFT JOIN contract c on c.id = p.contract_id
 		<if test="principal != null">
 			left join contract_log l on p.contract_id=l.cid
 		</if>
@@ -682,7 +683,6 @@
 		<if test="page_sql!=null">
 			${page_sql}
 		</if>
-
 	</select>
 
 	<select id="findManagePatentCount" resultType="java.lang.Integer"

+ 6 - 5
src/main/java/com/goafanti/common/mapper/PatentLogMapper.xml

@@ -116,11 +116,12 @@
   </update>
   
   <select id="selectProcessByPid"  parameterType="java.lang.String" resultMap="BaseResultMap">
-    select b.name as principal , m.operator , m.id , m.pid , m.state , m.comment , m.record_time from 
-		(select a.name as operator, p.id ,p.pid  , p.state , p.comment ,p.record_time , p.principal as pri
-		from patent_log p LEFT JOIN admin a 
-		on a.id = p.operator ) m LEFT JOIN admin b on m.pri = b. id
-    where pid = #{pid,jdbcType=VARCHAR} order by m.record_time desc
+     select a.name as principal, b.name as operator, pl.record_time as recordTime, pl.state, pl.comment as comment
+    from patent_log pl
+   	left join admin a on pl.principal = a.id
+   	left join admin b on pl.operator = b.id
+    where pl.pid = #{pid,jdbcType=VARCHAR} 
+    order by pl.record_time 
   </select>
   
    <insert id="batchInsert" parameterType="com.goafanti.common.model.PatentLog">

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

@@ -120,7 +120,7 @@
 		(select a.name as operator, p.id ,p.pid  , p.state , p.comment ,p.record_time , p.principal as pri
 		from tech_project_log p LEFT JOIN admin a 
 		on a.id = p.operator ) m LEFT JOIN admin b on m.pri = b. id
-    where pid = #{pid,jdbcType=VARCHAR} order by m.record_time desc
+    where pid = #{pid,jdbcType=VARCHAR} order by m.record_time 
   </select>
   
    <insert id="batchInsert" parameterType="com.goafanti.common.model.TechProjectLog">

+ 30 - 40
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -364,7 +364,7 @@
   
   <select id ="findTechProjectManageListByPage" parameterType="java.lang.String" 
      resultType="com.goafanti.techproject.bo.TechProjectManageListBo">
-  	 select x.* from (select p.id, p.uid, i.licence_province as province, p.contract_id as contractId,
+  	 select p.id, p.uid, i.licence_province as province, p.contract_id as contractId,
 	        i.unit_name as unitName,  
 		    CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
 		    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
@@ -372,79 +372,69 @@
 		    p.serial_number as serialNumber, p.create_time as createTime, p.approved_date as approvedDate, 
 		    p.accept_date as acceptDate, a.name as consultant, p.contacts, ad.name as founder,
 		    p.project_name as projectName, p.project_catagory as projectCatagory, p.tech_field as techField, p.state, 
-        w.id as wid, w.website, w.account_number as accountNumber, w.department, w.password, p.deleted_sign as pd, w.deleted_sign as wd
+        w.id as wid, w.website, w.account_number as accountNumber, w.department, 
+        w.password, c.serial_number as contractNumber
 	  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 admin ad on p.founder = ad.id 
-   	    LEFT JOIN tech_website w on p.department = w.id 
+   	LEFT JOIN tech_website w on p.department = w.id 
+    LEFT JOIN contract c on c.id = p.contract_id
     <if test="principal != null">
 		left join contract_log l on p.contract_id=l.cid
 	</if>
-	 where p.deleted_sign = 0 
-	 <if test="principal != null">
+	where p.deleted_sign = 0 and (w.deleted_sign is  null or w.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="contractId != null">
-    	and x.contractId = #{contractId,jdbcType=VARCHAR}
+    	and p.contract_id = #{contractId,jdbcType=VARCHAR}
     </if>
       <if test="province != null">
-    	and x.province = #{province,jdbcType=VARCHAR}
+    	and i.licence_province = #{province,jdbcType=VARCHAR}
     </if>
      <if test="uid != null">
-    	and x.uid = #{uid,jdbcType=VARCHAR}
+    	and p.uid = #{uid,jdbcType=VARCHAR}
     </if>
     <if test="unitName != null" >
-    	and x.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
+    	and i.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
     </if>
-    order by x.serialNumber desc
+     <if test="principal != null">
+		group by p.id
+	</if>
+    order by p.serial_number desc
    <if test="page_sql!=null">
 		${page_sql}
 	</if>
   </select>
   
   <select id="findTechProjectManageCount" resultType="java.lang.Integer" parameterType="String">
- 	select count(1) from ( select x.* from (select p.id, p.uid, i.licence_province as province, 
-	        i.unit_name as unitName,  p.contract_id as contractId,
-		    CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
-		    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
-		    CONCAT(i.third_contacts,'  ', i.third_mobile) as thirdContacts, 
-		    p.serial_number as serialNumber, p.create_time as createTime, p.approved_date as approvedDate, 
-		    p.accept_date as acceptDate, a.name as consultant, p.contacts,
-		    p.project_name as projectName, p.project_catagory as projectCatagory, p.tech_field as techField, p.state,
-        w.id as wid, w.website, w.account_number as accountNumber, w.department, w.password, p.deleted_sign as pd, w.deleted_sign as wd
-	  FROM  tech_project p
+ 	select count(1)  
+	 	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 
-    <if test="principal != null">
+		LEFT JOIN tech_website w on p.department = w.id 
+     <if test="principal != null">
 		left join contract_log l on p.contract_id=l.cid
 	</if>
-	 where p.deleted_sign = 0 
-	 <if test="principal != null">
+	where p.deleted_sign = 0 and (w.deleted_sign is  null or w.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="contractId != null">
-    	and x.contractId = #{contractId,jdbcType=VARCHAR}
+    <if test="contractId != null">
+    	and p.contract_id = #{contractId,jdbcType=VARCHAR}
     </if>
-	<if test="province != null">
-    	and x.province = #{province,jdbcType=VARCHAR}
+      <if test="province != null">
+    	and i.licence_province = #{province,jdbcType=VARCHAR}
     </if>
      <if test="uid != null">
-    	and x.uid = #{uid,jdbcType=VARCHAR}
+    	and p.uid = #{uid,jdbcType=VARCHAR}
     </if>
     <if test="unitName != null" >
-    	and x.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
+    	and i.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
     </if>
-    ) y 
+     <if test="principal != null">
+		group by p.id
+	</if>
   </select>
   
   <select id="selectProjectDetail" resultType="com.goafanti.techproject.bo.TechProjectDetailBo" parameterType="java.lang.String">

+ 3 - 3
src/main/java/com/goafanti/contract/service/impl/ContractServiceImpl.java

@@ -58,7 +58,7 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<ContractManageListBo> getManageList(String id, Integer serialNumber, Integer type, Integer status,
+	public Pagination<ContractManageListBo> getManageList(String contractId, Integer serialNumber, Integer type, Integer status,
 			String startDateFormattedDate, String endDateFormattedDate, String province, String unitName, String uid,
 			Integer pNo, Integer pSize) {
 		Date cStart = null;
@@ -86,8 +86,8 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 			params.put("uid", uid);
 		}
 
-		if (!StringUtils.isBlank(id)) {
-			params.put("id", id);
+		if (!StringUtils.isBlank(contractId)) {
+			params.put("id", contractId);
 		}
 
 		if (!StringUtils.isBlank(startDateFormattedDate)) {

+ 8 - 0
src/main/java/com/goafanti/copyright/bo/CopyrightInfoSummary.java

@@ -95,7 +95,15 @@ public class CopyrightInfoSummary {
 	
 	private String founder;
 	
+	private Integer contractNumber;
 	
+	public Integer getContractNumber() {
+		return contractNumber;
+	}
+
+	public void setContractNumber(Integer contractNumber) {
+		this.contractNumber = contractNumber;
+	}
 
 	public String getFounder() {
 		return founder;

+ 5 - 6
src/main/java/com/goafanti/patent/bo/PatentManageListBo.java

@@ -39,15 +39,14 @@ public class PatentManageListBo {
 
 	private Integer	patentCatagory;
 
-	private String	contractId;
+	private Integer	contractNumber;
 	
-
-	public String getContractId() {
-		return contractId;
+	public Integer getContractNumber() {
+		return contractNumber;
 	}
 
-	public void setContractId(String contractId) {
-		this.contractId = contractId;
+	public void setContractNumber(Integer contractNumber) {
+		this.contractNumber = contractNumber;
 	}
 
 	@JsonFormat(shape = Shape.STRING)

+ 10 - 0
src/main/java/com/goafanti/techproject/bo/TechProjectManageListBo.java

@@ -15,6 +15,16 @@ public class TechProjectManageListBo extends TechProjectClientListBo {
 	
 	private String contractId;
 	
+	private Integer contractNumber;
+	
+	public Integer getContractNumber() {
+		return contractNumber;
+	}
+
+	public void setContractNumber(Integer contractNumber) {
+		this.contractNumber = contractNumber;
+	}
+
 	public String getContractId() {
 		return contractId;
 	}