高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/NFM106Controller.cls
@@ -24,7 +24,18 @@
        public String QuotationAmount;
        public String ContractPeriod;
        public PaymentInformation_element[] PaymentInformation;
        //URF限次合同2期 LY 20220811 start
        public SeriesInformation_element[] SeriesInformation;
        //URF限次合同2期 LY 20220811 end
    }
    //URF限次合同2期 LY 20220811 start
    public class SeriesInformation_element {
        public String SeriesNo;
        public String RepairTime;
        public String SeriesAmount;
    }
    //URF限次合同2期 LY 20220811 end
    public class RepairContractLogin_element {
        public NFMUtil.Monitoring Monitoring;
        public GeneralData_element[] GeneralData;
@@ -66,6 +77,11 @@
                }
            }
        }
        //Repair测试类跳过 thh 20220401 start
        if(StaticParameter.EscapeNFM106Trigger){
            return;
        }
        //Repair测试类跳过 thh 20220401 end
        if (Trigger.isBefore) {
            if (Trigger.isUpdate) {
                for(Maintenance_Contract__c mc : newList) {
@@ -206,6 +222,14 @@
                    // LJPH-BS89NQ start
                    upload_to_sap_time__c
                     // LJPH-BS89NQ end
                    //URF限次合同2期 LY 20220811 start
                    ,Estimation_Id__r.Total_Number_Asset_P__c
                    ,Estimation_Id__r.URF_P_RepairTime__c
                    ,Estimation_Id__r.Estimate_List_Price_Sum_P__c
                    ,Estimation_Id__r.Total_Number_Asset_V__c
                    ,Estimation_Id__r.URF_V_RepairTime__c
                    ,Estimation_Id__r.Estimate_List_Price_Sum_V__c
                    //URF限次合同2期 LY 20220811 end
               from Maintenance_Contract__c where Id IN :mcIds];          // 削除データを検索しないはず、All ROWS いらないはず
            System.debug(Logginglevel.DEBUG, 'NFM106_ recptList.size()=' + mcList.size());
@@ -284,6 +308,23 @@
                }
                // HWAG-BE88UG 【委托】SFDC-SAP搭现有接口添加合同“付款计划”信息 by vivek end
                //URF限次合同2期 LY 20220811 start
                element.SeriesInformation = new List<SeriesInformation_element>();
                if(mc.Estimation_Id__r.Total_Number_Asset_P__c != null && mc.Estimation_Id__r.Total_Number_Asset_P__c != 0){
                    SeriesInformation_element seriesInformationP = new SeriesInformation_element();
                    element.SeriesInformation.add(seriesInformationP);
                    seriesInformationP.SeriesNo = 'P';
                    seriesInformationP.RepairTime = mc.Estimation_Id__r.URF_P_RepairTime__c.toPlainString();
                    seriesInformationP.SeriesAmount = mc.Estimation_Id__r.Estimate_List_Price_Sum_P__c.toPlainString();
                }
                if(mc.Estimation_Id__r.Total_Number_Asset_V__c != null && mc.Estimation_Id__r.Total_Number_Asset_V__c != 0){
                    SeriesInformation_element seriesInformationP = new SeriesInformation_element();
                    element.SeriesInformation.add(seriesInformationP);
                    seriesInformationP.SeriesNo = 'V';
                    seriesInformationP.RepairTime = mc.Estimation_Id__r.URF_V_RepairTime__c.toPlainString();
                    seriesInformationP.SeriesAmount = mc.Estimation_Id__r.Estimate_List_Price_Sum_V__c.toPlainString();
                }
                //URF限次合同2期 LY 20220811 end
                logstr += '[' + element.ContractNo + ']EndUserNoorAgentNo[' + element.EndUserNoorAgentNo + '] ';
            }