Przeglądaj źródła

添加部门筛选项

user5 4 lat temu
rodzic
commit
3110fd13b4

+ 12 - 4
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordReportDao.xml

@@ -62,7 +62,9 @@
 		<include refid="ruralProjectInfoJoins"/>
 		<include refid="ruralProjectInfoJoins"/>
 		<where>
 		<where>
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5 and prd.status = 5
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5 and prd.status = 5
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 	</select>
 	</select>
 
 
@@ -73,7 +75,9 @@
 		<include refid="ruralProjectInfoJoins"/>
 		<include refid="ruralProjectInfoJoins"/>
 		<where>
 		<where>
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5 and prd.status = 5
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5 and prd.status = 5
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 	</select>
 	</select>
 
 
@@ -110,7 +114,9 @@
 			<if test="officeId != null and officeId != ''">
 			<if test="officeId != null and officeId != ''">
 				AND so.id = #{officeId}
 				AND so.id = #{officeId}
 			</if>
 			</if>
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -144,7 +150,9 @@
 			<if test="officeId != null and officeId != ''">
 			<if test="officeId != null and officeId != ''">
 				AND so.id = #{officeId}
 				AND so.id = #{officeId}
 			</if>
 			</if>
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">

+ 12 - 4
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectReportDao.xml

@@ -57,7 +57,9 @@
 		<include refid="ruralProjectInfoJoins"/>
 		<include refid="ruralProjectInfoJoins"/>
 		<where>
 		<where>
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 	</select>
 	</select>
 
 
@@ -68,7 +70,9 @@
 		<include refid="ruralProjectInfoJoins"/>
 		<include refid="ruralProjectInfoJoins"/>
 		<where>
 		<where>
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5
 			a.del_flag = 0 and project_type = #{projectType} and a.status = 5
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 	</select>
 	</select>
 
 
@@ -102,7 +106,9 @@
 			<if test="officeId != null and officeId != ''">
 			<if test="officeId != null and officeId != ''">
 				AND so.id = #{officeId}
 				AND so.id = #{officeId}
 			</if>
 			</if>
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -133,7 +139,9 @@
 			<if test="officeId != null and officeId != ''">
 			<if test="officeId != null and officeId != ''">
 				AND so.id = #{officeId}
 				AND so.id = #{officeId}
 			</if>
 			</if>
-			AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
 		</where>
 		</where>
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">