自动化立体仓库 - WCS系统
1
zhangc
2025-04-14 710deccd42576ad2dcbdc22e75f18b455d5ce2ff
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
108
109
110
111
112
113
114
115
116
<?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.BasDevpMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasDevp">
        <id column="dev_no" property="devNo" />
        <result column="dec_desc" property="decDesc" />
        <result column="dev_mk" property="devMk" />
        <result column="in_enable" property="inEnable" />
        <result column="out_enable" property="outEnable" />
        <result column="autoing" property="autoing" />
        <result column="loading" property="loading" />
        <result column="canining" property="canining" />
        <result column="canouting" property="canouting" />
        <result column="fronting" property="fronting" />
        <result column="rearing" property="rearing" />
        <result column="uping" property="uping" />
        <result column="downing" property="downing" />
        <result column="inreq1" property="inreq1" />
        <result column="inreq2" property="inreq2" />
        <result column="wrk_no" property="wrkNo" />
        <result column="wrk_no1" property="wrkNo1" />
        <result column="ctn_type" property="ctnType" />
        <result column="barcode" property="barcode" />
        <result column="in_qty" property="inQty" />
        <result column="row1" property="row1" />
        <result column="io_time" property="ioTime" />
        <result column="area" property="area" />
        <result column="in_ok" property="inOk" />
        <result column="out_ok" property="outOk" />
        <result column="loc_type1" property="locType1" />
        <result column="loc_type2" property="locType2" />
        <result column="loc_type3" property="locType3" />
        <result column="modi_user" property="modiUser" />
        <result column="modi_time" property="modiTime" />
        <result column="appe_user" property="appeUser" />
        <result column="appe_time" property="appeTime" />
        <result column="std_qty" property="stdQty" />
        <result column="min_wt" property="minWt" />
        <result column="max_wt" property="maxWt" />
        <result column="gross_wt" property="grossWt" />
        <result column="cart_pos" property="cartPos" />
        <result column="qr_code_value" property="qrCodeValue" />
        <result column="loc_no" property="locNo" />
        <result column="lev" property="lev" />
        <result column="lift_no" property="liftNo" />
 
    </resultMap>
 
    <select id="getAvailableInSite" resultType="java.lang.Integer">
        select
        abd.dev_no
        from asr_bas_devp abd
        left join asr_sta_desc asd on abd.dev_no = asd.stn_no
        where 1=1
        and asd.type_no = #{typeNo}
        and abd.in_enable = 'Y'
        group by abd.dev_no
    </select>
 
    <select id="getAvailableOutSite" resultType="java.lang.Integer">
        select
        abd.dev_no
        from asr_bas_devp abd
        left join asr_sta_desc asd on abd.dev_no = asd.stn_no
        where 1=1
        and asd.type_no = #{typeNo}
        and abd.out_enable = 'Y'
        group by abd.dev_no
    </select>
 
    <select id="selectByWrkNo" resultMap="BaseResultMap">
        select top 1 *
        from asr_bas_devp
        where 1=1
        and wrk_no = #{wrkNo}
    </select>
 
    <select id="queryByLocNo" resultMap="BaseResultMap">
        select top 1 *
        from asr_bas_devp
        where 1=1
        and loc_no = #{locNo}
    </select>
 
    <select id="queryByQrCode" resultMap="BaseResultMap">
        select top 1 *
        from asr_bas_devp
        where 1=1
        and qr_code_value = #{qrCodeValue}
    </select>
 
    <select id="selectLevSite" resultMap="BaseResultMap">
        select *
        from asr_bas_devp
        where 1=1
        and dev_no in ('105','106','107','108')
    </select>
 
    <select id="selectHasLiftNoByLev" resultMap="BaseResultMap">
        select *
        from asr_bas_devp
        where 1=1
        and lev = #{lev}
        and lift_no is not null
    </select>
 
    <select id="selectByLevAndLiftNo" resultMap="BaseResultMap">
        select *
        from asr_bas_devp
        where 1=1
        and lev = #{lev}
        and lift_no = #{liftNo}
    </select>
</mapper>