| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | |
| | | import com.stylefeng.guns.modular.system.dao.TCompanyMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.service.impl.IncomeServiceImpl; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | |
| | | Integer userId =null; |
| | | if(type==1){ |
| | | TOrderPrivateCar tOrderPrivateCar = tOrderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>().eq("id",orderNum)); |
| | | if(1 != tOrderPrivateCar.getAbnormalStatus()){ |
| | | return new ErrorTip(500, "订单已被审核,不能重复操作"); |
| | | } |
| | | |
| | | userId = tOrderPrivateCar.getUserId(); |
| | | |
| | | //平台全责需要调起备付金支付 |
| | |
| | | String retCode = payInfo.getRetCode(); |
| | | if (!"000000".equals(retCode)) { |
| | | log.error("备付金支付失败:{}", payInfo.getRetMsg()); |
| | | return "备付金支付失败:" + payInfo.getRetMsg(); |
| | | return new ErrorTip(500, "备付金支付失败:" + payInfo.getRetMsg()); |
| | | } |
| | | PayInfoData data = payInfo.getData(); |
| | | String status = data.getStatus(); |
| | | if ("3".equals(status)) { |
| | | log.error("备付金支付失败:{}", payInfo.getRetMsg()); |
| | | return "备付金支付失败:" + payInfo.getRetMsg(); |
| | | return new ErrorTip(500, "备付金支付失败:" + payInfo.getRetMsg()); |
| | | } |
| | | if("0".equals(status)){ |
| | | //查询支付信息 |
| | |
| | | paymentOrderRequest.setPayTime(data.getPayTime()); |
| | | paymentOrderRequest.setPaymentSerialNumber(payInfoData.getPayId()); |
| | | OrderInfo orderInfo1 = OrderUtil.paymentOrder(paymentOrderRequest); |
| | | |
| | | //添加收入 |
| | | Map<String, Object> map = null; |
| | | try { |
| | | map = incomeService.saveIncome(tOrderPrivateCar.getId(), 1, tOrderPrivateCar.getOrderMoney().doubleValue()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | tOrderPrivateCar.setSplitAllocation(JSON.toJSONString(map)); |
| | | |
| | | //中台修改订单状态 |
| | | ModifyTravelItineraryRequest request1 = new ModifyTravelItineraryRequest(); |
| | |
| | | } |
| | | if(type==2){ |
| | | TOrderCrossCity tOrderCrossCity = tOrderCrossCityService.selectOne(new EntityWrapper<TOrderCrossCity>().eq("id", orderNum)); |
| | | if(1 != tOrderCrossCity.getAbnormalStatus()){ |
| | | return new ErrorTip(500, "订单已被审核,不能重复操作"); |
| | | } |
| | | userId = tOrderCrossCity.getUserId(); |
| | | tOrderCrossCity.setResponsibilityType(responsibilityTypeVal); |
| | | tOrderCrossCity.setAbnormalStatus(2); |
| | |
| | | } |
| | | if(type==3){ |
| | | TOrderTaxi tOrderTaxi = tOrderTaxiService.selectOne(new EntityWrapper<TOrderTaxi>().eq("id", orderNum)); |
| | | if(1 != tOrderTaxi.getAbnormalStatus()){ |
| | | return new ErrorTip(500, "订单已被审核,不能重复操作"); |
| | | } |
| | | userId = tOrderTaxi.getUserId(); |
| | | tOrderTaxi.setResponsibilityType(responsibilityTypeVal); |
| | | tOrderTaxi.setAbnormalStatus(2); |