feat(wms): 添加物料保质期提醒时间字段

- 在 BaseMaterialInfo、BaseMaterialInfoBo、BaseMaterialInfoVo、WmsInventory 等类中添加 wmsAlarmTime 字段
- 更新 WmsInventoryMapper.xml 以包含 wms_alarm_time 的查询
- 修改 WmsInventoryServiceImpl 中的查询方法,加入物料保质期提醒时间的查询
master
zangch@mesnac.com 3 months ago
parent 0a42649505
commit 17f773d22c

@ -293,5 +293,9 @@ public class BaseMaterialInfo extends TenantEntity {
@TableField(exist = false) @TableField(exist = false)
private String unitName;//JOIN private String unitName;//JOIN
/**
* wms
*/
private BigDecimal wmsAlarmTime;
} }

@ -138,5 +138,11 @@ public class WmsInventory {
@TableField(exist = false) @TableField(exist = false)
private double outSum;//实际出库数量 private double outSum;//实际出库数量
/**
* wms
*/
@TableField(exist = false)
private BigDecimal wmsAlarmTime;
} }

@ -276,4 +276,9 @@ public class BaseMaterialInfoBo extends BaseEntity {
*/ */
private String inspectionRequest; private String inspectionRequest;
/**
* wms
*/
private BigDecimal wmsAlarmTime;
} }

@ -395,4 +395,9 @@ public class BaseMaterialInfoVo implements Serializable {
@ExcelDictFormat(dictType = "inspection_request") @ExcelDictFormat(dictType = "inspection_request")
private String inspectionRequest; private String inspectionRequest;
/**
* wms
*/
private BigDecimal wmsAlarmTime;
} }

@ -140,4 +140,11 @@ public class WmsInventoryVo implements Serializable {
* wms * wms
*/ */
private Long maxParkingTime; private Long maxParkingTime;
/**
* wms
*/
private BigDecimal wmsAlarmTime;
} }

@ -83,17 +83,15 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<WmsInventory> lqw = JoinWrappers.lambda(WmsInventory.class) MPJLambdaWrapper<WmsInventory> lqw = JoinWrappers.lambda(WmsInventory.class)
.selectAll(WmsInventory.class) .selectAll(WmsInventory.class)
// 关联表查询物料
// 关联表查询物料 .select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime, BaseMaterialInfo::getWmsAlarmTime)
.select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime) .leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId)
.leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId) // 关联表查询物料大类名称
// 关联表查询物料大类名称 .select(BaseMaterialCategory::getMaterialCategoryName)
.select(BaseMaterialCategory::getMaterialCategoryName) .leftJoin(BaseMaterialCategory.class, BaseMaterialCategory::getMaterialCategoryId, WmsInventory::getMaterialCategoryId)
.leftJoin(BaseMaterialCategory.class, BaseMaterialCategory::getMaterialCategoryId, WmsInventory::getMaterialCategoryId) // 关联表查询仓库
// 关联表查询仓库 .select(WmsBaseWarehouse::getWarehouseCode, WmsBaseWarehouse::getWarehouseName)
.select(WmsBaseWarehouse::getWarehouseCode, WmsBaseWarehouse::getWarehouseName) .leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsInventory::getStoreId)
.leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsInventory::getStoreId)
.eq(bo.getInventoryId() != null, WmsInventory::getInventoryId, bo.getInventoryId()) .eq(bo.getInventoryId() != null, WmsInventory::getInventoryId, bo.getInventoryId())
.eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInventory::getBatchCode, bo.getBatchCode()) .eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInventory::getBatchCode, bo.getBatchCode())
.eq(bo.getMaterialId() != null, WmsInventory::getMaterialId, bo.getMaterialId()) .eq(bo.getMaterialId() != null, WmsInventory::getMaterialId, bo.getMaterialId())
@ -111,9 +109,8 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<WmsInventory> lqw = JoinWrappers.lambda(WmsInventory.class) MPJLambdaWrapper<WmsInventory> lqw = JoinWrappers.lambda(WmsInventory.class)
.selectAll(WmsInventory.class) .selectAll(WmsInventory.class)
// 关联表查询物料 // 关联表查询物料
.select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime) .select(BaseMaterialInfo::getMaterialCode, BaseMaterialInfo::getMaterialName, BaseMaterialInfo::getMaxParkingTime,BaseMaterialInfo::getWmsAlarmTime)
.leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId) .leftJoin(BaseMaterialInfo.class, BaseMaterialInfo::getMaterialId, WmsInventory::getMaterialId)
// 关联表查询物料大类名称 // 关联表查询物料大类名称
.select(BaseMaterialCategory::getMaterialCategoryName) .select(BaseMaterialCategory::getMaterialCategoryName)
@ -121,7 +118,6 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService {
// 关联表查询仓库 // 关联表查询仓库
.select(WmsBaseWarehouse::getWarehouseCode, WmsBaseWarehouse::getWarehouseName) .select(WmsBaseWarehouse::getWarehouseCode, WmsBaseWarehouse::getWarehouseName)
.leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsInventory::getStoreId); .leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsInventory::getStoreId);
lqw.eq(bo.getInventoryId() != null, WmsInventory::getInventoryId, bo.getInventoryId()); lqw.eq(bo.getInventoryId() != null, WmsInventory::getInventoryId, bo.getInventoryId());
lqw.eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInventory::getBatchCode, bo.getBatchCode()); lqw.eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInventory::getBatchCode, bo.getBatchCode());
lqw.eq(bo.getMaterialId() != null, WmsInventory::getMaterialId, bo.getMaterialId()); lqw.eq(bo.getMaterialId() != null, WmsInventory::getMaterialId, bo.getMaterialId());

