You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
213 lines
12 KiB
XML
213 lines
12 KiB
XML
<?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.op.wms.mapper.WmsOdsMateStorageNewsMapper">
|
|
|
|
<resultMap type="WmsOdsMateStorageNews" id="WmsOdsMateStorageNewsResult">
|
|
<result property="storageId" column="storage_id" />
|
|
<result property="whCode" column="wh_code" />
|
|
<result property="regionCode" column="region_code" />
|
|
<result property="waCode" column="wa_code" />
|
|
<result property="storageType" column="storage_type" />
|
|
<result property="wlCode" column="wl_code" />
|
|
<result property="materialCode" column="material_code" />
|
|
<result property="materialDesc" column="material_desc" />
|
|
<result property="amount" column="amount" />
|
|
<result property="storageAmount" column="storage_amount" />
|
|
<result property="occupyAmount" column="occupy_amount" />
|
|
<result property="lpn" column="lpn" />
|
|
<result property="productBatch" column="product_batch" />
|
|
<result property="receiveDate" column="receive_date" />
|
|
<result property="productDate" column="product_date" />
|
|
<result property="userDefined1" column="user_defined1" />
|
|
<result property="userDefined2" column="user_defined2" />
|
|
<result property="userDefined3" column="user_defined3" />
|
|
<result property="userDefined4" column="user_defined4" />
|
|
<result property="userDefined5" column="user_defined5" />
|
|
<result property="userDefined6" column="user_defined6" />
|
|
<result property="userDefined7" column="user_defined7" />
|
|
<result property="userDefined8" column="user_defined8" />
|
|
<result property="userDefined9" column="user_defined9" />
|
|
<result property="userDefined10" column="user_defined10" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="gmtCreate" column="gmt_create" />
|
|
<result property="lastModifiedBy" column="last_modified_by" />
|
|
<result property="gmtModified" column="gmt_modified" />
|
|
<result property="activeFlag" column="active_flag" />
|
|
<result property="factoryCode" column="factory_code" />
|
|
<result property="sapFactoryCode" column="sap_factory_code" />
|
|
<result property="wlName" column="wl_name" />
|
|
</resultMap>
|
|
|
|
<sql id="selectWmsOdsMateStorageNewsVo">
|
|
select storage_id, wh_code, region_code, wa_code, storage_type, wl_code, material_code, material_desc, amount, storage_amount, occupy_amount, lpn, product_batch, receive_date, product_date, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, user_defined7, user_defined8, user_defined9, user_defined10, create_by, gmt_create, last_modified_by, gmt_modified, active_flag, factory_code, sap_factory_code, wl_name from wms_ods_mate_storage_news
|
|
</sql>
|
|
|
|
<select id="selectWmsOdsMateStorageNewsList" parameterType="WmsOdsMateStorageNews" resultMap="WmsOdsMateStorageNewsResult">
|
|
<include refid="selectWmsOdsMateStorageNewsVo"/>
|
|
<where>
|
|
<if test="storageId != null and storageId != ''"> and storage_id = #{storageId}</if>
|
|
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
|
|
<if test="regionCode != null and regionCode != ''"> and region_code = #{regionCode}</if>
|
|
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
|
|
<if test="storageType != null and storageType != ''"> and storage_type = #{storageType}</if>
|
|
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
|
<if test="materialDesc != null and materialDesc != ''"> and material_desc = #{materialDesc}</if>
|
|
<if test="amount != null "> and amount = #{amount}</if>
|
|
<if test="storageAmount != null "> and storage_amount = #{storageAmount}</if>
|
|
<if test="occupyAmount != null "> and occupy_amount = #{occupyAmount}</if>
|
|
<if test="lpn != null and lpn != ''"> and lpn = #{lpn}</if>
|
|
<if test="productBatch != null and productBatch != ''"> and product_batch = #{productBatch}</if>
|
|
<if test="receiveDate != null "> and receive_date = #{receiveDate}</if>
|
|
<if test="productDate != null "> and product_date = #{productDate}</if>
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
|
|
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
|
|
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
|
|
<if test="userDefined4 != null and userDefined4 != ''"> and user_defined4 = #{userDefined4}</if>
|
|
<if test="userDefined5 != null and userDefined5 != ''"> and user_defined5 = #{userDefined5}</if>
|
|
<if test="userDefined6 != null and userDefined6 != ''"> and user_defined6 = #{userDefined6}</if>
|
|
<if test="userDefined7 != null and userDefined7 != ''"> and user_defined7 = #{userDefined7}</if>
|
|
<if test="userDefined8 != null and userDefined8 != ''"> and user_defined8 = #{userDefined8}</if>
|
|
<if test="userDefined9 != null and userDefined9 != ''"> and user_defined9 = #{userDefined9}</if>
|
|
<if test="userDefined10 != null and userDefined10 != ''"> and user_defined10 = #{userDefined10}</if>
|
|
<if test="gmtCreate != null "> and gmt_create = #{gmtCreate}</if>
|
|
<if test="lastModifiedBy != null and lastModifiedBy != ''"> and last_modified_by = #{lastModifiedBy}</if>
|
|
<if test="gmtModified != null "> and gmt_modified = #{gmtModified}</if>
|
|
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and sap_factory_code = #{sapFactoryCode}</if>
|
|
<if test="wlName != null and wlName != ''"> and wl_name like concat('%', #{wlName}, '%')</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectWmsOdsMateStorageNewsByStorageId" parameterType="String" resultMap="WmsOdsMateStorageNewsResult">
|
|
<include refid="selectWmsOdsMateStorageNewsVo"/>
|
|
where storage_id = #{storageId}
|
|
</select>
|
|
|
|
<insert id="insertWmsOdsMateStorageNews" parameterType="WmsOdsMateStorageNews">
|
|
insert into wms_ods_mate_storage_news
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="storageId != null and storageId != ''">storage_id,</if>
|
|
<if test="whCode != null">wh_code,</if>
|
|
<if test="regionCode != null">region_code,</if>
|
|
<if test="waCode != null">wa_code,</if>
|
|
<if test="storageType != null">storage_type,</if>
|
|
<if test="wlCode != null">wl_code,</if>
|
|
<if test="materialCode != null">material_code,</if>
|
|
<if test="materialDesc != null">material_desc,</if>
|
|
<if test="amount != null">amount,</if>
|
|
<if test="storageAmount != null">storage_amount,</if>
|
|
<if test="occupyAmount != null">occupy_amount,</if>
|
|
<if test="lpn != null">lpn,</if>
|
|
<if test="productBatch != null">product_batch,</if>
|
|
<if test="receiveDate != null">receive_date,</if>
|
|
<if test="productDate != null">product_date,</if>
|
|
<if test="userDefined1 != null">user_defined1,</if>
|
|
<if test="userDefined2 != null">user_defined2,</if>
|
|
<if test="userDefined3 != null">user_defined3,</if>
|
|
<if test="userDefined4 != null">user_defined4,</if>
|
|
<if test="userDefined5 != null">user_defined5,</if>
|
|
<if test="userDefined6 != null">user_defined6,</if>
|
|
<if test="userDefined7 != null">user_defined7,</if>
|
|
<if test="userDefined8 != null">user_defined8,</if>
|
|
<if test="userDefined9 != null">user_defined9,</if>
|
|
<if test="userDefined10 != null">user_defined10,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="gmtCreate != null">gmt_create,</if>
|
|
<if test="lastModifiedBy != null">last_modified_by,</if>
|
|
<if test="gmtModified != null">gmt_modified,</if>
|
|
<if test="activeFlag != null">active_flag,</if>
|
|
<if test="factoryCode != null">factory_code,</if>
|
|
<if test="sapFactoryCode != null">sap_factory_code,</if>
|
|
<if test="wlName != null">wl_name,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="storageId != null and storageId != ''">#{storageId},</if>
|
|
<if test="whCode != null">#{whCode},</if>
|
|
<if test="regionCode != null">#{regionCode},</if>
|
|
<if test="waCode != null">#{waCode},</if>
|
|
<if test="storageType != null">#{storageType},</if>
|
|
<if test="wlCode != null">#{wlCode},</if>
|
|
<if test="materialCode != null">#{materialCode},</if>
|
|
<if test="materialDesc != null">#{materialDesc},</if>
|
|
<if test="amount != null">#{amount},</if>
|
|
<if test="storageAmount != null">#{storageAmount},</if>
|
|
<if test="occupyAmount != null">#{occupyAmount},</if>
|
|
<if test="lpn != null">#{lpn},</if>
|
|
<if test="productBatch != null">#{productBatch},</if>
|
|
<if test="receiveDate != null">#{receiveDate},</if>
|
|
<if test="productDate != null">#{productDate},</if>
|
|
<if test="userDefined1 != null">#{userDefined1},</if>
|
|
<if test="userDefined2 != null">#{userDefined2},</if>
|
|
<if test="userDefined3 != null">#{userDefined3},</if>
|
|
<if test="userDefined4 != null">#{userDefined4},</if>
|
|
<if test="userDefined5 != null">#{userDefined5},</if>
|
|
<if test="userDefined6 != null">#{userDefined6},</if>
|
|
<if test="userDefined7 != null">#{userDefined7},</if>
|
|
<if test="userDefined8 != null">#{userDefined8},</if>
|
|
<if test="userDefined9 != null">#{userDefined9},</if>
|
|
<if test="userDefined10 != null">#{userDefined10},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="gmtCreate != null">#{gmtCreate},</if>
|
|
<if test="lastModifiedBy != null">#{lastModifiedBy},</if>
|
|
<if test="gmtModified != null">#{gmtModified},</if>
|
|
<if test="activeFlag != null">#{activeFlag},</if>
|
|
<if test="factoryCode != null">#{factoryCode},</if>
|
|
<if test="sapFactoryCode != null">#{sapFactoryCode},</if>
|
|
<if test="wlName != null">#{wlName},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateWmsOdsMateStorageNews" parameterType="WmsOdsMateStorageNews">
|
|
update wms_ods_mate_storage_news
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="whCode != null">wh_code = #{whCode},</if>
|
|
<if test="regionCode != null">region_code = #{regionCode},</if>
|
|
<if test="waCode != null">wa_code = #{waCode},</if>
|
|
<if test="storageType != null">storage_type = #{storageType},</if>
|
|
<if test="wlCode != null">wl_code = #{wlCode},</if>
|
|
<if test="materialCode != null">material_code = #{materialCode},</if>
|
|
<if test="materialDesc != null">material_desc = #{materialDesc},</if>
|
|
<if test="amount != null">amount = #{amount},</if>
|
|
<if test="storageAmount != null">storage_amount = #{storageAmount},</if>
|
|
<if test="occupyAmount != null">occupy_amount = #{occupyAmount},</if>
|
|
<if test="lpn != null">lpn = #{lpn},</if>
|
|
<if test="productBatch != null">product_batch = #{productBatch},</if>
|
|
<if test="receiveDate != null">receive_date = #{receiveDate},</if>
|
|
<if test="productDate != null">product_date = #{productDate},</if>
|
|
<if test="userDefined1 != null">user_defined1 = #{userDefined1},</if>
|
|
<if test="userDefined2 != null">user_defined2 = #{userDefined2},</if>
|
|
<if test="userDefined3 != null">user_defined3 = #{userDefined3},</if>
|
|
<if test="userDefined4 != null">user_defined4 = #{userDefined4},</if>
|
|
<if test="userDefined5 != null">user_defined5 = #{userDefined5},</if>
|
|
<if test="userDefined6 != null">user_defined6 = #{userDefined6},</if>
|
|
<if test="userDefined7 != null">user_defined7 = #{userDefined7},</if>
|
|
<if test="userDefined8 != null">user_defined8 = #{userDefined8},</if>
|
|
<if test="userDefined9 != null">user_defined9 = #{userDefined9},</if>
|
|
<if test="userDefined10 != null">user_defined10 = #{userDefined10},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
|
<if test="lastModifiedBy != null">last_modified_by = #{lastModifiedBy},</if>
|
|
<if test="gmtModified != null">gmt_modified = #{gmtModified},</if>
|
|
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
<if test="sapFactoryCode != null">sap_factory_code = #{sapFactoryCode},</if>
|
|
<if test="wlName != null">wl_name = #{wlName},</if>
|
|
</trim>
|
|
where storage_id = #{storageId}
|
|
</update>
|
|
|
|
<delete id="deleteWmsOdsMateStorageNewsByStorageId" parameterType="String">
|
|
delete from wms_ods_mate_storage_news where storage_id = #{storageId}
|
|
</delete>
|
|
|
|
<delete id="deleteWmsOdsMateStorageNewsByStorageIds" parameterType="String">
|
|
delete from wms_ods_mate_storage_news where storage_id in
|
|
<foreach item="storageId" collection="array" open="(" separator="," close=")">
|
|
#{storageId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |