订单轨迹回放
This commit is contained in:
@ -52,11 +52,11 @@ public class ZcCar extends BaseEntity
|
||||
/** 最高时速(km/h) */
|
||||
private String maxSpeed;
|
||||
|
||||
/** LOT识别号 */
|
||||
@Excel(name = "LOT识别号")
|
||||
/** IoT识别号 */
|
||||
@Excel(name = "IoT识别号")
|
||||
private String lotNumber;
|
||||
|
||||
@Excel(name = "LOT品牌", dictType = "key_car_lot_brand")
|
||||
@Excel(name = "IoT识别号", dictType = "key_car_lot_brand")
|
||||
private String lotBrand;
|
||||
|
||||
/** 采购日期 */
|
||||
@ -81,7 +81,6 @@ public class ZcCar extends BaseEntity
|
||||
/** IoT设备状态 */
|
||||
private String iotStatus;
|
||||
|
||||
/** IoT识别码 */
|
||||
private String iotCode;
|
||||
|
||||
/** 所属运营商ID */
|
||||
|
||||
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import com.ruoyi.api.DataPushApi;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
import com.ruoyi.operation.service.ICompanyService;
|
||||
import com.ruoyi.orders.domain.ZcOrderCarChange;
|
||||
@ -176,43 +177,18 @@ public class ZcOrderMainController extends BaseController
|
||||
* 租车订单轨迹
|
||||
*/
|
||||
@GetMapping("/orderTrajectory/{id}")
|
||||
public String orderTrajectory(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
// 调用
|
||||
List<TrajectoryPoint> trajectoryPoints = dataPushApi.fetchOrderTrajectory("15135683068", "2025-10-15 08:08:00", "2025-10-17 16:00:00");
|
||||
|
||||
|
||||
// List<TrajectoryPoint> trajectoryPoints = new ArrayList<>();
|
||||
// double[][] testData = {
|
||||
// {112.925285, 27.900163}, {112.925285, 27.900163}, {112.925285, 27.900163},
|
||||
// {112.925285, 27.900163}, {112.925285, 27.900163}, {112.925285, 27.900163},
|
||||
// {112.925285, 27.900163}, {112.925285, 27.900163}, {112.925285, 27.900163},
|
||||
// {112.925285, 27.900163}, {112.925285, 27.900163}, {112.925285, 27.900163},
|
||||
// {112.925285, 27.900163}, {112.925285, 27.900163}, {112.925285, 27.900163},
|
||||
// {112.925285, 27.900163}, {112.925285, 27.900163}, {112.925855, 27.898977},
|
||||
// {112.925745, 27.898878}, {112.9261, 27.898802}, {112.926718, 27.898633},
|
||||
// {112.927295, 27.898673}, {112.92779, 27.898652}, {112.928342, 27.898685},
|
||||
// {112.928483, 27.89868}, {112.929135, 27.898667}, {112.9299, 27.898445},
|
||||
// {112.930225, 27.898263}, {112.93024, 27.898233}, {112.930213, 27.898052},
|
||||
// {112.929905, 27.897193}, {112.929437, 27.895972}, {112.929417, 27.895775},
|
||||
// {112.929483, 27.895702}, {112.929832, 27.895443}, {112.929875, 27.89528},
|
||||
// {112.930153, 27.894773}, {112.930123, 27.894712}, {112.929758, 27.894537},
|
||||
// {112.929558, 27.894395}, {112.929668, 27.894208}, {112.929712, 27.89416},
|
||||
// {112.930053, 27.893827}, {112.930018, 27.89383}, {112.930027, 27.893798},
|
||||
// {112.930027, 27.893798}, {112.930027, 27.893798}, {112.93002, 27.893797},
|
||||
// {112.93002, 27.893797}, {112.93002, 27.893797}, {112.929775, 27.89305},
|
||||
// {112.929775, 27.89305}, {112.92978, 27.893495}, {112.92978, 27.893495}
|
||||
// };
|
||||
// // 创建轨迹点列表
|
||||
// for (int i = 0; i < testData.length; i++) {
|
||||
// TrajectoryPoint point = new TrajectoryPoint();
|
||||
// point.setLng(testData[i][0]); // 经度
|
||||
// point.setLat(testData[i][1]); // 纬度
|
||||
// // 时间戳可以按需添加
|
||||
// // point.setTs("2025-10-17 14:" + String.format("%02d", (39 + i)) + ":36.0");
|
||||
// trajectoryPoints.add(point);
|
||||
// }
|
||||
public String orderTrajectory(@PathVariable("id") Long id, ModelMap mmap){
|
||||
|
||||
ZcOrderMain orderMain = zcOrderMainService.selectZcOrderMainByOrderId(id);
|
||||
if(orderMain == null){
|
||||
return prefix + "/orderTrajectory";
|
||||
}
|
||||
String startTm = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,orderMain.getStartRentTime());
|
||||
String endTm = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,new Date());
|
||||
if(orderMain.getActEndRentTime() != null) {
|
||||
endTm = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderMain.getActEndRentTime());
|
||||
}
|
||||
List<TrajectoryPoint> trajectoryPoints = dataPushApi.fetchOrderTrajectory(orderMain.getLotNumber(), startTm, endTm);
|
||||
// 设置中心点和轨迹点列表
|
||||
if (!trajectoryPoints.isEmpty()) {
|
||||
mmap.put("centerPoint", trajectoryPoints.get(0));
|
||||
|
||||
@ -176,6 +176,11 @@ public class ZcOrderMain extends BaseEntity
|
||||
/** 订单租车车辆图片信息信息 */
|
||||
private List<ZcOrderCarImg> zcOrderCarImgList;
|
||||
|
||||
@Transient
|
||||
private String lotNumber;
|
||||
@Transient
|
||||
private String lotBrand;
|
||||
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
@ -548,6 +553,22 @@ public class ZcOrderMain extends BaseEntity
|
||||
this.distribed = distribed;
|
||||
}
|
||||
|
||||
public String getLotBrand() {
|
||||
return lotBrand;
|
||||
}
|
||||
|
||||
public void setLotBrand(String lotBrand) {
|
||||
this.lotBrand = lotBrand;
|
||||
}
|
||||
|
||||
public String getLotNumber() {
|
||||
return lotNumber;
|
||||
}
|
||||
|
||||
public void setLotNumber(String lotNumber) {
|
||||
this.lotNumber = lotNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this)
|
||||
|
||||
@ -47,6 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="operatorName" column="operator_name" />
|
||||
<result property="storeName" column="store_name" />
|
||||
<result property="licensePlate" column="license_plate" />
|
||||
<result property="lotNumber" column="lot_number" />
|
||||
<result property="lotBrand" column="lot_brand" />
|
||||
<result property="distribed" column="distribed" />
|
||||
</resultMap>
|
||||
|
||||
@ -137,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectZcOrderMainByOrderId" parameterType="Long" resultMap="ZcOrderMainZcOrderSubResult">
|
||||
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.rental_duration, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc,a.order_amount, a.overdue_amount, a.end_order_time, a.distribed, a.del_flag, a.create_time, a.update_time,
|
||||
b.suborder_id as sub_suborder_id, b.order_id as sub_order_id, b.suborder_no as sub_suborder_no, b.suborder_type as sub_suborder_type, b.amount as sub_amount, b.payment_method as sub_payment_method, b.vin_battery_no as sub_vin_battery_no, b.created_at as sub_created_at, b.payment_id as sub_payment_id, b.paid_at as sub_paid_at, b.pay_status as sub_pay_status,b.transaction_id as sub_transaction_id, b.remark as sub_remark, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time,
|
||||
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate,
|
||||
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate, zc.lot_number as lot_number,zc.lot_brand as lot_brand,
|
||||
i.id as sub_id, i.order_id as sub_order_id, i.order_no as sub_order_no, i.img_type as sub_img_type, i.img_url as sub_img_url, i.create_time as sub_create_time, i.update_time as sub_update_time
|
||||
from zc_order_main a
|
||||
left join zc_company c on c.id = a.operator_id
|
||||
|
||||
@ -39,13 +39,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">LOT识别号:</label>
|
||||
<label class="col-sm-3 control-label">IoT识别号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="lotNumber" id="lotNumber" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">LOT品牌:</label>
|
||||
<label class="col-sm-3 control-label">IoT品牌:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="lotBrand" name="lotBrand" class="form-control m-b" th:with="type=${@dict.getType('key_car_lot_brand')}">
|
||||
<option value="">请选择品牌</option>
|
||||
@ -239,7 +239,7 @@
|
||||
if(lotNumber != '') {
|
||||
var lotBrand = $("#lotBrand").val();
|
||||
if (lotBrand == '') {
|
||||
$.modal.alert("请选择LOT品牌");
|
||||
$.modal.alert("请选择IoT品牌");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>LOT品牌:</label>
|
||||
<label>IoT品牌:</label>
|
||||
<select name="lotBrand" th:with="type=${@dict.getType('key_car_lot_brand')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
@ -137,11 +137,11 @@
|
||||
},
|
||||
{
|
||||
field: 'lotNumber',
|
||||
title: 'LOT识别号'
|
||||
title: 'IoT识别号'
|
||||
},
|
||||
{
|
||||
field: 'lotBrand',
|
||||
title: 'LOT品牌',
|
||||
title: 'IoT品牌',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(lotBrandDatas, value);
|
||||
}
|
||||
|
||||
@ -41,13 +41,13 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">LOT识别号:</label>
|
||||
<label class="col-sm-3 control-label">IoT识别号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="lotNumber" name="lotNumber" th:field="*{lotNumber}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">LOT品牌:</label>
|
||||
<label class="col-sm-3 control-label">IoT品牌:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="lotBrand" name="lotBrand" class="form-control m-b" th:with="type=${@dict.getType('key_car_lot_brand')}">
|
||||
<option value="">请选择品牌</option>
|
||||
@ -299,7 +299,7 @@
|
||||
if(lotNumber != '') {
|
||||
var lotBrand = $("#lotBrand").val();
|
||||
if (lotBrand == '') {
|
||||
$.modal.alert("请选择LOT品牌");
|
||||
$.modal.alert("请选择IoT品牌");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user