mirror of
https://github.com/zccbbg/wms-ruoyi.git
synced 2024-09-20 11:05:54 +08:00
出入库增加批次、生产日期和有效期
This commit is contained in:
parent
c554943d92
commit
d45a04c9fd
|
@ -3,13 +3,16 @@ package com.cyl.wms.domain;
|
|||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.cyl.wms.pojo.vo.PlaceAndItem;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 库存对象 wms_inventory
|
||||
|
@ -52,6 +55,21 @@ public class Inventory extends BaseAudit implements PlaceAndItem {
|
|||
@ApiModelProperty("删除标识")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
@ApiModelProperty("有效期")
|
||||
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
@ApiModelProperty("批次")
|
||||
private String batch;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String itemNo;
|
||||
|
||||
|
@ -64,4 +82,6 @@ public class Inventory extends BaseAudit implements PlaceAndItem {
|
|||
@TableField(exist = false)
|
||||
private String areaName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
package com.cyl.wms.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.cyl.wms.pojo.vo.PlaceAndItem;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 库存记录对象 wms_inventory_history
|
||||
*
|
||||
|
@ -58,4 +62,19 @@ public class InventoryHistory extends BaseAudit implements PlaceAndItem {
|
|||
@ApiModelProperty("删除标识")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
@ApiModelProperty("有效期")
|
||||
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
@ApiModelProperty("批次")
|
||||
private String batch;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
package com.cyl.wms.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 入库单详情对象 wms_receipt_order_detail
|
||||
*
|
||||
|
@ -64,4 +69,19 @@ public class ReceiptOrderDetail extends BaseAudit {
|
|||
@Excel(name = "入库状态")
|
||||
private Integer receiptOrderStatus;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
@ApiModelProperty("有效期")
|
||||
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
@ApiModelProperty("批次")
|
||||
private String batch;
|
||||
|
||||
}
|
||||
|
|
|
@ -2,13 +2,16 @@ package com.cyl.wms.domain;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 出库单详情对象 wms_shipment_order_detail
|
||||
|
@ -73,4 +76,20 @@ public class ShipmentOrderDetail extends BaseAudit {
|
|||
@Excel(name = "出库状态")
|
||||
private Integer shipmentOrderStatus;
|
||||
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
@ApiModelProperty("有效期")
|
||||
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
@ApiModelProperty("批次")
|
||||
private String batch;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.cyl.wms.pojo.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
/**
|
||||
|
@ -17,4 +19,7 @@ public class InventoryDTO extends BaseAudit {
|
|||
private Long rackId;
|
||||
private BigDecimal quantity;
|
||||
private String remark;
|
||||
private LocalDateTime productionDate;
|
||||
private LocalDateTime expiryDate;
|
||||
private String batch;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.cyl.wms.pojo.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
/**
|
||||
|
@ -19,4 +21,7 @@ public class InventoryHistoryDTO extends BaseAudit {
|
|||
private Long areaId;
|
||||
private BigDecimal quantity;
|
||||
private String remark;
|
||||
private LocalDateTime productionDate;
|
||||
private LocalDateTime expiryDate;
|
||||
private String batch;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.cyl.wms.pojo.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
/**
|
||||
|
@ -20,4 +22,7 @@ public class ReceiptOrderDetailDTO extends BaseAudit {
|
|||
private Long warehouseId;
|
||||
private Long areaId;
|
||||
private Integer receiptOrderStatus;
|
||||
private LocalDateTime productionDate;
|
||||
private LocalDateTime expiryDate;
|
||||
private String batch;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.cyl.wms.pojo.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
/**
|
||||
|
@ -20,4 +22,7 @@ public class ShipmentOrderDetailDTO extends BaseAudit {
|
|||
private Long warehouseId;
|
||||
private Long areaId;
|
||||
private Integer shipmentOrderStatus;
|
||||
private LocalDateTime productionDate;
|
||||
private LocalDateTime expiryDate;
|
||||
private String batch;
|
||||
}
|
||||
|
|
|
@ -33,5 +33,7 @@ public class InventoryQuery implements InventoryPanelType {
|
|||
private BigDecimal quantityStart;
|
||||
@ApiModelProperty("库存 结束值")
|
||||
private BigDecimal quantityEnd;
|
||||
@ApiModelProperty("批次")
|
||||
private String batch;
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.BaseAudit;
|
|||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 库存记录 数据视图对象
|
||||
|
@ -79,4 +80,19 @@ public class InventoryHistoryVO extends BaseAudit implements AreaAndItemInfo {
|
|||
private String shipmentOrderNo;
|
||||
private String customerName;
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
*/
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String batch;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.BaseAudit;
|
|||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 库存 数据视图对象
|
||||
|
@ -65,4 +66,25 @@ public class InventoryVO extends BaseAudit implements AreaAndItemInfo {
|
|||
* 仓库删除标识
|
||||
*/
|
||||
private Integer warehouseDelFlag;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
*/
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String batch;
|
||||
|
||||
private String itemUnit;
|
||||
|
||||
private String itemSpecification;
|
||||
|
||||
private String itemUnitPrice;
|
||||
}
|
||||
|
|
|
@ -8,4 +8,6 @@ public interface PlaceAndItem {
|
|||
Long getAreaId();
|
||||
|
||||
Long getRackId();
|
||||
|
||||
String getBatch();
|
||||
}
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
package com.cyl.wms.pojo.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 入库单详情 数据视图对象
|
||||
*
|
||||
|
@ -45,6 +48,25 @@ public class ReceiptOrderDetailVO extends BaseAudit {
|
|||
/** 入库状态 */
|
||||
@Excel(name = "入库状态")
|
||||
private Integer receiptOrderStatus;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String batch;
|
||||
private Integer delFlag;
|
||||
private List<Long> place;
|
||||
private ItemVO item;
|
||||
|
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -75,6 +76,22 @@ public class ShipmentOrderDetailVO extends BaseAudit {
|
|||
|
||||
@Excel(name = "出库状态")
|
||||
private Integer shipmentOrderStatus;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private LocalDateTime productionDate;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
*/
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String batch;
|
||||
|
||||
private List<Long> place;
|
||||
|
||||
private ItemVO item;
|
||||
|
|
|
@ -259,7 +259,7 @@ public class InventoryMovementService {
|
|||
added = after.subtract(before);
|
||||
}
|
||||
//判断库存是否足够出库
|
||||
inventoryService.checkInventory(it.getItemId(), it.getSourceWarehouseId(), it.getSourceAreaId(), it.getSourceRackId(), added);
|
||||
inventoryService.checkInventory(it.getItemId(), it.getSourceWarehouseId(), it.getSourceAreaId(), it.getSourceRackId(), null, added);
|
||||
|
||||
// 1. 创建移库日志
|
||||
InventoryHistory h = detailConvert.do2InventoryHistory(it);
|
||||
|
|
|
@ -102,6 +102,9 @@ public class InventoryService {
|
|||
if (query.getQuantityEnd() != null) {
|
||||
qw.le("quantity", query.getQuantityEnd());
|
||||
}
|
||||
if (StrUtil.isNotBlank(query.getBatch())) {
|
||||
qw.eq("batch", query.getBatch());
|
||||
}
|
||||
return getInventoryList(query.getPanelType(), qw);
|
||||
}
|
||||
|
||||
|
@ -212,7 +215,7 @@ public class InventoryService {
|
|||
/*
|
||||
* 根据物料id查询库存
|
||||
* */
|
||||
public Inventory queryInventoryByItemId(Long itemId, Long warehouseId, Long areaId, Long rackId) {
|
||||
public Inventory queryInventoryByItemId(Long itemId, Long warehouseId, Long areaId, Long rackId, String batch) {
|
||||
QueryWrapper<Inventory> qw = new QueryWrapper<>();
|
||||
qw.eq("item_id", itemId).eq("warehouse_id", warehouseId);
|
||||
if (rackId != null) {
|
||||
|
@ -221,16 +224,21 @@ public class InventoryService {
|
|||
if (areaId != null) {
|
||||
qw.eq("area_id", areaId);
|
||||
}
|
||||
if (StrUtil.isNotBlank(batch)) {
|
||||
qw.eq("batch", batch);
|
||||
} else {
|
||||
qw.isNull("batch");
|
||||
}
|
||||
return inventoryMapper.selectOne(qw);
|
||||
}
|
||||
|
||||
/*
|
||||
* 判断库存是否足够出库
|
||||
* */
|
||||
public void checkInventory(Long itemId, Long warehouseId, Long areaId, Long rackId, BigDecimal added) {
|
||||
public void checkInventory(Long itemId, Long warehouseId, Long areaId, Long rackId, String batch, BigDecimal added) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("itemId", itemId);
|
||||
Inventory inventory = this.queryInventoryByItemId(itemId, warehouseId, areaId, rackId);
|
||||
Inventory inventory = this.queryInventoryByItemId(itemId, warehouseId, areaId, rackId, batch);
|
||||
if (inventory == null) {
|
||||
Item item = itemService.selectById(itemId);
|
||||
String msg = "商品:" + item.getItemName() + "(" + item.getItemNo() + ")" + ",<span style='color:red'>库存不存在</span> 无法出库</br>";
|
||||
|
@ -267,19 +275,19 @@ public class InventoryService {
|
|||
int res = 0;
|
||||
if (warehouses.size() > 0) {
|
||||
res += saveData(warehouses, now, userId,
|
||||
it -> it.getWarehouseId() + "_" + it.getItemId(),
|
||||
it -> it.getWarehouseId() + "_" + it.getItemId() + "_" + it.getBatch(),
|
||||
inventoryMapper::selectAllByWarehouseAndItemId
|
||||
);
|
||||
}
|
||||
if (areas.size() > 0) {
|
||||
res += saveData(areas, now, userId,
|
||||
it -> it.getWarehouseId() + "_" + it.getAreaId() + "_" + it.getItemId(),
|
||||
it -> it.getWarehouseId() + "_" + it.getAreaId() + "_" + it.getItemId() + "_" + it.getBatch(),
|
||||
inventoryMapper::selectAllByAreaAndItemId
|
||||
);
|
||||
}
|
||||
if (racks.size() > 0) {
|
||||
res += saveData(racks, now, userId,
|
||||
it -> it.getWarehouseId() + "_" + it.getAreaId() + "_" + it.getRackId() + "_" + it.getItemId(),
|
||||
it -> it.getWarehouseId() + "_" + it.getAreaId() + "_" + it.getRackId() + "_" + it.getItemId() + "_" + it.getBatch(),
|
||||
inventoryMapper::selectAllByRackAndItemId
|
||||
);
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ public class ShipmentOrderService {
|
|||
// 记录出库历史
|
||||
List<InventoryHistory> addList = new ArrayList<>();
|
||||
order.getDetails().forEach(detail -> {
|
||||
inventoryService.checkInventory(detail.getItemId(), detail.getWarehouseId(), detail.getAreaId(), detail.getRackId(), detail.getPlanQuantity());
|
||||
inventoryService.checkInventory(detail.getItemId(), detail.getWarehouseId(), detail.getAreaId(), detail.getRackId(), detail.getBatch(), detail.getPlanQuantity());
|
||||
InventoryHistory history = detailConvert.do2InventoryHistory(detail);
|
||||
history.setFormId(order.getId());
|
||||
history.setFormType(order.getShipmentOrderType());
|
||||
|
@ -271,6 +271,7 @@ public class ShipmentOrderService {
|
|||
});
|
||||
inventoryHistoryService.batchInsert(addList);
|
||||
// 更新库存
|
||||
addList.forEach(it -> it.setQuantity(it.getQuantity().negate()));
|
||||
inventoryService.batchUpdate1(addList);
|
||||
if (order.getReceivableAmount() != null && order.getCustomerId() != null) {
|
||||
//保存订单金额到客户流水表
|
||||
|
@ -315,7 +316,7 @@ public class ShipmentOrderService {
|
|||
added = after.subtract(before);
|
||||
}
|
||||
//判断库存是否足够出库
|
||||
inventoryService.checkInventory(it.getItemId(), it.getWarehouseId(), it.getAreaId(), it.getRackId(), added);
|
||||
inventoryService.checkInventory(it.getItemId(), it.getWarehouseId(), it.getAreaId(), it.getRackId(), null, added);
|
||||
|
||||
// 1. 前一次的实际数量是 0
|
||||
InventoryHistory h = detailConvert.do2InventoryHistory(it);
|
||||
|
|
|
@ -314,7 +314,7 @@ public class WaveService {
|
|||
// 部分出库,需要更新出库单状态为未出库
|
||||
BigDecimal added = it.getRealQuantity();
|
||||
//判断库存是否足够出库
|
||||
inventoryService.checkInventory(it.getItemId(), it.getWarehouseId(), it.getAreaId(), it.getRackId(), added);
|
||||
inventoryService.checkInventory(it.getItemId(), it.getWarehouseId(), it.getAreaId(), it.getRackId(), null, added);
|
||||
|
||||
// 1. 前一次的实际数量是 0
|
||||
InventoryHistory h = shipmentOrderDetailConvert.do2InventoryHistory(it);
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
insert into wms_inventory_history
|
||||
(form_id, form_type, item_id, rack_id, quantity, remark, del_flag, create_by, create_time, update_by,
|
||||
update_time, warehouse_id, area_id)
|
||||
update_time, warehouse_id, area_id, batch, production_date, expiry_date)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -138,6 +138,9 @@
|
|||
#{item.updateTime, jdbcType=DATE},
|
||||
#{item.warehouseId, jdbcType=BIGINT},
|
||||
#{item.areaId, jdbcType=BIGINT},
|
||||
#{item.batch, jdbcType=VARCHAR},
|
||||
#{item.productionDate, jdbcType=DATE},
|
||||
#{item.expiryDate, jdbcType=DATE},
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
@ -172,14 +172,15 @@
|
|||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
insert into wms_inventory
|
||||
(item_id, rack_id, quantity, remark, del_flag, create_by, create_time, update_by, update_time, warehouse_id,
|
||||
area_id)
|
||||
area_id, batch, production_date, expiry_date)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{item.itemId, jdbcType=BIGINT}, #{item.rackId, jdbcType=BIGINT}, #{item.quantity, jdbcType=DECIMAL},
|
||||
#{item.remark, jdbcType=VARCHAR}, #{item.delFlag, jdbcType=TINYINT}, #{item.createBy, jdbcType=BIGINT},
|
||||
#{item.createTime, jdbcType=DATE}, #{item.updateBy, jdbcType=BIGINT}, #{item.updateTime, jdbcType=DATE},
|
||||
#{item.warehouseId, jdbcType=BIGINT}, #{item.areaId, jdbcType=BIGINT},
|
||||
#{item.warehouseId, jdbcType=BIGINT}, #{item.areaId, jdbcType=BIGINT},#{item.batch, jdbcType=VARCHAR},
|
||||
#{item.productionDate, jdbcType=DATE},#{item.expiryDate, jdbcType=DATE}
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</update>
|
||||
<sql id="Base_Column_List_No_Pk">
|
||||
receipt_order_id, item_id, plan_quantity, real_quantity, rack_id, money, del_flag, remark, create_by, create_time, update_by, update_time, warehouse_id, area_id, receipt_order_status
|
||||
receipt_order_id, item_id, plan_quantity, real_quantity, rack_id, money, del_flag, remark, create_by, create_time, update_by, update_time, warehouse_id, area_id, receipt_order_status, batch, production_date, expiry_date
|
||||
</sql>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
insert into wms_receipt_order_detail
|
||||
|
@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{item.receiptOrderId, jdbcType=BIGINT}, #{item.itemId, jdbcType=BIGINT}, #{item.planQuantity, jdbcType=DECIMAL}, #{item.realQuantity, jdbcType=DECIMAL}, #{item.rackId, jdbcType=BIGINT},#{item.money, jdbcType=DECIMAL},#{item.delFlag, jdbcType=TINYINT}, #{item.remark, jdbcType=VARCHAR}, #{item.createBy, jdbcType=BIGINT}, #{item.createTime, jdbcType=DATE}, #{item.updateBy, jdbcType=BIGINT}, #{item.updateTime, jdbcType=DATE}, #{item.warehouseId, jdbcType=BIGINT}, #{item.areaId, jdbcType=BIGINT}, #{item.receiptOrderStatus, jdbcType=TINYINT}, </trim>
|
||||
#{item.receiptOrderId, jdbcType=BIGINT}, #{item.itemId, jdbcType=BIGINT}, #{item.planQuantity, jdbcType=DECIMAL}, #{item.realQuantity, jdbcType=DECIMAL}, #{item.rackId, jdbcType=BIGINT},#{item.money, jdbcType=DECIMAL},#{item.delFlag, jdbcType=TINYINT}, #{item.remark, jdbcType=VARCHAR}, #{item.createBy, jdbcType=BIGINT}, #{item.createTime, jdbcType=DATE}, #{item.updateBy, jdbcType=BIGINT}, #{item.updateTime, jdbcType=DATE}, #{item.warehouseId, jdbcType=BIGINT}, #{item.areaId, jdbcType=BIGINT}, #{item.receiptOrderStatus, jdbcType=TINYINT}, #{item.batch, jdbcType=VARCHAR}, #{item.productionDate, jdbcType=DATE}, #{item.expiryDate, jdbcType=DATE}, </trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
<select id="countByOrderId" resultType="com.cyl.wms.pojo.vo.ReceiptOrderVO">
|
||||
|
|
|
@ -99,7 +99,10 @@
|
|||
update_time,
|
||||
warehouse_id,
|
||||
area_id,
|
||||
shipment_order_status)
|
||||
shipment_order_status,
|
||||
batch,
|
||||
production_date,
|
||||
expiry_date)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -109,7 +112,8 @@
|
|||
#{item.remark, jdbcType=VARCHAR},
|
||||
#{item.createBy, jdbcType=BIGINT}, #{item.createTime, jdbcType=DATE}, #{item.updateBy, jdbcType=BIGINT},
|
||||
#{item.updateTime, jdbcType=DATE}, #{item.warehouseId, jdbcType=BIGINT},
|
||||
#{item.areaId, jdbcType=BIGINT}, #{item.shipmentOrderStatus, jdbcType=TINYINT},
|
||||
#{item.areaId, jdbcType=BIGINT}, #{item.shipmentOrderStatus, jdbcType=TINYINT},#{item.batch, jdbcType=VARCHAR},
|
||||
#{item.productionDate, jdbcType=DATE}, #{item.expiryDate, jdbcType=DATE}
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
Loading…
Reference in a new issue