@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
MAX(b.material_code) material_code, MAX(b.material_code) material_code,
MAX(b.material_name) material_name, MAX(b.material_name) material_name,
MAX(b.max_parking_time) max_parking_time, MAX(b.max_parking_time) max_parking_time,
MAX(b.wms_alarm_time) wms_alarm_time,
MAX(x.lock_state) lock_state, MAX(x.lock_state) lock_state,
MAX(x.material_categories) material_categories, MAX(x.material_categories) material_categories,
MAX(x.location_code) locationCode, MAX(x.location_code) locationCode,
@ -72,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
MAX(b.material_code) material_code, MAX(b.material_code) material_code,
MAX(b.material_name) material_name, MAX(b.material_name) material_name,
MAX(b.max_parking_time) max_parking_time, MAX(b.max_parking_time) max_parking_time,
MAX(b.wms_alarm_time) wms_alarm_time,
-- MAX(x.material_categories) material_categories, -- MAX(x.material_categories) material_categories,
-- MAX(bmc.material_category_name) material_category_name, -- MAX(bmc.material_category_name) material_category_name,
MAX(x.lock_state) lock_state MAX(x.lock_state) lock_state
@ -104,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
x.material_id, x.material_id,
MAX(b.material_code) material_code, MAX(b.material_code) material_code,
MAX(b.material_name) material_name, MAX(b.material_name) material_name,
MAX(b.wms_alarm_time) wms_alarm_time,
SUM(x.inventory_qty) inventory_qty SUM(x.inventory_qty) inventory_qty
FROM FROM
hwmom.dbo.wms_inventory x hwmom.dbo.wms_inventory x
@ -161,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_spec, bmi.material_spec,
bmi.material_unit, bmi.material_unit,
bmi.max_parking_time, bmi.max_parking_time,
bmi.wms_alarm_time,
wbw.warehouse_code, wbw.warehouse_code,
wbw.warehouse_name, wbw.warehouse_name,
wbw.warehouse_id, wbw.warehouse_id,
@ -216,6 +220,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_spec, bmi.material_spec,
bmi.material_unit, bmi.material_unit,
bmi.max_parking_time, bmi.max_parking_time,
bmi.wms_alarm_time,
wbw.warehouse_code, wbw.warehouse_code,
wbw.warehouse_name, wbw.warehouse_name,
woo.warehouse_id, woo.warehouse_id,
@ -275,6 +280,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_spec, bmi.material_spec,
bmi.material_unit, bmi.material_unit,
bmi.max_parking_time, bmi.max_parking_time,
bmi.wms_alarm_time,
'' as warehouse_code, '' as warehouse_code,
'' as warehouse_name, '' as warehouse_name,
NULL as warehouse_id NULL as warehouse_id
@ -327,6 +333,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_spec, bmi.material_spec,
bmi.material_unit, bmi.material_unit,
bmi.max_parking_time, bmi.max_parking_time,
bmi.wms_alarm_time,
wbw.warehouse_code, wbw.warehouse_code,
wbw.warehouse_name, wbw.warehouse_name,
ro.warehouse_id, ro.warehouse_id,
@ -383,6 +390,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bmi.material_spec, bmi.material_spec,
bmi.material_unit, bmi.material_unit,
bmi.max_parking_time, bmi.max_parking_time,
bmi.wms_alarm_time,
'' as warehouse_code, '' as warehouse_code,
'' as warehouse_name, '' as warehouse_name,
NULL as warehouse_id NULL as warehouse_id

Loading…
Cancel
Save