From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/classes/NEWCreateSWOQuoteController.cls | 35 +++++++++++++++++++++--------------
1 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/force-app/main/default/classes/NEWCreateSWOQuoteController.cls b/force-app/main/default/classes/NEWCreateSWOQuoteController.cls
index 68b31b0..8762845 100644
--- a/force-app/main/default/classes/NEWCreateSWOQuoteController.cls
+++ b/force-app/main/default/classes/NEWCreateSWOQuoteController.cls
@@ -28,6 +28,10 @@
public Boolean aftORbef { get; set; }
public Boolean aftORbef1 { get; set; }
+
+ public String staticResource { get; private set; }// 20220311 PI鏀归�� by Bright
+ public String contactstaticResource { get; private set; }// 20220311 PI鏀归�� by Bright
+
public NEWCreateSWOQuoteController() {
swoId = System.currentPageReference().getParameters().get('swoId');
Id = System.currentPageReference().getParameters().get('Id');
@@ -41,6 +45,9 @@
baseUrl += '/production';
}
rtUrl = System.currentPageReference().getParameters().get('retURL');
+
+ staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Quotes__c'));// 20220221 PI鏀归�� by Bright
+ contactstaticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220221 PI鏀归�� by Bright
}
public NEWCreateSWOQuoteController(ApexPages.StandardController controller) {
@@ -231,7 +238,9 @@
if (String.isNotBlank(Id)) {
List<Quotes__c> quotesList = new List<Quotes__c>();
- quotesList = [SELECT Id, Name, BILLING_SCHEDULE__c, BILL_TO__c, SHIP_TO__c, BILL_TO_SELECT__c, CATEGORY_1_INDUSTRY_SO__c, CATEGORY_2_USE_SO__c, COLLECTION_STATUS__c, CONTACT_EMAIL__c, CONTACT_FAX__c, CONTACT_NAME__c, CONTACT_PHONE__c, CONTRACT_NAME__c, CURRENCY__c, DATE__c, DISCOUNT_ITEM__c, DISCOUNT_ITEM_F__c, DISCOUNT_WORKFLOW_TYPE__c, EST_EXTENDED_COST__c, EST_GROSS_PROFIT__c, EST_GROSS_PROFIT_PERCENT__c, ESTIMATE__c, EXP_CLOSE__c, EXPIRES__c, FDA_REPORT_COMPLETE__c, GOVERNMENT_ORDER__c, GSA_ORDER__c, INCOTERM__c, INITIATE_APPROVAL_ROUTING__c, INVOICE_MESSAGING__c, IS_SELLER_IMPORTER_OF_RECORD__c, LEAD_SOURCE__c, LEAD_TIME__c, LOCATION__c, NO_CHARGE_TYPE__c, notSaveEmail__c, NSN__c, ONLINE_BILLING__c, ONLINE_BILLING_ADDRESS__c, OPPORTUNITY__c, ORDER_TYPE__c, PKMS_PO_FOR_RECEIPT__c, PO__c, PROBABILITY__c, PRODUCT_SEGMENT__c, QUOTE_TITLE__c, RATE__c, RepairPart__c, REVISION_NEEDED__c, RMA_NOTES__c, COMPANY__c, SALES_TEAM_AUTO_ASSIGNMENT_OVERRIDE__c, SALES_TEAM_AUTO_ASSIGN_ON_SAVE__c, SELECT_MESSAGE__c, SHIPPING_CARRIER__c, SHIPPING_COST__c, SHIPPING_TAX_CODE__c, SHIPPING_TAX_RATE__c, SHIP_TO_ENTITY_USE_CODE__c, SHIP_TO_SELECT__c, SHIP_VIA__c, STATUS__c, SUBSIDIARY__c, SUBTOTAL__c, SWO__c, SWOName__c, SWO_NUMBER__c, SWO_PART_NUMBERS__c, SWO_SERIAL__c, SWOStatus__c, TAX_ID__c, TAX_OVERRIDE__c, TERMS__c, TERMS_OVERRIDE__c, THROW_MESSAGE__c, TOTAL_TRANSACTION_ITEM_WEIGHT_KGS__c, VERTICAL_MARKET_SEGMENT_SO__c, QuotesType__c, CUSTOMER_MESSAGE__c, TOTAL__c, BILL_TO_ENTITY_USE_CODE__c, COMPANYId__c, COMPANYName__c, DISCOUNT_STATUS__c, DISCOUNT_STATUS_ROUTING__c, TAX_CODE__c, TAX_RATE__c, TAX__c, DISCOUNT__c, SWOStatusMark__c FROM Quotes__c WHERE Id = :Id];
+ quotesList = [SELECT Id,
+ AWS_Data_Id__c,CONTACT_NAME__r.Name,CONTACT_NAME__r.AWS_Data_Id__c, // 20220311 PI鏀归�� by Bright
+ Name, BILLING_SCHEDULE__c, BILL_TO__c, SHIP_TO__c, BILL_TO_SELECT__c, CATEGORY_1_INDUSTRY_SO__c, CATEGORY_2_USE_SO__c, COLLECTION_STATUS__c, CONTACT_EMAIL__c, CONTACT_FAX__c, CONTACT_NAME__c, CONTACT_PHONE__c, CONTRACT_NAME__c, CURRENCY__c, DATE__c, DISCOUNT_ITEM__c, DISCOUNT_ITEM_F__c, DISCOUNT_WORKFLOW_TYPE__c, EST_EXTENDED_COST__c, EST_GROSS_PROFIT__c, EST_GROSS_PROFIT_PERCENT__c, ESTIMATE__c, EXP_CLOSE__c, EXPIRES__c, FDA_REPORT_COMPLETE__c, GOVERNMENT_ORDER__c, GSA_ORDER__c, INCOTERM__c, INITIATE_APPROVAL_ROUTING__c, INVOICE_MESSAGING__c, IS_SELLER_IMPORTER_OF_RECORD__c, LEAD_SOURCE__c, LEAD_TIME__c, LOCATION__c, NO_CHARGE_TYPE__c, notSaveEmail__c, NSN__c, ONLINE_BILLING__c, ONLINE_BILLING_ADDRESS__c, OPPORTUNITY__c, ORDER_TYPE__c, PKMS_PO_FOR_RECEIPT__c, PO__c, PROBABILITY__c, PRODUCT_SEGMENT__c, QUOTE_TITLE__c, RATE__c, RepairPart__c, REVISION_NEEDED__c, RMA_NOTES__c, COMPANY__c, SALES_TEAM_AUTO_ASSIGNMENT_OVERRIDE__c, SALES_TEAM_AUTO_ASSIGN_ON_SAVE__c, SELECT_MESSAGE__c, SHIPPING_CARRIER__c, SHIPPING_COST__c, SHIPPING_TAX_CODE__c, SHIPPING_TAX_RATE__c, SHIP_TO_ENTITY_USE_CODE__c, SHIP_TO_SELECT__c, SHIP_VIA__c, STATUS__c, SUBSIDIARY__c, SUBTOTAL__c, SWO__c, SWOName__c, SWO_NUMBER__c, SWO_PART_NUMBERS__c, SWO_SERIAL__c, SWOStatus__c, TAX_ID__c, TAX_OVERRIDE__c, TERMS__c, TERMS_OVERRIDE__c, THROW_MESSAGE__c, TOTAL_TRANSACTION_ITEM_WEIGHT_KGS__c, VERTICAL_MARKET_SEGMENT_SO__c, QuotesType__c, CUSTOMER_MESSAGE__c, TOTAL__c, BILL_TO_ENTITY_USE_CODE__c, COMPANYId__c, COMPANYName__c, DISCOUNT_STATUS__c, DISCOUNT_STATUS_ROUTING__c, TAX_CODE__c, TAX_RATE__c, TAX__c, DISCOUNT__c, SWOStatusMark__c FROM Quotes__c WHERE Id = :Id];
if (quotesList.size() > 0) {
QuotesPage = quotesList[0];
}
@@ -289,8 +298,8 @@
// Mail 椤甸潰鍒濆鍖� Start
List<String> mailIdList = new List<String>();
- List<Attachment> attList = new List<Attachment>();
- Map<String, List<Attachment>> attMap = new Map<String, List<Attachment>>();
+ List<FileAddress__c> attList = new List<FileAddress__c>();
+ Map<String, List<FileAddress__c>> attMap = new Map<String, List<FileAddress__c>>();
Map<String, Mail_Merge__c> mailMap = new Map<String, Mail_Merge__c>([select id, FROM__c, ccName__c, SUBJECT__c, MESSAGE__c, DATE__c, toName__c, EMAIL_SENT__c from Mail_Merge__c where Quotes__c = :Id order by id]);
@@ -298,15 +307,15 @@
if (mailMap != null) {
mailIdList.addAll(mailMap.keySet());
- attList = [select id, Name, ParentId from Attachment where ParentId in :mailIdList order by ParentId, id];
+ attList = [select id, Name, FileName__c,ParentRecordId__c from FileAddress__c where ParentRecordId__c in :mailIdList order by ParentRecordId__c, id];
if (attList.size() > 0) {
- for (Attachment att : attList) {
- if (attMap.containsKey(att.ParentId)) {
- attMap.get(att.ParentId).add(att);
+ for (FileAddress__c att : attList) {
+ if (attMap.containsKey(att.ParentRecordId__c)) {
+ attMap.get(att.ParentRecordId__c).add(att);
} else {
- List<Attachment> a = new List<Attachment>();
+ List<FileAddress__c> a = new List<FileAddress__c>();
a.add(att);
- attMap.put(att.ParentId, a);
+ attMap.put(att.ParentRecordId__c, a);
}
}
}
@@ -324,7 +333,6 @@
}
//棣栧厛鏄粠swo鍒涘缓quotes锛屾湁浜唖woid,灏辨槸鐢ㄦ柊鐨勯潤鎬佽祫婧愭樉绀虹殑鍏嶈矗鐢虫槑銆�
//涔嬪悗锛岀紪杈戝凡缁忓垱寤哄畬浜嗙殑quotes锛�15鍙蜂箣鍓嶅垱寤虹殑锛屾樉绀虹殑鏄棫鐨勩�傛棫鐨勫氨鏄痑ftORbef==false銆�
- //褰撶劧锛宎ftORbef==false鍏蜂綋鎸囩殑鏄棫鐨勪篃鍙互鎸囨煡涓嶅埌鐨�(杩樻病鏈夊瓨鍏ユ暟鎹簱鐨勶紝鍒涘缓鏃�)銆�
if (String.isNotBlank(swoId)) {
aftORbef1 = true;
}else{
@@ -396,7 +404,6 @@
if (String.isNotBlank(swoId)) {
QuotesPage.SWO__c = swoId;
- //鏃ユ湡2121骞�11鏈�15鍙蜂箣鍚庣殑,鐢ㄦ柊鐨勫厤璐g敵鏄庛��
aftORbef = true;
}
if (!'Cancel'.equals(QuotesPage.STATUS__c)) {
@@ -723,16 +730,16 @@
public class EmailInfo {
public Mail_Merge__c mm {get; set; }
- public List<Attachment> attList {get; set; }
+ public List<FileAddress__c> attList {get; set; }
public String haveAtt {get; set;}
public EmailInfo() {
}
- public EmailInfo(Mail_Merge__c mm_in, List<Attachment> attList_in) {
+ public EmailInfo(Mail_Merge__c mm_in, List<FileAddress__c> attList_in) {
mm = mm_in;
if (attList_in == null || attList_in.size() == 0) {
haveAtt = 'No';
- attList = new List<Attachment>();
+ attList = new List<FileAddress__c>();
} else {
attList = attList_in;
haveAtt = 'Yes';
--
Gitblit v1.9.1