| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.enums.FacilityCodeEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.utils.TerminalInterfaceAcquisitionUtil; |
| | | import com.stylefeng.guns.modular.system.utils.tips.ErrorTip; |
| | | import com.stylefeng.guns.modular.system.utils.tips.SuccessTip; |
| | | import com.stylefeng.guns.modular.system.warpper.TerminaleDataWarpper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | return new SuccessTip(); |
| | | } |
| | | |
| | | /** |
| | | * company 订单 |
| | | * @param orderId 订单id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "用户端-检查站可取货",notes="用户端-检查站可取货") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(name = "orderId", value = "orderId", required = true, dataType = "Long"), |
| | | }) |
| | | @PostMapping(value = "/affirmOne") |
| | | @ResponseBody |
| | | public Object affirmOne( Long orderId) { |
| | | TOrder tOrder = orderService.selectById(orderId); |
| | | |
| | | if(tOrder.getStatus().equals("13")){ |
| | | tOrder.setStatus("14"); |
| | | }else { |
| | | return new ErrorTip(5010,"The current status cannot be modified"); |
| | | } |
| | | orderService.updateById(tOrder); |
| | | return new SuccessTip(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "支付",notes="支付") |
| | | @ApiImplicitParams({ |
| | |
| | | orderService.updateById(tOrder); |
| | | return new SuccessTip(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "用户端-安排检查站",notes="用户端-安排检查站") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(name = "orderId", value = "orderId", required = true, dataType = "Long"), |
| | | @ApiImplicitParam(name = "examId", value = "examId", required = true, dataType = "int"), |
| | | }) |
| | | @GetMapping(value = "/examAdd") |
| | | @ResponseBody |
| | | public Object examAdd(Long orderId,int examId) { |
| | | TOrder tOrder = orderService.selectById(orderId); |
| | | tOrder.setExamSite(examId); |
| | | orderService.updateById(tOrder); |
| | | return new SuccessTip(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "商品详情",notes="商品详情") |
| | |
| | | driverIds.add(driverIdOne); |
| | | } |
| | | List<TTransportation> tTransportations = tTransportationService.selectList(new EntityWrapper<TTransportation>().eq("order_id", orderId).in("driver_id", driverIds)); |
| | | TerminaleDataWarpper terminalStatus = TerminalInterfaceAcquisitionUtil.getTerminalStatus("WFHU5080179", FacilityCodeEnum.USLAX.getMsg()); |
| | | for (TTransportation tDriver : tTransportations) { |
| | | OrderDriverInfo orderDriverInfo = new OrderDriverInfo(); |
| | | orderDriverInfo.setId(tDriver.getId()); |
| | |
| | | orderDriverInfo.setChassiess(powerUnitsService.selectById(tDriver.getChassises())); |
| | | |
| | | // TODO 第三方 目前不知道对接那个 |
| | | orderDriverInfo.setAppointmentNumber(null); |
| | | orderDriverInfo.setAppointmentNumber(terminalStatus.getAppointmentNumber()); |
| | | |
| | | orderDriverInfos.add(orderDriverInfo); |
| | | |
| | |
| | | transportInfo.setTruckCompany(tOrder.getTruckCompany()); |
| | | transportInfo.setPickupTime(tOrder.getPickupTimeTruck()); |
| | | transportInfo.setStreetTurn(tOrder.getStreetTurn()); |
| | | |
| | | |
| | | transportInfo.setLineHold(terminalStatus.getLineHold()); |
| | | transportInfo.setCustomHold(terminalStatus.getCustomHold()); |
| | | transportInfo.setPierpass(terminalStatus.getPierpass()); |
| | | transportInfo.setCTF(terminalStatus.getCtf()); |
| | | transportInfo.setClosedArea(terminalStatus.getClosedArea()); |
| | | transportInfo.setLFD(terminalStatus.getLfd()); |
| | | |
| | | transportInfo.setList(orderDriverInfos); |
| | | Integer examSite = tOrder.getExamSite(); |
| | | if(Objects.nonNull(examSite)){ |