This commit is contained in:
linfso 2025-01-15 13:28:08 +08:00
parent 1938731daf
commit 90d44b9991

View File

@ -1912,7 +1912,6 @@
a.del_flag='0' and a.order_status !='0' and a.order_status!='2'
and ( a.problem_type is null or (a.problem_type is not null and (a.problem_type != 173 and a.problem_type != 170 and a.problem_type != 151) ) )
<!--
<if test="params.queryDateType != null and params.queryDateType == 1 ">
and to_days(a.send_date) = to_days(now())
@ -1940,7 +1939,14 @@
</if>
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and a.salesmen=#{salesmen}
and (
a.salesmen=#{params.privEmpName} or a.payee=#{params.privEmpName}
or a.salesmen in(
select salesmen from emis_salesmen_rel esr where esr.del_flag='0' and esr.bl_open='1' and now() <![CDATA[ >= ]]> esr.start_date and now() <![CDATA[ <= ]]> esr.end_date and esr.sales_ass=#{params.privEmpName}
)
or a.operate_employee_code=#{params.privEmpCode}
or a.take_piece_employee_code=#{params.privEmpCode}
)
</if>
</where>
@ -1989,30 +1995,6 @@
and a.receive_country=b.code and a.trans_line_type=c.line_code
and ( a.problem_type is null or (a.problem_type is not null and (a.problem_type != 173 and a.problem_type != 170 and a.problem_type != 151) ) )
<!--
<if test="params.queryDateType != null and params.queryDateType == 1 ">
and to_days(a.send_date) = to_days(now())
</if>
<if test="params.queryDateType != null and params.queryDateType == 2 ">
and DATE_SUB(CURDATE(), INTERVAL 7 DAY) <![CDATA[ <= ]]> a.send_date
</if>
<if test="params.queryDateType != null and params.queryDateType == 3 ">
and QUARTER(a.send_date)=QUARTER(now()) and YEAR(a.send_date)=YEAR(NOW())
</if>
<if test="params.queryDateType != null and params.queryDateType == 4 ">
and YEAR(a.send_date)=YEAR(NOW())
</if>
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and a.salesmen=#{salesmen}
</if>
-->
<if test="params.beginDate != null and params.beginDate != ''">
and a.send_date <![CDATA[ >= ]]> #{params.beginDate}
</if>
@ -2020,6 +2002,17 @@
and a.send_date <![CDATA[ <= ]]> #{params.endDate}
</if>
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.salesmen=#{params.privEmpName} or a.payee=#{params.privEmpName}
or a.salesmen in(
select salesmen from emis_salesmen_rel esr where esr.del_flag='0' and esr.bl_open='1' and now() <![CDATA[ >= ]]> esr.start_date and now() <![CDATA[ <= ]]> esr.end_date and esr.sales_ass=#{params.privEmpName}
)
or a.operate_employee_code=#{params.privEmpCode}
or a.take_piece_employee_code=#{params.privEmpCode}
)
</if>
</where>
group by b.code