From fbd4bea7bd57b4d4a33cb9ed0ebc15d9bf6551c0 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期三, 12 七月 2023 17:54:54 +0800
Subject: [PATCH] 近日更新按钮,页面以及apex类

---
 force-app/main/default/classes/lexPCLLostReportLwcController.cls |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 7e42d0e..aa1edac 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -399,6 +399,27 @@
 					}
 				}
 			}
+			if (report.lostReport.Report_Status__c != '鑽夋') {
+				ProcessInstance pro = [
+				SELECT 
+				ProcessDefinition.Name,
+				 (
+					SELECT 
+					Id,
+					StepStatus, 
+					IsPending,
+					Comments,
+					CreatedDate,
+					Actor.Name,  
+					OriginalActor.Name,
+					ProcessNode.Name FROM StepsAndWorkitems order by IsPending DESC, CreatedDate DESC 
+				)
+				FROM ProcessInstance where TargetObjectId =:reportId order by CreatedDate DESC
+				];
+				List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
+				items.addall(pro.StepsAndWorkitems);
+				report.approvalHistorys = items;
+			}
 			// lostReportId = report.lostReport.id;
 			system.debug('save---end:');
 			messageMap.put('LostReport',JSON.serialize(report));

--
Gitblit v1.9.1