| | |
| | | objs.put('Id', reportId); |
| | | objs.put('pageStatus', 'View'); |
| | | objs.put('submitFlag', '1'); |
| | | ProcessInstance pro = [ |
| | | SELECT |
| | | ProcessDefinition.Name, |
| | | ( |
| | | SELECT StepStatus, |
| | | 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); |
| | | objs.put('approvalHistorys',items); |
| | | return objs; |
| | | }catch(exception ex) { |
| | | Database.rollback(sp); |
| | |
| | | return lostBrand; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static PCLLostProducts getNewLostProduct(Integer lineNo2){ |
| | | PCLLostProducts pro = null; |
| | | try { |
| | | pro = new PCLLostProducts(lineNo2); |
| | | } catch (Exception e) { |
| | | System.debug(e.getMessage()); |
| | | } |
| | | return pro; |
| | | } |
| | | |
| | | // update tcm 20211125 添加型号时自动带出品牌 end |
| | | // 页面的数据结构 |
| | | public class LostReport { |
| | |
| | | public Lost_cancel_report__c lostReport { get; set; } |
| | | @AuraEnabled |
| | | public list<LostBrand> LostBrands { get; set; } |
| | | @AuraEnabled |
| | | public list<ProcessInstanceHistory> approvalHistorys { get; set; } |
| | | public LostReport(){ |
| | | lostReport = new Lost_cancel_report__c(); |
| | | LostBrands = new list<LostBrand> {new LostBrand(0)}; |
| | | approvalHistorys = new list<ProcessInstanceHistory>(); |
| | | } |
| | | public LostReport(Lost_cancel_report__c lostReport){ |
| | | this.lostReport = lostReport; |
| | | LostBrands = new list<LostBrand> {new LostBrand(0)}; |
| | | approvalHistorys = new list<ProcessInstanceHistory>(); |
| | | } |
| | | public LostReport(Lost_cancel_report__c lostReport, list<LostBrand> LostBrands){ |
| | | this.lostReport = lostReport; |
| | | this.LostBrands = LostBrands; |
| | | approvalHistorys = new list<ProcessInstanceHistory>(); |
| | | } |
| | | } |
| | | |