|
|
@@ -1277,10 +1277,10 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
where order_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
|
|
|
- select a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,a.contract_no as contractNo,
|
|
|
- b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,a.order_status as orderStatus,
|
|
|
- a.liquidation_status as liquidationStatus,a.approval,c.salesman_name as salesmanName,dep.name as depName,c.finance_name as financeName,
|
|
|
- c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount
|
|
|
+ select a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,
|
|
|
+ a.contract_no as contractNo, b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,
|
|
|
+ a.order_status as orderStatus, a.liquidation_status as liquidationStatus,a.approval,c.salesman_name as salesmanName,
|
|
|
+ dep.name as depName,c.finance_name as financeName,c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount
|
|
|
<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>
|
|
|
@@ -1289,9 +1289,6 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</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 == 1">
|
|
|
- left join admin ad on a.salesman_id=ad.id
|
|
|
- </if>
|
|
|
<if test="specially == 2">
|
|
|
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
|
|
|
@@ -1312,8 +1309,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</if>
|
|
|
<if test="specially == 1">
|
|
|
and a.process_status = 1 and a.order_status = 1
|
|
|
- <!-- and c.department_id in (#{deps,jdbcType=VARCHAR}) -->
|
|
|
- and ad.department_id in
|
|
|
+ and a.order_dep in
|
|
|
<foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
#{deps.id}
|
|
|
</foreach>
|
|
|
@@ -1410,11 +1406,8 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
select count(*)
|
|
|
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 == 1">
|
|
|
- left join admin ad on a.salesman_id=ad.id
|
|
|
- </if>
|
|
|
where a.delete_sign !=1
|
|
|
- <if test="outsource != null">
|
|
|
+ <if test="outsource != null">
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="specially == 0">
|
|
|
@@ -1424,7 +1417,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="specially == 1">
|
|
|
and a.process_status = 1 and a.order_status = 1
|
|
|
<!-- and c.department_id in (#{deps,jdbcType=VARCHAR}) -->
|
|
|
- and ad.department_id in
|
|
|
+ and a.order_dep in
|
|
|
<foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
#{deps.id}
|
|
|
</foreach>
|