zss
2023-08-15 56f89b4a45a561ff017ffd1e611e542130d046a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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.yuanchu.mom.mapper.RepertoryMapper">
    <select id="selectAllRepertory" resultType="java.util.Map">
        select id,
        name,
        specifications,
        code,
        check_state,
        user_name,
        DATE_FORMAT(create_time, '%Y-%m-%d') '入库日期',
        note
        from mom_ocean.repertory
        <where>
            and state=1
            <if test="name!=null and name!=''">
                and name LIKE CONCAT('%',#{name},'%')
            </if>
            <if test="specifications!=null and specifications!=''">
                and specifications LIKE CONCAT('%',#{specifications},'%')
            </if>
            <if test="time!=null and time!=''">
                and create_time=#{time}
            </if>
            <if test="type!=null and type!=''">
                and type=#{type}
            </if>
            <if test="checkState!=null and checkState!=''">
                and check_state=#{checkState}
            </if>
            order by id desc
        </where>
    </select>
    <!--查询库存三个字段给添加销售单-->
    <select id="getSale" resultType="java.util.Map">
        select id, name, specifications, unit
        from mom_ocean.repertory
        where state = 1
    </select>
</mapper>