采购入库的入库日期处理。
This commit is contained in:
parent
8daa2ea520
commit
315be9a5b5
@ -143,6 +143,11 @@ public class WmTransaction extends BaseEntity
|
|||||||
@Excel(name = "ERP账期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "ERP账期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date erpDate;
|
private Date erpDate;
|
||||||
|
|
||||||
|
/** 入库日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||||
|
@Excel(name = "入库日期", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
|
||||||
|
private Date recptDate;
|
||||||
|
|
||||||
/** 库存有效期 */
|
/** 库存有效期 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "库存有效期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "库存有效期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ -443,7 +448,16 @@ public class WmTransaction extends BaseEntity
|
|||||||
{
|
{
|
||||||
return erpDate;
|
return erpDate;
|
||||||
}
|
}
|
||||||
public void setExpireDate(Date expireDate)
|
|
||||||
|
public Date getRecptDate() {
|
||||||
|
return recptDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecptDate(Date recptDate) {
|
||||||
|
this.recptDate = recptDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpireDate(Date expireDate)
|
||||||
{
|
{
|
||||||
this.expireDate = expireDate;
|
this.expireDate = expireDate;
|
||||||
}
|
}
|
||||||
@ -491,47 +505,44 @@ public class WmTransaction extends BaseEntity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return "WmTransaction{" +
|
||||||
.append("transactionId", getTransactionId())
|
"transactionId=" + transactionId +
|
||||||
.append("transactionType", getTransactionType())
|
", transactionType='" + transactionType + '\'' +
|
||||||
.append("itemId", getItemId())
|
", itemId=" + itemId +
|
||||||
.append("itemCode", getItemCode())
|
", itemCode='" + itemCode + '\'' +
|
||||||
.append("itemName", getItemName())
|
", itemName='" + itemName + '\'' +
|
||||||
.append("specification", getSpecification())
|
", specification='" + specification + '\'' +
|
||||||
.append("unitOfMeasure", getUnitOfMeasure())
|
", unitOfMeasure='" + unitOfMeasure + '\'' +
|
||||||
.append("batchCode", getBatchCode())
|
", batchCode='" + batchCode + '\'' +
|
||||||
.append("warehouseId", getWarehouseId())
|
", warehouseId=" + warehouseId +
|
||||||
.append("warehouseCode", getWarehouseCode())
|
", warehouseCode='" + warehouseCode + '\'' +
|
||||||
.append("warehouseName", getWarehouseName())
|
", warehouseName='" + warehouseName + '\'' +
|
||||||
.append("locationId", getLocationId())
|
", locationId=" + locationId +
|
||||||
.append("locationCode", getLocationCode())
|
", locationCode='" + locationCode + '\'' +
|
||||||
.append("locationName", getLocationName())
|
", locationName='" + locationName + '\'' +
|
||||||
.append("areaId", getAreaId())
|
", areaId=" + areaId +
|
||||||
.append("areaCode", getAreaCode())
|
", areaCode='" + areaCode + '\'' +
|
||||||
.append("areaName", getAreaName())
|
", areaName='" + areaName + '\'' +
|
||||||
.append("vendorId", getVendorId())
|
", vendorId=" + vendorId +
|
||||||
.append("vendorCode", getVendorCode())
|
", vendorCode='" + vendorCode + '\'' +
|
||||||
.append("vendorName", getVendorName())
|
", vendorName='" + vendorName + '\'' +
|
||||||
.append("vendorNick", getVendorNick())
|
", vendorNick='" + vendorNick + '\'' +
|
||||||
.append("sourceDocType", getSourceDocType())
|
", sourceDocType='" + sourceDocType + '\'' +
|
||||||
.append("sourceDocId", getSourceDocId())
|
", sourceDocId=" + sourceDocId +
|
||||||
.append("sourceDocCode", getSourceDocCode())
|
", sourceDocCode='" + sourceDocCode + '\'' +
|
||||||
.append("sourceDocLineId", getSourceDocLineId())
|
", sourceDocLineId=" + sourceDocLineId +
|
||||||
.append("materialStockId", getMaterialStockId())
|
", materialStockId=" + materialStockId +
|
||||||
.append("transactionFlag", getTransactionFlag())
|
", transactionFlag=" + transactionFlag +
|
||||||
.append("transactionQuantity", getTransactionQuantity())
|
", transactionQuantity=" + transactionQuantity +
|
||||||
.append("transactionDate", getTransactionDate())
|
", transactionDate=" + transactionDate +
|
||||||
.append("relatedTransactionId", getRelatedTransactionId())
|
", relatedTransactionId=" + relatedTransactionId +
|
||||||
.append("erpDate", getErpDate())
|
", erpDate=" + erpDate +
|
||||||
.append("expireDate", getExpireDate())
|
", recptDate=" + recptDate +
|
||||||
.append("attr1", getAttr1())
|
", expireDate=" + expireDate +
|
||||||
.append("attr2", getAttr2())
|
", attr1='" + attr1 + '\'' +
|
||||||
.append("attr3", getAttr3())
|
", attr2='" + attr2 + '\'' +
|
||||||
.append("attr4", getAttr4())
|
", attr3=" + attr3 +
|
||||||
.append("createBy", getCreateBy())
|
", attr4=" + attr4 +
|
||||||
.append("createTime", getCreateTime())
|
'}';
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,10 @@ public class ItemRecptTxBean extends BaseEntity {
|
|||||||
/** 事务数量 */
|
/** 事务数量 */
|
||||||
private BigDecimal transactionQuantity;
|
private BigDecimal transactionQuantity;
|
||||||
|
|
||||||
|
/** 入库日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||||
|
private Date recptDate;
|
||||||
|
|
||||||
/** 库存有效期 */
|
/** 库存有效期 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date expireDate;
|
private Date expireDate;
|
||||||
@ -280,6 +284,14 @@ public class ItemRecptTxBean extends BaseEntity {
|
|||||||
this.transactionQuantity = transactionQuantity;
|
this.transactionQuantity = transactionQuantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getRecptDate() {
|
||||||
|
return recptDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecptDate(Date recptDate) {
|
||||||
|
this.recptDate = recptDate;
|
||||||
|
}
|
||||||
|
|
||||||
public Date getExpireDate() {
|
public Date getExpireDate() {
|
||||||
return expireDate;
|
return expireDate;
|
||||||
}
|
}
|
||||||
@ -315,6 +327,7 @@ public class ItemRecptTxBean extends BaseEntity {
|
|||||||
", sourceDocCode='" + sourceDocCode + '\'' +
|
", sourceDocCode='" + sourceDocCode + '\'' +
|
||||||
", sourceDocLineId=" + sourceDocLineId +
|
", sourceDocLineId=" + sourceDocLineId +
|
||||||
", transactionQuantity=" + transactionQuantity +
|
", transactionQuantity=" + transactionQuantity +
|
||||||
|
", recptDate=" + recptDate +
|
||||||
", expireDate=" + expireDate +
|
", expireDate=" + expireDate +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -42,16 +42,6 @@ public class StorageCoreServiceImpl implements IStorageCoreService {
|
|||||||
transaction.setTransactionFlag(1); //库存增加
|
transaction.setTransactionFlag(1); //库存增加
|
||||||
transaction.setTransactionDate(new Date());
|
transaction.setTransactionDate(new Date());
|
||||||
wmTransactionService.processTransaction(transaction);
|
wmTransactionService.processTransaction(transaction);
|
||||||
// transaction.setItemId(line.getItemId());
|
|
||||||
// transaction.setItemCode(line.getItemCode());
|
|
||||||
// transaction.setItemName(line.getItemName());
|
|
||||||
// transaction.setSpecification(line.getSpecification());
|
|
||||||
// transaction.setUnitOfMeasure(line.getUnitOfMeasure());
|
|
||||||
// transaction.setBatchCode(line.getBatchCode());
|
|
||||||
// transaction.setWarehouseId(line.getWarehouseId());
|
|
||||||
// transaction.setWarehouseCode(line.getWarehouseCode());
|
|
||||||
// transaction.setWarehouseName(line.getWarehouseName());
|
|
||||||
// transaction.setLocationId(line.getLocationId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ public class WmTransactionServiceImpl implements IWmTransactionService
|
|||||||
}
|
}
|
||||||
//使用库存事务日期初始化入库日期
|
//使用库存事务日期初始化入库日期
|
||||||
//一般在入库的时候才会涉及到materialStock的新增,出库的时候都是出的现有库存
|
//一般在入库的时候才会涉及到materialStock的新增,出库的时候都是出的现有库存
|
||||||
stock.setRecptDate(transaction.getTransactionDate());
|
stock.setRecptDate(transaction.getRecptDate());
|
||||||
stock.setExpireDate(transaction.getExpireDate());
|
stock.setExpireDate(transaction.getExpireDate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
<result property="sourceDocCode" column="source_doc_code"></result>
|
<result property="sourceDocCode" column="source_doc_code"></result>
|
||||||
<result property="sourceDocLineId" column="source_doc_line_id"></result>
|
<result property="sourceDocLineId" column="source_doc_line_id"></result>
|
||||||
<result property="transactionQuantity" column="transaction_quantity"></result>
|
<result property="transactionQuantity" column="transaction_quantity"></result>
|
||||||
|
<result property="recptDate" column="recpt_date"></result>
|
||||||
<result property="expireDate" column="expire_date"></result>
|
<result property="expireDate" column="expire_date"></result>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
@ -116,7 +117,7 @@
|
|||||||
irl.`warehouse_id`,irl.`warehouse_code`,irl.`warehouse_name`,irl.`location_id`,irl.`location_code`,irl.`location_name`,irl.`area_id`,irl.`area_code`,irl.`area_name`,
|
irl.`warehouse_id`,irl.`warehouse_code`,irl.`warehouse_name`,irl.`location_id`,irl.`location_code`,irl.`location_name`,irl.`area_id`,irl.`area_code`,irl.`area_name`,
|
||||||
ir.`vendor_id`,ir.`vendor_code`,ir.`vendor_name`,ir.`vendor_nick`,
|
ir.`vendor_id`,ir.`vendor_code`,ir.`vendor_name`,ir.`vendor_nick`,
|
||||||
'IR' AS source_doc_type,ir.`recpt_id` AS source_doc_id,ir.`recpt_code` AS source_doc_code,irl.`line_id` AS source_doc_line_id,
|
'IR' AS source_doc_type,ir.`recpt_id` AS source_doc_id,ir.`recpt_code` AS source_doc_code,irl.`line_id` AS source_doc_line_id,
|
||||||
irl.`quantity_recived` AS transaction_quantity,irl.`expire_date`,
|
irl.`quantity_recived` AS transaction_quantity,ir.recpt_date, irl.`expire_date`,
|
||||||
ir.`create_by`,ir.`create_time`,ir.`update_by`,ir.`update_time`
|
ir.`create_by`,ir.`create_time`,ir.`update_by`,ir.`update_time`
|
||||||
FROM wm_item_recpt ir
|
FROM wm_item_recpt ir
|
||||||
LEFT JOIN wm_item_recpt_line irl
|
LEFT JOIN wm_item_recpt_line irl
|
||||||
|
@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="transactionQuantity" column="transaction_quantity" />
|
<result property="transactionQuantity" column="transaction_quantity" />
|
||||||
<result property="transactionDate" column="transaction_date" />
|
<result property="transactionDate" column="transaction_date" />
|
||||||
<result property="relatedTransactionId" column="related_transaction_id" />
|
<result property="relatedTransactionId" column="related_transaction_id" />
|
||||||
|
<result property="recptDate" column="recpt_date"></result>
|
||||||
<result property="erpDate" column="erp_date" />
|
<result property="erpDate" column="erp_date" />
|
||||||
<result property="expireDate" column="expire_date" />
|
<result property="expireDate" column="expire_date" />
|
||||||
<result property="attr1" column="attr1" />
|
<result property="attr1" column="attr1" />
|
||||||
@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectWmTransactionVo">
|
<sql id="selectWmTransactionVo">
|
||||||
select transaction_id, transaction_type, item_id, item_code, item_name, specification, unit_of_measure, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, vendor_id, vendor_code, vendor_name, vendor_nick, source_doc_type, source_doc_id, source_doc_code, source_doc_line_id, material_stock_id, transaction_flag, transaction_quantity, transaction_date, related_transaction_id, erp_date, expire_date, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_transaction
|
select transaction_id, transaction_type, item_id, item_code, item_name, specification, unit_of_measure, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, vendor_id, vendor_code, vendor_name, vendor_nick, source_doc_type, source_doc_id, source_doc_code, source_doc_line_id, material_stock_id, transaction_flag, transaction_quantity, transaction_date, related_transaction_id, erp_date,recpt_date, expire_date, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_transaction
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectWmTransactionList" parameterType="WmTransaction" resultMap="WmTransactionResult">
|
<select id="selectWmTransactionList" parameterType="WmTransaction" resultMap="WmTransactionResult">
|
||||||
@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="transactionQuantity != null "> and transaction_quantity = #{transactionQuantity}</if>
|
<if test="transactionQuantity != null "> and transaction_quantity = #{transactionQuantity}</if>
|
||||||
<if test="transactionDate != null "> and transaction_date = #{transactionDate}</if>
|
<if test="transactionDate != null "> and transaction_date = #{transactionDate}</if>
|
||||||
<if test="relatedTransactionId != null "> and related_transaction_id = #{relatedTransactionId}</if>
|
<if test="relatedTransactionId != null "> and related_transaction_id = #{relatedTransactionId}</if>
|
||||||
|
<if test="recptDate != null"> and recpt_date = #{recptDate}</if>
|
||||||
<if test="erpDate != null "> and erp_date = #{erpDate}</if>
|
<if test="erpDate != null "> and erp_date = #{erpDate}</if>
|
||||||
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
|
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
|
||||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
@ -130,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="transactionDate != null">transaction_date,</if>
|
<if test="transactionDate != null">transaction_date,</if>
|
||||||
<if test="relatedTransactionId != null">related_transaction_id,</if>
|
<if test="relatedTransactionId != null">related_transaction_id,</if>
|
||||||
<if test="erpDate != null">erp_date,</if>
|
<if test="erpDate != null">erp_date,</if>
|
||||||
|
<if test="recptDate != null">recpt_date,</if>
|
||||||
<if test="expireDate != null">expire_date,</if>
|
<if test="expireDate != null">expire_date,</if>
|
||||||
<if test="attr1 != null">attr1,</if>
|
<if test="attr1 != null">attr1,</if>
|
||||||
<if test="attr2 != null">attr2,</if>
|
<if test="attr2 != null">attr2,</if>
|
||||||
@ -171,6 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="transactionDate != null">#{transactionDate},</if>
|
<if test="transactionDate != null">#{transactionDate},</if>
|
||||||
<if test="relatedTransactionId != null">#{relatedTransactionId},</if>
|
<if test="relatedTransactionId != null">#{relatedTransactionId},</if>
|
||||||
<if test="erpDate != null">#{erpDate},</if>
|
<if test="erpDate != null">#{erpDate},</if>
|
||||||
|
<if test="recptDate != null">#{recptDate},</if>
|
||||||
<if test="expireDate != null">#{expireDate},</if>
|
<if test="expireDate != null">#{expireDate},</if>
|
||||||
<if test="attr1 != null">#{attr1},</if>
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
<if test="attr2 != null">#{attr2},</if>
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
@ -216,6 +220,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="transactionDate != null">transaction_date = #{transactionDate},</if>
|
<if test="transactionDate != null">transaction_date = #{transactionDate},</if>
|
||||||
<if test="relatedTransactionId != null">related_transaction_id = #{relatedTransactionId},</if>
|
<if test="relatedTransactionId != null">related_transaction_id = #{relatedTransactionId},</if>
|
||||||
<if test="erpDate != null">erp_date = #{erpDate},</if>
|
<if test="erpDate != null">erp_date = #{erpDate},</if>
|
||||||
|
<if test="recptDate != null">recp_date = #{recptDate},</if>
|
||||||
<if test="expireDate != null">expire_date = #{expireDate},</if>
|
<if test="expireDate != null">expire_date = #{expireDate},</if>
|
||||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
Loading…
Reference in New Issue
Block a user