Commit 06d11d4a authored by 罗林杰's avatar 罗林杰

库存管理门店

parent a884f839
......@@ -270,9 +270,6 @@ public class StoreGoodsServiceImpl extends ServiceImpl<StoreGoodsRepository, Sto
StoreGoods goods = result.get(0);
// 2. 查询 kwh
StoreGoodsStock storeGoodsStock = storeGoodsStockRepository.selectByIdOut(goods.getBusinessId());
if(storeGoodsStock != null) {
goods.setGoodsNumber(storeGoodsStock.getGoodsNumber());
}
return goods;
}
}
......@@ -98,11 +98,9 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
StoreGoodsStock newGoodsStock = new StoreGoodsStock();
newGoodsStock.setGoodsId(box.getBusinessId());
newGoodsStock.setGoodsCounts(box.getInCounts());
newGoodsStock.setGoodsNumber(addwmsGoodsApply.getGoodsNumber());
storeGoodsStockRepositoryImpl.persist(newGoodsStock);
} else {
goodsStock.setGoodsCounts(goodsStock.getGoodsCounts() + box.getInCounts());
goodsStock.setGoodsNumber(addwmsGoodsApply.getGoodsNumber());
storeGoodsStockRepositoryImpl.updateCounts(goodsStock);
}
//日志
......
......@@ -26,7 +26,6 @@ public class StoreGoodsStockPageResultsDto extends StoreGoodsStock {
*/
private String goodsCode;
private String goodsNumber;
/**
* @desc 商品类型
......
......@@ -42,13 +42,6 @@ public class StoreGoodsStock extends CyIdIncreEntity<StoreGoodsStock> {
@Excel(name = "库存", orderNum = "3", width = 20)
private Integer goodsCounts;
/**
* @desc 商品数量
* @column goods_counts
* @default
*/
@Excel(name = "库位号", orderNum = "3", width = 20)
private String goodsNumber;
/**
* @desc 品牌
......@@ -133,6 +126,17 @@ public class StoreGoodsStock extends CyIdIncreEntity<StoreGoodsStock> {
@TableField(exist = false)
private Integer actualGtGoodsCounts;
/**
* 门店名称
*/
@TableField(exist = false)
private String storeName;
/**
* @desc 门店id
* @column store_id
* @default
*/
private String storeId;
}
......@@ -13,7 +13,6 @@
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="goods_id" jdbcType="INTEGER" property="goodsId"/>
<result column="goods_counts" jdbcType="INTEGER" property="goodsCounts"/>
<result column="goods_number" jdbcType="VARCHAR" property="goodsNumber"/>
</resultMap>
<resultMap id="BasePageResultMap" type="org.rcisoft.bus.storegoodsstock.dto.StoreGoodsStockPageResultsDto">
......@@ -27,7 +26,6 @@
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="goods_id" jdbcType="INTEGER" property="goodsId"/>
<result column="goods_counts" jdbcType="INTEGER" property="goodsCounts"/>
<result column="goods_number" jdbcType="VARCHAR" property="goodsNumber"/>
<result column="goods_name" jdbcType="VARCHAR" property="goodsName"/>
<result column="goods_dict_name" jdbcType="VARCHAR" property="goodsDictName"/>
<result column="goods_code" jdbcType="VARCHAR" property="goodsCode"/>
......@@ -54,7 +52,8 @@
sdd_goods_style.dict_label AS goods_style,
sdd_goods_colour.dict_label AS goods_colour,
sdd_goods_norms.dict_label AS goods_norms,
sdd_goods_size.dict_label AS goods_size
sdd_goods_size.dict_label AS goods_size,
dept_tb.dept_name as store_name
from store_goods_stock wgs
left join wms_goods wg on wg.business_id = wgs.goods_id
LEFT JOIN sys_dict_data sdd_goods_dict_name ON sdd_goods_dict_name.dict_type = 'GOODS_DICT_NAME' AND
......@@ -73,6 +72,7 @@
wg.goods_norms AND sdd_goods_norms.del_flag = '0'
LEFT JOIN sys_dict_data sdd_goods_size ON sdd_goods_size.dict_type = 'GOODS_SIZE' AND sdd_goods_size.dict_value =
wg.goods_size AND sdd_goods_size.del_flag = '0'
left join sys_dept as dept_tb on wgs.store_id = dept_tb.business_id
where wgs.del_flag = '0' and wg.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' ">
and wgs.flag = #{entity.flag}
......@@ -83,12 +83,12 @@
<if test="entity.goodsCounts !=null and entity.goodsCounts != '' ">
and wgs.goods_counts = #{entity.goodsCounts}
</if>
<if test="entity.goodsNumber !=null and entity.goodsNumber != '' ">
and wgs.goods_number like concat('%',#{entity.goodsNumber},'%')
</if>
<if test="entity.goodsCode !=null and entity.goodsCode != '' ">
and wg.goods_code like concat('%',#{entity.goodsCode},'%')
</if>
<if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%')
</if>
<if test="entity.actualGtGoodsCounts != null and entity.actualGtGoodsCounts != ''">
and wgs.goods_counts &gt; #{entity.actualGtGoodsCounts}
</if>
......@@ -110,9 +110,11 @@
wg.goods_colour,
wg.goods_norms,
wg.goods_brand,
wg.goods_size
wg.goods_size,
dept_tb.dept_name as store_name
FROM
store_goods_stock wgs left join wms_goods wg on wg.business_id = wgs.goods_id
left join sys_dept as dept_tb on wgs.store_id = dept_tb.business_id
where
wgs.del_flag = '0'
and wg.del_flag = '0'
......@@ -155,12 +157,12 @@
<if test="entity.goodsBrand !=null and entity.goodsBrand != '' ">
and wg.goods_brand = #{entity.goodsBrand}
</if>
<if test="entity.storeId !=null and entity.storeId != '' ">
and store_id like concat('%',#{entity.storeId},'%')
</if>
<if test="entity.inventoryValue != null and entity.inventoryValue != ''">
and wgs.goods_counts &lt; #{entity.inventoryValue}
</if>
<if test="entity.goodsNumber !=null and entity.goodsNumber != '' ">
and wgs.goods_number like concat('%',#{entity.goodsNumber},'%')
</if>
ORDER BY wgs.business_id ASC
</select>
<select id="selectByIdOut" resultMap="BaseResultMap">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment