添加字段

This commit is contained in:
JinLu.Yin 2022-05-24 22:55:55 +08:00
parent b1b806a200
commit ec9c9855ca
6 changed files with 280 additions and 4 deletions

View File

@ -21,6 +21,10 @@ public class WmMaterialStock extends BaseEntity
/** 事务ID */
private Long materialStockId;
/** 物料类型ID */
@Excel(name = "物料类型ID")
private Long itemTypeId;
/** 产品物料ID */
@Excel(name = "产品物料ID")
private Long itemId;
@ -81,6 +85,22 @@ public class WmMaterialStock extends BaseEntity
@Excel(name = "库位名称")
private String areaName;
/** 供应商ID */
@Excel(name = "供应商ID")
private Long vendorId;
/** 供应商编号 */
@Excel(name = "供应商编号")
private String vendorCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String vendorName;
/** 供应商简称 */
@Excel(name = "供应商简称")
private String vendorNick;
/** 在库数量 */
@Excel(name = "在库数量")
private BigDecimal quantityOnhand;
@ -115,6 +135,15 @@ public class WmMaterialStock extends BaseEntity
{
return materialStockId;
}
public void setItemTypeId(Long itemTypeId)
{
this.itemTypeId = itemTypeId;
}
public Long getItemTypeId()
{
return itemTypeId;
}
public void setItemId(Long itemId)
{
this.itemId = itemId;
@ -250,6 +279,42 @@ public class WmMaterialStock extends BaseEntity
{
return areaName;
}
public void setVendorId(Long vendorId)
{
this.vendorId = vendorId;
}
public Long getVendorId()
{
return vendorId;
}
public void setVendorCode(String vendorCode)
{
this.vendorCode = vendorCode;
}
public String getVendorCode()
{
return vendorCode;
}
public void setVendorName(String vendorName)
{
this.vendorName = vendorName;
}
public String getVendorName()
{
return vendorName;
}
public void setVendorNick(String vendorNick)
{
this.vendorNick = vendorNick;
}
public String getVendorNick()
{
return vendorNick;
}
public void setQuantityOnhand(BigDecimal quantityOnhand)
{
this.quantityOnhand = quantityOnhand;
@ -309,6 +374,7 @@ public class WmMaterialStock extends BaseEntity
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("materialStockId", getMaterialStockId())
.append("itemTypeId", getItemTypeId())
.append("itemId", getItemId())
.append("itemCode", getItemCode())
.append("itemName", getItemName())
@ -324,6 +390,10 @@ public class WmMaterialStock extends BaseEntity
.append("areaId", getAreaId())
.append("areaCode", getAreaCode())
.append("areaName", getAreaName())
.append("vendorId", getVendorId())
.append("vendorCode", getVendorCode())
.append("vendorName", getVendorName())
.append("vendorNick", getVendorNick())
.append("quantityOnhand", getQuantityOnhand())
.append("expireDate", getExpireDate())
.append("attr1", getAttr1())

View File

@ -85,6 +85,38 @@ public class WmTransaction extends BaseEntity
@Excel(name = "库位名称")
private String areaName;
/** 供应商ID */
@Excel(name = "供应商ID")
private Long vendorId;
/** 供应商编号 */
@Excel(name = "供应商编号")
private String vendorCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String vendorName;
/** 供应商简称 */
@Excel(name = "供应商简称")
private String vendorNick;
/** 单据类型 */
@Excel(name = "单据类型")
private String sourceDocType;
/** 单据ID */
@Excel(name = "单据ID")
private Long sourceDocId;
/** 单据编号 */
@Excel(name = "单据编号")
private String sourceDocCode;
/** 单据行ID */
@Excel(name = "单据行ID")
private Long sourceDocLineId;
/** 库存记录ID */
@Excel(name = "库存记录ID")
private Long materialStockId;
@ -102,6 +134,10 @@ public class WmTransaction extends BaseEntity
@Excel(name = "事务日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date transactionDate;
/** 关联的事务ID */
@Excel(name = "关联的事务ID")
private Long relatedTransactionId;
/** ERP账期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "ERP账期", width = 30, dateFormat = "yyyy-MM-dd")
@ -113,15 +149,19 @@ public class WmTransaction extends BaseEntity
private Date expireDate;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private Long attr3;
/** 预留字段4 */
@Excel(name = "预留字段4")
private Long attr4;
public void setTransactionId(Long transactionId)
@ -277,6 +317,78 @@ public class WmTransaction extends BaseEntity
{
return areaName;
}
public void setVendorId(Long vendorId)
{
this.vendorId = vendorId;
}
public Long getVendorId()
{
return vendorId;
}
public void setVendorCode(String vendorCode)
{
this.vendorCode = vendorCode;
}
public String getVendorCode()
{
return vendorCode;
}
public void setVendorName(String vendorName)
{
this.vendorName = vendorName;
}
public String getVendorName()
{
return vendorName;
}
public void setVendorNick(String vendorNick)
{
this.vendorNick = vendorNick;
}
public String getVendorNick()
{
return vendorNick;
}
public void setSourceDocType(String sourceDocType)
{
this.sourceDocType = sourceDocType;
}
public String getSourceDocType()
{
return sourceDocType;
}
public void setSourceDocId(Long sourceDocId)
{
this.sourceDocId = sourceDocId;
}
public Long getSourceDocId()
{
return sourceDocId;
}
public void setSourceDocCode(String sourceDocCode)
{
this.sourceDocCode = sourceDocCode;
}
public String getSourceDocCode()
{
return sourceDocCode;
}
public void setSourceDocLineId(Long sourceDocLineId)
{
this.sourceDocLineId = sourceDocLineId;
}
public Long getSourceDocLineId()
{
return sourceDocLineId;
}
public void setMaterialStockId(Long materialStockId)
{
this.materialStockId = materialStockId;
@ -313,6 +425,15 @@ public class WmTransaction extends BaseEntity
{
return transactionDate;
}
public void setRelatedTransactionId(Long relatedTransactionId)
{
this.relatedTransactionId = relatedTransactionId;
}
public Long getRelatedTransactionId()
{
return relatedTransactionId;
}
public void setErpDate(Date erpDate)
{
this.erpDate = erpDate;
@ -388,10 +509,19 @@ public class WmTransaction extends BaseEntity
.append("areaId", getAreaId())
.append("areaCode", getAreaCode())
.append("areaName", getAreaName())
.append("vendorId", getVendorId())
.append("vendorCode", getVendorCode())
.append("vendorName", getVendorName())
.append("vendorNick", getVendorNick())
.append("sourceDocType", getSourceDocType())
.append("sourceDocId", getSourceDocId())
.append("sourceDocCode", getSourceDocCode())
.append("sourceDocLineId", getSourceDocLineId())
.append("materialStockId", getMaterialStockId())
.append("transactionFlag", getTransactionFlag())
.append("transactionQuantity", getTransactionQuantity())
.append("transactionDate", getTransactionDate())
.append("relatedTransactionId", getRelatedTransactionId())
.append("erpDate", getErpDate())
.append("expireDate", getExpireDate())
.append("attr1", getAttr1())

View File

@ -1,8 +1,9 @@
package com.ktg.mes.wm.mapper;
import java.util.List;
import com.ktg.mes.wm.domain.WmMaterialStock;
import java.util.List;
/**
* 库存记录Mapper接口
*

View File

@ -1,8 +1,9 @@
package com.ktg.mes.wm.service;
import java.util.List;
import com.ktg.mes.wm.domain.WmMaterialStock;
import java.util.List;
/**
* 库存记录Service接口
*

View File

@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="WmMaterialStock" id="WmMaterialStockResult">
<result property="materialStockId" column="material_stock_id" />
<result property="itemTypeId" column="item_type_id" />
<result property="itemId" column="item_id" />
<result property="itemCode" column="item_code" />
<result property="itemName" column="item_name" />
@ -21,6 +22,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="areaId" column="area_id" />
<result property="areaCode" column="area_code" />
<result property="areaName" column="area_name" />
<result property="vendorId" column="vendor_id" />
<result property="vendorCode" column="vendor_code" />
<result property="vendorName" column="vendor_name" />
<result property="vendorNick" column="vendor_nick" />
<result property="quantityOnhand" column="quantity_onhand" />
<result property="expireDate" column="expire_date" />
<result property="attr1" column="attr1" />
@ -34,12 +39,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmMaterialStockVo">
select material_stock_id, 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, quantity_onhand, expire_date, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_material_stock
select material_stock_id, item_type_id, 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, quantity_onhand, expire_date, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_material_stock
</sql>
<select id="selectWmMaterialStockList" parameterType="WmMaterialStock" resultMap="WmMaterialStockResult">
<include refid="selectWmMaterialStockVo"/>
<where>
<if test="itemTypeId != null "> and item_type_id = #{itemTypeId}</if>
<if test="itemId != null "> and item_id = #{itemId}</if>
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
@ -55,6 +61,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null "> and area_id = #{areaId}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
<if test="vendorNick != null and vendorNick != ''"> and vendor_nick = #{vendorNick}</if>
<if test="quantityOnhand != null "> and quantity_onhand = #{quantityOnhand}</if>
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
@ -72,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertWmMaterialStock" parameterType="WmMaterialStock" useGeneratedKeys="true" keyProperty="materialStockId">
insert into wm_material_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemTypeId != null">item_type_id,</if>
<if test="itemId != null">item_id,</if>
<if test="itemCode != null">item_code,</if>
<if test="itemName != null">item_name,</if>
@ -87,6 +98,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">area_id,</if>
<if test="areaCode != null">area_code,</if>
<if test="areaName != null">area_name,</if>
<if test="vendorId != null">vendor_id,</if>
<if test="vendorCode != null">vendor_code,</if>
<if test="vendorName != null">vendor_name,</if>
<if test="vendorNick != null">vendor_nick,</if>
<if test="quantityOnhand != null">quantity_onhand,</if>
<if test="expireDate != null">expire_date,</if>
<if test="attr1 != null">attr1,</if>
@ -99,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemTypeId != null">#{itemTypeId},</if>
<if test="itemId != null">#{itemId},</if>
<if test="itemCode != null">#{itemCode},</if>
<if test="itemName != null">#{itemName},</if>
@ -114,6 +130,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">#{areaId},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="areaName != null">#{areaName},</if>
<if test="vendorId != null">#{vendorId},</if>
<if test="vendorCode != null">#{vendorCode},</if>
<if test="vendorName != null">#{vendorName},</if>
<if test="vendorNick != null">#{vendorNick},</if>
<if test="quantityOnhand != null">#{quantityOnhand},</if>
<if test="expireDate != null">#{expireDate},</if>
<if test="attr1 != null">#{attr1},</if>
@ -130,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateWmMaterialStock" parameterType="WmMaterialStock">
update wm_material_stock
<trim prefix="SET" suffixOverrides=",">
<if test="itemTypeId != null">item_type_id = #{itemTypeId},</if>
<if test="itemId != null">item_id = #{itemId},</if>
<if test="itemCode != null">item_code = #{itemCode},</if>
<if test="itemName != null">item_name = #{itemName},</if>
@ -145,6 +166,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">area_id = #{areaId},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="areaName != null">area_name = #{areaName},</if>
<if test="vendorId != null">vendor_id = #{vendorId},</if>
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
<if test="vendorName != null">vendor_name = #{vendorName},</if>
<if test="vendorNick != null">vendor_nick = #{vendorNick},</if>
<if test="quantityOnhand != null">quantity_onhand = #{quantityOnhand},</if>
<if test="expireDate != null">expire_date = #{expireDate},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>

View File

@ -22,10 +22,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="areaId" column="area_id" />
<result property="areaCode" column="area_code" />
<result property="areaName" column="area_name" />
<result property="vendorId" column="vendor_id" />
<result property="vendorCode" column="vendor_code" />
<result property="vendorName" column="vendor_name" />
<result property="vendorNick" column="vendor_nick" />
<result property="sourceDocType" column="source_doc_type" />
<result property="sourceDocId" column="source_doc_id" />
<result property="sourceDocCode" column="source_doc_code" />
<result property="sourceDocLineId" column="source_doc_line_id" />
<result property="materialStockId" column="material_stock_id" />
<result property="transactionFlag" column="transaction_flag" />
<result property="transactionQuantity" column="transaction_quantity" />
<result property="transactionDate" column="transaction_date" />
<result property="relatedTransactionId" column="related_transaction_id" />
<result property="erpDate" column="erp_date" />
<result property="expireDate" column="expire_date" />
<result property="attr1" column="attr1" />
@ -39,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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, material_stock_id, transaction_flag, transaction_quantity, transaction_date, 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, expire_date, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_transaction
</sql>
<select id="selectWmTransactionList" parameterType="WmTransaction" resultMap="WmTransactionResult">
@ -61,12 +70,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null "> and area_id = #{areaId}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
<if test="vendorNick != null and vendorNick != ''"> and vendor_nick = #{vendorNick}</if>
<if test="sourceDocType != null and sourceDocType != ''"> and source_doc_type = #{sourceDocType}</if>
<if test="sourceDocId != null "> and source_doc_id = #{sourceDocId}</if>
<if test="sourceDocCode != null and sourceDocCode != ''"> and source_doc_code = #{sourceDocCode}</if>
<if test="sourceDocLineId != null "> and source_doc_line_id = #{sourceDocLineId}</if>
<if test="materialStockId != null "> and material_stock_id = #{materialStockId}</if>
<if test="transactionFlag != null "> and transaction_flag = #{transactionFlag}</if>
<if test="transactionQuantity != null "> and transaction_quantity = #{transactionQuantity}</if>
<if test="transactionDate != null "> and transaction_date = #{transactionDate}</if>
<if test="relatedTransactionId != null "> and related_transaction_id = #{relatedTransactionId}</if>
<if test="erpDate != null "> and erp_date = #{erpDate}</if>
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if>
<if test="attr4 != null "> and attr4 = #{attr4}</if>
</where>
</select>
@ -94,10 +116,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">area_id,</if>
<if test="areaCode != null">area_code,</if>
<if test="areaName != null">area_name,</if>
<if test="vendorId != null">vendor_id,</if>
<if test="vendorCode != null">vendor_code,</if>
<if test="vendorName != null">vendor_name,</if>
<if test="vendorNick != null">vendor_nick,</if>
<if test="sourceDocType != null">source_doc_type,</if>
<if test="sourceDocId != null">source_doc_id,</if>
<if test="sourceDocCode != null">source_doc_code,</if>
<if test="sourceDocLineId != null">source_doc_line_id,</if>
<if test="materialStockId != null">material_stock_id,</if>
<if test="transactionFlag != null">transaction_flag,</if>
<if test="transactionQuantity != null">transaction_quantity,</if>
<if test="transactionDate != null">transaction_date,</if>
<if test="relatedTransactionId != null">related_transaction_id,</if>
<if test="erpDate != null">erp_date,</if>
<if test="expireDate != null">expire_date,</if>
<if test="attr1 != null">attr1,</if>
@ -126,10 +157,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">#{areaId},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="areaName != null">#{areaName},</if>
<if test="vendorId != null">#{vendorId},</if>
<if test="vendorCode != null">#{vendorCode},</if>
<if test="vendorName != null">#{vendorName},</if>
<if test="vendorNick != null">#{vendorNick},</if>
<if test="sourceDocType != null">#{sourceDocType},</if>
<if test="sourceDocId != null">#{sourceDocId},</if>
<if test="sourceDocCode != null">#{sourceDocCode},</if>
<if test="sourceDocLineId != null">#{sourceDocLineId},</if>
<if test="materialStockId != null">#{materialStockId},</if>
<if test="transactionFlag != null">#{transactionFlag},</if>
<if test="transactionQuantity != null">#{transactionQuantity},</if>
<if test="transactionDate != null">#{transactionDate},</if>
<if test="relatedTransactionId != null">#{relatedTransactionId},</if>
<if test="erpDate != null">#{erpDate},</if>
<if test="expireDate != null">#{expireDate},</if>
<if test="attr1 != null">#{attr1},</if>
@ -162,10 +202,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaId != null">area_id = #{areaId},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="areaName != null">area_name = #{areaName},</if>
<if test="vendorId != null">vendor_id = #{vendorId},</if>
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
<if test="vendorName != null">vendor_name = #{vendorName},</if>
<if test="vendorNick != null">vendor_nick = #{vendorNick},</if>
<if test="sourceDocType != null">source_doc_type = #{sourceDocType},</if>
<if test="sourceDocId != null">source_doc_id = #{sourceDocId},</if>
<if test="sourceDocCode != null">source_doc_code = #{sourceDocCode},</if>
<if test="sourceDocLineId != null">source_doc_line_id = #{sourceDocLineId},</if>
<if test="materialStockId != null">material_stock_id = #{materialStockId},</if>
<if test="transactionFlag != null">transaction_flag = #{transactionFlag},</if>
<if test="transactionQuantity != null">transaction_quantity = #{transactionQuantity},</if>
<if test="transactionDate != null">transaction_date = #{transactionDate},</if>
<if test="relatedTransactionId != null">related_transaction_id = #{relatedTransactionId},</if>
<if test="erpDate != null">erp_date = #{erpDate},</if>
<if test="expireDate != null">expire_date = #{expireDate},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>