| | |
| | | import com.stylefeng.guns.modular.call.server.IOrderCallService; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.shunfeng.model.DriverRide; |
| | | import com.stylefeng.guns.modular.shunfeng.model.OrderRide; |
| | | import com.stylefeng.guns.modular.shunfeng.service.IDriverRideService; |
| | | import com.stylefeng.guns.modular.shunfeng.service.IOrderRideService; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | |
| | | import com.stylefeng.guns.modular.system.pdf.TripSheetGenerator; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.EmployeeUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.AddAccountInfoRequest; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.ModifyTravelItineraryRequest; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.QYTPaymentCallback; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.QYTPaymentCallbackData; |
| | | import com.stylefeng.guns.modular.system.util.zhenglian.ZhengLianUtil; |
| | | import com.stylefeng.guns.modular.system.util.zhenglian.model.TradeTerminalInfo; |
| | | import com.stylefeng.guns.modular.system.util.zhenglian.model.ZLUserInfo; |
| | | import com.stylefeng.guns.modular.system.warpper.*; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.model.PaymentRecord; |
| | |
| | | import java.io.PrintWriter; |
| | | import java.io.Serializable; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.net.InetAddress; |
| | | import java.net.NetworkInterface; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | |
| | | |
| | | @Autowired |
| | | private IOrderRideService orderRideService; |
| | | /*顺风车司机*/ |
| | | @Autowired |
| | | private IDriverRideService driverRideService; |
| | | |
| | | |
| | | /** |
| | |
| | | if (null == uid) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | if(null != userInfo.getDriverId()){ |
| | | DriverRide driverRide = driverRideService.selectById(userInfo.getDriverId()); |
| | | //获取证联数据 |
| | | if(null == driverRide.getCustId() || 0 == driverRide.getAccOpenFlag()){ |
| | | TradeTerminalInfo tradeTerminalInfo = new TradeTerminalInfo(); |
| | | tradeTerminalInfo.setTerminal("1"); |
| | | InetAddress inetAddress = InetAddress.getLocalHost(); |
| | | String ip = inetAddress.getHostAddress(); |
| | | tradeTerminalInfo.setIp(ip); |
| | | NetworkInterface networkInterface = NetworkInterface.getByInetAddress(inetAddress); |
| | | byte[] mac = networkInterface.getHardwareAddress(); |
| | | StringBuilder macAddress = new StringBuilder(); |
| | | for (int i = 0; i < mac.length; i++) { |
| | | macAddress.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : "")); |
| | | } |
| | | |
| | | tradeTerminalInfo.setMac(macAddress.toString()); |
| | | ZLUserInfo userInfo1 = ZhengLianUtil.getUserInfo(driverRide.getEmpId().toString(), tradeTerminalInfo); |
| | | if(null != userInfo){ |
| | | driverRide.setCustId(userInfo1.getCustId()); |
| | | driverRide.setAccOpenFlag(userInfo1.getAccOpenFlag()); |
| | | driverRideService.updateById(driverRide); |
| | | } |
| | | } |
| | | //同步到中台 |
| | | if(null != driverRide.getAccOpenFlag() && 1 == driverRide.getAccOpenFlag() && 0 == driverRide.getIsSynchronous()){ |
| | | AddAccountInfoRequest request1 = new AddAccountInfoRequest(); |
| | | request1.setCustId(driverRide.getCustId()); |
| | | request1.setAccountNo(driverRide.getEmpId().toString()); |
| | | request1.setAccountName(userInfo.getName()); |
| | | request1.setMobile(userInfo.getPhone()); |
| | | Integer status = EmployeeUtil.addAccountInfo(request1); |
| | | if(0 == status){ |
| | | driverRide.setIsSynchronous(1); |
| | | driverRideService.updateById(driverRide); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | List<OrderStatusWarpper> data = new ArrayList<>(); |
| | | List<OrderPrivateCar> orderPrivateCars = orderPrivateCarService.queryOrder(uid, 1, 2, 3, 4, 5, 6, 7, 11, 12); |
| | | for (OrderPrivateCar orderPrivateCar : orderPrivateCars) { |
| | |
| | | case 2: |
| | | return orderTaxiService.payTaxiOrder1(payType, orderId, objectId, objectType, type, path, ip); |
| | | case 3: |
| | | ResultUtil resultUtil = orderCrossCityService.payCrossCityOrder1(payType, orderId, objectId, objectType, type); |
| | | ResultUtil resultUtil = orderCrossCityService.payCrossCityOrder1(payType, orderId, objectId, objectType, type, path, ip); |
| | | |
| | | orderCrossCityService.promotion(orderId); |
| | | |
| | |
| | | orderTaxiService.payOrderTaxiCallback(Integer.valueOf(orderNo), payId, 1, 0); |
| | | orderTaxiService.promotion(Integer.valueOf(orderNo)); |
| | | } |
| | | //跨城出行 |
| | | if (orderNo.contains("CC")) { |
| | | orderNo = orderNo.substring(2); |
| | | orderCrossCityService.payOrderCrossCityCallback(Integer.valueOf(orderNo), payId, 1, null); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return "error"; |
| | |
| | | @ApiImplicitParam(value = "行程单信息", name = "tripSheet", required = false, dataType = "com.stylefeng.guns.modular.system.model.vo.TripSheetVo"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil sendTripSheetEmail(@RequestBody TripSheetVo tripSheet, |
| | | HttpServletRequest request) { |
| | | public ResultUtil sendTripSheetEmail(@RequestBody TripSheetVo tripSheet, HttpServletRequest request) { |
| | | try { |
| | | // 从Redis中获取当前用户ID |
| | | Integer uid = userInfoService.getUserIdFormRedis(request); |