From 80b96f2bc9614b3d215a7a8b2bed08bbf7a2a51e Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期四, 14 四月 2022 18:06:13 +0800
Subject: [PATCH] 【委托】开通BJ-RS-ZB0063950的续签报价权限

---
 force-app/main/default/classes/SelectAssetEstimateVMController.cls |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/force-app/main/default/classes/SelectAssetEstimateVMController.cls b/force-app/main/default/classes/SelectAssetEstimateVMController.cls
index 8a50dbe..10bc607 100644
--- a/force-app/main/default/classes/SelectAssetEstimateVMController.cls
+++ b/force-app/main/default/classes/SelectAssetEstimateVMController.cls
@@ -739,6 +739,9 @@
                             CurrentContract_F__r.First_Estimate_Date__c,
                             CurrentContract_F__r.Contract_Consumption_rate__c, CurrentContract_F__r.First_contract_usage_Rate__c,
                             CurrentContract_F__r.Contract_Range__c, AssetMark__c,
+                            //WLIG-CDFBV3 寮�閫氱画绛炬姤浠蜂负true鐨勫彲浠ュ紑鏀剧画绛炬姤浠� thh 20220414 start
+                            CurrentContract_F__r.Open_RenewalQuotation__c,
+                            //WLIG-CDFBV3 寮�閫氱画绛炬姤浠蜂负true鐨勫彲浠ュ紑鏀剧画绛炬姤浠� thh 20220414 end
                             // 2021-01-29 LJPH-BX9CVX mzy   add  鍚堝悓鎶ヤ环鏃跺垽鏂浂浠堕闄�
                             NoPartRiskDate_F__c, NoPartRiskDate__c, SignableFlag__c,
                             Product2.PartSupplyFinishDate__c, Product2.PartSupplyFinishDateExp__c
@@ -779,7 +782,10 @@
                 Asset__r.CurrentContract_F__r.Estimate_Contract_endDate__c,
                 Asset__r.CurrentContract_F__r.Contract_Range__c,
                 Asset__r.CurrentContract_F__r.Contract_End_Date__c,
-                Asset__r.CurrentContract_F__r.Gurantee_Estimate_startDate__c
+                Asset__r.CurrentContract_F__r.Gurantee_Estimate_startDate__c,
+                //WLIG-CDFBV3 寮�閫氱画绛炬姤浠蜂负true鐨勫彲浠ュ紑鏀剧画绛炬姤浠� thh 20220414 start
+                Asset__r.CurrentContract_F__r.Open_RenewalQuotation__c
+                //WLIG-CDFBV3 寮�閫氱画绛炬姤浠蜂负true鐨勫彲浠ュ紑鏀剧画绛炬姤浠� thh 20220414 end
                 from Maintenance_Contract_Asset__c
                 where Maintenance_Contract__c = :this.targetMaintenanceContractId
             ];
@@ -847,6 +853,9 @@
                                                                 Asset__r.CurrentContract_F__r.Contract_Range__c,
                                                                 Asset__r.CurrentContract_F__r.Contract_End_Date__c,
                                                                 Asset__r.CurrentContract_F__r.Gurantee_Estimate_startDate__c,
+                                                                //WLIG-CDFBV3 寮�閫氱画绛炬姤浠蜂负true鐨勫彲浠ュ紑鏀剧画绛炬姤浠� thh 20220414 start
+                                                                Asset__r.CurrentContract_F__r.Open_RenewalQuotation__c,
+                                                                //WLIG-CDFBV3 寮�閫氱画绛炬姤浠蜂负true鐨勫彲浠ュ紑鏀剧画绛炬姤浠� thh 20220414 end
                                                                 LastMContract_Price__c,
                                                                 Asset__r.CurrentContract_F_asset__r.Estimate_Cost_Month_formula__c,
                                                                 Asset__r.CurrentContract_F_asset__r.endDateGurantee_Text__c,
@@ -3036,8 +3045,10 @@
                 //1.鍚堝悓鏈熶笉婊′竴骞存椂锛屽悎鍚屾湡瓒呰繃涓�鍗婃墠鍙紑濮嬬画绛炬姤浠枫��(eg:11涓湀鐨勫悎鍚屼粠6涓湀鍚庢墠鍙姤浠枫��)
                 //2.涓�骞翠互涓婄殑鍚堝悓锛屽湪缁撴潫鍓�6涓湀寮�濮嬪彲浠ュ紑鏀剧画绛炬姤浠枫��
                 //3.绠$悊鍛樿烦杩囷紝
-                if (UserInfo.getProfileId() != System.Label.ProfileId_SystemAdmin && String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c != 'VM_Contract') {
-    
+                //WLIG-CDFBV3 寮�閫氱画绛炬姤浠蜂负true鐨勫彲浠ュ紑鏀剧画绛炬姤浠� thh 20220413
+                if (input.rec.CurrentContract_F__r.Open_RenewalQuotation__c == false && UserInfo.getProfileId() != System.Label.ProfileId_SystemAdmin && 
+                        String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c != 'VM_Contract') {
+
                     Integer noOfDays = today.daysBetween(input.rec.CurrentContract_F__r.Contract_End_Date__c);
                     Decimal monthCon = (Decimal)noOfDays / 365 * 12;
                     // 鍙紑濮嬫姤浠风殑鏈堟暟闄愬埗
@@ -3053,7 +3064,7 @@
                     }
                 }
                 // 澶氬勾淇濆垽鏂�
-                if ( String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c == 'VM_Contract') {
+                if (String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c == 'VM_Contract') {
                     //if (UserInfo.getProfileId() != System.Label.ProfileId_SystemAdmin && String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c == 'VM_Contract') {
     
                     //Integer noOfDays = today.daysBetween(input.rec.CurrentContract_F_asset__r.endDateGurantee_Text__c);

--
Gitblit v1.9.1