添加到货通知单功能
This commit is contained in:
@@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="minStock" column="min_stock" />
|
||||
<result property="maxStock" column="max_stock" />
|
||||
<result property="highValue" column="high_value" />
|
||||
<result property="batchFlag" column="batch_flag" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
@@ -33,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectMdItemVo">
|
||||
select item_id, item_code, item_name, specification, unit_of_measure,unit_name, item_or_product,
|
||||
item_type_id,item_type_code,item_type_name,enable_flag,safe_stock_flag,min_stock,max_stock,high_value, create_by, create_time, remark
|
||||
item_type_id,item_type_code,item_type_name,enable_flag,safe_stock_flag,min_stock,max_stock,high_value,batch_flag, create_by, create_time, remark
|
||||
from md_item
|
||||
</sql>
|
||||
|
||||
@@ -112,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="safeStockFlag =='Y'.toString()">min_stock,</if>
|
||||
<if test="safeStockFlag =='Y'.toString()">max_stock,</if>
|
||||
<if test="highValue !=null and highValue !=''">high_value,</if>
|
||||
<if test="batchFlag !=null and batchFlag !=''">batch_flag,</if>
|
||||
<if test="remark !=null and remark !=''">remark,</if>
|
||||
<if test="attr1 !=null and attr1 !=''">attr1,</if>
|
||||
<if test="attr2 !=null and attr2 !=''">attr2,</if>
|
||||
@@ -135,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="safeStockFlag =='Y'.toString() and minStock !=null ">#{minStock},</if>
|
||||
<if test="safeStockFlag =='Y'.toString() and safeStockFlag !=null ">#{maxStock},</if>
|
||||
<if test="highValue !=null and highValue !=''">#{highValue},</if>
|
||||
<if test="batchFlag !=null and batchFlag !=''">#{batchFlag},</if>
|
||||
<if test="remark !=null and remark !=''">#{remark},</if>
|
||||
<if test="attr1 !=null and attr1 !=''">#{attr1},</if>
|
||||
<if test="attr2 !=null and attr2 !=''">#{attr2},</if>
|
||||
@@ -161,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="minStock !=null and minStock !=''">min_stock = #{minStock},</if>
|
||||
<if test="maxStock !=null and maxStock !=''">max_stock = #{maxStock},</if>
|
||||
<if test="highValue !=null and highValue !=''">high_value = #{highValue},</if>
|
||||
<if test="batchFlag !=null and batchFlag !=''">batch_flag = #{batchFlag},</if>
|
||||
<if test="remark !=null and remark !=''">remark = #{remark},</if>
|
||||
<if test="attr1 !=null and attr1 !=''">attr1=#{attr1},</if>
|
||||
<if test="attr2 !=null and attr2 !=''">attr2=#{attr2},</if>
|
||||
|
||||
@@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="quantityMaxUnqualified" column="quantity_max_unqualified" />
|
||||
<result property="quantityRecived" column="quantity_recived" />
|
||||
<result property="quantityCheck" column="quantity_check" />
|
||||
<result property="quantityQualified" column="quantity_qualified" />
|
||||
<result property="quantityUnqualified" column="quantity_unqualified" />
|
||||
<result property="crRate" column="cr_rate" />
|
||||
<result property="majRate" column="maj_rate" />
|
||||
@@ -52,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQcIqcVo">
|
||||
select iqc_id, iqc_code, iqc_name, template_id, source_doc_id,source_doc_type, source_doc_code, source_line_id, vendor_id, vendor_code, vendor_name, vendor_nick, vendor_batch, item_id, item_code, item_name, specification, unit_of_measure, quantity_min_check, quantity_max_unqualified, quantity_recived, quantity_check, quantity_unqualified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, recive_date, inspect_date, inspector,u.nick_name as inspector_name, q.status, q.remark, attr1, attr2, attr3, attr4, q.create_by, q.create_time, q.update_by, q.update_time from qc_iqc q left join sys_user u on u.user_name = q.inspector
|
||||
select iqc_id, iqc_code, iqc_name, template_id, source_doc_id,source_doc_type, source_doc_code, source_line_id, vendor_id, vendor_code, vendor_name, vendor_nick, vendor_batch, item_id, item_code, item_name, specification, unit_of_measure, quantity_min_check, quantity_max_unqualified, quantity_recived, quantity_check, quantity_qualified,quantity_unqualified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, recive_date, inspect_date, inspector,u.nick_name as inspector_name, q.status, q.remark, attr1, attr2, attr3, attr4, q.create_by, q.create_time, q.update_by, q.update_time from qc_iqc q left join sys_user u on u.user_name = q.inspector
|
||||
</sql>
|
||||
|
||||
<select id="selectQcIqcList" parameterType="QcIqc" resultMap="QcIqcResult">
|
||||
@@ -79,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityMaxUnqualified != null "> and quantity_max_unqualified = #{quantityMaxUnqualified}</if>
|
||||
<if test="quantityRecived != null "> and quantity_recived = #{quantityRecived}</if>
|
||||
<if test="quantityCheck != null "> and quantity_check = #{quantityCheck}</if>
|
||||
<if test="quantityQualified != null "> and quantity_qualified = #{quantityQualified}</if>
|
||||
<if test="quantityUnqualified != null "> and quantity_unqualified = #{quantityUnqualified}</if>
|
||||
<if test="crRate != null "> and cr_rate = #{crRate}</if>
|
||||
<if test="majRate != null "> and maj_rate = #{majRate}</if>
|
||||
@@ -129,6 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityMaxUnqualified != null">quantity_max_unqualified,</if>
|
||||
<if test="quantityRecived != null">quantity_recived,</if>
|
||||
<if test="quantityCheck != null">quantity_check,</if>
|
||||
<if test="quantityQualified != null">quantity_qualified,</if>
|
||||
<if test="quantityUnqualified != null">quantity_unqualified,</if>
|
||||
<if test="crRate != null">cr_rate,</if>
|
||||
<if test="majRate != null">maj_rate,</if>
|
||||
@@ -173,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityMaxUnqualified != null">#{quantityMaxUnqualified},</if>
|
||||
<if test="quantityRecived != null">#{quantityRecived},</if>
|
||||
<if test="quantityCheck != null">#{quantityCheck},</if>
|
||||
<if test="quantityQualified != null">#{quantityQualified},</if>
|
||||
<if test="quantityUnqualified != null">#{quantityUnqualified},</if>
|
||||
<if test="crRate != null">#{crRate},</if>
|
||||
<if test="majRate != null">#{majRate},</if>
|
||||
@@ -242,6 +246,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="quantityMaxUnqualified != null">quantity_max_unqualified = #{quantityMaxUnqualified},</if>
|
||||
<if test="quantityRecived != null">quantity_recived = #{quantityRecived},</if>
|
||||
<if test="quantityCheck != null">quantity_check = #{quantityCheck},</if>
|
||||
<if test="quantityQualified != null">quantity_qualified = #{quantityQualified},</if>
|
||||
<if test="quantityUnqualified != null">quantity_unqualified = #{quantityUnqualified},</if>
|
||||
<if test="crRate != null">cr_rate = #{crRate},</if>
|
||||
<if test="majRate != null">maj_rate = #{majRate},</if>
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
wi.recpt_id as source_doc_id,
|
||||
wi.recpt_code AS source_doc_code,
|
||||
wi.notice_id as source_doc_id,
|
||||
wi.notice_code AS source_doc_code,
|
||||
wil.line_id AS source_line_id,
|
||||
wi.create_time AS record_time,
|
||||
'IQC' AS qc_type,
|
||||
@@ -60,7 +60,7 @@
|
||||
wil.item_name,
|
||||
wil.specification,
|
||||
wil.unit_of_measure,
|
||||
wil.quantity_recived AS quantity_uncheck,
|
||||
wil.quantity_arrival AS quantity_uncheck,
|
||||
NULL AS workorder_id,
|
||||
NULL AS workorder_code,
|
||||
NULL AS workorder_name,
|
||||
@@ -74,23 +74,25 @@
|
||||
wi.vendor_code as vendor_client_code,
|
||||
wi.vendor_name as vendor_client_name,
|
||||
wi.vendor_nick as vendor_client_nick,
|
||||
wil.batch_code,
|
||||
wil.warehouse_id,
|
||||
wil.warehouse_code,
|
||||
wil.warehouse_name,
|
||||
wil.location_id,
|
||||
wil.location_code,
|
||||
wil.location_name,
|
||||
wil.area_id,
|
||||
wil.area_code,
|
||||
wil.area_name,
|
||||
concat( wil.warehouse_name, wil.location_name, wil.area_name ) AS address
|
||||
null as batch_code,
|
||||
null as warehouse_id,
|
||||
null as warehouse_code,
|
||||
null as warehouse_name,
|
||||
null as location_id,
|
||||
NULL AS location_code,
|
||||
NULL AS location_name,
|
||||
NULL AS area_id,
|
||||
NULL AS area_code,
|
||||
NULL AS area_name,
|
||||
NULL AS address
|
||||
FROM
|
||||
wm_item_recpt wi
|
||||
LEFT JOIN wm_item_recpt_line wil ON wi.recpt_id = wil.recpt_id
|
||||
wm_arrival_notice wi
|
||||
LEFT JOIN wm_arrival_notice_line wil ON wi.notice_id = wil.notice_id
|
||||
WHERE
|
||||
wil.iqc_check = 'Y'
|
||||
AND wil.iqc_id IS NULL UNION ALL
|
||||
AND wil.iqc_id IS NULL
|
||||
AND wi.status = 'APPROVING'
|
||||
UNION ALL
|
||||
SELECT
|
||||
pf.record_id as source_doc_id,
|
||||
pf.feedback_code AS source_doc_code,
|
||||
|
||||
@@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select t.template_id, template_code, template_name, qc_types, enable_flag, t.remark
|
||||
from qc_template t
|
||||
left join qc_template_product tl on t.template_id = tl.template_id
|
||||
where t.qc_types like concat('%',#{qcTypes},'%') and tl.item_id = #{itemId}
|
||||
where t.qc_types like concat('%',#{qcTypes},'%') and tl.item_id = #{itemId} and t.enable_flag = 'Y'
|
||||
limit 1;
|
||||
</select>
|
||||
|
||||
@@ -60,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
on t.template_id = p.template_id
|
||||
where p.item_id = #{itemId}
|
||||
and t.qc_types like concat('%',#{qcType},'%')
|
||||
and t.enable_flag = 'Y'
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.mes.wm.mapper.WmArrivalNoticeLineMapper">
|
||||
|
||||
<resultMap type="WmArrivalNoticeLine" id="WmArrivalNoticeLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="noticeId" column="notice_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="specification" column="specification" />
|
||||
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||
<result property="quantityArrival" column="quantity_arrival" />
|
||||
<result property="quantityQuanlified" column="quantity_quanlified" />
|
||||
<result property="iqcCheck" column="iqc_check" />
|
||||
<result property="iqcId" column="iqc_id" />
|
||||
<result property="iqcCode" column="iqc_code" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmArrivalNoticeLineVo">
|
||||
select line_id, notice_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_arrival, quantity_quanlified, iqc_check, iqc_id, iqc_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_arrival_notice_line
|
||||
</sql>
|
||||
|
||||
<select id="selectWmArrivalNoticeLineList" parameterType="WmArrivalNoticeLine" resultMap="WmArrivalNoticeLineResult">
|
||||
<include refid="selectWmArrivalNoticeLineVo"/>
|
||||
<where>
|
||||
<if test="noticeId != null "> and notice_id = #{noticeId}</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>
|
||||
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
|
||||
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||
<if test="quantityArrival != null "> and quantity_arrival = #{quantityArrival}</if>
|
||||
<if test="quantityQuanlified != null "> and quantity_quanlified = #{quantityQuanlified}</if>
|
||||
<if test="iqcCheck != null and iqcCheck != ''"> and iqc_check = #{iqcCheck}</if>
|
||||
<if test="iqcId != null "> and iqc_id = #{iqcId}</if>
|
||||
<if test="iqcCode != null and iqcCode != ''"> and iqc_code = #{iqcCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWmArrivalNoticeLineByLineId" parameterType="Long" resultMap="WmArrivalNoticeLineResult">
|
||||
<include refid="selectWmArrivalNoticeLineVo"/>
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<select id="selectUncheckedLine" parameterType="Long" resultMap="WmArrivalNoticeLineResult">
|
||||
<include refid="selectWmArrivalNoticeLineVo"/>
|
||||
where notice_id = #{noticeId}
|
||||
and iqc_check = 'Y'
|
||||
and iqc_id is null
|
||||
</select>
|
||||
|
||||
<insert id="insertWmArrivalNoticeLine" parameterType="WmArrivalNoticeLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||
insert into wm_arrival_notice_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="noticeId != null">notice_id,</if>
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="itemCode != null">item_code,</if>
|
||||
<if test="itemName != null">item_name,</if>
|
||||
<if test="specification != null">specification,</if>
|
||||
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
||||
<if test="quantityArrival != null">quantity_arrival,</if>
|
||||
<if test="quantityQuanlified != null">quantity_quanlified,</if>
|
||||
<if test="iqcCheck != null">iqc_check,</if>
|
||||
<if test="iqcId != null">iqc_id,</if>
|
||||
<if test="iqcCode != null">iqc_code,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="noticeId != null">#{noticeId},</if>
|
||||
<if test="itemId != null">#{itemId},</if>
|
||||
<if test="itemCode != null">#{itemCode},</if>
|
||||
<if test="itemName != null">#{itemName},</if>
|
||||
<if test="specification != null">#{specification},</if>
|
||||
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
||||
<if test="quantityArrival != null">#{quantityArrival},</if>
|
||||
<if test="quantityQuanlified != null">#{quantityQuanlified},</if>
|
||||
<if test="iqcCheck != null">#{iqcCheck},</if>
|
||||
<if test="iqcId != null">#{iqcId},</if>
|
||||
<if test="iqcCode != null">#{iqcCode},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWmArrivalNoticeLine" parameterType="WmArrivalNoticeLine">
|
||||
update wm_arrival_notice_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="noticeId != null">notice_id = #{noticeId},</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>
|
||||
<if test="specification != null">specification = #{specification},</if>
|
||||
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
|
||||
<if test="quantityArrival != null">quantity_arrival = #{quantityArrival},</if>
|
||||
<if test="quantityQuanlified != null">quantity_quanlified = #{quantityQuanlified},</if>
|
||||
<if test="iqcCheck != null">iqc_check = #{iqcCheck},</if>
|
||||
<if test="iqcId != null">iqc_id = #{iqcId},</if>
|
||||
<if test="iqcCode != null">iqc_code = #{iqcCode},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where line_id = #{lineId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWmArrivalNoticeLineByLineId" parameterType="Long">
|
||||
delete from wm_arrival_notice_line where line_id = #{lineId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmArrivalNoticeLineByLineIds" parameterType="String">
|
||||
delete from wm_arrival_notice_line where line_id in
|
||||
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByNoticeId" parameterType="Long">
|
||||
delete from wm_arrival_notice_line where notice_id = #{noticeId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
147
ktg-mes/src/main/resources/mapper/wm/WmArrivalNoticeMapper.xml
Normal file
147
ktg-mes/src/main/resources/mapper/wm/WmArrivalNoticeMapper.xml
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.mes.wm.mapper.WmArrivalNoticeMapper">
|
||||
|
||||
<resultMap type="WmArrivalNotice" id="WmArrivalNoticeResult">
|
||||
<result property="noticeId" column="notice_id" />
|
||||
<result property="noticeCode" column="notice_code" />
|
||||
<result property="noticeName" column="notice_name" />
|
||||
<result property="poCode" column="po_code" />
|
||||
<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="arrivalDate" column="arrival_date" />
|
||||
<result property="contact" column="contact" />
|
||||
<result property="tel" column="tel" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmArrivalNoticeVo">
|
||||
select notice_id, notice_code, notice_name, po_code, vendor_id, vendor_code, vendor_name, vendor_nick, arrival_date, contact, tel, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_arrival_notice
|
||||
</sql>
|
||||
|
||||
<select id="selectWmArrivalNoticeList" parameterType="WmArrivalNotice" resultMap="WmArrivalNoticeResult">
|
||||
<include refid="selectWmArrivalNoticeVo"/>
|
||||
<where>
|
||||
<if test="noticeCode != null and noticeCode != ''"> and notice_code = #{noticeCode}</if>
|
||||
<if test="noticeName != null and noticeName != ''"> and notice_name like concat('%', #{noticeName}, '%')</if>
|
||||
<if test="poCode != null and poCode != ''"> and po_code = #{poCode}</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="contact != null and contact != ''"> and contact = #{contact}</if>
|
||||
<if test="tel != null and tel != ''"> and tel = #{tel}</if>
|
||||
<if test="arrivalDate != null "> and arrival_date = #{arrivalDate}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWmArrivalNoticeByNoticeId" parameterType="Long" resultMap="WmArrivalNoticeResult">
|
||||
<include refid="selectWmArrivalNoticeVo"/>
|
||||
where notice_id = #{noticeId}
|
||||
</select>
|
||||
|
||||
<select id="checkRnCodeUnique" parameterType="WmArrivalNotice" resultMap="WmArrivalNoticeResult">
|
||||
<include refid="selectWmArrivalNoticeVo"/>
|
||||
where notice_code = #{noticeCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertWmArrivalNotice" parameterType="WmArrivalNotice" useGeneratedKeys="true" keyProperty="noticeId">
|
||||
insert into wm_arrival_notice
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="noticeCode != null and noticeCode != ''">notice_code,</if>
|
||||
<if test="noticeName != null and noticeName != ''">notice_name,</if>
|
||||
<if test="poCode != null">po_code,</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="arrivalDate != null">arrival_date,</if>
|
||||
<if test="contact != null">contact,</if>
|
||||
<if test="tel != null">tel,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="noticeCode != null and noticeCode != ''">#{noticeCode},</if>
|
||||
<if test="noticeName != null and noticeName != ''">#{noticeName},</if>
|
||||
<if test="poCode != null">#{poCode},</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="arrivalDate != null">#{arrivalDate},</if>
|
||||
<if test="contact != null">#{contact},</if>
|
||||
<if test="tel != null">#{tel},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWmArrivalNotice" parameterType="WmArrivalNotice">
|
||||
update wm_arrival_notice
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="noticeCode != null and noticeCode != ''">notice_code = #{noticeCode},</if>
|
||||
<if test="noticeName != null and noticeName != ''">notice_name = #{noticeName},</if>
|
||||
<if test="poCode != null">po_code = #{poCode},</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="arrivalDate != null">arrival_date = #{arrivalDate},</if>
|
||||
<if test="contact != null">contact = #{contact},</if>
|
||||
<if test="tel != null">tel = #{tel},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where notice_id = #{noticeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWmArrivalNoticeByNoticeId" parameterType="Long">
|
||||
delete from wm_arrival_notice where notice_id = #{noticeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmArrivalNoticeByNoticeIds" parameterType="String">
|
||||
delete from wm_arrival_notice where notice_id in
|
||||
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
||||
#{noticeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<resultMap type="WmItemRecptLine" id="WmItemRecptLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="recptId" column="recpt_id" />
|
||||
<result property="noticeLineId" column="notice_line_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
@@ -39,13 +40,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmItemRecptLineVo">
|
||||
select line_id, recpt_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_recived, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, expire_date,iqc_check,iqc_id,iqc_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_item_recpt_line
|
||||
select line_id, recpt_id, notice_line_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_recived, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, expire_date,iqc_check,iqc_id,iqc_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_item_recpt_line
|
||||
</sql>
|
||||
|
||||
<select id="selectWmItemRecptLineList" parameterType="WmItemRecptLine" resultMap="WmItemRecptLineResult">
|
||||
<include refid="selectWmItemRecptLineVo"/>
|
||||
<where>
|
||||
<if test="recptId != null "> and recpt_id = #{recptId}</if>
|
||||
<if test="noticeLineId != null "> and notice_line_id = #{noticeLineId}</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>
|
||||
@@ -76,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
insert into wm_item_recpt_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recptId != null">recpt_id,</if>
|
||||
<if test="noticeLineId != null">notice_line_id,</if>
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="itemCode != null">item_code,</if>
|
||||
<if test="itemName != null">item_name,</if>
|
||||
@@ -108,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recptId != null">#{recptId},</if>
|
||||
<if test="noticeLineId != null">#{noticeLineId},</if>
|
||||
<if test="itemId != null">#{itemId},</if>
|
||||
<if test="itemCode != null">#{itemCode},</if>
|
||||
<if test="itemName != null">#{itemName},</if>
|
||||
@@ -144,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update wm_item_recpt_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="recptId != null">recpt_id = #{recptId},</if>
|
||||
<if test="noticeLineId != null">notice_line_id = #{noticeLineId},</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>
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
<result property="recptName" column="recpt_name" />
|
||||
<result property="iqcId" column="iqc_id" />
|
||||
<result property="iqcCode" column="iqc_code" />
|
||||
<result property="noticeId" column="notice_id" />
|
||||
<result property="noticeCode" column="notice_code" />
|
||||
<result property="poCode" column="po_code" />
|
||||
<result property="vendorId" column="vendor_id" />
|
||||
<result property="vendorCode" column="vendor_code" />
|
||||
@@ -72,7 +74,7 @@
|
||||
|
||||
|
||||
<sql id="selectWmItemRecptVo">
|
||||
select recpt_id, recpt_code, recpt_name, iqc_id, iqc_code, po_code, vendor_id, vendor_code, vendor_name, vendor_nick, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, recpt_date, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_item_recpt
|
||||
select recpt_id, recpt_code, recpt_name, iqc_id, iqc_code, notice_id, notice_code,po_code, vendor_id, vendor_code, vendor_name, vendor_nick, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, recpt_date, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_item_recpt
|
||||
</sql>
|
||||
|
||||
<select id="selectWmItemRecptList" parameterType="WmItemRecpt" resultMap="WmItemRecptResult">
|
||||
@@ -82,6 +84,8 @@
|
||||
<if test="recptName != null and recptName != ''"> and recpt_name like concat('%', #{recptName}, '%')</if>
|
||||
<if test="iqcId != null "> and iqc_id = #{iqcId}</if>
|
||||
<if test="iqcCode != null and iqcCode != ''"> and iqc_code = #{iqcCode}</if>
|
||||
<if test="noticeId != null "> and notice_id = #{noticeId}</if>
|
||||
<if test="noticeCode != null and noticeCode != ''"> and notice_code = #{noticeCode}</if>
|
||||
<if test="poCode != null and poCode != ''"> and po_code = #{poCode}</if>
|
||||
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
|
||||
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
||||
@@ -134,6 +138,8 @@
|
||||
<if test="recptName != null and recptName != ''">recpt_name,</if>
|
||||
<if test="iqcId != null">iqc_id,</if>
|
||||
<if test="iqcCode != null">iqc_code,</if>
|
||||
<if test="noticeId != null">notice_id,</if>
|
||||
<if test="noticeCode != null">notice_code,</if>
|
||||
<if test="poCode != null">po_code,</if>
|
||||
<if test="vendorId != null">vendor_id,</if>
|
||||
<if test="vendorCode != null">vendor_code,</if>
|
||||
@@ -165,6 +171,8 @@
|
||||
<if test="recptName != null and recptName != ''">#{recptName},</if>
|
||||
<if test="iqcId != null">#{iqcId},</if>
|
||||
<if test="iqcCode != null">#{iqcCode},</if>
|
||||
<if test="noticeId != null">#{noticeId},</if>
|
||||
<if test="noticeCode != null">#{noticeCode},</if>
|
||||
<if test="poCode != null">#{poCode},</if>
|
||||
<if test="vendorId != null">#{vendorId},</if>
|
||||
<if test="vendorCode != null">#{vendorCode},</if>
|
||||
@@ -200,6 +208,8 @@
|
||||
<if test="recptName != null and recptName != ''">recpt_name = #{recptName},</if>
|
||||
<if test="iqcId != null">iqc_id = #{iqcId},</if>
|
||||
<if test="iqcCode != null">iqc_code = #{iqcCode},</if>
|
||||
<if test="noticeId != null">notice_id = #{noticeId},</if>
|
||||
<if test="noticeCode != null">notice_code = #{noticeCode},</if>
|
||||
<if test="poCode != null">po_code = #{poCode},</if>
|
||||
<if test="vendorId != null">vendor_id = #{vendorId},</if>
|
||||
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
|
||||
|
||||
Reference in New Issue
Block a user