提交 bdacdaa8 authored 作者: 刘海泉's avatar 刘海泉

Merge remote-tracking branch 'origin/v15.4_truck_fleet_20240513' into test

...@@ -31,6 +31,8 @@ public class DriverTraceAddParam { ...@@ -31,6 +31,8 @@ public class DriverTraceAddParam {
private BigDecimal[] location; private BigDecimal[] location;
@ApiModelProperty(value = "时间") @ApiModelProperty(value = "时间")
private String gpsTime; private String gpsTime;
@ApiModelProperty(value = "速度", example = "12.34")
private BigDecimal speed;
} }
} }
...@@ -6,6 +6,7 @@ import com.clx.performance.model.OrderChild; ...@@ -6,6 +6,7 @@ import com.clx.performance.model.OrderChild;
import com.clx.performance.param.pc.trace.QueryTraceParam; import com.clx.performance.param.pc.trace.QueryTraceParam;
import com.clx.performance.service.trace.TraceMonitorService; import com.clx.performance.service.trace.TraceMonitorService;
import com.clx.performance.service.trace.TruckTraceService; import com.clx.performance.service.trace.TruckTraceService;
import com.clx.performance.utils.LocalDateTimeUtils;
import com.clx.performance.vo.pc.trace.DriverTraceVO; import com.clx.performance.vo.pc.trace.DriverTraceVO;
import com.clx.performance.vo.pc.trace.DriverTruckTraceVO; import com.clx.performance.vo.pc.trace.DriverTruckTraceVO;
import com.clx.performance.vo.pc.trace.OrderChildTraceVO; import com.clx.performance.vo.pc.trace.OrderChildTraceVO;
...@@ -42,6 +43,16 @@ public class TraceMonitorServiceImpl implements TraceMonitorService { ...@@ -42,6 +43,16 @@ public class TraceMonitorServiceImpl implements TraceMonitorService {
OrderChild child = orderChildDao.getByChildNo(param.getChildNo()).orElseThrow(ResultEnum.DATA_NOT_FIND, OrderChild child = orderChildDao.getByChildNo(param.getChildNo()).orElseThrow(ResultEnum.DATA_NOT_FIND,
"运单数据不存在"); "运单数据不存在");
List<DriverTruckTraceVO> truckTrace = truckTraceService.listTruckTraceByTime(param.getTruckNo(),param.getBeginTime(),param.getEndTime()); List<DriverTruckTraceVO> truckTrace = truckTraceService.listTruckTraceByTime(param.getTruckNo(),param.getBeginTime(),param.getEndTime());
// 接单重车、卸车空车
for (DriverTruckTraceVO item : truckTrace) {
item.setTruckStatus(1);
if (child.getCancelTime() != null){
if (LocalDateTimeUtils.parseTime(item.getGpsTime()).isAfter(child.getCancelTime())){item.setTruckStatus(0);}
}
if (child.getUnloadTime() != null){
if (LocalDateTimeUtils.parseTime(item.getGpsTime()).isAfter(child.getUnloadTime())){item.setTruckStatus(0);}
}
}
List<DriverTraceVO> driverTrace = truckTraceService.listDriverTraceByTime(child.getDriverUserNo(),param.getBeginTime(),param.getEndTime()); List<DriverTraceVO> driverTrace = truckTraceService.listDriverTraceByTime(child.getDriverUserNo(),param.getBeginTime(),param.getEndTime());
OrderChildTraceVO result = new OrderChildTraceVO(); OrderChildTraceVO result = new OrderChildTraceVO();
......
...@@ -143,6 +143,7 @@ public class TruckTraceServiceImpl implements TruckTraceService { ...@@ -143,6 +143,7 @@ public class TruckTraceServiceImpl implements TruckTraceService {
es.setPositionTime(item.getGpsTime()); es.setPositionTime(item.getGpsTime());
es.setCreateTime(LocalDateTimeUtils.formatTime()); es.setCreateTime(LocalDateTimeUtils.formatTime());
es.setModifiedTime(es.getCreateTime()); es.setModifiedTime(es.getCreateTime());
es.setSpeed(es.getSpeed());
list.add(es); list.add(es);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论