From 962519811b7c4be07f30d09e791798b0ea79d3ae Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 08 三月 2023 09:54:02 +0800
Subject: [PATCH] 同步代码

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

diff --git a/force-app/main/default/classes/AssetHandler.cls b/force-app/main/default/classes/AssetHandler.cls
index 7d9e01b..0a33ec9 100644
--- a/force-app/main/default/classes/AssetHandler.cls
+++ b/force-app/main/default/classes/AssetHandler.cls
@@ -5,6 +5,7 @@
     private Map<Id, Asset> oldMap;
     private List<Asset> newList;
     private List<Asset> oldList;
+    private static final Map<String,Schema.RecordTypeInfo>  DEVELOPERNAMEMAP  = Schema.SObjectType.Asset.getRecordTypeInfosByDeveloperName();// 20230306 ljh add
     @TestVisible private static Set<String> testTargetDepts;
     @TestVisible private static Id Account_Asset_Id;
      public static Boolean disabled = false;
@@ -109,7 +110,11 @@
         StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true;
         Set<id> AssetIDSet = new Set<id>();
         for(Asset tempAsset : newList){
-            if(String.isNotBlank(tempAsset.warrantyType__c)){
+            // 20230306 ljh update start
+            Id Shipment = DEVELOPERNAMEMAP.get('Shipment').getRecordTypeId();
+            // if(String.isNotBlank(tempAsset.warrantyType__c)){
+            if(String.isNotBlank(tempAsset.warrantyType__c) && Shipment != tempAsset.RecordTypeId){
+            // 20230306 ljh update end
                 AssetIDSet.add(tempAsset.id);
             }
         }

--
Gitblit v1.9.1