md
This commit is contained in:
parent
01509a2d45
commit
a323ab5b7d
@ -163,9 +163,7 @@
|
||||
|
||||
<select id="checkUnique" parameterType="EmisSettleBill" resultType="int">
|
||||
select count(1) from emis_settle_bill
|
||||
where del_flag='0'
|
||||
and settle_bill_name = #{settleBillName}
|
||||
limit 1
|
||||
where del_flag='0' and settle_bill_name = #{settleBillName} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisSettleBillById" parameterType="Long" resultMap="EmisSettleBillResult">
|
||||
|
||||
@ -175,7 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<!-- 过滤掉虚拟单 -->
|
||||
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 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.sendSiteCode != null and params.sendSiteCode != ''">
|
||||
and a.send_site_code = #{params.sendSiteCode}
|
||||
@ -303,7 +303,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="billMonth != null and billMonth != ''"> and bill_month=#{billMonth}</if>
|
||||
<if test="custNo != null and custNo != ''"> and b.cust_no=#{custNo}</if>
|
||||
<if test="custName != null and custName != ''"> and b.cust_name like concat('%', #{custName}, '%')</if>
|
||||
|
||||
<if test="customerCode != null and customerCode != ''"> and b.customer_code=#{customerCode}</if>
|
||||
<if test="customerName != null and customerName != ''"> and b.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
|
||||
@ -318,6 +317,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="confirmSiteNote != null and confirmSiteNote != ''"> and b.confirm_site_note = #{confirmSiteNote}</if>
|
||||
<if test="confirmSiteCode != null and confirmSiteCode != ''"> and b.confirm_site_code = #{confirmSiteCode}</if>
|
||||
|
||||
|
||||
<!-- 过滤掉虚拟单 -->
|
||||
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.sendSiteCode != null and params.sendSiteCode != ''">
|
||||
and a.send_site_code = #{params.sendSiteCode}
|
||||
</if>
|
||||
@ -326,6 +329,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and a.dispatch_underling_site_code = #{params.dispatchUnderlingSiteCode}
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.problemQueryType != null and params.problemQueryType == 1 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
||||
and a.bill_code in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="params.problemQueryType != null and params.problemQueryType == 2 and params.problemQueryIds != null and params.problemQueryIds !=''">
|
||||
and a.bill_code not in (
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="params.receiveCompany != null and params.receiveCompany != ''">
|
||||
and a.receive_company like concat('%', #{params.receiveCompany}, '%')
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.sendCompany != null and params.sendCompany != ''">
|
||||
and a.send_company like concat('%', #{params.sendCompany}, '%')
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
<if test="params.mergeStatus != null and params.mergeStatus == 1">
|
||||
and b.bl_merge='0'
|
||||
and b.bl_confirm_center='1'
|
||||
@ -339,10 +366,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and b.bl_confirm_site='1'
|
||||
</if>
|
||||
|
||||
<if test="params.transLineType != null and params.transLineType != ''">
|
||||
and a.trans_line_type = #{params.transLineType}
|
||||
</if>
|
||||
|
||||
<if test="params.productType != null and params.productType != ''">
|
||||
and a.product_type = #{params.productType}
|
||||
</if>
|
||||
|
||||
<if test="params.payee != null and params.payee != ''">
|
||||
and a.payee = #{params.payee}
|
||||
</if>
|
||||
|
||||
|
||||
<if test="params.salesmen != null and params.salesmen != ''">
|
||||
and a.salesmen = #{params.salesmen}
|
||||
</if>
|
||||
@ -368,10 +404,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and a.send_date <![CDATA[ <= ]]> #{params.endSendDate}
|
||||
</if>
|
||||
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
|
||||
and b.create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
|
||||
</if>
|
||||
<if test="params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and b.create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
||||
</if>
|
||||
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
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}
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user