package com.tourmade.crm.action;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.tourmade.crm.common.action.BaseSimpleFormController;
import com.tourmade.crm.common.framework.bean.QueryResult;
import com.tourmade.crm.common.framework.util.JSONUtilS;
import com.tourmade.crm.common.model.base.value.baseconfig.PageHelper;
import com.tourmade.crm.csv.CSVUtil;
import com.tourmade.crm.entity.AgencyAchievementStats;
import com.tourmade.crm.entity.AgencyOrderStatus;
import com.tourmade.crm.entity.CaseAllotStats;
import com.tourmade.crm.entity.CaseSourceStats;
import com.tourmade.crm.entity.ContactRealStats;
import com.tourmade.crm.entity.CustomerSourceLevelStats;
import com.tourmade.crm.entity.EntityList;
import com.tourmade.crm.entity.ReasonOfDrainingStats;
import com.tourmade.crm.entity.SellerCoverStats;
import com.tourmade.crm.entity.SellerNotAskStats;
import com.tourmade.crm.entity.SellerNotAskStatsD;
import com.tourmade.crm.entity.UserAchRate;
import com.tourmade.crm.entity.UserAchievement;
import com.tourmade.crm.service.StatisticsService;
import net.sf.json.JSONArray;
/**
* 统计分析类
*
* @author fjw
*
*/
@Controller
@RequestMapping("/statistics")
public class StatisticsController extends BaseSimpleFormController {
@Autowired
private StatisticsService service;
/**
* 跟单员询单状态统计
*
* @param model
* @return
*/
@RequestMapping(value = "/usercasestatusstats.html", method = { RequestMethod.POST, RequestMethod.GET })
public String userAchievementStatsView(Model model) {
String source = "case.source";
List<EntityList> sourceList = service.getParameterInfo(source);
JSONArray sourceResult = JSONArray.fromObject(sourceList);
model.addAttribute("source", sourceResult);
model.addAttribute("startTime", getLastMothFirstDay());
model.addAttribute("endTime", getLastMothLastDay());
return "/statistics/userCaseStatusStats";
}
/**
* 跟单员dateTables请求
*
* @param request
* @param session
* @param model
* @param customerId
* @param page
* @return
*/
@RequestMapping(value = "/usercasestatusstats.do", produces = "application/json;charset=utf-8")
@ResponseBody
public String queryData(PageHelper page, String startCreateDateTime, String endCreateDateTime, String source) {
QueryResult<UserAchievement> userAchievementList = queryUserCaseStatusMethod(startCreateDateTime,
endCreateDateTime, source);
String result = JSONUtilS.object2json(userAchievementList);
return result;
}
public QueryResult<UserAchievement> queryUserCaseStatusMethod(String startCreateDateTime, String endCreateDateTime,
String source) {
// 设置查询参数
Map<String, Object> map = new HashMap<>();
map.put("source", source);
if (startCreateDateTime == null || startCreateDateTime.trim() == "") {
startCreateDateTime = getLastMothFirstDay();
}
if (endCreateDateTime == null || endCreateDateTime.trim() == "") {
endCreateDateTime = getLastMothLastDay();
}
map.put("startCreateTime", startCreateDateTime + " 00:00:00");
map.put("endCreateTime", endCreateDateTime + " 23:59:59");
QueryResult<UserAchievement> userAchievementList = service.queryUserAchievementStats(map);
QueryResult<UserAchievement> userAchievementList2 = service.queryUserAchievementStatsTotal(map);
List<UserAchievement> data = userAchievementList2.getData();
data.get(0).setUserName("合计");
userAchievementList.getData().addAll(data);
return userAchievementList;
}
/**
* 返回沟通方式统计界面
*
* @param model
* @return
*/
@RequestMapping(value = "/contactrealstats.html", method = { RequestMethod.POST, RequestMethod.GET })
public String contactRealStatsView(Model model) {
model.addAttribute("startTime", getLastMothFirstDay());
model.addAttribute("endTime", getLastMothLastDay());
return "/statistics/contactRealStats";
}
/**
* 沟通方式请求方法
*
* @param page
* @param startCreateDateTime
* @param endCreateDateTime
* @return
*/
@RequestMapping(value = "/contactrealstats.do", produces = "application/json;charset=utf-8")
@ResponseBody
public String queryContactReal(PageHelper page, String startCreateDateTime, String endCreateDateTime) {
QueryResult<ContactRealStats> contactRealList = queryContactRealMethod(startCreateDateTime, endCreateDateTime);
String result = JSONUtilS.object2json(contactRealList);
return result;
}
public QueryResult<ContactRealStats> queryContactRealMethod(String startCreateDateTime, String endCreateDateTime) {
// 设置查询参数
Map<String, Object> map = new HashMap<>();
if (startCreateDateTime == null || startCreateDateTime.trim() == "") {
startCreateDateTime = getLastMothFirstDay();
}
if (endCreateDateTime == null || endCreateDateTime.trim() == "") {
endCreateDateTime = getLastMothLastDay();
}
map.put("startCreateTime", startCreateDateTime + " 00:00:00");
map.put("endCreateTime", endCreateDateTime + " 23:59:59");
QueryResult<ContactRealStats> contactRealList = service.queryContactReal(map);
QueryResult<ContactRealStats> contactRealList2 = service.queryContactRealTotal(map);
List<ContactRealStats> data = contactRealList2.getData();
data.get(0).setContactName("合计");
contactRealList.getData().addAll(data);
return contactRealList;
}
/**
* 返回流失原因界面
*
* @param model
* @return
*/
@RequestMapping(value = "/reasonofdrainingstats.html", method = { RequestMethod.POST, RequestMethod.GET })
public String reasonOfDrainingView(Model model) {
model.addAttribute("startTime", getLastMothFirstDay());
model.addAttribute("endTime", getLastMothLastDay());
return "/statistics/reasonOfDrainingStats";
}
/**
* 无效原因dataTables请求
*
* @param model
* @return
*/
@RequestMapping(value = "/reasonofdrainingstats1.do", produces = "application/json;charset=utf-8")
@ResponseBody
public String queryReasonOfDraining1(PageHelper page, String startCreateDateTime, String endCreateDateTime) {
QueryResult<ReasonOfDrainingStats> contactRealList = queryReasonOfDraining1Method(startCreateDateTime,
endCreateDateTime);
String result = JSONUtilS.object2json(contactRealList);
return result;
}
public QueryResult<ReasonOfDrainingStats> queryReasonOfDraining1Method(String startCreateDateTime,
String endCreateDateTime) {
// 设置查询参数
Map<String, Object> map = new HashMap<>();
if (startCreateDateTime == null || startCreateDateTime.trim() == "") {
startCreateDateTime = getLastMothFirstDay();
}
if (endCreateDateTime == null || endCreateDateTime.trim() == "") {
endCreateDateTime = getLastMothLastDay();
}
map.put("startCreateTime", startCreateDateTime + " 00:00:00");
map.put("endCreateTime", endCreateDateTime + " 23:59:59");
QueryResult<ReasonOfDrainingStats> contactRealList = service.queryReasonOfDraining(map);
QueryResult<ReasonOfDrainingStats> contactRealList2 = service.queryReasonOfDrainingTotal(map);
List<ReasonOfDrainingStats> data = contactRealList2.getData();
data.get(0).setReasonOfDrainingName("合计");
contactRealList.getData().addAll(data);
return contactRealList;
}
/**
* 未成行原因dataTables请求
*
* @param model
* @return
*/
@RequestMapping(value = "/reasonofdrainingstats2.do", produces = "application/json;charset=utf-8")
@ResponseBody
public String queryReasonOfDraining2(PageHelper page, String sta
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于Java开发的医院智能导诊系统源码(毕设项目).zip 基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于Java开发的医院智能导诊系统源码(毕设项目).zip基于J
资源推荐
资源详情
资源评论
收起资源包目录
基于Java开发的医院智能导诊系统源码(毕设项目).zip (758个子文件)
,CKEDITOR.tools.htmlEncode(e._[ 1KB
_div style= 1KB
_div style= 1KB
_div style= 1KB
_div style= 1KB
_div style= 1KB
_div style= 1KB
_div style= 1KB
_div style= 1KB
_div style= 1KB
.classpath 10KB
org.eclipse.wst.common.component 563B
org.eclipse.wst.jsdt.ui.superType.container 49B
bootstrap.min.css 107KB
style.default.css 76KB
animate.min.css 50KB
font-awesome.min.css 30KB
bootstrap-override.css 22KB
bootstrap-editable.css 21KB
prettyPhoto.css 20KB
jquery-ui-1.10.3.css 18KB
select2.css 17KB
animate.delay.css 11KB
dropzone.css 11KB
fullcalendar.css 10KB
roboto.css 9KB
codemirror.css 6KB
weather-icons.min.css 5KB
lato.css 5KB
toggles.css 5KB
tourmadecrm.css 5KB
jquery.datatables.css 4KB
colorpicker.css 4KB
bootstrap-timepicker.min.css 2KB
ambiance.css 2KB
bootstrap-wysihtml5.css 2KB
jquery-ui-timepicker-addon.css 2KB
jquery.gritter.css 1KB
jquery.tagsinput.css 1KB
jquery-jvectormap-1.2.2.css 720B
morris.css 479B
.DS_Store 8KB
fontawesome-webfont.eot 162KB
Roboto-ThinItalic-webfont.eot 45KB
Roboto-CondensedItalic-webfont.eot 43KB
Roboto-LightItalic-webfont.eot 43KB
Roboto-BoldCondensedItalic-webfont.eot 42KB
Roboto-MediumItalic-webfont.eot 42KB
Roboto-BoldItalic-webfont.eot 42KB
Roboto-Italic-webfont.eot 42KB
Roboto-BlackItalic-webfont.eot 41KB
Roboto-Thin-webfont.eot 37KB
Roboto-Condensed-webfont.eot 37KB
Roboto-Light-webfont.eot 37KB
Roboto-Regular-webfont.eot 37KB
Roboto-BoldCondensed-webfont.eot 36KB
Roboto-Medium-webfont.eot 36KB
Roboto-Bold-webfont.eot 36KB
Roboto-Black-webfont.eot 36KB
Roboto-Black-webfont.eot~.eot 36KB
Lato-RegIta-webfont.eot 32KB
Lato-BolIta-webfont.eot 32KB
Lato-LigIta-webfont.eot 31KB
Lato-BlaIta-webfont.eot 31KB
Lato-HaiIta-webfont.eot 31KB
Lato-Bol-webfont.eot 29KB
Lato-Reg-webfont.eot 28KB
weathericons-regular-webfont.eot 28KB
Lato-Lig-webfont.eot 28KB
Lato-Bla-webfont.eot 28KB
Lato-Hai-webfont.eot 27KB
glyphicons-halflings-regular.eot 20KB
loader11.gif 19KB
loader23.gif 14KB
loader24.gif 14KB
loader14.gif 12KB
loader17.gif 11KB
loader20.gif 10KB
loader18.gif 9KB
loader7.gif 9KB
loader30.gif 8KB
loader13.gif 7KB
loader25.gif 7KB
loader22.gif 6KB
loader.gif 6KB
loader12.gif 6KB
loader28.gif 5KB
loader29.gif 5KB
loader16.gif 4KB
loader9.gif 3KB
loader10.gif 3KB
loader15.gif 3KB
loader21.gif 3KB
loader19.gif 3KB
loader26.gif 2KB
loader5.gif 2KB
loader6.gif 2KB
select2-spinner.gif 2KB
loading.gif 2KB
loader2.gif 2KB
共 758 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
- BearDaBeast2024-04-17发现一个宝藏资源,赶紧冲冲冲!支持大佬~
- m0_748960662024-03-27支持这个资源,内容详细,主要是能解决当下的问题,感谢大佬分享~
不安分的小女孩
- 粉丝: 9210
- 资源: 1990
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- onenet_chongwukanhu_v06.apk
- 2022NOC软件创意编程赛项真题C++初中-决赛(有解析)
- 2022NOC软件创意编程赛项真题python初中-决赛(有解析)
- openLayer-本地数据加载 (day5)
- A题-正弦信号发生器.xdf
- 2022NOC软件创意编程赛项真题python小学高年级-决赛(有解析)
- mathml转换latex需要的xsl文件
- 2022NOC软件创意编程赛项真题图形化小学高年级-决赛(有解析)
- gbase驱动下载gbase-connector-java-8.3.81.53驱动下载
- 2022NOC软件创意编程赛项真题图形化小学低年级-决赛(有解析)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功