From 0c0c68a6285636b6a042545244b60bab815d54d5 Mon Sep 17 00:00:00 2001
From: 付煜 <fuyu3103346691@163.com>
Date: 星期四, 07 四月 2022 14:23:35 +0800
Subject: [PATCH] 【委托】又有询价跳过了报价计算
---
force-app/main/default/classes/NewQuoteEntryController.cls | 149 ++++++++++++++++++++++++++++++++-----------------
1 files changed, 96 insertions(+), 53 deletions(-)
diff --git a/force-app/main/default/classes/NewQuoteEntryController.cls b/force-app/main/default/classes/NewQuoteEntryController.cls
index 3fc9f56..0994ce1 100644
--- a/force-app/main/default/classes/NewQuoteEntryController.cls
+++ b/force-app/main/default/classes/NewQuoteEntryController.cls
@@ -14,7 +14,9 @@
public Integer flglastbuy { get; set; }
public String errorProductmodel { get; set; }
//lastbuy 2022/2/9 fy end
-
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy start
+ public Boolean SkipQuotefilg { get; set; }
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy end
public String excel_text { get; set; }
public Integer select_index { get; set; } // excelImport灏傜敤銇с仚銇屻�乯s銇仸鍒跺尽銇欍倠銇撱仺銇仾銈嬨伄銇с�乀ODO katsu 鍓婇櫎浜堝畾
public String Product_text { get; set; }
@@ -127,7 +129,9 @@
}
public PageReference init() {
-
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy start
+ SkipQuotefilg = false;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy end
system.debug('============start init==============');
boolean quoteflg = true;
WinOrDecideAlert = false;
@@ -425,7 +429,11 @@
if (copyQuoId == null) {
} else {
// copy銇牬鍚堛�乹uoId銈抧ull銇埢銇�
+ system.debug('id绌�6锛�');
quoId = null;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy start
+ SkipQuotefilg = true;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy end
}
if (quoList.size() > 0) {
//娣诲姞琛�
@@ -1827,60 +1835,70 @@
if (dataCheck() == false) {
return null;
}
-
+ // 2022-04-06 SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 ssm start
+ // 鍒ゆ柇鏉′欢淇敼
+ // 1.濡傛灉淇濆瓨鏂规硶杩斿洖false锛宺eturn
+ // 2.濡傛灉淇濆瓨閫氳繃浣嗗垱寤轰簡鏂版姤浠凤紝return
+ // 3.缁х画鍋歞ecide
if (dataEntry() == false) {
return null;
- } else {
- //寮曞悎銇绌嶆焙瀹氥倰銈兂
- if (oppId == null) {
- system.debug('Error is Opportunityid null!!!');
- } else {
- List<Opportunity> opps = [Select Id, Estimation_Decision__c From Opportunity Where Id = : oppId];
- if (opps.size() > 0) {
- opps[0].Estimation_Decision__c = true;
- /*鈫撯啌鈫撹绌嶅悓鏈熲啌鈫撯啌2012/11/28 鏈娇鐢�
- opps[0].SyncedQuoteId = quoId;
- 鈫戔啈鈫戙��銆�銆�銆�鈫戔啈鈫�*/
- ControllerUtil.updOpp(opps[0]);
- }
-
- errorflg = true;
- errorMessage = System.Label.Message_002;
-
- // cic 134906 start
- Quote q = [select Id from Quote where Id = :quoId];
- q.Quote_Decision_Date__c = date.Today();
- update q;
- // cic 134906 end
-
- QuoteDecision = true;
- enableContract = true;
- //--Savebutton
- Save_button = true;
- //--Decisionbutton鍒ゅ畾
- if (verified == true) {
- Decision_button = false;
- } else if (QuoteCorrect == false) {
- Decision_button = true;
- } else if (QuoteDecision == true) {
- Decision_button = true;
- } else {
- Decision_button = false;
- }
- //--SAPButton
- if (QuoteDecision == false) {
- sap_button = true;
- } else if (specialAuthority == false) {
- sap_button = true;
- } else {
- sap_button = false;
- }
- //--姹哄畾銉溿偪銉充娇銇堛仾銇勩倛銇嗐伀銇欍倠
- Decision_button = true;
-
- pageArrange();
- }
}
+ if(SkipQuotefilg){
+ errorflg = true;
+ errormessage = '鐢婚潰閰嶇疆鍙樻洿锛屽凡鐢熸垚鏂扮殑鎶ヤ环鍗曪紝璇烽噸鏂板仛鎶ヤ环璁$畻';
+ quo.IsQuoteTrial__c = false;
+ return null;
+ }
+ //寮曞悎銇绌嶆焙瀹氥倰銈兂
+ if (oppId == null) {
+ system.debug('Error is Opportunityid null!!!');
+ } else {
+ List<Opportunity> opps = [Select Id, Estimation_Decision__c From Opportunity Where Id = : oppId];
+ if (opps.size() > 0) {
+ opps[0].Estimation_Decision__c = true;
+ /*鈫撯啌鈫撹绌嶅悓鏈熲啌鈫撯啌2012/11/28 鏈娇鐢�
+ opps[0].SyncedQuoteId = quoId;
+ 鈫戔啈鈫戙��銆�銆�銆�鈫戔啈鈫�*/
+ ControllerUtil.updOpp(opps[0]);
+ }
+
+ errorflg = true;
+ errorMessage = System.Label.Message_002;
+
+ // cic 134906 start
+ Quote q = [select Id from Quote where Id = :quoId];
+ q.Quote_Decision_Date__c = date.Today();
+ update q;
+ // cic 134906 end
+
+ QuoteDecision = true;
+ enableContract = true;
+ //--Savebutton
+ Save_button = true;
+ //--Decisionbutton鍒ゅ畾
+ if (verified == true) {
+ Decision_button = false;
+ } else if (QuoteCorrect == false) {
+ Decision_button = true;
+ } else if (QuoteDecision == true) {
+ Decision_button = true;
+ } else {
+ Decision_button = false;
+ }
+ //--SAPButton
+ if (QuoteDecision == false) {
+ sap_button = true;
+ } else if (specialAuthority == false) {
+ sap_button = true;
+ } else {
+ sap_button = false;
+ }
+ //--姹哄畾銉溿偪銉充娇銇堛仾銇勩倛銇嗐伀銇欍倠
+ Decision_button = true;
+
+ pageArrange();
+ }
+ // 2022-04-06 SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 ssm end
} catch (DmlException de) {
Database.rollback(sp);
errorflg = true;
@@ -2715,22 +2733,43 @@
oppNo = oppNo.substring(oppNo.length() - 2);
Quote q = New Quote();
+ System.debug('quoId: ' + quoId);
+ System.debug('changedAfterPrint: ' + changedAfterPrint);
if (changedAfterPrint) {
system.debug('id绌�1锛�');
quoId = null;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy start
+ SkipQuotefilg = true;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy end
}
// false浼濈エ銇嬨倝鏂拌浣滄垚
+ System.debug('changedAfterBid: ' + changedAfterBid);
if (changedAfterBid) {
system.debug('id绌�2锛�');
quoId = null;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy start
+ SkipQuotefilg = true;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy end
}
// CHAN-AVG3PW 璇环鎶ヤ环鐢婚潰瑙勫垯鍙樻洿
+ System.debug('newQuoteFlag: ' + newQuoteFlag);
if (newQuoteFlag) {
system.debug('id绌�3锛�');
quoId = null;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy start
+ SkipQuotefilg = true;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy end
}
// 澶氬勾淇濅慨 start
//鎶ヤ环璇曠畻 澧炲姞缁忛攢鍟嗗墠鍚庡姣� 绮剧悽鎶�鏈� wql 20210508 start
+ System.debug('quoteGurantee_Period: ' + quoteGurantee_Period);
+ System.debug('quo.Gurantee_Period__c: ' + quo.Gurantee_Period__c);
+ System.debug('quotemultiYearWarranty: ' + quotemultiYearWarranty);
+ System.debug('quo.multiYearWarranty__c: ' + quo.multiYearWarranty__c);
+ System.debug('agency1Name: ' + agency1Name);
+ System.debug('quo.Agency1__c: ' + quo.Agency1__c);
+ System.debug('agency2Name: ' + agency2Name);
+ System.debug('quo.Agency2__c: ' + quo.Agency2__c);
if ((quoteGurantee_Period != null &&
!quoteGurantee_Period.equals(quo.Gurantee_Period__c))
||
@@ -2741,7 +2780,11 @@
||
(agency2Name !=null &&!agency2Name.equals(quo.Agency2__c))
) {
+ system.debug('id绌�8锛�');
quoId = null;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy start
+ SkipQuotefilg = true;
+ //SWAG-CC6AFQ銆愬鎵樸�戝張鏈夎浠疯烦杩囦簡鎶ヤ环璁$畻 fy end
}
agency1Name = quo.Agency1__c;
agency2Name = quo.Agency2__c;
--
Gitblit v1.9.1