From 928399eceec50e3d37ea08669a12789a9410a9d2 Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 22 十一月 2022 16:51:16 +0800
Subject: [PATCH] 111

---
 force-app/main/default/classes/LostCancelReportHandler.cls |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/LostCancelReportHandler.cls b/force-app/main/default/classes/LostCancelReportHandler.cls
index 4d9cbe6..7a4d33c 100644
--- a/force-app/main/default/classes/LostCancelReportHandler.cls
+++ b/force-app/main/default/classes/LostCancelReportHandler.cls
@@ -177,7 +177,15 @@
         }// 20220720 ljh update
         //20220708 璇环浠诲姟寮�鍙戯紝缁撴潫澶卞崟浠诲姟鐘舵�侊紝绛涢�夐渶瑕佺殑淇敼鐨勫け鍗曚换鍔� end
 
-        List<PCLLostProduct__c> lcrList=[select id,PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c,PCLLostBrand__r.Lost_Reason_Sub__c,PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c,PCLLostBrand__r.Lost_cancel_report__r.LostType__c,PCLLostBrand__r.Lost_By_Company__c,PCLLostBrand__r.Lost_By_Company_Mannual__c,PCLLostBrand__r.LostPrice__c,LostProduct__r.Name, PCLLostBrand__r.Lost_reason_main__c,PCLLostBrand__r.Agency__r.Name,PCLLostBrand__r.AgencyMannual__c,PCLLostBrand__r.Lost_cancel_report__r.Opportunity__r.Name,Opportunity__c, LostProductMannual__c from PCLLostProduct__c where PCLLostBrand__r.Lost_cancel_report__c in : arrMap.keyset()];
+        List<PCLLostProduct__c> lcrList=[select id,PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c,
+                                        PCLLostBrand__r.Lost_Reason_Sub__c,PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c,
+                                        PCLLostBrand__r.Lost_cancel_report__r.LostType__c,PCLLostBrand__r.Lost_By_Company__c,
+                                        PCLLostBrand__r.Lost_By_Company_Mannual__c,PCLLostBrand__r.LostPrice__c,LostProduct__r.Name, 
+                                        PCLLostBrand__r.Lost_reason_main__c,PCLLostBrand__r.Agency__r.Name,PCLLostBrand__r.AgencyMannual__c,
+                                        PCLLostBrand__r.Lost_cancel_report__r.Opportunity__r.Name,Opportunity__c, LostProductMannual__c
+                                        ,ProductClass__c, Quantity__c   //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟
+                                        from PCLLostProduct__c 
+                                        where PCLLostBrand__r.Lost_cancel_report__c in : arrMap.keyset()];
         List<Opportunity> oppList=new List<Opportunity>();
         for (String lcro : arrMap.keyset()) {
             // 缁欎骇鍝佽祴鍊�
@@ -188,10 +196,27 @@
             // List<String> yyList=new List<String>();     //澶卞崟鍘熷洜
             //鍒濆鍖�
             Opportunity opp=new Opportunity();
+            //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 start
+            opp.RivalHostsNumber__c = 0;
+            System.debug('lt123鍒濆澶卞崟涓绘満鏁�'+ opp.RivalHostsNumber__c);
+            //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 end
             opp.Id=arrMap.get(lcro).Opportunity__c; opp.PCLLostBrands__c=''; opp.Agencies__c='';    //Id ,鍝佺墝,缁忛攢鍟�
             // for浜у搧
             for (PCLLostProduct__c lcr : lcrList) {
+                System.debug('lt123涓绘満111'+ lcr.ProductClass__c);
                 if (opp.Id==lcr.Opportunity__c) {
+
+                    //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 start
+                    System.debug('lt123涓绘満'+ lcr.ProductClass__c);
+                    if(lcr.ProductClass__c == '涓绘満'){
+                        opp.RivalHostsNumber__c += lcr.Quantity__c;
+                        System.debug('lt123绱姞澶卞崟涓绘満鏁�'+ opp.RivalHostsNumber__c);
+                    }else{
+                        opp.RivalHostsNumber__c += 0;
+                        System.debug('lt123涓嶅彉澶卞崟涓绘満鏁�'+ opp.RivalHostsNumber__c);
+                    }
+                    //20220930  lt SWAG-CHL5XA銆怓Y23璇环鏀瑰杽銆�-缁熻涓绘満鍙版暟 end
+
                     i++;
                     //缁欒浠蜂笉鍚屽瓧娈佃祴鍊� 澶卞崟
                     if (lcr.PCLLostBrand__r.Lost_cancel_report__r.LostType__c=='澶卞崟') {

--
Gitblit v1.9.1