|
|
@@ -859,6 +859,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
group by order_no) toa on a.order_no=toa.order_no
|
|
|
+ where 1=1
|
|
|
<include refid="selectOrderNewSql"/>
|
|
|
order by
|
|
|
<if test="specially == 3">
|
|
|
@@ -1228,13 +1229,17 @@
|
|
|
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,
|
|
|
a.service_content serviceContent,a.examine_name examineName, tht.knowledge_services knowledgeServices, tht.audit_services auditServices,c.manager_id managerId,
|
|
|
- tht.add_deduction_services addDeductionServices, tht.knowledge_other knowledgeOther, tht.audit_other auditOther, tht.add_deduction_other addDeductionOther
|
|
|
+ tht.add_deduction_services addDeductionServices, tht.knowledge_other knowledgeOther, tht.audit_other auditOther, tht.add_deduction_other addDeductionOther,
|
|
|
+ toa.type,toa.type_explain typeExplain
|
|
|
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
|
|
|
- left join t_order_back e on a.order_no=e.order_no and e.back_status=0
|
|
|
- left join admin f on e.initiate=f.id left join organization_identity g on a.buyer_id=g.uid
|
|
|
- left join t_order_high_tech tht on a.order_no=tht.order_no
|
|
|
+ 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
|
|
|
+ left join t_order_back e on a.order_no=e.order_no and e.back_status=0
|
|
|
+ left join admin f on e.initiate=f.id left join organization_identity g on a.buyer_id=g.uid
|
|
|
+ left join t_order_high_tech tht on a.order_no=tht.order_no
|
|
|
+ left join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
|
|
|
+ from t_order_approval where order_no=#{orderNo,jdbcType=VARCHAR}
|
|
|
+ group by order_no) toa on a.order_no=toa.order_no
|
|
|
where a.order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
|