58 lines
2.2 KiB
XML
58 lines
2.2 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.cim.idm.dao.WareHouseDao">
|
|
|
|
<update id="edit">
|
|
update BS_ERPLOCATION set USE_LOCATION = #{dto.useLocation}, IS_OVEN = #{dto.isOven}
|
|
where ERPFACTORYNAME = #{dto.erpFactoryName} and ERPLOCATIONNAME = #{dto.erpLocationName}
|
|
</update>
|
|
|
|
<select id="page" resultType="com.cim.idm.model.po.storage.StorageSpec">
|
|
select SITENAME, STORAGENAME, DESCRIPTION
|
|
from STORAGESPEC
|
|
<where>
|
|
<if test="dto.storageName != null and dto.storageName != ''">
|
|
AND STORAGENAME LIKE '%'||#{dto.storageName}||'%'
|
|
</if>
|
|
<if test="dto.description != null and dto.description != ''">
|
|
AND DESCRIPTION LIKE '%'||#{dto.description}||'%'
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="get" resultType="com.cim.idm.model.po.storage.StorageSpec">
|
|
select SITENAME, STORAGENAME, DESCRIPTION
|
|
from STORAGESPEC
|
|
where SITENAME = #{siteName}
|
|
and STORAGENAME = #{storageName}
|
|
</select>
|
|
|
|
<insert id="add">
|
|
insert into STORAGESPEC(SITENAME, STORAGENAME, DESCRIPTION)
|
|
values (#{storageSpec.siteName}, #{storageSpec.storageName}, #{storageSpec.description})
|
|
</insert>
|
|
|
|
<update id="editStorage">
|
|
update STORAGESPEC set DESCRIPTION = #{edit.description}
|
|
where SITENAME = #{edit.siteName}
|
|
and STORAGENAME = #{edit.storageName}
|
|
</update>
|
|
|
|
<delete id="delStorage">
|
|
delete from STORAGESPEC
|
|
where SITENAME = #{del.siteName}
|
|
and STORAGENAME = #{del.storageName}
|
|
</delete>
|
|
|
|
<select id="search" resultType="com.cim.idm.model.po.storage.StorageSpec">
|
|
select SITENAME, STORAGENAME, DESCRIPTION
|
|
from STORAGESPEC
|
|
where 1 = 1 AND
|
|
<foreach item="type" index="index" collection="prefix" open="(" separator="or" close=")">
|
|
STORAGENAME LIKE #{type}||'%'
|
|
</foreach>
|
|
<if test="storageName != null and storageName != ''">
|
|
AND STORAGENAME LIKE '%'||#{storageName}||'%'
|
|
</if>
|
|
</select>
|
|
</mapper> |