彭锟
2022-03-30 47807a3ee0b770e941b3ec7335de439200cc417e
force-app/main/default/classes/UpdateContractAimAmountHandler.cls
@@ -211,11 +211,7 @@
                    if (!NFM601_IdMap.containsKey(acc.Id)) {
                        // 判断是否是接口用户
                        if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
                            //此处做修改,NFM624Rest接收数据后触发trigger,trigger再去调用601存在bug,修改为增加标记,使用Batch发送
                            //interfaceUserUpsertAccount.add(acc.Id);
                            //2022-3-28 pk start
                            acc.NFM601Tag__c = true;
                            //2022-3-28 pk end
                            interfaceUserUpsertAccount.add(acc.Id);
                        } else {
                            queueableAccountIdList.add(acc.Id); 
                        }
@@ -243,10 +239,7 @@
                        ) {
                        if (!NFM601_IdMap.containsKey(acc.Id)) {
                            if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
                                //interfaceUserUpsertAccount.add(acc.Id);
                                 //2022-3-28 pk start
                                acc.NFM601tag__c = true;
                                 //2022-3-28 pk start
                                interfaceUserUpsertAccount.add(acc.Id);
                            } else {
                                queueableAccountIdList.add(acc.Id);
                            } 
@@ -262,14 +255,14 @@
        //After : to avoid mutiple execute
        //if(!(System.Test.isRunningTest()||System.isFuture()||System.isBatch())){
        //Update by Li Jun for PIPL 20220304
        if(!(System.Test.isRunningTest()||System.isFuture()||System.isBatch())){
        if(!(System.Test.isRunningTest())){
            if (queueableAccountIdList.size() > 0) {
                NFM601Controller.callout('', queueableAccountIdList);
            }
            // if (interfaceUserUpsertAccount.size() > 0) {
            //     NFM601Controller.executefuture('', interfaceUserUpsertAccount);
            // }
            if (interfaceUserUpsertAccount.size() > 0) {
                NFM601Controller.executefuture('', interfaceUserUpsertAccount);
            }
        }
    }