|
|
@@ -83,6 +83,25 @@
|
|
|
<if test="flgValidList != null and flgValidList.size()>0">
|
|
|
AND t.flg_valid =any(#{flgValidList, typeHandler=BooleanListTypeHandler})
|
|
|
</if>
|
|
|
+ <if test="searchText !=null">
|
|
|
+ AND t.trf_no LIKE concat('%',my_ex.likequery(#{searchText}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="orgName !=null">
|
|
|
+ AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="staffName !=null">
|
|
|
+ AND tms.staff_name LIKE concat('%',my_ex.likequery(#{staffName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="trfOutMacName !=null">
|
|
|
+ AND tmmaout.mac_name LIKE concat('%',my_ex.likequery(#{trfOutMacName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="trfInMacName !=null">
|
|
|
+ AND tmmain.mac_name LIKE concat('%',my_ex.likequery(#{trfInMacName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="accDateStart != null and accDateEnd != null">
|
|
|
+ AND t.acc_date >= #{accDateStart}::timestamp with time zone
|
|
|
+ AND t.acc_date < #{accDateEnd}::timestamp with time zone + interval '1 day'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
|
@@ -113,10 +132,17 @@
|
|
|
tms.staff_name as "staffName",
|
|
|
makestaff.staff_name as "makeStaffName"
|
|
|
FROM dkic_b.t_mac_transfer as t
|
|
|
- left join dkic_b.t_mst_org tmo on t.org_id = tmo.org_id
|
|
|
- left join dkic_b.t_mst_staff tms on t.staff_id = tms.staff_id
|
|
|
- left join dkic_b.t_mst_staff as makestaff on t.make_staff = makestaff.staff_id
|
|
|
- <include refid="Condition"/>
|
|
|
+ left join dkic_b.t_mac_transfer_item tmti ON t.trf_id = tmti.trf_id
|
|
|
+ left join dkic_b.t_mst_money_account tmmain ON tmti.trf_in_mac = tmmain.mac_id
|
|
|
+ left join dkic_b.t_mst_money_account tmmaout ON tmti.trf_out_mac = tmmaout.mac_id
|
|
|
+ left join dkic_b.t_mst_org tmo on t.org_id = tmo.org_id
|
|
|
+ left join dkic_b.t_mst_staff tms on t.staff_id = tms.staff_id
|
|
|
+ left join dkic_b.t_mst_staff as makestaff on t.make_staff = makestaff.staff_id
|
|
|
+ <include refid="Condition"/>
|
|
|
+ GROUP BY T .trf_id ,
|
|
|
+ tmo.org_name ,
|
|
|
+ tms.staff_name ,
|
|
|
+ makestaff.staff_name
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
</if>
|
|
|
@@ -126,9 +152,12 @@
|
|
|
<select id="countByCond" resultType="Long">
|
|
|
SELECT count(1)
|
|
|
FROM dkic_b.t_mac_transfer as t
|
|
|
- left join dkic_b.t_mst_org tmo on t.org_id = tmo.org_id
|
|
|
- left join dkic_b.t_mst_staff tms on t.staff_id = tms.staff_id
|
|
|
- left join dkic_b.t_mst_staff as makestaff on t.make_staff = makestaff.staff_id
|
|
|
+ left join dkic_b.t_mac_transfer_item tmti ON t.trf_id = tmti.trf_id
|
|
|
+ left join dkic_b.t_mst_money_account tmmain ON tmti.trf_in_mac = tmmain.mac_id
|
|
|
+ left join dkic_b.t_mst_money_account tmmaout ON tmti.trf_out_mac = tmmaout.mac_id
|
|
|
+ left join dkic_b.t_mst_org tmo on t.org_id = tmo.org_id
|
|
|
+ left join dkic_b.t_mst_staff tms on t.staff_id = tms.staff_id
|
|
|
+ left join dkic_b.t_mst_staff as makestaff on t.make_staff = makestaff.staff_id
|
|
|
<include refid="Condition"/>
|
|
|
</select>
|
|
|
|