zxt/stock 库存管理 (#1)
库存字段和映射修改 前端显示修改 Co-authored-by: escapemoon <18834580489@163.com> Reviewed-on: http://106.13.86.63:10082/lhq/FT542-WMS/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
@@ -90,6 +90,15 @@ public class BasStockFreezeRecord extends BaseEntity
|
||||
/** 物料guid */
|
||||
// @Excel(name = "${stock.Freeze.productGuid}")
|
||||
private String productGuid;
|
||||
|
||||
/** 单位名称 */
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
/** 产品型号 */
|
||||
@Excel(name = "产品型号")
|
||||
private String productModel;
|
||||
|
||||
// 创建时间
|
||||
@Excel(name = "操作时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
@@ -101,6 +101,14 @@ public class BasStockMaintainRecord extends BaseEntity
|
||||
// @Excel(name = "${stock.Maintain.barCodeQuantity}")
|
||||
private String barCodeQuantity;
|
||||
|
||||
/** 单位名称 */
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
/** 产品型号 */
|
||||
@Excel(name = "产品型号")
|
||||
private String productModel;
|
||||
|
||||
/** 物料guid */
|
||||
// @Excel(name = "${stock.Maintain.productGuid}")
|
||||
private String productGuid;
|
||||
|
||||
@@ -81,8 +81,7 @@ public class BasStock extends BaseEntity {
|
||||
private String spare8;
|
||||
|
||||
private String voltage;
|
||||
@Excel(name = "件次",sort=18)
|
||||
private String power;
|
||||
|
||||
private String phase;
|
||||
private String netWeight;
|
||||
private String grossWeight;
|
||||
@@ -217,4 +216,112 @@ public class BasStock extends BaseEntity {
|
||||
private String cargoNo;
|
||||
@Excel(name = "备注",sort=31)
|
||||
private String remark;
|
||||
private String power;
|
||||
|
||||
/** 产品型号 */
|
||||
@Excel(name = "产品型号")
|
||||
private String productModel;
|
||||
|
||||
// ---------- 产品明细 pd_ 字段 (来自产品明细 JSON) ----------
|
||||
/** 入库明细ID */
|
||||
private String pdDetailId;
|
||||
/** 产品名称(明细) */
|
||||
private String pdProductName;
|
||||
/** 型号(明细) */
|
||||
private String pdModel;
|
||||
/** 单位(明细) */
|
||||
private String pdUnit;
|
||||
/** 单价(明细) */
|
||||
private String pdUnitPrice;
|
||||
/** 辅助单位(明细) */
|
||||
private String pdAuxUnit;
|
||||
/** 产品属性1(明细) */
|
||||
private String pdAttr1;
|
||||
/** 产品属性2(明细) */
|
||||
private String pdAttr2;
|
||||
/** 数量(明细) */
|
||||
private String pdQuantity;
|
||||
/** 入库数(明细) */
|
||||
private String pdInQty;
|
||||
/** 辅助数量(明细) */
|
||||
private String pdAuxQuantity;
|
||||
/** 总价(明细) */
|
||||
private String pdTotalPrice;
|
||||
/** 成本单价(明细) */
|
||||
private String pdCostUnitPrice;
|
||||
/** 总价2(明细) */
|
||||
private String pdTotalPrice2;
|
||||
/** 核算成本总价(明细) */
|
||||
private String pdAccountCostTotal;
|
||||
/** 核算数量(明细) */
|
||||
private String pdAccountQuantity;
|
||||
/** 核算状态(明细) */
|
||||
private String pdAccountStatus;
|
||||
/** 批号(明细) */
|
||||
private String pdBatchNo;
|
||||
/** 序列号(明细) */
|
||||
private String pdSerialNo;
|
||||
/** 生产日期(明细) */
|
||||
private String pdProdDate;
|
||||
/** 有效日期(明细) */
|
||||
private String pdValidDate;
|
||||
/** 到货日期(明细) */
|
||||
private String pdArrivalDate;
|
||||
/** 备注(明细) */
|
||||
private String pdRemark;
|
||||
/** 自定义字段1(明细) */
|
||||
private String pdCustom1;
|
||||
/** 自定义字段2(明细) */
|
||||
private String pdCustom2;
|
||||
/** 自定义字段3(明细) */
|
||||
private String pdCustom3;
|
||||
/** 自定义字段4(明细) */
|
||||
private String pdCustom4;
|
||||
/** 自定义字段5(明细) */
|
||||
private String pdCustom5;
|
||||
/** 自定义字段6(明细) */
|
||||
private String pdCustom6;
|
||||
/** 装卸工(明细) */
|
||||
private String pdLoader;
|
||||
// ---------- SQL 脚本中新增的其他字段 ----------
|
||||
/** 集合数据(JSON/序列化) */
|
||||
private String Rows;
|
||||
/** 入库主题 */
|
||||
private String Title;
|
||||
/** 入库id */
|
||||
private String Kuin;
|
||||
/** 入库状态 */
|
||||
private String Complete1;
|
||||
/** 申请人 */
|
||||
private String Cateid;
|
||||
/** 申请日期 */
|
||||
private String Date3;
|
||||
/** 确认日期 */
|
||||
private String Date5;
|
||||
/** 审批人 */
|
||||
private String Catein;
|
||||
/** 审批意见 */
|
||||
private String Intro2;
|
||||
/** 入库备注 */
|
||||
private String Intro;
|
||||
/** 关联其他单据id */
|
||||
private String Caigou;
|
||||
/** 添加时间 */
|
||||
private String Date7;
|
||||
/** 库管id */
|
||||
private String Kg;
|
||||
/** 入库类别 */
|
||||
private String Sort1;
|
||||
/** 入库编号 */
|
||||
private String Rkbh;
|
||||
/** 审批状态 */
|
||||
private String Status;
|
||||
/** 产品明细(JSON/集合) */
|
||||
private String KuinList;
|
||||
/** 客户名称 */
|
||||
private String sysIcusIInheritIdIidI413;
|
||||
/** 磅单编号 */
|
||||
private String sysIcusIInheritIdIidI414;
|
||||
/** 入库车号 */
|
||||
private String sysIcusIInheritIdIidI415;
|
||||
}
|
||||
|
||||
@@ -5,81 +5,115 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="com.ruoyi.search.ViewStockDetail.mapper.ViewStockDetailMapper">
|
||||
|
||||
<resultMap type="ViewStockDetail" id="ViewStockDetailResult">
|
||||
<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" />
|
||||
<!-- 与 BasStock 不符的字段已注释 -->
|
||||
<!-- <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="price" column="price" /> -->
|
||||
<!-- <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" />
|
||||
<!-- bs.power 字段与 BasStock 不一致,已注释 -->
|
||||
<!-- <result property="power" column="power_col" /> -->
|
||||
<!-- <result property="parentId" column="parent_id" /> -->
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="supplierNo" column="supplier_no" />
|
||||
<!-- 供应商相关字段与 BasStock 不符,已注释 -->
|
||||
<!-- <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" />
|
||||
<!-- stackingId 非 BasStock 字段,已注释 -->
|
||||
<!-- <result property="stackingId" column="stacking_id" /> -->
|
||||
<result property="backDate" column="back_date" />
|
||||
<result property="remark" column="remark" />
|
||||
<!-- 备注字段使用 pd_remark(明细)或保留在 BasStock 中,基于适配需求先注释 remark -->
|
||||
<!-- <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" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="productType" column="productType" />
|
||||
|
||||
<!-- productType 来自 bas_product(bp),BasStock 未将其作为主表字段,已注释 -->
|
||||
<!-- <result property="productType" column="productType" /> -->
|
||||
|
||||
<!-- 添加 BasStock 的 pd_ 明细映射 -->
|
||||
<result property="pdDetailId" column="pd_detail_id" />
|
||||
<result property="pdProductName" column="pd_product_name" />
|
||||
<result property="pdModel" column="pd_model" />
|
||||
<result property="pdUnit" column="pd_unit" />
|
||||
<result property="pdUnitPrice" column="pd_unit_price" />
|
||||
<result property="pdAuxUnit" column="pd_aux_unit" />
|
||||
<result property="pdAttr1" column="pd_attr1" />
|
||||
<result property="pdAttr2" column="pd_attr2" />
|
||||
<result property="pdQuantity" column="pd_quantity" />
|
||||
<result property="pdInQty" column="pd_in_qty" />
|
||||
<result property="pdAuxQuantity" column="pd_aux_quantity" />
|
||||
<result property="pdTotalPrice" column="pd_total_price" />
|
||||
<result property="pdCostUnitPrice" column="pd_cost_unit_price" />
|
||||
<result property="pdTotalPrice2" column="pd_total_price_2" />
|
||||
<result property="pdAccountCostTotal" column="pd_account_cost_total" />
|
||||
<result property="pdAccountQuantity" column="pd_account_quantity" />
|
||||
<result property="pdAccountStatus" column="pd_account_status" />
|
||||
<result property="pdBatchNo" column="pd_batch_no" />
|
||||
<result property="pdSerialNo" column="pd_serial_no" />
|
||||
<result property="pdProdDate" column="pd_prod_date" />
|
||||
<result property="pdValidDate" column="pd_valid_date" />
|
||||
<result property="pdArrivalDate" column="pd_arrival_date" />
|
||||
<result property="pdRemark" column="pd_remark" />
|
||||
<result property="pdCustom1" column="pd_custom1" />
|
||||
<result property="pdCustom2" column="pd_custom2" />
|
||||
<result property="pdCustom3" column="pd_custom3" />
|
||||
<result property="pdCustom4" column="pd_custom4" />
|
||||
<result property="pdCustom5" column="pd_custom5" />
|
||||
<result property="pdCustom6" column="pd_custom6" />
|
||||
<result property="pdLoader" column="pd_loader" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewStockDetailVo">
|
||||
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 as productType, --产品状态
|
||||
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,
|
||||
bs.spare4, --来源
|
||||
bs.spare1 --用途
|
||||
from bas_stock bs
|
||||
select bs.cargo_space_id, --库位编码
|
||||
bs.tray_code, --托盘
|
||||
bs.product_id, --产品编码
|
||||
bs.product_name,--产品名称
|
||||
bs.quantity, -- 数量
|
||||
|
||||
bs.order_id, --合同号
|
||||
|
||||
bs.stockin_id, --入库单号
|
||||
|
||||
bw.warehouse_id, --仓库编码
|
||||
bw.warehouse_name, --仓库名称
|
||||
bs.in_date, --入库时间
|
||||
|
||||
bs.back_date, --盘点时间
|
||||
|
||||
-- bas_stock 的 pd_ 明细字段
|
||||
bs.pd_product_name, -- 明细产品名称
|
||||
bs.pd_batch_no, -- 明细批次号
|
||||
bs.pd_serial_no, -- 明细序列号
|
||||
bs.pd_model, -- 明细型号
|
||||
bs.pd_unit, -- 明细单位
|
||||
bs.pd_unit_price, -- 明细单价
|
||||
bs.pd_quantity, -- 明细数量
|
||||
bs.pd_total_price, -- 明细金额
|
||||
bs.pd_cost_unit_price,
|
||||
bs.pd_prod_date, -- 明细生产日期
|
||||
bs.pd_valid_date, -- 明细有效日期
|
||||
bs.pd_arrival_date, -- 明细到货日期
|
||||
bs.pd_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">
|
||||
@@ -98,11 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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>
|
||||
@@ -113,8 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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 >= #{inDateStart}</if>
|
||||
<if test="inDateEnd != null and inDateEnd != ''"> and bs.in_date <= #{inDateEnd}</if>
|
||||
|
||||
@@ -25,22 +25,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockFreezeRecordVo">
|
||||
select wh_guid, stock_id, bsfr.cargo_space_id,bw.warehouse_name, bcs.cargo_space_name, bsfr.tray_code, product_id, product_name, print_date, lot_no, old_status, curr_status, method, bsfr.warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid
|
||||
from bas_stock_freeze_record bsfr
|
||||
left join bas_cargo_space bcs on bsfr.cargo_space_id=bcs.cargo_space_id
|
||||
left join bas_warehouse bw on bsfr.warehouse_id=bw.warehouse_id
|
||||
select bsfr.wh_guid, bsfr.stock_id, bsfr.cargo_space_id, bw.warehouse_name, bcs.cargo_space_name, bsfr.tray_code,
|
||||
bsfr.product_id, bsfr.product_name, bsfr.print_date, bsfr.lot_no, bsfr.old_status, bsfr.curr_status, bsfr.method,
|
||||
bsfr.warehouse_id, bsfr.create_time, bsfr.stock_detail_id, bsfr.operating_target, bsfr.bar_code_old_quantity,
|
||||
bsfr.bar_code_quantity, bsfr.product_guid
|
||||
|
||||
from bas_stock_freeze_record bsfr
|
||||
left join bas_cargo_space bcs on bsfr.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_warehouse bw on bsfr.warehouse_id = bw.warehouse_id
|
||||
left join bas_stock bs on bsfr.stock_id = bs.stock_id
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockFreezeRecordList" parameterType="BasStockFreezeRecord" resultMap="BasStockFreezeRecordResult">
|
||||
<include refid="selectBasStockFreezeRecordVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="stockId != null and stockId != ''"> and bsfr.stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bsfr.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bsfr.tray_code = #{trayCode}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productId != null and productId != ''"> and bsfr.product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
|
||||
@@ -25,22 +25,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockMaintainRecordVo">
|
||||
select wh_guid, stock_id, bsmr.cargo_space_id,bw.warehouse_name, bcs.cargo_space_name, bsmr.tray_code, product_id, product_name, print_date, lot_no, old_quantity, quantity, method, bsmr.warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid
|
||||
from bas_stock_maintain_record bsmr
|
||||
left join bas_cargo_space bcs on bsmr.cargo_space_id=bcs.cargo_space_id
|
||||
left join bas_warehouse bw on bsmr.warehouse_id=bw.warehouse_id
|
||||
</sql>
|
||||
<sql id="selectBasStockMaintainRecordVo">
|
||||
select bsmr.wh_guid, bsmr.stock_id, bsmr.cargo_space_id, bw.warehouse_name, bcs.cargo_space_name, bsmr.tray_code,
|
||||
bsmr.product_id, bsmr.product_name, bsmr.print_date, bsmr.lot_no, bsmr.old_quantity, bsmr.quantity, bsmr.method,
|
||||
bsmr.warehouse_id, bsmr.create_time, bsmr.stock_detail_id, bsmr.operating_target, bsmr.bar_code_old_quantity,
|
||||
bsmr.bar_code_quantity, bsmr.product_guid
|
||||
|
||||
from bas_stock_maintain_record bsmr
|
||||
left join bas_cargo_space bcs on bsmr.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_warehouse bw on bsmr.warehouse_id = bw.warehouse_id
|
||||
left join bas_stock bs on bsmr.stock_id = bs.stock_id
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockMaintainRecordList" parameterType="BasStockMaintainRecord" resultMap="BasStockMaintainRecordResult">
|
||||
<include refid="selectBasStockMaintainRecordVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="stockId != null and stockId != ''"> and bsmr.stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bsmr.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bsmr.tray_code = #{trayCode}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productId != null and productId != ''"> and bsmr.product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
|
||||
@@ -5,101 +5,163 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="com.ruoyi.stock.stock.mapper.BasStockMapper">
|
||||
|
||||
<resultMap type="BasStock" id="BasStockResult">
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="stockStatus" column="stock_status" />
|
||||
<result property="productStatus" column="product_status" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="inDate" column="in_date" />
|
||||
<result property="backDate" column="back_date" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="outQuantity" column="out_quantity" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="inType" column="in_type" />
|
||||
<result property="inClassId" column="in_class_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="stackingId" column="stacking_id" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="power" column="power" />
|
||||
<result property="phase" column="phase" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="distribution" column="distribution" />
|
||||
<result property="model" column="model" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="cargoSpaceStatus" column="locked" />
|
||||
<result property="cargoSpaceStockStatus" column="cargoSpaceStockStatus" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="price" column="price" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="supplierId" column="supplier_no" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="productType" column="productType" />
|
||||
<!--<association property="extraField" javaType="ExtraField">
|
||||
<result property="productId" column="product_id" />
|
||||
</association>-->
|
||||
<!-- 基于 stock.sql 的 bas_stock 表字段映射,非表字段已注释保留 -->
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="stockStatus" column="stock_status" />
|
||||
<result property="productStatus" column="product_status" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="inDate" column="in_date" />
|
||||
<result property="backDate" column="back_date" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="outQuantity" column="out_quantity" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="inType" column="in_type" />
|
||||
<result property="inClassId" column="in_class_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="orderId" column="order_id" />
|
||||
|
||||
<!-- 以下为 bas_stock 表中存在的扩展字段(来自 stock.sql) -->
|
||||
<result property="Rows" column="Rows" />
|
||||
<result property="Title" column="Title" />
|
||||
<result property="Kuin" column="Kuin" />
|
||||
<result property="Complete1" column="Complete1" />
|
||||
<result property="Cateid" column="Cateid" />
|
||||
<result property="Date3" column="Date3" />
|
||||
<result property="Date5" column="Date5" />
|
||||
<result property="Catein" column="Catein" />
|
||||
<result property="Intro2" column="Intro2" />
|
||||
<result property="Intro" column="Intro" />
|
||||
<result property="Caigou" column="Caigou" />
|
||||
<result property="Date7" column="Date7" />
|
||||
<result property="Kg" column="Kg" />
|
||||
<result property="Sort1" column="Sort1" />
|
||||
<result property="Rkbh" column="Rkbh" />
|
||||
<result property="Status" column="Status" />
|
||||
<result property="KuinList" column="KuinList" />
|
||||
<result property="sysIcusIInheritIdIidI413" column="sysIcusIInheritIdIidI413" />
|
||||
<result property="sysIcusIInheritIdIidI414" column="sysIcusIInheritIdIidI414" />
|
||||
<result property="sysIcusIInheritIdIidI415" column="sysIcusIInheritIdIidI415" />
|
||||
|
||||
<!-- 产品明细 pd_ 映射(表中存在) -->
|
||||
<result property="pdDetailId" column="pd_detail_id" />
|
||||
<result property="pdProductName" column="pd_product_name" />
|
||||
<result property="pdModel" column="pd_model" />
|
||||
<result property="pdUnit" column="pd_unit" />
|
||||
<result property="pdUnitPrice" column="pd_unit_price" />
|
||||
<result property="pdAuxUnit" column="pd_aux_unit" />
|
||||
<result property="pdAttr1" column="pd_attr1" />
|
||||
<result property="pdAttr2" column="pd_attr2" />
|
||||
<result property="pdQuantity" column="pd_quantity" />
|
||||
<result property="pdInQty" column="pd_in_qty" />
|
||||
<result property="pdAuxQuantity" column="pd_aux_quantity" />
|
||||
<result property="pdTotalPrice" column="pd_total_price" />
|
||||
<result property="pdCostUnitPrice" column="pd_cost_unit_price" />
|
||||
<result property="pdTotalPrice2" column="pd_total_price_2" />
|
||||
<result property="pdAccountCostTotal" column="pd_account_cost_total" />
|
||||
<result property="pdAccountQuantity" column="pd_account_quantity" />
|
||||
<result property="pdAccountStatus" column="pd_account_status" />
|
||||
<result property="pdBatchNo" column="pd_batch_no" />
|
||||
<result property="pdSerialNo" column="pd_serial_no" />
|
||||
<result property="pdProdDate" column="pd_prod_date" />
|
||||
<result property="pdValidDate" column="pd_valid_date" />
|
||||
<result property="pdArrivalDate" column="pd_arrival_date" />
|
||||
<result property="pdRemark" column="pd_remark" />
|
||||
<result property="pdCustom1" column="pd_custom1" />
|
||||
<result property="pdCustom2" column="pd_custom2" />
|
||||
<result property="pdCustom3" column="pd_custom3" />
|
||||
<result property="pdCustom4" column="pd_custom4" />
|
||||
<result property="pdCustom5" column="pd_custom5" />
|
||||
<result property="pdCustom6" column="pd_custom6" />
|
||||
<result property="pdLoader" column="pd_loader" />
|
||||
|
||||
<!-- 以下为非 bas_stock 表字段(保留注释,按要求不删除) -->
|
||||
<!--
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="cargoSpaceStatus" column="locked" />
|
||||
<result property="cargoSpaceStockStatus" column="cargoSpaceStockStatus" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="price" column="price" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="productModel" column="productModel" />
|
||||
<result property="productType" column="productType" />
|
||||
-->
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockVo">
|
||||
select bs.spare3, --账套
|
||||
bs.cargo_space_id, --库位编码
|
||||
bs.tray_code, --托盘
|
||||
bs.product_id, --产品编码
|
||||
bp.product_name,--产品名称
|
||||
bp.spec, -- 规格
|
||||
bs.quantity, -- 数量
|
||||
bs.spare6, -- 金额
|
||||
bp.price, --单价
|
||||
bp.spare1 as productType, --产品状态
|
||||
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,
|
||||
bs.spare4, --来源
|
||||
bs.spare1 --用途
|
||||
<sql id="selectBasStockVo">
|
||||
select bs.cargo_space_id, --库位编码(bas_stock)
|
||||
bs.tray_code, --托盘(bas_stock)
|
||||
bs.product_id, --产品编码(bas_stock)
|
||||
bs.product_name, --产品名称(bas_stock)
|
||||
-- bp.spec, -- 规格(非 bas_stock,已注释保留)
|
||||
bs.quantity, -- 数量(bas_stock)
|
||||
|
||||
-- bp.price, -- 单价(非 bas_stock,已注释保留)
|
||||
-- bp.spare1 as productType, -- 产品状态(非 bas_stock,已注释保留)
|
||||
-- bp.cargo_no, -- 图号(非 bas_stock,已注释保留)
|
||||
bs.order_id, -- 合同号(bas_stock)
|
||||
-- bs.power (已移除,旧字段)
|
||||
|
||||
-- bp.parent_id, -- 常用编码(非 bas_stock,已注释保留)
|
||||
bs.stockin_id, -- 入库单号(bas_stock)
|
||||
bs.warehouse_id, -- 仓库编码(bas_stock)
|
||||
-- bw.warehouse_name, -- 仓库名称(非 bas_stock,已注释保留)
|
||||
bs.in_date, -- 入库时间(bas_stock)
|
||||
<!-- bs.stacking_id 已移除(不在新表中) -->
|
||||
|
||||
bs.back_date, -- 盘点时间(bas_stock)
|
||||
-- bp.remark, -- 备注(非 bas_stock,已注释保留)
|
||||
bs.Rows, -- 集合数据(bas_stock)
|
||||
bs.Title, -- 入库主题(bas_stock)
|
||||
bs.Kuin, -- 入库id(bas_stock)
|
||||
bs.Complete1, -- 入库状态(bas_stock)
|
||||
bs.Cateid, -- 申请人(bas_stock)
|
||||
bs.Date3, -- 申请日期(bas_stock)
|
||||
bs.Date5, -- 确认日期(bas_stock)
|
||||
bs.Catein, -- 审批人(bas_stock)
|
||||
bs.Intro2, -- 审批意见(bas_stock)
|
||||
bs.Intro, -- 入库备注(bas_stock)
|
||||
bs.Caigou, -- 关联单据id(bas_stock)
|
||||
bs.Date7, -- 添加时间(bas_stock)
|
||||
bs.Kg, -- 库管id(bas_stock)
|
||||
bs.Sort1, -- 入库类别(bas_stock)
|
||||
bs.Rkbh, -- 入库编号(bas_stock)
|
||||
bs.Status, -- 审批状态(bas_stock)
|
||||
bs.KuinList, -- 产品明细集合(bas_stock)
|
||||
bs.sysIcusIInheritIdIidI413, -- 客户名称(bas_stock)
|
||||
bs.sysIcusIInheritIdIidI414, -- 磅单编号(bas_stock)
|
||||
bs.sysIcusIInheritIdIidI415, -- 入库车号(bas_stock)
|
||||
bs.pd_product_name, -- 明细产品名称(bas_stock)
|
||||
bs.pd_batch_no, -- 明细批次号(bas_stock)
|
||||
bs.pd_serial_no, -- 明细序列号(bas_stock)
|
||||
bs.pd_prod_date, -- 明细生产日期(bas_stock)
|
||||
bs.pd_valid_date, -- 明细有效日期(bas_stock)
|
||||
bs.pd_arrival_date, -- 明细到货日期(bas_stock)
|
||||
bs.stock_id, -- 库存编码(bas_stock)
|
||||
bs.stock_status, -- 库存状态(bas_stock)
|
||||
bs.lot_no, -- 批次号(bas_stock)
|
||||
bs.out_quantity
|
||||
-- bp.unit, -- 单位(非 bas_stock,已注释保留)
|
||||
-- bp.model as productModel, -- 非 bas_stock,已注释保留
|
||||
-- bcs.locked as locked, -- 非 bas_stock,已注释保留
|
||||
-- bcs.status as cargoSpaceStockStatus, -- 非 bas_stock,已注释保留
|
||||
-- bcs.cargo_space_name as cargo_space_name -- 非 bas_stock,已注释保留
|
||||
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>
|
||||
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
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
|
||||
<include refid="selectBasStockVo"/>
|
||||
@@ -123,20 +185,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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>
|
||||
<!-- 已移除查询条件:stackingId(stacking_id 不在新表) -->
|
||||
|
||||
<!-- 已移除查询条件:voltage, net_weight, gross_weight, distribution, model (不在新表中) -->
|
||||
<if test="unit != null and unit != ''"> and bp.unit like concat('%', #{unit}, '%')</if>
|
||||
<if test="productModel != null and productModel != ''"> and bp.model like concat('%', #{productModel}, '%')</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>
|
||||
@@ -147,13 +200,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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 >= #{inDateStart}</if>
|
||||
<if test="inDateEnd != null and inDateEnd != ''"> and bs.in_date <= #{inDateEnd}</if>
|
||||
<if test="productType != null and productType != ''"> and bp.spare1 = #{productType}</if>
|
||||
|
||||
<!-- 产品明细 搜索条件 -->
|
||||
<if test="pdProductName != null and pdProductName != ''"> and bs.pd_product_name like concat('%', #{pdProductName}, '%')</if>
|
||||
<if test="pdBatchNo != null and pdBatchNo != ''"> and bs.pd_batch_no = #{pdBatchNo}</if>
|
||||
<if test="pdSerialNo != null and pdSerialNo != ''"> and bs.pd_serial_no = #{pdSerialNo}</if>
|
||||
|
||||
|
||||
</where>
|
||||
</select>
|
||||
@@ -166,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="insertBasStock" parameterType="BasStock">
|
||||
insert into bas_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<!-- bas_stock 表字段 -->
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="stockStatus != null">stock_status,</if>
|
||||
@@ -183,27 +241,73 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="inType != null">in_type,</if>
|
||||
<if test="inClassId != null">in_class_id,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="stackingId != null">stacking_id,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
|
||||
<!-- SQL 添加字段(bas_stock 中存在) -->
|
||||
<if test="Rows != null">Rows,</if>
|
||||
<if test="Title != null">Title,</if>
|
||||
<if test="Kuin != null">Kuin,</if>
|
||||
<if test="Complete1 != null">Complete1,</if>
|
||||
<if test="Cateid != null">Cateid,</if>
|
||||
<if test="Date3 != null">Date3,</if>
|
||||
<if test="Date5 != null">Date5,</if>
|
||||
<if test="Catein != null">Catein,</if>
|
||||
<if test="Intro2 != null">Intro2,</if>
|
||||
<if test="Intro != null">Intro,</if>
|
||||
<if test="Caigou != null">Caigou,</if>
|
||||
<if test="Date7 != null">Date7,</if>
|
||||
<if test="Kg != null">Kg,</if>
|
||||
<if test="Sort1 != null">Sort1,</if>
|
||||
<if test="Rkbh != null">Rkbh,</if>
|
||||
<if test="Status != null">Status,</if>
|
||||
<if test="KuinList != null">KuinList,</if>
|
||||
<if test="sysIcusIInheritIdIidI413 != null">sysIcusIInheritIdIidI413,</if>
|
||||
<if test="sysIcusIInheritIdIidI414 != null">sysIcusIInheritIdIidI414,</if>
|
||||
<if test="sysIcusIInheritIdIidI415 != null">sysIcusIInheritIdIidI415,</if>
|
||||
|
||||
<!-- pd_ 明细字段(bas_stock 中存在) -->
|
||||
<if test="pdDetailId != null">pd_detail_id,</if>
|
||||
<if test="pdProductName != null">pd_product_name,</if>
|
||||
<if test="pdModel != null">pd_model,</if>
|
||||
<if test="pdUnit != null">pd_unit,</if>
|
||||
<if test="pdUnitPrice != null">pd_unit_price,</if>
|
||||
<if test="pdAuxUnit != null">pd_aux_unit,</if>
|
||||
<if test="pdAttr1 != null">pd_attr1,</if>
|
||||
<if test="pdAttr2 != null">pd_attr2,</if>
|
||||
<if test="pdQuantity != null">pd_quantity,</if>
|
||||
<if test="pdInQty != null">pd_in_qty,</if>
|
||||
<if test="pdAuxQuantity != null">pd_aux_quantity,</if>
|
||||
<if test="pdTotalPrice != null">pd_total_price,</if>
|
||||
<if test="pdCostUnitPrice != null">pd_cost_unit_price,</if>
|
||||
<if test="pdTotalPrice2 != null">pd_total_price_2,</if>
|
||||
<if test="pdAccountCostTotal != null">pd_account_cost_total,</if>
|
||||
<if test="pdAccountQuantity != null">pd_account_quantity,</if>
|
||||
<if test="pdAccountStatus != null">pd_account_status,</if>
|
||||
<if test="pdBatchNo != null">pd_batch_no,</if>
|
||||
<if test="pdSerialNo != null">pd_serial_no,</if>
|
||||
<if test="pdProdDate != null">pd_prod_date,</if>
|
||||
<if test="pdValidDate != null">pd_valid_date,</if>
|
||||
<if test="pdArrivalDate != null">pd_arrival_date,</if>
|
||||
<if test="pdRemark != null">pd_remark,</if>
|
||||
<if test="pdCustom1 != null">pd_custom1,</if>
|
||||
<if test="pdCustom2 != null">pd_custom2,</if>
|
||||
<if test="pdCustom3 != null">pd_custom3,</if>
|
||||
<if test="pdCustom4 != null">pd_custom4,</if>
|
||||
<if test="pdCustom5 != null">pd_custom5,</if>
|
||||
<if test="pdCustom6 != null">pd_custom6,</if>
|
||||
<if test="pdLoader != null">pd_loader,</if>
|
||||
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="power != null">power,</if>
|
||||
<if test="phase != null">phase,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="distribution != null">distribution,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<!-- 以下为非 bas_stock 字段,注释保留 -->
|
||||
<!-- <if test="voltage != null">voltage,</if> -->
|
||||
<!-- power 字段已移除 -->
|
||||
<!-- <if test="netWeight != null">net_weight,</if> -->
|
||||
<!-- <if test="grossWeight != null">gross_weight,</if> -->
|
||||
<!-- <if test="distribution != null">distribution,</if> -->
|
||||
<!-- model 字段已从 bas_stock 表移除,写入引用已删除 -->
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<!-- bas_stock 字段 values -->
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="stockStatus != null">#{stockStatus},</if>
|
||||
@@ -221,25 +325,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="inType != null">#{inType},</if>
|
||||
<if test="inClassId != null">#{inClassId},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="stackingId != null">#{stackingId},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
|
||||
<!-- SQL 添加字段 values(bas_stock 中存在) -->
|
||||
<if test="Rows != null">#{Rows},</if>
|
||||
<if test="Title != null">#{Title},</if>
|
||||
<if test="Kuin != null">#{Kuin},</if>
|
||||
<if test="Complete1 != null">#{Complete1},</if>
|
||||
<if test="Cateid != null">#{Cateid},</if>
|
||||
<if test="Date3 != null">#{Date3},</if>
|
||||
<if test="Date5 != null">#{Date5},</if>
|
||||
<if test="Catein != null">#{Catein},</if>
|
||||
<if test="Intro2 != null">#{Intro2},</if>
|
||||
<if test="Intro != null">#{Intro},</if>
|
||||
<if test="Caigou != null">#{Caigou},</if>
|
||||
<if test="Date7 != null">#{Date7},</if>
|
||||
<if test="Kg != null">#{Kg},</if>
|
||||
<if test="Sort1 != null">#{Sort1},</if>
|
||||
<if test="Rkbh != null">#{Rkbh},</if>
|
||||
<if test="Status != null">#{Status},</if>
|
||||
<if test="KuinList != null">#{KuinList},</if>
|
||||
<if test="sysIcusIInheritIdIidI413 != null">#{sysIcusIInheritIdIidI413},</if>
|
||||
<if test="sysIcusIInheritIdIidI414 != null">#{sysIcusIInheritIdIidI414},</if>
|
||||
<if test="sysIcusIInheritIdIidI415 != null">#{sysIcusIInheritIdIidI415},</if>
|
||||
|
||||
<!-- pd_ 明细字段 values -->
|
||||
<if test="pdDetailId != null">#{pdDetailId},</if>
|
||||
<if test="pdProductName != null">#{pdProductName},</if>
|
||||
<if test="pdModel != null">#{pdModel},</if>
|
||||
<if test="pdUnit != null">#{pdUnit},</if>
|
||||
<if test="pdUnitPrice != null">#{pdUnitPrice},</if>
|
||||
<if test="pdAuxUnit != null">#{pdAuxUnit},</if>
|
||||
<if test="pdAttr1 != null">#{pdAttr1},</if>
|
||||
<if test="pdAttr2 != null">#{pdAttr2},</if>
|
||||
<if test="pdQuantity != null">#{pdQuantity},</if>
|
||||
<if test="pdInQty != null">#{pdInQty},</if>
|
||||
<if test="pdAuxQuantity != null">#{pdAuxQuantity},</if>
|
||||
<if test="pdTotalPrice != null">#{pdTotalPrice},</if>
|
||||
<if test="pdCostUnitPrice != null">#{pdCostUnitPrice},</if>
|
||||
<if test="pdTotalPrice2 != null">#{pdTotalPrice2},</if>
|
||||
<if test="pdAccountCostTotal != null">#{pdAccountCostTotal},</if>
|
||||
<if test="pdAccountQuantity != null">#{pdAccountQuantity},</if>
|
||||
<if test="pdAccountStatus != null">#{pdAccountStatus},</if>
|
||||
<if test="pdBatchNo != null">#{pdBatchNo},</if>
|
||||
<if test="pdSerialNo != null">#{pdSerialNo},</if>
|
||||
<if test="pdProdDate != null">#{pdProdDate},</if>
|
||||
<if test="pdValidDate != null">#{pdValidDate},</if>
|
||||
<if test="pdArrivalDate != null">#{pdArrivalDate},</if>
|
||||
<if test="pdRemark != null">#{pdRemark},</if>
|
||||
<if test="pdCustom1 != null">#{pdCustom1},</if>
|
||||
<if test="pdCustom2 != null">#{pdCustom2},</if>
|
||||
<if test="pdCustom3 != null">#{pdCustom3},</if>
|
||||
<if test="pdCustom4 != null">#{pdCustom4},</if>
|
||||
<if test="pdCustom5 != null">#{pdCustom5},</if>
|
||||
<if test="pdCustom6 != null">#{pdCustom6},</if>
|
||||
<if test="pdLoader != null">#{pdLoader},</if>
|
||||
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
<if test="phase != null">#{phase},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="distribution != null">#{distribution},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<!-- 非 bas_stock 值占位注释保留 -->
|
||||
<!-- <if test="voltage != null">#{voltage},</if> -->
|
||||
<!-- <if test="netWeight != null">#{netWeight},</if> -->
|
||||
<!-- <if test="grossWeight != null">#{grossWeight},</if> -->
|
||||
<!-- <if test="distribution != null">#{distribution},</if> -->
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -262,35 +409,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="inType != null">in_type = #{inType},</if>
|
||||
<if test="inClassId != null">in_class_id = #{inClassId},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="stackingId != null">stacking_id = #{stackingId},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<!-- 已移除 update set for stacking_id -->
|
||||
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="phase != null">phase = #{phase},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="distribution != null">distribution = #{distribution},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<!-- 以下为非 bas_stock 字段,注释保留 -->
|
||||
<!-- <if test="productName != null">product_name = #{productName},</if> -->
|
||||
<!-- <if test="voltage != null">voltage = #{voltage},</if> -->
|
||||
<!-- power 字段已移除 -->
|
||||
<!-- <if test="netWeight != null">net_weight = #{netWeight},</if> -->
|
||||
<!-- <if test="grossWeight != null">gross_weight = #{grossWeight},</if> -->
|
||||
<!-- <if test="distribution != null">distribution = #{distribution},</if> -->
|
||||
<!-- model 更新已移除 -->
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="spare7 != null">spare7 = #{spare7},</if>
|
||||
<if test="spare8 != null">spare8 = #{spare8},</if>
|
||||
|
||||
<!-- SQL 脚本新增字段 set (bas_stock 中存在) -->
|
||||
<if test="Rows != null">Rows = #{Rows},</if>
|
||||
<if test="Title != null">Title = #{Title},</if>
|
||||
<if test="Kuin != null">Kuin = #{Kuin},</if>
|
||||
<if test="Complete1 != null">Complete1 = #{Complete1},</if>
|
||||
<if test="Cateid != null">Cateid = #{Cateid},</if>
|
||||
<if test="Date3 != null">Date3 = #{Date3},</if>
|
||||
<if test="Date5 != null">Date5 = #{Date5},</if>
|
||||
<if test="Catein != null">Catein = #{Catein},</if>
|
||||
<if test="Intro2 != null">Intro2 = #{Intro2},</if>
|
||||
<if test="Intro != null">Intro = #{Intro},</if>
|
||||
<if test="Caigou != null">Caigou = #{Caigou},</if>
|
||||
<if test="Date7 != null">Date7 = #{Date7},</if>
|
||||
<if test="Kg != null">Kg = #{Kg},</if>
|
||||
<if test="Sort1 != null">Sort1 = #{Sort1},</if>
|
||||
<if test="Rkbh != null">Rkbh = #{Rkbh},</if>
|
||||
<if test="Status != null">Status = #{Status},</if>
|
||||
<if test="KuinList != null">KuinList = #{KuinList},</if>
|
||||
<if test="sysIcusIInheritIdIidI413 != null">sysIcusIInheritIdIidI413 = #{sysIcusIInheritIdIidI413},</if>
|
||||
<if test="sysIcusIInheritIdIidI414 != null">sysIcusIInheritIdIidI414 = #{sysIcusIInheritIdIidI414},</if>
|
||||
<if test="sysIcusIInheritIdIidI415 != null">sysIcusIInheritIdIidI415 = #{sysIcusIInheritIdIidI415},</if>
|
||||
<!-- pd_ 明细字段 set -->
|
||||
<if test="pdDetailId != null">pd_detail_id = #{pdDetailId},</if>
|
||||
<if test="pdProductName != null">pd_product_name = #{pdProductName},</if>
|
||||
<if test="pdModel != null">pd_model = #{pdModel},</if>
|
||||
<if test="pdUnit != null">pd_unit = #{pdUnit},</if>
|
||||
<if test="pdUnitPrice != null">pd_unit_price = #{pdUnitPrice},</if>
|
||||
<if test="pdAuxUnit != null">pd_aux_unit = #{pdAuxUnit},</if>
|
||||
<if test="pdAttr1 != null">pd_attr1 = #{pdAttr1},</if>
|
||||
<if test="pdAttr2 != null">pd_attr2 = #{pdAttr2},</if>
|
||||
<if test="pdQuantity != null">pd_quantity = #{pdQuantity},</if>
|
||||
<if test="pdInQty != null">pd_in_qty = #{pdInQty},</if>
|
||||
<if test="pdAuxQuantity != null">pd_aux_quantity = #{pdAuxQuantity},</if>
|
||||
<if test="pdTotalPrice != null">pd_total_price = #{pdTotalPrice},</if>
|
||||
<if test="pdCostUnitPrice != null">pd_cost_unit_price = #{pdCostUnitPrice},</if>
|
||||
<if test="pdTotalPrice2 != null">pd_total_price_2 = #{pdTotalPrice2},</if>
|
||||
<if test="pdAccountCostTotal != null">pd_account_cost_total = #{pdAccountCostTotal},</if>
|
||||
<if test="pdAccountQuantity != null">pd_account_quantity = #{pdAccountQuantity},</if>
|
||||
<if test="pdAccountStatus != null">pd_account_status = #{pdAccountStatus},</if>
|
||||
<if test="pdBatchNo != null">pd_batch_no = #{pdBatchNo},</if>
|
||||
<if test="pdSerialNo != null">pd_serial_no = #{pdSerialNo},</if>
|
||||
<if test="pdProdDate != null">pd_prod_date = #{pdProdDate},</if>
|
||||
<if test="pdValidDate != null">pd_valid_date = #{pdValidDate},</if>
|
||||
<if test="pdArrivalDate != null">pd_arrival_date = #{pdArrivalDate},</if>
|
||||
<if test="pdRemark != null">pd_remark = #{pdRemark},</if>
|
||||
<if test="pdCustom1 != null">pd_custom1 = #{pdCustom1},</if>
|
||||
<if test="pdCustom2 != null">pd_custom2 = #{pdCustom2},</if>
|
||||
<if test="pdCustom3 != null">pd_custom3 = #{pdCustom3},</if>
|
||||
<if test="pdCustom4 != null">pd_custom4 = #{pdCustom4},</if>
|
||||
<if test="pdCustom5 != null">pd_custom5 = #{pdCustom5},</if>
|
||||
<if test="pdCustom6 != null">pd_custom6 = #{pdCustom6},</if>
|
||||
<if test="pdLoader != null">pd_loader = #{pdLoader},</if>
|
||||
</trim>
|
||||
where stock_id = #{stockId}
|
||||
</update>
|
||||
<insert id="insertBasStockList">
|
||||
INSERT INTO bas_stock
|
||||
(stock_id,cargo_space_id,stock_status,product_status,lot_no,in_date,back_date,product_guid,quantity,job_id,tray_code,out_quantity,stockin_detail_id,stockin_id,in_type,in_class_id,warehouse_id,stacking_id,spare1,spare2,spare3,spare4,spare5,spare6,product_id,product_name,voltage,power,phase,net_weight,gross_weight,distribution,model,order_id,spare7,spare8)
|
||||
(stock_id,cargo_space_id,stock_status,product_status,lot_no,in_date,back_date,product_guid,quantity,job_id,tray_code,out_quantity,stockin_detail_id,stockin_id,in_type,in_class_id,warehouse_id,product_id,product_name,/*voltage,net_weight,gross_weight,distribution,*/order_id,
|
||||
pd_detail_id,pd_product_name,pd_model,pd_unit,pd_unit_price,pd_aux_unit,pd_attr1,pd_attr2,pd_quantity,pd_in_qty,pd_aux_quantity,pd_total_price,pd_cost_unit_price,pd_total_price_2,pd_account_cost_total,pd_account_quantity,pd_account_status,pd_batch_no,pd_serial_no,pd_prod_date,pd_valid_date,pd_arrival_date,pd_remark,pd_custom1,pd_custom2,pd_custom3,pd_custom4,pd_custom5,pd_custom6,pd_loader)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate},#{item.backDate},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.stackingId},#{item.spare1},#{item.spare2},#{item.spare3},#{item.spare4},#{item.spare5},#{item.spare6},#{item.productId}
|
||||
,#{item.productName},#{item.voltage},#{item.power},#{item.phase},#{item.netWeight},#{item.grossWeight},#{item.distribution},#{item.model},#{item.orderId},#{item.spare7},#{item.spare8})
|
||||
(#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate},#{item.backDate},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.productId}
|
||||
,#{item.productName},/*#{item.voltage},#{item.netWeight},#{item.grossWeight},#{item.distribution},*/#{item.orderId},
|
||||
#{item.pdDetailId},#{item.pdProductName},#{item.pdModel},#{item.pdUnit},#{item.pdUnitPrice},#{item.pdAuxUnit},#{item.pdAttr1},#{item.pdAttr2},#{item.pdQuantity},#{item.pdInQty},#{item.pdAuxQuantity},#{item.pdTotalPrice},#{item.pdCostUnitPrice},#{item.pdTotalPrice2},#{item.pdAccountCostTotal},#{item.pdAccountQuantity},#{item.pdAccountStatus},#{item.pdBatchNo},#{item.pdSerialNo},#{item.pdProdDate},#{item.pdValidDate},#{item.pdArrivalDate},#{item.pdRemark},#{item.pdCustom1},#{item.pdCustom2},#{item.pdCustom3},#{item.pdCustom4},#{item.pdCustom5},#{item.pdCustom6},#{item.pdLoader})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -298,7 +493,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update bas_stock set stock_status = #{stockStatus} where tray_code = #{trayCode}
|
||||
</update>
|
||||
<update id="resetPdRecord">
|
||||
update bas_stock set spare7 = '0'
|
||||
update bas_stock set pd_account_status = '0'
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockByStockId" parameterType="String">
|
||||
|
||||
Reference in New Issue
Block a user