Переглянути джерело

发票项目名称查询调整,流程单下载调整

user5 2 роки тому
батько
коміт
5f669ab2db

+ 3 - 1
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -1153,9 +1153,11 @@ public class WorkFullManageController extends BaseController {
 		List<MainDictDetail> certificateType = DictUtils.getMainDictList("certificate_type");
 		for (RuralReportConsultant entity: consultants) {
 			for (MainDictDetail type : certificateType) {
-				if(entity.getZhucezigezhKey().equals(type.getValue())){
+				if(null != entity.getZhucezigezhKey() && entity.getZhucezigezhKey().equals(type.getValue())){
 					entity.setZhucezigezh(type.getLabel());
 					break;
+				}else{
+					entity.setZhucezigezh("");
 				}
 			}
 			//处理咨询员专业

+ 28 - 11
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -646,12 +646,15 @@
 		ifnull((select sum(wir.money) from work_invoice_receipt wir where wir.invoice_id = a.id ),0) as "receiptMoneyD"
 		FROM work_invoice a
 		LEFT JOIN sys_user su ON su.id = a.create_by
-		LEFT JOIN work_client_info w ON  w.id = a.client_id
-		LEFT JOIN rural_project_records p ON  p.id = a.project_id
+		LEFT JOIN work_client_info w ON w.id = a.client_id
 		LEFT JOIN sys_user sua ON sua.id = a.account_checking_user_id
-		left join work_invoice_detail wid on a.id = wid.invoice_id
-		LEFT join sys_office so on so.id = a.office_id
-		left join work_invoice_receipt wir on wir.invoice_id = a.id
+		LEFT JOIN work_invoice_detail wid ON a.id = wid.invoice_id
+		LEFT JOIN sys_office so ON so.id = a.office_id
+		LEFT JOIN work_invoice_receipt wir ON wir.invoice_id = a.id
+		left join work_invoice_project_relation wipr on wipr.invoice_id = a.id
+		left join work_invoice_project_relation wiprd on wiprd.invoice_id = a.id
+		LEFT JOIN rural_project_records p ON p.id = wipr.project_id
+		LEFT JOIN project_report_data prds ON p.id = prds.project_id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="widNumber != null and widNumber != ''">
@@ -720,10 +723,15 @@
 				AND a.billing_content = #{billingContent}
 			</if>
 			<if test="projectName != null and projectName != ''">
-				AND rpr.project_name LIKE
+				AND (p.project_name LIKE
 				<if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
+				or wiprd.details LIKE
+				<if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
+				)
 			</if>
 			<if test="reportNumber != null and reportNumber != ''">
 				and prds.number like
@@ -750,11 +758,15 @@
 		SELECT count((a.id))
 		FROM work_invoice a
 		LEFT JOIN sys_user su ON su.id = a.create_by
-		LEFT JOIN work_client_info w ON  w.id = a.client_id
-		LEFT JOIN rural_project_records p ON  p.id = a.project_id
+		LEFT JOIN work_client_info w ON w.id = a.client_id
 		LEFT JOIN sys_user sua ON sua.id = a.account_checking_user_id
-		left join work_invoice_detail wid on a.id = wid.invoice_id
-		left join work_invoice_receipt wir on wir.invoice_id = a.id
+		LEFT JOIN work_invoice_detail wid ON a.id = wid.invoice_id
+		LEFT JOIN sys_office so ON so.id = a.office_id
+		LEFT JOIN work_invoice_receipt wir ON wir.invoice_id = a.id
+		left join work_invoice_project_relation wipr on wipr.invoice_id = a.id
+		left join work_invoice_project_relation wiprd on wiprd.invoice_id = a.id
+		LEFT JOIN rural_project_records p ON p.id = wipr.project_id
+		LEFT JOIN project_report_data prds ON p.id = prds.project_id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="widNumber != null and widNumber != ''">
@@ -821,10 +833,15 @@
 				AND a.billing_content = #{billingContent}
 			</if>
 			<if test="projectName != null and projectName != ''">
-				AND rpr.project_name LIKE
+				AND (p.project_name LIKE
 				<if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
+				or wiprd.details LIKE
+				<if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
+				)
 			</if>
 			<if test="reportNumber != null and reportNumber != ''">
 				and prds.number like