From 2f4492ee18f90274582fcc2bb06f5e9bf64136e8 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 13 五月 2022 17:32:14 +0800 Subject: [PATCH] ProdBackup0513 --- force-app/main/default/classes/OrderPdf2Controller.cls | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/force-app/main/default/classes/OrderPdf2Controller.cls b/force-app/main/default/classes/OrderPdf2Controller.cls index 6bea583..65069b7 100644 --- a/force-app/main/default/classes/OrderPdf2Controller.cls +++ b/force-app/main/default/classes/OrderPdf2Controller.cls @@ -20,6 +20,7 @@ public String strToday { get; set; } public boolean is_parts_direct { get; set; } public boolean is_ie_direct { get; set; } + //public String approveStatus { get; set; } public Integer pageCnt { get; set; } public boolean fistPageBreak { get; set; } @@ -63,6 +64,10 @@ public String ndt_fax{get;set;} public Boolean notSpecialDealer { get; set; } + //4鏈�11鍙蜂箣鍚� + //public Boolean fourMaand { get; set; } + //鍙戣揣鏈� + public Boolean delivered { get; set; } public OrderPdf2Controller() { id = ApexPages.currentPage().getParameters().get('id'); @@ -103,10 +108,10 @@ List<Order> orderList = [select Id, AccountId, OpportunityId, Opportunity.Dealer__c, Opportunity.SpecialDeliveryAddress__c, Opportunity.SpecialDeliveryContact__c,Opportunity.InquiryNumber__c, PDF_S_Name__c, PDF_S_Address__c, PDF_S_City__c, PDF_S_Province__c, PDF_S_Phone__c,Opportunity.CreatedBy.ContactId,CreatedBy.ContactId, Name, Opportunity.ExpectedDeliveryDate__c, PDF_Sap_No__c, OrderNumber, Opportunity.SubDealer__c, - PDF_Property__c, Opportunity.Name, PDF_No__c, Description, PDF_Order_No__c,CrossCooperativeProject__c,Dealer_A__c, + PDF_Property__c, Opportunity.Name, PDF_No__c, Description, PDF_Order_No__c,CrossCooperativeProject__c, Olympus_Price_BeforeDiscount_D__c, Discount_D__c, OlympusContractPricesD__c, CustomerContractPriceD__c, Opportunity.ProductSegment__c, Opportunity.SalesChannel__c, Opportunity.Machine_Parts__c, - SpecialDeliveryAccount__c, SpecialDeliveryAccount_D__c, SpecialDeliveryContact2__c, SpecialDeliveryContact2_D__c + SpecialDeliveryAccount__c, SpecialDeliveryAccount_D__c, SpecialDeliveryContact2__c, SpecialDeliveryContact2_D__c,Opportunity.DeliveryDate__c from Order where Id = :id]; if (orderList.size() == 0) { return null; @@ -116,6 +121,18 @@ productSegment = order.Opportunity.ProductSegment__c; is_parts_direct = false; is_ie_direct = false; + //gwy 4鏈�11鍙锋柊鍏徃杩樻病鏈変簩绾у妗堣瘉 + delivered = false; + Date deliveryM = order.Opportunity.DeliveryDate__c; + Date isDelivery = Date.newInstance(2022, 4, 11); + if (deliveryM <> null) { + delivered = deliveryM >= isDelivery ? false : true; + } + /*approveStatus = order.ApproveStatus__c; + Datetime date2 = order.CreatedDate; + Datetime date3 = Datetime.newInstance(2022,4,11,0,0,0); + fourMaand = date2>date3 ? true:false;*/ + //杩樺墿涓嬫湁浜嗘柊鐨勪簩绾у妗堣瘉鐨勪唬鐮� if (order.Opportunity.ProductSegment__c == 'IE' && order.Opportunity.SalesChannel__c == 'direct') { is_ie_direct = true; } @@ -132,12 +149,12 @@ }*/ buyer = new Account(); if (order.Opportunity.Dealer__c != null) { - if (order.CrossCooperativeProject__c) { + /*if (order.CrossCooperativeProject__c) { buyer = [select Id, Name, Address1__c,Business_license__c, City__c, Province__c, Phone from Account where Id = :order.Dealer_A__c]; }else{ buyer = [select Id, Name, Address1__c,Business_license__c, City__c, Province__c, Phone from Account where Id = :order.Opportunity.Dealer__c]; - } - //buyer = [select Id, Name, Address1__c,Business_license__c, City__c, Province__c, Phone from Account where Id = :order.Opportunity.Dealer__c]; + }*/ + buyer = [select Id, Name, Address1__c,Business_license__c, City__c, Province__c, Phone from Account where Id = :order.Opportunity.Dealer__c]; } notSpecialDealer = !StaticParameter.specialDealerMap.containsKey(((String)order.Opportunity.Dealer__c)); system.debug('order.Opportunity.Dealer__c' + order.Opportunity.Dealer__c); -- Gitblit v1.9.1