GWY
2022-03-11 2c229b654d0ac9478ec5e2479b244362205bd54e
force-app/main/default/classes/Product2TriggerHandler.cls
@@ -102,12 +102,13 @@
        System.debug('pro2Map='+pro2Map);
        System.debug('prSteMap='+prSteMap);
        System.debug('prSte1Map='+prSte1Map);
        Date stedate;
        //通过上面的循环,把关系表过获取的数据读出来,传给map
        if (pro2Map.size()>0) {
            for (Product_Register_Link__c pr: pro2List) {
                if (pro2Map.containsKey(pr.Product2__r.Id) && (prSteMap.containsKey(pr.Product2__r.Id) || prSte1Map.containsKey(pr.Product2__r.Id))) {
                    Date stedate = prSteMap.get(pr.Product2__r.Id)==null?prSte1Map.get(pr.Product2__r.Id)==null?null:prSte1Map.get(pr.Product2__r.Id):prSte1Map.get(pr.Product2__r.Id);
                    stedate = prSteMap.get(pr.Product2__r.Id)==null?prSte1Map.get(pr.Product2__r.Id)==null?null:prSte1Map.get(pr.Product2__r.Id):prSte1Map.get(pr.Product2__r.Id);
                    if (newMap.get(pr.Product2__r.Id).demoteer_Sap__c <> null && pr.Product2__r.Diedatvanink__c <> null) {
                        if (pr.Product_Register__r.Stelsedag__c <> null) {
                            if (pr.Product2__r.Diedatvanink__c <= stedate) {