From bf5e69983efb1512d2d828c2304d77c0ddc080d2 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 24 五月 2024 13:32:49 +0800
Subject: [PATCH] 1

---
 force-app/main/default/classes/lexSINewQuoteEntryController.cls |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 53 insertions(+), 5 deletions(-)

diff --git a/force-app/main/default/classes/lexSINewQuoteEntryController.cls b/force-app/main/default/classes/lexSINewQuoteEntryController.cls
index 1ee40f9..02b14b4 100644
--- a/force-app/main/default/classes/lexSINewQuoteEntryController.cls
+++ b/force-app/main/default/classes/lexSINewQuoteEntryController.cls
@@ -118,6 +118,9 @@
            //chenjingwu DB202308355043 2023.8.25 start
            ,PricebookEntry.Product2.Category5__c
            //chenjingwu DB202308355043 2023.8.25 end
+           // sp涓绘満绫诲瀷 cjw start
+           ,PricebookEntry.Product2.ProductCategory__c
+           // sp涓绘満绫诲瀷 cjw end
            ,Quote.Opportunity.Trade__c 
            ,PricebookEntry.Product2.Estimated_ConsumptionDueDate__c
            //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
@@ -215,6 +218,9 @@
                ,PricebookEntry.Product2.NoDiscount_Foreign__c
               ,PricebookEntry.Product2.Estimated_ConsumptionDueDate__c
               ,PricebookEntry.Product2.Category5__c
+              // sp涓绘満绫诲瀷 cjw start
+              ,PricebookEntry.Product2.ProductCategory__c
+              // sp涓绘満绫诲瀷 cjw end
               //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
               ,PricebookEntry.Product2.IFEndoRapidFlag__c
               //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end 
