Blame view

zteits-job/src/main/resources/mybatis/smapper/TpPBerthsSMapper.xml 2.54 KB
83f7336e   zhaowg   增加方格地磁状态获取空闲车位数据推送
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
  <?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.zteits.job.mapper.smapper.TpPBerthsSMapper">
  	<resultMap id="BaseResultMap" type="com.zteits.job.domain.TpPBerths">
      <id column="id" jdbcType="BIGINT" property="id" />
      <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
      <result column="park_area_code" jdbcType="VARCHAR" property="parkAreaCode" />
      <result column="berth_no" jdbcType="VARCHAR" property="berthNo" />
      <result column="car_no" jdbcType="VARCHAR" property="carNo" />
      <result column="road_position" jdbcType="CHAR" property="roadPosition" />
      <result column="direction" jdbcType="CHAR" property="direction" />
      <result column="park_type" jdbcType="CHAR" property="parkType" />
      <result column="is_occupy" jdbcType="CHAR" property="isOccupy" />
      <result column="car_status" jdbcType="VARCHAR" property="carStatus" />
      <result column="order_id" jdbcType="VARCHAR" property="orderId" />
      <result column="berth_address" jdbcType="VARCHAR" property="berthAddress" />
      <result column="pda_in_time" jdbcType="TIMESTAMP" property="pdaInTime" />
      <result column="eqp_in_time" jdbcType="TIMESTAMP" property="eqpInTime" />
      <result column="pda_out_time" jdbcType="TIMESTAMP" property="pdaOutTime" />
      <result column="eqp_out_time" jdbcType="TIMESTAMP" property="eqpOutTime" />
      <result column="remark" jdbcType="VARCHAR" property="remark" />
      <result column="data_state" jdbcType="INTEGER" property="dataState" />
      <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
      <result column="create_op" jdbcType="BIGINT" property="createOp" />
      <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
      <result column="modify_op" jdbcType="BIGINT" property="modifyOp" />
      <result column="opt_flg" jdbcType="CHAR" property="optFlg" />
    </resultMap>
  
   <sql id="Base_Column_List">
      id, pl_no, park_area_code, berth_no, car_no, road_position, direction, park_type, 
      is_occupy, car_status, order_id, berth_address, pda_in_time, eqp_in_time, pda_out_time, 
      eqp_out_time, remark, data_state, create_time, create_op, modify_time, modify_op, 
      opt_flg
   </sql>
  
    <!-- 根据停车场编码获取空闲车位总数-->
    <select id="queryFreeBerthNum" resultType="long">
     	SELECT
  		count(1)
  	FROM
  		tp_p_berths
  	WHERE
  		is_occupy = 2
  	AND data_state = 1
  	AND pl_no = #{plNo}
  	<if test="where != null and where != ''">
  		AND ${where}
  	</if>
    </select>
  
  </mapper>