Li Jun
2022-03-31 1b8c8764c39fc546ca1b85ff1810ae51be74331c
PIPL0331V2Deploy
7个文件已修改
75 ■■■■ 已修改文件
force-app/main/default/classes/FixtureRentalPDFController.cls 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LeadIntentionController.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LeadIntentionControllerTest.cls 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM103Controller.cls 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM503InfoFileBatch.cls 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/SimpleEventRegisterController.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/triggers/Repair.trigger 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/FixtureRentalPDFController.cls
@@ -35,14 +35,14 @@
    public string staticResourceFile { get; private set; }
    public Boolean addFlag { get; private set; }//敏感地址使用标记
    public String qrcode { get; private set; }
    public String barcode { get; private set; }
    public FixtureRentalPDFController() {
        pageNum = Integer.valueOf(ApexPages.currentPage().getParameters().get('page'));
        rentalApplyIdIMG = ApexPages.currentPage().getParameters().get('raid');
        //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8');
        // rentalApplyId = ApexPages.currentPage().getParameters().get('raid');//20201120 ljh 
        String tempStr = ApexPages.currentPage().getParameters().get('raid');
        staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Rental_Apply__c'));
        staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
        addFlag = false;
        rentalApplyId = new List<String>();
        if(tempStr != null){
@@ -56,6 +56,8 @@
    // 画面初始化
    public void init() {
        staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Rental_Apply__c'));
        staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
        // 新规奥林巴斯备品签收单PDF画面初始化
        PageCutList = new List<List<String>>();
        List<Rental_Apply__c> ApplyList = new List<Rental_Apply__c>();
@@ -115,6 +117,7 @@
        if(ApplyList.size()>0){
            ApplyHeadShow = ApplyList[0];
            qrcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.QRId__c);
            barcode = ConsumTrialPDFController.GetImageBase64(ApplyHeadShow.BRId__c);
        }
        //增加借出备品SET一览List,为了获取借出备品SET一览明细
        List<String> RAESSearchList = New List<String>();
force-app/main/default/classes/LeadIntentionController.cls
@@ -258,7 +258,7 @@
            List<Inquiry_form__c> updateInquiryform = new List<Inquiry_form__c>();
            Inquiry_form__c inquiryForm = new Inquiry_form__c();
            inquiryForm.Id = inquiryformId;
            inquiryForm.Status__c = '不需要';
            inquiryForm.Status__c = '02.不需要';
            //不需要的时候 的确认日期
            system.debug('ccccccc:'+opp_ID);
            inquiryForm.Confirmation_Date__c = Date.toDay();
@@ -296,7 +296,7 @@
                  system.debug('输出的值为:'+oi.reasonFlg);  
                if (oi.reasonFlg == '1') {
                    oi.reasonFlg = '0';
                    oi.rec.Status__c = '不需要';
                    oi.rec.Status__c = '02.不需要';
                    oi.rec.Reasons_options__c=batchReason;
                    oi.rec.Cancel_Reason__c = batchReason;
                    oi.rec.Confirmation_Date__c = Date.toDay();
force-app/main/default/classes/LeadIntentionControllerTest.cls
@@ -1,5 +1,11 @@
@isTest
private class LeadIntentionControllerTest {
    @testSetup
    static void setUp(){
        TestDataUtility.CreatePIPolicyConfigurations( new string[]{'Inquiry_form__c'});
    }
    static testMethod void testMethod1() {
      //医院
      List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'];
@@ -62,7 +68,7 @@
        inquiryform.Family_Name__c ='靳';
        inquiryform.Opportunity_Division__c = '询价';
        inquiryform.Contact_Name__c = contact2.Id;
        inquiryform.Reasons_options__c  ='客户不需要';
        inquiryform.Reasons_options__c  ='已经有询价';
        inquiryform.Phone__c = '13844756322';
        inquiryform.Product1__c = '超声';
        inquiryform.Request1__c = '需要报价';
@@ -152,7 +158,7 @@
        inquiryform.Family_Name__c ='靳';
        inquiryform.Opportunity_Division__c = '询价';
        inquiryform.Contact_Name__c = contact2.Id;
        inquiryform.Reasons_options__c  ='客户不存在';
        inquiryform.Reasons_options__c  ='已经有询价';
        inquiryform.Phone__c = '13844756322';
        inquiryform.Product1__c = '超声';
        inquiryform.Request1__c = '需要报价';
force-app/main/default/classes/NFM103Controller.cls
@@ -104,11 +104,11 @@
        public String UpdateStatus;//直返修改标识
        //add by wangweipeng  2021/07/14   end
        //add pi 加密 sushanhu 20220222 start
        public String DataId;//AWS存储凭证
        //public String DataId;//AWS存储凭证
        //add pi 加密 sushanhu 20220222 end
        //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  start
        public Datetime QuotationDate;
        public String QuotationDate;
        //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  end
@@ -336,7 +336,7 @@
                                         ,Returns_Product_way__c    //返品方式
                                         ,FSE_ApplyForRepair_time__c    //申请修理时间
                                         //add by wangweipeng  2021/07/14   start
                                         ,AWS_Data_Id__c //add by sushanhu AWSDateID for PIPL
                                         //,AWS_Data_Id__c //add by sushanhu AWSDateID for PIPL
                                         //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  start
                                         ,Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c
                                         //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  end
@@ -394,8 +394,7 @@
                element.TradeType                 = NFMUtil.getMapValue(transferMap, 'Trade__c', rpr.Delivered_Product__r.Backorder__r.Opportunity__r.Trade__c, iflog);
                //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  start
                //element.QuotationDate                 = NFMUtil.getMapValue(transferMap, 'SAP_Send_OK_Date__c', rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c, iflog);
                element.QuotationDate = rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c;
                element.QuotationDate = NFMUtil.formatDateTime2StrSprit(rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c).replaceAll('/', '');
                //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  end
                // 多年保修 LHJ Start
@@ -427,10 +426,6 @@
                }*/
                // 2021-01-07  mzy  update  多年保修外贸NFM103接口修改  start
                String tradeType = rpr.Delivered_Product__r.Backorder__r.Opportunity__r.Trade__c;
                //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  start
                //Date QuotationDate = rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c;
                //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  end
                String NewProductGuaranteeObject = rpr.NewProductGuaranteeObject__c == null ? '':  rpr.NewProductGuaranteeObject__c;
@@ -497,7 +492,7 @@
                 element.UpdateStatus               = rpr.Address_type__c;    //申请修理时间
                 //add by wangweipeng  2021/07/14   end
                 //add pi 密文 sushanhu 20220222 start
                 element.DataId                     =rpr.AWS_Data_Id__c;//aws存储凭证
                 //element.DataId                     =rpr.AWS_Data_Id__c;//aws存储凭证
                 //add pi 密文 sushanhu 20220222 end
            }
@@ -598,23 +593,18 @@
            // NFM103修改Rest end
            // WLIG-BXQBH6 start
            // NFMUtil.response response =
            //     NFMUtil.sendToSapStatusAndBody(rowDataStr, NFMUtil.NFM103_ENDPOINT);
            NFMUtil.response response =
                NFMUtil.sendToSapStatusAndBody(rowDataStr, NFMUtil.NFM103_ENDPOINT);
                //update to aws 20220222 sushanhu start for PIPL
                NFMUtil.response res = NFMUtil.getAwsToken();
                String token=res.responseBody;
                if(String.isBlank(token)){
                    iflog.ErrorLog__c='NFM103'+'获取aws token 失败';
                }
                NFMUtil.response response =     NFMUtil.sendToPiAWS(rowDataStr, NFMUtil.NFM103_ENDPOINT,token);
            //    PIHelper.PIIntegration NFM103AWS =PIHelper.getPIIntegrationInfo('NFM103');
            //    NFMUtil.response response =     NFMUtil.sendToPiAWS(rowDataStr, NFM103AWS.newUrl,NFM103AWS.token);
                //update to aws 20220222 sushanhu end for PIPL
                status = response.status;
                system.debug('AWS Response status:'+status);
            ResponseBody = response.responseBody;
            //update to aws 20220302 sushanhu start for PIPL
            Map<String, Object> results = (Map<String, Object>)JSON.deserializeUntyped(ResponseBody);
            system.System.debug('NGM103 AWS result--'+ ResponseBody);
            // Map<String, Object> results = (Map<String, Object>)JSON.deserializeUntyped(ResponseBody);
            // system.System.debug('NGM103 AWS result--'+ ResponseBody);
            //update to aws 20220302 sushanhu end for PIPL
            NFM103Response NFM103Response = new NFM103Response();
            system.debug(ResponseBody);
force-app/main/default/classes/NFM503InfoFileBatch.cls
@@ -70,14 +70,15 @@
                timeslot = newTime.getTime() - oldTime.getTime();
            }
            // System.debug('++++1++++' + token + '  : ' + timeslot);
            PIHelper.piIntegration pi =PIHelper.getPIIntegrationInfo('NFM503');
            if (string.isblank(token) || timeslot > 1800000) {
                //UP TO AWAS TOKEN 20220225 SUSHANHU START
                NFMUtil.response response = NFMUtil.getAWSToken();
                //UP TO AWAS TOKEN 20220225 SUSHANHU END
                if (String.isBlank(response.responseBody)) {
                    bidInfoFile.ErrorMessage__c = '503token:' + response.status;
                }
                token = response.responseBody;
                // NFMUtil.response response = NFMUtil.getAWSToken();
                // //UP TO AWAS TOKEN 20220225 SUSHANHU END
                // if (String.isBlank(response.responseBody)) {
                //     bidInfoFile.ErrorMessage__c = '503token:' + response.status;
                // }
                token = pi.token;
                oldTime = Datetime.now();
                token503.NFM501_Token__c = token;
                oldTime503.NFM501_Gain_End_Time__c = oldTime;
@@ -93,7 +94,6 @@
            //UP TO NEW  AWS method sushanhu start 20220301
            // List< Tender_information__c> updateTenderList = new  List< Tender_information__c>();
            List<FileAddress__c> fileList = new List<FileAddress__c>();
            PIHelper.piIntegration pi =PIHelper.getPIIntegrationInfo('NFM503');
            transUrl =pi.searchUrl;
            NFMUtil.response response = NFMUtil.getAWSQLMData(pi.newUrl ,JSON.serialize(queryfileList), token);
            system.debug('aws result'+response.responseBody);
force-app/main/default/classes/SimpleEventRegisterController.cls
@@ -1050,9 +1050,9 @@
                        taskType = System.Label.OpportunityFollow; // 询价跟进任务
                    } else if (this.targetEvent.OPDPlan_Flag__c) {
                        taskType = System.Label.OPD; // OPD任务
                    } else if (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account_Energy__c == 1 || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account__c == 1) {
                    } else if (!accToNumTarget.isEmpty() && !accToDepMap.isEmpty() && (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account_Energy__c == 1 || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account__c == 1)) {
                         taskType = System.Label.TargetAccountVisit; // 目标客户拜访任务
                    }  else if (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H1' || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H0') {
                    }  else if (!accToNumTarget.isEmpty() && !accToDepMap.isEmpty() && (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H1' || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H0')) {
                         taskType = System.Label.visitHLevel; // H层拜访任务
                    } else {
                        taskType = System.Label.DailyVisit;// 日程拜访任务
force-app/main/default/triggers/Repair.trigger
@@ -18,11 +18,11 @@
    //wangweipeng  20210727   end
    if ((Trigger.isAfter && Trigger.isInsert) || (Trigger.isAfter && Trigger.isUpdate) || (Trigger.isAfter && Trigger.isDelete)) {
        if(!(System.isFuture()||System.isBatch())){// Add By Lijun 20220303 to avoid mutiple execute
        // if(!(System.isFuture()||System.isBatch())){// Add By Lijun 20220303 to avoid mutiple execute
            NFM103Controller.NFM103Trigger(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
            NFM603Controller.NFM603Trigger(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
            RepairTrigger.UpdateAssert(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
        }
        // }
    }
    // ----------------------------------------------------------------------
    // ここより、修理のサービスコントラクト項目を自動的に更新するロジック