@@ -1403,6 +1409,9 @@
             if (s.Asset_Model != null && s.Asset_Model != '') {
               if (s.pageObject.PricebookEntryId != null) {
                 ol = New OpportunityLineItem();
+                // chenjingwu Sp涓绘満绫诲瀷 20240318 start
+                ol.SP_Assistant__c = s.SPAssistant;
+                // chenjingwu Sp涓绘満绫诲瀷 20240318 end                
                 ol.OpportunityId = oppid;
                 ol.Id__c = s.pageObject.Id__c;
                 // ol.SFDA_Status__c = s.pageObject.SFDA_Status__c;
@@ -1492,6 +1501,9 @@
                       //chenjingwu DB202308355043 2023.8.25 start
                       + ' , Product2.Category5__c '
                       //chenjingwu DB202308355043 2023.8.25 end
+                      //sp涓绘満 cjw 20240319 start
+                      + ' , Product2.ProductCategory__c '
+                      //sp涓绘満 cjw 20240319  end                      
                       //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                       + ' , Product2.IFEndoRapidFlag__c '
                       //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end 
@@ -1600,6 +1612,9 @@
                                //chenjingwu DB202308355043 2023.8.25 start
                                ,Category5__c
                                //chenjingwu DB202308355043 2023.8.25 end
+                              //sp涓绘満 cjw 20240411 start
+                              ,ProductCategory__c
+                              ///sp涓绘満 cjw 20240411 end  
                               ,Estimated_ConsumptionDueDate__c
                               //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                               ,IFEndoRapidFlag__c
@@ -1660,7 +1675,9 @@
                              //chenjingwu DB202308355043 2023.8.25 start
                              , prd.Category5__c
                              //chenjingwu DB202308355043 2023.8.25 end
-                             
+                            //sp涓绘満 cjw 20240411 start
+                            ,prd.ProductCategory__c
+                            //sp涓绘満 cjw 20240411 end
                              //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                              ,prd.IFEndoRapidFlag__c
                              //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end
@@ -1685,7 +1702,9 @@
                              , prd.Maintenance_Price_Year__c
                              //chenjingwu DB202308355043 2023.8.25 start
                              , prd.Category5__c
-                             
+                             //sp涓绘満 cjw 20240411 start
+                              ,prd.ProductCategory__c
+                              //sp涓绘満 cjw 20240411 end
                              //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                              ,prd.IFEndoRapidFlag__c
                              //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end
@@ -1850,6 +1869,9 @@
                          //chenjingwu DB202308355043 2023.8.25 start
                          ,Category5__c
                          //chenjingwu DB202308355043 2023.8.25 end
+                          //sp涓绘満 cjw 20240411 start
+                          ,ProductCategory__c
+                          //sp涓绘満 cjw 20240411 end
                         ,Estimated_ConsumptionDueDate__c
                         //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                         ,IFEndoRapidFlag__c
@@ -1892,7 +1914,9 @@
                            //chenjingwu DB202308355043 2023.8.25 start
                            , prd.Category5__c
                            //chenjingwu DB202308355043 2023.8.25 end
-                           
+                           //sp涓绘満 cjw 20240411 start
+                          ,prd.ProductCategory__c
+                          //sp涓绘満 cjw 20240411 end
                            //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                            ,prd.IFEndoRapidFlag__c
                            //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end
@@ -1915,7 +1939,9 @@
                            //chenjingwu DB202308355043 2023.8.25 start
                            , prd.Category5__c
                            //chenjingwu DB202308355043 2023.8.25 end
-                           
+                           //sp涓绘満 cjw 20240411 start
+                          ,prd.ProductCategory__c
+                          //sp涓绘満 cjw 20240411 end
                            //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                            ,prd.IFEndoRapidFlag__c
                            //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end
@@ -2661,6 +2687,11 @@
       public Decimal ProductGuranteePrice;
       public decimal Maintenance_Price_Year;
       public String Category5;
+      // chenjingwu sp涓绘満绫诲瀷 20240318 start  
+      public String SPAssistant;
+      public Boolean SPAssistantFlag;
+      public String ProductCategory;
+      // chenjingwu sp涓绘満绫诲瀷 20240318 end      
       public QELine(){}
       public QELine(QuoteLineItem qli, Integer i, String copyQuoId) {
           this.lineNo = i;
@@ -2674,6 +2705,12 @@
           //chenjingwu DB202308355043 2023.8.25 start
           Category5 = qli.PricebookEntry.Product2.Category5__c;
           //chenjingwu DB202308355043 2023.8.25 end
+          // chenjingwu SP涓绘満绫诲瀷 20240318 start
+          this.ProductCategory = qli.PricebookEntry.Product2.ProductCategory__c;
+          if(qli.PricebookEntry.Product2.ProductCategory__c == 'SP涓绘満'){
+            this.SPAssistantFlag = true;
+          }
+          // chenjingwu SP涓绘満绫诲瀷 20240318 end
           this.Asset_Model = qli.Asset_Model_No__c;
           if (qli.Cost__c > 0 && qli.Quantity > 0) {
             this.Cost_Subtotal_c = qli.Cost__c * qli.Quantity;
@@ -2752,6 +2789,12 @@
         if (oli.PricebookEntry.Product2.Packing_list_manual__c != null) {
           this.Specifications = integer.valueof(oli.PricebookEntry.Product2.Packing_list_manual__c + '');
         }
+        // chenjingwu SP涓绘満绫诲瀷 20240318 start
+        if(oli.SP_Assistant__c != null || oli.PricebookEntry.Product2.ProductCategory__c == 'SP涓绘満'){
+          this.SPAssistant = oli.SP_Assistant__c;
+          this.SPAssistantFlag = true;
+        }
+        // chenjingwu SP涓绘満绫诲瀷 20240318 end        
         pageObject.Id__c = oli.PricebookEntry.Product2Id;
         pageObject.UnitPrice_Page__c = oli.UnitPrice__c;
         pageObject.AgencySubtotal__c = oli.AgencySubtotal__c;
@@ -2886,13 +2929,18 @@
                 //chenjingwu DB202308355043 2023.8.25 start
                 ,String Category5
                 //chenjingwu DB202308355043 2023.8.25 end
-                
+                //sp涓绘満绫诲瀷 cjw  20240411 start
+                ,String ProductCategory
+                //sp涓绘満绫诲瀷 cjw  20240411 end
                 //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                 ,Boolean IFEndoRapidFlag
                 //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� end
                ) {
           pageObject = New QuoteLineItem();
           pageObject.Quantity__c = Quantity;
+          //sp涓绘満绫诲瀷 cjw  20240411 start
+          this.ProductCategory = ProductCategory;
+          //sp涓绘満绫诲瀷 cjw  20240411 start
           this.lineNo = i;
           this.Asset_Model = Asset_Model;
           this.Sales_Possibility = Sales_Possibility_c;

--
Gitblit v1.9.1