liangxiaozhen
2023-08-11 af908216bb0012fe849e3b49b3039c7ba238f8f0
force-app/main/default/classes/MonthlyClaimsChangeController.cls
@@ -4,12 +4,12 @@
        InitData res  = new initData();
        try {
            Account report = [SELECT Id,DealerTypeSum__c,MonthlyPayment__c,Name FROM Account WHERE Id = :recordId];
            res.RecordTypeId = Schema.SObjectType.Advance_Payment__c.getRecordTypeInfosByDeveloperName().get('MonthlyPaymentChange').getRecordTypeId();
            res.MonthlyPayment = report.MonthlyPayment__c;
            res.DealerTypeSum = report.DealerTypeSum__c;
            res.Name = report.Name;
            List<Advance_Payment__c> sql = [SELECT id,Status__c FROM Advance_Payment__c WHERE Account__c = :recordId and RecordTypeId = :res.RecordTypeId and Status__c in ('草案中','已提交','批准中')];
            Account report = [SELECT Id,DealerTypeSum__c,MonthlyPayment__c,name FROM Account WHERE Id = :recordId];
            res.recordTypeId = Schema.SObjectType.Advance_Payment__c.getRecordTypeInfosByDeveloperName().get('MonthlyPaymentChange').getRecordTypeId();
            res.monthlyPayment = report.MonthlyPayment__c;
            res.dealerTypeSum = report.DealerTypeSum__c;
            res.name = report.name;
            List<Advance_Payment__c> sql = [SELECT id,Status__c FROM Advance_Payment__c WHERE Account__c = :recordId and recordTypeId = :res.recordTypeId and Status__c in ('草案中','已提交','批准中')];
            res.records = sql;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
@@ -18,13 +18,13 @@
    }
    public class InitData{
        @AuraEnabled
        public Boolean MonthlyPayment;
        public Boolean monthlyPayment;
        @AuraEnabled
        public String DealerTypeSum;
        public String dealerTypeSum;
        @AuraEnabled
        public String Name;
        public String name;
        @AuraEnabled
        public String RecordTypeId;
        public String recordTypeId;
        @AuraEnabled
        public List<Advance_Payment__c> records;
    }