فهرست منبع

业绩目标逻辑优化

hu 1 سال پیش
والد
کامیت
f2456c807f

+ 1 - 1
src/custom/restcontroller/webmanage/sale/salestarget/SQL/人员-目标详情列表.sql

@@ -152,4 +152,4 @@ from (
 								 left join sa_salearea t6 on t5.parentid = t6.sa_saleareaid and t5.siteid = t6.siteid
          group by  t6.sa_saleareaid,  t6.areafullname, t6.areaname) t
 where  ifnull(t.areaname,'')!='' and $where$
-order by areafullname, case when t.type = '区域' then 0 else 1 end
+order by  case when t.type = '区域汇总' then 0 else 1 end

+ 1 - 1
src/custom/restcontroller/webmanage/sale/salestarget/SQL/人员目标统计-出货.sql

@@ -110,4 +110,4 @@ from (
 								 left join sa_salearea t6 on t5.parentid = t6.sa_saleareaid and t5.siteid = t6.siteid
          group by  t6.sa_saleareaid,  t6.areafullname, t6.areaname) t
 where $where$
-order by areafullname, case when t.type = '区域' then 0 else 1 end
+order by  case when t.type = '区域汇总' then 0 else 1 end

+ 1 - 1
src/custom/restcontroller/webmanage/sale/salestarget/SQL/人员目标统计-开票.sql

@@ -99,4 +99,4 @@ from (
 								 left join sa_salearea t6 on t5.parentid = t6.sa_saleareaid and t5.siteid = t6.siteid
          group by  t6.sa_saleareaid,  t6.areafullname, t6.areaname) t
 where  $where$
-order by areafullname, case when t.type = '区域' then 0 else 1 end
+order by  case when t.type = '区域汇总' then 0 else 1 end

+ 1 - 1
src/custom/restcontroller/webmanage/sale/salestarget/SQL/人员目标统计-收款.sql

@@ -101,4 +101,4 @@ from (
 								 left join sa_salearea t6 on t5.parentid = t6.sa_saleareaid and t5.siteid = t6.siteid
          group by  t6.sa_saleareaid,  t6.areafullname, t6.areaname) t
 where $where$
-order by areafullname, case when t.type = '区域' then 0 else 1 end
+order by  case when t.type = '区域汇总' then 0 else 1 end

+ 1 - 1
src/custom/restcontroller/webmanage/sale/salestarget/SQL/人员目标统计-订单.sql

@@ -99,4 +99,4 @@ from (
 								 left join sa_salearea t6 on t5.parentid = t6.sa_saleareaid and t5.siteid = t6.siteid
          group by  t6.sa_saleareaid,  t6.areafullname, t6.areaname) t
 where  $where$
-order by areafullname, case when t.type = '区域' then 0 else 1 end
+order by  case when t.type = '区域汇总' then 0 else 1 end