feat(wms): 关联查询物料保质期

- 在 WmsInventory 模型中添加 maxParkingTime 字段
- 更新 WmsInventoryMapper.xml 中的查询语句,包含 max_parking_time 列- 修改 WmsInventoryServiceImpl 中的查询方法,获取物料最大停放时间
- 在 WmsInventoryVo 中添加 maxParkingTime 字段,用于前端展示
master
zangch@mesnac.com 3 months ago
parent b2447e0d7b
commit e4774798a4

@ -119,4 +119,11 @@ public class WmsInventory {
@TableField(exist = false)
private String materialUnit;//字段映射
/**
* wms
*/
@TableField(exist = false)
private Long maxParkingTime;
}

@ -135,4 +135,9 @@ public class WmsInventoryVo implements Serializable {
*
*/
private String warehouseName;
/**
* wms
*/
private Long maxParkingTime;
}

@ -85,7 +85,7 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService {
.selectAll(WmsInventory.class)
// 关联表查询物料
.select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName)
.select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime)
.leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId)
// 关联表查询物料大类名称
.select(BaseMaterialCategory::getMaterialCategoryName)
@ -113,7 +113,7 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService {
.selectAll(WmsInventory.class)
// 关联表查询物料
.select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName)
.select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime)
.leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId)
// 关联表查询物料大类名称
.select(BaseMaterialCategory::getMaterialCategoryName)

@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
MAX(c.warehouse_name) warehouse_name,
MAX(b.material_code) material_code,
MAX(b.material_name) material_name,
MAX(b.max_parking_time) max_parking_time,
MAX(x.lock_state) lock_state,
MAX(x.material_categories) material_categories,
MAX(x.location_code) locationCode,
@ -70,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
MAX(b.max_stock_amount) max_stock_amount,
MAX(b.material_code) material_code,
MAX(b.material_name) material_name,
MAX(b.max_parking_time) max_parking_time,
-- MAX(x.material_categories) material_categories,
-- MAX(bmc.material_category_name) material_category_name,
MAX(x.lock_state) lock_state
@ -158,6 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_name,
bmi.material_spec,
bmi.material_unit,
bmi.max_parking_time,
wbw.warehouse_code,
wbw.warehouse_name,
wbw.warehouse_id,
@ -212,6 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_name,
bmi.material_spec,
bmi.material_unit,
bmi.max_parking_time,
wbw.warehouse_code,
wbw.warehouse_name,
woo.warehouse_id,
@ -270,6 +274,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
icr.material_name,
bmi.material_spec,
bmi.material_unit,
bmi.max_parking_time,
'' as warehouse_code,
'' as warehouse_name,
NULL as warehouse_id
@ -321,6 +326,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_name,
bmi.material_spec,
bmi.material_unit,
bmi.max_parking_time,
wbw.warehouse_code,
wbw.warehouse_name,
ro.warehouse_id,
@ -376,6 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_name,
bmi.material_spec,
bmi.material_unit,
bmi.max_parking_time,
'' as warehouse_code,
'' as warehouse_name,
NULL as warehouse_id

Loading…
Cancel
Save