From 08a21f49f2eaf9cfc19ceb67b196cc36ba689305 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 13 五月 2022 20:52:25 +0800 Subject: [PATCH] FIxSWOPageIssue --- force-app/main/default/classes/OrderPdf2Controller.cls | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/force-app/main/default/classes/OrderPdf2Controller.cls b/force-app/main/default/classes/OrderPdf2Controller.cls index 5de7524..55868c5 100644 --- a/force-app/main/default/classes/OrderPdf2Controller.cls +++ b/force-app/main/default/classes/OrderPdf2Controller.cls @@ -64,11 +64,11 @@ public String ndt_fax{get;set;} public Boolean notSpecialDealer { get; set; } + public String staticResource { get;private set; } //4鏈�11鍙蜂箣鍚� //public Boolean fourMaand { get; set; } - //鏄惁鍙戣揣 + //鍙戣揣鏈� public Boolean delivered { get; set; } - public OrderPdf2Controller() { id = ApexPages.currentPage().getParameters().get('id'); @@ -83,6 +83,8 @@ Date today = Date.today(); strToday = today.format(); + + staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220222 PI鏀归�� by Bright } public PageReference init() { @@ -112,7 +114,8 @@ 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,ApproveStatus__c,CreatedDate,Is_DeliveredTem__c + AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright + SpecialDeliveryAccount__c, SpecialDeliveryAccount_D__c, SpecialDeliveryContact2__c, SpecialDeliveryContact2_D__c,Opportunity.DeliveryDate__c from Order where Id = :id]; if (orderList.size() == 0) { return null; @@ -123,7 +126,12 @@ is_parts_direct = false; is_ie_direct = false; //gwy 4鏈�11鍙锋柊鍏徃杩樻病鏈変簩绾у妗堣瘉 - delivered = order.Is_DeliveredTem__c; + 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); @@ -170,7 +178,9 @@ delivery_contact = new Contact(); if (order.SpecialDeliveryContact2_D__c != null) { - delivery_contact = [select Id, Department, Name, Phone, MobilePhone,Address1__c from Contact where Id = :order.SpecialDeliveryContact2_D__c]; + delivery_contact = [select Id, Department, Name, Phone, MobilePhone, + AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright + Address1__c from Contact where Id = :order.SpecialDeliveryContact2_D__c]; } user = new Account(); @@ -188,7 +198,9 @@ } contact = new Contact(); if (contactid != null && contactid.length() > 0) { - contact = [select Id, Department, Name, Phone, MobilePhone,Fax,Email from Contact where Id = :contactid]; + contact = [select Id, Department, Name, Phone, MobilePhone,Fax, + AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright + Email from Contact where Id = :contactid]; } List<OrderItem> oiList = [select Id, PriceBookEntry.Product2.ProductCode, PriceBookEntry.Product2.Product_ECCode__c,PriceBookEntry.Product2.Name,PriceBookEntry.Product2.registrationCode__c, @@ -607,6 +619,7 @@ 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, Olympus_Price_BeforeDiscount_D__c, Discount_D__c, OlympusContractPricesD__c, CustomerContractPriceD__c, + AWS_Data_Id__c, // 20220222 PI鏀归�� by Bright Opportunity.ProductSegment__c from Order where Id = :id]; if (orderList.size() == 0) { @@ -753,6 +766,7 @@ public String delivery_user { get; set; } public String delivery_phone { get; set; } public String delivery_tel { get; set; } + public String delivery_aws_data_id { get; set; }// 20220222 PI鏀归�� by Bright // 鏈�缁堢敤鎴蜂俊鎭� public String user_name { get; set; } public String user_no { get; set; } @@ -768,6 +782,7 @@ public String user_property_IE { get; set; } public String user_product_IE { get; set; } public String user_market_RVI { get; set; } + public String user_aws_data_id { get; set; }// 20220222 PI鏀归�� by Bright // 璁㈠崟淇℃伅2 public Decimal order_subtotal { get; set; } public Decimal order_discount_rate { get; set; } @@ -815,6 +830,7 @@ delivery_user = delivery_contact.Name; delivery_phone = delivery_contact.Phone; delivery_tel = delivery_contact.MobilePhone; + delivery_aws_data_id = delivery_contact.AWS_Data_Id__c;// 20220222 PI鏀归�� by Bright user_name = user.Name; user_no = user.ManagementCode_F__c; @@ -827,6 +843,7 @@ user_fax = contact.Fax; user_email = Contact.Email; user_tel = contact.MobilePhone; + user_aws_data_id = contact.AWS_Data_Id__c;// 20220222 PI鏀归�� by Bright user_property_IE = order.PDF_Property__c; user_product_IE = user.Sub_Use__c == 'Automotive' ? '姹借溅' : user.Sub_Use__c; user_market_RVI = user.Sub_Use__c; -- Gitblit v1.9.1