public with sharing class LexOpdCommitApprovalController {
|
@AuraEnabled
|
public static CancelPostponePlan__c init(String recordId){
|
CancelPostponePlan__c res = new CancelPostponePlan__c();
|
try{
|
res = [Select Id,Status__c,CancelOPDPlan__c
|
FROM CancelPostponePlan__c
|
WHERE Id = : recordId];
|
}
|
catch(Exception e){
|
System.debug(LoggingLevel.INFO, '*** e: ' + e);
|
}
|
return res;
|
}
|
|
@AuraEnabled
|
public static String newUpdateCancelPostponePlan(String Id,String Status){
|
CancelPostponePlan__c res = new CancelPostponePlan__c();
|
try{
|
res.Id=Id;
|
if(Status == '取消'){
|
res.Status__c ='提交';
|
}
|
else if (Status == '延期报告'){
|
res.Status__c ='延期提交';
|
}
|
update res;
|
return 'success';
|
}
|
catch (Exception e) {
|
System.debug(LoggingLevel.INFO, '*** e: ' + e);
|
return e.getMessage();
|
}
|
|
}
|
}
|