自动化立体仓库 - WMS系统
zjj
2023-09-06 914a092bc4c21d69641f94b68fecf61b25ddaca1
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?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.zy.asrs.mapper.LocCheckTrimMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocCheck">
        <id column="id" property="id" />
        <result column="type" property="type" />
        <result column="loc_no" property="locNo" />
        <result column="matnr" property="matnr" />
        <result column="anfme" property="anfme" />
        <result column="real_anfme" property="realAnfme" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="memo" property="memo" />
        <result column="examine" property="examine" />
        <result column="owner" property="owner" />
        <result column="payment" property="payment" />
 
    </resultMap>
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap2" type="com.zy.asrs.entity.ManLocDetl">
        <result column="host_id" property="hostId" />
        <result column="loc_no" property="locNo" />
        <result column="node_id" property="nodeId" />
        <result column="zpallet" property="zpallet" />
        <result column="anfme" property="anfme" />
        <result column="matnr" property="matnr" />
        <result column="maktx" property="maktx" />
        <result column="name" property="name" />
        <result column="specs" property="specs" />
        <result column="model" property="model" />
        <result column="batch" property="batch" />
        <result column="unit" property="unit" />
        <result column="barcode" property="barcode" />
        <result column="doc_id" property="docId" />
        <result column="doc_num" property="docNum" />
        <result column="cust_name" property="custName" />
        <result column="item_num" property="itemNum" />
        <result column="count" property="count" />
        <result column="price" property="price" />
        <result column="weight" property="weight" />
        <result column="status" property="status" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="modi_time" property="modiTime" />
        <result column="memo" property="memo" />
        <result column="uuid" property="uuid" />
 
 
    </resultMap>
 
 
    <select id="getAutoLocDetl" resultMap="BaseResultMap2">
        SELECT
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
        ORDER BY NEWID()
 
    </select>
    <select id="getCountLocDetl" resultMap="BaseResultMap2">
        SELECT TOP ${count}
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
        ORDER BY NEWID()
 
    </select>
    <select id="getMatnrCountLocDetl" resultMap="BaseResultMap2">
        SELECT TOP ${count}
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
          and matnr = #{matnr}
        ORDER BY NEWID()
    </select>
 
    <select id="getLocCountLocDetl" resultMap="BaseResultMap2">
        SELECT TOP ${count}
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
          and loc_no = #{loc_no}
        ORDER BY NEWID()
    </select>
 
 
    <select id="getLocCount" resultType="java.lang.String">
        SELECT loc_no FROM man_loc_check
        GROUP BY loc_no
    </select>
 
 
</mapper>