Antiloveg 8 years ago
parent
commit
14a817ed27

+ 21 - 16
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -329,7 +329,7 @@
   
   <select id ="findTechProjectManageListByPage" parameterType="java.lang.String" 
      resultType="com.goafanti.techproject.bo.TechProjectManageListBo">
-  	 select p.id, p.uid, i.location_province as province, 
+  	 select x.* from (select p.id, p.uid, i.location_province as province, 
 	        i.unit_name as unitName,  
 		    CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
 		    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
@@ -337,39 +337,44 @@
 		    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
+        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
 		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 
-		and p.deleted_sign = 0 and w.deleted_sign = 0
-		where 1 = 1
+    LEFT JOIN tech_website w on p.department = w.id where p.deleted_sign = 0 ) x where x.wd = 0 or x.wd is null
 		 <if test="province != null">
-    	and i.location_province = #{province,jdbcType=VARCHAR}
+    	and x.province = #{province,jdbcType=VARCHAR}
     </if>
     <if test="unitName != null" >
-    	and i.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
+    	and x.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
     </if>
-    order by p.serial_number desc
+    order by x.serialNumber desc
    <if test="page_sql!=null">
 		${page_sql}
 	</if>
   </select>
   
   <select id="findTechProjectManageCount" resultType="java.lang.Integer" parameterType="String">
- 	select count(1)
-    FROM  tech_project p
+ 	select count(1) from ( select x.* from (select p.id, p.uid, i.location_province as province, 
+	        i.unit_name as unitName,  
+		    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
 		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 
-		and p.deleted_sign = 0 and w.deleted_sign = 0
-		where 1 = 1
-	 <if test="province != null">
-    	and i.location_province = #{province,jdbcType=VARCHAR}
+    LEFT JOIN tech_website w on p.department = w.id where p.deleted_sign = 0 ) x where x.wd = 0 or x.wd is null
+		 <if test="province != null">
+    	and x.province = #{province,jdbcType=VARCHAR}
     </if>
     <if test="unitName != null" >
-    	and i.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%') 
+    	and x.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
     </if>
+    ) y 
   </select>
   
   <select id="selectProjectDetail" resultType="com.goafanti.techproject.bo.TechProjectDetailBo" parameterType="java.lang.String">

+ 1 - 1
src/main/resources/props/config_dev.properties

@@ -51,7 +51,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.10
+static.host=//afts.hnzhiming.com/1.0.11
 
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.10
+static.host=//afts.hnzhiming.com/1.0.11
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc

+ 1 - 1
src/main/resources/props/config_prod.properties

@@ -51,4 +51,4 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.10
+static.host=//afts.hnzhiming.com/1.0.11

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//aftts.hnzhiming.com/1.0.10
+static.host=//aftts.hnzhiming.com/1.0.11
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload