Bläddra i källkod

公司级 超期 报表 sql 修改

[user3] 3 år sedan
förälder
incheckning
39dbde9170

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

@@ -2793,10 +2793,18 @@
 			and big_date_type = #{bigDateType}
 			and small_date_type = #{smallDateType}
 			and office_id = #{officeId}
-			and field1 IS NOT NULL and field1 != ''
-			and field2 IS NOT NULL and field2 != ''
-			and field3 IS NOT NULL and field3 != ''
-			and field4 IS NOT NULL and field4 != ''
+			<if test="field5 != null and field5 != ''">
+				and field1 IS NOT NULL and field1 != ''
+			</if>
+			<if test="field6 != null and field6 != ''">
+				and field2 IS NOT NULL and field2 != ''
+			</if>
+			<if test="field7 != null and field7 != ''">
+				and field3 IS NOT NULL and field3 != ''
+			</if>
+			<if test="field8 != null and field8 != ''">
+				and field4 IS NOT NULL and field4 != ''
+			</if>
 		</where>
 	</select>
 

+ 6 - 2
src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml

@@ -1846,8 +1846,12 @@
 			and big_date_type = #{bigDateType}
 			and small_date_type = #{smallDateType}
 			and office_id = #{officeId}
-			and field1 IS NOT NULL and field1 != ''
-			and field2 IS NOT NULL and field2 != ''
+			<if test="field3 != null and field3 != ''">
+				and field1 IS NOT NULL and field1 != ''
+			</if>
+			<if test="field4 != null and field4 != ''">
+				and field2 IS NOT NULL and field2 != ''
+			</if>
 		</where>
 	</select>
 </mapper>