添加耗材警告
This commit is contained in:
parent
f7b44edf0d
commit
781a4baa81
|
|
@ -9,6 +9,9 @@
|
|||
<result column="con_code" jdbcType="VARCHAR" property="conCode" />
|
||||
<result column="con_name" jdbcType="VARCHAR" property="conName" />
|
||||
<result column="stock_number" jdbcType="DECIMAL" property="stockNumber" />
|
||||
<result column="price" jdbcType="DECIMAL" property="price" />
|
||||
<result column="stock_consume" jdbcType="DECIMAL" property="stockConsume" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="con_unit" jdbcType="VARCHAR" property="conUnit" />
|
||||
<result column="laster_in_stock" jdbcType="DECIMAL" property="lasterInStock" />
|
||||
<result column="con_warning" jdbcType="DECIMAL" property="conWarning" />
|
||||
|
|
@ -16,7 +19,7 @@
|
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, shop_id, con_type_id, con_type_name, con_code, con_name, stock_number, con_unit,
|
||||
id, shop_id, con_type_id, con_type_name, con_code, con_name, stock_number,price,stock_consume,status, con_unit,
|
||||
laster_in_stock, con_warning, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
|
|
@ -187,7 +190,7 @@
|
|||
<update id="batchStock">
|
||||
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
||||
update tb_cons_info
|
||||
set stock_number= stock_number- #{item.amount},
|
||||
set stock_consume= stock_consume + #{item.amount},
|
||||
update_time = now()
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProskuCon">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
|
||||
<result column="product_id" jdbcType="INTEGER" property="productId" />
|
||||
<result column="product_sku_id" jdbcType="INTEGER" property="productSkuId" />
|
||||
<result column="con_info_id" jdbcType="INTEGER" property="conInfoId" />
|
||||
<result column="surplus_stock" jdbcType="DECIMAL" property="surplusStock" />
|
||||
|
|
@ -11,7 +12,7 @@
|
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, shop_id, product_sku_id, con_info_id, surplus_stock, status, create_time
|
||||
id, shop_id,product_id ,product_sku_id, con_info_id, surplus_stock, status, create_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
|
|
@ -133,4 +134,8 @@
|
|||
AND p.`status` = 1
|
||||
group by p.con_info_id
|
||||
</select>
|
||||
|
||||
<select id="selectByShopIdAndSkuIdAndProductId" resultMap="BaseResultMap">
|
||||
select * from tb_prosku_con where product_sku_id=#{skuId} and shop_id=#{shopId} and product_id=#{productId} and status=1
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue