|
@@ -1,15 +1,15 @@
|
|
|
package com.xintong.visualinspection.controller;
|
|
package com.xintong.visualinspection.controller;
|
|
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
import com.xintong.system.err.BusinessException;
|
|
import com.xintong.system.err.BusinessException;
|
|
|
import com.xintong.visualinspection.bean.*;
|
|
import com.xintong.visualinspection.bean.*;
|
|
|
import com.xintong.visualinspection.pojo.StatisiticPojo;
|
|
import com.xintong.visualinspection.pojo.StatisiticPojo;
|
|
|
import com.xintong.visualinspection.pojo.StatisticExUser;
|
|
import com.xintong.visualinspection.pojo.StatisticExUser;
|
|
|
import com.xintong.visualinspection.pojo.UserRankingData;
|
|
import com.xintong.visualinspection.pojo.UserRankingData;
|
|
|
|
|
+import com.xintong.visualinspection.util.AuthorUtil;
|
|
|
import com.xintong.visualinspection.util.CacheUtil;
|
|
import com.xintong.visualinspection.util.CacheUtil;
|
|
|
|
|
+import com.xintong.visualinspection.util.Constants;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
@@ -18,6 +18,8 @@ import com.github.pagehelper.PageInfo;
|
|
|
import com.xintong.visualinspection.service.StatisticsService;
|
|
import com.xintong.visualinspection.service.StatisticsService;
|
|
|
import com.xintong.visualinspection.util.CodeUtil;
|
|
import com.xintong.visualinspection.util.CodeUtil;
|
|
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 文件名:StatisticsController
|
|
* 文件名:StatisticsController
|
|
|
* 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
|
|
* 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
|
|
@@ -289,11 +291,30 @@ public class StatisticsController extends BaseController {
|
|
|
* 获取收费站具体某个人的扣分详情
|
|
* 获取收费站具体某个人的扣分详情
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/one/checkedItem/detail/info/{page}/{size}")
|
|
@RequestMapping(value = "/one/checkedItem/detail/info/{page}/{size}")
|
|
|
- public String getFsOnePersonCheckedItemDetailInfo(@RequestBody StatisticsBean obj,@PathVariable Integer page,@PathVariable Integer size){
|
|
|
|
|
|
|
+ public String getFsOnePersonCheckedItemDetailInfo(HttpServletRequest request, @RequestBody StatisticsBean obj, @PathVariable Integer page, @PathVariable Integer size){
|
|
|
//PageHelper.offsetPage(page, size);
|
|
//PageHelper.offsetPage(page, size);
|
|
|
- PageHelper.startPage(page, size);
|
|
|
|
|
- List<StatisticsBean> returnList= statisticsService.getOneCheckedDetailInfo(obj);
|
|
|
|
|
- return super.returnSuccessResult(new PageInfo(returnList));
|
|
|
|
|
|
|
+ boolean isshow = true;
|
|
|
|
|
+ //获取个人权限
|
|
|
|
|
+ User user = getCurrentUser(request);
|
|
|
|
|
+ if(AuthorUtil.hasRole(user, Constants.ROLE_STATION_ADMIN)
|
|
|
|
|
+ ||AuthorUtil.hasRole(user, Constants.ROLE_STATION)
|
|
|
|
|
+ ||AuthorUtil.hasRole(user, Constants.ROLE_STATION_AGENT)
|
|
|
|
|
+ ||AuthorUtil.containsRole(user, "ROLE_STATION")){
|
|
|
|
|
+ //判断是否是单钱周期
|
|
|
|
|
+ Date a = new Date();
|
|
|
|
|
+ if(obj.getEnd_date()!=null && obj.getEnd_date().getTime()>a.getTime()){
|
|
|
|
|
+ isshow = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(isshow){
|
|
|
|
|
+ PageHelper.startPage(page, size);
|
|
|
|
|
+ List<StatisticsBean> returnList= statisticsService.getOneCheckedDetailInfo(obj);
|
|
|
|
|
+ return super.returnSuccessResult(new PageInfo(returnList));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return super.returnSuccessResult(new PageInfo(new ArrayList<StatisticsBean>()));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|