|
@ -222,9 +222,10 @@ public class TrackManagementServiceImpl implements TrackManagementService {
|
222
|
222
|
String endTime = requestMap.get("endTime").toString();
|
223
|
223
|
|
224
|
224
|
List<Map<String, Object>> list = response.getData().getData();
|
225
|
|
List<String> fixToolTypeIds = getFixToolTypeIds();
|
|
225
|
//List<String> fixToolTypeIds = getFixToolTypeIds();
|
226
|
226
|
|
227
|
|
if (CollectionUtils.isEmpty(list) || CollectionUtils.isEmpty(fixToolTypeIds)) {
|
|
227
|
//if (CollectionUtils.isEmpty(list) || CollectionUtils.isEmpty(fixToolTypeIds)) {
|
|
228
|
if (CollectionUtils.isEmpty(list)) {
|
228
|
229
|
Map<String, Object> wharfAreaMap = getWharfAreaMap(startTime, endTime);
|
229
|
230
|
wharfAreaMap.put("proportion", 100);
|
230
|
231
|
areaList.add(wharfAreaMap);
|
|
@ -233,27 +234,28 @@ public class TrackManagementServiceImpl implements TrackManagementService {
|
233
|
234
|
|
234
|
235
|
int orderNum = 0;
|
235
|
236
|
int maxDurationTime = 0;
|
236
|
|
for (int i = list.size() - 1; i > -1; i--) {
|
|
237
|
int listSize = list.size() - 1;
|
|
238
|
for (int i=listSize ; i > -1; i--) {
|
237
|
239
|
Map<String, Object> areaMap = new HashMap<String, Object>();
|
238
|
240
|
|
239
|
241
|
String inTime = DateUtil.formatObjectToDate(list.get(i).get("inTime"));
|
240
|
242
|
String outTime = DateUtil.formatObjectToDate(list.get(i).get("outTime"));
|
241
|
243
|
|
242
|
|
if (orderNum == 0 && DateUtil.compareDate(inTime, startTime) > 0) {
|
|
244
|
if (i == listSize && DateUtil.compareDate(inTime, startTime) > 0) {
|
243
|
245
|
Map<String, Object> wharfAreaMap = getWharfAreaMap(startTime, inTime);
|
244
|
246
|
maxDurationTime = (int) wharfAreaMap.get("durationTime");
|
245
|
247
|
areaList.add(wharfAreaMap);
|
246
|
248
|
orderNum++;
|
247
|
|
} else if (orderNum == 0) {
|
|
249
|
} else if (i == listSize) {
|
248
|
250
|
inTime = startTime;
|
249
|
251
|
} else {
|
250
|
252
|
inTime = inTime == null ? outTime : inTime;
|
251
|
253
|
}
|
252
|
254
|
|
253
|
|
if (!fixToolTypeIds.contains(String.valueOf(list.get(i).get("businessType")))) {
|
254
|
|
// 进入船上等可移动的设备中
|
|
255
|
// 判断是否进入可移动的设备(船)
|
|
256
|
/*if (!fixToolTypeIds.contains(String.valueOf(list.get(i).get("businessType")))) {
|
255
|
257
|
continue;
|
256
|
|
}
|
|
258
|
}*/
|
257
|
259
|
|
258
|
260
|
areaMap.put("orderNum", orderNum);
|
259
|
261
|
areaMap.put("inTime", inTime);
|