无关风月
2025-02-28 2f8e70ad2884d2b6b7443dfae0af11ae9cfc8b99
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?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.jilongda.manage.mapper.TWarehousingMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.jilongda.manage.model.TWarehousing">
        <id column="id" property="id" />
        <result column="status" property="status" />
        <result column="type" property="type" />
        <result column="storeId" property="storeId" />
        <result column="remark" property="remark" />
        <result column="createTime" property="createTime" />
        <result column="updateTime" property="updateTime" />
        <result column="createBy" property="createBy" />
        <result column="updateBy" property="updateBy" />
        <result column="isDelete" property="isDelete" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, status, `type`, storeId, remark, createTime, updateTime, createBy, updateBy, isDelete
    </sql>
    <select id="inventoryReceiptList" resultType="com.jilongda.manage.vo.TWarehousingVO">
        select <include refid="Base_Column_List"></include>
        from t_warehousing
        <where>
            <if test="query.storeId != null">
                and storeId = #{query.storeId}
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                and createTime between #{query.startTime} and #{query.endTime}
            </if>
            and isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
            and `type` = 1
        </where>
        ORDER BY createTime DESC
    </select>
    <select id="inventoryReceiptLensList" resultType="com.jilongda.manage.vo.TWarehousingLensVO">
        select <include refid="Base_Column_List"></include>
        from t_warehousing
        <where>
            <if test="query.storeId != null">
                and storeId = #{query.storeId}
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                and createTime between #{query.startTime} and #{query.endTime}
            </if>
        and `type` = 2
            and isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY createTime DESC
    </select>
 
</mapper>