java110
2023-05-30 0b3ff378a9faaf9d7a4831b7f0de67378fe0dfea
java110-db/src/main/resources/mapper/common/CarInoutV1ServiceDaoImplMapper.xml
@@ -19,10 +19,12 @@
    <select id="getCarInoutInfo" parameterType="Map" resultType="Map">
        select t.in_time,t.in_time inTime,t.inout_id,t.inout_id inoutId,t.pa_id,t.pa_id paId,t.car_num,t.car_num
        carNum,t.status_cd,t.status_cd statusCd,t.state,t.community_id,t.community_id communityId,t.out_time,t.out_time
        outTime,td.`name` stateName,max(cid.car_type) carType
        outTime,td.`name` stateName,pa.num areaNum,tcfc.fee_name feeName,tcfc.config_id configId,max(cid.car_type) carType,max(cid.car_type_name) carTypeName
        from car_inout t
        LEFT JOIN car_inout_detail cid on t.inout_id = cid.inout_id and cid.status_cd = '0' and cid.state in ('100300','100400','100600')
        left join t_dict td on t.state = td.status_cd and td.table_columns='state' and td.table_name = 'car_inout'
        left join parking_area pa on t.pa_id = pa.pa_id and pa.status_cd = '0'
        left join temp_car_fee_config tcfc on pa.pa_id = tcfc.pa_id and tcfc.status_cd = '0'
        where 1 =1
        <if test="inTime !=null and inTime != ''">
            and t.in_time= #{inTime}
@@ -40,7 +42,7 @@
            </foreach>
        </if>
        <if test="carNum !=null and carNum != ''">
            and t.car_num= #{carNum}
            and t.car_num like concat('%',#{carNum},'%')
        </if>
        <if test="carType !=null and carType != ''">
            and cid.car_type= #{carType}
@@ -63,12 +65,17 @@
        <if test="outTime !=null and outTime != ''">
            and t.out_time= #{outTime}
        </if>
        group by t.in_time,t.inout_id,t.pa_id,t.car_num,t.status_cd,t.state,t.community_id,t.out_time,td.`name`
        <if test="startTime !=null and startTime != ''">
            and t.in_time &gt; #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.in_time &lt; #{endTime}
        </if>
        group by t.in_time,t.inout_id,t.pa_id,t.car_num,t.status_cd,t.state,t.community_id,t.out_time,td.`name`,pa.num,tcfc.fee_name,tcfc.config_id,t.create_time
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
@@ -124,7 +131,7 @@
            </foreach>
        </if>
        <if test="carNum !=null and carNum != ''">
            and t.car_num= #{carNum}
            and t.car_num like concat('%',#{carNum},'%')
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
@@ -144,6 +151,12 @@
        <if test="outTime !=null and outTime != ''">
            and t.out_time= #{outTime}
        </if>
        <if test="startTime !=null and startTime != ''">
            and t.in_time &gt; #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.in_time &lt; #{endTime}
        </if>
    </select>