From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新
---
force-app/main/default/classes/NFM611Rest.cls | 33 +++++++++++++++++++--------------
1 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/force-app/main/default/classes/NFM611Rest.cls b/force-app/main/default/classes/NFM611Rest.cls
index 4743bbe..f3aaadc 100644
--- a/force-app/main/default/classes/NFM611Rest.cls
+++ b/force-app/main/default/classes/NFM611Rest.cls
@@ -157,8 +157,10 @@
repair.ReturnOrderLatestStatus__c = ged.LogisticsInfo.logisticsLatestStatus;
}
if (String.isNotBlank(logisticsType)) {
- LogisticsInformation__c logisticsInformation = DataAssembly(ged,logisticsType,logisticsInformationMap,repairMap);
- upsertLogisticsInformationList.add(logisticsInformation);
+ if (String.isNotBlank(ged.LogisticsInfo.logisticsNo)) { // 2022-11-08 zyh insert
+ LogisticsInformation__c logisticsInformation = DataAssembly(ged,logisticsType,logisticsInformationMap,repairMap);
+ upsertLogisticsInformationList.add(logisticsInformation);
+ } // 2022-11-08 zyh insert
}
updateList.add(repair);
}
@@ -215,11 +217,11 @@
if (ged.repairOrderInfo.api_type == null) {
result += 'DataError: [ ' + repairNo + ' ] api_type is null!\n';
}
- if ((ged.repairOrderInfo.api_type == 3 || ged.repairOrderInfo.api_type == 4 || ged.repairOrderInfo.api_type == 5) &&
+ /*if ((ged.repairOrderInfo.api_type == 3 || ged.repairOrderInfo.api_type == 4 || ged.repairOrderInfo.api_type == 5) &&
String.isBlank(ged.LogisticsInfo.logisticsNo)) {
result += 'DataError: [ ' + repairNo + ' ] logisticsNo is null!\n';
- }
+ }*/ // 2022-11-08 zyh 娉ㄩ噴
}
@@ -233,19 +235,22 @@
private static Map < String, Map < String, Id >> getLogisticsInformationMap(Map < String, GeData > geDataMap) {
List < LogisticsInformation__c > logisticsInformationList = [Select Id, LogisticsNo__c, LogisticsRepair__r.Name FROM LogisticsInformation__c WHERE LogisticsRepair__r.Name IN: geDataMap.keySet()];
Map < String, Map < String, Id >> result = new Map < String, Map < String, Id >> ();
- for (LogisticsInformation__c logistics: logisticsInformationList) {
+ if (logisticsInformationList.size() > 0) { //2022-11-08 zyh insert
+
+ for (LogisticsInformation__c logistics: logisticsInformationList) {
- String repairName = logistics.LogisticsRepair__r.Name;
- String logisticsNo = logistics.LogisticsNo__c;
- Map < String, Id > logisticsMap = new Map < String, Id > ();
+ String repairName = logistics.LogisticsRepair__r.Name;
+ String logisticsNo = logistics.LogisticsNo__c;
+ Map < String, Id > logisticsMap = new Map < String, Id > ();
- if (result.containsKey(repairName)) {
- logisticsMap = result.get(repairName);
+ if (result.containsKey(repairName)) {
+ logisticsMap = result.get(repairName);
+ }
+ logisticsMap.put(logistics.LogisticsNo__c, logistics.Id);
+ result.put(repairName, logisticsMap);
+
}
- logisticsMap.put(logistics.LogisticsNo__c, logistics.Id);
- result.put(repairName, logisticsMap);
-
- }
+ } //2022-11-08 zyh insert
return result;
}
/**
--
Gitblit v1.9.1