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

141 lines
9.1 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.system.mapper.SysSalesFinishMapper">
<resultMap type="SysSalesFinish" id="SysSalesFinishResult">
<result property="salesFinishId" column="sales_finish_id" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="salesOrderNumber" column="sales_order_number" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="finishProductCode" column="finish_product_code" />
<result property="finishProductName" column="finish_product_name" />
<result property="specificationModel" column="specification_model" />
<result property="typeMachine" column="type_machine" />
<result property="inventoryUnit" column="inventory_unit" />
<result property="stockUnitWeight" column="stock_unit_weight" />
<result property="processPrice" column="process_price" />
<result property="productQuantity" column="product_quantity" />
<result property="amountMoney" column="amount_money" />
<result property="deliveryTime" column="delivery_time" />
<result property="line" column="line" />
<result property="versionNumber" column="version_number" />
<result property="salesExplain" column="sales_explain" />
<result property="customerUseOrNot" column="customer_use_or_not" />
<result property="accountReconciliationOrNot" column="account_reconciliation_or_not" />
<result property="standbyOne" column="standby_one" />
<result property="standbyTwo" column="standby_two" />
</resultMap>
<sql id="selectSysSalesFinishVo">
select sales_finish_id, sales_order_code, sales_order_number, enterprise_code, enterprise_name, finish_product_code, finish_product_name, specification_model, type_machine, inventory_unit, stock_unit_weight, process_price, product_quantity, amount_money, delivery_time, line, version_number, sales_explain, standby_one, standby_two from sys_sales_finish
</sql>
<select id="selectSysSalesFinishList" parameterType="SysSalesFinish" resultMap="SysSalesFinishResult">
<include refid="selectSysSalesFinishVo"/>
<where>
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code like concat('%', #{salesOrderCode}, '%')</if>
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and sales_order_number like concat('%', #{salesOrderNumber}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="finishProductCode != null and finishProductCode != ''"> and finish_product_code like concat('%', #{finishProductCode}, '%')</if>
<if test="finishProductName != null and finishProductName != ''"> and finish_product_name like concat('%', #{finishProductName}, '%')</if>
<if test="salesExplain != null and salesExplain != ''"> and sales_explain = #{salesExplain}</if>
</where>
</select>
<select id="selectSysSalesFinishById" parameterType="Long" resultMap="SysSalesFinishResult">
<include refid="selectSysSalesFinishVo"/>
where sales_finish_id = #{salesFinishId}
</select>
<insert id="insertSysSalesFinish" parameterType="SysSalesFinish" useGeneratedKeys="true" keyProperty="salesFinishId">
insert into sys_sales_finish
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="salesOrderCode != null">sales_order_code,</if>
<if test="salesOrderNumber != null">sales_order_number,</if>
<if test="enterpriseCode != null">enterprise_code,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="finishProductCode != null">finish_product_code,</if>
<if test="finishProductName != null">finish_product_name,</if>
<if test="specificationModel != null">specification_model,</if>
<if test="typeMachine != null">type_machine,</if>
<if test="inventoryUnit != null">inventory_unit,</if>
<if test="stockUnitWeight != null">stock_unit_weight,</if>
<if test="processPrice != null">process_price,</if>
<if test="productQuantity != null">product_quantity,</if>
<if test="amountMoney != null">amount_money,</if>
<if test="deliveryTime != null">delivery_time,</if>
<if test="line != null">line,</if>
<if test="versionNumber != null">version_number,</if>
<if test="salesExplain != null">sales_explain,</if>
<if test="customerUseOrNot != null">customer_use_or_not,</if>
<if test="accountReconciliationOrNot != null">account_reconciliation_or_not,</if>
<if test="standbyOne != null">standby_one,</if>
<if test="standbyTwo != null">standby_two,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="salesOrderNumber != null">#{salesOrderNumber},</if>
<if test="enterpriseCode != null">#{enterpriseCode},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="finishProductCode != null">#{finishProductCode},</if>
<if test="finishProductName != null">#{finishProductName},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="typeMachine != null">#{typeMachine},</if>
<if test="inventoryUnit != null">#{inventoryUnit},</if>
<if test="stockUnitWeight != null">#{stockUnitWeight},</if>
<if test="processPrice != null">#{processPrice},</if>
<if test="productQuantity != null">#{productQuantity},</if>
<if test="amountMoney != null">#{amountMoney},</if>
<if test="deliveryTime != null">#{deliveryTime},</if>
<if test="line != null">#{line},</if>
<if test="versionNumber != null">#{versionNumber},</if>
<if test="salesExplain != null">#{salesExplain},</if>
<if test="customerUseOrNot != null">#{customerUseOrNot},</if>
<if test="accountReconciliationOrNot != null">#{accountReconciliationOrNot},</if>
<if test="standbyOne != null">#{standbyOne},</if>
<if test="standbyTwo != null">#{standbyTwo},</if>
</trim>
</insert>
<update id="updateSysSalesFinish" parameterType="SysSalesFinish">
update sys_sales_finish
<trim prefix="SET" suffixOverrides=",">
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="salesOrderNumber != null">sales_order_number = #{salesOrderNumber},</if>
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if>
<if test="finishProductName != null">finish_product_name = #{finishProductName},</if>
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
<if test="stockUnitWeight != null">stock_unit_weight = #{stockUnitWeight},</if>
<if test="processPrice != null">process_price = #{processPrice},</if>
<if test="productQuantity != null">product_quantity = #{productQuantity},</if>
<if test="amountMoney != null">amount_money = #{amountMoney},</if>
<if test="deliveryTime != null">delivery_time = #{deliveryTime},</if>
<if test="line != null">line = #{line},</if>
<if test="versionNumber != null">version_number = #{versionNumber},</if>
<if test="salesExplain != null">sales_explain = #{salesExplain},</if>
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
</trim>
where sales_finish_id = #{salesFinishId}
</update>
<delete id="deleteSysSalesFinishById" parameterType="Long">
delete from sys_sales_finish where sales_finish_id = #{salesFinishId}
</delete>
<delete id="deleteSysSalesFinishByIds" parameterType="String">
delete from sys_sales_finish where sales_finish_id in
<foreach item="salesFinishId" collection="array" open="(" separator="," close=")">
#{salesFinishId}
</foreach>
</delete>
</mapper>