|
@@ -2,6 +2,7 @@ package com.xintong.visualinspection.controller;
|
|
|
|
|
|
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import com.xintong.visualinspection.bean.CheckAppealStatistic;
|
|
import com.xintong.visualinspection.bean.CheckAppealStatistic;
|
|
|
import com.xintong.visualinspection.bean.StatisticsBean;
|
|
import com.xintong.visualinspection.bean.StatisticsBean;
|
|
|
|
|
+import com.xintong.visualinspection.bean.StatisticsBeanBO;
|
|
|
import com.xintong.visualinspection.service.StatisticsService;
|
|
import com.xintong.visualinspection.service.StatisticsService;
|
|
|
import com.xintong.visualinspection.util.DateUtil;
|
|
import com.xintong.visualinspection.util.DateUtil;
|
|
|
|
|
|
|
@@ -41,17 +43,29 @@ public class FileExcelController extends BaseController {
|
|
|
@RequestMapping(value = "/employee/order",method=RequestMethod.GET)
|
|
@RequestMapping(value = "/employee/order",method=RequestMethod.GET)
|
|
|
public String getEmployeeOrder(HttpServletRequest req,HttpServletResponse resp,
|
|
public String getEmployeeOrder(HttpServletRequest req,HttpServletResponse resp,
|
|
|
@RequestParam Long dept_id,
|
|
@RequestParam Long dept_id,
|
|
|
|
|
+ @RequestParam Long parent_dept_id ,
|
|
|
|
|
+ @RequestParam Integer max_score ,
|
|
|
|
|
+ @RequestParam Integer min_score ,
|
|
|
|
|
+ @RequestParam Integer min_check_num ,
|
|
|
|
|
+ @RequestParam Integer max_check_num ,
|
|
|
|
|
+ @RequestParam Integer position_id ,
|
|
|
@RequestParam String start_date,@RequestParam String end_date,
|
|
@RequestParam String start_date,@RequestParam String end_date,
|
|
|
@RequestParam String start_score,@RequestParam String end_score){
|
|
@RequestParam String start_score,@RequestParam String end_score){
|
|
|
- StatisticsBean obj = new StatisticsBean();
|
|
|
|
|
|
|
+ StatisticsBeanBO obj = new StatisticsBeanBO();
|
|
|
|
|
|
|
|
Date start = DateUtil.strParseDate(start_date);
|
|
Date start = DateUtil.strParseDate(start_date);
|
|
|
Date end = DateUtil.strParseDate(end_date);
|
|
Date end = DateUtil.strParseDate(end_date);
|
|
|
obj.setDept_id(dept_id);
|
|
obj.setDept_id(dept_id);
|
|
|
|
|
+ obj.setParent_dept_id(parent_dept_id);
|
|
|
obj.setStart_date(start);
|
|
obj.setStart_date(start);
|
|
|
obj.setEnd_date(end);
|
|
obj.setEnd_date(end);
|
|
|
obj.setStart_score(start_score);
|
|
obj.setStart_score(start_score);
|
|
|
obj.setEnd_score(end_score);
|
|
obj.setEnd_score(end_score);
|
|
|
|
|
+ obj.setMax_score(max_score);
|
|
|
|
|
+ obj.setMin_score(min_score);
|
|
|
|
|
+ obj.setMax_check_num(max_check_num);
|
|
|
|
|
+ obj.setMin_check_num(min_check_num);
|
|
|
|
|
+ obj.setPosition_id(position_id);
|
|
|
|
|
|
|
|
statisticsService.getEmployeeCheckedInfo(obj, req, resp);
|
|
statisticsService.getEmployeeCheckedInfo(obj, req, resp);
|
|
|
return super.returnSuccessResult(null);
|
|
return super.returnSuccessResult(null);
|
|
@@ -97,7 +111,7 @@ public class FileExcelController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/appeal/info",method=RequestMethod.GET)
|
|
@RequestMapping(value = "/appeal/info",method=RequestMethod.GET)
|
|
|
public String getAppealStatisticExcel(HttpServletRequest req,HttpServletResponse resp,
|
|
public String getAppealStatisticExcel(HttpServletRequest req,HttpServletResponse resp,
|
|
|
- @RequestParam Integer month,
|
|
|
|
|
|
|
+ @RequestParam String month,
|
|
|
@RequestParam(required=false) Integer centerId,
|
|
@RequestParam(required=false) Integer centerId,
|
|
|
@RequestParam(required=false) Integer deptId){
|
|
@RequestParam(required=false) Integer deptId){
|
|
|
CheckAppealStatistic obj = new CheckAppealStatistic();
|
|
CheckAppealStatistic obj = new CheckAppealStatistic();
|
|
@@ -106,9 +120,13 @@ public class FileExcelController extends BaseController {
|
|
|
}else if(centerId!=null){
|
|
}else if(centerId!=null){
|
|
|
obj.setParent_dept_id(centerId);
|
|
obj.setParent_dept_id(centerId);
|
|
|
}
|
|
}
|
|
|
- obj.setStart_time(DateUtil.strParseDate("2017-"+(month-1)+"-25 23:00:00"));
|
|
|
|
|
- obj.setEnd_time(DateUtil.strParseDate("2017-"+month+"-25 23:00:00"));
|
|
|
|
|
- statisticsService.getExcelAppealInfo(obj,month.toString(), req, resp);
|
|
|
|
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
|
|
+ Date time = DateUtil.strParseDate(month+"/25 23:00:00","yyyy/MM/dd HH:mm:ss");
|
|
|
|
|
+ c.setTime(time);
|
|
|
|
|
+ c.add(Calendar.MONTH,-1);
|
|
|
|
|
+ obj.setStart_time(c.getTime());
|
|
|
|
|
+ obj.setEnd_time(time);
|
|
|
|
|
+ statisticsService.getExcelAppealInfo(obj, month.replaceAll("/", "") , req, resp);
|
|
|
return super.returnSuccessResult(null);
|
|
return super.returnSuccessResult(null);
|
|
|
}
|
|
}
|
|
|
|
|
|