2025-07-01 16:42:36 +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">
|
2025-07-02 12:05:31 +08:00
|
|
|
<mapper namespace="com.nflg.wms.repository.mapper.WmsMaterialMapper">
|
2025-07-01 16:42:36 +08:00
|
|
|
|
|
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.MaterialVO">
|
|
|
|
|
SELECT DISTINCT ON ("no") *
|
2025-07-02 12:05:31 +08:00
|
|
|
FROM wmsMaterial
|
2025-07-01 16:42:36 +08:00
|
|
|
<where>
|
|
|
|
|
<if test="request.no!=null and request.no!=''">
|
|
|
|
|
and "no" like concat('%', #{request.no}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY "no",id DESC;
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getHistory" resultType="com.nflg.wms.common.pojo.vo.MaterialVO">
|
|
|
|
|
select *
|
2025-07-02 12:05:31 +08:00
|
|
|
from wms_material
|
2025-07-01 16:42:36 +08:00
|
|
|
where no=#{no}
|
|
|
|
|
order by id desc
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-07-02 12:05:31 +08:00
|
|
|
<select id="getNotSet" resultType="com.nflg.wms.repository.entity.WmsMaterial">
|
2025-07-01 16:42:36 +08:00
|
|
|
SELECT *
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT DISTINCT ON ("no") *
|
2025-07-02 12:05:31 +08:00
|
|
|
FROM wms_material
|
2025-07-01 16:42:36 +08:00
|
|
|
ORDER BY "no", id DESC
|
|
|
|
|
) t
|
|
|
|
|
where image is null or weight is null
|
|
|
|
|
ORDER BY id
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|