|
|
@@ -793,13 +793,14 @@
|
|
|
a.contract_picture_url contractPictureUrl, a.order_status as orderStatus, a.liquidation_status as liquidationStatus,
|
|
|
a.approval,c.salesman_name as salesmanName,c.project_type projectType,dep.name as depName,c.finance_name as financeName,
|
|
|
c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount,a.sales_type salesType, a.channel_id channelId ,
|
|
|
- a.other,a.examine_name examineName,c.stop_project stopProject
|
|
|
+ a.other,a.examine_name examineName,c.stop_project stopProject,toa.type,toa.type_explain typeExpalin
|
|
|
<if test="specially == 2">
|
|
|
,f.name as initiateName ,e.reason ,date_format(e.create_time,'%Y-%m-%d' ) as backDate,e.id as backId
|
|
|
</if>
|
|
|
<if test="specially == 4">
|
|
|
,e.receiver_name as consultantName,a.settlement_amount as settlementAmount,if(isnull(g.order_no)=0,1,0) ischange
|
|
|
</if>
|
|
|
+
|
|
|
from t_order_new a left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
|
|
|
left join department dep on a.order_dep=dep.id
|
|
|
<if test="specially == 2">
|
|
|
@@ -817,6 +818,15 @@
|
|
|
<if test="specially == 10">
|
|
|
left join admin mg on a.salesman_id=mg.id
|
|
|
</if>
|
|
|
+ inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
|
|
|
+ from t_order_approval
|
|
|
+ <if test="type !=null">
|
|
|
+ where `type` in
|
|
|
+ <foreach collection="type" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ group by order_no) toa on a.order_no=toa.order_no
|
|
|
where a.delete_sign in(0,2)
|
|
|
<include refid="selectOrderNewSql"/>
|
|
|
order by
|
|
|
@@ -1006,6 +1016,15 @@
|
|
|
<if test="specially == 10">
|
|
|
left join admin mg on a.salesman_id=mg.id
|
|
|
</if>
|
|
|
+ inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
|
|
|
+ from t_order_approval
|
|
|
+ <if test="type !=null">
|
|
|
+ where `type` in
|
|
|
+ <foreach collection="type" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ group by order_no) toa on a.order_no=toa.order_no
|
|
|
where a.delete_sign in(0,2)
|
|
|
<include refid="selectOrderNewSql"/>
|
|
|
|