添加字段

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

@@ -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>