Commit 291b6c51 authored by 332784038@qq.com's avatar 332784038@qq.com

订单编辑关联报价单时忽略始发仓,目的仓一致的所有线路匹配相关报价单

parent 55bd24d6
......@@ -15,6 +15,7 @@ import cn.iocoder.yudao.module.depository.vo.warehouseLine.WarehouseLineBackVO;
import cn.iocoder.yudao.module.depository.vo.warehouseLine.WarehouseLineQueryVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -39,7 +40,7 @@ public interface WarehouseLineMapper extends BaseMapperX<WarehouseLineDO> {
default PageResult<WarehouseLineDO> selectPage(PageVO page, Object object) {
if (object instanceof WarehouseLineQueryVO) {
WarehouseLineQueryVO vo = (WarehouseLineQueryVO)object;
WarehouseLineQueryVO vo = (WarehouseLineQueryVO) object;
return selectPage(page, new LambdaQuery<WarehouseLineDO>()
.inIfPresent(WarehouseLineDO::getStartWarehouseId, vo.getStartWarehouseIdList())
.inIfPresent(WarehouseLineDO::getDestWarehouseId, vo.getDestWarehouseIdList())
......@@ -104,7 +105,6 @@ public interface WarehouseLineMapper extends BaseMapperX<WarehouseLineDO> {
LogisticsInfoDto getStartInfoAndDestInfoByLineId(@Param("lineId") Long lineId);
@ResultType(LogisticsInfoDto.class)
@Select({
"<script>",
......@@ -166,4 +166,13 @@ public interface WarehouseLineMapper extends BaseMapperX<WarehouseLineDO> {
WarehouseLineDO findOneIgnoreDeleted(@Param("id") Long id);
IPage<WarehouseLineBackVO> getWarehouseLinePage(IPage<WarehouseLineBackVO> page, @Param("query") WarehouseLineQueryVO query);
/**
* 根据线路id获取目的仓一致的全部线路id
*
* @param lineId 线路id
* @return
*/
@Select("select w1.id from ecw_warehouse_line w1 left join ecw_warehouse_line w2 on w1.dest_warehouse_id = w2.dest_warehouse_id where w1.deleted = 0 and w2.id = #{lineId}")
List<Long> getDestAsLinesByLineId(@Param("lineId") Long lineId);
}
......@@ -301,8 +301,11 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"</when>",
")",
"<when test = 'queryVO.lineId != null'>",
"AND o.`line_id` = #{queryVO.lineId}",
"AND o.`line_id` in (select w1.id from ecw_warehouse_line w1 left join ecw_warehouse_line w2 on w1.dest_warehouse_id = w2.dest_warehouse_id where w1.deleted = 0 and w2.id = #{queryVO.lineId})",
"</when>",
// "<when test = 'queryVO.lineId != null'>",
// "AND o.`line_id` = #{queryVO.lineId}",
// "</when>",
"<when test = 'queryVO.channelId != null'>",
"AND o.`channel_id` = #{queryVO.channelId}",
"</when>",
......
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@ApiModel("订单关联报价单查询参数")
......@@ -33,6 +34,9 @@ public class OrderAssociationOfferQueryVO {
@NotNull(message = "线路ID不能为空")
private Long lineId;
@ApiModelProperty(value = "线路ID集合(不区分始发仓时,需要根据目的仓获取目的仓一致的所有线路,前端不需要传此参数)")
private List<Long> lineIds;
@ApiModelProperty(value = "渠道ID")
private Long channelId;
......
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