user5 преди 1 година
родител
ревизия
dd39315973
променени са 1 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 9 4
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

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

@@ -3452,9 +3452,12 @@
 			and a.del_flag = 0
 			and sdi.year = #{statementCompanyComprehensiveInfo.year}
 			and sdi.type = #{statementCompanyComprehensiveInfo.type}
-			and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
 
-			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !=''">
+			<if test="statementCompanyComprehensiveInfo.bigDateType != null and statementCompanyComprehensiveInfo.bigDateType !=0">
+				and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			</if>
+
+			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !='' and statementCompanyComprehensiveInfo.bigDateType !=0">
 				and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
 			</if>
 
@@ -3675,9 +3678,11 @@
 			and a.del_flag = 0
 			and sdi.year = #{statementCompanyComprehensiveInfo.year}
 			and sdi.type = #{statementCompanyComprehensiveInfo.type}
-			and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			<if test="statementCompanyComprehensiveInfo.bigDateType != null and statementCompanyComprehensiveInfo.bigDateType !=0">
+				and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			</if>
 
-			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !=''">
+			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !='' and statementCompanyComprehensiveInfo.bigDateType !=0">
 				and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
 			</if>