19626
2023-04-13 cd063bae7506e671ff66bc23915ae9f811064923
修改按钮4.13.1
2个文件已修改
21 ■■■■ 已修改文件
force-app/main/default/classes/LightingButtonConstant.cls 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityLightingButtonController.cls 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LightingButtonConstant.cls
@@ -69,6 +69,13 @@
    public static final String USER_ACCESS_EDIT = '_Edit';
    //userAccess参数后缀_Read
    public static final String USER_ACCESS_READ = '_Read';
    //任务的名字‘中标结果确认’
    public static final String TASK_NAME_BY_CONFIRMATION_OF_WINNING_BID = '中标结果确认';
    //询价的ConfirmationofAward__c字段值‘OLY中标’
    public static final String OPPORTUNITY_CONFIRMATION_OF_AWARD_OLY_WIN_BID = 'OLY中标';
     //询价的ConfirmationofAward__c字段值‘竞争对手中标’
     public static final String OPPORTUNITY_CONFIRMATION_OF_AWARD_LOSE_BID = '竞争对手中标';
    public static final String PREDICTED_DATE_STATUS = '审批中';
    public static final String CN_YES = '是';
    public static final String CN_NO = '否';
    public static final String VOC_NAME = 'VOC';
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);
        }