|
|
@@ -1100,7 +1100,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
from t_order_dun a
|
|
|
</if>
|
|
|
<if test="newStatus == 1 ">
|
|
|
- a.project_type projectType,a.status dunStatus, a.dun_type dunType,a.appropriation_ratio appropriationRatio,
|
|
|
+ a.project_type projectType,a.status dunStatus, a.dun_type dunType,a.appropriation_ratio appropriationRatio,e.commodity_name commodityName,
|
|
|
e.set_up_amount setUpAmount,date_format(a.customize_time,'%Y-%m-%d') customizeTimes, a.customize_name customizeName
|
|
|
from new_order_dun a left join t_order_task e on a.tid=e.id
|
|
|
</if>
|
|
|
@@ -1388,15 +1388,18 @@ 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 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">
|
|
|
+ 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">
|
|
|
and tm.finance_id= #{fid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="shiroType == 2 and fid !=null">
|
|
|
@@ -1435,7 +1438,7 @@ select a.id, b.contract_no contractNo,a.order_no as orderNo,c.nickname as userNa
|
|
|
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 != 1 and dun_status in (1,2,3)
|
|
|
+ where b.delete_sign in(0,2) and dun_status in (1,2,3)
|
|
|
<if test="shiroType == 1 and fid !=null">
|
|
|
and tm.finance_id= #{fid,jdbcType=VARCHAR}
|
|
|
</if>
|