| | |
| | | } |
| | | } |
| | | } |
| | | 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)); |