Commit b6037034 authored by 332784038@qq.com's avatar 332784038@qq.com

海外仓申请业务补充

parent 970e9fce
......@@ -419,4 +419,10 @@ public interface ErrorCodeConstants {
ErrorCode ORDER_IS_APPROVAL_IN_PROCESS_WITH_ORDERNOS = new ErrorCode(1004001167, "order.is.approval.in.process.with.ordernos");
// 请选择订单海外仓修改是或否
ErrorCode ORDER_OVERSEAS_WAREHOUSE_UPDATE_IS_OR_NO = new ErrorCode(1004001168, "order.overseas.warehouse.update.is.or.no");
// 该订单已经是海外仓订单
ErrorCode ORDER_IS_OVERSEAS_WAREHOUSE_ORDER = new ErrorCode(1004001169, "order.is.overseas.warehouse.order");
// 该订单已经是非海外仓订单
ErrorCode ORDER_NOT_IS_OVERSEAS_WAREHOUSE_ORDER = new ErrorCode(1004001170, "order.not.is.overseas.warehouse.order");
}
......@@ -519,9 +519,8 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
msg = result == 4 ? "海外仓修改申请取消" : "海外仓修改申请拒绝";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("订单修改海外仓模式");
// 这里不用判断订单中的值了,只需要看申请结果就能得出原值和新值相反的文案结果
applyInfoVO.setOrgValue(applyVO.getIsOverseasWarehouse() ? "订单修改为非海外仓" : "订单修改为海外仓");
applyInfoVO.setNewValue(applyVO.getIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
applyInfoVO.setOrgValue(applyVO.getOrgIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
applyInfoVO.setNewValue(applyVO.getNewIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
list.add(applyInfoVO);
if (StringUtils.isNotBlank(applyVO.getReasonZh())) {
applyInfoVO = new ApplyInfoVO();
......@@ -564,8 +563,8 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
// TODO 海外仓修改申请
String type = orderDO.getType();
if (StringUtils.isNotBlank(type)) {
type = applyVO.getIsOverseasWarehouse() ? type.concat(",2") : Arrays.stream(type.split(",")).filter(s -> !StringUtils.equals("2", s)).collect(Collectors.joining(","));
}else {
type = applyVO.getNewIsOverseasWarehouse() ? type.concat(",2") : Arrays.stream(type.split(",")).filter(s -> !StringUtils.equals("2", s)).collect(Collectors.joining(","));
} else {
type = "2";
}
// TODO 修改订单海外仓模式, 不确定对订单其他方面是否有影响,订单编号生成规则与海外仓无关联
......@@ -573,9 +572,8 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
msg = "海外仓修改申请审批通过";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("订单修改海外仓模式");
// 这里不用判断订单中的值了,只需要看申请结果就能得出原值和新值相反的文案结果
applyInfoVO.setOrgValue(applyVO.getIsOverseasWarehouse() ? "订单修改为非海外仓" : "订单修改为海外仓");
applyInfoVO.setNewValue(applyVO.getIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
applyInfoVO.setOrgValue(applyVO.getOrgIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
applyInfoVO.setNewValue(applyVO.getNewIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
list.add(applyInfoVO);
if (StringUtils.isNotBlank(applyVO.getReasonZh())) {
applyInfoVO = new ApplyInfoVO();
......@@ -616,7 +614,7 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
BeanUtils.copyProperties(releaseInfoDto, orderCargoControlApplyVO);
orderCargoControlApplyVO.setApplyStatus(0);
orderCargoControlApplyVO.setOrderType(releaseInfoDto.getType());
orderCargoControlApplyVO.setIsOverseasWarehouse(StringUtils.isNotBlank(releaseInfoDto.getType()) && releaseInfoDto.getType().contains("2"));
orderCargoControlApplyVO.setOrgIsOverseasWarehouse(StringUtils.isNotBlank(releaseInfoDto.getType()) && releaseInfoDto.getType().contains("2"));
return orderCargoControlApplyVO;
} else {
OrderCargoControlApplyVO applyVO = JSONObject.parseObject(orderApprovalDO.getDetails(), OrderCargoControlApplyVO.class);
......@@ -700,14 +698,14 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
list.add(applyInfoVO);
}
} else if (orderCargoControlApplyVO.getApplyType() == 62) {
if (Objects.isNull(orderCargoControlApplyVO.getIsOverseasWarehouse())) {
throw exception(10000000, "请选择订单海外仓修改是或否");
if (Objects.isNull(orderCargoControlApplyVO.getNewIsOverseasWarehouse())) {
throw exception(ORDER_OVERSEAS_WAREHOUSE_UPDATE_IS_OR_NO);
}
if (StringUtils.isNotBlank(orderDO.getType()) && orderDO.getType().contains("2") && orderCargoControlApplyVO.getIsOverseasWarehouse()) {
throw exception(10000000, "该订单已经是海外仓订单");
if (StringUtils.isNotBlank(orderDO.getType()) && orderDO.getType().contains("2") && orderCargoControlApplyVO.getNewIsOverseasWarehouse()) {
throw exception(ORDER_IS_OVERSEAS_WAREHOUSE_ORDER);
}
if ((StringUtils.isBlank(orderDO.getType()) || !orderDO.getType().contains("2")) && !orderCargoControlApplyVO.getIsOverseasWarehouse()) {
throw exception(10000000, "该订单已经是非海外仓订单");
if ((StringUtils.isBlank(orderDO.getType()) || !orderDO.getType().contains("2")) && !orderCargoControlApplyVO.getNewIsOverseasWarehouse()) {
throw exception(ORDER_NOT_IS_OVERSEAS_WAREHOUSE_ORDER);
}
orderApprovalDO.setOrderId(orderCargoControlApplyVO.getOrderId());
orderApprovalDO.setType(62);
......@@ -719,9 +717,8 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
msg = "海外仓修改申请";
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName("订单修改海外仓模式");
// 这里不用判断订单中的值了,只需要看申请结果就能得出原值和新值相反的文案结果
applyInfoVO.setOrgValue(orderCargoControlApplyVO.getIsOverseasWarehouse() ? "订单修改为非海外仓" : "订单修改为海外仓");
applyInfoVO.setNewValue(orderCargoControlApplyVO.getIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
applyInfoVO.setOrgValue(orderCargoControlApplyVO.getOrgIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
applyInfoVO.setNewValue(orderCargoControlApplyVO.getNewIsOverseasWarehouse() ? "订单修改为海外仓" : "订单修改为非海外仓");
list.add(applyInfoVO);
if (StringUtils.isNotBlank(orderCargoControlApplyVO.getReasonZh())) {
applyInfoVO = new ApplyInfoVO();
......
......@@ -90,8 +90,11 @@ public class OrderCargoControlApplyVO {
private Integer newLockConsigneeDay;
@ApiModelProperty(value = "是否海外仓")
private Boolean isOverseasWarehouse;
@ApiModelProperty(value = "原值是否海外仓")
private Boolean orgIsOverseasWarehouse;
@ApiModelProperty(value = "新值是否海外仓")
private Boolean newIsOverseasWarehouse;
@ApiModelProperty(value = "附件")
......
......@@ -295,4 +295,9 @@ order.sorting.not.shipment.not.update=
box.update.repeat.commit=
order.is.approval.in.process.with.ordernos=
customer.approval.in.processing=
\ No newline at end of file
customer.approval.in.processing=
order.overseas.warehouse.update.is.or.no=
order.is.overseas.warehouse.order=
order.not.is.overseas.warehouse.order=
\ No newline at end of file
......@@ -1101,4 +1101,10 @@ order.sorting.not.shipment.not.update=Order sorting not shipped, order informati
box.update.repeat.commit=Duplicate submission of self assigned number status modification
order.is.approval.in.process.with.ordernos=Orders placed by non-main customers are being approved and cannot be merged: [{}]
customer.approval.in.processing=Non-main customer approval is in progress and cannot be operated
\ No newline at end of file
customer.approval.in.processing=Non-main customer approval is in progress and cannot be operated
order.overseas.warehouse.update.is.or.no=Please select order overseas warehouse modification Yes or No
order.is.overseas.warehouse.order=This order is already an overseas warehouse order
order.not.is.overseas.warehouse.order=This order is already a non overseas warehouse order
\ No newline at end of file
......@@ -1100,4 +1100,11 @@ order.sorting.not.shipment.not.update=\u8BA2\u5355\u5206\u62E3\u672A\u51FA\u8D27
box.update.repeat.commit=\u81EA\u7F16\u53F7\u72B6\u6001\u4FEE\u6539\u91CD\u590D\u63D0\u4EA4
order.is.approval.in.process.with.ordernos=\u975E\u4E3B\u5BA2\u6237\u4E0B\u6709\u8BA2\u5355\u6B63\u5728\u5BA1\u6279\u4E2D\uFF0C\u4E0D\u5141\u8BB8\u5408\u5E76\uFF1A[{}]
customer.approval.in.processing=\u975E\u4E3B\u5BA2\u6237\u5BA1\u6279\u6B63\u5728\u8FDB\u884C\u4E2D\uFF0C\u4E0D\u5141\u8BB8\u5408\u5E76
\ No newline at end of file
customer.approval.in.processing=\u975E\u4E3B\u5BA2\u6237\u5BA1\u6279\u6B63\u5728\u8FDB\u884C\u4E2D\uFF0C\u4E0D\u5141\u8BB8\u5408\u5E76
order.overseas.warehouse.update.is.or.no=\u8bf7\u9009\u62e9\u8ba2\u5355\u6d77\u5916\u4ed3\u4fee\u6539\u662f\u6216\u5426
order.is.overseas.warehouse.order=\u8be5\u8ba2\u5355\u5df2\u7ecf\u662f\u6d77\u5916\u4ed3\u8ba2\u5355
order.not.is.overseas.warehouse.order=\u8be5\u8ba2\u5355\u5df2\u7ecf\u662f\u975e\u6d77\u5916\u4ed3\u8ba2\u5355
\ No newline at end of file
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