chengf
2026-01-30 b8bf2507bc7b23c90bc6dc71ea2460e277d3800a
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?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="parkingBoxV1ServiceDaoImpl">
 
 
    <!-- 保存岗亭信息 add by wuxw 2018-07-03 -->
    <insert id="saveParkingBoxInfo" parameterType="Map">
        insert into parking_box(
        yelow_car_in,fee,temp_car_in,box_name,remark,community_id,blue_car_in,box_id,temp_auth
        ) values (
        #{yelowCarIn},#{fee},#{tempCarIn},#{boxName},#{remark},#{communityId},#{blueCarIn},#{boxId},#{tempAuth}
        )
    </insert>
 
 
    <!-- 查询岗亭信息 add by wuxw 2018-07-03 -->
    <select id="getParkingBoxInfo" parameterType="Map" resultType="Map">
        select t.yelow_car_in,t.yelow_car_in yelowCarIn,t.fee,t.temp_car_in,t.temp_car_in
        tempCarIn,t.box_name,t.box_name boxName,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id
        communityId,t.blue_car_in,t.blue_car_in blueCarIn,t.box_id,t.box_id boxId,pba.pa_id paId,pa.num paNum,t.temp_auth tempAuth
        from parking_box t
        left join parking_box_area pba on t.box_id = pba.box_id and pba.default_area = 'T' and pba.status_cd ='0'
        left join parking_area pa on pba.pa_id = pa.pa_id and pa.community_id = t.community_id and pa.status_cd = '0'
        where 1 =1
        <if test="yelowCarIn !=null and yelowCarIn != ''">
            and t.yelow_car_in= #{yelowCarIn}
        </if>
        <if test="fee !=null and fee != ''">
            and t.fee= #{fee}
        </if>
        <if test="tempCarIn !=null and tempCarIn != ''">
            and t.temp_car_in= #{tempCarIn}
        </if>
        <if test="tempAuth !=null and tempAuth != ''">
            and t.temp_auth= #{tempAuth}
        </if>
        <if test="boxName !=null and boxName != ''">
            and t.box_name= #{boxName}
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="blueCarIn !=null and blueCarIn != ''">
            and t.blue_car_in= #{blueCarIn}
        </if>
        <if test="boxId !=null and boxId != ''">
            and t.box_id= #{boxId}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
 
    </select>
 
 
    <!-- 修改岗亭信息 add by wuxw 2018-07-03 -->
    <update id="updateParkingBoxInfo" parameterType="Map">
        update parking_box t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="yelowCarIn !=null and yelowCarIn != ''">
            , t.yelow_car_in= #{yelowCarIn}
        </if>
        <if test="fee !=null and fee != ''">
            , t.fee= #{fee}
        </if>
        <if test="tempCarIn !=null and tempCarIn != ''">
            , t.temp_car_in= #{tempCarIn}
        </if>
        <if test="boxName !=null and boxName != ''">
            , t.box_name= #{boxName}
        </if>
        <if test="remark !=null and remark != ''">
            , t.remark= #{remark}
        </if>
        <if test="blueCarIn !=null and blueCarIn != ''">
            , t.blue_car_in= #{blueCarIn}
        </if>
        <if test="tempAuth !=null and tempAuth != ''">
            , t.temp_auth= #{tempAuth}
        </if>
        where 1=1
        <if test="boxId !=null and boxId != ''">
            and t.box_id= #{boxId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
    </update>
 
    <!-- 查询岗亭数量 add by wuxw 2018-07-03 -->
    <select id="queryParkingBoxsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from parking_box t
        left join parking_box_area pba on t.box_id = pba.box_id and pba.default_area = 'T' and pba.status_cd ='0'
        left join parking_area pa on pba.pa_id = pa.pa_id and pa.community_id = t.community_id and pa.status_cd = '0'
        where 1 =1
        <if test="yelowCarIn !=null and yelowCarIn != ''">
            and t.yelow_car_in= #{yelowCarIn}
        </if>
        <if test="fee !=null and fee != ''">
            and t.fee= #{fee}
        </if>
        <if test="tempCarIn !=null and tempCarIn != ''">
            and t.temp_car_in= #{tempCarIn}
        </if>
        <if test="tempAuth !=null and tempAuth != ''">
            and t.temp_auth= #{tempAuth}
        </if>
        <if test="boxName !=null and boxName != ''">
            and t.box_name= #{boxName}
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="blueCarIn !=null and blueCarIn != ''">
            and t.blue_car_in= #{blueCarIn}
        </if>
        <if test="boxId !=null and boxId != ''">
            and t.box_id= #{boxId}
        </if>
    </select>
 
</mapper>