| | |
| | | <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} |
| | |
| | | </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} |
| | |
| | | <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> |
| | |
| | | <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> |