| | |
| | | public with sharing class lexSolutionProjectRequirementsController { |
| | | @AuraEnabled |
| | | public static InitData initSubmitSolutionForApprovalButton(String recordId){ |
| | | public static Map<String,Object> initSubmitSolutionForApprovalButton(String recordId){ |
| | | InitData res = new InitData(); |
| | | Map<String,Object> maps = new Map<String,Object>(); |
| | | try { |
| | | SolutionProjectRequirements__c so = [ |
| | | select |
| | | Status__c, |
| | | Submit_Date_YouWant__c, |
| | | CreatedDate, |
| | | Department_Class__r.Id, |
| | | Department_Class__c, |
| | | Product_Leader__c |
| | | from SolutionProjectRequirements__c where Id =: recordId |
| | | ]; |
| | | res.status = so.Status__c; |
| | | res.submitDateYouWant = so.Submit_Date_YouWant__c; |
| | | res.createdDate = so.CreatedDate; |
| | | res.departmentClassId = so.Department_Class__r.Id; |
| | | res.departmentClassId = so.Department_Class__c; |
| | | res.productLeader = so.Product_Leader__c; |
| | | res.userId = UserInfo.getUserId(); |
| | | res.userName = UserInfo.getUserName(); |
| | | maps.put('res', res); |
| | | } catch (Exception e) { |
| | | String message = e.getMessage(); |
| | | maps.put('error', message); |
| | | return maps; |
| | | } |
| | | return maps; |
| | | } |
| | | @AuraEnabled |
| | | public static InitData initForApplyAgainButton(String recordId){ |
| | | InitData res = new InitData(); |
| | | try { |
| | | SolutionProjectRequirements__c so = [ |
| | | select |
| | | Department_Class__c, |
| | | Hospital__c |
| | | from SolutionProjectRequirements__c where Id =: recordId |
| | | ]; |
| | | res.hospital = so.Hospital__c; |
| | | res.departmentClass = so.Department_Class__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | |
| | | ]; |
| | | res.status = so.Status__c; |
| | | res.profileId = UserInfo.getProfileId(); |
| | | res.m2ProfileId = lexLightingButtonConstant.M2_PROFILE_NAME; |
| | | res.m2ProfileId = [select Id from Profile where Name =: lexLightingButtonConstant.M2_PROFILE_NAME].Id; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | |
| | | public String profileId; |
| | | @AuraEnabled |
| | | public String m2ProfileId; |
| | | @AuraEnabled |
| | | public String oldProjectNo; |
| | | @AuraEnabled |
| | | public String departmentClass; |
| | | @AuraEnabled |
| | | public String hospital; |
| | | } |
| | | } |