Commit fc2de1a7 authored by zhengyi's avatar zhengyi

Merge branch 'release-fix-zhengyi' into release-fix

# Conflicts:
#	yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/dal/mysql/offer/OfferMapper.java
parents cc03f5c8 0468fd2c
......@@ -404,4 +404,17 @@ public interface ErrorCodeConstants {
ErrorCode ORDER_CARGO_CONTROL_LIMIT_UPDATE_CONSIGNEE_INFO = new ErrorCode(1004001156, "order.cargo.control.limit.update.consignee.info");
ErrorCode ORDER_CARGO_CONTROL_CONSIGNEE_LIMIT_UPDATE_APPLYING = new ErrorCode(1004001157, "order.cargo.control.consignee.limit.update.applying");
ErrorCode ORDER_CARGO_CONTROL_OVERSEAS_WAREHOUSE_UPDATE_APPLYING = new ErrorCode(1004001158, "order.cargo.control.overseas.warehouse.update.applying");
ErrorCode ORDER_EXISTS_PICKUP_NOT_CARGO_CONTROL = new ErrorCode(1004001159, "order.exists.pickup.not.cargo.control");
ErrorCode ORDER_EXISTS_PICK_NOT_CANCEL_CARGO_CONTROL = new ErrorCode(1004001160, "order.exists.pick.not.cancel.cargo.control");
ErrorCode ORDER_OVERSEAS_WAREHOUSE_UPDATE_NEED_APPLY = new ErrorCode(1004001161, "order.overseas.warehouse.update.need.applying");
ErrorCode NOT_UPDATE_DEST_COUNTRY = new ErrorCode(1004001162, "order.not.update.dest.country");
ErrorCode NOT_UPDATE_DEPARTURE = new ErrorCode(1004001163, "order.not.update.departure");
ErrorCode NOT_UPDATE_TRANSPORT = new ErrorCode(1004001164, "order.not.update.transport");
ErrorCode ORDER_PRE_INSTALLATION_UNPACKAGED_CONTAINER_NOT_UPDATE = new ErrorCode(1004001165, "order.pre.installation.unpackaged.container.not.update");
// /空运订单分拣未出货, 锁定订单信息无法修改
ErrorCode ORDER_SORTING_NOT_SHIPMENT_NOT_UPDATE = new ErrorCode(1004001166, "order.sorting.not.shipment.not.update");
}
......@@ -41,19 +41,27 @@ public interface OrderService extends IService<OrderDO> {
OrderDO createOrder(OrderCreateReqVO createReqVO, MemberUserDO memberUserDO);
/**
* 更新订单
* 更新编辑下单或草稿订单
*
* @param updateReqVO 更新信息
*/
void updateOrder(@Valid OrderUpdateReqVO updateReqVO, MemberUserDO memberUserDO);
/**
* 更新订单
* 更新入仓订单
*
* @param updateReqVO 更新信息
* @param memberUserDO 会员信息
*/
void updateOrderApply(@Valid OrderUpdateReqVO updateReqVO, MemberUserDO memberUserDO);
/**
* 更新出货订单
*
* @param updateReqVO 更新信息
*/
void shipmentOrderApplyUpdate(@Valid OrderUpdateReqVO updateReqVO, MemberUserDO memberUserDO);
/**
* 订单入仓
......
......@@ -81,6 +81,7 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.UNAUTHORIZED;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
......@@ -105,7 +106,6 @@ public class OrderController {
private RoleApi roleApi;
@Autowired
private OrderItemService orderItemService;
@Autowired
private ProductService productService;
@Autowired
......@@ -268,7 +268,7 @@ public class OrderController {
@ApiOperation("(新修改订单)订单修改审批申请")
// @PreAuthorize("@ss.hasPermission('ecw:order:update')")
@Idempotent(timeout = 5)
public CommonResult<Boolean> specialApplyOrder(@Valid @RequestBody OrderUpdateReqVO updateReqVO) {
public CommonResult<Boolean> orderUpdateApply(@Valid @RequestBody OrderUpdateReqVO updateReqVO) {
if (Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), updateReqVO.getTransportId())
|| Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(), updateReqVO.getTransportId())) {
if (Objects.isNull(updateReqVO.getChannelId()) || 0 == updateReqVO.getChannelId()) {
......@@ -286,6 +286,27 @@ public class OrderController {
return success(true);
}
@PutMapping("/shipment/update/apply")
@ApiOperation("(新修改订单)订单修改审批申请")
@Idempotent(timeout = 5)
public CommonResult<Boolean> shipmentOrderApplyUpdate(@Valid @RequestBody OrderUpdateReqVO updateReqVO) {
if (Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(), updateReqVO.getTransportId())
|| Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(), updateReqVO.getTransportId())) {
if (Objects.isNull(updateReqVO.getChannelId()) || 0 == updateReqVO.getChannelId()) {
throw exception(ORDER_LINE_CHANNEL_NOT_NULL);
}
}
String redisKey = MessageFormat.format(ORDER_UPDATE_KEY, updateReqVO.getOrderId().toString());
Long count = redisHelper.incrBy(redisKey, 1);
if (count > 1) {
return error(ORDER_UPDATE_REPEAT_COMMIT);
}
redisHelper.expire(redisKey, 1, TimeUnit.MINUTES);
orderService.shipmentOrderApplyUpdate(updateReqVO, null);
redisHelper.delete(redisKey);
return success(true);
}
@GetMapping("update/info")
@ApiOperation("获得订单修改申请详情")
@ApiImplicitParam(name = "approveId", value = "审核ID", required = true, example = "1024", dataType = "Long")
......
......@@ -121,7 +121,9 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"from ecw_offer o ",
"left join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) ",
"<when test = 'pageVO.sourceIds != null and pageVO.sourceIds.size() > 0'>",
"left join ecw_customer user on user.id = o.relation_id ",
"</when>",
"left join system_user u on u.id = o.follow_up_salesman_id ",
"left join ecw_region s on o.objective_id = s.id ",
"left join ecw_warehouse_line line on o.line_id = line.id ",
......
......@@ -32,6 +32,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -44,6 +45,7 @@ import java.text.MessageFormat;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
......@@ -135,6 +137,18 @@ public class MakeBillOfLadingController {
return success(true);
}
@PostMapping("/check/billOfLading/{orderId}")
@ApiOperation("检查提单状态是否已制作提单")
@ApiImplicitParam(name = "orderId", value = "该值为orderId", required = true, example = "1024", dataType = "Long")
public CommonResult<Boolean> checkBillOfLadingStatus(@PathVariable Long orderId) {
MakeBillOfLadingDO billOfLadingDO = makeBillOfLadingService.getOne(new LambdaQueryWrapperX<MakeBillOfLadingDO>()
.eq(MakeBillOfLadingDO::getOrderId, orderId)
.orderByDesc(MakeBillOfLadingDO::getId)
.last("limit 1"));
return success(Objects.nonNull(billOfLadingDO) && StringUtils.isNotBlank(billOfLadingDO.getImgUrl()));
}
@GetMapping("/get")
@ApiOperation("获得制作提货单")
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
......
......@@ -279,3 +279,14 @@ customer.deleted.not.exists=
customer.saved.customer.service.is.null=
customer.deleted.customer.service.is.null=
customer.merge.customer.service.not.same=
order.exists.pickup.not.cargo.control=
order.exists.pick.not.cancel.cargo.control=
order.overseas.warehouse.update.need.applying=
order.not.update.dest.country=
order.not.update.departure=
order.not.update.transport=
order.pre.installation.unpackaged.container.not.update=
order.sorting.not.shipment.not.update=
......@@ -1086,3 +1086,14 @@ customer.deleted.not.exists=customer deleted not exists
customer.saved.customer.service.is.null=customer saved customer service is null
customer.deleted.customer.service.is.null=customer merged customer service is null
customer.merge.customer.service.not.same=tow customer's customer serivce not same
order.exists.pickup.not.cargo.control=The order has a delivery record and cannot be controlled
order.exists.pick.not.cancel.cargo.control=There is a release record for the order, and the control cannot be cancelled
order.overseas.warehouse.update.need.applying=Order overseas warehouse modification requires separate application
order.not.update.dest.country=Not allowed to modify the destination country
order.not.update.departure=Not allowed to modify the origin location
order.not.update.transport=No modification of transportation method allowed
order.pre.installation.unpackaged.container.not.update=Order pre installed without container, order information cannot be modified
order.sorting.not.shipment.not.update=Order sorting not shipped, order information cannot be modified
\ No newline at end of file
......@@ -1086,3 +1086,13 @@ customer.deleted.not.exists=\u88AB\u5408\u5E76\u5BA2\u6237\u4E0D\u5B58\u5728
customer.saved.customer.service.is.null=\u88AB\u4FDD\u7559\u5BA2\u6237\u7684\u5BA2\u6237\u7ECF\u7406\u4E3A\u7A7A
customer.deleted.customer.service.is.null=\u88AB\u5408\u5E76\u7684\u5BA2\u6237\u7684\u5BA2\u6237\u7ECF\u7406\u4E3A\u7A7A
customer.merge.customer.service.not.same=\u4E24\u5BA2\u6237\u7684\u5BA2\u6237\u7ECF\u7406\u4E0D\u4E00\u81F4
order.exists.pickup.not.cargo.control=\u8ba2\u5355\u5b58\u5728\u63d0\u8d27\u8bb0\u5f55\uff0c\u4e0d\u80fd\u8fdb\u884c\u63a7\u8d27
order.exists.pick.not.cancel.cargo.control=\u8ba2\u5355\u5b58\u5728\u653e\u8d27\u8bb0\u5f55\uff0c\u4e0d\u80fd\u53d6\u6d88\u63a7\u8d27
order.overseas.warehouse.update.need.applying=\u8ba2\u5355\u6d77\u5916\u4ed3\u4fee\u6539\u9700\u8981\u5355\u72ec\u7533\u8bf7
order.not.update.dest.country=\u4e0d\u5141\u8bb8\u4fee\u6539\u76ee\u7684\u56fd
order.not.update.departure=\u4e0d\u5141\u8bb8\u4fee\u6539\u59cb\u53d1\u5730
order.not.update.transport=\u4e0d\u5141\u8bb8\u4fee\u6539\u8fd0\u8f93\u65b9\u5f0f
order.pre.installation.unpackaged.container.not.update=\u8ba2\u5355\u9884\u88c5\u672a\u88c5\u67dc, \u8ba2\u5355\u4fe1\u606f\u65e0\u6cd5\u4fee\u6539
order.sorting.not.shipment.not.update=\u8ba2\u5355\u5206\u62e3\u672a\u51fa\u8d27, \u8ba2\u5355\u4fe1\u606f\u65e0\u6cd5\u4fee\u6539
\ 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