提交 7cf01f91 authored 作者: 艾庆国's avatar 艾庆国

保存车辆轨迹

上级 c4af73ac
package com.clx.performance.controller.temp;
import com.clx.performance.component.ThirdComponent;
import com.clx.performance.extranal.transport.TransportService;
import com.clx.performance.feign.TransportFeignService;
import com.clx.performance.param.feign.transport.OrderChildPaySyncParam;
import com.clx.performance.param.feign.transport.OwnerSettlementSyncParam;
import com.clx.performance.param.feign.transport.ThirdOrderChildRiskStatusParam;
import com.clx.performance.service.TempService;
import com.clx.performance.service.child.FeignOrderChildService;
import com.clx.performance.vo.pc.child.OrderChildLineStatisticsVO;
import com.msl.common.dto.HttpDTO;
import com.clx.performance.service.trace.TruckTraceMqHandlerService;
import com.msl.common.result.Result;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
......@@ -40,11 +35,16 @@ public class TempController {
private TransportFeignService transportFeignService;
@Autowired
private TruckTraceMqHandlerService truckTraceMqHandlerService;
@ApiOperation(value = "test", notes = "<br>By:艾庆国")
@RequestMapping(value = "/test", method = RequestMethod.GET)
public Result test() {
truckTraceMqHandlerService.save();
return Result.ok();
}
......@@ -67,16 +67,16 @@ public class TempController {
// return Result.ok();
// }
@ApiOperation(value = "测试支付划账 (临时接口)", notes = "<br>By:胡宁宁")
@RequestMapping(value = "/paymentTest", method = RequestMethod.GET)
public Result<Void> paymentTest(@RequestParam("fromUser") @NotBlank(message = "扣款方") String fromUser,
@RequestParam("toUser") @NotBlank(message = "收款方") String toUser,
@RequestParam("figure") @NotBlank(message = "金额") String figure) {
tempService.paymentTest(fromUser,toUser,figure);
return Result.ok();
}
// @ApiOperation(value = "测试支付划账 (临时接口)", notes = "<br>By:胡宁宁")
// @RequestMapping(value = "/paymentTest", method = RequestMethod.GET)
// public Result<Void> paymentTest(@RequestParam("fromUser") @NotBlank(message = "扣款方") String fromUser,
// @RequestParam("toUser") @NotBlank(message = "收款方") String toUser,
// @RequestParam("figure") @NotBlank(message = "金额") String figure) {
//
// tempService.paymentTest(fromUser,toUser,figure);
//
// return Result.ok();
// }
// @ApiOperation(value = "承运同步网络货运 (临时接口)", notes = "<br>By:艾庆国")
......
package com.clx.performance.service.impl.trace;
import com.clx.performance.dto.zjxl.TruckTraceDTO;
import com.clx.performance.esplus.mapper.DriverTraceESPlusMapper;
import com.clx.performance.esplus.mapper.TruckTraceESPlusMapper;
import com.clx.performance.esplus.model.TruckTraceESPlus;
import com.clx.performance.param.mq.trace.TruckTraceSyncMqParam;
import com.clx.performance.service.trace.TruckTraceMqHandlerService;
import com.clx.performance.utils.LocalDateTimeUtils;
import com.clx.performance.utils.zjxl.ZjxlGpsService;
import lombok.extern.slf4j.Slf4j;
import org.elasticsearch.common.geo.GeoPoint;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
......@@ -50,4 +50,16 @@ public class TruckTraceMqHandlerServiceImpl implements TruckTraceMqHandlerServic
truckTraceESPlusMapper.insertBatch(esList);
}
@Override
public void save(){
TruckTraceESPlus es = new TruckTraceESPlus();
es.setTruckNo("京A12345");
es.setAngle(new BigDecimal("123.45"));
es.setHeight(new BigDecimal("23.45"));
es.setLocation(new GeoPoint(45.67, 123.45));
es.setGpsTime(LocalDateTimeUtils.formatTime());
es.setMileage(new BigDecimal(34.56));
es.setSpeed(new BigDecimal("67.89"));
}
}
......@@ -7,4 +7,5 @@ public interface TruckTraceMqHandlerService {
void truckTracSync(TruckTraceSyncMqParam mq);
void save();
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论