/**
|
* *
|
ODescription:
|
GAuthor: sun xia
|
@Date: 2023-07-11 15:31:56
|
GIastEditors: sun xia
|
@IastEditTime: 2023-07-11 15:31:56
|
* */
|
public with sharing class lexRentalFixtureSetAssignController {
|
|
@AuraEnabled
|
public static InitData init(String recordId){
|
InitData res = new InitData();
|
try {
|
Rental_Apply__c ra = [SELECT Id, Campaign__c, Campaign__r.Status, Repair__c, Repair_Final_Inspection_Date_F__c, RC_return_to_office__c,
|
Status__c, Rental_Apply_Equipment_Set_Cnt__c, demo_purpose2__c, AccDealerBlacklist__c ,Hospital__r.IFTradeComplianceIntercept2__c,
|
AccDealerBlacklist2__c //20240121 sx 贸易合规二期冻结/黑名单拆开 add
|
FROM Rental_Apply__c where Id = :recordId];
|
|
res.ra = ra;
|
System.debug('ra.Campaign__c=='+ra.Campaign__c);
|
if(ra.Campaign__c != null){
|
String campId = ra.Campaign__c;
|
Campaign camp = [SELECT Id, Status FROM Campaign Where Id = :campId];
|
res.CampaignStatus = camp.Status;
|
}
|
//贸易合规二期 add sx start
|
if (ra.Hospital__r.IFTradeComplianceIntercept2__c =='intercept') {
|
res.IFTradeComplianceIntercept2 = '1';
|
}else if(ra.Hospital__r.IFTradeComplianceIntercept2__c =='Freeze') {
|
res.IFTradeComplianceIntercept2 = '2';
|
}
|
//贸易合规二期 add sx end
|
System.debug('res==='+res);
|
return res;
|
}
|
catch (Exception e) {
|
System.debug('lexRentalFixtureSetAssignControllerError==='+e);
|
}
|
return null;
|
}
|
|
|
public class InitData{
|
@AuraEnabled
|
public Rental_Apply__c ra;
|
@AuraEnabled
|
public String CampaignStatus;
|
@AuraEnabled
|
public String IFTradeComplianceIntercept2; //贸易合规二期 add sx
|
}
|
}
|