提交 a45dc10b 作者: zhangqiliang

墙盒查询和详情中的字段校验

父级 0ef2a14d
......@@ -65,7 +65,7 @@ public class WallboxApplyController {
@ApiImplicitParams({@ApiImplicitParam(name = "orderId", value = "订单id", dataType = "string", paramType = "query",
required = true), @ApiImplicitParam(name = "ifEmergency", value = "是否紧急0否,1是", dataType = "int",
paramType = "query", required = true),})
public BaseResponse<Object> applyInstallation(String orderId, Integer ifEmergency) {
public BaseResponse<Object> applyInstallation(String orderId, Integer ifEmergency,String receiverWarehouseId) {
Assert.notNull(orderId, "订单id不能为空");
Order order = orderService.get(orderId);
if (ObjectUtil.isNull(order)) {
......@@ -75,7 +75,7 @@ public class WallboxApplyController {
// 检查订单状态是否在1-43之间
boolean allowed = status >= OrderStatus.DISPATCHING.getType() && status <= OrderStatus.INSTALLING.getType();
if (!allowed) {
throw new ServiceException("订单已在安装中,无法申请");
throw new ServiceException("订单派单之后才能进行墙盒申请");
}
SessionInfo loginUser = tokenService.getUser();
......
......@@ -90,4 +90,12 @@ public class WallboxApply {
/** 所属区域 */
private String areaName;
/** 收货人 */
private String receiver;
/** 收货人电话 */
private String receiverPhone;
/** 收货仓库id */
private String receiverWarehouseId;
/** 收货仓库名称 */
private String receiverWarehouseName;
}
......@@ -131,6 +131,7 @@ public class WallboxApplyService {
if (StrUtil.isBlank(wallboxModel)) {
throw new ServiceException("订单数据异常,缺失墙盒信息,请联系系统管理员");
}
//获取收货仓库信息
req.setWallboxItemId(order.getWallboxModel());
req.setWallboxModel(order.getWallboxModel() == null ? "" : order.getWallboxModel());
req.setOutOrderId(order.getOutOrderId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论