万材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.
 
 
 
 

218 lines
14 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.produce.mapper.OutsourceOfferMapper">
<resultMap type="OutsourceOffer" id="OutsourceOfferResult">
<result property="id" column="id" />
<result property="itemCode" column="itemCode" />
<result property="itemName" column="itemName" />
<result property="itemSpecification" column="itemSpecification" />
<result property="machineType" column="machineType" />
<result property="unit" column="unit" />
<result property="coinType" column="coinType" />
<result property="price" column="price" />
<result property="appointNo" column="appointNo" />
<result property="appointName" column="appointName" />
<result property="pricingDate" column="pricingDate" />
<result property="remark" column="remark" />
<result property="isNowPrice" column="isNowPrice" />
<result property="comfirmFlag" column="comfirmFlag" />
<result property="auditingFlag" column="auditingFlag" />
<result property="approveFlag" column="approveFlag" />
<result property="comfirmMan" column="comfirmMan" />
<result property="auditingMan" column="auditingMan" />
<result property="approveMan" column="approveMan" />
<result property="comfirmDate" column="comfirmDate" />
<result property="auditingDate" column="auditingDate" />
<result property="approveDate" column="approveDate" />
<result property="writeMan" column="writeMan" />
<result property="tax" column="tax" />
<result property="processNo" column="processNo" />
<result property="processName" column="processName" />
<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" />
</resultMap>
<sql id="selectOutsourceOfferVo">
select id, itemCode, itemName, itemSpecification, machineType, unit, coinType, price, appointNo, appointName, pricingDate, remark, isNowPrice, comfirmFlag, auditingFlag, approveFlag, comfirmMan, auditingMan, approveMan, comfirmDate, auditingDate, approveDate, writeMan, tax, processNo, processName, spare1, spare2, spare3, spare4, spare5, spare6 from outsource_offer
</sql>
<select id="selectOutsourceOfferList" parameterType="OutsourceOffer" resultMap="OutsourceOfferResult">
<include refid="selectOutsourceOfferVo"/>
<where>
<if test="id != null "> and id like concat('%', #{id}, '%')</if>
<if test="itemCode != null and itemCode != ''"> and itemCode like concat('%', #{itemCode}, '%')</if>
<if test="itemName != null and itemName != ''"> and itemName like concat('%', #{itemName}, '%')</if>
<if test="itemSpecification != null and itemSpecification != ''"> and itemSpecification like concat('%', #{itemSpecification}, '%')</if>
<if test="machineType != null and machineType != ''"> and machineType like concat('%', #{machineType}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="coinType != null and coinType != ''"> and coinType = #{coinType}</if>
<if test="price != null "> and price = #{price}</if>
<if test="appointNo != null and appointNo != ''"> and appointNo like concat('%', #{appointNo}, '%')</if>
<if test="appointName != null and appointName != ''"> and appointName like concat('%', #{appointName}, '%')</if>
<if test="params.beginPricingDate != null and params.beginPricingDate != '' and params.endPricingDate != null and params.endPricingDate != ''"> and pricingDate between #{params.beginPricingDate} and #{params.endPricingDate}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="isNowPrice != null "> and isNowPrice = #{isNowPrice}</if>
<if test="comfirmFlag != null and comfirmFlag != ''"> and comfirmFlag = #{comfirmFlag}</if>
<if test="auditingFlag != null and auditingFlag != ''"> and auditingFlag = #{auditingFlag}</if>
<if test="approveFlag != null and approveFlag != ''"> and approveFlag = #{approveFlag}</if>
<if test="comfirmMan != null and comfirmMan != ''"> and comfirmMan like concat('%', #{comfirmMan}, '%')</if>
<if test="auditingMan != null and auditingMan != ''"> and auditingMan like concat('%', #{auditingMan}, '%')</if>
<if test="approveMan != null and approveMan != ''"> and approveMan like concat('%', #{approveMan}, '%')</if>
<if test="params.beginComfirmDate != null and params.beginComfirmDate != '' and params.endComfirmDate != null and params.endComfirmDate != ''"> and comfirmDate between #{params.beginComfirmDate} and #{params.endComfirmDate}</if>
<if test="params.beginAuditingDate != null and params.beginAuditingDate != '' and params.endAuditingDate != null and params.endAuditingDate != ''"> and auditingDate between #{params.beginAuditingDate} and #{params.endAuditingDate}</if>
<if test="params.beginApproveDate != null and params.beginApproveDate != '' and params.endApproveDate != null and params.endApproveDate != ''"> and approveDate between #{params.beginApproveDate} and #{params.endApproveDate}</if>
<if test="writeMan != null and writeMan != ''"> and writeMan like concat('%', #{writeMan}, '%')</if>
<if test="tax != null and tax != ''"> and tax = #{tax}</if>
<if test="processNo != null and processNo != ''"> and processNo like concat('%', #{processNo}, '%')</if>
<if test="processName != null and processName != ''"> and processName like concat('%', #{processName}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{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>
</where>
</select>
<select id="selectOutsourceOfferById" parameterType="String" resultMap="OutsourceOfferResult">
<include refid="selectOutsourceOfferVo"/>
where id = #{id}
</select>
<insert id="insertOutsourceOffer" parameterType="OutsourceOffer">
insert into outsource_offer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="itemCode != null and itemCode != ''">itemCode,</if>
<if test="itemName != null and itemName != ''">itemName,</if>
<if test="itemSpecification != null">itemSpecification,</if>
<if test="machineType != null">machineType,</if>
<if test="unit != null">unit,</if>
<if test="coinType != null and coinType != ''">coinType,</if>
<if test="price != null">price,</if>
<if test="appointNo != null and appointNo != ''">appointNo,</if>
<if test="appointName != null and appointName != ''">appointName,</if>
<if test="pricingDate != null">pricingDate,</if>
<if test="remark != null">remark,</if>
<if test="isNowPrice != null">isNowPrice,</if>
<if test="comfirmFlag != null">comfirmFlag,</if>
<if test="auditingFlag != null">auditingFlag,</if>
<if test="approveFlag != null">approveFlag,</if>
<if test="comfirmMan != null">comfirmMan,</if>
<if test="auditingMan != null">auditingMan,</if>
<if test="approveMan != null">approveMan,</if>
<if test="comfirmDate != null">comfirmDate,</if>
<if test="auditingDate != null">auditingDate,</if>
<if test="approveDate != null">approveDate,</if>
<if test="writeMan != null and writeMan != ''">writeMan,</if>
<if test="tax != null and tax != ''">tax,</if>
<if test="processNo != null and processNo != ''">processNo,</if>
<if test="processName != null and processName != ''">processName,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="itemCode != null and itemCode != ''">#{itemCode},</if>
<if test="itemName != null and itemName != ''">#{itemName},</if>
<if test="itemSpecification != null">#{itemSpecification},</if>
<if test="machineType != null">#{machineType},</if>
<if test="unit != null">#{unit},</if>
<if test="coinType != null and coinType != ''">#{coinType},</if>
<if test="price != null">#{price},</if>
<if test="appointNo != null and appointNo != ''">#{appointNo},</if>
<if test="appointName != null and appointName != ''">#{appointName},</if>
<if test="pricingDate != null">#{pricingDate},</if>
<if test="remark != null">#{remark},</if>
<if test="isNowPrice != null">#{isNowPrice},</if>
<if test="comfirmFlag != null">#{comfirmFlag},</if>
<if test="auditingFlag != null">#{auditingFlag},</if>
<if test="approveFlag != null">#{approveFlag},</if>
<if test="comfirmMan != null">#{comfirmMan},</if>
<if test="auditingMan != null">#{auditingMan},</if>
<if test="approveMan != null">#{approveMan},</if>
<if test="comfirmDate != null">#{comfirmDate},</if>
<if test="auditingDate != null">#{auditingDate},</if>
<if test="approveDate != null">#{approveDate},</if>
<if test="writeMan != null and writeMan != ''">#{writeMan},</if>
<if test="tax != null and tax != ''">#{tax},</if>
<if test="processNo != null and processNo != ''">#{processNo},</if>
<if test="processName != null and processName != ''">#{processName},</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>
</trim>
</insert>
<update id="updateOutsourceOffer" parameterType="OutsourceOffer">
update outsource_offer
<trim prefix="SET" suffixOverrides=",">
<if test="itemCode != null and itemCode != ''">itemCode = #{itemCode},</if>
<if test="itemName != null and itemName != ''">itemName = #{itemName},</if>
<if test="itemSpecification != null">itemSpecification = #{itemSpecification},</if>
<if test="machineType != null">machineType = #{machineType},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="coinType != null and coinType != ''">coinType = #{coinType},</if>
<if test="price != null">price = #{price},</if>
<if test="appointNo != null and appointNo != ''">appointNo = #{appointNo},</if>
<if test="appointName != null and appointName != ''">appointName = #{appointName},</if>
<if test="pricingDate != null">pricingDate = #{pricingDate},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isNowPrice != null">isNowPrice = #{isNowPrice},</if>
<if test="comfirmFlag != null">comfirmFlag = #{comfirmFlag},</if>
<if test="auditingFlag != null">auditingFlag = #{auditingFlag},</if>
<if test="approveFlag != null">approveFlag = #{approveFlag},</if>
<if test="comfirmMan != null">comfirmMan = #{comfirmMan},</if>
<if test="auditingMan != null">auditingMan = #{auditingMan},</if>
<if test="approveMan != null">approveMan = #{approveMan},</if>
<if test="comfirmDate != null">comfirmDate = #{comfirmDate},</if>
<if test="auditingDate != null">auditingDate = #{auditingDate},</if>
<if test="approveDate != null">approveDate = #{approveDate},</if>
<if test="writeMan != null and writeMan != ''">writeMan = #{writeMan},</if>
<if test="tax != null and tax != ''">tax = #{tax},</if>
<if test="processNo != null and processNo != ''">processNo = #{processNo},</if>
<if test="processName != null and processName != ''">processName = #{processName},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteOutsourceOfferById" parameterType="String">
delete from outsource_offer where id = #{id}
</delete>
<delete id="deleteOutsourceOfferByIds" parameterType="String">
delete from outsource_offer where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectCountByDay" resultType="Integer">
select count(*) from outsource_offer where to_days(pricingDate) = to_days(now());
</select>
<update id="updateIsNowPrice">
update outsource_offer set isNowPrice='0' where itemCode=#{itemCode} and isNowPrice='1'
</update>
</mapper>