回访次数统计

master
zxf 2023-04-06 20:33:44 +08:00
parent eb7089170e
commit 988f6f99ab
7 changed files with 12 additions and 8 deletions

View File

@ -29,7 +29,8 @@
<div field="sl" width="60" align="center" header="回访客户量(a)"></div> <div field="sl" width="60" align="center" header="回访客户量(a)"></div>
<div field="fwf" width="60" align="center" header="服务费当日缴费量(b1)"></div> <div field="fwf" width="60" align="center" header="服务费当日缴费量(b1)"></div>
<div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div> <div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div>
<div field="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2)"></div> <div field="sanjiuba" width="60" align="center" header="398(b3)"></div>
<div field="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2+b3)"></div>
<div field="tgbl" width="60" align="center" header="托管转化比(b2/a)"></div> <div field="tgbl" width="60" align="center" header="托管转化比(b2/a)"></div>
<div field="jfbl" width="60" align="center" header="收取比(b/a)"></div> <div field="jfbl" width="60" align="center" header="收取比(b/a)"></div>
</div> </div>

View File

@ -29,7 +29,8 @@
<div field="sl" width="60" align="center" header="回访客户量(a)"></div> <div field="sl" width="60" align="center" header="回访客户量(a)"></div>
<div field="fwf" width="60" align="center" header="服务费当日缴费量(b1)"></div> <div field="fwf" width="60" align="center" header="服务费当日缴费量(b1)"></div>
<div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div> <div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div>
<div field="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2)"></div> <div field="sanjiuba" width="60" align="center" header="398(b3)"></div>
<div field="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2+b3)"></div>
<div field="tgbl" width="60" align="center" header="托管转化比(b2/a)"></div> <div field="tgbl" width="60" align="center" header="托管转化比(b2/a)"></div>
<div field="jfbl" width="60" align="center" header="收取比(b/a)"></div> <div field="jfbl" width="60" align="center" header="收取比(b/a)"></div>
</div> </div>

View File

@ -1,3 +1,3 @@
#save ini #save ini
#Sun Mar 19 23:25:21 CST 2023 #Mon Apr 03 21:21:37 CST 2023
deploystamp=1612237236000 deploystamp=1612237236000

View File

@ -29,7 +29,8 @@
<div field="sl" width="60" align="center" header="回访客户量(a)"></div> <div field="sl" width="60" align="center" header="回访客户量(a)"></div>
<div field="fwf" width="60" align="center" header="服务费当日缴费量(b1)"></div> <div field="fwf" width="60" align="center" header="服务费当日缴费量(b1)"></div>
<div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div> <div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div>
<div field="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2)"></div> <div field="sanjiuba" width="60" align="center" header="398(b3)"></div>
<div field="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2+b3)"></div>
<div field="tgbl" width="60" align="center" header="托管转化比(b2/a)"></div> <div field="tgbl" width="60" align="center" header="托管转化比(b2/a)"></div>
<div field="jfbl" width="60" align="center" header="收取比(b/a)"></div> <div field="jfbl" width="60" align="center" header="收取比(b/a)"></div>
</div> </div>

View File

@ -249,11 +249,12 @@ public class ZqlAction {
" left join ( select addtime,kpxm,kphjje,ghf_custid from einvoice_fpkjxx_fptxx where to_charaddtime,'yyyy-mm-dd'>='"+jftime+"') c on b.customer_id=c.ghf_custid" + " left join ( select addtime,kpxm,kphjje,ghf_custid from einvoice_fpkjxx_fptxx where to_charaddtime,'yyyy-mm-dd'>='"+jftime+"') c on b.customer_id=c.ghf_custid" +
" left join customer_info u on b.customer_id=u.customer_id where 1=1 "+sqljy+sqlmz +") group by num order by num ";*/ " left join customer_info u on b.customer_id=u.customer_id where 1=1 "+sqljy+sqlmz +") group by num order by num ";*/
String sql="select num ,count(1) sl, sum( case when jftime is not null then 1 else 0 end ) jfsl," + String sql="select num ,count(1) sl, sum( case when (kphjje='280.00' or kphjje='300.00' or kphjje='398.00' ) and jftime is not null then 1 else 0 end ) jfsl," +
" sum( case when kphjje='280.00' and jftime is not null then 1 else 0 end ) fwf , " + " sum( case when kphjje='280.00' and jftime is not null then 1 else 0 end ) fwf , " +
" sum ( case when kphjje!='280.00' and jftime is not null then 1 else 0 end) tg," + " sum ( case when kphjje='300.00' and jftime is not null then 1 else 0 end) tg," +
" round(sum(case when kphjje!='280.00' and jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' tgbl," + " sum ( case when kphjje='398.00' and jftime is not null then 1 else 0 end) sanjiuba," +
" round(sum(case when jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' jfbl" + " round(sum(case when kphjje='300.00' and jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' tgbl," +
" round(sum(case when (kphjje='280.00' or kphjje='300.00' or kphjje='398.00' ) and jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' jfbl" +
" from (" + " from (" +
" select to_char(c.addtime,'yyyy-mm-dd') jftime ,c.kpxm ,c.kphjje ," + " select to_char(c.addtime,'yyyy-mm-dd') jftime ,c.kpxm ,c.kphjje ," +
" (select count(1) from rush_log where obj_id=b.id ) num ,a.custtype " + " (select count(1) from rush_log where obj_id=b.id ) num ,a.custtype " +