Explorar el Código

客户档案资料费查询换成class

hu hace 5 meses
padre
commit
d73496a59c

+ 6 - 6
src/custom/restcontroller/webmanage/sale/period/SQL/获取暂存账户数据.sql

@@ -12,7 +12,7 @@ with
         select t3.agentnum fagentnum,t1.amount  from sa_cashbill  t1
                                                          inner join  sa_accountclass t2 on t1.sa_accountclassid=t2.sa_accountclassid
                                                          left join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid
-        where t1.status='审核' and t1.type=0 and  t2.accountno='01' and t1.subclass='客户档案资料费'
+        where t1.status='审核' and t1.type=0 and  t2.accountno='01' and t1.class='客户档案资料费'
           and t1.checkdate>=  DATE_FORMAT($begindate$, '%Y-01-01')
           and t1.checkdate < $enddate$
     ),
@@ -21,7 +21,7 @@ with
                                                          inner join  sa_accountclass t2 on t1.sa_accountclassid=t2.sa_accountclassid
                                                          left join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid
 
-        where t1.status='审核' and  t1.type=1 and  t2.accountno='01' and  t1.subclass = '客户档案资料费'
+        where t1.status='审核' and  t1.type=1 and  t2.accountno='01' and  t1.class = '客户档案资料费'
 
           and  t1.checkdate>=  DATE_FORMAT($begindate$, '%Y-01-01')
           and  t1.checkdate < $enddate$
@@ -30,7 +30,7 @@ with
         select t3.agentnum fagentnum,t1.amount  from sa_cashbill t1
                                                          inner join  sa_accountclass t2 on t1.sa_accountclassid=t2.sa_accountclassid
                                                          left join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid
-        where t1.status='审核' and  t1.type=1 and  t2.accountno='01' and  t1.subclass = '客户档案资料费'  and
+        where t1.status='审核' and  t1.type=1 and  t2.accountno='01' and  t1.class = '客户档案资料费'  and
 
           and  t1.checkdate>= $begindate$
           and  t1.checkdate <= $enddate$
@@ -40,7 +40,7 @@ with
         select t3.agentnum fagentnum,t1.amount  from sa_cashbill t1
                                                          inner join  sa_accountclass t2 on t1.sa_accountclassid=t2.sa_accountclassid
                                                          left join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid
-        where t1.status='审核' and  t2.accountno='01' and t1.subclass='客户档案资料费' and t1.ftype=0
+        where t1.status='审核' and  t2.accountno='01' and t1.class='客户档案资料费' and t1.ftype=0
           and  t1.checkdate>= $begindate$
           and  t1.checkdate <= $enddate$
     ),
@@ -48,7 +48,7 @@ with
         select t3.agentnum fagentnum,t1.amount  from sa_cashbill t1
                                                          inner join  sa_accountclass t2 on t1.sa_accountclassid=t2.sa_accountclassid
                                                          left join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid
-        where t1.type =1 and t1.status ='审核' and t2.accountno='01' and ifnull(t1.subclass,'') != '客户档案资料费'
+        where t1.type =1 and t1.status ='审核' and t2.accountno='01' and ifnull(t1.class,'') != '客户档案资料费'
     and  t1.billdate>= $begindate$
     and  t1.billdate <= $enddate$
     ),
@@ -58,7 +58,7 @@ with
 select t3.agentnum fagentnum,t1.amount  from sa_cashbill t1
     inner join  sa_accountclass t2 on t1.sa_accountclassid=t2.sa_accountclassid
     left join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid
-where t1.type =1  and t1.status ='审核' and  t2.accountno='01' and ifnull(t1.subclass,0) != '客户档案资料费'
+where t1.type =1  and t1.status ='审核' and  t2.accountno='01' and ifnull(t1.class,0) != '客户档案资料费'
   and t1.billdate>= DATE_FORMAT($begindate$, '%Y-01-01')
   and  t1.billdate < $enddate$
     ),