|
|
@@ -1579,7 +1579,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</select>
|
|
|
|
|
|
<select id="getOrderNewDetail" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TOrderNewBo">
|
|
|
- select
|
|
|
+ select
|
|
|
a.order_no as orderNo, a.order_type as orderType, a.creater, a.create_time as createTime,a.update_time as updateTime, a.buyer_id as buyerId,
|
|
|
a.first_amount as firstAmount,a.total_amount as totalAmount, a.settlement_amount as settlementAmount, order_status as orderStatus,
|
|
|
a.liquidation_status as liquidationStatus, a.process_status as processStatus, a.project_status as projectStatus, a.approval,
|
|
|
@@ -1587,20 +1587,15 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
a.sign_time as signTime, a.settlement_time as settlementTime, a.contract_no as contractNo, a.contract_type as contractType, a.contacts,
|
|
|
a.contact_mobile as contactMobile, a.legal_person as legalPerson, a.legal_person_tel as legalPersonTel, a.proof_count as proofCount,
|
|
|
a.proof_aid as proofAid,contract_picture_url as contractPictureUrl, c.name as salesmanName,dep.name as depName,d.name as financeName,
|
|
|
- c.contact_mobile as salesmanMobile,d.contact_mobile as financeMobile,b.nickname as userName ,e.back_status as backStatus,f.name as initiateName,
|
|
|
+ c.contact_mobile as salesmanMobile,d.contact_mobile as financeMobile,b.username as userName ,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
|
|
|
- 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
|
|
|
+ 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 (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
|
|
|
- left join admin f on e.initiate=f.id
|
|
|
- left join organization_identity g on a.buyer_id=g.uid
|
|
|
+ left join admin f on e.initiate=f.id left join organization_identity g on a.buyer_id=g.uid
|
|
|
where a.order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
|