Преглед на файлове

报销类型根据部门查关联及公共数据修改

wangqiang преди 2 години
родител
ревизия
514f905508

+ 30 - 22
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reimbursementApproval/approvalType/mapper/xml/CwReimbursementTypeMapper.xml

@@ -161,11 +161,19 @@
 					a.parent_ids,
 					a.office_id_list,
 					a.office_d_t_o_list
-					FROM
+				FROM
 					cw_reimbursement_type_info a
-					WHERE
+				WHERE
 					del_flag = 0
-					and a.parent_id in (SELECT b.reimbursement_type_id FROM cw_reimbursement_type_office_info b WHERE b.office_id = #{officeId})
+					AND a.id IN (
+					SELECT
+						id
+					FROM
+						cw_reimbursement_type_info a
+					WHERE
+						del_flag = 0
+					AND a.parent_id NOT IN ( SELECT b.reimbursement_type_id FROM cw_reimbursement_type_office_info b)
+					AND a.id NOT IN ( SELECT b.reimbursement_type_id FROM cw_reimbursement_type_office_info b))
 				union
 				SELECT
 					id,
@@ -196,25 +204,25 @@
 						)
 				UNION
 				SELECT
-			id,
-			create_date,
-			a.create_by,
-			a.update_date,
-			a.update_by,
-			a.del_flag,
-			a.LEVEL,
-			a.NAME,
-			a.sort,
-			a.parent_id,
-			a.parent_ids,
-			a.office_id_list,
-			a.office_d_t_o_list
-			FROM
-			cw_reimbursement_type_info a
-			WHERE
-			del_flag = 0
-			and a.id in (SELECT b.reimbursement_type_id FROM cw_reimbursement_type_office_info b WHERE b.office_id = #{officeId})
-						) t
+					id,
+					create_date,
+					a.create_by,
+					a.update_date,
+					a.update_by,
+					a.del_flag,
+					a.LEVEL,
+					a.NAME,
+					a.sort,
+					a.parent_id,
+					a.parent_ids,
+					a.office_id_list,
+					a.office_d_t_o_list
+					FROM
+					cw_reimbursement_type_info a
+					WHERE
+					del_flag = 0
+					and a.id in (SELECT b.reimbursement_type_id FROM cw_reimbursement_type_office_info b WHERE b.office_id = #{officeId})
+				) t
 			${ew.customSqlSegment}
 	</select>