增加单位的疑难案件 / 标杆案件
修改查询的方式 增加了疑难案件和标案案件的只看自己标记的案件的功能, 以及只能自己取消标记的功能 增加单位的网格员效率统计 修改了单位的网格员效率统计的相关逻辑
This commit is contained in:
parent
b2bf69ec91
commit
9cd48c4fb3
@ -2,28 +2,34 @@ package cn.com.tenlion.controller.api.casestatistics;
|
||||
|
||||
import cn.com.tenlion.pojo.dtos.caseparts.CasePartsDTO;
|
||||
import cn.com.tenlion.pojo.dtos.caseparts.CasePartsZTreeDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.CaseStatisticsAreaDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.CaseStatisticsAreaDataDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.CaseStatisticsDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.*;
|
||||
import cn.com.tenlion.pojo.vos.caseparts.CasePartsVO;
|
||||
import cn.com.tenlion.remote.GridRemoteService;
|
||||
import cn.com.tenlion.service.caseparts.ICasePartsService;
|
||||
import cn.com.tenlion.service.casestatistics.ICaseStatisticsService;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.interfaces.department.IDepartmentBaseService;
|
||||
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.app.AppTokenUserDepartment;
|
||||
import ink.wgink.pojo.bos.UserInfoBO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.pojo.vos.IdsVO;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: CaseStatisticsController
|
||||
@ -36,9 +42,169 @@ import java.util.Map;
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/casestatistics")
|
||||
public class CaseStatisticsController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
@Autowired
|
||||
private ICaseStatisticsService iCaseStatisticsService;
|
||||
@Autowired
|
||||
private IDepartmentBaseService iDepartmentBaseService;
|
||||
@Autowired
|
||||
private SecurityComponent securityComponent;
|
||||
@Autowired
|
||||
private GridRemoteService gridRemoteService;
|
||||
|
||||
public List<String> getCurrentDepartmentIdList(String departmentId) {
|
||||
List<String> departmentIdList = new ArrayList<String>();
|
||||
// 加载全部
|
||||
if(StringUtils.isEmpty(departmentId)) {
|
||||
List<DepartmentSimpleDTO> departmentSimpleDTOList = securityComponent.getCurrentUser().getDepartments();
|
||||
for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) {
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentSimpleDTO.getDepartmentId());
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
if(departmentDTO.getDepartmentType() == 2) {
|
||||
departmentIdList.add(departmentDTO.getDepartmentId());
|
||||
}
|
||||
}
|
||||
departmentIdList.add(departmentSimpleDTO.getDepartmentId());
|
||||
}
|
||||
// 加载自己
|
||||
}else {
|
||||
departmentIdList.add(departmentId);
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentId);
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
if(departmentDTO.getDepartmentType() == 2) {
|
||||
departmentIdList.add(departmentDTO.getDepartmentId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return departmentIdList;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "当前登录人所在单位部门网格员导出", notes = "当前登录人所在单位部门网格员导出")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("departmentgridexcel")
|
||||
public List<DepartmentDataDTO> departmentGridExcel() {
|
||||
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||
Map<String, Object> queryParams = new HashMap<String, Object>();
|
||||
queryParams.put("access_token", accessToken);
|
||||
|
||||
List<DepartmentDataDTO> departmentList = new ArrayList<DepartmentDataDTO>();
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
List<DepartmentSimpleDTO> departmentSimpleDTOList = userInfoBO.getDepartments();
|
||||
for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) {
|
||||
DepartmentDataDTO tempDTO = new DepartmentDataDTO();
|
||||
tempDTO.setDepartmentName(departmentSimpleDTO.getDepartmentName());
|
||||
tempDTO.setDepartmentId(departmentSimpleDTO.getDepartmentId());
|
||||
DepartmentDTO department = iDepartmentBaseService.get(departmentSimpleDTO.getDepartmentId());
|
||||
tempDTO.setType(department.getDepartmentType()+"");
|
||||
// 机构
|
||||
if(department.getDepartmentType() == 1) {
|
||||
|
||||
// 查找该机构下的网格员数量
|
||||
IdsVO vo = new IdsVO();
|
||||
vo.setIds(getCurrentDepartmentIdList(departmentSimpleDTO.getDepartmentId()));
|
||||
SuccessResultData<Integer> successData = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo);
|
||||
tempDTO.setDataCount(successData.getData());
|
||||
departmentList.add(tempDTO);
|
||||
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentSimpleDTO.getDepartmentId());
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
// 部门
|
||||
if(departmentDTO.getDepartmentType() == 2) {
|
||||
DepartmentDataDTO dataDTO = new DepartmentDataDTO();
|
||||
dataDTO.setDepartmentName(departmentDTO.getDepartmentName());
|
||||
dataDTO.setDepartmentId(departmentDTO.getDepartmentId());
|
||||
dataDTO.setType(departmentDTO.getDepartmentType() + "");
|
||||
|
||||
// 查找该部门下的网格员数量
|
||||
IdsVO vo1 = new IdsVO();
|
||||
vo1.setIds(getCurrentDepartmentIdList(departmentDTO.getDepartmentId()));
|
||||
SuccessResultData<Integer> successData1 = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo1);
|
||||
dataDTO.setDataCount(successData1.getData());
|
||||
departmentList.add(dataDTO);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
// 查找该部门下的网格员数量
|
||||
IdsVO vo2 = new IdsVO();
|
||||
vo2.setIds(getCurrentDepartmentIdList(departmentSimpleDTO.getDepartmentId()));
|
||||
SuccessResultData<Integer> successData2 = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo2);
|
||||
tempDTO.setDataCount(successData2.getData());
|
||||
departmentList.add(tempDTO);
|
||||
}
|
||||
}
|
||||
Map<String, Object> params = requestParams();
|
||||
return iCaseStatisticsService.gridDepartmentGridList(departmentList, params);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "单位的网格员统计(右侧)", notes = "单位的网格员统计(右侧)")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("departmentgridlist")
|
||||
public SuccessResultList<List<CaseStatisticsAreaDataDTO>> departmentGridList(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
return iCaseStatisticsService.gridDepartmentGridListPage(page, userInfoBO.getUserId());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "当前登录人所在单位部门列表(左侧)", notes = "当前登录人所在单位部门列表(左侧)")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("departmenttree")
|
||||
public List<DepartmentDataDTO> departmentTree() {
|
||||
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||
Map<String, Object> queryParams = new HashMap<String, Object>();
|
||||
queryParams.put("access_token", accessToken);
|
||||
|
||||
List<DepartmentDataDTO> departmentList = new ArrayList<DepartmentDataDTO>();
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
List<DepartmentSimpleDTO> departmentSimpleDTOList = userInfoBO.getDepartments();
|
||||
for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) {
|
||||
DepartmentDataDTO tempDTO = new DepartmentDataDTO();
|
||||
tempDTO.setDepartmentName(departmentSimpleDTO.getDepartmentName());
|
||||
tempDTO.setDepartmentId(departmentSimpleDTO.getDepartmentId());
|
||||
DepartmentDTO department = iDepartmentBaseService.get(departmentSimpleDTO.getDepartmentId());
|
||||
tempDTO.setType(department.getDepartmentType()+"");
|
||||
// 机构
|
||||
if(department.getDepartmentType() == 1) {
|
||||
|
||||
// 查找该机构下的网格员数量
|
||||
IdsVO vo = new IdsVO();
|
||||
vo.setIds(getCurrentDepartmentIdList(departmentSimpleDTO.getDepartmentId()));
|
||||
SuccessResultData<Integer> successData = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo);
|
||||
tempDTO.setDataCount(successData.getData());
|
||||
departmentList.add(tempDTO);
|
||||
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentSimpleDTO.getDepartmentId());
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
// 部门
|
||||
if(departmentDTO.getDepartmentType() == 2) {
|
||||
DepartmentDataDTO dataDTO = new DepartmentDataDTO();
|
||||
dataDTO.setDepartmentName(departmentDTO.getDepartmentName());
|
||||
dataDTO.setDepartmentId(departmentDTO.getDepartmentId());
|
||||
dataDTO.setType(departmentDTO.getDepartmentType() + "");
|
||||
|
||||
// 查找该部门下的网格员数量
|
||||
IdsVO vo1 = new IdsVO();
|
||||
vo1.setIds(getCurrentDepartmentIdList(departmentDTO.getDepartmentId()));
|
||||
SuccessResultData<Integer> successData1 = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo1);
|
||||
dataDTO.setDataCount(successData1.getData());
|
||||
departmentList.add(dataDTO);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
// 查找该部门下的网格员数量
|
||||
IdsVO vo2 = new IdsVO();
|
||||
vo2.setIds(getCurrentDepartmentIdList(departmentSimpleDTO.getDepartmentId()));
|
||||
SuccessResultData<Integer> successData2 = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo2);
|
||||
tempDTO.setDataCount(successData2.getData());
|
||||
departmentList.add(tempDTO);
|
||||
}
|
||||
}
|
||||
return departmentList;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "区域网格员数量统计导出", notes = "区域网格员数量统计导出")
|
||||
@ApiImplicitParams({
|
||||
|
@ -91,7 +91,7 @@ public class DifficultController extends DefaultBaseController {
|
||||
}
|
||||
departmentIdList.add(departmentSimpleDTO.getDepartmentId());
|
||||
}
|
||||
return difficultService.listPageDept(page,departmentIdList);
|
||||
return difficultService.listPageDept(page,departmentIdList, userInfoBO.getUserId());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增疑难案件", notes = "新增疑难案件接口")
|
||||
@ -173,7 +173,8 @@ public class DifficultController extends DefaultBaseController {
|
||||
public SuccessResultList<List<DifficultReportDTO>> listPageArea(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return difficultService.listPageArea(page);
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
return difficultService.listPageArea(page, userInfoBO.getUserId());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "疑难案件统计", notes = "疑难案件统计接口")
|
||||
|
@ -1,10 +1,16 @@
|
||||
package cn.com.tenlion.controller.api.sample;
|
||||
|
||||
import cn.com.tenlion.pojo.dtos.difficult.DifficultReportDTO;
|
||||
import cn.com.tenlion.pojo.dtos.sample.SampleReportDTO;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.interfaces.department.IDepartmentBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.bos.UserInfoBO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
@ -16,6 +22,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -34,6 +41,59 @@ public class SampleController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private ISampleService sampleService;
|
||||
@Autowired
|
||||
private SecurityComponent securityComponent;
|
||||
@Autowired
|
||||
private IDepartmentBaseService iDepartmentBaseService;
|
||||
|
||||
@ApiOperation(value = "单位疑难案件数量", notes = "单位疑难案件数量接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count-dept")
|
||||
public SuccessResultData<Integer> countDept() {
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
/**
|
||||
* 封装当前人所在的单位集
|
||||
*/
|
||||
List<String> departmentIdList = new ArrayList<String>();
|
||||
List<DepartmentSimpleDTO> departmentSimpleDTOList = userInfoBO.getDepartments();
|
||||
for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) {
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentSimpleDTO.getDepartmentId());
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
departmentIdList.add(departmentDTO.getDepartmentId());
|
||||
}
|
||||
departmentIdList.add(departmentSimpleDTO.getDepartmentId());
|
||||
}
|
||||
return new SuccessResultData<Integer>(sampleService.countDept(departmentIdList));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单位疑难案件分页列表", notes = "单位疑难案件分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage-dept")
|
||||
public SuccessResultList<List<SampleReportDTO>> listPageDept(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
/**
|
||||
* 封装当前人所在的单位集
|
||||
*/
|
||||
List<String> departmentIdList = new ArrayList<String>();
|
||||
List<DepartmentSimpleDTO> departmentSimpleDTOList = userInfoBO.getDepartments();
|
||||
for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) {
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentSimpleDTO.getDepartmentId());
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
departmentIdList.add(departmentDTO.getDepartmentId());
|
||||
}
|
||||
departmentIdList.add(departmentSimpleDTO.getDepartmentId());
|
||||
}
|
||||
return sampleService.listPageDept(page,departmentIdList, userInfoBO.getUserId());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增案件标杆", notes = "新增案件标杆接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@ -114,7 +174,8 @@ public class SampleController extends DefaultBaseController {
|
||||
public SuccessResultList<List<SampleReportDTO>> listPageArea(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return sampleService.listPageArea(page);
|
||||
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
|
||||
return sampleService.listPageArea(page, userInfoBO.getUserId());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "案件标杆统计", notes = "案件标杆统计接口")
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.com.tenlion.dao.sample;
|
||||
|
||||
import cn.com.tenlion.pojo.dtos.difficult.DifficultReportDTO;
|
||||
import cn.com.tenlion.pojo.dtos.sample.SampleReportDTO;
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
@ -129,4 +130,19 @@ public interface ISampleDao {
|
||||
*/
|
||||
Integer countByAreaCode(Map<String, Object> params) throws SearchException;
|
||||
|
||||
|
||||
/**
|
||||
* 单位标杆案件分页列表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<SampleReportDTO> listDept(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 单位标杆案件数量
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Integer countDept(Map<String, Object> params);
|
||||
|
||||
}
|
@ -1,13 +1,33 @@
|
||||
package cn.com.tenlion.pojo.dtos.difficult;
|
||||
|
||||
import cn.com.tenlion.pojo.dtos.report.ReportDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class DifficultReportDTO extends ReportDTO {
|
||||
|
||||
private String difficultId;
|
||||
private String difficultLevel;
|
||||
private String difficultExplain;
|
||||
@ApiModelProperty(name = "difficultCreateUserId", value = "疑难人员")
|
||||
private String difficultCreateUserId;
|
||||
@ApiModelProperty(name = "difficultCancel", value = "当前人员是否可以关闭")
|
||||
private Boolean difficultCancel;
|
||||
|
||||
public Boolean getDifficultCancel() {
|
||||
return difficultCancel;
|
||||
}
|
||||
|
||||
public void setDifficultCancel(Boolean difficultCancel) {
|
||||
this.difficultCancel = difficultCancel;
|
||||
}
|
||||
|
||||
public String getDifficultCreateUserId() {
|
||||
return difficultCreateUserId == null ? "" : difficultCreateUserId;
|
||||
}
|
||||
|
||||
public void setDifficultCreateUserId(String difficultCreateUserId) {
|
||||
this.difficultCreateUserId = difficultCreateUserId;
|
||||
}
|
||||
|
||||
public String getDifficultId() {
|
||||
return difficultId;
|
||||
|
@ -17,6 +17,26 @@ public class SampleReportDTO extends ReportDTO {
|
||||
|
||||
@ApiModelProperty(name = "sampleId", value = "主键")
|
||||
private String sampleId;
|
||||
@ApiModelProperty(name = "sampleCreateUserId", value = "标杆人员")
|
||||
private String sampleCreateUserId;
|
||||
@ApiModelProperty(name = "sampleCancel", value = "当前人员是否可以关闭")
|
||||
private Boolean sampleCancel = false;
|
||||
|
||||
public Boolean getSampleCancel() {
|
||||
return sampleCancel;
|
||||
}
|
||||
|
||||
public void setSampleCancel(Boolean sampleCancel) {
|
||||
this.sampleCancel = sampleCancel;
|
||||
}
|
||||
|
||||
public String getSampleCreateUserId() {
|
||||
return sampleCreateUserId == null ? "" : sampleCreateUserId;
|
||||
}
|
||||
|
||||
public void setSampleCreateUserId(String sampleCreateUserId) {
|
||||
this.sampleCreateUserId = sampleCreateUserId;
|
||||
}
|
||||
|
||||
public String getSampleId() {
|
||||
return sampleId;
|
||||
|
@ -4,14 +4,13 @@ import cn.com.tenlion.pojo.dtos.casestatistics.GridRemoteDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.TeamMemberDTO;
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemotePathParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParamsMap;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;
|
||||
import ink.wgink.annotation.rpc.rest.method.RemotePostMethod;
|
||||
import ink.wgink.annotation.rpc.rest.params.*;
|
||||
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.pojo.vos.IdsVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -20,6 +19,15 @@ import java.util.Map;
|
||||
public interface GridRemoteService {
|
||||
|
||||
|
||||
@RemotePostMethod("/resource/teammember/list/department-ids")
|
||||
List<TeamMemberDTO> listByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParamsMap Map<String, Object> params, @RemoteJsonBodyParams IdsVO idsVO);
|
||||
|
||||
@RemotePostMethod("/resource/teammember/count/department-ids")
|
||||
SuccessResultData<Integer> teamCountByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParamsMap Map<String, Object> params, @RemoteJsonBodyParams IdsVO idsVO);
|
||||
|
||||
@RemotePostMethod("/resource/teammember/listpage/department-ids")
|
||||
SuccessResultList<List<TeamMemberDTO>> listPageByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParamsMap Map<String, Object> params, @RemoteJsonBodyParams IdsVO idsVO);
|
||||
|
||||
@RemoteGetMethod("/resource/grid/list-all/area-code/{areaCode}")
|
||||
List<GridRemoteDTO> list(@RemoteServerParams String userCenter, @RemotePathParams("areaCode") String areaCode, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
|
@ -6,6 +6,7 @@ import cn.com.tenlion.pojo.dtos.caseparts.CasePartsZTreeDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.CaseStatisticsAreaDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.CaseStatisticsAreaDataDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.CaseStatisticsDTO;
|
||||
import cn.com.tenlion.pojo.dtos.casestatistics.DepartmentDataDTO;
|
||||
import cn.com.tenlion.pojo.pos.caseparts.CasePartsPO;
|
||||
import cn.com.tenlion.pojo.vos.caseparts.CasePartsVO;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
@ -73,4 +74,18 @@ public interface ICaseStatisticsService {
|
||||
*/
|
||||
CaseStatisticsAreaDTO gridAreaList(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 部门下的网格员分页列表
|
||||
* @param page
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<CaseStatisticsAreaDataDTO>> gridDepartmentGridListPage(ListPage page, String userId);
|
||||
|
||||
/**
|
||||
* 部门下的网格员列表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentDataDTO> gridDepartmentGridList(List<DepartmentDataDTO> departmentList, Map<String, Object> params);
|
||||
}
|
@ -14,8 +14,10 @@ import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
||||
import ink.wgink.mongo.module.dictionary.service.IMongoAreaService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.pojo.vos.IdsVO;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -51,6 +53,33 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
private static String title = "事件统计";
|
||||
//private static String areaLevel = "1";
|
||||
|
||||
public List<String> getCurrentDepartmentIdList(String departmentId) {
|
||||
List<String> departmentIdList = new ArrayList<String>();
|
||||
// 加载全部
|
||||
if(StringUtils.isEmpty(departmentId)) {
|
||||
List<DepartmentSimpleDTO> departmentSimpleDTOList = securityComponent.getCurrentUser().getDepartments();
|
||||
for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) {
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentSimpleDTO.getDepartmentId());
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
if(departmentDTO.getDepartmentType() == 2) {
|
||||
departmentIdList.add(departmentDTO.getDepartmentId());
|
||||
}
|
||||
}
|
||||
departmentIdList.add(departmentSimpleDTO.getDepartmentId());
|
||||
}
|
||||
// 加载自己
|
||||
}else {
|
||||
departmentIdList.add(departmentId);
|
||||
List<DepartmentDTO> departmentPOList = iDepartmentBaseService.listByParentId(departmentId);
|
||||
for (DepartmentDTO departmentDTO : departmentPOList) {
|
||||
if(departmentDTO.getDepartmentType() == 2) {
|
||||
departmentIdList.add(departmentDTO.getDepartmentId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return departmentIdList;
|
||||
}
|
||||
|
||||
public AreaDataDTO getCurrentAreaRoot() {
|
||||
AreaDataDTO areaDataDTO = new AreaDataDTO();
|
||||
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
|
||||
@ -130,7 +159,10 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
dto.setAreaName(areaDTO.getAreaName());
|
||||
dto.setTitle(title);
|
||||
List<AreaDTO> list = areaService.listByParentId(areaId);
|
||||
|
||||
// 方面方法将区域ID写死没有通用性, 增加系统通用性
|
||||
if("2".equals(areaDTO.getAreaLevel()) && list.size() < 1) {
|
||||
list.add(areaDTO);
|
||||
}
|
||||
List<CaseStatisticsItemDTO> itemDTOList = new ArrayList<CaseStatisticsItemDTO>();
|
||||
for(AreaDTO dto1 : list) {
|
||||
CaseStatisticsItemDTO itemDTO = getAreaStatisticsData(dto1.getAreaId(), params);
|
||||
@ -144,15 +176,75 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
return dto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentDataDTO> gridDepartmentGridList(List<DepartmentDataDTO> departmentList, Map<String, Object> params) {
|
||||
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||
Map<String, Object> queryParams = new HashMap<String, Object>();
|
||||
queryParams.put("access_token", accessToken);
|
||||
|
||||
IdsVO vo2 = new IdsVO();
|
||||
List<String> idList = new ArrayList<String>();
|
||||
for(DepartmentDataDTO dataDTO : departmentList) {
|
||||
idList.clear();
|
||||
idList.add(dataDTO.getDepartmentId());
|
||||
vo2.setIds(idList);
|
||||
List<TeamMemberDTO> teamMemberDTOList = gridRemoteService.listByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo2);
|
||||
List<CaseStatisticsAreaDataDTO> resultList = new ArrayList<CaseStatisticsAreaDataDTO>();
|
||||
for(TeamMemberDTO teamMemberDTO : teamMemberDTOList) {
|
||||
// 封装统计数据
|
||||
CaseStatisticsAreaDataDTO data = getGridAreaList(teamMemberDTO.getUserId(), params);
|
||||
data.setName(teamMemberDTO.getUserName());
|
||||
data.setId(teamMemberDTO.getUserId());
|
||||
resultList.add(data);
|
||||
}
|
||||
dataDTO.setDataList(resultList);
|
||||
}
|
||||
return departmentList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<CaseStatisticsAreaDataDTO>> gridDepartmentGridListPage(ListPage page, String userId) {
|
||||
/**
|
||||
* 按照部门ID查找网格员
|
||||
*/
|
||||
Map<String, Object> params = page.getParams();
|
||||
String departmentId = params.get("departmentId") == null ? "" : params.get("departmentId").toString();
|
||||
List<TeamMemberDTO> teamMemberDTOList = new ArrayList<TeamMemberDTO>();
|
||||
// 区域查询
|
||||
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||
Map<String, Object> queryParams = new HashMap<String, Object>();
|
||||
queryParams.put("rows", page.getRows());
|
||||
queryParams.put("access_token", accessToken);
|
||||
queryParams.put("sort", "ASC");
|
||||
queryParams.put("page", page.getPage());
|
||||
IdsVO vo = new IdsVO();
|
||||
vo.setIds(getCurrentDepartmentIdList(departmentId)); // 如果departmentId为空则加载全部
|
||||
SuccessResultList<List<TeamMemberDTO>> teamMemberDTOListPage = gridRemoteService.listPageByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo);
|
||||
teamMemberDTOList.addAll(teamMemberDTOListPage.getRows());
|
||||
List<CaseStatisticsAreaDataDTO> list = new ArrayList<CaseStatisticsAreaDataDTO>();
|
||||
for(TeamMemberDTO teamMemberDTO : teamMemberDTOList) {
|
||||
// 封装统计数据
|
||||
CaseStatisticsAreaDataDTO dataDTO = getGridAreaList(teamMemberDTO.getUserId(), page.getParams());
|
||||
dataDTO.setName(teamMemberDTO.getUserName());
|
||||
dataDTO.setId(teamMemberDTO.getUserId());
|
||||
list.add(dataDTO);
|
||||
}
|
||||
PageInfo<CaseStatisticsAreaDataDTO> pageInfo = new PageInfo<>(list);
|
||||
return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<CaseStatisticsAreaDataDTO>> departmentAreaListPage(ListPage page) {
|
||||
Map<String, Object> params = page.getParams();
|
||||
AreaDataDTO areaDataDTO = getCurrentAreaRoot();
|
||||
String areaId = params.get("areaId") == null ? areaDataDTO.getAreaId() : params.get("areaId").toString();
|
||||
AreaDTO areaDTO = areaService.get(areaId);
|
||||
// 查找子区域|(用于解决市辖区无法加载子集数据)
|
||||
List<AreaDTO> areaList = areaService.listByParentId(areaId);
|
||||
// 区域查询
|
||||
List<DepartmentDTO> departmentList = new ArrayList<DepartmentDTO>();
|
||||
if(params.get("queryMode") != null && "queryCurrentArea".equals(params.get("queryMode").toString())) { // 加载当前区域的数据
|
||||
if( (params.get("queryMode") != null && "queryCurrentArea".equals(params.get("queryMode").toString())) || ("2".equals(areaDTO.getAreaLevel()) && areaList.size() < 1) ) { // 加载当前区域的数据
|
||||
SuccessResultList<List<DepartmentDTO>> department = iDepartmentBaseService.listPageByAreaCode(areaDTO.getAreaCode(), page);
|
||||
departmentList.addAll(department.getRows());
|
||||
}else {// 加载子集区域的数据
|
||||
@ -246,6 +338,14 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
dto.setAreaName(areaDTO.getAreaName());
|
||||
// 查找子区域
|
||||
List<AreaDTO> list = areaService.listByParentId(areaId);
|
||||
// 避免市辖区下面没有区域造成数据无法显示
|
||||
// if("110890".equals(areaId)) {
|
||||
// list.add(areaDTO);
|
||||
// }
|
||||
// 方面方法将区域ID写死没有通用性, 增加系统通用性
|
||||
if("2".equals(areaDTO.getAreaLevel()) && list.size() < 1) {
|
||||
list.add(areaDTO);
|
||||
}
|
||||
// 封装子区域
|
||||
List<CaseStatisticsAreaDTO> itemDTOList = new ArrayList<CaseStatisticsAreaDTO>();
|
||||
for(AreaDTO dto1 : list) {
|
||||
@ -275,6 +375,8 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
AreaDataDTO areaDataDTO = getCurrentAreaRoot();
|
||||
String areaId = params.get("areaId") == null ? areaDataDTO.getAreaId() : params.get("areaId").toString();
|
||||
AreaDTO areaDTO = areaService.get(areaId);
|
||||
// 查找子区域|(用于解决市辖区无法加载子集数据)
|
||||
List<AreaDTO> areaList = areaService.listByParentId(areaId);
|
||||
// 区域查询
|
||||
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||
Map<String, Object> queryParams = new HashMap<String, Object>();
|
||||
@ -283,7 +385,7 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
queryParams.put("sort", "ASC");
|
||||
queryParams.put("page", page.getPage());
|
||||
List<TeamMemberDTO> teamMemberDTOList = new ArrayList<TeamMemberDTO>();
|
||||
if(params.get("queryMode") != null && "queryCurrentArea".equals(params.get("queryMode").toString())) { // 加载当前区域的数据
|
||||
if((params.get("queryMode") != null && "queryCurrentArea".equals(params.get("queryMode").toString())) || ("2".equals(areaDTO.getAreaLevel()) && areaList.size() < 1) ) { // 加载当前区域的数据
|
||||
SuccessResultList<List<TeamMemberDTO>> teamMemberDTOListPage = gridRemoteService.listTeamPage(apiPathProperties.getUserCenter(), areaDTO.getAreaCode(), queryParams);
|
||||
teamMemberDTOList.addAll(teamMemberDTOListPage.getRows());
|
||||
}else {// 加载子集区域的数据
|
||||
@ -386,6 +488,10 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
dto.setAreaName(areaDTO.getAreaName());
|
||||
// 查找子区域
|
||||
List<AreaDTO> list = areaService.listByParentId(areaId);
|
||||
// 方面方法将区域ID写死没有通用性, 增加系统通用性
|
||||
if("2".equals(areaDTO.getAreaLevel()) && list.size() < 1) {
|
||||
list.add(areaDTO);
|
||||
}
|
||||
// 封装子区域
|
||||
List<CaseStatisticsAreaDTO> itemDTOList = new ArrayList<CaseStatisticsAreaDTO>();
|
||||
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||
@ -409,7 +515,6 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
||||
private String getNowUserAreaCode(){
|
||||
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
|
||||
AreaDTO byCode = areaService.getByCode(expandData.getAreaCode());
|
||||
|
@ -33,7 +33,7 @@ public interface IDifficultService {
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<DifficultReportDTO>> listPageArea(ListPage page);
|
||||
SuccessResultList<List<DifficultReportDTO>> listPageArea(ListPage page, String userId);
|
||||
|
||||
/**
|
||||
* 统计案件疑难次数
|
||||
@ -214,7 +214,7 @@ public interface IDifficultService {
|
||||
* @param departmentIdList
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<DifficultReportDTO>> listPageDept(ListPage page, List<String> departmentIdList);
|
||||
SuccessResultList<List<DifficultReportDTO>> listPageDept(ListPage page, List<String> departmentIdList, String userId);
|
||||
|
||||
/**
|
||||
* 单位疑难案件数量
|
||||
|
@ -2,6 +2,7 @@ package cn.com.tenlion.service.difficult.impl;
|
||||
|
||||
import cn.com.tenlion.pojo.bos.userexpand.UserExpandBO;
|
||||
import cn.com.tenlion.pojo.dtos.difficult.DifficultReportDTO;
|
||||
import cn.com.tenlion.pojo.dtos.sample.SampleReportDTO;
|
||||
import cn.com.tenlion.pojo.dtos.warning.WarningDTO;
|
||||
import cn.com.tenlion.util.UserUtil;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
@ -41,14 +42,21 @@ public class DifficultServiceImpl extends DefaultBaseService implements IDifficu
|
||||
private UserUtil userUtil;
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<DifficultReportDTO>> listPageDept(ListPage page, List<String> departmentIdList) {
|
||||
public SuccessResultList<List<DifficultReportDTO>> listPageDept(ListPage page, List<String> departmentIdList, String userId) {
|
||||
String departmentListIds = "-1";
|
||||
for (String k : departmentIdList) {
|
||||
departmentListIds = departmentListIds + "|" + k ;
|
||||
}
|
||||
page.getParams().put("departmentListIds", departmentListIds);
|
||||
page.getParams().put("userId", userId);
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<DifficultReportDTO> difficultReportDTOList = difficultDao.listDept(page.getParams());
|
||||
// 只有自己疑难的, 自己可以取消
|
||||
for(DifficultReportDTO difficultReportDTO : difficultReportDTOList) {
|
||||
if(userId.equals(difficultReportDTO.getDifficultCreateUserId())) {
|
||||
difficultReportDTO.setDifficultCancel(true);
|
||||
}
|
||||
}
|
||||
PageInfo<DifficultReportDTO> pageInfo = new PageInfo<>(difficultReportDTOList);
|
||||
return new SuccessResultList<>(difficultReportDTOList, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
@ -61,7 +69,6 @@ public class DifficultServiceImpl extends DefaultBaseService implements IDifficu
|
||||
departmentListIds = departmentListIds + "|" + k ;
|
||||
}
|
||||
params.put("departmentListIds", departmentListIds);
|
||||
params.put("warningStatus", "0");
|
||||
return difficultDao.countDept(params);
|
||||
}
|
||||
|
||||
@ -71,24 +78,24 @@ public class DifficultServiceImpl extends DefaultBaseService implements IDifficu
|
||||
return difficultDao.countByAreaCode(params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<DifficultReportDTO>> listPageArea(ListPage page) {
|
||||
public SuccessResultList<List<DifficultReportDTO>> listPageArea(ListPage page, String userId) {
|
||||
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
|
||||
String areaCode = (expandData == null || StringUtils.isBlank(expandData.getAreaCode())) ? "0" : expandData.getAreaCode();
|
||||
page.getParams().put("areaCode",userUtil.areaCodeFormat(areaCode));
|
||||
page.getParams().put("userId", userId);
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<DifficultReportDTO> difficultReportDTOS = difficultDao.listArea(page.getParams());
|
||||
// 只有自己疑难的, 自己可以取消
|
||||
for(DifficultReportDTO difficultReportDTO : difficultReportDTOS) {
|
||||
if(userId.equals(difficultReportDTO.getDifficultCreateUserId())) {
|
||||
difficultReportDTO.setDifficultCancel(true);
|
||||
}
|
||||
}
|
||||
PageInfo<DifficultReportDTO> pageInfo = new PageInfo<>(difficultReportDTOS);
|
||||
return new SuccessResultList<>(difficultReportDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void save(DifficultVO difficultVO) {
|
||||
saveReturnId(difficultVO);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.com.tenlion.service.sample;
|
||||
|
||||
import cn.com.tenlion.pojo.dtos.difficult.DifficultReportDTO;
|
||||
import cn.com.tenlion.pojo.dtos.sample.SampleReportDTO;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
@ -20,8 +21,7 @@ import java.util.Map;
|
||||
**/
|
||||
public interface ISampleService {
|
||||
|
||||
SuccessResultList<List<SampleReportDTO>> listPageArea(ListPage page);
|
||||
|
||||
SuccessResultList<List<SampleReportDTO>> listPageArea(ListPage page, String userId);
|
||||
|
||||
/**
|
||||
* 根据区域统计
|
||||
@ -204,4 +204,19 @@ public interface ISampleService {
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 单位标杆案件分页列表
|
||||
* @param page
|
||||
* @param departmentIdList
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<SampleReportDTO>> listPageDept(ListPage page, List<String> departmentIdList, String userId);
|
||||
|
||||
/**
|
||||
* 单位标杆案件数量
|
||||
* @param departmentIdList
|
||||
* @return
|
||||
*/
|
||||
Integer countDept(List<String> departmentIdList);
|
||||
|
||||
}
|
@ -1,11 +1,14 @@
|
||||
package cn.com.tenlion.service.sample.impl;
|
||||
|
||||
import cn.com.tenlion.pojo.bos.userexpand.UserExpandBO;
|
||||
import cn.com.tenlion.pojo.dtos.difficult.DifficultReportDTO;
|
||||
import cn.com.tenlion.pojo.dtos.sample.SampleReportDTO;
|
||||
import cn.com.tenlion.util.UserUtil;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.interfaces.user.IUserBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
@ -38,8 +41,39 @@ public class SampleServiceImpl extends DefaultBaseService implements ISampleServ
|
||||
private ISampleDao sampleDao;
|
||||
@Autowired
|
||||
private UserUtil userUtil;
|
||||
@Autowired
|
||||
private IUserBaseService iUserBaseService;
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<SampleReportDTO>> listPageDept(ListPage page, List<String> departmentIdList, String userId) {
|
||||
String departmentListIds = "-1";
|
||||
for (String k : departmentIdList) {
|
||||
departmentListIds = departmentListIds + "|" + k ;
|
||||
}
|
||||
page.getParams().put("departmentListIds", departmentListIds);
|
||||
page.getParams().put("userId", userId);
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<SampleReportDTO> sampleReportDTOList = sampleDao.listDept(page.getParams());
|
||||
// 只有自己标记的, 自己可以取消
|
||||
for(SampleReportDTO sampleReportDTO : sampleReportDTOList) {
|
||||
if(userId.equals(sampleReportDTO.getSampleCreateUserId())) {
|
||||
sampleReportDTO.setSampleCancel(true);
|
||||
}
|
||||
}
|
||||
PageInfo<SampleReportDTO> pageInfo = new PageInfo<>(sampleReportDTOList);
|
||||
return new SuccessResultList<>(sampleReportDTOList, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countDept(List<String> departmentIdList) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
String departmentListIds = "-1";
|
||||
for (String k : departmentIdList) {
|
||||
departmentListIds = departmentListIds + "|" + k ;
|
||||
}
|
||||
params.put("departmentListIds", departmentListIds);
|
||||
return sampleDao.countDept(params);
|
||||
}
|
||||
|
||||
public Integer countByAreaCode(String areaCode){
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
@ -47,22 +81,24 @@ public class SampleServiceImpl extends DefaultBaseService implements ISampleServ
|
||||
return sampleDao.countByAreaCode(params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<SampleReportDTO>> listPageArea(ListPage page) {
|
||||
public SuccessResultList<List<SampleReportDTO>> listPageArea(ListPage page, String userId) {
|
||||
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
|
||||
String areaCode = (expandData == null || StringUtils.isBlank(expandData.getAreaCode())) ? "0" : expandData.getAreaCode();
|
||||
page.getParams().put("areaCode",userUtil.areaCodeFormat(areaCode));
|
||||
page.getParams().put("userId", userId);
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<SampleReportDTO> sampleReportDTOS = sampleDao.listArea(page.getParams());
|
||||
// 只有自己标记的, 自己可以取消
|
||||
for(SampleReportDTO sampleReportDTO : sampleReportDTOS) {
|
||||
if(userId.equals(sampleReportDTO.getSampleCreateUserId())) {
|
||||
sampleReportDTO.setSampleCancel(true);
|
||||
}
|
||||
}
|
||||
PageInfo<SampleReportDTO> pageInfo = new PageInfo<>(sampleReportDTOS);
|
||||
return new SuccessResultList<>(sampleReportDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void save(SampleVO sampleVO) {
|
||||
saveReturnId(sampleVO);
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
<resultMap id="difficultReportDTO" type="cn.com.tenlion.pojo.dtos.difficult.DifficultReportDTO">
|
||||
<result column="difficult_id" property="difficultId"/>
|
||||
<result column="difficult_create_user_id" property="difficultCreateUserId"/>
|
||||
<result column="difficult_level" property="difficultLevel"/>
|
||||
<result column="difficult_explain" property="difficultExplain"/>
|
||||
<result column="report_id" property="reportId"/>
|
||||
@ -64,7 +65,7 @@
|
||||
<result column="creator" property="creator"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 统计单位下的预警事件 -->
|
||||
<!-- 统计单位疑难案件 -->
|
||||
<select id="countDept" parameterType="map" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(t1.id)
|
||||
@ -76,12 +77,50 @@
|
||||
t1.report_id = t2.report_id
|
||||
WHERE
|
||||
t1.is_delete = 0 AND t2.is_delete = 0
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
temp.report_id
|
||||
FROM
|
||||
case_distribution temp
|
||||
WHERE
|
||||
temp.report_id = t1.report_id AND
|
||||
EXISTS (
|
||||
SELECT
|
||||
temptemp.distribution_id
|
||||
FROM
|
||||
case_distribution_user temptemp
|
||||
WHERE
|
||||
temp.distribution_id = temptemp.distribution_id AND temptemp.user_status != '-1' AND temptemp.user_dept_id REGEXP '${departmentListIds}'
|
||||
)
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- 单位案件预警列表 -->
|
||||
<!-- 单位疑难案件列表 -->
|
||||
<select id="listDept" parameterType="map" resultMap="difficultReportDTO">
|
||||
SELECT
|
||||
t1.*
|
||||
t1.difficult_id,
|
||||
t1.creator AS difficult_create_user_id,
|
||||
t1.difficult_level,
|
||||
t1.difficult_explain,
|
||||
t2.report_id,
|
||||
t2.report_code,
|
||||
t2.report_area_name,
|
||||
t2.report_address,
|
||||
t2.report_lng,
|
||||
t2.report_lat,
|
||||
t2.b_g_id,
|
||||
t2.case_type_name1,
|
||||
t2.case_type_name2,
|
||||
t2.case_parts_obj_name,
|
||||
t2.report_photos,
|
||||
t2.report_source,
|
||||
t2.report_content,
|
||||
t2.is_self,
|
||||
t2.handle_status,
|
||||
t2.report_result,
|
||||
t2.is_archive,
|
||||
t2.creator,
|
||||
t2.gmt_create
|
||||
FROM
|
||||
case_difficult t1
|
||||
LEFT JOIN
|
||||
@ -90,17 +129,38 @@
|
||||
t1.report_id = t2.report_id
|
||||
WHERE
|
||||
t1.is_delete = 0 AND t2.is_delete = 0
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
temp.report_id
|
||||
FROM
|
||||
case_distribution temp
|
||||
WHERE
|
||||
temp.report_id = t1.report_id AND
|
||||
EXISTS (
|
||||
SELECT
|
||||
temptemp.distribution_id
|
||||
FROM
|
||||
case_distribution_user temptemp
|
||||
WHERE
|
||||
temp.distribution_id = temptemp.distribution_id AND temptemp.user_status != '-1' AND temptemp.user_dept_id REGEXP '${departmentListIds}'
|
||||
)
|
||||
)
|
||||
<if test="myData != null and myData == 'true'">
|
||||
AND t1.creator = #{userId}
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
t2.report_area_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_parts_obj_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name1 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name2 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_content LIKE CONCAT('%', #{keywords}, '%')
|
||||
t2.report_code LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_area_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_parts_obj_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name1 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name2 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_content LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
@ -276,11 +336,11 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 疑难案件列表 -->
|
||||
<select id="listArea" parameterType="map" resultMap="difficultReportDTO">
|
||||
SELECT
|
||||
t1.difficult_id,
|
||||
t1.creator AS difficult_create_user_id,
|
||||
t1.difficult_level,
|
||||
t1.difficult_explain,
|
||||
t2.report_id,
|
||||
@ -303,30 +363,38 @@
|
||||
t2.creator,
|
||||
t2.gmt_create
|
||||
FROM
|
||||
case_difficult t1
|
||||
LEFT JOIN case_report t2
|
||||
ON t1.report_id = t2.report_id
|
||||
case_difficult t1
|
||||
LEFT JOIN
|
||||
case_report t2
|
||||
ON
|
||||
t1.report_id = t2.report_id
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
t1.is_delete = 0 AND t2.is_delete = 0
|
||||
<if test="myData != null and myData == 'true'">
|
||||
AND t1.creator = #{userId}
|
||||
</if>
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t2.report_area_code LIKE CONCAT('%',#{areaCode},'%')
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
t2.report_code LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_area_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_parts_obj_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name1 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name2 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_content LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 疑难案件列表 -->
|
||||
<select id="listBO" parameterType="map" resultMap="difficultBO">
|
||||
SELECT
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
<resultMap id="sampleReportDTO" type="cn.com.tenlion.pojo.dtos.sample.SampleReportDTO">
|
||||
<result column="sample_id" property="sampleId"/>
|
||||
<result column="sample_create_user_id" property="sampleCreateUserId"/>
|
||||
<result column="report_id" property="reportId"/>
|
||||
<result column="report_code" property="reportCode"/>
|
||||
<result column="report_area_name" property="reportAreaName"/>
|
||||
@ -55,9 +56,105 @@
|
||||
<result column="creator" property="creator"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 统计单位下的标杆事件 -->
|
||||
<select id="countDept" parameterType="map" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(t1.id)
|
||||
FROM
|
||||
case_sample t1
|
||||
LEFT JOIN
|
||||
case_report t2
|
||||
ON
|
||||
t1.report_id = t2.report_id
|
||||
WHERE
|
||||
t1.is_delete = 0 AND t2.is_delete = 0
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
temp.report_id
|
||||
FROM
|
||||
case_distribution temp
|
||||
WHERE
|
||||
temp.report_id = t1.report_id AND
|
||||
EXISTS (
|
||||
SELECT
|
||||
temptemp.distribution_id
|
||||
FROM
|
||||
case_distribution_user temptemp
|
||||
WHERE
|
||||
temp.distribution_id = temptemp.distribution_id AND temptemp.user_status != '-1' AND temptemp.user_dept_id REGEXP '${departmentListIds}'
|
||||
)
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<!-- 单位案件标杆列表 -->
|
||||
<select id="listDept" parameterType="map" resultMap="sampleReportDTO">
|
||||
SELECT
|
||||
t1.sample_id,
|
||||
t1.creator AS sample_create_user_id,
|
||||
t2.report_id,
|
||||
t2.report_code,
|
||||
t2.report_area_name,
|
||||
t2.report_address,
|
||||
t2.report_lng,
|
||||
t2.report_lat,
|
||||
t2.b_g_id,
|
||||
t2.case_type_name1,
|
||||
t2.case_type_name2,
|
||||
t2.case_parts_obj_name,
|
||||
t2.report_photos,
|
||||
t2.report_source,
|
||||
t2.report_content,
|
||||
t2.is_self,
|
||||
t2.handle_status,
|
||||
t2.report_result,
|
||||
t2.is_archive,
|
||||
t2.creator,
|
||||
t2.gmt_create
|
||||
FROM
|
||||
case_sample t1
|
||||
LEFT JOIN
|
||||
case_report t2
|
||||
ON
|
||||
t1.report_id = t2.report_id
|
||||
WHERE
|
||||
t1.is_delete = 0 AND t2.is_delete = 0
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
temp.report_id
|
||||
FROM
|
||||
case_distribution temp
|
||||
WHERE
|
||||
temp.report_id = t1.report_id AND
|
||||
EXISTS (
|
||||
SELECT
|
||||
temptemp.distribution_id
|
||||
FROM
|
||||
case_distribution_user temptemp
|
||||
WHERE
|
||||
temp.distribution_id = temptemp.distribution_id AND temptemp.user_status != '-1' AND temptemp.user_dept_id REGEXP '${departmentListIds}'
|
||||
)
|
||||
)
|
||||
<if test="myData != null and myData == 'true'">
|
||||
AND t1.creator = #{userId}
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
t2.report_code LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_area_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_parts_obj_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name1 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name2 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_content LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
<!-- 新增案件标杆 -->
|
||||
<insert id="save" parameterType="map">
|
||||
@ -214,6 +311,7 @@
|
||||
<select id="listArea" parameterType="map" resultMap="sampleReportDTO">
|
||||
SELECT
|
||||
t1.sample_id,
|
||||
t1.creator AS sample_create_user_id,
|
||||
t2.report_id,
|
||||
t2.report_code,
|
||||
t2.report_area_name,
|
||||
@ -235,22 +333,37 @@
|
||||
t2.gmt_create
|
||||
FROM
|
||||
case_sample t1
|
||||
LEFT JOIN case_report t2
|
||||
ON t1.report_id = t2.report_id
|
||||
LEFT JOIN
|
||||
case_report t2
|
||||
ON
|
||||
t1.report_id = t2.report_id
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
t1.is_delete = 0 AND t2.is_delete = 0
|
||||
<if test="myData != null and myData == 'true'">
|
||||
AND t1.creator = #{userId}
|
||||
</if>
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t2.report_area_code LIKE CONCAT('%', #{areaCode}, '%')
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
t2.report_code LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_area_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_parts_obj_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name1 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.case_type_name2 LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t2.report_content LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 案件标杆列表 -->
|
||||
<select id="listBO" parameterType="map" resultMap="sampleBO">
|
||||
SELECT
|
||||
|
@ -557,7 +557,88 @@
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}, name: '', reportNumber: '', processesNumber: '', eventNumber: '', overtimeNumber: '', notOvertimeNumber: '', completeNumber: '', notCompleteNumber: '', overtimeProportionNumber: ''
|
||||
},
|
||||
name:{
|
||||
v: dataList.length + "个部门",
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
reportNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
processesNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
eventNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
overtimeNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
notOvertimeNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
completeNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
notCompleteNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
overtimeProportionNumber: {
|
||||
v: (dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
for(var i = 0 ; i < dataList.length; i++) {
|
||||
|
@ -558,15 +558,87 @@
|
||||
// }
|
||||
}
|
||||
},
|
||||
name: '',
|
||||
reportNumber: '',
|
||||
processesNumber: '',
|
||||
eventNumber: '',
|
||||
overtimeNumber: '',
|
||||
notOvertimeNumber: '',
|
||||
completeNumber: '',
|
||||
notCompleteNumber: '',
|
||||
overtimeProportionNumber: ''
|
||||
name:{
|
||||
v: dataList.length + "位网格员",
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
reportNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
processesNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
eventNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
overtimeNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
notOvertimeNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
completeNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
notCompleteNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
overtimeProportionNumber: {
|
||||
v:(dataList.length > 0 ? "" : "-"),
|
||||
t:"s",
|
||||
s:{
|
||||
alignment: {
|
||||
horizontal: 'center',
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
for(var i = 0 ; i < dataList.length; i++) {
|
||||
|
@ -29,6 +29,9 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="selectMyData" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-calendar-o"></i> 我标记的疑难事件
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
@ -53,6 +56,14 @@
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/difficult/listpage-area';
|
||||
|
||||
$(document).on("click","#selectMyData", function() {
|
||||
if(!$(this).hasClass("layui-btn-normal")) {
|
||||
$("#selectMyData").removeClass("layui-btn-normal");
|
||||
}
|
||||
$(this).toggleClass("layui-btn-normal");
|
||||
reloadTable();
|
||||
});
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
@ -148,10 +159,11 @@
|
||||
},
|
||||
{field: 'cz', width: 250, title: '操作', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var row = row["difficultCancel"];
|
||||
var rowData = '<div class="layui-btn-group">'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm" lay-event="showReportEvent">详情</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="demo">日志</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="removeEvent">取消疑难</button>'+
|
||||
(row ? '<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="removeEvent">取消疑难</button>' : "" )+
|
||||
'</div>'
|
||||
return rowData;
|
||||
}
|
||||
@ -176,7 +188,8 @@
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
endTime: $('#endTime').val(),
|
||||
myData: $("#selectMyData").hasClass("layui-btn-normal"),
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
|
@ -29,6 +29,9 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="selectMyData" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-calendar-o"></i> 我标记的疑难事件
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
@ -53,6 +56,14 @@
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/difficult/listpage-dept';
|
||||
|
||||
$(document).on("click","#selectMyData", function() {
|
||||
if(!$(this).hasClass("layui-btn-normal")) {
|
||||
$("#selectMyData").removeClass("layui-btn-normal");
|
||||
}
|
||||
$(this).toggleClass("layui-btn-normal");
|
||||
reloadTable();
|
||||
});
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
@ -148,10 +159,11 @@
|
||||
},
|
||||
{field: 'cz', width: 250, title: '操作', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var row = row["difficultCancel"];
|
||||
var rowData = '<div class="layui-btn-group">'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm" lay-event="showReportEvent">详情</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="demo">日志</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="removeEvent">取消疑难</button>'+
|
||||
(row ? '<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="removeEvent">取消疑难</button>' : "" )+
|
||||
'</div>'
|
||||
return rowData;
|
||||
}
|
||||
@ -176,7 +188,8 @@
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
endTime: $('#endTime').val(),
|
||||
myData: $("#selectMyData").hasClass("layui-btn-normal"),
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
|
@ -29,6 +29,9 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="selectMyData" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-calendar-o"></i> 我标记的标杆事件
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
@ -53,6 +56,14 @@
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/sample/listpage-area';
|
||||
|
||||
$(document).on("click","#selectMyData", function() {
|
||||
if(!$(this).hasClass("layui-btn-normal")) {
|
||||
$("#selectMyData").removeClass("layui-btn-normal");
|
||||
}
|
||||
$(this).toggleClass("layui-btn-normal");
|
||||
reloadTable();
|
||||
});
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
@ -130,10 +141,11 @@
|
||||
},
|
||||
{field: 'cz', width: 250, title: '操作', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var row = row["sampleCancel"];
|
||||
var rowData = '<div class="layui-btn-group">'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm" lay-event="showReportEvent">详情</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="demo">日志</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="removeEvent">取消标杆</button>'+
|
||||
(row ? '<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="removeEvent">取消标杆</button>' : "") +
|
||||
'</div>'
|
||||
return rowData;
|
||||
}
|
||||
@ -159,7 +171,8 @@
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
endTime: $('#endTime').val(),
|
||||
myData: $("#selectMyData").hasClass("layui-btn-normal"),
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
|
@ -178,8 +178,7 @@
|
||||
<a href="javascript:;" lay-href="route/warning/list-area.html" class="openUrl">
|
||||
<i class="layui-icon layui-icon-notice"></i>
|
||||
<cite>
|
||||
预警事件
|
||||
<span class="layui-badge" id="warningNum">0</span>
|
||||
预警事件<span class="layui-badge" id="warningNum">0</span>
|
||||
</cite>
|
||||
</a>
|
||||
</div>
|
||||
@ -203,8 +202,7 @@
|
||||
<a href="javascript:;" lay-href="route/timeout/list-area.html" class="openUrl">
|
||||
<i class="layui-icon layui-icon-notice"></i>
|
||||
<cite>
|
||||
超时事件
|
||||
<span class="layui-badge" id="timeoutNum">0</span>
|
||||
超时事件<span class="layui-badge" id="timeoutNum">0</span>
|
||||
</cite>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -155,13 +155,12 @@
|
||||
<a href="javascript:;" lay-href="route/warning/list-dept.html" class="openUrl">
|
||||
<i class="layui-icon layui-icon-notice"></i>
|
||||
<cite>
|
||||
预警事件
|
||||
<span class="layui-badge" id="warningNum">0</span>
|
||||
预警事件<span class="layui-badge" id="warningNum">0</span>
|
||||
</cite>
|
||||
</a>
|
||||
</div>
|
||||
<div class="layui-col-xs3 ">
|
||||
<a href="javascript:;" lay-href="route/difficult/list-area.html" class="openUrl">
|
||||
<a href="javascript:;" lay-href="route/difficult/list-dept.html" class="openUrl">
|
||||
<i class="layui-icon layui-icon-tips"></i>
|
||||
<cite>
|
||||
疑难事件<span class="layui-badge layui-bg-orange" id="difficultNum">0</span>
|
||||
@ -169,7 +168,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="layui-col-xs3 ">
|
||||
<a href="javascript:;" lay-href="route/sample/list-area.html" class="openUrl">
|
||||
<a href="javascript:;" lay-href="route/sample/list-dept.html" class="openUrl">
|
||||
<i class="layui-icon layui-icon-note"></i>
|
||||
<cite>
|
||||
标杆事件<span class="layui-badge layui-bg-green" id="sampleNum">0</span>
|
||||
@ -180,8 +179,7 @@
|
||||
<a href="javascript:;" lay-href="route/timeout/list-dept.html" class="openUrl">
|
||||
<i class="layui-icon layui-icon-notice"></i>
|
||||
<cite>
|
||||
超时事件
|
||||
<span class="layui-badge" id="timeoutNum">0</span>
|
||||
超时事件<span class="layui-badge" id="timeoutNum">0</span>
|
||||
</cite>
|
||||
</a>
|
||||
</div>
|
||||
@ -209,6 +207,12 @@
|
||||
<cite>督办管理</cite>
|
||||
</a>
|
||||
</div>
|
||||
<div class="layui-col-xs3 ">
|
||||
<a href="javascript:;" lay-href="route/casestatistics/department-grid.html" class="openUrl">
|
||||
<i class="layui-icon layui-icon-chart"></i>
|
||||
<cite>网格员效率统计</cite>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -270,6 +274,8 @@
|
||||
countCaseSevenDays();
|
||||
countDeptWarningCaseNum();
|
||||
countDeptTimeoutCaseNum();
|
||||
countDeptDifficultCaseNum();
|
||||
countDeptSampleCaseNum();
|
||||
}
|
||||
|
||||
$('#LAY-logout').on('click', function() {
|
||||
@ -461,6 +467,40 @@
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 统计单位疑难事件数量
|
||||
*/
|
||||
function countDeptDifficultCaseNum(){
|
||||
var loadLayerIndex;
|
||||
/*top.*/restAjax.get(/*top.*/restAjax.path('api/difficult/count-dept', []), {}, null, function(code, data) {
|
||||
$("#difficultNum").html(data.data);
|
||||
}, function(code, data) {
|
||||
/*top.*/dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = /*top.*/dialog.msg(/*top.*/dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
/*top.*/dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 统计单位标杆事件数量
|
||||
*/
|
||||
function countDeptSampleCaseNum(){
|
||||
var loadLayerIndex;
|
||||
/*top.*/restAjax.get(/*top.*/restAjax.path('api/sample/count-dept', []), {}, null, function(code, data) {
|
||||
$("#sampleNum").html(data.data);
|
||||
}, function(code, data) {
|
||||
/*top.*/dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = /*top.*/dialog.msg(/*top.*/dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
/*top.*/dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 统计案件数量
|
||||
|
Loading…
Reference in New Issue
Block a user