| | |
| | | |
| | | public static Set < Id > NFM603_Ids = new Set < Id > (); |
| | | // public static Map<Id,Id> rprIdMap = new Map<Id,Id>(); |
| | | |
| | | |
| | | public static void NFM603Trigger(List < Repair__c > newList, Map < Id, Repair__c > newMap, List < Repair__c > oldList, Map < Id, Repair__c > oldMap) { |
| | | List < String > rprIds = new List < String > (); |
| | | Map < Id, Id > rprIdMap = new Map < Id, Id > (); |
| | |
| | | rprIdMap.put(rpr.Id, rpr.Id); |
| | | } |
| | | } |
| | | |
| | | // 2022/4/6 zhangyuheng update start |
| | | //OTS订单号有值,发送AWS |
| | | if ((oldrpr.OTSRepairOrder__c == null && String.isNotBlank(rpr.OTSRepairOrder__c)) || rpr.OTSRepairOrder__c != oldrpr.OTSRepairOrder__c) { |
| | | if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) { |
| | | NFM603Controller.NFM603_Ids.add(rpr.Id); |
| | | rprIdMap.put(rpr.Id, rpr.Id); |
| | | } |
| | | } |
| | | // 2022/4/6 zhangyuheng update end |
| | | // 2022/4/7 zhangyuheng update start |
| | | //送修物流单号有值,发送AWS |
| | | if ((oldrpr.DeliveryLogisticsNo__c == null && String.isNotBlank(rpr.DeliveryLogisticsNo__c)) || rpr.DeliveryLogisticsNo__c != oldrpr.DeliveryLogisticsNo__c) { |
| | | if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) { |
| | | NFM603Controller.NFM603_Ids.add(rpr.Id); |
| | | rprIdMap.put(rpr.Id, rpr.Id); |
| | | } |
| | | } |
| | | //报价金额发生改变且初次报价日有值,发送AWS |
| | | if (((rpr.Discount_Price_formula__c != oldrpr.Discount_Price_formula__c) || rpr.Discount_Price_formula__c != null) && rpr.Repair_Firstestimated_Date_formula__c != null) { |
| | | if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) { |
| | | NFM603Controller.NFM603_Ids.add(rpr.Id); |
| | | rprIdMap.put(rpr.Id, rpr.Id); |
| | | } |
| | | } |
| | | if ((rpr.Returns_Product_waySAP__c != oldrpr.Returns_Product_waySAP__c) && rpr.Repair_Shipped_DateTime__c != null) { |
| | | if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) { |
| | | NFM603Controller.NFM603_Ids.add(rpr.Id); |
| | | rprIdMap.put(rpr.Id, rpr.Id); |
| | | } |
| | | } |
| | | // 2022/4/7 zhangyuheng update end |
| | | // 测试环境测试用,上线前请注掉 |
| | | if (rpr.Repair_Firstestimated_Date__c != oldrpr.Repair_Firstestimated_Date__c) { |
| | | if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) { |