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.
206 lines
15 KiB
206 lines
15 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.SysFinishProductMapper">
|
|
|
|
<resultMap type="SysFinishProduct" id="SysFinishProductResult">
|
|
<result property="finishProductId" column="finish_product_id" />
|
|
<result property="customerNumber" column="customer_number" />
|
|
<result property="typeMachine" column="type_machine" />
|
|
<result property="finishProductName" column="finish_product_name" />
|
|
<result property="enterpriseCode" column="enterprise_code" />
|
|
<result property="enterpriseName" column="enterprise_name" />
|
|
<result property="inventoryUnit" column="inventory_unit" />
|
|
<result property="versionNumber" column="version_number" />
|
|
<result property="finishProductCode" column="finish_product_code" />
|
|
<result property="safetyStock" column="safety_stock" />
|
|
<result property="stockUnitWeight" column="stock_unit_weight" />
|
|
<result property="gpItemSelection" column="gp_Item_selection" />
|
|
<result property="inPlantCode" column="In_plant_code" />
|
|
<result property="whetherStop" column="whether_stop" />
|
|
<result property="createrName" column="creater_name" />
|
|
<result property="ordinalName" column="ordinal_name" />
|
|
<result property="originalNumber" column="original_number" />
|
|
<result property="customsName" column="customs_name" />
|
|
<result property="defaultWarehouse" column="default_warehouse" />
|
|
<result property="materialCategory" column="material_category" />
|
|
<result property="productionCategory" column="production_category" />
|
|
<result property="finishProductCategory" column="finish_product_category" />
|
|
<result property="specificationModel" column="specification_model" />
|
|
<result property="customerEngineer" column="customer_engineer" />
|
|
<result property="productDescription" column="product_description" />
|
|
<result property="maximumInventory" column="maximum_inventory" />
|
|
<result property="productPrice" column="product_price" />
|
|
<result property="componentName" column="component_name" />
|
|
<result property="createrTime" column="creater_time" />
|
|
<result property="ordinalNumber" column="ordinal_number" />
|
|
<result property="defaultLocation" column="default_location" />
|
|
<result property="hsNumber" column="hs_number" />
|
|
<result property="kesNumber" column="kes_number" />
|
|
<result property="firstAddTime" column="first_add_time" />
|
|
<result property="updateInfoTime" column="update_info_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectSysFinishProductVo">
|
|
select finish_product_id, customer_number, type_machine, finish_product_name, enterprise_code, enterprise_name, inventory_unit, version_number, finish_product_code, safety_stock, stock_unit_weight, gp_Item_selection, In_plant_code, whether_stop, creater_name, ordinal_name, original_number, customs_name, default_warehouse, material_category, production_category, finish_product_category, specification_model, customer_engineer, product_description, maximum_inventory, product_price, component_name, creater_time, ordinal_number, default_location, hs_number, kes_number, first_add_time, update_info_time from sys_finish_product
|
|
</sql>
|
|
|
|
<select id="selectSysFinishProductList" parameterType="SysFinishProduct" resultMap="SysFinishProductResult">
|
|
<include refid="selectSysFinishProductVo"/>
|
|
<where>
|
|
<if test="customerNumber != null and customerNumber != ''"> and customer_number = #{customerNumber}</if>
|
|
<if test="finishProductName != null and finishProductName != ''"> and finish_product_name like concat('%', #{finishProductName}, '%')</if>
|
|
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code = #{enterpriseCode}</if>
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
<if test="inventoryUnit != null and inventoryUnit != ''"> and inventory_unit = #{inventoryUnit}</if>
|
|
<if test="versionNumber != null and versionNumber != ''"> and version_number = #{versionNumber}</if>
|
|
<if test="finishProductCode != null and finishProductCode != ''"> and finish_product_code = #{finishProductCode}</if>
|
|
<if test="inPlantCode != null and inPlantCode != ''"> and In_plant_code = #{inPlantCode}</if>
|
|
<if test="productionCategory != null and productionCategory != ''"> and production_category = #{productionCategory}</if>
|
|
<if test="specificationModel != null and specificationModel != ''"> and specification_model = #{specificationModel}</if>
|
|
<if test="customerEngineer != null and customerEngineer != ''"> and customer_engineer = #{customerEngineer}</if>
|
|
<if test="createrTime != null and createrTime != ''"> and creater_time = #{createrTime}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectFinishProductByCode" parameterType="String" resultMap="SysFinishProductResult">
|
|
<include refid="selectSysFinishProductVo"/>
|
|
where finish_product_code = #{finishProductCode}
|
|
</select>
|
|
|
|
<select id="selectAllSysFinishProductList" resultMap="SysFinishProductResult">
|
|
select finish_product_id, customer_number, type_machine, finish_product_name, enterprise_code, enterprise_name, inventory_unit, version_number, finish_product_code, safety_stock, stock_unit_weight, gp_Item_selection, In_plant_code, whether_stop, creater_name, ordinal_name, original_number, customs_name, default_warehouse, material_category, production_category, finish_product_category, specification_model, customer_engineer, product_description, maximum_inventory, product_price, component_name, creater_time, ordinal_number, default_location, hs_number, kes_number, first_add_time, update_info_time from sys_finish_product
|
|
</select>
|
|
|
|
<select id="selectSysFinishProductById" parameterType="Long" resultMap="SysFinishProductResult">
|
|
<include refid="selectSysFinishProductVo"/>
|
|
where finish_product_id = #{finishProductId}
|
|
</select>
|
|
|
|
<insert id="insertSysFinishProduct" parameterType="SysFinishProduct" useGeneratedKeys="true" keyProperty="finishProductId">
|
|
insert into sys_finish_product
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="customerNumber != null">customer_number,</if>
|
|
<if test="typeMachine != null">type_machine,</if>
|
|
<if test="finishProductName != null">finish_product_name,</if>
|
|
<if test="enterpriseCode != null">enterprise_code,</if>
|
|
<if test="enterpriseName != null">enterprise_name,</if>
|
|
<if test="inventoryUnit != null">inventory_unit,</if>
|
|
<if test="versionNumber != null">version_number,</if>
|
|
<if test="finishProductCode != null">finish_product_code,</if>
|
|
<if test="safetyStock != null">safety_stock,</if>
|
|
<if test="stockUnitWeight != null">stock_unit_weight,</if>
|
|
<if test="gpItemSelection != null">gp_Item_selection,</if>
|
|
<if test="inPlantCode != null">In_plant_code,</if>
|
|
<if test="whetherStop != null">whether_stop,</if>
|
|
<if test="createrName != null">creater_name,</if>
|
|
<if test="ordinalName != null">ordinal_name,</if>
|
|
<if test="originalNumber != null">original_number,</if>
|
|
<if test="customsName != null">customs_name,</if>
|
|
<if test="defaultWarehouse != null">default_warehouse,</if>
|
|
<if test="materialCategory != null">material_category,</if>
|
|
<if test="productionCategory != null">production_category,</if>
|
|
<if test="finishProductCategory != null">finish_product_category,</if>
|
|
<if test="specificationModel != null">specification_model,</if>
|
|
<if test="customerEngineer != null">customer_engineer,</if>
|
|
<if test="productDescription != null">product_description,</if>
|
|
<if test="maximumInventory != null">maximum_inventory,</if>
|
|
<if test="productPrice != null">product_price,</if>
|
|
<if test="componentName != null">component_name,</if>
|
|
<if test="createrTime != null">creater_time,</if>
|
|
<if test="ordinalNumber != null">ordinal_number,</if>
|
|
<if test="defaultLocation != null">default_location,</if>
|
|
<if test="hsNumber != null">hs_number,</if>
|
|
<if test="kesNumber != null">kes_number,</if>
|
|
first_add_time,
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="customerNumber != null">#{customerNumber},</if>
|
|
<if test="typeMachine != null">#{typeMachine},</if>
|
|
<if test="finishProductName != null">#{finishProductName},</if>
|
|
<if test="enterpriseCode != null">#{enterpriseCode},</if>
|
|
<if test="enterpriseName != null">#{enterpriseName},</if>
|
|
<if test="inventoryUnit != null">#{inventoryUnit},</if>
|
|
<if test="versionNumber != null">#{versionNumber},</if>
|
|
<if test="finishProductCode != null">#{finishProductCode},</if>
|
|
<if test="safetyStock != null">#{safetyStock},</if>
|
|
<if test="stockUnitWeight != null">#{stockUnitWeight},</if>
|
|
<if test="gpItemSelection != null">#{gpItemSelection},</if>
|
|
<if test="inPlantCode != null">#{inPlantCode},</if>
|
|
<if test="whetherStop != null">#{whetherStop},</if>
|
|
<if test="createrName != null">#{createrName},</if>
|
|
<if test="ordinalName != null">#{ordinalName},</if>
|
|
<if test="originalNumber != null">#{originalNumber},</if>
|
|
<if test="customsName != null">#{customsName},</if>
|
|
<if test="defaultWarehouse != null">#{defaultWarehouse},</if>
|
|
<if test="materialCategory != null">#{materialCategory},</if>
|
|
<if test="productionCategory != null">#{productionCategory},</if>
|
|
<if test="finishProductCategory != null">#{finishProductCategory},</if>
|
|
<if test="specificationModel != null">#{specificationModel},</if>
|
|
<if test="customerEngineer != null">#{customerEngineer},</if>
|
|
<if test="productDescription != null">#{productDescription},</if>
|
|
<if test="maximumInventory != null">#{maximumInventory},</if>
|
|
<if test="productPrice != null">#{productPrice},</if>
|
|
<if test="componentName != null">#{componentName},</if>
|
|
<if test="createrTime != null">#{createrTime},</if>
|
|
<if test="ordinalNumber != null">#{ordinalNumber},</if>
|
|
<if test="defaultLocation != null">#{defaultLocation},</if>
|
|
<if test="hsNumber != null">#{hsNumber},</if>
|
|
<if test="kesNumber != null">#{kesNumber},</if>
|
|
now(),
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateSysFinishProduct" parameterType="SysFinishProduct">
|
|
update sys_finish_product
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="customerNumber != null">customer_number = #{customerNumber},</if>
|
|
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
|
|
<if test="finishProductName != null">finish_product_name = #{finishProductName},</if>
|
|
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
|
|
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
|
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
|
|
<if test="versionNumber != null">version_number = #{versionNumber},</if>
|
|
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if>
|
|
<if test="safetyStock != null">safety_stock = #{safetyStock},</if>
|
|
<if test="stockUnitWeight != null">stock_unit_weight = #{stockUnitWeight},</if>
|
|
<if test="gpItemSelection != null">gp_Item_selection = #{gpItemSelection},</if>
|
|
<if test="inPlantCode != null">In_plant_code = #{inPlantCode},</if>
|
|
<if test="whetherStop != null">whether_stop = #{whetherStop},</if>
|
|
<if test="createrName != null">creater_name = #{createrName},</if>
|
|
<if test="ordinalName != null">ordinal_name = #{ordinalName},</if>
|
|
<if test="originalNumber != null">original_number = #{originalNumber},</if>
|
|
<if test="customsName != null">customs_name = #{customsName},</if>
|
|
<if test="defaultWarehouse != null">default_warehouse = #{defaultWarehouse},</if>
|
|
<if test="materialCategory != null">material_category = #{materialCategory},</if>
|
|
<if test="productionCategory != null">production_category = #{productionCategory},</if>
|
|
<if test="finishProductCategory != null">finish_product_category = #{finishProductCategory},</if>
|
|
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
|
|
<if test="customerEngineer != null">customer_engineer = #{customerEngineer},</if>
|
|
<if test="productDescription != null">product_description = #{productDescription},</if>
|
|
<if test="maximumInventory != null">maximum_inventory = #{maximumInventory},</if>
|
|
<if test="productPrice != null">product_price = #{productPrice},</if>
|
|
<if test="componentName != null">component_name = #{componentName},</if>
|
|
<if test="createrTime != null">creater_time = #{createrTime},</if>
|
|
<if test="ordinalNumber != null">ordinal_number = #{ordinalNumber},</if>
|
|
<if test="defaultLocation != null">default_location = #{defaultLocation},</if>
|
|
<if test="hsNumber != null">hs_number = #{hsNumber},</if>
|
|
<if test="kesNumber != null">kes_number = #{kesNumber},</if>
|
|
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
|
|
</trim>
|
|
where finish_product_id = #{finishProductId}
|
|
</update>
|
|
|
|
<delete id="deleteSysFinishProductById" parameterType="Long">
|
|
delete from sys_finish_product where finish_product_id = #{finishProductId}
|
|
</delete>
|
|
|
|
<delete id="deleteSysFinishProductByIds" parameterType="String">
|
|
delete from sys_finish_product where finish_product_id in
|
|
<foreach item="finishProductId" collection="array" open="(" separator="," close=")">
|
|
#{finishProductId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|