|
|
@@ -2,11 +2,6 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.goafanti.common.dao.TOrderNewMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderNew">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Fri May 15 10:33:54 CST 2020.
|
|
|
- -->
|
|
|
<id column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
<result column="order_type" jdbcType="INTEGER" property="orderType" />
|
|
|
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
|
@@ -48,19 +43,19 @@
|
|
|
<result column="back_status" jdbcType="INTEGER" property="backStatus" />
|
|
|
<result column="agreement_url" jdbcType="VARCHAR" property="agreementUrl" />
|
|
|
<result column="new_user" jdbcType="INTEGER" property="newUser" />
|
|
|
+ <result column="service_content" jdbcType="VARCHAR" property="serviceContent" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
order_no, order_type, creater, create_time, update_time, buyer_id, first_amount,
|
|
|
total_amount, settlement_amount, refund_amount, order_status, liquidation_status,
|
|
|
process_status, project_status, approval, order_remarks, delete_sign, salesman_id,
|
|
|
- finance_id, technician_id, sign_time, settlement_time, contract_no, contract_type,
|
|
|
- contacts, contact_mobile, legal_person, legal_person_tel, proof_count, proof_aid,
|
|
|
- proof_time, proof_status, order_dep, outsource, additional_order, primary_order,
|
|
|
- old_salesman_id, back_status
|
|
|
+ finance_id, technician_id, sign_time, settlement_time, contract_picture_url, contract_no,
|
|
|
+ contract_type, contacts, contact_mobile, legal_person, legal_person_tel, proof_count,
|
|
|
+ proof_aid, proof_time, proof_status, order_dep, outsource, additional_order, primary_order,
|
|
|
+ old_salesman_id, back_status, agreement_url, new_user, service_content
|
|
|
</sql>
|
|
|
-
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from t_order_new
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
@@ -69,37 +64,39 @@
|
|
|
delete from t_order_new
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
- <insert id="insert" keyColumn="order_no" keyProperty="orderNo" parameterType="com.goafanti.common.model.TOrderNew" useGeneratedKeys="true">
|
|
|
- insert into t_order_new (order_type, creater, create_time,
|
|
|
- update_time, buyer_id, first_amount,
|
|
|
- total_amount, settlement_amount, refund_amount,
|
|
|
- order_status, liquidation_status, process_status,
|
|
|
- project_status, approval, order_remarks,
|
|
|
- delete_sign, salesman_id, finance_id,
|
|
|
- technician_id, sign_time, settlement_time,
|
|
|
- contract_picture_url, contract_no, contract_type,
|
|
|
- contacts, contact_mobile, legal_person,
|
|
|
- legal_person_tel, proof_count, proof_aid,
|
|
|
- proof_time, proof_status, order_dep,
|
|
|
- outsource, additional_order, primary_order,
|
|
|
- old_salesman_id, back_status, contract_picture_url,
|
|
|
- agreement_url)
|
|
|
- values (#{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR},
|
|
|
- #{firstAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
|
|
|
- #{refundAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
|
|
|
- #{processStatus,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER},
|
|
|
- #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR},
|
|
|
- #{financeId,jdbcType=VARCHAR}, #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE},
|
|
|
- #{settlementTime,jdbcType=DATE}, #{contractNo,jdbcType=VARCHAR}, #{contractType,jdbcType=VARCHAR},
|
|
|
- #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{legalPerson,jdbcType=VARCHAR},
|
|
|
- #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT}, #{proofAid,jdbcType=VARCHAR},
|
|
|
- #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER}, #{orderDep,jdbcType=VARCHAR},
|
|
|
- #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR}, #{primaryOrder,jdbcType=VARCHAR},
|
|
|
- #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER}, #{agreementUrl,jdbcType=VARCHAR},
|
|
|
- #{newUser,jdbcType=INTEGER})
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.TOrderNew">
|
|
|
+ insert into t_order_new (order_no, order_type, creater,
|
|
|
+ create_time, update_time, buyer_id,
|
|
|
+ first_amount, total_amount, settlement_amount,
|
|
|
+ refund_amount, order_status, liquidation_status,
|
|
|
+ process_status, project_status, approval,
|
|
|
+ order_remarks, delete_sign, salesman_id,
|
|
|
+ finance_id, technician_id, sign_time,
|
|
|
+ settlement_time, contract_picture_url, contract_no,
|
|
|
+ contract_type, contacts, contact_mobile,
|
|
|
+ legal_person, legal_person_tel, proof_count,
|
|
|
+ proof_aid, proof_time, proof_status,
|
|
|
+ order_dep, outsource, additional_order,
|
|
|
+ primary_order, old_salesman_id, back_status,
|
|
|
+ agreement_url, new_user, service_content
|
|
|
+ )
|
|
|
+ values (#{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR},
|
|
|
+ #{firstAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
|
|
|
+ #{refundAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
|
|
|
+ #{processStatus,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER},
|
|
|
+ #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR},
|
|
|
+ #{financeId,jdbcType=VARCHAR}, #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE},
|
|
|
+ #{settlementTime,jdbcType=DATE}, #{contractPictureUrl,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR},
|
|
|
+ #{contractType,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR},
|
|
|
+ #{legalPerson,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT},
|
|
|
+ #{proofAid,jdbcType=VARCHAR}, #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER},
|
|
|
+ #{orderDep,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR},
|
|
|
+ #{primaryOrder,jdbcType=VARCHAR}, #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
|
|
|
+ #{agreementUrl,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{serviceContent,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" keyColumn="order_no" keyProperty="orderNo" parameterType="com.goafanti.common.model.TOrderNew" useGeneratedKeys="true">
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderNew">
|
|
|
insert into t_order_new
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="orderNo != null">
|
|
|
@@ -225,6 +222,9 @@
|
|
|
<if test="newUser != null">
|
|
|
new_user,
|
|
|
</if>
|
|
|
+ <if test="serviceContent != null">
|
|
|
+ service_content,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="orderNo != null">
|
|
|
@@ -350,6 +350,9 @@
|
|
|
<if test="newUser != null">
|
|
|
#{newUser,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="serviceContent != null">
|
|
|
+ #{serviceContent,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderNew">
|
|
|
@@ -475,6 +478,9 @@
|
|
|
<if test="newUser != null">
|
|
|
new_user = #{newUser,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="serviceContent != null">
|
|
|
+ service_content = #{serviceContent,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -519,7 +525,8 @@
|
|
|
old_salesman_id = #{oldSalesmanId,jdbcType=VARCHAR},
|
|
|
back_status = #{backStatus,jdbcType=INTEGER},
|
|
|
agreement_url = #{agreementUrl,jdbcType=VARCHAR},
|
|
|
- new_user = #{newUser,jdbcType=INTEGER}
|
|
|
+ new_user = #{newUser,jdbcType=INTEGER},
|
|
|
+ service_content = #{serviceContent,jdbcType=VARCHAR}
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -530,17 +537,17 @@
|
|
|
,liquidation_status,o.finance_id as financeId,contract_no as contractNo,d.name as departmentName,e.name as outsourceName
|
|
|
from t_order_new o left join `user` u on o.buyer_id = u.id left join admin a on o.salesman_id = a.id
|
|
|
left join department d on o.order_dep=d.id left join (select order_no,max(name)as name from outsource_organization group by order_no) e
|
|
|
- on o.order_no=e.order_no left join t_order_outsource f on f.order_no=o.order_no where delete_sign != 1
|
|
|
- and approval in (0,2)
|
|
|
+ on o.order_no=e.order_no left join t_order_outsource f on f.order_no=o.order_no where delete_sign != 1
|
|
|
+ and approval in (0,2)
|
|
|
<if test="o.outsource != null">
|
|
|
and o.outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="o.outsource == 1">
|
|
|
and f.refund_status=1
|
|
|
</if>
|
|
|
-
|
|
|
+
|
|
|
<if test="o.processStatus == 2">
|
|
|
- and process_status = 2
|
|
|
+ and process_status = 2
|
|
|
</if>
|
|
|
<if test="o.processStatus == 3">
|
|
|
and process_status >= 2 and process_status < 7
|
|
|
@@ -557,7 +564,7 @@
|
|
|
<if test="o.contractNo != null and o.contractNo != """>
|
|
|
and o.contract_no like CONCAT('%',#{o.contractNo,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
-
|
|
|
+
|
|
|
<if test="o.buyerName != null and o.buyerName != """>
|
|
|
<bind name="n" value="'%' + o.buyerName + '%'" />
|
|
|
and u.nickname like #{n,jdbcType=VARCHAR}
|
|
|
@@ -574,7 +581,7 @@
|
|
|
</select>
|
|
|
<select id="getAllUnassignedCountOrder" parameterType="Map" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id left join admin a on o.salesman_id = a.id
|
|
|
- left join t_order_outsource f on f.order_no=o.order_no where delete_sign != 1 and approval in (0,2)
|
|
|
+ left join t_order_outsource f on f.order_no=o.order_no where delete_sign != 1 and approval in (0,2)
|
|
|
<if test="o.outsource != null">
|
|
|
and o.outsource=#{o.outsource,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -582,7 +589,7 @@
|
|
|
and f.refund_status=1
|
|
|
</if>
|
|
|
<if test="o.processStatus == 2">
|
|
|
- and process_status = 2
|
|
|
+ and process_status = 2
|
|
|
</if>
|
|
|
<if test="o.processStatus == 3">
|
|
|
and process_status > 2 and process_status < 7
|
|
|
@@ -611,7 +618,7 @@
|
|
|
</select>
|
|
|
<!-- 查看某订单状态是否符合要求 -->
|
|
|
<select id="getCountByIdAndStatus" parameterType="com.goafanti.common.model.TOrderNew" resultType="java.lang.Integer">
|
|
|
- select count(*) from t_order_new
|
|
|
+ select count(*) from t_order_new
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
<if test="orderType != null">
|
|
|
and order_type = #{orderType,jdbcType=INTEGER}
|
|
|
@@ -635,7 +642,7 @@
|
|
|
and order_status = #{orderStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="liquidationStatus == 1">
|
|
|
- and liquidation_status between 1 and 2
|
|
|
+ and liquidation_status between 1 and 2
|
|
|
</if>
|
|
|
<if test="processStatus != null">
|
|
|
and process_status = #{processStatus,jdbcType=INTEGER}
|
|
|
@@ -683,14 +690,15 @@
|
|
|
<!-- 财务专员查看需要待收款的数据 -->
|
|
|
<select id="financeList" parameterType="Map" resultType="com.goafanti.order.bo.OrderListBo">
|
|
|
select o.order_no as orderNo, o.sign_time as signTime, u.nickname as buyerName, o.order_status as orderStatus,a.finance_name financeName,
|
|
|
- a.cost_amount costAmount,a.payment_amount paymentAmount,o.process_status as processStatus, o.settlement_amount as actuallyTotalAmount,
|
|
|
+ a.cost_amount costAmount,a.payment_amount paymentAmount,o.process_status as processStatus, o.settlement_amount as actuallyTotalAmount,
|
|
|
o.contract_no as contractNo, o.approval, o.back_status backStatus,a.salesman_name as sellerName, o.salesman_id as sellerId,
|
|
|
o.buyer_id as buyerId, o.liquidation_status as liquidationStatus ,too.amount outsourceAmount, o.first_amount as signFirstPayment,
|
|
|
o.total_amount as signTotalAmount, date_format(o.create_time, '%Y-%m-%d %H:%i:%s') as createTime, too.company_name as outsourceName,
|
|
|
0 as companyId, d.name as departmentName, a.final_receivables finalReceivables ,a.invoice_amount invoiceAmount ,
|
|
|
date_format(a.`final_Receivables_time`, '%Y-%m-%d %H:%i:%s')finalReceivablesTime,a.order_receivables orderReceivables,a.order_arrears orderArrears
|
|
|
- from t_order_new o left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
- left join (select * from t_order_outsource where type=0) too on o.order_no=too.order_no where delete_sign != 1 and approval !=3 and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
+ from t_order_new o left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
+ left join (select * from t_order_outsource where type=0) too on o.order_no=too.order_no where delete_sign in(0,2) and approval in(1,2,3)
|
|
|
+ and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
<if test="o.processStatus == 3">
|
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -701,7 +709,7 @@
|
|
|
and o.back_status = 3
|
|
|
</if>
|
|
|
<if test="fids != null and fids.size() > 0">
|
|
|
- and d.finance_id in
|
|
|
+ and d.finance_id in
|
|
|
<foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
@@ -756,9 +764,9 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="financeCount" parameterType="Map" resultType="java.lang.Integer">
|
|
|
- select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id
|
|
|
+ select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id
|
|
|
left join department d on o.order_dep = d.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
- where delete_sign != 1 and approval !=3 and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
+ where delete_sign in(0,2) and approval in(1,2,3) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
<if test="o.processStatus == 3">
|
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -769,7 +777,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
and o.back_status = 3
|
|
|
</if>
|
|
|
<if test="fids != null and fids.size() > 0">
|
|
|
- and d.finance_id in
|
|
|
+ and d.finance_id in
|
|
|
<foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
@@ -1199,7 +1207,8 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
c.contact_mobile as salesmanMobile,d.contact_mobile as financeMobile,b.username as userName ,b.nickname as nickname ,e.back_status as backStatus,f.name as initiateName,
|
|
|
e.reason,date_format(e.create_time,'%Y-%m-%d') as backDate,a.buyer_id as uid,a.order_dep as orderDep, g.location_province as locationProvince,
|
|
|
g.location_city as locationCity,g.location_area locationArea,g.postal_address postalAddress,outsource,a.primary_order primaryOrder,a.agreement_url agreementUrl,
|
|
|
- h.name NowFinance,h.contact_mobile NowFinanceMobile,a.additional_order additionalOrder,i.name as oldSalesmanName, i.contact_mobile oldSalesmanMobile
|
|
|
+ h.name NowFinance,h.contact_mobile NowFinanceMobile,a.additional_order additionalOrder,i.name as oldSalesmanName, i.contact_mobile oldSalesmanMobile,
|
|
|
+ a.service_content serviceContent
|
|
|
from t_order_new a left join `user` b on a.buyer_id=b.id left join admin i on a.old_salesman_id=i.id
|
|
|
left join admin c on a.salesman_id=c.id left join department dep on a.order_dep=dep.id
|
|
|
left join admin d on a.finance_id=d.id left join admin h on dep.finance_id=h.id
|
|
|
@@ -1388,18 +1397,15 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</update>
|
|
|
|
|
|
<select id="selectArrearsDunListByPage" resultType="com.goafanti.order.bo.OutArrearsDunListBo">
|
|
|
- select a.id, b.contract_no contractNo,a.order_no as orderNo,c.nickname as userName,tm.salesman_name as salesmanName,
|
|
|
- b.project_status projectStatus, b.total_amount as totalAmount,b.liquidation_status as liquidationStatus,a.`type`,
|
|
|
- b.settlement_amount as settlementAmount, a.order_receivables orderReceivables,a.order_arrears as orderArrears,
|
|
|
- b.order_status as orderStatus, date_format(a.start_time, '%Y-%m-%d %H:%i:%s') as startDate,dep.name as depName,
|
|
|
- date_format(b.sign_time,'%Y-%m-%d') as signDate,a.dun_status dunStatus ,x.commodity_name commodityName,
|
|
|
- date_format(tla.create_time , '%Y-%m-%d %H:%i:%s')legalTimes from t_arrears_dun a
|
|
|
- left join t_order_new b on a.order_no=b.order_no left join `user` c on b.buyer_id=c.id
|
|
|
- left join t_order_mid tm on b.order_no=tm.order_no left join department dep on b.order_dep=dep.id
|
|
|
- left join (select order_no ,create_time from t_order_legal_affairs where type in(3,4)) tla on b.order_no =tla.order_no
|
|
|
- left join (select order_no ,commodity_name from t_order_task where main =1 and split_status in(0,1))x on b.order_no =x.order_no
|
|
|
- where b.delete_sign in(0,2) and dun_status in (1,2,3)
|
|
|
- <if test="shiroType == 1 and fid !=null">
|
|
|
+select a.id, b.contract_no contractNo,a.order_no as orderNo,c.nickname as userName,tm.salesman_name as salesmanName,
|
|
|
+ b.project_status projectStatus, b.total_amount as totalAmount,b.liquidation_status as liquidationStatus,a.`type`,
|
|
|
+ b.settlement_amount as settlementAmount, a.order_receivables orderReceivables,a.order_arrears as orderArrears,
|
|
|
+ b.order_status as orderStatus, date_format(a.start_time, '%Y-%m-%d %H:%i:%s') as startDate,dep.name as depName,
|
|
|
+ date_format(b.sign_time,'%Y-%m-%d') as signDate,a.dun_status dunStatus from t_arrears_dun a
|
|
|
+ left join t_order_new b on a.order_no=b.order_no left join `user` c on b.buyer_id=c.id
|
|
|
+ left join t_order_mid tm on b.order_no=tm.order_no left join department dep on b.order_dep=dep.id
|
|
|
+ where b.delete_sign != 1 and dun_status in (1,2,3)
|
|
|
+ <if test="shiroType == 1 and fid !=null">
|
|
|
and tm.finance_id= #{fid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="shiroType == 2 and fid !=null">
|
|
|
@@ -1438,7 +1444,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
select count(*) from t_arrears_dun a
|
|
|
left join t_order_new b on a.order_no=b.order_no left join `user` c on b.buyer_id=c.id
|
|
|
left join t_order_mid tm on b.order_no=tm.order_no left join department dep on b.order_dep=dep.id
|
|
|
- where b.delete_sign in(0,2) and dun_status in (1,2,3)
|
|
|
+ where b.delete_sign != 1 and dun_status in (1,2,3)
|
|
|
<if test="shiroType == 1 and fid !=null">
|
|
|
and tm.finance_id= #{fid,jdbcType=VARCHAR}
|
|
|
</if>
|