Li Jun
2022-03-31 7db779f2a7cfb723463a81c0572f2b37475ee0e8
PIPL0331V2Deploy
4个文件已修改
127 ■■■■ 已修改文件
force-app/main/default/classes/NFM007Controller.cls 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM103Controller.cls 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/SimpleEventRegisterController.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AccountTargetTab.page 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM007Controller.cls
@@ -370,21 +370,7 @@
                            detail.PROCODE = '8888';
                        }
                        system.debug(' detail.PROCODE=='+detail.PROCODE);
                        //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy start
                        if(opp.Trade__c == '外貿'){
                            detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c+',';// 保修类别
                        }else{
                            Date nowDate = Date.today();
                            // Date baojidate = Date.valueOf('2022-4-1');
                            Date baojidate = Date.newInstance(2022,4,1);
                            if(baojidate<=nowDate){
                                detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c+',new';
                            }else{
                                detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c+',';
                            }
                        }
                        //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy end
                        // detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c;  // 保修类别
                        detail.GuaranteeType = promotionSalesProductsList.get(i).latestWarrantyType__c;  // 保修类别
                        if (!oldDate) {
                            if (promotionSalesProductsList.get(i).latestProvistonPeriod__c != null) {
                                detail.ProvistonPeriod = String.valueOf(promotionSalesProductsList.get(i).latestProvistonPeriod__c).leftPad(2,'0');
@@ -486,36 +472,9 @@
                            
                            //保修类别
                            if(oppLiList.get(i).latestWarrantyType__c != null){
                                //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy start
                                if(opp.Trade__c == '外貿'){
                                    detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c+',';// 保修类别
                                }else{
                                    Date nowDate = Date.today();
                                    // Date baojidate = Date.valueOf('2022-4-1');
                                    Date baojidate = Date.newInstance(2022,4,1);
                                    if(baojidate<=nowDate){
                                        detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c+',new';
                                    }else{
                                        detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c+',';
                                    }
                                }
                                //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy end
                                // detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c;  // 保修类别
                                detail.GuaranteeType = oppLiList.get(i).latestWarrantyType__c;  // 保修类别
                            }else{
                                //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy start
                                if(opp.Trade__c == '外貿'){
                                    detail.GuaranteeType = ',';
                                }else{
                                    Date nowDate = Date.today();
                                    Date baojidate = Date.newInstance(2022,4,1);
                                    if(baojidate<=nowDate){
                                        detail.GuaranteeType = ',new';
                                    }else{
                                        detail.GuaranteeType = ',';
                                    }
                                }
                                //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy end
                                // detail.GuaranteeType = null;
                                detail.GuaranteeType = null;
                            }
                            //计提金额
                            detail.GuaranteePrice = oppLiList.get(i).latestGuranteePrice__c;
@@ -533,20 +492,7 @@
                            // detail.GuaranteePeriod = null;
                            // detail.GuaranteeType = null;
                            //外贸多年保修未上线前 保修类别 传null
                            //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy start
                            if(opp.Trade__c == '外貿'){
                                detail.GuaranteeType = ',';
                            }else{
                                Date nowDate = Date.today();
                                Date baojidate = Date.newInstance(2022,4,1);
                                if(baojidate<=nowDate){
                                    detail.GuaranteeType = ',new';
                                }else{
                                    detail.GuaranteeType = ',';
                                }
                            }
                            //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy end
                            // detail.GuaranteeType = null;
                            detail.GuaranteeType = null;
                            //外贸多年保修未上线前  计提金额 传0 
                            detail.GuaranteePrice = 0;
                            //外贸多年保修未上线前 nodiscount 传0
@@ -560,20 +506,7 @@
                        //③decide在20191001 之前  老数据
                        else if(oldDate){
                            detail.GuaranteePeriod = null;
                            //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy start
                            if(opp.Trade__c == '外貿'){
                                detail.GuaranteeType = ',';
                            }else{
                                Date nowDate = Date.today();
                                Date baojidate = Date.newInstance(2022,4,1);
                                if(baojidate<=nowDate){
                                    detail.GuaranteeType = ',new';
                                }else{
                                    detail.GuaranteeType = ',';
                                }
                            }
                            //WLIG-CCT9UG 【委托】关于市场多年保计提金调整 fy end
                            // detail.GuaranteeType = null;
                            detail.GuaranteeType = null;
                            detail.ProvistonPeriod = null;
                            detail.GuaranteePrice = null;
                            detail.ServicePrice = null;
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 String QuotationDate;
        public Datetime 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,7 +394,8 @@
                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.formatDateTime2StrSprit(rpr.Delivered_Product__r.Backorder__r.Opportunity__r.SAP_Send_OK_Date__c).replaceAll('/', '');
                //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;
                //20220330 lt WLIG-CCT9UG 【委托】关于市场多年保计提金调整  end
                // 多年保修 LHJ Start
@@ -426,6 +427,10 @@
                }*/
                // 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;
@@ -492,7 +497,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
            }
@@ -593,18 +598,23 @@
            // 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
            //    PIHelper.PIIntegration NFM103AWS =PIHelper.getPIIntegrationInfo('NFM103');
            //    NFMUtil.response response =     NFMUtil.sendToPiAWS(rowDataStr, NFM103AWS.newUrl,NFM103AWS.token);
                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);
                //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/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.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)) {
                    } 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) {
                         taskType = System.Label.TargetAccountVisit; // 目标客户拜访任务
                    }  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')) {
                    }  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') {
                         taskType = System.Label.visitHLevel; // H层拜访任务
                    } else {
                        taskType = System.Label.DailyVisit;// 日程拜访任务
force-app/main/default/pages/AccountTargetTab.page
@@ -151,14 +151,9 @@
                            </td>
                        </tr>
                        <tr>
                            <!-- 20220331 lt 今年注残字段修改 3.6.位置互换 -->
                            <!-- <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.BO_Forecast_ThousandY__c.label}</td>
                            <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.BO_Forecast_ThousandY__c.label}</td>
                            <td style="text-align: center;">
                                <apex:outputField value="{!history.rec.BO_Forecast_ThousandY__c}" style="width:90%; text-align: right;" />
                            </td> -->
                            <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.Opportunity_ThousandY__c.label}</td>
                            <td style="text-align: center;">
                                <apex:outputField value="{!history.rec.Opportunity_ThousandY__c}" style="width:90%; text-align: right;" />
                            </td>
                            <td>{!$ObjectType.Account_Number_of_target__c.fields.RivalHostsProportion_first__c.label}</td>
                            <td style="text-align: center;">
@@ -190,14 +185,9 @@
                            <td ></td> -->
                        </tr>
                        <tr>
                            <!-- 20220331 lt 今年注残字段修改 3.6.位置互换 -->
                            <!-- <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.Opportunity_ThousandY__c.label}</td>
                            <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.Opportunity_ThousandY__c.label}</td>
                            <td style="text-align: center;">
                                <apex:outputField value="{!history.rec.Opportunity_ThousandY__c}" style="width:90%; text-align: right;" />
                            </td> -->
                            <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.BO_Forecast_ThousandY__c.label}</td>
                            <td style="text-align: center;">
                                <apex:outputField value="{!history.rec.BO_Forecast_ThousandY__c}" style="width:90%; text-align: right;" />
                            </td>
                            <td>{!$ObjectType.Account_Number_of_target__c.fields.AllHostsNumber__c.label}</td>
                            <td style="text-align: center;">