提交 2249ea24 authored 作者: aiqingguo's avatar aiqingguo

运单流程

上级 7e20a1aa
package com.clx.performance.vo.app;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......@@ -38,6 +39,12 @@ public class OrderChildPoundInfoVO {
private Integer poundStatus;
@ApiModelProperty(value = "磅单审核驳回原因", example = "交货信息错误")
private String poundRemark;
@ApiModelProperty(value = "审核驳回类型:1装车 2卸车 3装车+卸车", example = "1")
private Integer poundRejectType;
public Integer getPoundRejectType() {
return rejectType;
}
@ApiModelProperty(value = "状态", example = "0")
private Integer status;
......@@ -47,4 +54,8 @@ public class OrderChildPoundInfoVO {
@ApiModelProperty(value = "卸车磅单图片列表")
private List<String> unloadImageList;
@JsonIgnore
@ApiModelProperty(value = "审核驳回类型:1装车 2卸车 3装车+卸车", example = "1", hidden = true)
private Integer rejectType;
}
\ No newline at end of file
......@@ -109,6 +109,8 @@ public class OrderChildVO {
private Integer poundStatus;
@ApiModelProperty(value = "磅单审核驳回原因", example = "交货信息错误")
private String poundRemark;
@ApiModelProperty(value = "审核驳回类型:1装车 2卸车 3装车+卸车", example = "1")
private Integer poundRejectType;
@ApiModelProperty(value = "状态", example = "0")
private Integer status;
@ApiModelProperty(value = "运输状态 0非运输中 1运输中", example = "1")
......
......@@ -93,6 +93,7 @@ public class OrderChildServiceImpl implements OrderChildService {
// 查询司机车辆信息
DriverTruckInfoFeignVo driverTruckInfo = driverService.getUserDetailInfo(param.getDriverUserNo(), param.getTruckId()).orElseThrow(ResultCodeEnum.FAIL);
BigDecimal truckLoad = driverTruckInfo.getLoad();
String truckNo = driverTruckInfo.getTruckNo();
LocalDateTime now = LocalDateTime.now();
OrderGoods orderGoods = orderGoodsDao.getByOrderGoodsNo(param.getOrderGoodsNo()).orElseThrow(PerformanceResultEnum.ORDER_INVALID);
......@@ -102,6 +103,11 @@ public class OrderChildServiceImpl implements OrderChildService {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_INVALID);
}
OrderGoodsTruckBind orderGoodsTruckBind = null;
if (Objects.equals(orderGoods.getPendingOrderWay(), OrderGoodsPendingOrderWayStatusEnum.Status.EXCLUSIVE.getCode())){
orderGoodsTruckBind = orderGoodsTruckBindDao.getByOrderGoodsNoAndTruckNo(orderGoods.getOrderGoodsNo(), truckNo).orElseThrow(PerformanceResultEnum.ORDER_INVALID);
}
// 库存验证
if (orderGoods.getResidueTransportWeight().compareTo(BigDecimal.ZERO) <= 0) {throw new ServiceSystemException(PerformanceResultEnum.ORDER_WEIGHT_LACK);}
if (orderGoods.getResidueTransportWeight().compareTo(truckLoad) < 0) {throw new ServiceSystemException(PerformanceResultEnum.ORDER_WEIGHT_LACK);}
......@@ -148,7 +154,7 @@ public class OrderChildServiceImpl implements OrderChildService {
updateOrderGoodsAmount(orderGoods, truckLoad);
// 更新定向单状态
updateOrderGoods(orderGoods);
updateOrderGoods(orderGoodsTruckBind);
// 新增运单
orderChildDao.saveEntity(orderChild);
......@@ -659,7 +665,9 @@ public class OrderChildServiceImpl implements OrderChildService {
// 磅单
if (Objects.equals(orderChild.getPoundStatus(), OrderChildPoundAuditEnum.Status.REJECT.getCode())){
result.setPoundRemark(orderChildPoundAuditDao.getPoundAuditDetail(childNo).orNull().getRemark());
Optional<OrderChildPoundAudit> poundAuditDetail = orderChildPoundAuditDao.getPoundAuditDetail(childNo);
result.setPoundRemark(poundAuditDetail.orNull().getRemark());
result.setPoundRejectType(poundAuditDetail.orNull().getRejectType());
}
List<OrderChildImage> imageList = orderChildImageDao.listLoadAndUnload(childNo).orElse(new ArrayList<>());
result.setLoadImageList(imageList.stream().filter(item->Objects.equals(item.getType(),OrderChildImage.Type.LOAD.getCode())).map(item->item.getImage()).collect(Collectors.toList()));
......@@ -764,8 +772,8 @@ public class OrderChildServiceImpl implements OrderChildService {
/**
* 更新定向单状态
*/
private void updateOrderGoods(OrderGoods orderGoods){
if (!Objects.equals(orderGoods.getPendingOrderWay(), 2)){return;}
private void updateOrderGoods(OrderGoodsTruckBind orderGoodsTruckBind){
if (orderGoodsTruckBind == null) {return;}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论