万材erp项目
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.
 
 
 
 

154 lines
9.3 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.stock.mapper.WarehousingOutHeadMapper">
<resultMap type="WarehousingOutHead" id="WarehousingOutHeadResult">
<result property="warehousingOutNo" column="warehousingOutNo" />
<result property="workOrderNo" column="workOrderNo" />
<result property="warehousingOutDate" column="warehousingOutDate" />
<result property="linkman" column="linkman" />
<result property="stockNo" column="stockNo" />
<result property="stockName" column="stockName" />
<result property="warehouseKeeper" column="warehouseKeeper" />
<result property="outputClass" column="outputClass" />
<result property="itemClass" column="itemClass" />
<result property="confirmFlag" column="confirmFlag" />
<result property="confirmMan" column="confirmMan" />
<result property="confirmDate" column="confirmDate" />
<result property="deptName" column="deptName" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="deptNo" column="deptNo" />
</resultMap>
<sql id="selectWarehousingOutHeadVo">
select warehousingOutNo, workOrderNo, warehousingOutDate, linkman, stockNo, stockName, warehouseKeeper, outputClass, itemClass, confirmFlag, confirmMan, confirmDate, deptName, spare1, spare2, spare3, spare4, spare5, spare6, deptNo from warehousing_out_head
</sql>
<select id="selectWarehousingOutHeadList" parameterType="WarehousingOutHead" resultMap="WarehousingOutHeadResult">
<include refid="selectWarehousingOutHeadVo"/>
<where>
<if test="warehousingOutNo != null and warehousingOutNo != ''"> and warehousingOutNo like concat('%', #{warehousingOutNo}, '%')</if>
<if test="workOrderNo != null and workOrderNo != ''"> and workOrderNo like concat('%', #{workOrderNo}, '%')</if>
<if test="params.beginWarehousingOutDate != null and params.beginWarehousingOutDate != '' and params.endWarehousingOutDate != null and params.endWarehousingOutDate != ''"> and warehousingOutDate between #{params.beginWarehousingOutDate} and #{params.endWarehousingOutDate}</if>
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
<if test="stockNo != null and stockNo != ''"> and stockNo like concat('%', #{stockNo}, '%')</if>
<if test="stockName != null and stockName != ''"> and stockName like concat('%', #{stockName}, '%')</if>
<if test="warehouseKeeper != null and warehouseKeeper != ''"> and warehouseKeeper = #{warehouseKeeper}</if>
<if test="outputClass != null and outputClass != ''"> and outputClass = #{outputClass}</if>
<if test="itemClass != null and itemClass != ''"> and itemClass = #{itemClass}</if>
<if test="confirmFlag != null "> and confirmFlag = #{confirmFlag}</if>
<if test="confirmMan != null and confirmMan != ''"> and confirmMan = #{confirmMan}</if>
<if test="confirmDate != null "> and confirmDate = #{confirmDate}</if>
<if test="deptName != null and deptName != ''"> and deptName like concat('%', #{deptName}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="deptNo != null and deptNo != ''"> and deptNo like concat('%', #{deptNo}, '%')</if>
</where>
</select>
<select id="selectWarehousingOutHeadById" parameterType="String" resultMap="WarehousingOutHeadResult">
<include refid="selectWarehousingOutHeadVo"/>
where warehousingOutNo = #{warehousingOutNo}
</select>
<insert id="insertWarehousingOutHead" parameterType="WarehousingOutHead">
insert into warehousing_out_head
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehousingOutNo != null">warehousingOutNo,</if>
<if test="workOrderNo != null">workOrderNo,</if>
<if test="warehousingOutDate != null">warehousingOutDate,</if>
<if test="linkman != null">linkman,</if>
<if test="stockNo != null">stockNo,</if>
<if test="stockName != null">stockName,</if>
<if test="warehouseKeeper != null">warehouseKeeper,</if>
<if test="outputClass != null">outputClass,</if>
<if test="itemClass != null">itemClass,</if>
<if test="confirmFlag != null">confirmFlag,</if>
<if test="confirmMan != null">confirmMan,</if>
<if test="confirmDate != null">confirmDate,</if>
<if test="deptName != null">deptName,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="deptNo != null">deptNo,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehousingOutNo != null">#{warehousingOutNo},</if>
<if test="workOrderNo != null">#{workOrderNo},</if>
<if test="warehousingOutDate != null">#{warehousingOutDate},</if>
<if test="linkman != null">#{linkman},</if>
<if test="stockNo != null">#{stockNo},</if>
<if test="stockName != null">#{stockName},</if>
<if test="warehouseKeeper != null">#{warehouseKeeper},</if>
<if test="outputClass != null">#{outputClass},</if>
<if test="itemClass != null">#{itemClass},</if>
<if test="confirmFlag != null">#{confirmFlag},</if>
<if test="confirmMan != null">#{confirmMan},</if>
<if test="confirmDate != null">#{confirmDate},</if>
<if test="deptName != null">#{deptName},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="deptNo != null">#{deptNo},</if>
</trim>
</insert>
<update id="updateWarehousingOutHead" parameterType="WarehousingOutHead">
update warehousing_out_head
<trim prefix="SET" suffixOverrides=",">
<if test="workOrderNo != null">workOrderNo = #{workOrderNo},</if>
<if test="warehousingOutDate != null">warehousingOutDate = #{warehousingOutDate},</if>
<if test="linkman != null">linkman = #{linkman},</if>
<if test="stockNo != null">stockNo = #{stockNo},</if>
<if test="stockName != null">stockName = #{stockName},</if>
<if test="warehouseKeeper != null">warehouseKeeper = #{warehouseKeeper},</if>
<if test="outputClass != null">outputClass = #{outputClass},</if>
<if test="itemClass != null">itemClass = #{itemClass},</if>
<if test="confirmFlag != null">confirmFlag = #{confirmFlag},</if>
<if test="confirmMan != null">confirmMan = #{confirmMan},</if>
<if test="confirmDate != null">confirmDate = #{confirmDate},</if>
<if test="deptName != null">deptName = #{deptName},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="deptNo != null">deptNo = #{deptNo},</if>
</trim>
where warehousingOutNo = #{warehousingOutNo}
</update>
<delete id="deleteWarehousingOutHeadById" parameterType="String">
delete from warehousing_out_head where warehousingOutNo = #{warehousingOutNo}
</delete>
<delete id="deleteWarehousingOutHeadByIds" parameterType="String">
delete from warehousing_out_head where warehousingOutNo in
<foreach item="warehousingOutNo" collection="array" open="(" separator="," close=")">
#{warehousingOutNo}
</foreach>
</delete>
<select id="selectCountByDay" resultType="int">
select count(*) from warehousing_out_head where to_days(warehousingOutDate) = to_days(now());
</select>
</mapper>