涂煌豪
2022-04-14 80b96f2bc9614b3d215a7a8b2bed08bbf7a2a51e
【委托】开通BJ-RS-ZB0063950的续签报价权限
1个文件已修改
19 ■■■■ 已修改文件
force-app/main/default/classes/SelectAssetEstimateVMController.cls 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);