| | |
| | | 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) { |