|
@@ -607,7 +607,13 @@
|
|
|
a.service_project serviceProject,o.examine_name examineName,toa.type,toa.type_explain typeExplain
|
|
a.service_project serviceProject,o.examine_name examineName,toa.type,toa.type_explain typeExplain
|
|
|
from t_order_new o left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
from t_order_new o left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
left join (select * from t_order_outsource where type=0) too on o.order_no=too.order_no
|
|
left join (select * from t_order_outsource where type=0) too on o.order_no=too.order_no
|
|
|
- inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
|
|
|
|
|
|
|
+ <if test="type !=null">
|
|
|
|
|
+ inner join
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="type ==null">
|
|
|
|
|
+ left join
|
|
|
|
|
+ </if>
|
|
|
|
|
+ (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
|
|
|
from t_order_approval
|
|
from t_order_approval
|
|
|
<if test="type !=null">
|
|
<if test="type !=null">
|
|
|
where `type` in
|
|
where `type` in
|
|
@@ -704,6 +710,16 @@
|
|
|
<select id="financeCount" parameterType="Map" resultType="java.lang.Integer">
|
|
<select id="financeCount" parameterType="Map" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id
|
|
select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id
|
|
|
left join department d on o.order_dep = d.id left join t_order_mid a on o.order_no=a.order_no
|
|
left join department d on o.order_dep = d.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
|
|
+ <if test="type !=null">
|
|
|
|
|
+ inner join
|
|
|
|
|
+ (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
|
|
|
|
|
+ from t_order_approval
|
|
|
|
|
+ where `type` in
|
|
|
|
|
+ <foreach collection="type" item="item" separator="," open="(" close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ group by order_no) toa on o.order_no=toa.order_no
|
|
|
where delete_sign in(0,2) and o.approval in(0,1,2,4,5,7,8) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
where delete_sign in(0,2) and o.approval in(0,1,2,4,5,7,8) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
<if test="o.processStatus == 3">
|
|
<if test="o.processStatus == 3">
|
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
@@ -1299,6 +1315,16 @@
|
|
|
select IFNULL( sum(o.settlement_amount),0) actuallyTotalAmount,IFNULL(sum(o.total_amount),0) signTotalAmount
|
|
select IFNULL( sum(o.settlement_amount),0) actuallyTotalAmount,IFNULL(sum(o.total_amount),0) signTotalAmount
|
|
|
from t_order_new o
|
|
from t_order_new o
|
|
|
left join department d on o.order_dep=d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
left join department d on o.order_dep=d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
|
|
+ <if test="type !=null">
|
|
|
|
|
+ inner join
|
|
|
|
|
+ (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
|
|
|
|
|
+ from t_order_approval
|
|
|
|
|
+ where `type` in
|
|
|
|
|
+ <foreach collection="type" item="item" separator="," open="(" close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ group by order_no) toa on o.order_no=toa.order_no
|
|
|
where o.delete_sign in(0,2,3) and o.approval in(0,1,2,4,5,7,8) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
where o.delete_sign in(0,2,3) and o.approval in(0,1,2,4,5,7,8) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
<if test="o.processStatus == 3">
|
|
<if test="o.processStatus == 3">
|
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|