zxf 2023-04-19 22:42:36 +08:00
parent 988f6f99ab
commit adba47fdb4
11 changed files with 178 additions and 8 deletions

View File

@ -31,6 +31,7 @@
<div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div> <div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div>
<div field="sanjiuba" width="60" align="center" header="398(b3)"></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="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2+b3)"></div>
<div field="sjbbl" width="60" align="center" header="398转化比(b3/a)"></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

@ -31,6 +31,7 @@
<div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div> <div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div>
<div field="sanjiuba" width="60" align="center" header="398(b3)"></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="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2+b3)"></div>
<div field="sjbbl" width="60" align="center" header="398转化比(b3/a)"></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
#Mon Apr 03 21:21:37 CST 2023 #Wed Apr 19 22:20:25 CST 2023
deploystamp=1612237236000 deploystamp=1612237236000

View File

@ -31,6 +31,7 @@
<div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div> <div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div>
<div field="sanjiuba" width="60" align="center" header="398(b3)"></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="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2+b3)"></div>
<div field="sjbbl" width="60" align="center" header="398转化比(b3/a)"></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

@ -222,16 +222,22 @@ public class ZqlAction {
+ " and operate_date<='" + rushtimeend + " 23:59:59'"; + " and operate_date<='" + rushtimeend + " 23:59:59'";
} }
if(ifjy!=null){ if(ifjy!=null){
sqljy=" and u.is_tuifei="+ifjy; if(ifjy.equals("1")){
ifjy=0;
}
else{
ifjy=1;
}
sqljy=" and ISJISUAN="+ifjy;
} }
if(ifmz!=null){ if(ifmz!=null){
sqlmz=" and u.ifmz="+ifmz; sqlmz=" and IFMZ="+ifmz;
} }
if( custtype!=null){ if( custtype!=null){
sqlcusttype=" and ISSERVICE="+custtype; sqlcusttype=" and CUSTTYPE="+custtype;
} }
/* String sql = "\n" + /* String sql = "\n" +
"select num,count(1) sl, sum( case when jftime is not null then 1 else 0 end ) jfsl," + "select num,count(1) sl, sum( case when jftime is not null then 1 else 0 end ) jfsl," +
@ -254,18 +260,18 @@ public class ZqlAction {
" sum ( case when kphjje='300.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," +
" sum ( case when kphjje='398.00' and jftime is not null then 1 else 0 end) sanjiuba," + " sum ( case when kphjje='398.00' and jftime is not null then 1 else 0 end) sanjiuba," +
" 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='300.00' and jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' tgbl," +
" round(sum(case when kphjje='398.00' and jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' sjbbl," +
" 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" + " 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 " +
" from (" + " from (" +
" select obj_id,injf,cust_type custtype,ifmz from (" + " select obj_id,injf,cust_type custtype,ifmz from (" +
" select obj_id,count(1) from rush_log where action='rushfee'" + dateString+ " select obj_id,count(1) from rush_log where action='rushfee'" + dateString+sqlcusttype+sqlmz+sqljy+
" group by obj_id ) x left join view_info y on x.obj_id=y.id ) a " + " group by obj_id ) x left join view_info y on x.obj_id=y.id ) a " +
" left join rush_record b on a.obj_id=b.id " + " left join rush_record b on a.obj_id=b.id " +
" left join ( select addtime,kpxm,kphjje,ghf_custid from einvoice_fpkjxx_fptxx where to_char(addtime,'yyyy-mm-dd')>='"+jftime+"' and to_char(addtime,'yyyy-mm-dd')<= '"+jftimeend+"') c on b.customer_id=c.ghf_custid" + " left join ( select addtime,kpxm,kphjje,ghf_custid from einvoice_fpkjxx_fptxx where to_char(addtime,'yyyy-mm-dd')>='"+jftime+"' and to_char(addtime,'yyyy-mm-dd')<= '"+jftimeend+"') c on b.customer_id=c.ghf_custid" +
" left join customer_info u on b.customer_id=u.customer_id " +
" where 1=1 " +sqlcusttype+sqlmz+sqljy+
" " + " " +
" ) group by num order by num "; " ) group by num order by num ";
return DbHelper.getDbService().queryPageMapList(sql, params); return DbHelper.getDbService().queryPageMapList(sql, params);

View File

@ -857,7 +857,10 @@ public class AccountAction {
param_log.put("obj_id", obj_id); param_log.put("obj_id", obj_id);
param_log.put("OPERATOR_CODE", operator); param_log.put("OPERATOR_CODE", operator);
param_log.put("info", feedback_type);//反馈结果记录到info中 param_log.put("info", feedback_type);//反馈结果记录到info中
param_log.put("source", "1"); param_log.put("custtype", custtype);
param_log.put("injf", injf);
param_log.put("ifmz", ifmz);
param_log.put("source", "1");
DbHelper.getDbService().updateById("rushfee_record.saveLog", param_log); DbHelper.getDbService().updateById("rushfee_record.saveLog", param_log);
//修改任务完成进度2018-02-26新添加保存逻辑_zyc //修改任务完成进度2018-02-26新添加保存逻辑_zyc
// finishTaskById(params); // finishTaskById(params);

View File

@ -0,0 +1,158 @@
package rush;
import com.aisino.aosplus.core.dao.DbHelper;
import com.aisino.aosplus.core.mvc.bean.Params;
import com.aisino.aosplus.core.util.Guid;
import com.aisino.aosplus.plugin.job.BaseJob;
import com.aisino.aosplus.plugin.job.Job;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Job("0 0 23 * * ?")
public class UpdateEnddateJobByZxf extends BaseJob {
/* 该方法定每半个小时 查询分公司对异常客户如果已缴费自动更新为已完成状态*/
public void execute() {
/* String sqlupdateString="select \"id\" from \"deletetable\"";
List<Map> ten= DbHelper.getDbService().queryMapList(sqlupdateString);
if(ten.size()!=0){
for(int i=0;i<ten.size();i++){
String sqldelete="delete from excustomer_info where id="+ten.get(i).get("id");
String sqldeletelog="delete from ex_log where obj_id="+ten.get(i).get("id");
String sqldeleteString="delete from \"deletetable\" where \"id\"="+ten.get(i).get("id");
DbHelper.getDbService().beginTransaction();
DbHelper.getDbService().update(sqldeletelog);
DbHelper.getDbService().update(sqldelete);
DbHelper.getDbService().update(sqldeleteString);
DbHelper.getDbService().commit();*/
SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date create_Date = new Date();
String create_date=sdf.format(create_Date);
//先查询一下有多少需要更新状态为已完成
List<Map> updatenum= DbHelper.getDbService().queryMapList("select * from excustomer_info where state != 1 and customer_id in (select customer_id from rush_task_center where user_id='472775138282575026' )");
if(updatenum.size()!=0){
for(int i=0;i<updatenum.size();i++){
Map map = DbHelper.getDbService("oracle_crm").queryMap("select CRM_Get_Cust_Max_EndDate(t.org_customer_id) CRM_END_DATE from CUS_ORG_CUSTOMER t"
+ " where t.org_customer_id=? and rownum=1", updatenum.get(i).get("customer_id"));
if(map!=null) {
Date crmEndDate = (Date) map.get("crm_end_date");
DateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
if (crmEndDate != null) {
String strDate = dateFormat.format(crmEndDate);
DbHelper.getDbService().commit();
// DbHelper.getDbService().update("update dian set end_date=? where customer_id=?", strDate.substring(0,10), list.get(i).get("customer_id"));
// DbHelper.getDbService().update("update zhao set rush_name=? where customer_id=?", strDate.substring(0,10), list.get(i).get("customer_id"));
DbHelper.getDbService().commit();
}
}
//首先更新异常数据列表的数据状态为已处理 并且要回到任务中心
String sqldelete="delete from rush_task_center where user_id='472775138282575026' and customer_id="+updatenum.get(i).get("customer_id");
DbHelper.getDbService().update(sqldelete);
String sqlString="update excustomer_info set state="+1+",CUTSTYPE="+0+",RUSTYPE='客户已缴费',dealtime='"+create_date+"' where customer_id="+updatenum.get(i).get("customer_id");
DbHelper.getDbService().update(sqlString);
// 接下来需要向日志表里插入操作记录
Params insertlog=new Params();
String idString= Guid.g();
insertlog.put("cust_type", updatenum.get(i).get("cust_type"));
insertlog.put("id", idString);
insertlog.put("obj_id", updatenum.get(i).get("id"));
insertlog.put("action", "save");
insertlog.put("info", "客户已缴费");
insertlog.put("create_name", "系统定时");
insertlog.put("create_date", create_date);
insertlog.put("miaoshu", "定时任务同步");
insertlog.put("remark","系统定时保存客户已缴费企业");
String sqlStringlog="insert into ex_log (id,create_name,create_date,info,action,obj_id,cust_type,remark,miaoshu)"
+" values ('{id}','{create_name}','{create_date}','{info}','{action}','{obj_id}','{cust_type}','{remark}','{miaoshu}') ";
DbHelper.getDbService().update(sqlStringlog,insertlog);
}
} else{
System.out.print(create_date+ "无可同步数据");
}
}}
/*
*
*
*
* */
/* String sqlupdateString=" select customerid,cust_name,cust_tax_code,org_name,org_id,revenuename,revenueid,end_datechr,feedback_type,invoice_addr,legal_person,lianxiren from v_ceshi where count>9 and end_datechr<='2019-01-31' and customerid not in (select customer_id from excustomer_info )";
List<Map> ten= DbHelper.getDbService().queryMapList(sqlupdateString);
if(ten.size()!=0){
for(int i=0;i<ten.size();i++){
Params insertex=new Params();
String idString=Guid.g();
insertex.put("id", idString);
insertex.put("customer_id", ten.get(i).get("customerid"));
insertex.put("cust_name", ten.get(i).get("cust_name"));
insertex.put("cust_tax_code", ten.get(i).get("cust_tax_code"));
insertex.put("feedback", ten.get(i).get("feedback_type"));
insertex.put("end_date", ten.get(i).get("end_datechr"));
insertex.put("create_date", create_date);
insertex.put("cust_type", "1");
insertex.put("state","0");
insertex.put("org_name", ten.get(i).get("org_name"));
insertex.put("org_id", ten.get(i).get("org_id"));
insertex.put("revenuename", ten.get(i).get("revenuename"));
insertex.put("invoice_addr", ten.get(i).get("invoice_addr"));
insertex.put("legal_person", ten.get(i).get("legal_person"));
insertex.put("contacts_info", ten.get(i).get("lianxiren"));
String sqlStringex="insert (id,customer_id,cust_name,cust_tax_code, feedback,end_date,create_date,cust_type,state,org_id,org_name,revenueid,revenuename,invoice_addr,legal_person,contacts_info)"
+" values ('{id}','{customer_id}','{cust_name}','{cust_tax_code}','{feedback}','{end_date}','{create_date}','{cust_type}','{state}','{org_id}','{org_name}','{revenueid}','{revenuename}','{invoice_addr}','{legal_person}','{contacts_info}') ";
DbHelper.getDbService().update(sqlStringex,insertex);
Params insertlog=new Params();
String id=Guid.g();
insertlog.put("id", id);
insertlog.put("create_date",create_date);
insertlog.put("create_name","系统导入" );
insertlog.put("remark", "批量导入十次以上");
insertlog.put("obj_id", idString);
insertlog.put("cust_type", "1");
insertlog.put("info",ten.get(i).get("feedback_type"));
insertlog(insertlog);
}
}else {
System.out.print("无可同步的十次以上的数据");
}
}
public void insertlog(Params params){
String sqlString="insert into ex_log (id,create_name,create_date,action,remark,obj_id,info,cust_type)"
+" values ('{id}','{create_name}','{create_date}','rush','{remark}','{obj_id}','{info}','{cust_type}') ";
DbHelper.getDbService().update(sqlString,params);
}*/