You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
9.2 KiB
137 lines
9.2 KiB
<?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.ruoyi.storehouse.mapper.WarehousingInspectionNoticeMapper">
|
|
|
|
<resultMap type="WarehousingInspectionNotice" id="WarehousingInspectionNoticeResult">
|
|
<result property="warehousingInspectionNoticeId" column="warehousing_inspection_notice_id" />
|
|
<result property="inNoticeNumber" column="in_notice_number" />
|
|
<result property="purchaseOrderNumber" column="purchase_order_number" />
|
|
<result property="supplierCode" column="supplier_code" />
|
|
<result property="supplierName" column="supplier_name" />
|
|
<result property="customerContact" column="customer_contact" />
|
|
<result property="stockNumber" column="stock_number" />
|
|
<result property="stockName" column="stock_name" />
|
|
<result property="stockManager" column="stock_manager" />
|
|
<result property="exportSales" column="export_sales" />
|
|
<result property="warehousingCategory" column="warehousing_category" />
|
|
<result property="inspectionDate" column="inspection_date" />
|
|
<result property="warehousingDate" column="warehousing_date" />
|
|
<result property="remarks" column="remarks" />
|
|
<result property="inspectionReport" column="inspection_report" />
|
|
<result property="confirmFlag" column="confirm_flag" />
|
|
<result property="confirmPerson" column="confirm_person" />
|
|
<result property="confirmTime" column="confirm_time" />
|
|
<result property="firstAddTime" column="first_add_time" />
|
|
<result property="updateInfoTime" column="update_info_time" />
|
|
<result property="standbyOne" column="standby_one" />
|
|
<result property="standbyTwo" column="standby_two" />
|
|
</resultMap>
|
|
|
|
<sql id="selectWarehousingInspectionNoticeVo">
|
|
select warehousing_inspection_notice_id, in_notice_number, purchase_order_number, supplier_code, supplier_name, customer_contact, stock_number, stock_name, stock_manager, export_sales, warehousing_category, inspection_date, warehousing_date, remarks, inspection_report, confirm_flag, confirm_person, confirm_time, first_add_time, update_info_time, standby_one, standby_two from warehousing_inspection_notice
|
|
</sql>
|
|
|
|
<select id="selectWarehousingInspectionNoticeList" parameterType="WarehousingInspectionNotice" resultMap="WarehousingInspectionNoticeResult">
|
|
<include refid="selectWarehousingInspectionNoticeVo"/>
|
|
<where>
|
|
<if test="inNoticeNumber != null and inNoticeNumber != ''"> and in_notice_number like concat('%', #{inNoticeNumber}, '%')</if>
|
|
<if test="purchaseOrderNumber != null and purchaseOrderNumber != ''"> and purchase_order_number like concat('%', #{purchaseOrderNumber}, '%')</if>
|
|
<if test="supplierCode != null and supplierCode != ''"> and supplier_code like concat('%', #{supplierCode}, '%')</if>
|
|
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
<if test="warehousingCategory != null and warehousingCategory != ''"> and warehousing_category = #{warehousingCategory}</if>
|
|
<if test="params.beginWarehousingDate != null and params.beginWarehousingDate != '' and params.endWarehousingDate != null and params.endWarehousingDate != ''"> and warehousing_date between #{params.beginWarehousingDate} and #{params.endWarehousingDate}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectWarehousingInspectionNoticeById" parameterType="Long" resultMap="WarehousingInspectionNoticeResult">
|
|
<include refid="selectWarehousingInspectionNoticeVo"/>
|
|
where warehousing_inspection_notice_id = #{warehousingInspectionNoticeId}
|
|
</select>
|
|
|
|
<insert id="insertWarehousingInspectionNotice" parameterType="WarehousingInspectionNotice" useGeneratedKeys="true" keyProperty="warehousingInspectionNoticeId">
|
|
insert into warehousing_inspection_notice
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="inNoticeNumber != null and inNoticeNumber != ''">in_notice_number,</if>
|
|
<if test="purchaseOrderNumber != null">purchase_order_number,</if>
|
|
<if test="supplierCode != null">supplier_code,</if>
|
|
<if test="supplierName != null">supplier_name,</if>
|
|
<if test="customerContact != null">customer_contact,</if>
|
|
<if test="stockNumber != null">stock_number,</if>
|
|
<if test="stockName != null">stock_name,</if>
|
|
<if test="stockManager != null">stock_manager,</if>
|
|
<if test="exportSales != null">export_sales,</if>
|
|
<if test="warehousingCategory != null">warehousing_category,</if>
|
|
<if test="inspectionDate != null">inspection_date,</if>
|
|
<if test="warehousingDate != null">warehousing_date,</if>
|
|
<if test="remarks != null">remarks,</if>
|
|
<if test="inspectionReport != null">inspection_report,</if>
|
|
<if test="confirmFlag != null">confirm_flag,</if>
|
|
<if test="confirmPerson != null">confirm_person,</if>
|
|
<if test="confirmTime != null">confirm_time,</if>
|
|
<if test="standbyOne != null">standby_one,</if>
|
|
<if test="standbyTwo != null">standby_two,</if>
|
|
first_add_time,
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="inNoticeNumber != null and inNoticeNumber != ''">#{inNoticeNumber},</if>
|
|
<if test="purchaseOrderNumber != null">#{purchaseOrderNumber},</if>
|
|
<if test="supplierCode != null">#{supplierCode},</if>
|
|
<if test="supplierName != null">#{supplierName},</if>
|
|
<if test="customerContact != null">#{customerContact},</if>
|
|
<if test="stockNumber != null">#{stockNumber},</if>
|
|
<if test="stockName != null">#{stockName},</if>
|
|
<if test="stockManager != null">#{stockManager},</if>
|
|
<if test="exportSales != null">#{exportSales},</if>
|
|
<if test="warehousingCategory != null">#{warehousingCategory},</if>
|
|
<if test="inspectionDate != null">#{inspectionDate},</if>
|
|
<if test="warehousingDate != null">#{warehousingDate},</if>
|
|
<if test="remarks != null">#{remarks},</if>
|
|
<if test="inspectionReport != null">#{inspectionReport},</if>
|
|
<if test="confirmFlag != null">#{confirmFlag},</if>
|
|
<if test="confirmPerson != null">#{confirmPerson},</if>
|
|
<if test="confirmTime != null">#{confirmTime},</if>
|
|
<if test="standbyOne != null">#{standbyOne},</if>
|
|
<if test="standbyTwo != null">#{standbyTwo},</if>
|
|
now(),
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateWarehousingInspectionNotice" parameterType="WarehousingInspectionNotice">
|
|
update warehousing_inspection_notice
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="inNoticeNumber != null and inNoticeNumber != ''">in_notice_number = #{inNoticeNumber},</if>
|
|
<if test="purchaseOrderNumber != null">purchase_order_number = #{purchaseOrderNumber},</if>
|
|
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
|
|
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
|
<if test="customerContact != null">customer_contact = #{customerContact},</if>
|
|
<if test="stockNumber != null">stock_number = #{stockNumber},</if>
|
|
<if test="stockName != null">stock_name = #{stockName},</if>
|
|
<if test="stockManager != null">stock_manager = #{stockManager},</if>
|
|
<if test="exportSales != null">export_sales = #{exportSales},</if>
|
|
<if test="warehousingCategory != null">warehousing_category = #{warehousingCategory},</if>
|
|
<if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
|
|
<if test="warehousingDate != null">warehousing_date = #{warehousingDate},</if>
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
<if test="inspectionReport != null">inspection_report = #{inspectionReport},</if>
|
|
<if test="confirmFlag != null">confirm_flag = #{confirmFlag},</if>
|
|
<if test="confirmPerson != null">confirm_person = #{confirmPerson},</if>
|
|
<if test="confirmTime != null">confirm_time = #{confirmTime},</if>
|
|
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
|
|
</trim>
|
|
where warehousing_inspection_notice_id = #{warehousingInspectionNoticeId}
|
|
</update>
|
|
|
|
<delete id="deleteWarehousingInspectionNoticeById" parameterType="Long">
|
|
delete from warehousing_inspection_notice where warehousing_inspection_notice_id = #{warehousingInspectionNoticeId}
|
|
</delete>
|
|
|
|
<delete id="deleteWarehousingInspectionNoticeByIds" parameterType="String">
|
|
delete from warehousing_inspection_notice where warehousing_inspection_notice_id in
|
|
<foreach item="warehousingInspectionNoticeId" collection="array" open="(" separator="," close=")">
|
|
#{warehousingInspectionNoticeId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|