From cd063bae7506e671ff66bc23915ae9f811064923 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期四, 13 四月 2023 17:51:43 +0800
Subject: [PATCH] 修改按钮4.13.1

---
 force-app/main/default/classes/OpportunityLightingButtonController.cls |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/force-app/main/default/classes/OpportunityLightingButtonController.cls b/force-app/main/default/classes/OpportunityLightingButtonController.cls
index 45124f4..9af0a4a 100644
--- a/force-app/main/default/classes/OpportunityLightingButtonController.cls
+++ b/force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-12 11:16:07
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-13 17:02:46
+ * @LastEditTime: 2023-04-13 17:50:20
  */
 public with sharing class OpportunityLightingButtonController {
     @AuraEnabled
@@ -205,7 +205,7 @@
         try {
             Opportunity opp = new Opportunity();
             opp.Id = recordId;
-            opp.ConfirmationofAward__c = '绔炰簤瀵规墜涓爣';
+            opp.ConfirmationofAward__c = LightingButtonConstant.OPPORTUNITY_CONFIRMATION_OF_AWARD_LOSE_BID;
             update opp;
             return null;
         } catch (Exception e) {
@@ -219,7 +219,7 @@
     public static string updateForOLYwinBidButton(String recordId){
         try {
             Opportunity opp = [select ConfirmationofAward__c,Closing_Bid_Date__c from Opportunity where Id =: recordId];
-            opp.ConfirmationofAward__c = 'OLY涓爣';
+            opp.ConfirmationofAward__c = LightingButtonConstant.OPPORTUNITY_CONFIRMATION_OF_AWARD_OLY_WIN_BID;
             if (opp.Closing_Bid_Date__c == null) {
                 opp.Closing_Bid_Date__c = Date.today();
             }
@@ -239,7 +239,7 @@
             rac = [
                 select 
                 id 
-                from InquiryPredictsDateChange__c where Predicted_Date_Status__c = '瀹℃壒涓�' and Opportunity__c =:recordId];
+                from InquiryPredictsDateChange__c where Predicted_Date_Status__c = :LightingButtonConstant.PREDICTED_DATE_STATUS and Opportunity__c =:recordId];
         } catch (Exception e) {
             System.debug('e:****' + e);
         }
@@ -249,10 +249,11 @@
     public static List<task__c> queryForLoseBidButton(String recordId){
         List<task__c> tasks = null;
         try {
+            String obscureName = '%' + LightingButtonConstant.TASK_NAME_BY_CONFIRMATION_OF_WINNING_BID + '%';
             tasks = [
                 select
                 taskStatus__c
-                from task__c where OpportunityId__c =: recordId and name like '%涓爣缁撴灉纭%'];
+                from task__c where OpportunityId__c =: recordId and name like :obscureName];
         } catch (Exception e) {
             System.debug('e:****' + e);
         }
@@ -262,10 +263,11 @@
     public static List<task__c> queryForOLYwinBidButton(String recordId){
         List<task__c> tasks = null;
         try {
+            String obscureName = '%' + LightingButtonConstant.TASK_NAME_BY_CONFIRMATION_OF_WINNING_BID + '%';
             tasks = [
                 select
                 taskStatus__c
-                from task__c where OpportunityId__c =: recordId and name like '%涓爣缁撴灉纭%'];
+                from task__c where OpportunityId__c =: recordId and name like :obscureName];
         } catch (Exception e) {
             System.debug('e:****' + e);
         }

--
Gitblit v1.9.1