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);
/**
* 订单入仓
......
......@@ -62,6 +62,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderFeeApplication.OrderFee
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderOperateLog.OrderOperateLogDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderPickup.OrderPickupDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderSpecialNeed.OrderSpecialNeedDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderTime.OrderTimeDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.OrderWarehouseInDO;
......@@ -70,6 +71,7 @@ import cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControlPick.OrderCargoControlPickMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderItem.OrderItemMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderPickup.OrderPickupMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderTime.OrderTimeMapper;
import cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseIn.OrderWarehouseInMapper;
import cn.iocoder.yudao.module.order.dal.mysql.targetLog.TargetLogMapper;
......@@ -100,6 +102,8 @@ import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableDO;
import cn.iocoder.yudao.module.wealth.enums.BoxAirStatusEnum;
import cn.iocoder.yudao.module.wealth.enums.BoxStatusEnum;
import cn.iocoder.yudao.module.wealth.service.receivable.ReceivableService;
import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableCreateReqVO;
import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableQueryVO;
......@@ -146,6 +150,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
private final OrderBusinessService orderBusinessService;
private final OrderItemMapper orderItemMapper;
private final OrderTimeMapper orderTimeMapper;
private final OrderPickupMapper orderPickupMapper;
private final OrderWarehouseInMapper orderWarehouseInMapper;
private final OrderGuanlianService orderGuanlianService;
private final OrderMutualService orderMutualService;
......@@ -1073,7 +1078,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order.getOrderId())).findFirst().orElse(null);
CustomerDO customerDO = customerService.getById(order.getCustomerId());
if(Objects.nonNull(customerDO)) {
if (Objects.nonNull(customerDO)) {
order.setIsInOpenSea(customerDO.getIsInOpenSea());
order.setYejiType(customerDO.getIsNew() ? 1 : 0);
}
......@@ -1793,6 +1798,146 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (!Objects.equals(updateReqVO.getTransportId(), logisticsInfoDto.getTransportId())) {
throw exception(TRANSPORT_AND_LINE_NOT_AGREEMENT);
}
// 执行订单审批申请业务
this.orderAuditApplyUpdate(updateReqVO, vo, logisticsInfoDto, dictDataRespDTO, false);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void shipmentOrderApplyUpdate(OrderUpdateReqVO updateReqVO, MemberUserDO memberUserDO) {
OrderBackVO vo = orderQueryService.getOrder(updateReqVO.getOrderId());
if (Objects.isNull(vo)) {
throw exception(ORDER_NOT_EXISTS);
}
if (Objects.nonNull(vo.getParentOrderId()) && vo.getParentOrderId() > 0 && !vo.getSplitSeparateOrder()) {
// 如果是拆单订单,且未标记为独立订单,则不允许修改
throw exception(SPLIT_ORDER_REVOKE_CAN_UPDATE);
}
OrderApprovalDO orderApprovalDO = orderApprovalMapper.newItemInfo(null, vo.getOrderId(), ORDER_UPDATE.getValue());
if (Objects.nonNull(orderApprovalDO) && orderApprovalDO.getStatus() == 1) {
throw exception(YOUR_APPLY_PENDING);
}
if (Objects.equals(vo.getStatus(), DRAFT.getValue())
|| Objects.equals(vo.getStatus(), OrderStatusEnum.ORDER_PLACED.getValue()) || Objects.equals(vo.getStatus(), OrderStatusEnum.WAREHOUSING.getValue())) {
// 是草稿、已下单、入仓中状态 直接修改
this.updateOrder(updateReqVO, memberUserDO);
return;
}
if (Objects.equals(vo.getStatus(), OrderStatusEnum.IN_WAREHOUSE.getValue())) {
// 已入仓业务
this.updateOrderApply(updateReqVO, memberUserDO);
return;
}
// 获取功能开关
List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch");
// 智慧预装功能开关
DictDataRespDTO dictDataRespDTO = dictList.stream().filter(dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().orElse(null);
// 此处只允许修改订单商品项的货值
long count = updateReqVO.getOrderItemVOList().stream().filter(it -> Objects.isNull(it.getOrderItemId())).count();
if (count > 0) {
// 订单修改审批,不允许添加新的商品项
throw exception(MODIFY_APPROVAL_NOT_ADD_PROD);
}
/**
* 海运订单预装未装柜/空运订单分拣未出货
* ----跟现有的不便,锁定订单信息无法修改
* l 海运订单、拆单子单已装柜/空运已出货.
* A. 运输方式,始发城市,目的国字段锁定不允许修改
* B. 海外仓选择不允许修改,需要通过申请记录来变更
* C. 是否控货字段,当是否控货从是修改成否,需校验订单是否有放货记录状态≠已取消,有则弹出提示“订单已放货,无法修改为不控货”;
* 当是否控货从否修改成是,校验订单是否有提货记录,有则弹出提示“订单已有提货记录,无法修改成控货”
* D. 当订单所在自编号已起运,无法修改报关方式
* E. 订单信息修改,需校验订单对应提单是否已审批通过,是需弹出提示“提单已制作,如需修改请联系客服”,仅做提示确认后允许提交,审批通过后需要同步更新自编号中订单信息。
* F. 订单修改通过后,插入的操作日志中需要注明当前的订单状态,如在航运中修改,在日志中备注订单状态:航运中
* 注:海运+拆单子单已装柜/空运+拆单子单已出货修改订单信息需单独按钮,支持权限配置,与现有的订单编辑按钮不共用;
* 订单修改审批流程跟现有的订单审批流程一致,订单信息修改后无需产生异常,不判断异常条件是否满足
* 海运订单、拆单子单已装柜/空运已出货,订单信息修改,不需要更新价格
*/
// 海运订单预装未装柜/空运订单分拣未出货, 锁定订单信息无法修改
if (vo.getShipmentState() == 0 || vo.getShipmentState() == 305 || vo.getShipmentState() == 307) {
if (vo.getTransportId() == TransportTypeShortEnum.SEA_CONTAINER.getValue()) {
throw exception(ORDER_PRE_INSTALLATION_UNPACKAGED_CONTAINER_NOT_UPDATE);
}else {
// TODO 当前不是海运就是空运
throw exception(ORDER_SORTING_NOT_SHIPMENT_NOT_UPDATE);
}
}
// 不允许修改运输方式
if (updateReqVO.getTransportId() != vo.getTransportId()) {
throw exception(NOT_UPDATE_TRANSPORT);
}
// TODO 这里需要优化查询,这里查询了后面调用不建议重复查询,后面做优化
LogisticsInfoDto logisticsInfoDto = warehouseLineMapper.getStartInfoAndDestInfoByLineId(updateReqVO.getLineId());
LogisticsInfoDto orgLogisticsInfoDto = warehouseLineMapper.getStartInfoAndDestInfoByLineId(vo.getLineId());
// 不允许修改始发地
if (!Objects.equals(logisticsInfoDto.getStartCityId(), updateReqVO.getDepartureId())) {
throw exception(NOT_UPDATE_DEPARTURE);
}
// 不允许修改目的国
if (!Objects.equals(logisticsInfoDto.getDestCountryId(), orgLogisticsInfoDto.getDestCountryId())) {
throw exception(NOT_UPDATE_DEST_COUNTRY);
}
// 海外仓业务变动申请
if (!vo.getType().contains("2") && updateReqVO.getType().contains("2")){
// TODO 订单如果转海外仓需要单独申请, 订单如果是海外仓改为非海外仓呢?
throw exception(ORDER_OVERSEAS_WAREHOUSE_UPDATE_NEED_APPLY);
}
// 当是否控货从是修改成否,需校验订单是否有放货记录状态≠已取消,有则弹出提示“订单已放货,无法修改为不控货”
if (vo.getIsCargoControl() && !updateReqVO.getIsCargoControl()){
// TODO 校验订单是否有放货记录
long pickCount = orderCargoControlPickMapper.selectCount(new LambdaQueryWrapper<OrderCargoControlPickDO>()
.eq(OrderCargoControlPickDO::getOrderId, updateReqVO.getOrderId())
.in(OrderCargoControlPickDO::getStatus, 1,2,3,4,5,6));
if(pickCount > 0){
// 订单存在放货记录,不能取消控货
throw exception(ORDER_EXISTS_PICK_NOT_CANCEL_CARGO_CONTROL);
}
}
// 当是否控货从否修改成是,校验订单是否有提货记录,有则弹出提示“订单已有提货记录,无法修改成控货”
if (!vo.getIsCargoControl() && updateReqVO.getIsCargoControl()){
// TODO 校验订单是否有提货记录
long pickupCount = orderPickupMapper.selectCount(new LambdaQueryWrapper<OrderPickupDO>()
.eq(OrderPickupDO::getOrderId, vo.getOrderNo()));
if(pickupCount > 0){
// 订单存在提货记录,不能进行控货
throw exception(ORDER_EXISTS_PICKUP_NOT_CARGO_CONTROL);
}
}
// 执行订单审批申请业务
this.orderAuditApplyUpdate(updateReqVO, vo, logisticsInfoDto, dictDataRespDTO, true);
}
/**
* 订单修改审批信息封装
*
* @param updateReqVO
* @param vo
* @param logisticsInfoDto
*/
private void orderAuditApplyUpdate(OrderUpdateReqVO updateReqVO, OrderBackVO vo, LogisticsInfoDto logisticsInfoDto,
DictDataRespDTO dictDataRespDTO, boolean isShipment) {
String statusName = "";
if (isShipment){
if (!Objects.equals(vo.getTransportId(), TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue()) && !Objects.equals(vo.getTransportId(), TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue())) {
statusName = OrderStatusEnum.valueOf(vo.getStatus()).getNameZh();
} else {
if (vo.getStatus().equals(OrderStatusEnum.IN_SHIPPING.getValue())) {
// 此状态为状态13的空运转义状态,当运输方式为空运时,状态13为已起飞, 订单日志信息单独更新
statusName = OrderStatusEnum.HAS_TAKEN_OFF.getNameZh();
}
if (vo.getStatus().equals(OrderStatusEnum.SHIPMENT.getValue()) && vo.getShipmentState().equals(BoxAirStatusEnum.WAREHOUSED)) {
// 此状态为状态32的空运转义状态,当运输方式为空运时,状态32为,出货子状态为出仓, 订单实时状态为出仓
statusName = OrderStatusEnum.WAREHOUSED.getNameZh();
}
if (vo.getStatus().equals(OrderStatusEnum.UNLOADED_CABINET.getValue()) && vo.getShipmentState().equals(BoxAirStatusEnum.TO_WAREHOUSED)) {
// 此状态为空运到仓状态
statusName = OrderStatusEnum.WAREHOUSED.getNameZh();
}
}
}
OrderApprovalDO orderApprovalDO;
OrderDO updateObj = OrderConvert.INSTANCE.convert(updateReqVO);
if (updateReqVO.getIsExternalWarehouse() && StringUtils.isNotBlank(updateReqVO.getType()) && updateReqVO.getType().contains("1")) {
throw exception(EXTERNAL_WAREHOUSE_AND_CONCENTRATE_TRANSPORT_NOT_PARALLEL);
......@@ -1822,7 +1967,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
vo.setCcIds(updateReqVO.getCcIds());
vo.setApplyType(ORDER_UPDATE.getValue());
List<ApplyInfoVO> applyInfoList = new ArrayList<>();
LinkedList<ApplyInfoVO> applyInfoList = new LinkedList<>();
// 通用信息比较
this.compareGenericForms(updateReqVO, vo, applyInfoList);
// 空运信息比较
......@@ -1973,9 +2118,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
// 处理完订单相关的所有业务后,如果有待审批的订单修改内容,则创建待审批任务
if (CollectionUtil.isNotEmpty(applyInfoList)) {
// 订单修改审批提交不允许在出货阶段进行
if (vo.getStatus() > 10 && vo.getStatus() < 19) {
throw exception(ORDER_UPDATE_APPROVAL_MUST_BE_WAREHOUSE_IN);
if (!isShipment) {
// 2024-09-11 重新修正,出货阶段有单独的修改审批业务需要走
// 订单修改审批提交不允许在出货阶段进行
if (vo.getStatus() > 10 && vo.getStatus() < 19) {
throw exception(ORDER_UPDATE_APPROVAL_MUST_BE_WAREHOUSE_IN);
}
}
if (isShipment){
// TODO 出货阶段的修改,需要将当前订单状态值标出,放首位
ApplyInfoVO applyInfoVO = new ApplyInfoVO();
applyInfoVO.setName(statusName);
applyInfoList.addFirst(applyInfoVO);
}
// 订单有修改则执行修改审批任务
vo.setApplyInfoList(applyInfoList);
......@@ -5597,7 +5751,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 强制重新定价, 则需要将特价属性都重置
orderBusinessService.costCalculation(String.valueOf(userId), orderDO, consignorDO.getCustomerId(), Objects.isNull(consigneeDO) ? 0L : consigneeDO.getCustomerId(),
consignorDO.getCustomerContactsId(), Objects.isNull(consigneeDO) ? 0L : consigneeDO.getCustomerContactsId(), orderItemDOList, 10);
}else if (orderBackVO.getIsCheckCoupon()){
} else if (orderBackVO.getIsCheckCoupon()) {
// 如果没有重新计价,这里就需要对订单优惠活动进行检查,是否需要重新匹配新的优惠
List<OrderItemDO> orderItemDOList = orderItemMapper.selectList(new LambdaQueryWrapper<OrderItemDO>().eq(OrderItemDO::getOrderId, orderDO.getOrderId()));
// 是否需要检查优惠卷(如果满足当前优惠卷,则继续使用(即使过期也可以),如果不满足则匹配最新的优惠(排除过期))
......@@ -6185,7 +6339,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
@Override
public Long copyOrder(Long copyOrderId, MemberUserDO memberUserDO) {
OrderDO orderDO = orderMapper.selectById(copyOrderId);
if (Objects.isNull(orderDO)){
if (Objects.isNull(orderDO)) {
throw exception(ORDER_NOT_EXISTS);
}
// 重新生成订单编号, 并重置订单中其他冗余信息
......@@ -6196,10 +6350,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 生成草稿订单编号
String newOrderNo = "DRAFT-" + System.currentTimeMillis();
newOrder.setOrderNo(newOrderNo);
if (Objects.nonNull(memberUserDO)){
if (Objects.nonNull(memberUserDO)) {
// 会员端下单,需要保存会员id信息
newOrder.setUserId(memberUserDO.getId());
}else {
} else {
newOrder.setUserId(0L);
}
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
......
......@@ -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) ",
"left join ecw_customer user on user.id = o.relation_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
......@@ -1085,4 +1085,14 @@ customer.saved.not.exists=\u4FDD\u7559\u5BA2\u6237\u4E0D\u5B58\u5728
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
\ No newline at end of file
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