2025-07-18 10:12:48 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.klp.mapper.WmsStockMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.klp.domain.WmsStock" id="WmsStockResult">
|
|
|
|
|
<result property="stockId" column="stock_id"/>
|
|
|
|
|
<result property="warehouseId" column="warehouse_id"/>
|
|
|
|
|
<result property="itemType" column="item_type"/>
|
|
|
|
|
<result property="itemId" column="item_id"/>
|
|
|
|
|
<result property="quantity" column="quantity"/>
|
|
|
|
|
<result property="unit" column="unit"/>
|
|
|
|
|
<result property="batchNo" column="batch_no"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
2025-07-18 17:23:51 +08:00
|
|
|
<select id="getStockByItemId" resultType="java.math.BigDecimal">
|
|
|
|
|
select sum(quantity) as quantity from wms_stock
|
|
|
|
|
where item_id = #{rawMaterialId} and item_type = 'raw_material' and del_flag = 0
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-07-18 10:12:48 +08:00
|
|
|
|
|
|
|
|
</mapper>
|