| | |
| | | import com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"), |
| | | @ApiImplicitParam(value = "原因", name = "cause", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "手机号", name = "phone", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResponseWarpper transferOrder(Long orderId, String cause){ |
| | | public ResponseWarpper transferOrder(Long orderId, String cause, String phone){ |
| | | if(ToolUtil.isEmpty(orderId)){ |
| | | return ResponseWarpper.success(ResultUtil.paranErr("orderId")); |
| | | } |
| | |
| | | if(null == uid){ |
| | | return ResponseWarpper.tokenErr(); |
| | | } |
| | | ResultUtil resultUtil = orderService.transferOrder(uid, orderId, cause); |
| | | ResultUtil resultUtil = orderService.transferOrder(uid, orderId, cause, phone); |
| | | return ResponseWarpper.success(resultUtil); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil transferOrder(Integer uid, Long orderId, String cause) throws Exception; |
| | | ResultUtil transferOrder(Integer uid, Long orderId, String cause, String phone) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | return order; |
| | | } |
| | | return order; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil transferOrder(Integer uid, Long orderId, String cause) throws Exception { |
| | | public ResultUtil transferOrder(Integer uid, Long orderId, String cause, String phone) throws Exception { |
| | | // 7.13改动 |
| | | OrderTransfer orderTransfer = new OrderTransfer(); |
| | | Order order = this.selectById(orderId); |
| | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | pushOrder(finalOrder); |
| | | pushOrder(finalOrder.getId()); |
| | | } |
| | | }).start(); |
| | | } |
| | |
| | | model.addAttribute("routeRecord",tOrder.getRouteRecord());//行程录音 |
| | | model.addAttribute("userPhone",tOrder.getUserPhone());//用户手机号 |
| | | model.addAttribute("userName",tOrder.getUserName());//用户名称 |
| | | if(null != tOrder.getActualMileage()){ |
| | | model.addAttribute("actualMileage",new BigDecimal(tOrder.getActualMileage() / 1000).setScale(2, RoundingMode.HALF_EVEN).doubleValue());//用户名称 |
| | | }else{ |
| | | model.addAttribute("actualMileage", 0); |
| | | } |
| | | if(null != tOrder.getGetoffTime() && null != tOrder.getBoardingTime()){ |
| | | long t = tOrder.getGetoffTime().getTime() - tOrder.getBoardingTime().getTime(); |
| | | int ti = Long.valueOf(t / 1000).intValue(); |
| | | Integer s = ti % 60; |
| | | Integer m = ti / 60; |
| | | model.addAttribute("time", (m < 10 ? ("0" + m) : m) + ":" + (s < 10 ? ("0" + s) : s));//用户名称 |
| | | }else{ |
| | | model.addAttribute("time", 0); |
| | | } |
| | | |
| | | // 查询用户 |
| | | TAppUser tAppUser = tAppUserMapper.selectById(tOrder.getUserId()); |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | # active: dev |
| | | active: produce |
| | | active: dev |
| | | # active: produce |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://192.168.110.80:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: f4OfRjqoN3jSiNGiUoiNsQdOBtCOKYRj |
| | | # password: 123456 |
| | | # password: f4OfRjqoN3jSiNGiUoiNsQdOBtCOKYRj |
| | | password: 123456 |
| | | db-name: super_save_driving #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | |
| | | # RedisÊý¾Ý¿âË÷Òý£¨Ä¬ÈÏΪ0£© |
| | | spring.redis.database=0 |
| | | |
| | | ## Redis·þÎñÆ÷µØÖ· |
| | | spring.redis.host=127.0.0.1 |
| | | ## Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | spring.redis.port=16379 |
| | | ## Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | spring.redis.password=cKsEeyffDXG5PzNg8CIbrWxFluXrCprZ |
| | | |
| | | # Redis·þÎñÆ÷µØÖ· |
| | | ### Redis·þÎñÆ÷µØÖ· |
| | | #spring.redis.host=127.0.0.1 |
| | | ## Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | #spring.redis.port=6379 |
| | | ## Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | #spring.redis.password=123456 |
| | | ### Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | #spring.redis.port=16379 |
| | | ### Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | #spring.redis.password=cKsEeyffDXG5PzNg8CIbrWxFluXrCprZ |
| | | |
| | | Redis·þÎñÆ÷µØÖ· |
| | | spring.redis.host=127.0.0.1 |
| | | # Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | spring.redis.port=6379 |
| | | # Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | spring.redis.password=123456 |
| | | |
| | | # Á¬½Ó³Ø×î´óÁ¬½ÓÊý£¨Ê¹ÓøºÖµ±íʾûÓÐÏÞÖÆ£© |
| | | spring.redis.jedis.pool.max-active=1024 |
| | |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-4"> |
| | | <h2 class="h3Class" style="font-weight: 700;">线路轨迹</h2> |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">线路轨迹</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >行驶里程:</label> |
| | | <label>${actualMileage}KM</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >行驶时长:</label> |
| | | <label>${time}</label> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |