黄千龙
2023-03-08 962519811b7c4be07f30d09e791798b0ea79d3ae
force-app/main/default/classes/CampaignCopyToOPDPlanHandler.cls
@@ -190,7 +190,6 @@
        List<OPDPlan__c> QX_OPDPlan = new List<OPDPlan__c>();
        //查询延期学会的OPDPlan
        List<OPDPlan__c> YQ_OPDPlan = new List<OPDPlan__c>();
        Set<ID> campaignIdSet = new Set<ID>(); // 20230120 ljh DB202301265636 add
        //SWAG-BVGAGD 20201119 you
        List<OPDPlan__c> oPDPlans = new List<OPDPlan__c>();
        // 需要更新的OPD计划的ID集合
@@ -240,19 +239,6 @@
        if (QX_List.size() > 0 && QX_List != null) {
            insert QX_List;
            // 20230120 ljh DB202301265636 start
            List<Rental_Apply_Equipment_Set__c> raesList = [select Id,Rental_End_Date__c from Rental_Apply_Equipment_Set__c where Rental_End_Date__c != null
                                AND Shippment_loaner_time2__c != null
                                AND Rental_Apply__r.RA_Status__c != '完了'
                                AND Rental_Apply__r.RA_Status__c != '取消'
                                AND Rental_Apply__r.Campaign__c = :campaignIdSet ];
            if (null != raesList && raesList.size() > 0) {
                for (Rental_Apply_Equipment_Set__c raes : raesList) {
                    raes.Rental_End_Date__c = Date.today().addDays(5);
                }
                update raesList;
            }
            // 20230120 ljh DB202301265636 end
        }
        // add by gzw OPDPlan__c 单独循环,否则OPDPlan_ImplementDate__c 会还原,报错 start
        if (targetIDSet.size() > 0) {