查询统计-库存

This commit is contained in:
liuhanqing
2025-10-27 13:22:19 +08:00
parent 2e760e7a3e
commit 89c47306ce
8 changed files with 433 additions and 508 deletions

View File

@@ -40,7 +40,7 @@ public class ToWcsServiceImpl implements IToWcsService {
@Override
@Scheduled(fixedDelay=1500)
//@Scheduled(fixedDelay=1500)
public void pushOutMydoJob() {
//查询所有未推送的料箱出库作业
MydoJob mydoJobParam = new MydoJob();

View File

@@ -1,11 +1,16 @@
package com.ruoyi.search.ViewStockDetail.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 库存明细查询对象 view_stock_detail
@@ -21,271 +26,116 @@ public class ViewStockDetail extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
// @Excel(name = "序号")
private Long onlyIdentity;
@Excel(name = "库存编码")
private String stockId; // 库存编码
/** 库存ID */
@Excel(name = "库存ID")
private String stockId;
@Excel(name = "账套",dictType = "account_type")
private String spare3; // 账套
@Excel(name = "订单号")
private String orderId;
@Excel(name = "库位编码")
private String cargoSpaceId; // 库位编码
/** 物料编码 */
@Excel(name = "物料编码")
private String productId;
@Excel(name = "托盘")
private String trayCode; // 托盘
/** 物料名称 */
@Excel(name = "物料名称")
private String productName;
@Excel(name = "产品编码")
private String productId; // 产品编码
/** 货位ID */
// @Excel(name = "货位ID")
private String cargoSpaceId;
@Excel(name = "产品名称")
private String productName; // 产品名称
/** 货位名称 */
@Excel(name = "货位名称")
private String cargoSpaceName;
/** 托盘条码 */
@Excel(name = "托盘条码")
private String trayCode;
/** 数量 */
// @Excel(name = "数量")
private String quantity;
/** 作业ID */
@Excel(name = "作业ID")
private String jobId;
/** 批号 */
// @Excel(name = "批号")
private String lotNo;
/** 入库子单ID */
@Excel(name = "入库子单ID")
private String stockinDetailId;
/** 入库时间 */
@Excel(name = "入库时间")
private String inDate;
/** 仓库ID */
// @Excel(name = "仓库ID")
private String warehouseId;
/** 仓库名称 */
// @Excel(name = "仓库名称")
private String warehouseName;
/** 垛型ID */
// @Excel(name = "垛型ID")
private String stackingId;
/** 巷道ID */
@Excel(name = "巷道ID")
private String roadwayId;
/** 货位状态 1空2满 3入库分配 4出库分配 5入库盘点 6出库盘点 */
@Excel(name = "货位状态", dictType = "cargo_space_status")
private String cargoSpaceStatus;
/** 库存状态 1正常 2冻结 */
@Excel(name = "库存状态", dictType = "stock_status")
private String stockStatus;
/** 物料状态 1正常 2盘点待审批 3异常 */
@Excel(name = "物料状态", dictType = "product_status")
private String productStatus;
/** 是否锁定 Y锁、N开 */
// @Excel(name = "是否锁定", dictType = "cargo_space_lock_status")
private String locked;
/** 物料GUID */
@Excel(name = "物料GUID")
private String productGuid;
/** 规格 */
@Excel(name = "规格")
private String spec;
private String spec; // 规格
@Excel(name = "数量")
private BigDecimal quantity; // 数量
@Excel(name = "金额")
private String spare6; // 金额
@Excel(name = "单价")
private BigDecimal price; // 单价
@Excel(name = "产品状态",dictType = "turnover_type")
private String spare1; // 产品状态
/** 单位 */
@Excel(name = "单位")
private String unit;
private String unit; // 单位
/** 价格 */
@Excel(name = "价格")
private String price;
@Excel(name = "图号")
private String cargoNo; // 图号
/** 产品分类 */
@Excel(name = "产品分类")
private String parentId;
@Excel(name = "合同号")
private String orderId; // 合同号
/** 品号描述 */
@Excel(name = "品号描述")
private String cargoNo;
@Excel(name = "台次")
private String spare5; // 台次
/** 英文名称 */
@Excel(name = "英文名称")
private String spare1;
@Excel(name = "件次")
private String power; // 件次
/** 单件净重 */
@Excel(name = "单件净重")
private String spare2;
@Excel(name = "质量",dictType = "quality_type")
private String spare8; // 质量
/** 颜色 */
@Excel(name = "颜色")
private String spare3;
@Excel(name = "常用编码")
private String parentId; // 常用编码
/** 序列号 */
@Excel(name = "序列号")
@Excel(name = "入库单号")
private String stockinId; // 入库单号
@Excel(name = "供应商名称")
private String supplierName; // 供应商名称
@Excel(name = "供应商编号")
private String supplierNo; // 供应商编号
@Excel(name = "仓库编码")
private String warehouseId; // 仓库编码
@Excel(name = "仓库名称")
private String warehouseName; // 仓库名称
@Excel(name = "首次入库时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date inDate; // 入库时间
@Excel(name = "最后出库时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date backDate; // 出库时间
@Excel(name = "盘点标识",dictType = "check_flag")
private String spare7; // 盘点标识
@Excel(name = "出库时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date stackingId; // 盘点时间
@Excel(name = "备注")
private String remark; // 备注
@Excel(name = "库存状态")
private String stockStatus; // 库存状态
@Excel(name = "批次号")
private String lotNo; // 批次号
private BigDecimal outQuantity; // 出库数量
private String roadwayId;
private String theFloor;
private String thePlatoon;
private String theColumn;
private String supplierId;
private String inDateStart;
private String inDateEnd;
private String voltage;
private String productType;
private String outside;
private String spare4;
/** 电压 */
@Excel(name = "电压")
private String spare5;
/** 功率 */
@Excel(name = "功率")
private String spare6;
/** 相位 */
@Excel(name = "相位")
private String spare7;
/** 毛重 */
@Excel(name = "毛重")
private String spare8;
/** NC号 */
@Excel(name = "NC号")
private String spare9;
/** 电源线 */
@Excel(name = "电源线")
private String spare10;
/** 插头 */
@Excel(name = "插头")
private String spare11;
/** 接嘴 */
@Excel(name = "接嘴")
private String spare12;
/** 快捷码 */
@Excel(name = "快捷码")
private String spare13;
/** 库存单位编号 */
@Excel(name = "库存单位编号")
private String spare14;
/** 库存单位名称 */
@Excel(name = "库存单位名称")
private String spare15;
/** 品号群组 */
@Excel(name = "品号群组")
private String spare16;
/** 归类品 */
@Excel(name = "归类品")
private String spare17;
/** 计量体系 */
@Excel(name = "计量体系")
private String spare18;
/** 群组名称 */
@Excel(name = "群组名称")
private String spare19;
/** 批号管理 */
@Excel(name = "批号管理")
private String spare20;
/** 状态 */
@Excel(name = "状态")
private String spare21;
/** 产品大类 */
@Excel(name = "产品大类")
private String spare22;
/** 产品二类 */
@Excel(name = "产品二类")
private String spare23;
/** 产品线/产品系列 */
@Excel(name = "产品线/产品系列")
private String spare24;
/** BOM状态 */
@Excel(name = "BOM状态")
private String spare25;
/** 产品定位 */
@Excel(name = "产品定位")
private String spare26;
/** 电脑板型号 */
@Excel(name = "电脑板型号")
private String spare27;
/** 非标要求 */
@Excel(name = "非标要求")
private String spare28;
/** 品牌 */
@Excel(name = "品牌")
private String spare29;
/** 非标颜色 */
@Excel(name = "非标颜色")
private String spare30;
/** 主颜色 */
@Excel(name = "主颜色")
private String spare31;
/** 辅助颜色 */
@Excel(name = "辅助颜色")
private String spare32;
/** 是否标准款 */
@Excel(name = "是否标准款")
private String spare33;
/** 包装方式 */
@Excel(name = "包装方式")
private String spare34;
/** 主要包装方式 */
@Excel(name = "主要包装方式")
private String spare35;
/** 长 */
@Excel(name = "长")
private String spare36;
/** 宽 */
@Excel(name = "宽")
private String spare37;
/** 高 */
@Excel(name = "高")
private String spare38;
/** 包装材积 */
@Excel(name = "包装材积")
private String spare39;
/** 备注 */
@Excel(name = "描述")
private String remark;
}

View File

@@ -40,7 +40,7 @@ public class ViewStockDetailServiceImpl implements IViewStockDetailService
* @return 库存明细查询
*/
@Override
@DataScope(warehouseAlias = "vsd")
//@DataScope(warehouseAlias = "vsd")
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail)
{
return viewStockDetailMapper.selectViewStockDetailList(viewStockDetail);

View File

@@ -34,7 +34,7 @@ server:
# 日志配置
logging:
level:
com.ruoyi: info
com.ruoyi: debug
org.springframework: warn
# 用户配置

View File

@@ -5,114 +5,117 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.search.ViewStockDetail.mapper.ViewStockDetailMapper">
<resultMap type="ViewStockDetail" id="ViewStockDetailResult">
<result property="onlyIdentity" column="only_identity" />
<result property="stockId" column="stock_id" />
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="trayCode" column="tray_code" />
<result property="quantity" column="quantity" />
<result property="jobId" column="job_id" />
<result property="lotNo" column="lot_no" />
<result property="stockinDetailId" column="stockin_detail_id" />
<result property="inDate" column="in_date" />
<result property="warehouseId" column="warehouse_id" />
<result property="stackingId" column="stacking_id" />
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="roadwayId" column="roadway_id" />
<result property="cargoSpaceStatus" column="cargo_space_status" />
<result property="locked" column="locked" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="spec" column="spec" />
<result property="unit" column="unit" />
<result property="price" column="price" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="remark" column="remark" />
<result property="warehouseName" column="warehouse_name" />
<result property="stockStatus" column="stock_status" />
<result property="productStatus" column="product_status" />
<result property="orderId" column="order_id" />
<result property="spare3" column="spare3" />
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="trayCode" column="tray_code" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="spec" column="spec" />
<result property="quantity" column="quantity" />
<result property="spare6" column="spare6" />
<result property="price" column="price" />
<result property="spare1" column="spare1" />
<result property="unit" column="unit" />
<result property="cargoNo" column="cargo_no" />
<result property="orderId" column="order_id" />
<result property="spare5" column="spare5" />
<result property="power" column="power" />
<result property="spare8" column="spare8" />
<result property="parentId" column="parent_id" />
<result property="stockinId" column="stockin_id" />
<result property="supplierName" column="supplier_name" />
<result property="supplierNo" column="supplier_no" />
<result property="warehouseId" column="warehouse_id" />
<result property="warehouseName" column="warehouse_name" />
<result property="inDate" column="in_date" />
<result property="stackingId" column="stacking_id" />
<result property="spare7" column="spare7" />
<result property="backDate" column="back_date" />
<result property="remark" column="remark" />
<result property="stockId" column="stock_id" />
<result property="stockStatus" column="stock_status" />
<result property="lotNo" column="lot_no" />
<result property="outQuantity" column="out_quantity" />
</resultMap>
<sql id="selectViewStockDetailVo">
SELECT
ROW_NUMBER() OVER (ORDER BY s.stock_id ASC) AS only_identity,
s.stock_id,
s.cargo_space_id,
s.tray_code,
s.quantity,
s.job_id,
s.lot_no,
s.stockin_detail_id,
s.in_date,
s.warehouse_id,
s.stacking_id,
s.order_id,
cs.cargo_space_name,
cs.roadway_id,
cs.status AS cargo_space_status,
s.stock_status AS stock_status,
s.product_status AS product_status,
cs.locked,
p.product_guid,
p.product_id,
p.product_name,
p.spec,
p.unit,
p.price,
p.spare1,
p.spare2,
p.spare5,
p.spare6,
p.spare7,
p.spare8,
p.remark,
bw.warehouse_name
FROM
bas_stock s
LEFT JOIN bas_cargo_space cs ON cs.cargo_space_id = s.cargo_space_id
LEFT JOIN bas_product p ON p.product_guid = s.product_guid
LEFT JOIN bas_warehouse bw on s.warehouse_id = bw.warehouse_id
WHERE
cs.status = '2'
select bs.spare3, --账套
bs.cargo_space_id, --库位编码
bs.tray_code, --托盘
bs.product_id, --产品编码
bs.product_name,--产品名称
bp.spec, -- 规格
bs.quantity, -- 数量
bs.spare6, -- 金额
bp.price, --单价
bp.spare1, --产品状态
bp.unit, -- 单位
bp.cargo_no, --图号
bs.order_id, --合同号
bs.spare5, --台次
bs.power, --件次
bs.spare8, --质量
bp.parent_id, --常用编码
bs.stockin_id, --入库单号
bs2.supplier_name, --供应商名称
bs2.supplier_no, --供应商编号
bw.warehouse_id, --仓库编码
bw.warehouse_name, --仓库名称
bs.in_date, --入库时间
bs.stacking_id, --出库时间
bs.spare7, --盘点标识
bs.back_date, --盘点时间
bp.remark, --备注
bs.stock_id, --库存编码
bs.stock_status, --库存状态
bs.lot_no, --批次号
bs.out_quantity
from bas_stock bs
left join bas_product bp on bs.product_id = bp.product_id
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id
left join bas_supplier bs2 on bs.phase = bs2.supplier_no
</sql>
<select id="selectViewStockDetailList" parameterType="ViewStockDetail" resultMap="ViewStockDetailResult">
<include refid="selectViewStockDetailVo"/>
<if test="stockId != null and stockId != ''"> and s.stock_id like concat('%',#{stockId}, '%')</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and s.cargo_space_id = #{cargoSpaceId}</if>
<if test="trayCode != null and trayCode != ''"> and s.tray_code like concat('%',#{trayCode}, '%')</if>
<if test="quantity != null and quantity != ''"> and s.quantity = #{quantity}</if>
<if test="jobId != null and jobId != ''"> and s.job_id = #{jobId}</if>
<if test="lotNo != null and lotNo != ''"> and s.lot_no = #{lotNo}</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and s.stockin_detail_id = #{stockinDetailId}</if>
<if test="inDate != null and inDate != ''"> and s.in_date = #{inDate}</if>
<if test="warehouseId != null and warehouseId != ''"> and s.warehouse_id = #{warehouseId}</if>
<if test="warehouseName != null and warehouseName != ''"> and bw.warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="stackingId != null and stackingId != ''"> and s.stacking_id = #{stackingId}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cs.cargo_space_name = #{cargoSpaceName}</if>
<if test="roadwayId != null and roadwayId != ''"> and cs.roadway_id = #{roadwayId}</if>
<if test="cargoSpaceStatus != null and cargoSpaceStatus != ''"> and cs.status = #{cargoSpaceStatus}</if>
<if test="stockStatus != null and stockStatus != ''"> and s.stock_status = #{stockStatus}</if>
<if test="productStatus != null and productStatus != ''"> and s.product_status = #{productStatus}</if>
<if test="locked != null and locked != ''"> and cs.locked = #{locked}</if>
<if test="productId != null and productId != ''"> and p.product_id like concat('%',#{productId}, '%')</if>
<if test="productName != null and productName != ''"> and p.product_name like concat('%', #{productName}, '%')</if>
<if test="spec != null and spec != ''"> and p.spec = #{spec}</if>
<if test="unit != null and unit != ''"> and p.unit = #{unit}</if>
<if test="price != null and price != ''"> and p.price = #{price}</if>
<if test="spare1 != null and spare1 != ''"> and p.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and p.spare2 = #{spare2}</if>
<if test="spare5 != null and spare5 != ''"> and p.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and p.spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''"> and p.spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and p.spare8 = #{spare8}</if>
<if test="remark != null and remark != ''"> and p.remark = #{remark}</if>
<if test="orderId != null and orderId != ''"> and s.order_id like concat('%',#{orderId}, '%')</if>
<where>
<if test="stockId != null and stockId != ''"> and bs.stock_id = #{stockId}</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</if>
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
<if test="inDate != null and inDate != ''"> and bs.in_date like concat('%', #{inDate}, '%')</if>
<if test="backDate != null and backDate != ''"> and bs.back_date = #{backDate}</if>
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null and quantity != ''"> and bs.quantity = #{quantity}</if>
<if test="trayCode != null and trayCode != ''"> and bs.tray_code = #{trayCode}</if>
<if test="outQuantity != null and outQuantity != ''"> and bs.out_quantity = #{outQuantity}</if>
<if test="stockinId != null and stockinId != ''"> and bs.stockin_id = #{stockinId}</if>
<if test="warehouseId != null and warehouseId != ''"> and bs.warehouse_id = #{warehouseId}</if>
<if test="stackingId != null and stackingId != ''"> and bs.stacking_id = #{stackingId}</if>
<if test="spare1 != null and spare1 != ''"> and bs.spare1 = #{spare1}</if>
<if test="spare3 != null and spare3 != ''"> and bs.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and bs.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and bs.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and bs.spare6 = #{spare6}</if>
<if test="voltage != null and voltage != ''"> and bs.voltage = #{voltage}</if>
<if test="power != null and power != ''"> and bs.power = #{power}</if>
<if test="orderId != null and orderId != ''"> and bs.order_id = #{orderId}</if>
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
<if test="theFloor != null and theFloor != ''"> and bcs.the_floor = #{theFloor}</if>
<if test="thePlatoon != null and thePlatoon != ''"> and bcs.the_platoon = #{thePlatoon}</if>
<if test="theColumn != null and theColumn != ''"> and bcs.the_column = #{theColumn}</if>
<if test="spec != null and spec != ''"> and bp.spec = #{spec}</if>
<if test="parentId != null and parentId != ''"> and bp.parent_id = #{parentId}</if>
<if test="supplierId != null and supplierId != ''"> and bs2.supplier_no = #{supplierId}</if>
<if test="supplierName != null and supplierName != ''"> and bs2.supplier_name = #{supplierName}</if>
<if test="price != null and price != ''"> and bp.price = #{price}</if>
<if test="inDateStart != null and inDateStart != ''"> and bs.in_date &gt;= #{inDateStart}</if>
<if test="inDateEnd != null and inDateEnd != ''"> and bs.in_date &lt;= #{inDateEnd}</if>
<if test="productType != null and productType != ''"> and bp.spare1 = #{productType}</if>
</where>
</select>
<select id="selectViewStockDetailByOnlyIdentity" parameterType="Long" resultMap="ViewStockDetailResult">

View File

@@ -101,42 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
<include refid="selectBasStockVo"/>
<where>
<if test="stockId != null and stockId != ''"> and bs.stock_id = #{stockId}</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
<if test="productStatus != null and productStatus != ''"> and bs.product_status = #{productStatus}</if>
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
<if test="inDate != null and inDate != ''"> and bs.in_date like concat('%', #{inDate}, '%')</if>
<if test="backDate != null and backDate != ''"> and bs.back_date = #{backDate}</if>
<if test="productGuid != null and productGuid != ''"> and bs.product_guid = #{productGuid}</if>
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null and quantity != ''"> and bs.quantity = #{quantity}</if>
<if test="jobId != null and jobId != ''"> and bs.job_id = #{jobId}</if>
<if test="trayCode != null and trayCode != ''"> and bs.tray_code = #{trayCode}</if>
<if test="outQuantity != null and outQuantity != ''"> and bs.out_quantity = #{outQuantity}</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and bs.stockin_detail_id = #{stockinDetailId}</if>
<if test="stockinId != null and stockinId != ''"> and bs.stockin_id = #{stockinId}</if>
<if test="inType != null and inType != ''"> and bs.in_type = #{inType}</if>
<if test="inClassId != null and inClassId != ''"> and bs.in_class_id = #{inClassId}</if>
<if test="warehouseId != null and warehouseId != ''"> and bs.warehouse_id = #{warehouseId}</if>
<if test="stackingId != null and stackingId != ''"> and bs.stacking_id = #{stackingId}</if>
<if test="spare1 != null and spare1 != ''"> and bs.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and bs.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and bs.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and bs.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and bs.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and bs.spare6 = #{spare6}</if>
<if test="voltage != null and voltage != ''"> and bs.voltage = #{voltage}</if>
<if test="power != null and power != ''"> and bs.power = #{power}</if>
<if test="phase != null and phase != ''"> and bs.phase = #{phase}</if>
<if test="netWeight != null and netWeight != ''"> and bs.net_weight = #{netWeight}</if>
<if test="grossWeight != null and grossWeight != ''"> and bs.gross_weight = #{grossWeight}</if>
<if test="distribution != null and distribution != ''"> and bs.distribution = #{distribution}</if>
<if test="model != null and model != ''"> and bs.model = #{model}</if>
<if test="orderId != null and orderId != ''"> and bs.order_id = #{orderId}</if>
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
<if test="cargoSpaceStockStatus != null and cargoSpaceStockStatus != ''"> and bcs.status = #{cargoSpaceStockStatus}</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
<if test="theFloor != null and theFloor != ''"> and bcs.the_floor = #{theFloor}</if>
<if test="thePlatoon != null and thePlatoon != ''"> and bcs.the_platoon = #{thePlatoon}</if>