feat(oms): 出库导入支持指定仓库,校验物料库存归属并按仓过滤批次库存
背景:物料档案全仓共享,此前导入不区分仓库,批次库存"查到哪条算哪条",单据可能取到其他仓库的库存且主表仓库为空。 1. /parseExcel 新增可选参数 warehouseId(前端随文件提交当前页面仓库;不传保持原有行为) 2. 新增 countInventoryByWarehouse 归属校验:物料在指定仓库无库存记录时统一报错"物料[xx]在当前仓库[名]没有库存记录,无法从该仓库出库" 3. getkcId 批次库存查询增加仓库过滤,明细批次/仓库/入库单号均取当前仓库 4. 导入单主表回填当前仓库 warehouseId/Code/Name(此前导入单仓库为空) 5. 出库导入两个入口(reservationStockInOrderApi/executionStockInOrderApi 的 parseExcel)同步支持 6. 库存不足报错补充物料编码,便于定位
This commit is contained in:
+13
-12
@@ -176,40 +176,41 @@ public class MaterialInventoryPO extends MaterialBasePO {
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
// 以下业务日期字段只保留年月日:导出复用 /list 接口,前端取 JSON 值直接进 Excel,去掉时分秒(与 OMS 库存查询一致)
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("进货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "进货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "进货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date purchaseDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date extAttr4;
|
||||
|
||||
@ApiModelProperty("物料更多属性列表(批次属性)")
|
||||
|
||||
Reference in New Issue
Block a user