feat(oms):入库业务单新增页面新增按物料编号查询库存批次最近5条过期日期接口 /reservationMaterialInventoryApi/queryRecentExpiryDates/{materialCode},按物料编号关联 NGWL_TEST_WMS.material_base_info 查 reservation_material_inventory 库存批次,返回过期日期+批次号(date_format 按天去重、到期日倒序、limit 5),供前端下拉回显(也可点日期图标手动选择);非平台租户按登录用户一级组织 top_organization_id 过滤(与 /list 一致);沿用 Api→ApplicationService→DomainService→Facade→Impl→Mapper 分层,新增响应对象 MaterialInventoryExpiryBatchPO(expiryDate/batchNumber)

This commit is contained in:
rcx
2026-08-31 15:22:59 +08:00
parent bc3afbacb1
commit a74afd837c
8 changed files with 100 additions and 0 deletions
@@ -177,6 +177,20 @@ public class ReservationMaterialInventoryApi extends BaseController {
return AjaxResult.success(materialInventoryApplicationService.getInventoryByStorageLocationIdAndMaterialBaseInfoId(storageLocationId, materialBaseInfoId));
}
/**
* 入库业务单新增页面:根据物料编号查询其库存批次过期日期+批次号,去重取最近5条,
* 供前端下拉回显;用户也可点击右侧"日期"小图标手动选择日期
*/
@ApiOperation("根据物料编号查询库存批次最近5条过期日期+批次号")
@GetMapping(value = "/queryRecentExpiryDates/{materialCode}")
public AjaxResult queryRecentExpiryDates(@PathVariable("materialCode") String materialCode)
{
if (StringUtils.isBlank(materialCode)) {
return AjaxResult.error("物料编号不能为空");
}
return AjaxResult.success(materialInventoryApplicationService.selectRecentExpiryBatches(materialCode));
}
/**