java110
2022-02-22 225fa712204ccb8953998a0e4cc64ad828399dc3
java110-db/src/main/resources/mapper/common/CarInoutDetailV1ServiceDaoImplMapper.xml
@@ -19,8 +19,12 @@
    <select id="getCarInoutDetailInfo" parameterType="Map" resultType="Map">
        select t.inout_id,t.inout_id inoutId,t.machine_id,t.machine_id machineId,t.machine_code,t.machine_code
        machineCode,t.car_inout,t.car_inout carInout,t.pa_id,t.pa_id paId,t.detail_id,t.detail_id
        detailId,t.car_num,t.car_num carNum,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId
        detailId,t.car_num,t.car_num carNum,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,
        ci.in_time inTime,ci.out_time outTime,cip.real_charge realCharge,ci.pa_id paId,td.name stateName
        from car_inout_detail t
        left join car_inout ci on t.inout_id = ci.inout_id and ci.status_cd = '0' and t.community_id = ci.community_id
        left join car_inout_payment cip on cip.inout_id = ci.inout_id and cip.community_id = ci.community_id
        left join t_dict td on ci.state = td.status_cd and td.table_columns='state' and td.table_name = 'car_inout'
        where 1 =1
        <if test="inoutId !=null and inoutId != ''">
            and t.inout_id= #{inoutId}
@@ -36,6 +40,12 @@
        </if>
        <if test="paId !=null and paId != ''">
            and t.pa_id= #{paId}
        </if>
        <if test="paIds !=null ">
            and t.pa_id in
            <foreach collection="paIds" item="item" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="detailId !=null and detailId != ''">
            and t.detail_id= #{detailId}
@@ -95,7 +105,9 @@
    <select id="queryCarInoutDetailsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from car_inout_detail t
        where 1 =1
        left join car_inout ci on t.inout_id = ci.inout_id and ci.status_cd = '0' and t.community_id = ci.community_id
        left join car_inout_payment cip on cip.inout_id = ci.inout_id and cip.community_id = ci.community_id
        where 1 = 1
        <if test="inoutId !=null and inoutId != ''">
            and t.inout_id= #{inoutId}
        </if>
@@ -111,6 +123,12 @@
        <if test="paId !=null and paId != ''">
            and t.pa_id= #{paId}
        </if>
        <if test="paIds !=null ">
            and t.pa_id in
            <foreach collection="paIds" item="item" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="detailId !=null and detailId != ''">
            and t.detail_id= #{detailId}
        </if>