|
|
@@ -1622,7 +1622,7 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
case a.sales_type when 6 then 1 else 0 end gxfg,
|
|
|
case a.sales_type when 7 then 1 else 0 end qtfg
|
|
|
from t_order_new a left join department b on a.order_dep =b.id
|
|
|
- where a.delete_sign in (0,2) and a.process_status > 4
|
|
|
+ where a.delete_sign in (0,2) and a.process_status > 0
|
|
|
<if test=" startDate !=null and endDate != null">
|
|
|
and a.create_time between #{startDate} and #{endDate}
|
|
|
</if>
|
|
|
@@ -1634,10 +1634,10 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
</if>
|
|
|
)x group by x.province)y left join district_glossory dg on y.province=dg.id
|
|
|
<if test=" sort ==0">
|
|
|
- order by y.total_amount
|
|
|
+ order by y.total_amount desc
|
|
|
</if>
|
|
|
<if test=" sort ==1">
|
|
|
- order by y.counts
|
|
|
+ order by y.counts desc
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
@@ -1649,13 +1649,50 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
a.sales_type salesType, a.channel_id channelId ,a.other
|
|
|
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
|
|
|
- where a.delete_sign in(0,2) and a.process_status >4
|
|
|
+ where a.delete_sign in(0,2) and a.process_status >0
|
|
|
<if test="province !=null ">
|
|
|
and dep.province = #{province}
|
|
|
</if>
|
|
|
<if test="salesType !=null ">
|
|
|
and a.sales_type = #{salesType}
|
|
|
</if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="contractNo != null">
|
|
|
+ and a.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="liquidationStatus != null">
|
|
|
+ and a.liquidation_status = #{liquidationStatus,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="approval ==0">
|
|
|
+ and a.approval = 0
|
|
|
+ </if>
|
|
|
+ <if test="approval ==1">
|
|
|
+ and a.process_status = 7
|
|
|
+ and a.approval = 1
|
|
|
+ </if>
|
|
|
+ <if test="approval ==2">
|
|
|
+ and a.approval > 1
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 0">
|
|
|
+ and a.total_amount < 10
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 1">
|
|
|
+ and a.total_amount between 10 and 20
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 2">
|
|
|
+ and a.total_amount between 20 and 30
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 3">
|
|
|
+ and a.total_amount between 30 and 40
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 4">
|
|
|
+ and a.total_amount > 40
|
|
|
+ </if>
|
|
|
order by a.create_time desc
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
@@ -1672,5 +1709,42 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<if test="salesType !=null ">
|
|
|
and a.sales_type = #{salesType}
|
|
|
</if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="contractNo != null">
|
|
|
+ and a.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="liquidationStatus != null">
|
|
|
+ and a.liquidation_status = #{liquidationStatus,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="approval ==0">
|
|
|
+ and a.approval = 0
|
|
|
+ </if>
|
|
|
+ <if test="approval ==1">
|
|
|
+ and a.process_status = 7
|
|
|
+ and a.approval = 1
|
|
|
+ </if>
|
|
|
+ <if test="approval ==2">
|
|
|
+ and a.approval > 1
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 0">
|
|
|
+ and a.total_amount < 10
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 1">
|
|
|
+ and a.total_amount between 10 and 20
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 2">
|
|
|
+ and a.total_amount between 20 and 30
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 3">
|
|
|
+ and a.total_amount between 30 and 40
|
|
|
+ </if>
|
|
|
+ <if test="amountStatus == 4">
|
|
|
+ and a.total_amount > 40
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|