Commit 314ae316 authored by huagnxiner's avatar huagnxiner

回访跟踪报表修改部门过滤代码

parent 55dab5de
......@@ -40,6 +40,8 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import static com.house365.web.util.SessionConstants.SESSION_CURRNET_DEPT_KEY;
/**
* 状态来源分析 statusSourceStatistic
* 项目来源分析 projectSource
......@@ -127,7 +129,7 @@ public class StatisticController extends BaseController {
) {
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
DepartmentEntity city = null;
String cityId = dept.getCityID();
......@@ -375,7 +377,7 @@ public class StatisticController extends BaseController {
) {
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
List<DepartmentEntity> departmentEntities = new ArrayList<>();
List<UserEntity> userEntities = new ArrayList<>();
......@@ -653,7 +655,7 @@ public class StatisticController extends BaseController {
) {
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
List<DepartmentEntity> departmentEntities = new ArrayList<>();
List<UserEntity> userEntities = new ArrayList<>();
......@@ -1338,7 +1340,7 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "localReportStatistic", method = RequestMethod.GET)
public String localReportStatistic(Model model, HttpServletRequest request) {
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
String startTime = request.getParameter("startTime");
String endTime = request.getParameter("endTime");
......@@ -1569,7 +1571,7 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "reportMarketingStatistic", method = RequestMethod.GET)
public String reportMarketingStatistic(Model model, HttpServletRequest request) {
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
String startTime = request.getParameter("startTime");
......@@ -1850,7 +1852,7 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "projectSource", method = RequestMethod.GET)
public String projectSource(Model model, HttpServletRequest request) {
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
ProjectListRequest projectReq = new ProjectListRequest();
projectReq.setPaging(new Page(Integer.MAX_VALUE));
......@@ -2216,7 +2218,7 @@ public class StatisticController extends BaseController {
List<ProjectSrouceRePo> projectSourceTableData = getProjectSourceTableData(projectSrouceParaPo);
List<Object> li = null;
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
for (ProjectSrouceRePo projectSrouceRePo : projectSourceTableData) {
li = new LinkedList<>();
li.add(dept.getName());
......@@ -2245,7 +2247,7 @@ public class StatisticController extends BaseController {
String projectName = request.getParameter("projectName");
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
SESSION_CURRNET_DEPT_KEY);
ProjectListRequest projectReq = new ProjectListRequest();
projectReq.setPaging(new Page(Integer.MAX_VALUE));
HashMap<String, Object> map = new HashMap<>();
......@@ -2511,7 +2513,7 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "callDailyStatistic", method = RequestMethod.GET)
public String callDailyStatistic(Model model, HttpServletRequest request) {
try {
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SESSION_CURRNET_DEPT_KEY);
String startTime = request.getParameter("startTime");
String endTime = request.getParameter("endTime");
model.addAttribute("startTime", startTime);
......@@ -2603,7 +2605,7 @@ public class StatisticController extends BaseController {
public void callDailyStatisticExcel(HttpServletRequest request, HttpServletResponse response) {
try {
final String[] excelTitles = {"部门", "姓名", "外呼总量", "成功接通量", "累计时长(分钟)"};
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SESSION_CURRNET_DEPT_KEY);
String startTime = request.getParameter("startTime");
String endTime = request.getParameter("endTime");
startTime = startTime + " 00:00:00";
......@@ -2997,7 +2999,7 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "/salesConversionReport")
public String salesConversionReport(Model model, HttpServletRequest request) {
try {
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SESSION_CURRNET_DEPT_KEY);
String startTime = request.getParameter("startTime");
String endTime = request.getParameter("endTime");
model.addAttribute("startTime", startTime);
......@@ -3068,7 +3070,7 @@ public class StatisticController extends BaseController {
public void salesConversionReportExcel(HttpServletRequest request, HttpServletResponse response) {
try {
final String[] excelTitles = {"部门", "安家顾问", "私客总量", "已跟进量", "AB类", "约看", "到访", "到访转化率", "认筹", "认筹转化率", "认购", "认购转化率", "签约", "签约转化率", "退房"};
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SESSION_CURRNET_DEPT_KEY);
String startTime = request.getParameter("startTime");
String endTime = request.getParameter("endTime");
startTime = startTime + " 00:00:00";
......@@ -3531,7 +3533,7 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "/transactionStatusReport")
public String transactionStatusReport(Integer number, Model model, HttpServletRequest request) {
try {
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SESSION_CURRNET_DEPT_KEY);
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
String city = dept.getDescripition();
String startTime = request.getParameter("startTime");
......@@ -3568,7 +3570,7 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "/cloudCusReport")
public String cloudCusReport(Model model, HttpServletRequest request) {
try {
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
DepartmentEntity dept = (DepartmentEntity) request.getSession().getAttribute(SESSION_CURRNET_DEPT_KEY);
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
String city = dept.getDescripition();
......@@ -3593,13 +3595,15 @@ public class StatisticController extends BaseController {
@RequestMapping(value = "/callBackTraceStatistic")
public String callBackTraceStatistic(Integer number, Integer pageSize,Model model, HttpServletRequest request) {
UserEntity userEntity = (UserEntity) request.getSession().getAttribute(SessionConstants.THREAD_USER_KEY);
DepartmentEntity curDepartment = (DepartmentEntity) request.getSession().getAttribute(SESSION_CURRNET_DEPT_KEY);
boolean isDirector = user.isDirector(userEntity.getId());
List<DepartmentEntity> departmentEntities = user.getChildDepartList(userEntity.getDeptId());
//默认返回合肥的数据,只有合肥(deptid=243)需要这个报表
List<DepartmentEntity> hfDepartmentEntityList=new ArrayList<>();
for (DepartmentEntity dep : departmentEntities) {
if(isValidDept(dep.getUrlPath(),"243")){
if (("zb".equals(curDepartment.getDescripition()) || "hf".equals(curDepartment.getDescripition()))&&
isValidDept(dep.getUrlPath(), "243")){
hfDepartmentEntityList.add(dep);
}
}
......
......@@ -29,21 +29,25 @@
<c:otherwise>
<form id="filterForm" name="filterForm" class="form-inline filterForm"
action="${ctx}/statistic/callBackTraceStatistic" method="get">
<c:forEach items="${departments}" var="dept">
<li <c:if test="${dept.id == deptId}">class="active"</c:if>>
<c:choose>
<c:when test="${dept.id == deptId}">
<a href="#">${dept.name}</a>
</c:when>
<c:when test="${dept.id != deptId}">
<a href="${ctx}/statistic/callBackTraceStatistic?deptId=${dept.id}&pageSize=${param['pageSize']}">${dept.name}</a>
</c:when>
<c:otherwise>
<div class="row-fluid">
<ul class="nav nav-tabs" style="margin-bottom: 0;position: relative;">
<c:forEach items="${departments}" var="dept">
<li <c:if test="${dept.id == deptId}">class="active"</c:if>>
<c:choose>
<c:when test="${dept.id == deptId}">
<a href="#">${dept.name}</a>
</c:when>
<c:when test="${dept.id != deptId}">
<a href="${ctx}/statistic/callBackTraceStatistic?deptId=${dept.id}&pageSize=${param['pageSize']}">${dept.name}</a>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</c:otherwise>
</c:choose>
</li>
</c:forEach>
</ul>
</div>
<div style="margin-top:10px;">
&nbsp;&nbsp;数据日期:&nbsp;&nbsp;
<input type="text" name="startTime" id="startTime" value="${startTime}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment