Просмотр исходного кода

项目添加区域筛选功能

user5 1 год назад
Родитель
Сommit
72897b5dc6

+ 9 - 1
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -1005,8 +1005,16 @@ END) as projectScale*/
 				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_id = #{area.id}
+				AND (area.parent_ids LIKE
+				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
+			<!--<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>-->
 			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
 				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
 			</if>

+ 10 - 1
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -901,9 +901,18 @@
 			<if test="projectDesc != null and projectDesc != ''">
 				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
 			</if>
+
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_id = #{area.id}
+				AND (area.parent_ids LIKE
+				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
+			<!--<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>-->
 			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
 				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
 			</if>

+ 6 - 0
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -1080,6 +1080,12 @@
 				<if test="dbName == 'mssql'">'%'+#{number}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{number},'%')</if>
 			</if>
+			<if test="receiptBeginDate != null and receiptBeginDate != ''">
+				AND date_format(a.receipt_money_date,'%Y-%m-%d') &gt;= date_format(#{receiptBeginDate},'%Y-%m-%d')
+			</if>
+			<if test="receiptEndDate != null and receiptEndDate != ''">
+				AND date_format(a.receipt_money_date,'%Y-%m-%d') &lt;= date_format(#{receiptEndDate},'%Y-%m-%d')
+			</if>
 			<if test="beginContractDate != null and endContractDate != null and beginContractDate != '' and endContractDate != ''">
 				AND a.invoice_date BETWEEN #{beginContractDate} AND #{endContractDate}
 			</if>