md
This commit is contained in:
parent
e60312c83e
commit
c3dfa328fe
@ -262,25 +262,14 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="params.isPrivQuery != null and params.isPrivQuery == 'T'">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and (
|
and scan_site_code in (
|
||||||
|
SELECT t1.site_code FROM (
|
||||||
scan_site_code in (
|
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||||
SELECT
|
#{params.privSiteCode} ) pd
|
||||||
site_code
|
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||||
FROM (
|
UNION
|
||||||
SELECT
|
SELECT #{params.privSiteCode} FROM dual
|
||||||
t1.site_code,
|
|
||||||
t1.parent_site_code,
|
|
||||||
IF( FIND_IN_SET( parent_site_code, @pids ) > 0, @pids := concat( @pids, ',', site_code ), 0 ) AS child_path
|
|
||||||
FROM
|
|
||||||
( SELECT site_code, parent_site_code FROM emis_site t WHERE del_flag = '0' ORDER BY site_code, parent_site_code ) t1,
|
|
||||||
( SELECT @pids := #{params.privSiteCode} ) t2
|
|
||||||
) t3
|
|
||||||
WHERE child_path > 0
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM DUAL
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|||||||
@ -402,7 +402,7 @@
|
|||||||
<if test="registerDate != null "> and register_date = #{registerDate}</if>
|
<if test="registerDate != null "> and register_date = #{registerDate}</if>
|
||||||
<if test="registerManCode != null and registerManCode != ''"> and register_man_code like concat('%', #{registerManCode}, '%')</if>
|
<if test="registerManCode != null and registerManCode != ''"> and register_man_code like concat('%', #{registerManCode}, '%')</if>
|
||||||
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''"> and take_piece_employee_code like concat('%', #{takePieceEmployeeCode}, '%')</if>
|
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''"> and take_piece_employee_code like concat('%', #{takePieceEmployeeCode}, '%')</if>
|
||||||
<if test="sendSiteCode != null and sendSiteCode != ''"> and send_site_code like concat('%', #{sendSiteCode}, '%')</if>
|
<if test="sendSiteCode != null and sendSiteCode != ''"> and send_site_code=#{sendSiteCode}</if>
|
||||||
<if test="sendDate != null "> and send_date = #{sendDate}</if>
|
<if test="sendDate != null "> and send_date = #{sendDate}</if>
|
||||||
<if test="dispatchManCode != null and dispatchManCode != ''"> and dispatch_man_code like concat('%', #{dispatchManCode}, '%')</if>
|
<if test="dispatchManCode != null and dispatchManCode != ''"> and dispatch_man_code like concat('%', #{dispatchManCode}, '%')</if>
|
||||||
<if test="dispatchDate != null and dispatchDate != ''"> and dispatch_date like concat('%', #{dispatchDate}, '%')</if>
|
<if test="dispatchDate != null and dispatchDate != ''"> and dispatch_date like concat('%', #{dispatchDate}, '%')</if>
|
||||||
@ -471,24 +471,16 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="params.privSiteCode != null">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and (
|
and (
|
||||||
send_site_code in (
|
send_site_code in (
|
||||||
SELECT
|
SELECT t1.site_code FROM (
|
||||||
site_code
|
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||||
FROM (
|
#{params.privSiteCode} ) pd
|
||||||
SELECT
|
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||||
t1.site_code,
|
UNION
|
||||||
t1.parent_site_code,
|
SELECT #{params.privSiteCode} FROM dual
|
||||||
IF( FIND_IN_SET( parent_site_code, @pids ) > 0, @pids := concat( @pids, ',', site_code ), 0 ) AS child_path
|
)
|
||||||
FROM
|
|
||||||
( SELECT site_code, parent_site_code FROM emis_site t WHERE del_flag = '0' ORDER BY site_code, parent_site_code ) t1,
|
|
||||||
( SELECT @pids := #{params.privSiteCode} ) t2
|
|
||||||
) t3
|
|
||||||
WHERE child_path > 0
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM DUAL
|
|
||||||
)
|
|
||||||
|
|
||||||
or salesmen=#{params.privEmpCode}
|
or salesmen=#{params.privEmpCode}
|
||||||
or payee=#{params.privEmpName}
|
or payee=#{params.privEmpName}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user