Commit 4a47291a authored by Smile's avatar Smile

需求134后台-集运-包裹列表-转运

parent abaa0888
ALTER TABLE ecw_order
ADD COLUMN transfer_source TINYINT NULL COMMENT '转运来源,0-客户申请,1-后台申请',
ADD COLUMN transfer_price_confirmation_status TINYINT NULL COMMENT '转运价格确认状态,0-未生成,1-待确认,2-已确认';
......@@ -700,4 +700,10 @@ public class OrderDO extends BaseDO {
@ApiModelProperty(value = "日志描述信息传值封装字段")
@TableField(exist = false)
private String msg = "";
@ApiModelProperty(value = "转运来源,0-客户申请,1-后台申请")
private Integer transferSource;
@ApiModelProperty(value = "转运价格确认状态,0-未生成,1-待确认,2-已确认")
private Integer transferPriceConfirmationStatus;
}
......@@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO;
import cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService;
import cn.iocoder.yudao.module.depository.dal.mysql.warehouse.WarehouseLineMapper;
import cn.iocoder.yudao.module.depository.dto.LogisticsInfoDto;
import cn.iocoder.yudao.module.order.convert.cons.ConsConvert;
import cn.iocoder.yudao.module.order.dal.dataobject.cons.ConsDO;
......@@ -30,10 +31,8 @@ import cn.iocoder.yudao.module.order.vo.orderConsignor.OrderConsignorBackVO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductDO;
import cn.iocoder.yudao.module.product.dal.mysql.product.ProductMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.C;
import org.redisson.api.RAtomicLong;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
......@@ -49,6 +48,7 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.order.enums.ErrorCodeConstants.NOT_FIND_LOGISTICS_INFO;
/**
* 集运包裹主 Service 实现类
......@@ -80,6 +80,9 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
@Resource
private CustomerContactsService customerContactsService;
@Resource
private WarehouseLineMapper warehouseLineMapper;
@Override
@Transactional
public Long createCons(ConsCreateReqVO createReqVO) {
......@@ -383,6 +386,9 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
orderBackVO.setIsCargoControl(false);
orderBackVO.setCustomsType(1);
orderBackVO.setWarehouseType(1);
orderBackVO.setIsCollection(false);
orderBackVO.setType("1");
orderBackVO.setDrawee(2);
LogisticsInfoDto logisticsInfo = new LogisticsInfoDto();
List<ConsItemDO> consItemDOS = consItemService.selectList(new LambdaQueryWrapperX<ConsItemDO>().in(ConsItemDO::getConsId, ids));
List<OrderItemBackVO> orderItemVOList = new ArrayList<>();
......@@ -433,13 +439,18 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
if (consDO.getTransportId() != null && orderBackVO.getTransportId() == null) {
orderBackVO.setTransportId(consDO.getTransportId());
}
if (consDO.getWarehouseLineId() != null && logisticsInfo.getLineId() == null) {
if(consDO.getWarehouseLineId()!=null&& logisticsInfo.getLineId()==null){
logisticsInfo =
warehouseLineMapper.getStartInfoAndDestInfoByLineId(consDO.getWarehouseLineId());
if (Objects.isNull(logisticsInfo)) {
throw exception(NOT_FIND_LOGISTICS_INFO);
}
logisticsInfo.setLineId(consDO.getWarehouseLineId());
logisticsInfo.setDestCityId(consDO.getConsigneeCityId());
logisticsInfo.setDestCountryId(consDO.getConsigneeCountryId());
logisticsInfo.setTransportId(consDO.getTransportId());
orderBackVO.setLogisticsInfoDto(logisticsInfo);
orderBackVO.setLineId(consDO.getWarehouseLineId());
orderBackVO.setObjectiveId(consDO.getConsigneeCityId());
orderBackVO.setObjectiveId(logisticsInfo.getDestCityId());
orderBackVO.setDepartureId(logisticsInfo.getStartCityId());
}
//包裹内商品处理
List<ConsItemDO> consItemDOList = consItemsMap.get(consDO.getId());
......
......@@ -662,6 +662,12 @@ public class OrderBackVO {
@ApiModelProperty(value = "到仓重量")
private BigDecimal checkWeight;
@ApiModelProperty(value = "转运来源,0-客户申请,1-后台申请")
private Integer transferSource;
@ApiModelProperty(value = "转运价格确认状态,0-未生成,1-待确认,2-已确认")
private Integer transferPriceConfirmationStatus;
public void setExternalWarehouseJson(String externalWarehouseJson) {
this.externalWarehouseJson = externalWarehouseJson;
if (StringUtils.isNotBlank(externalWarehouseJson)) {
......
......@@ -402,6 +402,12 @@ public class OrderBaseVO {
@ApiModelProperty(value = "到仓重量")
private BigDecimal checkWeight;
@ApiModelProperty(value = "转运来源,0-客户申请,1-后台申请")
private Integer transferSource;
@ApiModelProperty(value = "转运价格确认状态,0-未生成,1-待确认,2-已确认")
private Integer transferPriceConfirmationStatus;
public void setExceptionReason(String exceptionReason) {
this.exceptionReason = StringUtils.isNotBlank(exceptionReason) ? I18nMessage.getMessage(exceptionReason) : exceptionReason;
}
......
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