| | |
| | | String cityCode = row.getCell(12).getStringCellValue(); |
| | | Order order = this.getOne(new LambdaQueryWrapper<Order>() |
| | | .eq(Order::getOrderNumber, orderNum) |
| | | .eq(Order::getOrderType, 2) |
| | | .eq(Order::getDistributionMode,2) |
| | | .eq(Order::getOrderStatus, 1) |
| | | ); |
| | | if (order == null){ |
| | | throw new ServiceException("订单不存在:"+orderNum, 500); |
| | | } |
| | | |
| | | Integer orderType = order.getOrderType(); |
| | | if (orderType != 2){ |
| | | throw new ServiceException("该订单:"+orderNum+"类型不为单品订单", 500); |
| | | } |
| | | if (order.getDistributionMode() != 2){ |
| | | throw new ServiceException("该订单:"+orderNum+"配送方式不为快递", 500); |
| | | } |
| | | Integer orderStatus = order.getOrderStatus(); |
| | | if (orderStatus != 1){ |
| | | throw new ServiceException("该订单:"+orderNum+"状态不为待发货", 500); |
| | | } |
| | | |
| | | String companyNameByCode = ExpressCompanyMap.getCompanyNameByCode(expressName); |
| | | if(StringUtils.isEmpty(companyNameByCode)){ |
| | | throw new ServiceException("快递公司编码错误:"+expressName, 500); |