| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | if (nObj.Status == FixtureUtil.assetStatusMap.get(FixtureUtil.AssetStatus.Dai_Fei_Qi.ordinal())) { |
| | | nObj.Freeze_sign__c = false; |
| | | } |
| | | // gzw CHAN-CCR6MW 【委托】【保有设备】保有设备发货日逻辑 start |
| | | if(Trigger.isInsert && nObj.Posting_Date__c == null){ |
| | | nObj.Posting_Date__c = Date.newInstance(1900, 1, 1); |
| | | } |
| | | // gzw CHAN-CCR6MW 【委托】【保有设备】保有设备发货日逻辑 end |
| | | } |
| | | } |
| | | |
| | |
| | | // 更新項目Fixture_OneToOne_Link__c.In_wh_Fu_Shu_Pin_You_Xiao_Ku_Cun__c = Fixture_OneToOne_Link__c.In_wh_Fu_Shu_Pin_You_Xiao_Ku_Cun_F__c |
| | | private void mainAssetUpdateed_OneToOneRecord() { |
| | | Set<Id> aSetIdSet = new Set<Id>(); |
| | | System.debug(LoggingLevel.INFO, '*** mainAssetUpdateed_OneToOneRecord: '); |
| | | for (Integer i = 0; i < newList.size(); i++) { |
| | | Asset nObj = newList[i]; |
| | | Asset oObj = oldList[i]; |
| | |
| | | WHERE Series_No__c > 0 AND Invalid_Flag__c =false |
| | | AND Apply_Set_Detail__c NOT IN:raesdIdSet |
| | | AND ExternalKey__c IN:keyList |
| | | AND Apply_Set_Detail__r.Cancel_Select__c = false |
| | | ORDER BY Series_No__c ]; |
| | | System.debug(LoggingLevel.INFO, '*** targetSequence: ' + targetSequence); |
| | | Map<String,List<Rental_Apply_Sequence__c>> sequenceMap = new Map<String,List<Rental_Apply_Sequence__c>>(); |