提交 6d2d2360 authored 作者: huyufan's avatar huyufan

司机取消运单-运单详情

上级 dad73fa4
package com.clx.performance.vo.pc;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.math.BigDecimal;
import java.util.List;
/**
* @ClassName OrderChildBussInfoVO
* @Description
* @Author kavin
* @Date 2023/9/24 17:41
* @Version 1.0
*/
@ApiModel(description = "司机取消运单-运单详情")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class DriverCancelOrderChildInfo {
@ApiModelProperty(value = "取消原因")
private String cancelRemark;
@ApiModelProperty(value = "取消详细原因")
private String cancelDetail;
@ApiModelProperty(value = "图片集合")
private List<String> imageList;
}
......@@ -91,6 +91,12 @@ public class CarrierOrderChildController {
return Result.page(page.getRecords(), page.getTotal(), page.getPages());
}
@ApiOperation(value = "司机取消运单-运单详情", notes = "<br>By:胡宇帆")
@GetMapping("/driverCancelOrderChildInfo")
public Result<DriverCancelOrderChildInfo> driverCancelOrderChildInfo(@NotBlank(message = "运单编号不能为空") String orderChildNo) {
return Result.ok(orderChildService.driverCancelOrderChildInfo(orderChildNo));
}
//模拟
@GetMapping("/orderChildExpect")
public void getMonitorOrerChildListsByParam() {
......
......@@ -80,4 +80,5 @@ public interface OrderChildService {
void orderChildFinish(String childNo);
DriverCancelOrderChildInfo driverCancelOrderChildInfo(String orderChildNo);
}
......@@ -1222,6 +1222,19 @@ public class OrderChildServiceImpl implements OrderChildService {
}
@Override
public DriverCancelOrderChildInfo driverCancelOrderChildInfo(String orderChildNo) {
DriverCancelOrderChildInfo result = new DriverCancelOrderChildInfo();
List<OrderChildImage> images = orderChildImageDao.getImages(orderChildNo, OrderChildImage.Type.DRIVER_CANCEL.getCode());
OrderChild orderChild = orderChildDao.getByChildNo(orderChildNo).orElseThrow(PerformanceResultEnum.ORDER_CHILD_NO_FOUND);
result.setCancelDetail(orderChild.getCancelDetail());
result.setCancelRemark(orderChild.getCancelRemark());
if (CollectionUtils.isNotEmpty(images)) {
result.setImageList(images.stream().map(OrderChildImage::getImage).collect(Collectors.toList()));
}
return result;
}
/**
* 生成计费单
*/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论