diff --git a/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/BureauAction.class b/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/BureauAction.class index ea82979..d0c8fa4 100644 Binary files a/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/BureauAction.class and b/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/BureauAction.class differ diff --git a/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/TaskDeleteJob.class b/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/TaskDeleteJob.class index c8a8dc3..50f771c 100644 Binary files a/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/TaskDeleteJob.class and b/classes/artifacts/rushfee_Web_exploded/WEB-INF/classes/rush/TaskDeleteJob.class differ diff --git a/resource/html/bureau/recording.html b/resource/html/bureau/recording.html index c8dc9fa..3feb1e3 100644 --- a/resource/html/bureau/recording.html +++ b/resource/html/bureau/recording.html @@ -203,9 +203,12 @@ } + + + function exportExl(){ var base = document.getElementsByTagName("base")[0].href; - window.location.href=base+"rush/bureau/exportRecoding?empno="+aos.get('empno').getValue()+"&searchbegindate="+aos.get('start_time').getFormValue()+"&searchenddate="+aos.get('end_time').getFormValue()+"&phone="+aos.get('phone').getValue()+"&calltype="+ encodeURI(encodeURI(aos.get('calltype').getValue()))+"&manyi="+ encodeURI(encodeURI(aos.get('manyidu').getValue()))+"&company="+ encodeURI(encodeURI(aos.get('company').getValue())); + window.location.href=base+"rush/bureau/exportRecoding?empno="+aos.get('empno').getValue()+"&searchbegindate="+aos.get('start_time').getFormValue()+"&searchenddate="+aos.get('end_time').getFormValue()+"&phone="+aos.get('phone').getValue()+"&calltype="+ encodeURI(encodeURI(aos.get('calltype').getValue()))+"&manyi="+ encodeURI(encodeURI(aos.get('manyidu').getValue()))+"&company="+ encodeURI(encodeURI(aos.get('company').getValue()))+"&custname="+ encodeURI(encodeURI(aos.get('custname').getValue()))+"&diqu="+ encodeURI(encodeURI(aos.get('diqu').getValue()))+"&problem="+ encodeURI(encodeURI(aos.get('problem').getValue()))+"&callstate="+ encodeURI(encodeURI(aos.get('callstate').getValue())); } diff --git a/src/rush/BureauAction.java b/src/rush/BureauAction.java index 846999e..1c08925 100644 --- a/src/rush/BureauAction.java +++ b/src/rush/BureauAction.java @@ -313,7 +313,7 @@ public class BureauAction { @Request.Get("exportRecoding") public void exportRecoding (Params params) throws UnsupportedEncodingException { - String searchbegindate = params.getString("searchbegindate"); + /* String searchbegindate = params.getString("searchbegindate"); String searchenddate = params.getString("searchenddate"); String phone = params.getString("phone"); String empno = params.getString("empno"); @@ -378,20 +378,179 @@ public class BureauAction { List resultMap = DbHelper.getDbService().queryMapList(sql + timeSql + typeSql + phoneSql + empnoSql + manyiSql, params); +*/ + + String searchbegindate = params.getString("searchbegindate"); + String searchenddate = params.getString("searchenddate"); + String phone = params.getString("phone"); + String empno = params.getString("empno"); + String calltype = params.getString("calltype"); + String manyi = params.getString("manyi"); + String company = params.getString("company"); + String custname = params.getString("custname"); + String diqu = params.getString("diqu"); + String callstate = params.getString("callstate"); + String problem = params.getString("problem"); + String timeSql = ""; + String typeSql = ""; + String phoneSql = ""; + String empnoSql = ""; + String manyiSql = ""; + String companySql = ""; + String custnameSql=""; + String diquSql=""; + String problemSql=""; + String callstateSql=""; + String pinjie=""; + String noRight=" CRM_SM_TEL_RECORD s "; + String right= + " ( select * from ( select CALLID ,PRODUCTNAME,CUSTOMER_ID,QUESTION_ID,\n" + + " QUESTION_ANSWER,CUSTOMER_NAME,CUSTOMER_TAX_ID,tel ,MOBILE ,PERSON_TEL, question_content,\n" + + " CONTACT,TEL_DATE ,TEL_PERSON,ENTRY_PERSON ,TEL_RECORD_ID,RECODER_ID,ENTRY_DATE,ORGID,ORGNAME,\n" + + " \n" + + " row_number() over ( PARTITION BY red.customer_id ORDER BY red.entry_date ) as rn from \n" + + " CRM_SM_TEL_RECORD red ) where rn=1 ) s"; + + String userId = SessionHelper.getCurrentUserId(); + params.put("userId", userId); + /* List returns = DbHelper.getDbService().queryMapListById("rushfee_org.getOrgListByUser", params); + StringBuffer sb = new StringBuffer(); + if (returns.size() != 0) { + sb.append("d.city_name in ("); + for (int i = 0; i < returns.size(); i++) { + sb.append("'" + returns.get(i).get("text") + "'"); + if (i < returns.size() - 1) { + sb.append(","); + } + } + sb.append(")"); + } else { + sb.append("1=2"); + }*/ + /*List diquList = DbHelper.getDbService().queryMapListById("orgname.getDiquListByUser", params); + StringBuffer dq = new StringBuffer(); + if (diquList.size() != 0) { + dq.append(" and" + + " ( s.ORGID in ("); + for (int i = 0; i < diquList.size(); i++) { + dq.append("'" + diquList.get(i).get("id") + "'"); + if (i < diquList.size() - 1) { + dq.append(","); + } + } + dq.append(") or s.ORGID is null ) "); + } else { + dq.append(" and 1=2"); + }*/ + //添加精准查询 + if (calltype != null) { + String[] callArrray = calltype.split(","); + + if (callArrray.length == 3) { + //分组查询 查全部 + pinjie=right; + } + if (callArrray.length == 2) { + if (calltype.contains("2")) { + if (calltype.contains("0")) { + typeSql = " and CALLERNO='12366'"; + } + if (calltype.contains("1")) { + typeSql = " and CALLERNO!='12366'"; + } + pinjie=right; + } else { + pinjie=noRight; + } + + } + + if (callArrray.length == 1) { + if (calltype.contains("2")) { + pinjie=right; + } + else{ + if (calltype.contains("0")) { + typeSql = " and CALLERNO='12366'"; + } + if (calltype.contains("1")) { + typeSql = " and CALLERNO!='12366'"; + } + pinjie=noRight; + } + } + + + + } + else{ + pinjie=noRight; + } + + String sql = " SELECT c.CALLID, c.CALLEENO,c.CALLERNO phone_num ,c.AGENTID emp_no,c.BEGINTIME start_time,c.ENDTIME end_time,to_char(c.BEGINTIME,'yyyy-mm-dd') create_time, " + + "c.SECONDS record_duration ,REGEXP_REPLACE( REGEXP_REPLACE(c.FILENAME,'Z:\\\\1',''),'\\\\','/') path ,decode(c.CALLTYPE,'0','呼入','1','呼出') call_type,c.NAME,s.TEL_RECORD_ID,s.RECODER_ID," + + "s.ENTRY_DATE,s.ORGID,s.ORGNAME orgname,d.city_name area_name,decode(c.satisfaction,'1','非常满意','2','满意','3','不满意','暂未评价') manyidu,s.PRODUCTNAME,s.CUSTOMER_ID,s.QUESTION_ID," + + "s.QUESTION_ANSWER,s.CUSTOMER_NAME,s.CUSTOMER_TAX_ID,s.tel ,s.MOBILE caller_phone,s.PERSON_TEL, s.question_content," + + "s.CONTACT,s.TEL_DATE ,s.TEL_PERSON,s.ENTRY_PERSON ,'播放' AS play ,'下载' as down FROM " + + "CALLSYS_TRECORDFAILINFO c left join tel_dic_city d on c.calleeno=d.callee_no " + + "LEFT JOIN "+pinjie+" ON c.CALLID = s.CALLID where 1=1 "; + + + if (searchbegindate != null && searchenddate != null) { + timeSql = " and to_char(c.BEGINTIME,'yyyy-mm-dd')>='" + searchbegindate + "' and to_char(c.BEGINTIME,'yyyy-mm-dd')<='" + searchenddate + "'"; + } + + if (phone != null) { + phoneSql = " and (s.MOBILE like '%" + phone + "%' or c.CALLERNO='" + phone + "')"; + } + if (empno != null) { + empnoSql = " and c.AGENTID like '%" + empno + "%'"; + } + if (manyi != null) { + if (manyi.equals("4")) { + manyiSql = " and c.satisfaction is null "; + } else { + manyiSql = " and c.satisfaction = '" + manyi + "'"; + } + + } + + if (company != null) { + companySql = " and d.city_name='" + company + "'"; + + } + if (custname != null) { + custnameSql = " and s.CUSTOMER_NAME like '%" + custname + "%'"; + + } + if (callstate != null) { + callstateSql = " and c.CALLTYPE='" + callstate + "'"; + } + + if (diqu != null) { + diquSql = " and s.ORGID='" + diqu + "'"; + + } + if (problem != null) { + problemSql = " and s.PRODUCTNAME='" + problem + "'"; + + } + + List resultMap = DbHelper.getDbService().queryMapList(sql + timeSql + typeSql + phoneSql + empnoSql + manyiSql + companySql+custnameSql+diquSql+problemSql+callstateSql, params); HttpServletResponse response = DataContext.getResponse(); - String fileName = "通话记录明细";// + String fileName = "通话记录明细"; String sheetName = "通话记录明细"; POIExcelMapExportUtil pee = new POIExcelMapExportUtil(response, fileName, sheetName); // Map Key属性 - String titleColumn1[] = {"emp_no", "name", "create_time", "phone_num", "start_time", "end_time", "record_duration", "call_type", "caller_phone", "customer_name", "question_content", "question_answer", "productname", "area_name", "manyidu"}; + String titleColumn1[] = {"emp_no", "name", "create_time", "phone_num", "start_time", "end_time", "record_duration", "call_type", "caller_phone", "customer_name", "question_content", "question_answer", "productname", "area_name", "orgname","manyidu"}; // Excel列名 - String titleName1[] = {"工号", "姓名", "日期", "电话号码", "开始时间", "结束时间", "录音时长(秒)", "呼叫类型", "来电人电话号码", "公司名称", "咨询内容", "解决办法", "问题类型", "所属地区", "满意度"}; + String titleName1[] = {"工号", "姓名", "日期", "电话号码", "开始时间", "结束时间", "录音时长(秒)", "呼叫类型", "来电人电话号码", "公司名称", "咨询内容", "解决办法", "问题类型", "税局","所属地区", "满意度"}; // Excel 列宽 - int titleSize[] = {30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}; + int titleSize[] = {30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,30}; // 内容书写,返回输出流 pee.wirteListMapExcel(titleColumn1, titleName1, titleSize, resultMap); diff --git a/src/rush/TaskDeleteJob.java b/src/rush/TaskDeleteJob.java index dd3a560..2b0c9ff 100644 --- a/src/rush/TaskDeleteJob.java +++ b/src/rush/TaskDeleteJob.java @@ -8,7 +8,7 @@ import com.aisino.aosplus.plugin.job.Job; * 这个方法定时回收这个任务中心的任务 * 2018年11月26日 */ -@Job("0 20 18 * * ?") +@Job("0 0 18 * * ?") public class TaskDeleteJob extends BaseJob{ @Override public void execute() {