58 lines
2.2 KiB
XML
Raw Normal View History

2025-04-09 10:07:26 +08:00
<?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>
2025-04-15 11:28:42 +08:00
<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>
2025-04-09 10:07:26 +08:00
</mapper>