| | |
| | | HttpServletRequest request, HttpServletResponse response){ |
| | | Page<Map<String, Object>> page = new Page(1, 9999); |
| | | List<Map<String, Object>> list = orderTaxiService.paymentOrderStatisticsList(page, paymentCode, orderCode, userPhone, driverPhone, createTime, paymentTime,orderType); |
| | | List<Map<String, Object>> list1 = orderCrossCityService.paymentOrderStatisticsList(page, paymentCode, orderCode, userPhone, driverPhone, createTime, paymentTime,orderType); |
| | | list.addAll(list1); |
| | | list.sort((o1, o2) -> { |
| | | String insertTime = o1.get("insertTime").toString(); |
| | | String insertTime1 = o2.get("insertTime").toString(); |
| | | Date o1Date = null; |
| | | Date o2Date = null; |
| | | try { |
| | | o1Date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(insertTime); |
| | | o2Date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(insertTime1); |
| | | return o2Date.compareTo(o1Date); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderPositionService tOrderPositionService; |
| | | |
| | | @Autowired |
| | | private ITPubTransactionDetailsService pubTransactionDetailsService; |
| | | private ResultUtil resultUtil; |
| | | |
| | | @Value("${filePath}") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改出租车订单 |
| | | */ |
| | | @RequestMapping("/tOrderCrossCity_update/{tOrderCrossCityId}") |
| | | public String tOrderCrossCity_update(@PathVariable Integer tOrderCrossCityId, Model model) throws IOException { |
| | | Map<String, Object> tOrderTaxi = tOrderCrossCityService.getTaxiOrderDetailById(tOrderCrossCityId); |
| | | model.addAttribute("item",tOrderTaxi); |
| | | // 查询线路 |
| | | TLine line = itLineService.selectById(Integer.parseInt(tOrderTaxi.get("lineId").toString())); |
| | | model.addAttribute("line",line); |
| | | // 查询司机扣款 |
| | | List<TPubTransactionDetails> tPubTransactionDetails = pubTransactionDetailsService.selectList(new EntityWrapper<TPubTransactionDetails>() |
| | | .eq("userId", tOrderTaxi.get("driverId")) |
| | | .eq("orderId", tOrderTaxi.get("id")) |
| | | .eq("type", 1) |
| | | .eq("userType", 2)); |
| | | if(CollectionUtils.isEmpty(tPubTransactionDetails)){ |
| | | model.addAttribute("companyMoney",""); |
| | | model.addAttribute("driverMoney",""); |
| | | }else { |
| | | TPubTransactionDetails pubTransactionDetailCompany = tPubTransactionDetails.stream().filter(e -> e.getOrderType().equals(6)).findFirst().orElse(null); |
| | | if(Objects.nonNull(pubTransactionDetailCompany)){ |
| | | model.addAttribute("companyMoney",pubTransactionDetailCompany.getMoney()); |
| | | }else { |
| | | model.addAttribute("companyMoney",""); |
| | | } |
| | | TPubTransactionDetails pubTransactionDetailDriver = tPubTransactionDetails.stream().filter(e -> e.getOrderType().equals(3)).findFirst().orElse(null); |
| | | if(Objects.nonNull(pubTransactionDetailDriver)){ |
| | | model.addAttribute("driverMoney",pubTransactionDetailDriver.getMoney()); |
| | | }else { |
| | | model.addAttribute("driverMoney",""); |
| | | } |
| | | } |
| | | if(tOrderTaxi.get("payManner")!=null && Integer.parseInt(tOrderTaxi.get("payManner").toString()) == 1){ |
| | | model.addAttribute("payMannerStr","线上收款"); |
| | | }else { |
| | | model.addAttribute("payMannerStr","计费打表"); |
| | | } |
| | | LogObjectHolder.me().set(tOrderTaxi); |
| | | try{ |
| | | //将数据存储到文件中 |
| | | File file = new File(filePath + tOrderCrossCityId + "_3.txt"); |
| | | |
| | | //读取文件(字符流) |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); |
| | | //循环取出数据 |
| | | String str = null; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while ((str = in.readLine()) != null) { |
| | | sb.append(str); |
| | | } |
| | | List<TOrderPosition> list = JSONArray.parseArray(sb.toString(), TOrderPosition.class); |
| | | List<Map> maps = new ArrayList<>(); |
| | | for (TOrderPosition tOrderPosition : list) { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("lon",tOrderPosition.getLon()); |
| | | map.put("lat",tOrderPosition.getLat()); |
| | | maps.add(map); |
| | | } |
| | | |
| | | // resultUtil = ResultUtil.success(list); |
| | | // 将maps转化为jsonArray字符串 |
| | | // 使用 Gson 转换为 JSON 字符串 |
| | | // Gson gson = new Gson(); |
| | | // String jsonString = gson.toJson(maps); |
| | | // System.out.println(jsonString); |
| | | model.addAttribute("guiji",maps); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | resultUtil = ResultUtil.runErr(); |
| | | model.addAttribute("guiji",""); |
| | | } |
| | | return PREFIX + "tOrderCrossCity_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | | * @param orderDetailId |
| | | * @return |
| | |
| | | @Param("paymentTimeEnd") String paymentTimeEnd,@Param("orderType") Integer orderType); |
| | | |
| | | |
| | | |
| | | Map<String,Object> getTaxiOrderDetailById(@Param("orderId") Integer orderId); |
| | | } |
| | |
| | | </if> |
| | | order by a.insertTime desc |
| | | </select> |
| | | |
| | | <select id="getTaxiOrderDetailById" resultType="map"> |
| | | SELECT |
| | | DATE_FORMAT(ot.insertTime,'%Y-%m-%d %H:%i') as insertTimeStr, |
| | | DATE_FORMAT(ot.travelTime,'%Y-%m-%d %H:%i') as travelTimeStr, |
| | | DATE_FORMAT(ot.boardingTime,'%Y-%m-%d %H:%i') as boardingTimeStr, |
| | | DATE_FORMAT(ot.getoffTime,'%Y-%m-%d %H:%i') as getoffTimeStr, |
| | | case when ot.orderSource = 1 then 'APP下单' |
| | | when ot.orderSource = 2 then '扫码下单' |
| | | when ot.orderSource = 3 then '小程序下单' |
| | | when ot.orderSource = 4 then '司机下单' |
| | | when ot.orderSource = 5 then '调度下单' |
| | | when ot.orderSource = 6 then '电话下单' else '' end orderSourceStr, |
| | | ui.nickName as userName,ui.phone as userPhone, |
| | | case when ot.payType = 1 then '微信' |
| | | when ot.payType = 2 then '支付宝' |
| | | when ot.payType = 3 then '余额' else '' end as payTypeStr, |
| | | CONCAT(di.`name`,'-',di.phone) as driver, |
| | | CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | cc.`name` as companyName,ot.* |
| | | FROM t_order_cross_city as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN t_company as cc on cc.id = ot.companyId |
| | | where ot.id = #{orderId} |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | List<Map<String, Object>> paymentOrderStatisticsList(Page<Map<String, Object>> page, String paymentCode, String orderCode, String userPhone, String driverPhone, String createTime, String paymentTime, Integer orderType); |
| | | |
| | | |
| | | /** |
| | | * 根据订单ID获取订单详情 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | Map<String,Object> getTaxiOrderDetailById(@Param("orderId") Integer orderId); |
| | | } |
| | |
| | | } |
| | | return this.baseMapper.paymentOrderStatisticsList(page, paymentCode, orderCode, userPhone, driverPhone, createTimeStart, createTimeEnd, paymentTimeStart, paymentTimeEnd,orderType); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getTaxiOrderDetailById(Integer orderId) { |
| | | return this.baseMapper.getTaxiOrderDetailById(orderId); |
| | | } |
| | | } |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style type="text/css"> |
| | | body, |
| | | html { |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0; |
| | | } |
| | | |
| | | #allmap { |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | |
| | | ul li { |
| | | list-style: none; |
| | | } |
| | | |
| | | .btn-wrap { |
| | | z-index: 999; |
| | | position: fixed; |
| | | bottom: 3.5rem; |
| | | margin-left: 3rem; |
| | | padding: 1rem 1rem; |
| | | border-radius: .25rem; |
| | | background-color: #fff; |
| | | box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5); |
| | | } |
| | | |
| | | .btn { |
| | | width: 75px; |
| | | height: 30px; |
| | | float: left; |
| | | background-color: #fff; |
| | | color: rgba(27, 142, 236, 1); |
| | | font-size: 14px; |
| | | border: 1px solid rgba(27, 142, 236, 1); |
| | | border-radius: 5px; |
| | | margin: 0 5px; |
| | | text-align: center; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | .btn:hover { |
| | | background-color: rgba(27, 142, 236, 0.8); |
| | | color: #fff; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <input type="hidden" id="id" name="id" value="${tOrderCrossCityId}"> |
| | | <input id="guiji" name="guiji" type="hidden" value="${guiji}"> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-4"> |
| | | <h2 class="h3Class" style="font-weight: 700;">订单详情</h2> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#label id="insertTimeStr" name="下单时间" value="${item.insertTimeStr}"/> |
| | | <#label id="orderSourceStr" name="订单来源" value="${item.orderSourceStr}"/> |
| | | <#label id="userName" name="下单用户昵称" value="${item.userName}"/> |
| | | <#label id="passengers" name="乘车用户昵称" value="${item.passengers}"/> |
| | | <#label id="placementAddress" name="起点" value="${item.startAddress}"/> |
| | | <#label id="driver" name="接单司机" value="${item.driver}"/> |
| | | <#label id="car" name="接单车辆" value="${item.car}"/> |
| | | <#label id="boardingAddress" name="上车地点" value="${item.boardingAddress}"/> |
| | | <#label id="getoffAddress" name="下车地点" value="${item.getoffAddress}"/> |
| | | @if(item.payManner == 2){ |
| | | <#label id="payMoney" name="订单总价" value="${item.payMoney}"/> |
| | | <#label id="companyMoney" name="平台收益" value="${companyMoney}"/> |
| | | @} |
| | | <#label id="payMoney" name="订单总价" value="${item.payMoney}"/> |
| | | <#label id="companyMoney" name="优惠券抵扣" value="${item.couponMoney}"/> |
| | | <#label id="companyMoney" name="平台抽成" value="${companyMoney}"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#label id="orderNum" name="订单编号" value="${item.orderNum}"/> |
| | | <#label id="travelTimeStr" name="乘车时间" value="${item.travelTimeStr}"/> |
| | | <#label id="userPhone" name="下单用户手机号" value="${item.userPhone}"/> |
| | | <#label id="passengersPhone" name="乘车用户手机号" value="${item.passengersPhone}"/> |
| | | <#label id="endAddress" name="终点" value="${item.endAddress}"/> |
| | | <#label id="companyName" name="车辆所属机构" value="${item.companyName}"/> |
| | | <#label id="mileage" name="订单里程" value="${item.mileage / 1000} 公里"/> |
| | | <#label id="boardingTimeStr" name="上车时间" value="${item.boardingTimeStr}"/> |
| | | <#label id="getoffTimeStr" name="下车时间" value="${item.getoffTimeStr}"/> |
| | | <#label id="name" name="线路" value="${line.name}"/> |
| | | @if(item.payManner == 2){ |
| | | <#label id="payMannerStr" name="支付方式" value="${payMannerStr}"/> |
| | | <#label id="driverMoney" name="司机收益" value="${driverMoney}"/> |
| | | @} |
| | | @if(item.payManner == 1){ |
| | | <#label id="payMannerStr" name="支付方式" value="${payMannerStr}"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-4"> |
| | | <h2 class="h3Class" style="font-weight: 700;">线路轨迹</h2> |
| | | </div> |
| | | </div> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-10"> |
| | | <div class="form-horizontal" id="container" style="margin-left: 50px;width: 100%; height: 500px;"></div> |
| | | <div class="input-card" style="margin-left: 50px;"> |
| | | <h4>轨迹回放控制</h4> |
| | | <div class="input-item"> |
| | | <input type="button" class="btn" value="开始动画" id="start" onclick="startAnimation()"/> |
| | | <input type="button" class="btn" value="暂停动画" id="pause" onclick="pauseAnimation()"/> |
| | | <input type="button" class="btn" value="继续动画" id="resume" onclick="resumeAnimation()"/> |
| | | <input type="button" class="btn" value="停止动画" id="stop" onclick="stopAnimation()"/> |
| | | </div> |
| | | <div class="input-item"> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script> |
| | | <script src="https://webapi.amap.com/maps?v=1.4.8&key=e17d799b2506d05faf7f88320a266803"></script> |
| | | <script src="https://cache.amap.com/lbs/static/addToolbar.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tOrderCrossCity/tOrderCrossCity_info.js"></script> |
| | | @} |
| | |
| | | {title: '支付时间', field: 'paymentTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | return '<a onclick="PaymentOrderStatistics.openPaymentOrderStatisticsDetail(' + value + ')" style="color: blue;">订单详情</a>'; |
| | | return '<a onclick="PaymentOrderStatistics.openPaymentOrderStatisticsDetail(' + value + ','+row.orderType+')" style="color: blue;">订单详情</a>'; |
| | | } |
| | | } |
| | | ]; |
| | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | PaymentOrderStatistics.openPaymentOrderStatisticsDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '出租车订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderTaxi/tOrderTaxi_update/' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | PaymentOrderStatistics.openPaymentOrderStatisticsDetail = function (id, orderType) { |
| | | console.log("dahgbhjbsubcjksnb"+id); |
| | | console.log("dahgbhjbsubcjksnb"+orderType); |
| | | if(orderType==2){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '出租车订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderTaxi/tOrderTaxi_update/' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '跨城出行订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderCrossCity/tOrderCrossCity_update/' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |