mirror of
https://github.com/zccbbg/wms-ruoyi.git
synced 2024-11-10 09:02:51 +08:00
refactor: inventory detail 优化
This commit is contained in:
parent
1242f91427
commit
5ca4dec277
4 changed files with 12 additions and 17 deletions
|
@ -122,11 +122,6 @@ public class InventoryDetailBo extends BaseEntity implements PlaceAndItem {
|
|||
/** 出库数量 */
|
||||
private BigDecimal shipmentQuantity;
|
||||
|
||||
/**
|
||||
* 最小数量
|
||||
*/
|
||||
private BigDecimal minQuantity;
|
||||
|
||||
private String itemName;
|
||||
private String itemCode;
|
||||
private String skuName;
|
||||
|
|
|
@ -19,7 +19,7 @@ import java.util.List;
|
|||
public interface InventoryDetailMapper extends BaseMapperPlus<InventoryDetail, InventoryDetailVo> {
|
||||
void deductInventoryDetailQuantity(@Param("list")List<InventoryDetailBo> list, @Param("updateBy") String updateBy, @Param("updateTime") LocalDateTime updateTime);
|
||||
|
||||
Page<InventoryDetailVo> selectPageByBo(Page<Object> page, @Param("bo") InventoryDetailBo bo);
|
||||
Page<InventoryDetailVo> selectPageByBo(Page<InventoryDetailVo> page, @Param("bo") InventoryDetailBo bo);
|
||||
|
||||
List<InventoryDetailVo> selectListByBo(@Param("bo") InventoryDetailBo bo);
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ import org.apache.ibatis.annotations.Param;
|
|||
*/
|
||||
public interface InventoryMapper extends BaseMapperPlus<Inventory, InventoryVo> {
|
||||
|
||||
Page<InventoryVo> queryItemBoardList(Page<Object> page, @Param("bo") InventoryBo bo);
|
||||
Page<InventoryVo> queryAreaBoardList(Page<Object> page, @Param("bo") InventoryBo bo);
|
||||
Page<InventoryVo> queryItemBoardList(Page<InventoryVo> page, @Param("bo") InventoryBo bo);
|
||||
Page<InventoryVo> queryAreaBoardList(Page<InventoryVo> page, @Param("bo") InventoryBo bo);
|
||||
|
||||
Page<InventoryVo> selectBoardPageByWarehouse(Page<Object> page, @Param("bo") InventoryBo bo);
|
||||
Page<InventoryVo> selectBoardPageByWarehouse(Page<InventoryVo> page, @Param("bo") InventoryBo bo);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<mapper namespace="com.ruoyi.wms.mapper.InventoryDetailMapper">
|
||||
|
||||
<resultMap id="inventoryDetailVoMap" type="com.ruoyi.wms.domain.vo.InventoryDetailVo">
|
||||
<association property="itemSku" javaType="com.ruoyi.wms.domain.vo.ItemSkuVo" />
|
||||
<association property="item" javaType="com.ruoyi.wms.domain.vo.ItemVo" />
|
||||
<association property="itemSku" javaType="com.ruoyi.wms.domain.vo.ItemSkuVo">
|
||||
<id property="id" column="sku_id"/> <!-- 映射 itemSku 的 id -->
|
||||
</association>
|
||||
<association property="item" javaType="com.ruoyi.wms.domain.vo.ItemVo">
|
||||
<id property="id" column="item_id"/> <!-- 映射 item 的 id -->
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<update id="deductInventoryDetailQuantity">
|
||||
|
@ -30,7 +34,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectPageByBo" resultMap="inventoryDetailVoMap">
|
||||
select
|
||||
detail.*,
|
||||
sku.id as sku_id,
|
||||
sku.*,
|
||||
item.id as item_id,
|
||||
item.*
|
||||
from wms_inventory_detail detail
|
||||
inner join wms_item_sku sku on detail.sku_id=sku.id
|
||||
|
@ -57,9 +63,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="bo.areaId != null">
|
||||
and detail.area_id=#{bo.areaId}
|
||||
</if>
|
||||
<if test="bo.minQuantity != null">
|
||||
and detail.remain_quantity>=#{bo.minQuantity}
|
||||
</if>
|
||||
<if test="bo.batchNo != null and bo.batchNo != ''">
|
||||
and detail.batch_no=#{bo.batchNo}
|
||||
</if>
|
||||
|
@ -87,9 +90,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="bo.areaId != null">
|
||||
and detail.area_id=#{bo.areaId}
|
||||
</if>
|
||||
<if test="bo.minQuantity != null">
|
||||
and detail.remain_quantity>=#{bo.minQuantity}
|
||||
</if>
|
||||
<if test="bo.batchNo != null and bo.batchNo != ''">
|
||||
and detail.batch_no=#{bo.batchNo}
|
||||
</if>
|
||||
|
|
Loading…
Reference in a new issue