Commit f26dde47 by 张晓

变量改名称

1 parent e2b36da3
...@@ -130,22 +130,22 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -130,22 +130,22 @@ public class DispatchServiceImpl implements DispatchService {
} }
// 生成订单和技术员的偏好距离Map 技术员-订单-距离 // 生成订单和技术员的偏好距离Map 技术员-订单-距离
Map<String, Map<String, Long>> customerTecnicianDistanceMap = new HashMap<String, Map<String, Long>>(); Map<String, Map<String, Long>> tecnicianCustomerDistanceMap = new HashMap<String, Map<String, Long>>();
customerCodeLocationMap.forEach((customerCode, value) -> { customerCodeLocationMap.forEach((customerCode, value) -> {
technicianCodeLocationMap.forEach((technicianCode, value2) -> { technicianCodeLocationMap.forEach((technicianCode, value2) -> {
String[] temps = RegExUtils.removeAll(value, "\"").split(","); String[] temps = RegExUtils.removeAll(value, "\"").split(",");
String[] temps2 = RegExUtils.removeAll(value2, "\"").split(","); String[] temps2 = RegExUtils.removeAll(value2, "\"").split(",");
long distance = (long) getDistance(Double.parseDouble(temps[1]), Double.parseDouble(temps[0]), long distance = (long) getDistance(Double.parseDouble(temps[1]), Double.parseDouble(temps[0]),
Double.parseDouble(temps2[1]), Double.parseDouble(temps2[0])); Double.parseDouble(temps2[1]), Double.parseDouble(temps2[0]));
Map<String, Long> customerMaps = customerTecnicianDistanceMap.get(technicianCode); Map<String, Long> customerMaps = tecnicianCustomerDistanceMap.get(technicianCode);
if(null == customerMaps) { if(null == customerMaps) {
customerMaps = new HashMap<String, Long>(); customerMaps = new HashMap<String, Long>();
customerTecnicianDistanceMap.put(technicianCode, customerMaps); tecnicianCustomerDistanceMap.put(technicianCode, customerMaps);
} }
customerMaps.put(customerCode, distance); customerMaps.put(customerCode, distance);
}); });
}); });
return customerTecnicianDistanceMap; return tecnicianCustomerDistanceMap;
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!