重要更新,库存管理中添加入库日期字段,以支持线边库功能。
This commit is contained in:
@@ -53,6 +53,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
limit 1;
|
||||
</select>
|
||||
|
||||
<select id="findTemplateByProductIdAndQcType" parameterType="QcMobParam" resultMap="QcTemplateResult">
|
||||
select t.*
|
||||
from qc_template t
|
||||
left join qc_template_product p
|
||||
on t.template_id = p.template_id
|
||||
where p.item_id = #{itemId}
|
||||
and t.qc_types like concat('%',#{qcType},'%')
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertQcTemplate" parameterType="QcTemplate" useGeneratedKeys="true" keyProperty="templateId">
|
||||
insert into qc_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
@@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="vendorName" column="vendor_name" />
|
||||
<result property="vendorNick" column="vendor_nick" />
|
||||
<result property="quantityOnhand" column="quantity_onhand" />
|
||||
<result property="recptDate" column="recpt_date"></result>
|
||||
<result property="expireDate" column="expire_date" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
@@ -39,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmMaterialStockVo">
|
||||
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
|
||||
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,recpt_date, 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">
|
||||
@@ -66,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="recptDate !=null"> and recpt_date = #{recptDate}</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>
|
||||
@@ -90,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="locationId != null "> and location_id = #{locationId}</if>
|
||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
|
||||
<if test="recptDate !=null"> and recpt_date = #{recptDate}</if>
|
||||
</where>
|
||||
and 1=1 limit 1
|
||||
</select>
|
||||
@@ -118,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="vendorName != null">vendor_name,</if>
|
||||
<if test="vendorNick != null">vendor_nick,</if>
|
||||
<if test="quantityOnhand != null">quantity_onhand,</if>
|
||||
<if test="recptDate !=null">recpt_date,</if>
|
||||
<if test="expireDate != null">expire_date,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
@@ -150,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="vendorName != null">#{vendorName},</if>
|
||||
<if test="vendorNick != null">#{vendorNick},</if>
|
||||
<if test="quantityOnhand != null">#{quantityOnhand},</if>
|
||||
<if test="recptDate !=null">#{recptDate},</if>
|
||||
<if test="expireDate != null">#{expireDate},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
@@ -186,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="recptDate !=null">recpt_date = #{recptDate},</if>
|
||||
<if test="expireDate != null">expire_date = #{expireDate},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
|
||||
Reference in New Issue
Block a user