Commit 25ac6d8b authored by zhengyi's avatar zhengyi

提供预警控货订单列表查询业务

Signed-off-by: default avatarzhengyi <landuo321@aliyun.com>
parent b42315dc
...@@ -86,7 +86,22 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO> ...@@ -86,7 +86,22 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO>
*/ */
List<OrderCargoControlDO> getOrderCargoControlList(OrderCargoControlQueryVO query); List<OrderCargoControlDO> getOrderCargoControlList(OrderCargoControlQueryVO query);
PageResult<OrderBackPageVO> orderPage(OrderQueryVO query, PageVO page); PageResult<OrderBackPageVO> cargoControlOrderPage(OrderQueryVO query, PageVO page);
/**
* 预警控货订单信息
* 满足条件:1、控货订单
* 2、非海外仓订单
* 3、控货订单放货三次未提货完
* 4、控货订单已过免仓时效,未完成放货
* 以上为查询出的预警控货订单,以便于将订单转海外仓货、收取仓储费用、提醒客户放货等业务操作
*
* @param query
* @param page
* @return
*/
PageResult<OrderBackPageVO> warningCargoControlOrderPage(OrderQueryVO query, PageVO page);
OrderCargoControlBackVO getOrderCargoControlInfo(Long orderId); OrderCargoControlBackVO getOrderCargoControlInfo(Long orderId);
...@@ -108,9 +123,10 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO> ...@@ -108,9 +123,10 @@ public interface OrderCargoControlService extends IService<OrderCargoControlDO>
void exportCargoControlOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException; void exportCargoControlOrderExcel(HttpServletResponse response, OrderQueryVO query) throws IOException;
// FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception; // FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryVO query) throws Exception;
FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception; FileDO makeCargoControlOrderExcelFile(Long userId, Integer userType, OrderQueryDTO query) throws Exception;
/** /**
* 判断是否控货人是否设置了控货密码 * 判断是否控货人是否设置了控货密码
* *
......
...@@ -152,7 +152,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -152,7 +152,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
// 当控货人手机号没有注册web用户,或者用户没有设置控货密码时不能进行控货密码放货 // 当控货人手机号没有注册web用户,或者用户没有设置控货密码时不能进行控货密码放货
if (isPasswordNull) { if (isPasswordNull) {
throw exception(CONTROLLER_USER_NOT_SET_CONTROL_PASSWORD); throw exception(CONTROLLER_USER_NOT_SET_CONTROL_PASSWORD);
}else { } else {
// 参数:未加密密码,编码后的密码 // 参数:未加密密码,编码后的密码
throw exception(USER_PASSWORD_FAILED); throw exception(USER_PASSWORD_FAILED);
} }
...@@ -175,7 +175,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -175,7 +175,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
String msg = String.format("订单控货人信息由姓名%s,电话+%s,转移为姓名%s,电话+%s,校验方式:%s", String msg = String.format("订单控货人信息由姓名%s,电话+%s,转移为姓名%s,电话+%s,校验方式:%s",
orgOrderCargoControlDO.getName() + "/" + orgOrderCargoControlDO.getNameEn(), orgOrderCargoControlDO.getDialCode() + orgOrderCargoControlDO.getPhone(), orgOrderCargoControlDO.getName() + "/" + orgOrderCargoControlDO.getNameEn(), orgOrderCargoControlDO.getDialCode() + orgOrderCargoControlDO.getPhone(),
orderCargoControl.getName() + "/" + (StringUtils.isNotBlank(orderCargoControl.getNameEn()) ? orderCargoControl.getNameEn() : "空"), orderCargoControl.getDialCode() + orderCargoControl.getPhone(), orderCargoControl.getName() + "/" + (StringUtils.isNotBlank(orderCargoControl.getNameEn()) ? orderCargoControl.getNameEn() : "空"), orderCargoControl.getDialCode() + orderCargoControl.getPhone(),
isPasswordPick ? "密码校验": "验证码校验"); isPasswordPick ? "密码校验" : "验证码校验");
orderBusinessService.createOrderControlLog(orderCargoControl.getOrderId(), 3, "控货人信息转移", msg, 0L); orderBusinessService.createOrderControlLog(orderCargoControl.getOrderId(), 3, "控货人信息转移", msg, 0L);
// 返回 // 返回
return orderCargoControl.getId(); return orderCargoControl.getId();
...@@ -225,7 +225,18 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont ...@@ -225,7 +225,18 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
} }
@Override @Override
public PageResult<OrderBackPageVO> orderPage(OrderQueryVO query, PageVO page) { public PageResult<OrderBackPageVO> cargoControlOrderPage(OrderQueryVO query, PageVO page) {
return orderQueryService.adminCargoControlOrderPage(query, page);
}
@Override
public PageResult<OrderBackPageVO> warningCargoControlOrderPage(OrderQueryVO query, PageVO page) {
/* 满足条件:1、控货订单
* 2、非海外仓订单
* 3、控货订单放货三次未提货完
* 4、控货订单已过免仓时效,未完成放货
*/
query.setWarningOrder(1);
return orderQueryService.adminCargoControlOrderPage(query, page); return orderQueryService.adminCargoControlOrderPage(query, page);
} }
......
...@@ -525,6 +525,9 @@ public class OrderQueryVO { ...@@ -525,6 +525,9 @@ public class OrderQueryVO {
private Boolean isInOpenSea; private Boolean isInOpenSea;
@ApiModelProperty(value = "是否预警控货订单: 1 是")
private Integer warningOrder;
public void setStatus(Integer status) { public void setStatus(Integer status) {
this.status = status; this.status = status;
this.asStatus = status; this.asStatus = status;
......
...@@ -1863,6 +1863,21 @@ ...@@ -1863,6 +1863,21 @@
<if test="query.status != null"> <if test="query.status != null">
AND o.`status` = #{query.status} AND o.`status` = #{query.status}
</if> </if>
<if test="query.warningOrder != null and query.warningOrder == 1 ">
AND (o.type is null or o.type = '' or NOT FIND_IN_SET(2, o.type))
AND o.`is_cargo_control` = 1
AND o.unload_time is not null
AND ((select IFNULL(sum(p.pick_num), 0) from `ecw_order_cargo_control_pick` p where p.order_id = o.order_id and p.status = 3) &lt; o.`sum_num`
or
DATE_ADD(o.unload_time, INTERVAL (
SELECT
IFNULL(ew_dest.rent_free_days, 0)
FROM
ecw_warehouse_line ewl
JOIN ecw_warehouse ew_dest ON ewl.dest_warehouse_id = ew_dest.id
WHERE ewl.id = o.line_id
) DAY) &lt; now())
</if>
<if test="query.abnormalState != null"> <if test="query.abnormalState != null">
<choose> <choose>
<when test="query.abnormalState != 0"> <when test="query.abnormalState != 0">
......
...@@ -94,7 +94,15 @@ public class OrderCargoControlController { ...@@ -94,7 +94,15 @@ public class OrderCargoControlController {
public CommonResult<PageResult<OrderBackPageVO>> cargoControlOrderPage(OrderQueryVO query, PageVO page) { public CommonResult<PageResult<OrderBackPageVO>> cargoControlOrderPage(OrderQueryVO query, PageVO page) {
query.setUserType(UserTypeEnum.ADMIN.getValue()); query.setUserType(UserTypeEnum.ADMIN.getValue());
PageResult<OrderBackPageVO> pageResult = PageResult<OrderBackPageVO> pageResult =
orderCargoControlService.orderPage(query, page); orderCargoControlService.cargoControlOrderPage(query, page);
return success(pageResult);
}
@GetMapping("/warning/cargo/control/order")
@ApiOperation("获得预警控货订单列表查询订单分页")
public CommonResult<PageResult<OrderBackPageVO>> warningCargoControlOrderPage(OrderQueryVO query, PageVO page) {
query.setUserType(UserTypeEnum.ADMIN.getValue());
PageResult<OrderBackPageVO> pageResult =
orderCargoControlService.warningCargoControlOrderPage(query, page);
return success(pageResult); return success(pageResult);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment