md
This commit is contained in:
parent
6bc71782f4
commit
4d9fe63510
@ -131,13 +131,17 @@
|
|||||||
|
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and ( salesmen=#{params.privEmpName}
|
and (
|
||||||
or payee=#{params.privEmpName}
|
a.salesmen=#{params.privEmpName}
|
||||||
|
or a.payee=#{params.privEmpName}
|
||||||
|
or a.salesmen in(
|
||||||
|
select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -95,6 +95,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||||
|
|
||||||
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
|
and apply_seq_no in(
|
||||||
|
select apply_seq_no from emis_settle_invoice_record
|
||||||
|
where del_flag='0' and settle_bill_no in(
|
||||||
|
select bill_no from emis_settle_sub_bill b
|
||||||
|
where del_flag='0'
|
||||||
|
and ( b.salesmen=#{params.privEmpName} or b.payee=#{params.privEmpName}
|
||||||
|
or b.salesmen in(select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
@ -315,8 +329,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteEmisSettleInvoiceChRecordById" parameterType="Long">
|
<delete id="deleteEmisSettleInvoiceChRecordById" parameterType="Long">
|
||||||
update emis_settle_invoice_ch_record set del_flag='0' where id = #{id}
|
update emis_settle_invoice_ch_record set del_flag='0' where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|||||||
@ -114,6 +114,21 @@
|
|||||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||||
|
|
||||||
|
|
||||||
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
|
and settle_bill_no in(
|
||||||
|
select bill_no from emis_settle_sub_bill b where del_flag='0'
|
||||||
|
and (
|
||||||
|
b.salesmen=#{params.privEmpName}
|
||||||
|
or b.payee=#{params.privEmpName}
|
||||||
|
or b.salesmen in(
|
||||||
|
select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -185,34 +185,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and (
|
and (
|
||||||
a.send_site_code in (
|
a.salesmen=#{params.privEmpName}
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or
|
|
||||||
a.dispatch_site_code in (
|
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or
|
|
||||||
a.sign_site_code in (
|
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or a.salesmen=#{params.privEmpName}
|
|
||||||
or a.payee=#{params.privEmpName}
|
or a.payee=#{params.privEmpName}
|
||||||
|
or a.salesmen in(
|
||||||
|
select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
@ -309,34 +286,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and (
|
and (
|
||||||
a.send_site_code in (
|
a.salesmen=#{params.privEmpName}
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or
|
|
||||||
a.dispatch_site_code in (
|
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or
|
|
||||||
a.sign_site_code in (
|
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or a.salesmen=#{params.privEmpName}
|
|
||||||
or a.payee=#{params.privEmpName}
|
or a.payee=#{params.privEmpName}
|
||||||
|
or salesmen in(
|
||||||
|
select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
@ -444,34 +398,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and (
|
and (
|
||||||
a.send_site_code in (
|
a.salesmen=#{params.privEmpName}
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or
|
|
||||||
a.dispatch_site_code in (
|
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or
|
|
||||||
a.sign_site_code in (
|
|
||||||
SELECT t1.site_code FROM (
|
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
|
||||||
#{params.privSiteCode} ) pd
|
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
|
||||||
UNION
|
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
or a.salesmen=#{params.privEmpName}
|
|
||||||
or a.payee=#{params.privEmpName}
|
or a.payee=#{params.privEmpName}
|
||||||
|
or salesmen in(
|
||||||
|
select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user