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

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

diff --git a/force-app/main/default/classes/lexNewQuoteEntryController.cls b/force-app/main/default/classes/lexNewQuoteEntryController.cls
index 639c60b..83a5f0e 100644
--- a/force-app/main/default/classes/lexNewQuoteEntryController.cls
+++ b/force-app/main/default/classes/lexNewQuoteEntryController.cls
@@ -117,6 +117,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 
@@ -213,6 +216,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 
@@ -1349,6 +1355,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;
@@ -1437,6 +1446,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      
                       + ' , Product2.Estimated_ConsumptionDueDate__c '
                       //DB202312560765 you 鍚︽湁EndoRapid璧勮川妫�鏌� start 
                       + ' , Product2.IFEndoRapidFlag__c '
@@ -1549,6 +1561,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
@@ -1609,7 +1624,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
@@ -1635,7 +1652,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
@@ -1791,6 +1810,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
@@ -1834,7 +1856,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
@@ -1857,7 +1881,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
@@ -2469,6 +2495,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;
@@ -2482,6 +2513,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;
@@ -2560,6 +2597,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;
@@ -2694,13 +2737,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