提交 249489f6 authored 作者: huyufan's avatar huyufan

修改bug

上级 918a6d15
...@@ -19,6 +19,9 @@ public class OrderChildPCVO { ...@@ -19,6 +19,9 @@ public class OrderChildPCVO {
@ApiModelProperty("运单编号") @ApiModelProperty("运单编号")
private String childNo; private String childNo;
@ApiModelProperty("车牌号")
private String truckNo;
@ApiModelProperty("运单状态:10:已接单 20:支付 30:前往货源地 40:到达货源地 50:装货成功 60:前往目的地 70:到达目的地 80:收货待确认 90:待结算 100:完成 110:司机取消 111:平台取消") @ApiModelProperty("运单状态:10:已接单 20:支付 30:前往货源地 40:到达货源地 50:装货成功 60:前往目的地 70:到达目的地 80:收货待确认 90:待结算 100:完成 110:司机取消 111:平台取消")
private Integer status; private Integer status;
} }
\ No newline at end of file
...@@ -16,6 +16,7 @@ import com.clx.performance.constant.RedisConstants; ...@@ -16,6 +16,7 @@ import com.clx.performance.constant.RedisConstants;
import com.clx.performance.dao.OrderGoodsTruckBindDao; import com.clx.performance.dao.OrderGoodsTruckBindDao;
import com.clx.performance.enums.OrderGoodsStatusEnum; import com.clx.performance.enums.OrderGoodsStatusEnum;
import com.clx.performance.enums.OrderGoodsTypeEnum; import com.clx.performance.enums.OrderGoodsTypeEnum;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.mapper.OrderGoodsMapper; import com.clx.performance.mapper.OrderGoodsMapper;
import com.clx.performance.model.OrderGoods; import com.clx.performance.model.OrderGoods;
import com.clx.performance.service.OrderChildService; import com.clx.performance.service.OrderChildService;
...@@ -24,6 +25,7 @@ import com.clx.performance.vo.pc.OrderChildPCVO; ...@@ -24,6 +25,7 @@ import com.clx.performance.vo.pc.OrderChildPCVO;
import com.clx.performance.vo.pc.OrderGoodsVO; import com.clx.performance.vo.pc.OrderGoodsVO;
import com.msl.common.base.PageData; import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert; import com.msl.common.convertor.aspect.UnitCovert;
import com.msl.common.exception.ServiceSystemException;
import com.msl.common.result.Result; import com.msl.common.result.Result;
import com.msl.common.utils.DateUtils; import com.msl.common.utils.DateUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -105,16 +107,18 @@ public class GoodsOrderController { ...@@ -105,16 +107,18 @@ public class GoodsOrderController {
BigDecimal childSum = childParamsList.stream().map(OrderGoodsChildParams::getExtractWeight).reduce( BigDecimal childSum = childParamsList.stream().map(OrderGoodsChildParams::getExtractWeight).reduce(
BigDecimal.ZERO, BigDecimal::add); BigDecimal.ZERO, BigDecimal::add);
if (orderInfo.getResidueWeight().compareTo(childSum) < 0) { if (orderInfo.getResidueWeight().compareTo(childSum) < 0) {
throw new RuntimeException("当前货单总吨数已超订单总吨数"); throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR,"当前货单总吨数已超订单总吨数");
} }
long beginOrderGoodsId = orderGoodsIdGenerate.getOrderGoodsId(OrderGoodsTypeEnum.Status.PLATFORM.getCode(), childParamsList.size()); long beginOrderGoodsId = orderGoodsIdGenerate.getOrderGoodsId(OrderGoodsTypeEnum.Status.PLATFORM.getCode(), childParamsList.size());
for (OrderGoodsChildParams child : childParamsList) { for (OrderGoodsChildParams child : childParamsList) {
if (child.getPendingOrderWay().equals(2) ) { if (child.getPendingOrderWay().equals(2) ) {
if (child.getNeedTruckNum() == null){ if (child.getNeedTruckNum() == null){
throw new RuntimeException("定向派单必须选择车辆"); throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR,"定向派单必须选择车辆");
} }
if (child.getNeedTruckNum() != child.getTruckList().size()){ if (child.getNeedTruckNum() != child.getTruckList().size()){
throw new RuntimeException("定向派单需要车数与已选车辆数量不一致"); throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR,"定向派单需要车数与已选车辆数量不一致");
} }
} }
OrderGoods orderGoods = new OrderGoods(); OrderGoods orderGoods = new OrderGoods();
...@@ -173,10 +177,10 @@ public class GoodsOrderController { ...@@ -173,10 +177,10 @@ public class GoodsOrderController {
BigDecimal childSum = childParamsList.stream().map(OrderGoodsChildParams::getExtractWeight).reduce( BigDecimal childSum = childParamsList.stream().map(OrderGoodsChildParams::getExtractWeight).reduce(
BigDecimal.ZERO, BigDecimal::add); BigDecimal.ZERO, BigDecimal::add);
if (orderInfo.getResidueWeight().compareTo(childSum) < 0) { if (orderInfo.getResidueWeight().compareTo(childSum) < 0) {
throw new RuntimeException("当前货单总吨数已超订单总吨数"); throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR,"当前货单总吨数已超订单总吨数");
} }
if (childParamsList.size() > 1) { if (childParamsList.size() > 1) {
throw new RuntimeException("全部自有车辆只能全部提取"); throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR,"全部自有车辆只能全部提取");
} }
long beginOrderGoodsId = orderGoodsIdGenerate.getOrderGoodsId(OrderGoodsTypeEnum.Status.PLATFORM.getCode(), childParamsList.size()); long beginOrderGoodsId = orderGoodsIdGenerate.getOrderGoodsId(OrderGoodsTypeEnum.Status.PLATFORM.getCode(), childParamsList.size());
for (OrderGoodsChildParams child : childParamsList) { for (OrderGoodsChildParams child : childParamsList) {
...@@ -188,7 +192,7 @@ public class GoodsOrderController { ...@@ -188,7 +192,7 @@ public class GoodsOrderController {
//提取方式 1提取全部 2提取部分 //提取方式 1提取全部 2提取部分
Integer extractWay = child.getExtractWay(); Integer extractWay = child.getExtractWay();
if (extractWay.equals(2)) { if (extractWay.equals(2)) {
throw new RuntimeException("全部自有车辆只能全部提取"); throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR,"全部自有车辆只能全部提取");
} }
orderGoods.setExtractWay(extractWay); orderGoods.setExtractWay(extractWay);
//需要车辆 //需要车辆
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论