From ae3dbaacd49b295337c5c53dbf5cf732898ed6f8 Mon Sep 17 00:00:00 2001 From: GWY <guweiyiscp096@foxmail.com> Date: 星期四, 17 三月 2022 09:49:00 +0800 Subject: [PATCH] PJ1降类修复 --- force-app/main/default/classes/SearchProductController.cls | 410 +++++++++++++++++++++++++++++++++------------------------ 1 files changed, 237 insertions(+), 173 deletions(-) diff --git a/force-app/main/default/classes/SearchProductController.cls b/force-app/main/default/classes/SearchProductController.cls index 09d65d9..5c897e9 100644 --- a/force-app/main/default/classes/SearchProductController.cls +++ b/force-app/main/default/classes/SearchProductController.cls @@ -1,4 +1,7 @@ -public virtual class SearchProductController { +public with sharing class SearchProductController { + + public Integer quoteEntryMaxSet {get; private set;} + public List<ProductLine> cl {get;set;} public Boolean getHascl() { Boolean rtn = true; @@ -9,19 +12,84 @@ } public String searchMode; // 妞滅储銉€兗銉� - public String trade {get;set;} // hidden闋呯洰銇嬨倝銈傘倝銇c仧 CNY 銇� USD 銇枃瀛楀垪 + public String openFlag {get;set;} // 瑕敾闈lag public String lineNo {get;set;} // 瑕敾闈€伄閬告姙銇椼仧琛� - public String val {get;set;} // 瑕敾闈€伄銇嬨倝銇绱㈡枃瀛楀垪 - + public String val {get;set;} + public String setStr {get;set;} + public String oppId {get;set;} // 瑕敾闈€伄銇嬨倝銇绱㈡枃瀛楀垪 public String SearchName {get;set;} // 妞滅储鏂囧瓧鍒� + public String baseUrl { get; set; } + public String productSetVal {get;set;} + public boolean oppflg {get;set;} + + public String productSegment {get;set;} + + public String openType {get;set;} + + public List<SelectOption> productSet { get; set; } + + public boolean is_hidden_user { get; set; } + public boolean is_dealer_user { get; set; } + + public Boolean is_hidden_all { get; set; } + + public Boolean specialDealer { get; set; } public SearchProductController(ApexPages.StandardController controller){ this(); } + public SearchProductController() { -// this.trade = Apexpages.currentPage().getParameters().get('trade'); + this.quoteEntryMaxSet = Integer.valueOf(System.Label.QuoteEntryMaxSet); + //XHL-20190428-UpdateStart + //this.productSetVal = Apexpages.currentPage().getParameters().get('set'); + //if (productSetVal!=null || productSetVal!=''){ + //} else { + // this.productSetVal = '鍗曞搧'; + //} + //XHL-20190428-UpdateEnd + is_hidden_user = false; + // String profileid = UserInfo.getProfileId().subString(0,15); + + //鏂扮殑鑾峰彇绠�妗D calendarUtil.getMemberProfileID 杩欓噷鐢ㄥ埌鐨勪汉鍛業D 鍜岃幏鍙栧埌鐨勭畝妗D閮芥槸15浣嶇殑 + String new_profileId = calendarUtil.getMemberProfileID(UserInfo.getUserId().subString(0,15)); + + if (new_profileId.substring(0, 15) == System.Label.RT_BS_No_Price) { + is_hidden_user = true; + } + is_dealer_user = false; + if (UserInfo.getUserType() == 'PowerPartner') { + is_dealer_user = true; + } + + //XHL-20190428-UpdateStart + //this.productSet = new List<SelectOption>(); + //this.productSet.add(new SelectOption('鍗曞搧','鍗曞搧')); + //this.openType = Apexpages.currentPage().getParameters().get('openType'); + //if (openType == 'service') { + // this.productSet.add(new SelectOption('set01','闆朵欢璐圭敤')); + // this.productSet.add(new SelectOption('set02','缁翠慨璐�')); + // this.productSet.add(new SelectOption('set03','鍏朵粬璐圭敤')); + //} else { + // for (Integer i = 0; i < this.quoteEntryMaxSet; i++) { + // if (i < 9) { + // this.productSet.add(new SelectOption('set0'+ String.valueOf(i+1),'濂楄0'+ String.valueOf(i+1))); + // } else { + // this.productSet.add(new SelectOption('set'+ String.valueOf(i+1),'濂楄'+ String.valueOf(i+1))); + // } + // } + //} + //XHL-20190428-UpdateEnd + this.openFlag = Apexpages.currentPage().getParameters().get('openFlag'); this.lineNo = Apexpages.currentPage().getParameters().get('lineno'); this.val = Apexpages.currentPage().getParameters().get('val'); + this.oppId = Apexpages.currentPage().getParameters().get('oppId'); + + if (openFlag == 'opp') { + oppflg = false; + } else { + oppflg = true; + } if (val!=null && val!=''){ SearchName = val; @@ -31,197 +99,193 @@ cl = new List<ProductLine>(); } - public PageReference serContact(){ - - String x = '脳'; - String searchSql = 'select Id,Product2Id,Product2.Name,Product2.ProductCode,Product2.StorageStatus__c,Product2.OT_CODE_no_link__c, Product2.Alternative_Products__c, ' - + 'Product2.Foreign_Trade_Cost_US__c, Product2.Foreign_Trade_List_US__c, Product2.Intra_Trade_Cost_RMB__c, Product2.Intra_Trade_List_RMB__c, ' - + 'Product2.Asset_Model_No__c, Product2.Serial_Lot_No__c, Product2.Sales_Possibility__c, Product2.Estimation_Entry_Possibility__c, ' - + 'Product2.SFDA_Status__c, Product2.Qty_Unit__c, Product2.BSSCategory__c, Product2.Asset_loaner_category__c, Product2.Packing_list_manual__c ' - // 澶氬勾淇濅慨 start - + ' ,Product2.Extend_new_product_gurantee_MD__c , Product2.Extend_new_product_gurantee__c , Product2.Entend_gurantee_period_all__c , ' - + ' Product2.Intra_Trade_Gurantee_RMB__c ' - //澶栬锤澶氬勾淇� 鍙栦骇鍝佷富鏁版嵁涓婄殑澶栬锤閲戦鍙婃姤浠� 绮剧悽鎶�鏈� wql 2021/01/04 start - + ',Product2.Intra_Trade_Foreign_RMB__c,Product2.NoDiscount_Foreign__c,Product2.Repair_Contract_USD__c ' - //澶栬锤澶氬勾淇� 鍙栦骇鍝佷富鏁版嵁涓婄殑澶栬锤閲戦鍙婃姤浠� 绮剧悽鎶�鏈� wql 2021/01/04 end - //+ ' , Product2.If_Consumable__c ' - //澧炲姞浜у搧涓嶅彲鍙栨秷澶氬勾淇濋�昏緫 绮剧悽鎶�鏈� wql 2020/09/02 start 闃胯タ璧涘 2020/12/29 start - + ' , Product2.Intra_Trade_Service_RMB__c,Product2.CanNotCancelledGurantee__c,Product2.Is_DangerousChemicals__c ' - //澧炲姞浜у搧涓嶅彲鍙栨秷澶氬勾淇濋�昏緫 绮剧悽鎶�鏈� wql 2020/09/02 end 闃胯タ璧涘 2020/12/29 end - + ' , Product2.GuranteeType__c , product2.VenderName__c , product2.Maintenance_Price_Year__c ' - // 澶氬勾淇濅慨 end - - //SFDC鍋滄棰勮锛堥璁℃秷鑰楀埌鏈熸棩锛� lt 20210929 add start - + ' , Product2.Estimated_ConsumptionDueDate__c ' - //SFDC鍋滄棰勮锛堥璁℃秷鑰楀埌鏈熸棩锛� lt 20210929 add end - - + 'FROM PricebookEntry '; - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 Start - - //娉ㄩ噴鍘熸潵閫昏緫 - String whereStr = 'Where Product2.Asset_Model_No__c != null And Product2.Manual_Entry__c = false And Product2.Estimation_Entry_Possibility__c !=' + '\'' + x + '\' ' - // String whereStr = 'Where Product2.Asset_Model_No__c != null And Product2.Manual_Entry__c = false ' - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 end - + 'AND CurrencyIsoCode =' + '\'' + String.escapeSingleQuotes(trade) + '\' ' - + 'AND IsActive = true '; - String whereSql = ''; - if (searchMode == 'CS') { - whereSql += 'and Product2.Asset_loaner_category__c = \'涓鸿�楁潗绠$悊\' '; + public void init () { + system.debug('init==========> start'); + system.debug('SearchName==========>' + SearchName); + if (SearchName != null && SearchName != '') { + serContact(); } + + system.debug('init==========> end'); + + } + + public PageReference serContact(){ + //is_hidden_all = false; + is_hidden_all = true; + List<Opportunity> oppList = [select Id,DealerId__c,RecordTypeId,CurrencyIsoCode,Pricebook2Id,ProductSegment__c,Machine_Parts__c,SalesChannel__c From Opportunity where Id = :oppid]; + //List<Opportunity> oppList = [select Id,DealerId__c,RecordTypeId,CurrencyIsoCode,Pricebook2Id,ProductSegment__c,Machine_Parts__c,SalesChannel__c,DealerId__c From Opportunity where Id = :oppid]; + //is_hidden_all = StaticParameter.specialDealerMap.containsKey(oppList[0].DealerId__c); + //is_hidden_all = !StaticParameter.specialDealerMap.containsKey(oppList[0].DealerId__c); + is_hidden_all = !IfspecialDealer(oppList[0].DealerId__c); + system.debug('is_hidden_all---->'+is_hidden_all); + String sCurrencyIsoCode = oppList[0].CurrencyIsoCode; + String sPricebook2Id = oppList[0].Pricebook2Id; + String sProductSegment = oppList[0].ProductSegment__c; + productSegment = oppList[0].ProductSegment__c; + boolean is_Parts_direct = false; + boolean is_Replacement = false; + if(oppList[0].RecordTypeId == System.Label.SSBD_Replacement){ + is_Replacement = true; + } + if (oppList[0].Machine_Parts__c == 'Parts' && oppList[0].SalesChannel__c == 'direct') { + is_Parts_direct = true; + } + //if(StaticParameter.specialDealerMap.containsKey(oppList[0].DealerId__c)){ + if(IfspecialDealer(oppList[0].DealerId__c)){ + is_hidden_user = true; + specialDealer = true; + } + system.debug('sCurrencyIsoCode==========>' + sCurrencyIsoCode); + system.debug('sPricebook2Id==========>' + sPricebook2Id); + + String searchSql = 'select Id,Product2Id,SalesPrice__c,SalesPriceA__c,SalesPriceB__c,SalesPriceC__c,CostPrice__c,Pricebook2Id,Product2.ProductModels__c,Hidden_flag__c from PricebookEntry'; + //20191113-XHL---Start-灏嗕骇鍝佺姸鎬�(ProductStatus__c)鐢ㄤ骇鍝佺姸鎬�(鍏紡)(ProductStatusFormula__c)鏇挎崲 + //String whereStr = ' Where (Product2.ProductModels__c = true or (SalesPrice__c > 0 and (CostPrice__c > 0 or Product2.Dummy__c = true))) and Product2.ProductStatus__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode'; + String whereStr = ''; + if(is_Replacement){ + boolean temp = !is_Replacement; + whereStr = ' Where (Product2.ProductModels__c = true or (SalesPrice__c > 0 and (CostPrice__c > 0 or Product2.Dummy__c = true))) and Product2.ProductStatusFormula__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode and Product2.isMain__c =:temp'; + //20191113-XHL---End-灏嗕骇鍝佺姸鎬�(ProductStatus__c)鐢ㄤ骇鍝佺姸鎬�(鍏紡)(ProductStatusFormula__c)鏇挎崲 + //String whereStr = ' Where (Product2.ProductModels__c = true or (SalesPrice__c > 0)) and Product2.ProductStatus__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode'; + + }else{ + whereStr = ' Where (Product2.ProductModels__c = true or (SalesPrice__c > 0 and (CostPrice__c > 0 or Product2.Dummy__c = true))) and Product2.ProductStatusFormula__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode '; + //20191113-XHL---End-灏嗕骇鍝佺姸鎬�(ProductStatus__c)鐢ㄤ骇鍝佺姸鎬�(鍏紡)(ProductStatusFormula__c)鏇挎崲 + //String whereStr = ' Where (Product2.ProductModels__c = true or (SalesPrice__c > 0)) and Product2.ProductStatus__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode'; + + } + /*String whereStr = ' Where (Product2.ProductModels__c = true or (SalesPrice__c > 0 and (CostPrice__c > 0 or Product2.Dummy__c = true))) and Product2.ProductStatusFormula__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode and Product2.isReplacement__c =:is_Replacement'; + //20191113-XHL---End-灏嗕骇鍝佺姸鎬�(ProductStatus__c)鐢ㄤ骇鍝佺姸鎬�(鍏紡)(ProductStatusFormula__c)鏇挎崲 + //String whereStr = ' Where (Product2.ProductModels__c = true or (SalesPrice__c > 0)) and Product2.ProductStatus__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode';*/ + if (is_Parts_direct) { + //20191113-XHL---Start-灏嗕骇鍝佺姸鎬�(ProductStatus__c)鐢ㄤ骇鍝佺姸鎬�(鍏紡)(ProductStatusFormula__c)鏇挎崲 + //whereStr = ' Where Product2.ProductStatus__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode'; + whereStr = ' Where Product2.ProductStatusFormula__c = \'1\' and Pricebook2Id = :sPricebook2Id and CurrencyIsoCode = :sCurrencyIsoCode'; + //20191113-XHL---End-灏嗕骇鍝佺姸鎬�(ProductStatus__c)鐢ㄤ骇鍝佺姸鎬�(鍏紡)(ProductStatusFormula__c)鏇挎崲 + } + String whereSql = ' and Product2.ManualHidden__c = false ' ; if (SearchName != null && SearchName != '') { String likename = String.escapeSingleQuotes(SearchName); String prdcd = String.escapeSingleQuotes(SearchName); + String prdec = String.escapeSingleQuotes(SearchName); if (likename.indexOf('*') >= 0) { - // TODO escape銇�冮噺銇椼仸銇亜銇戙仼銆佸晱椤屻仾銇勩仺鎬濄亜銇俱仚銆備竴鏂囧瓧銇� _ 銇蹇溿伅銇勩倝銇亜銇ㄦ�濄亜銇俱仚銆� likename = likename.replace('*', '%'); } else { - // default涓″伌銇傘亜銇俱亜妞滅储 likename = '%' + likename + '%'; } - whereSql += 'and (Product2.Name Like ' + '\'' + likename + '\' or Product2.ProductCode = ' + '\'' + prdcd + '\' or Product2.Asset_Model_No__c Like ' + '\'' + likename + '\') '; - } - if (trade=='CNY') { - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 Start - - //娉ㄩ噴鍘熼�昏緫 - - // whereSql += 'and Product2.Intra_Trade_List_RMB__c > 0 and Product2.Intra_Trade_Cost_RMB__c > 0'; - whereSql += ''; - } else if(trade=='USD'){ - // whereSql += 'and Product2.Foreign_Trade_List_US__c > 0 and Product2.Foreign_Trade_Cost_US__c > 0'; - whereSql += ''; - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 end - } else { - system.debug(' trade = '+ trade); + if (prdcd.indexOf('*') >= 0) { + prdcd = prdcd.replace('*', '%'); + } else { + prdcd = '%' + prdcd + '%'; + } + if (prdec.indexOf('*') >= 0) { + prdec = prdcd.replace('*', '%'); + } else { + prdec = '%' + prdec + '%'; + } + whereSql += ' and (Product2.Name Like ' + '\'' + likename + '\' or Product2.ProductCode Like ' + '\'' + prdcd + '\' or Product2.Product_ECCode__c like ' + '\'' + prdec + '\')'; } searchSql = searchSql + whereStr + whereSql; - - //20211123 lt update 450 鍘�500 - searchSql += ' order by Product2.Asset_Model_No__c Limit 450'; + searchSql += ' order by Product2.ProductModels__c desc, Product2.ProductCode limit 200'; System.debug('searchSql::::::' + searchSql); - System.debug('whereStr::::::' + whereStr); - System.debug('whereSql::::::' + whereSql); - // system.debug(searchSql); + List<PricebookEntry> pbes = Database.query(searchSql); - cl = new List<ProductLine>(); - for (Integer i = 0; i < pbes.size(); i++) { - ProductLine pl = new ProductLine(i, pbes[i]); - cl.add(pl); - } + System.debug('pbes::::::' + pbes); + + if (pbes.size() > 0) { + + List<String> forSelect = new List<String>(); + + for (PricebookEntry pbe : pbes) { + forSelect.add(pbe.Product2Id); + } + + System.debug('forSelect::::::' + forSelect); + + List<Product_Search__c> productSearchList = [select Id,Name,ProductCode__c,Product_ECCode__c,ProductModels1__c, ProductDescription__c,ProductStatus__c,Product__c + from Product_Search__c + where Product__c in : forSelect]; + + System.debug('productSearchList::::::' + productSearchList); + + Map<String, Product_Search__c> tempMap = new Map<String, Product_Search__c>(); + + for (Product_Search__c productSearch : productSearchList) { + tempMap.put(productSearch.Product__c, productSearch); + } + + System.debug('tempMap::::::' + tempMap); + + Integer lineNo = 0; + cl = new List<ProductLine>(); + for (Integer i = 0; i < pbes.size(); i++) { + System.debug('tempMap.get(pbes[i].Product2Id)::::::' + tempMap.get(pbes[i].Product2Id)); + Product_Search__c ps = tempMap.get(pbes[i].Product2Id); + if (ps != null) { + if (pbes[i].SalesPrice__c == null) { + ProductLine pl = new ProductLine(lineNo, ps, pbes[i].Id,'0.00','0.00','0.00','0.00',pbes[i].Pricebook2Id,pbes[i].Hidden_flag__c); + cl.add(pl); + } else { + ProductLine pl = new ProductLine(lineNo, ps,pbes[i].Id, + String.valueOf(pbes[i].SalesPrice__c), + String.valueOf(pbes[i].SalesPriceA__c), + String.valueOf(pbes[i].SalesPriceB__c), + String.valueOf(pbes[i].SalesPriceC__c), + pbes[i].Pricebook2Id, + pbes[i].Hidden_flag__c); + if (is_hidden_user == true || is_dealer_user == true && pl.hiddenflg == true) { + pl.salespriceR = '0.00'; + } + cl.add(pl); + } + + lineNo++; + // 鏈�澶氭樉绀�100鏉� + if (lineNo >= 100) { + break; + } + } + } + } return null; } + public static Boolean IfspecialDealer(String oppDealerId){ + if (String.isBlank(oppDealerId)) { + return false; + } + //return StaticParameter.specialDealerMap.containsKey(oppDealerId.substring(0,15)); + return StaticParameter.specialDealerMap.containsKey(oppDealerId.substring(0,15)) && UserInfo.getUserType() == 'PowerPartner'; + } + public class ProductLine { public Integer idx {get; set;} - public PricebookEntry pbe {get; set;} - public Decimal Intra_Trade_Cost_RMB {get; set;} - public Decimal Foreign_Trade_Cost_US {get; set;} - public String NameCode {get; set;} - public String Sales_Possibility {get; set;} - public String Bsscategory {get; set;} - public String Product_Id {get; set;} - public String PricebookEntryId {get; set;} - public Decimal Packing_list_manual { get; set; } - // 澶氬勾淇濅慨 start - public string GuranteeType {get;set;} - public Decimal Entend_gurantee_period_all { get; set; } - public Decimal Intra_Trade_Gurantee_RMB { get; set; } - public Decimal Intra_Trade_Service_RMB { get; set; } - //2021/01/06 liying start - public Decimal NoDiscount_Foreign {get; set;} - //2021/01/06 liying end - public string VenderName {get; set;} - public decimal Maintenance_Price_Year {get; set; } - - //澶栬锤澶氬勾淇� 鍙栦骇鍝佷富鏁版嵁涓婄殑澶栬锤閲戦浠ュ強缁翠慨鍚堝悓鎶ヤ环 绮剧悽鎶�鏈� wql 2021/01/04 start - public Decimal Intra_Trade_Gurantee_USD { get; set; } - public Decimal Intra_Trade_Service_USD { get; set; } - public decimal Maintenance_Price_Year_USD {get; set; } - //澶栬锤澶氬勾淇� 鍙栦骇鍝佷富鏁版嵁涓婄殑澶栬锤閲戦浠ュ強缁翠慨鍚堝悓鎶ヤ环 绮剧悽鎶�鏈� wql 2021/01/04 end - - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 Start - //鏄惁鐧诲綍鎶ヤ环 - public boolean Estimation_Entry_Possibility {get; set; } - //鎴愭湰鏄惁涓虹┖ - public boolean CostFlag {get; set; } - - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 end - - //澧炲姞浜у搧涓嶅彲鍙栨秷澶氬勾淇濋�昏緫 绮剧悽鎶�鏈� wql 2020/09/02 start - public boolean CanNotCancelledGurantee {get; set;} - //澧炲姞浜у搧涓嶅彲鍙栨秷澶氬勾淇濋�昏緫 绮剧悽鎶�鏈� wql 2020/09/02 end - - //澧炲姞闃胯タ璧涘閫昏緫 绮剧悽鎶�鏈� wql 2020/12/29 start - public boolean Is_DangerousChemicals {get; set;} - //澧炲姞闃胯タ璧涘閫昏緫 绮剧悽鎶�鏈� wql 2020/12/29 end - - - // 澶氬勾淇濅慨 end - public ProductLine(Integer i, PricebookEntry pbe) { + public Product_Search__c pbe {get; set;} + public String pbeId {get; set;} + public String pbId {get; set;} + public String salesprice {get; set;} + public String salespriceA {get; set;} + public String salespriceB {get; set;} + public String salespriceC {get; set;} + public boolean hiddenflg {get; set;} + public String salespriceR {get; set;} + + public ProductLine(Integer i, Product_Search__c pbe, String pbeId, String salespriceStr, String salespriceAStr, String salespriceBStr, String salespriceCStr, String pbId, boolean flag) { this.idx = i; this.pbe = pbe; - this.Intra_Trade_Cost_RMB = pbe.Product2.Intra_Trade_Cost_RMB__c; - this.Foreign_Trade_Cost_US = pbe.Product2.Foreign_Trade_Cost_US__c; - this.NameCode = pbe.Product2.ProductCode; - this.Sales_Possibility = pbe.Product2.Sales_Possibility__c; - this.Bsscategory = pbe.Product2.BSSCategory__c; - this.Product_Id = pbe.Product2Id; - this.PricebookEntryId = pbe.Id; - this.Packing_list_manual = pbe.Product2.Packing_list_manual__c; - - // 澶氬勾淇濅慨 start - this.GuranteeType = pbe.Product2.GuranteeType__c; - this.Entend_gurantee_period_all = pbe.Product2.Entend_gurantee_period_all__c; - this.Intra_Trade_Gurantee_RMB = pbe.Product2.Intra_Trade_Gurantee_RMB__c; - this.Intra_Trade_Service_RMB= pbe.Product2.Intra_Trade_Service_RMB__c; - - //2021/01/06 liying start - this.NoDiscount_Foreign=pbe.Product2.NoDiscount_Foreign__c; - //2021/01/06 liying end - this.Maintenance_Price_Year = pbe.Product2.Maintenance_Price_Year__c; - - //澶栬锤澶氬勾淇� 鍙栦骇鍝佷富鏁版嵁涓婄殑澶栬锤閲戦浠ュ強缁翠慨鍚堝悓鎶ヤ环 绮剧悽鎶�鏈� wql 2021/01/04 start - this.Intra_Trade_Gurantee_USD = pbe.Product2.Intra_Trade_Foreign_RMB__c; - this.Intra_Trade_Service_USD = pbe.Product2.NoDiscount_Foreign__c; - this.Maintenance_Price_Year_USD = pbe.Product2.Repair_Contract_USD__c; - //澶栬锤澶氬勾淇� 鍙栦骇鍝佷富鏁版嵁涓婄殑澶栬锤閲戦浠ュ強缁翠慨鍚堝悓鎶ヤ环 绮剧悽鎶�鏈� wql 2021/01/04 end - - - if(pbe.Product2.VenderName__c==null|| - pbe.Product2.VenderName__c.trim().length() == 0){ - this.VenderName =' 鏃� '; - }else{ - this.VenderName = pbe.Product2.VenderName__c; - } - // 澶氬勾淇濅慨 end - - //澧炲姞浜у搧涓嶅彲鍙栨秷澶氬勾淇濋�昏緫 绮剧悽鎶�鏈� wql 2020/09/02 start - this.CanNotCancelledGurantee = pbe.Product2.CanNotCancelledGurantee__c; - //澧炲姞浜у搧涓嶅彲鍙栨秷澶氬勾淇濋�昏緫 绮剧悽鎶�鏈� wql 2020/09/02 end - //澧炲姞闃胯タ璧涘閫昏緫 绮剧悽鎶�鏈� wql 2020/12/29 start - this.Is_DangerousChemicals = pbe.Product2.Is_DangerousChemicals__c; - //澧炲姞闃胯タ璧涘閫昏緫 绮剧悽鎶�鏈� wql 2020/12/29 end - - - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 Start - //鏄惁鐧诲綍鎶ヤ环 - System.debug('aaaaaa:'+pbe.Product2.Estimation_Entry_Possibility__c); - if(pbe.Product2.Estimation_Entry_Possibility__c=='脳' ){ - this.Estimation_Entry_Possibility = true; - }else{ - this.Estimation_Entry_Possibility = false; - } - //鎴愭湰鏄惁涓虹┖ - system.debug('bbbbb:'+pbe.Product2.Intra_Trade_Cost_RMB__c); - if(pbe.Product2.Intra_Trade_Cost_RMB__c > 0 ){ - this.CostFlag = false; - }else{ - this.CostFlag = true; - } - //HWAG-BLWB9F 璇环鎶ヤ环锛氬骞翠繚浜у搧鏈櫥褰曡鎻愰噾棰濇椂涓嶅彲鎶ヤ环 绮剧悽鎶�鏈� 2020/03/03 end + this.pbeId = pbeId; + this.pbId = pbId; + System.debug('pbeId=======>' +i+'==' + pbeId); + this.salesprice = salespriceStr; + this.salespriceA = salespriceAStr; + this.salespriceB = salespriceBStr; + this.salespriceC = salespriceCStr; + this.hiddenflg = flag; + this.salespriceR = salespriceStr; } } } \ No newline at end of file -- Gitblit v1.9.1