| | |
| | | } |
| | | return re; |
| | | } |
| | | |
| | | // 新建QIS |
| | | @AuraEnabled |
| | | public static InitData initForlexCreateQISFromAssetButton (String recordId){ |
| | | InitData res = new initData(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | Asset ass = [SELECT id,AssetMark__c FROM Asset WHERE Id = :recordId LIMIT 1]; |
| | | try{ |
| | | Date fomatToday = Date.today().addDays(-10); |
| | | QIS_Report__c report = [SELECT id,QIS_Submit_day__c FROM QIS_Report__c WHERE nonyushohin__c=:recordId and QIS_Submit_day__c != null and QIS_Submit_day__c >= :fomatToday]; |
| | | Repair__c rep = [SELECT id,Name FROM Repair__c WHERE Delivered_Product__c = :recordId and Status2__c!='00.删除' and Status2__c!='00.取消' and FSE_ApplyForRepair_Day__c >= :fomatToday order by FSE_ApplyForRepair_Day__c desc limit 1]; |
| | | res.Id = report.id; |
| | | res.repId = rep.id; |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String repId; |
| | | @AuraEnabled |
| | | public String qISSCReport; |
| | | @AuraEnabled |
| | | public String name; |