库存冻结功能

This commit is contained in:
yinjinlu-pc\尹金路
2024-09-08 09:58:54 +08:00
parent 902814c027
commit 4d4f91ccaa
14 changed files with 154 additions and 25 deletions

View File

@@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="workorderId" column="workorder_id"></result>
<result property="workorderCode" column="workorder_code"></result>
<result property="expireDate" column="expire_date" />
<result property="frozenFlag" column="frozen_flag" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
@@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmMaterialStockVo">
select material_stock_id, item_type_id, item_id, item_code, item_name, specification, unit_of_measure, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, vendor_id, vendor_code, vendor_name, vendor_nick, quantity_onhand,recpt_date,workorder_id,workorder_code, expire_date, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_material_stock
select material_stock_id, item_type_id, item_id, item_code, item_name, specification, unit_of_measure, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, vendor_id, vendor_code, vendor_name, vendor_nick, quantity_onhand,recpt_date,workorder_id,workorder_code, expire_date, frozen_flag, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_material_stock
</sql>
<select id="selectWmMaterialStockList" parameterType="WmMaterialStock" resultMap="WmMaterialStockResult">
@@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
<if test="workorderCode !=null and workorderCode !=''">and workorder_code = #{workorderCode}</if>
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
<if test="frozenFlag !=null "> and frozen_flag = #{frozenFlag} </if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if>
@@ -110,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">and workorder_id = #{workorderId}</if>
<if test="workorderCode !=null and workorderCode !=''">and workorder_code like concat('%',#{workorderCode},'%') </if>
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
<if test="frozenFlag !=null "> and frozen_flag = #{frozenFlag} </if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if>
@@ -169,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">workorder_id,</if>
<if test="workorderCode !=null">workorder_code,</if>
<if test="expireDate != null">expire_date,</if>
<if test="frozenFlag !=null ">frozen_flag,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
@@ -204,6 +208,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">#{workorderId},</if>
<if test="workorderCode !=null">#{workorderCode},</if>
<if test="expireDate != null">#{expireDate},</if>
<if test="frozenFlag !=null ">#{frozenFlag}, </if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
@@ -243,6 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">workorder_id = #{workorderId},</if>
<if test="workorderCode !=null">workorder_code = #{workorderCode},</if>
<if test="expireDate != null">expire_date = #{expireDate},</if>
<if test="frozenFlag !=null ">frozen_flag = #{frozenFlag}, </if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>

View File

@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="positionY" column="position_y" />
<result property="positionZ" column="position_z" />
<result property="enableFlag" column="enable_flag" />
<result property="frozenFlag" column="frozen_flag" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
@@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmStorageAreaVo">
select area_id, area_code, area_name, location_id, area, max_loa, position_x, position_y, position_z, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_area
select area_id, area_code, area_name, location_id, area, max_loa, position_x, position_y, position_z, enable_flag, frozen_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_area
</sql>
<select id="selectWmStorageAreaList" parameterType="WmStorageArea" resultMap="WmStorageAreaResult">
@@ -67,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="positionY != null">position_y,</if>
<if test="positionZ != null">position_z,</if>
<if test="enableFlag != null">enable_flag,</if>
<if test="frozenFlag != null">frozen_flag,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
@@ -87,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="positionY != null">#{positionY},</if>
<if test="positionZ != null">#{positionZ},</if>
<if test="enableFlag != null">#{enableFlag},</if>
<if test="frozenFlag != null">#{frozenFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
@@ -111,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="positionY != null">position_y = #{positionY},</if>
<if test="positionZ != null">position_z = #{positionZ},</if>
<if test="enableFlag != null">enable_flag = #{enableFlag},</if>
<if test="frozenFlag != null">frozen_flag = #{frozenFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>

View File

@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="warehouseId" column="warehouse_id" />
<result property="area" column="area" />
<result property="areaFlag" column="area_flag" />
<result property="frozenFlag" column="frozen_flag" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
@@ -23,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmStorageLocationVo">
select location_id, location_code, location_name, warehouse_id, area, area_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_location
select location_id, location_code, location_name, warehouse_id, area, area_flag, frozen_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_location
</sql>
<select id="selectWmStorageLocationList" parameterType="WmStorageLocation" resultMap="WmStorageLocationResult">
@@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id,</if>
<if test="area != null">area,</if>
<if test="areaFlag != null">area_flag,</if>
<if test="frozenFlag != null">frozen_flag,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
@@ -81,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">#{warehouseId},</if>
<if test="area != null">#{area},</if>
<if test="areaFlag != null">#{areaFlag},</if>
<if test="frozenFlag != null">#{frozenFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
@@ -101,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="area != null">area = #{area},</if>
<if test="areaFlag != null">area_flag = #{areaFlag},</if>
<if test="frozenFlag != null">frozen_flag = #{frozenFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>

View File

@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="location" column="location" />
<result property="area" column="area" />
<result property="charge" column="charge" />
<result property="frozenFlag" column="frozen_flag" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectWmWarehouseVo">
select warehouse_id, warehouse_code, warehouse_name, location, area, charge, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_warehouse
select warehouse_id, warehouse_code, warehouse_name, location, area, charge, frozen_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_warehouse
</sql>
<select id="selectWmWarehouseList" parameterType="WmWarehouse" resultMap="WmWarehouseResult">
@@ -62,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getTreeList" resultMap="WmWarehouseResult">
SELECT w.warehouse_id, warehouse_code, warehouse_name, location, w.area, charge, w.remark, w.attr1, w.attr2, w.attr3, w.attr4, w.create_by, w.create_time, w.update_by, w.update_time,
SELECT w.warehouse_id, warehouse_code, warehouse_name, location, w.area, charge,w.frozen_flag, w.remark, w.attr1, w.attr2, w.attr3, w.attr4, w.create_by, w.create_time, w.update_by, w.update_time,
l.location_id, location_code, location_name, area_flag,
area_id, area_code, area_name, max_loa, position_x, position_y, position_z
FROM wm_warehouse w
@@ -98,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="location != null">location,</if>
<if test="area != null">area,</if>
<if test="charge != null">charge,</if>
<if test="frozenFlag != null">frozen_flag,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
@@ -114,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="location != null">#{location},</if>
<if test="area != null">#{area},</if>
<if test="charge != null">#{charge},</if>
<if test="frozenFlag != null">#{frozenFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
@@ -134,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="location != null">location = #{location},</if>
<if test="area != null">area = #{area},</if>
<if test="charge != null">charge = #{charge},</if>
<if test="frozenFlag != null">frozen_flag = #{frozenFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>