From 9cd48c4fb39f931e477e9e56c0e5d58452ce5739 Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Wed, 8 Dec 2021 17:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E4=BD=8D=E7=9A=84?= =?UTF-8?q?=E7=96=91=E9=9A=BE=E6=A1=88=E4=BB=B6=20/=20=E6=A0=87=E6=9D=86?= =?UTF-8?q?=E6=A1=88=E4=BB=B6=20=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E5=BC=8F=20=E5=A2=9E=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E7=96=91=E9=9A=BE=E6=A1=88=E4=BB=B6=E5=92=8C=E6=A0=87=E6=A1=88?= =?UTF-8?q?=E6=A1=88=E4=BB=B6=E7=9A=84=E5=8F=AA=E7=9C=8B=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=E7=9A=84=E6=A1=88=E4=BB=B6=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD,=20=E4=BB=A5=E5=8F=8A=E5=8F=AA=E8=83=BD=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E5=8F=96=E6=B6=88=E6=A0=87=E8=AE=B0=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20=E5=A2=9E=E5=8A=A0=E5=8D=95=E4=BD=8D=E7=9A=84?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E6=95=88=E7=8E=87=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E4=BA=86=E5=8D=95=E4=BD=8D=E7=9A=84?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E6=95=88=E7=8E=87=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=9A=84=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CaseStatisticsController.java | 180 +++++++++++++++++- .../api/difficult/DifficultController.java | 5 +- .../api/sample/SampleController.java | 63 +++++- .../cn/com/tenlion/dao/sample/ISampleDao.java | 16 ++ .../dtos/difficult/DifficultReportDTO.java | 20 ++ .../pojo/dtos/sample/SampleReportDTO.java | 20 ++ .../com/tenlion/remote/GridRemoteService.java | 16 +- .../ICaseStatisticsService.java | 15 ++ .../impl/ICaseStatisticsServiceImpl.java | 113 ++++++++++- .../service/difficult/IDifficultService.java | 4 +- .../difficult/impl/DifficultServiceImpl.java | 27 ++- .../service/sample/ISampleService.java | 19 +- .../sample/impl/SampleServiceImpl.java | 48 ++++- .../mapper/difficult/difficult-mapper.xml | 128 ++++++++++--- .../mybatis/mapper/sample/sample-mapper.xml | 135 +++++++++++-- .../route/casestatistics/department.html | 83 +++++++- .../static/route/casestatistics/grid.html | 90 ++++++++- .../static/route/difficult/list-area.html | 17 +- .../static/route/difficult/list-dept.html | 17 +- .../static/route/sample/list-area.html | 17 +- .../templates/workbench/area-work.html | 6 +- .../templates/workbench/dept-work.html | 52 ++++- 22 files changed, 986 insertions(+), 105 deletions(-) diff --git a/src/main/java/cn/com/tenlion/controller/api/casestatistics/CaseStatisticsController.java b/src/main/java/cn/com/tenlion/controller/api/casestatistics/CaseStatisticsController.java index 25bb899..556e246 100644 --- a/src/main/java/cn/com/tenlion/controller/api/casestatistics/CaseStatisticsController.java +++ b/src/main/java/cn/com/tenlion/controller/api/casestatistics/CaseStatisticsController.java @@ -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 getCurrentDepartmentIdList(String departmentId) { + List departmentIdList = new ArrayList(); + // 加载全部 + if(StringUtils.isEmpty(departmentId)) { + List departmentSimpleDTOList = securityComponent.getCurrentUser().getDepartments(); + for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) { + List 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 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 departmentGridExcel() { + String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); + Map queryParams = new HashMap(); + queryParams.put("access_token", accessToken); + + List departmentList = new ArrayList(); + UserInfoBO userInfoBO = securityComponent.getCurrentUser(); + List 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 successData = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo); + tempDTO.setDataCount(successData.getData()); + departmentList.add(tempDTO); + + List 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 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 successData2 = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo2); + tempDTO.setDataCount(successData2.getData()); + departmentList.add(tempDTO); + } + } + Map params = requestParams(); + return iCaseStatisticsService.gridDepartmentGridList(departmentList, params); + } + + + @ApiOperation(value = "单位的网格员统计(右侧)", notes = "单位的网格员统计(右侧)") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("departmentgridlist") + public SuccessResultList> departmentGridList(ListPage page) { + Map 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 departmentTree() { + String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); + Map queryParams = new HashMap(); + queryParams.put("access_token", accessToken); + + List departmentList = new ArrayList(); + UserInfoBO userInfoBO = securityComponent.getCurrentUser(); + List 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 successData = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo); + tempDTO.setDataCount(successData.getData()); + departmentList.add(tempDTO); + + List 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 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 successData2 = gridRemoteService.teamCountByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo2); + tempDTO.setDataCount(successData2.getData()); + departmentList.add(tempDTO); + } + } + return departmentList; + } @ApiOperation(value = "区域网格员数量统计导出", notes = "区域网格员数量统计导出") @ApiImplicitParams({ diff --git a/src/main/java/cn/com/tenlion/controller/api/difficult/DifficultController.java b/src/main/java/cn/com/tenlion/controller/api/difficult/DifficultController.java index 6944156..1d50786 100644 --- a/src/main/java/cn/com/tenlion/controller/api/difficult/DifficultController.java +++ b/src/main/java/cn/com/tenlion/controller/api/difficult/DifficultController.java @@ -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> listPageArea(ListPage page) { Map params = requestParams(); page.setParams(params); - return difficultService.listPageArea(page); + UserInfoBO userInfoBO = securityComponent.getCurrentUser(); + return difficultService.listPageArea(page, userInfoBO.getUserId()); } @ApiOperation(value = "疑难案件统计", notes = "疑难案件统计接口") diff --git a/src/main/java/cn/com/tenlion/controller/api/sample/SampleController.java b/src/main/java/cn/com/tenlion/controller/api/sample/SampleController.java index f03e029..ce058c1 100644 --- a/src/main/java/cn/com/tenlion/controller/api/sample/SampleController.java +++ b/src/main/java/cn/com/tenlion/controller/api/sample/SampleController.java @@ -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 countDept() { + UserInfoBO userInfoBO = securityComponent.getCurrentUser(); + /** + * 封装当前人所在的单位集 + */ + List departmentIdList = new ArrayList(); + List departmentSimpleDTOList = userInfoBO.getDepartments(); + for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) { + List departmentPOList = iDepartmentBaseService.listByParentId(departmentSimpleDTO.getDepartmentId()); + for (DepartmentDTO departmentDTO : departmentPOList) { + departmentIdList.add(departmentDTO.getDepartmentId()); + } + departmentIdList.add(departmentSimpleDTO.getDepartmentId()); + } + return new SuccessResultData(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> listPageDept(ListPage page) { + Map params = requestParams(); + page.setParams(params); + UserInfoBO userInfoBO = securityComponent.getCurrentUser(); + /** + * 封装当前人所在的单位集 + */ + List departmentIdList = new ArrayList(); + List departmentSimpleDTOList = userInfoBO.getDepartments(); + for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) { + List 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> listPageArea(ListPage page) { Map params = requestParams(); page.setParams(params); - return sampleService.listPageArea(page); + UserInfoBO userInfoBO = securityComponent.getCurrentUser(); + return sampleService.listPageArea(page, userInfoBO.getUserId()); } @ApiOperation(value = "案件标杆统计", notes = "案件标杆统计接口") diff --git a/src/main/java/cn/com/tenlion/dao/sample/ISampleDao.java b/src/main/java/cn/com/tenlion/dao/sample/ISampleDao.java index e5d33e6..5d9ef97 100644 --- a/src/main/java/cn/com/tenlion/dao/sample/ISampleDao.java +++ b/src/main/java/cn/com/tenlion/dao/sample/ISampleDao.java @@ -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 params) throws SearchException; + + /** + * 单位标杆案件分页列表 + * @param params + * @return + */ + List listDept(Map params); + + /** + * 单位标杆案件数量 + * @param params + * @return + */ + Integer countDept(Map params); + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/difficult/DifficultReportDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/difficult/DifficultReportDTO.java index f72f153..4d5b849 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/difficult/DifficultReportDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/difficult/DifficultReportDTO.java @@ -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; diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/sample/SampleReportDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/sample/SampleReportDTO.java index 3dcb60e..d6aeb2e 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/sample/SampleReportDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/sample/SampleReportDTO.java @@ -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; diff --git a/src/main/java/cn/com/tenlion/remote/GridRemoteService.java b/src/main/java/cn/com/tenlion/remote/GridRemoteService.java index 663f7e1..dd48d47 100644 --- a/src/main/java/cn/com/tenlion/remote/GridRemoteService.java +++ b/src/main/java/cn/com/tenlion/remote/GridRemoteService.java @@ -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 listByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParamsMap Map params, @RemoteJsonBodyParams IdsVO idsVO); + + @RemotePostMethod("/resource/teammember/count/department-ids") + SuccessResultData teamCountByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParamsMap Map params, @RemoteJsonBodyParams IdsVO idsVO); + + @RemotePostMethod("/resource/teammember/listpage/department-ids") + SuccessResultList> listPageByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParamsMap Map params, @RemoteJsonBodyParams IdsVO idsVO); + @RemoteGetMethod("/resource/grid/list-all/area-code/{areaCode}") List list(@RemoteServerParams String userCenter, @RemotePathParams("areaCode") String areaCode, @RemoteQueryParams("access_token") String accessToken); diff --git a/src/main/java/cn/com/tenlion/service/casestatistics/ICaseStatisticsService.java b/src/main/java/cn/com/tenlion/service/casestatistics/ICaseStatisticsService.java index 040aa25..a250c3e 100644 --- a/src/main/java/cn/com/tenlion/service/casestatistics/ICaseStatisticsService.java +++ b/src/main/java/cn/com/tenlion/service/casestatistics/ICaseStatisticsService.java @@ -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 params); + /** + * 部门下的网格员分页列表 + * @param page + * @param userId + * @return + */ + SuccessResultList> gridDepartmentGridListPage(ListPage page, String userId); + + /** + * 部门下的网格员列表 + * @param params + * @return + */ + List gridDepartmentGridList(List departmentList, Map params); } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java b/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java index 453dec9..8f67e4f 100644 --- a/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java @@ -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 getCurrentDepartmentIdList(String departmentId) { + List departmentIdList = new ArrayList(); + // 加载全部 + if(StringUtils.isEmpty(departmentId)) { + List departmentSimpleDTOList = securityComponent.getCurrentUser().getDepartments(); + for (DepartmentSimpleDTO departmentSimpleDTO : departmentSimpleDTOList) { + List 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 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 list = areaService.listByParentId(areaId); - + // 方面方法将区域ID写死没有通用性, 增加系统通用性 + if("2".equals(areaDTO.getAreaLevel()) && list.size() < 1) { + list.add(areaDTO); + } List itemDTOList = new ArrayList(); 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 gridDepartmentGridList(List departmentList, Map params) { + String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); + Map queryParams = new HashMap(); + queryParams.put("access_token", accessToken); + + IdsVO vo2 = new IdsVO(); + List idList = new ArrayList(); + for(DepartmentDataDTO dataDTO : departmentList) { + idList.clear(); + idList.add(dataDTO.getDepartmentId()); + vo2.setIds(idList); + List teamMemberDTOList = gridRemoteService.listByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo2); + List resultList = new ArrayList(); + 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> gridDepartmentGridListPage(ListPage page, String userId) { + /** + * 按照部门ID查找网格员 + */ + Map params = page.getParams(); + String departmentId = params.get("departmentId") == null ? "" : params.get("departmentId").toString(); + List teamMemberDTOList = new ArrayList(); + // 区域查询 + String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); + Map queryParams = new HashMap(); + 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> teamMemberDTOListPage = gridRemoteService.listPageByDepartmentIds(apiPathProperties.getUserCenter(), queryParams, vo); + teamMemberDTOList.addAll(teamMemberDTOListPage.getRows()); + List list = new ArrayList(); + for(TeamMemberDTO teamMemberDTO : teamMemberDTOList) { + // 封装统计数据 + CaseStatisticsAreaDataDTO dataDTO = getGridAreaList(teamMemberDTO.getUserId(), page.getParams()); + dataDTO.setName(teamMemberDTO.getUserName()); + dataDTO.setId(teamMemberDTO.getUserId()); + list.add(dataDTO); + } + PageInfo pageInfo = new PageInfo<>(list); + return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override public SuccessResultList> departmentAreaListPage(ListPage page) { Map params = page.getParams(); AreaDataDTO areaDataDTO = getCurrentAreaRoot(); String areaId = params.get("areaId") == null ? areaDataDTO.getAreaId() : params.get("areaId").toString(); AreaDTO areaDTO = areaService.get(areaId); + // 查找子区域|(用于解决市辖区无法加载子集数据) + List areaList = areaService.listByParentId(areaId); // 区域查询 List departmentList = new ArrayList(); - 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> 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 list = areaService.listByParentId(areaId); + // 避免市辖区下面没有区域造成数据无法显示 +// if("110890".equals(areaId)) { +// list.add(areaDTO); +// } + // 方面方法将区域ID写死没有通用性, 增加系统通用性 + if("2".equals(areaDTO.getAreaLevel()) && list.size() < 1) { + list.add(areaDTO); + } // 封装子区域 List itemDTOList = new ArrayList(); 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 areaList = areaService.listByParentId(areaId); // 区域查询 String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); Map queryParams = new HashMap(); @@ -283,7 +385,7 @@ public class ICaseStatisticsServiceImpl extends DefaultBaseService implements IC queryParams.put("sort", "ASC"); queryParams.put("page", page.getPage()); List teamMemberDTOList = new ArrayList(); - 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> 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 list = areaService.listByParentId(areaId); + // 方面方法将区域ID写死没有通用性, 增加系统通用性 + if("2".equals(areaDTO.getAreaLevel()) && list.size() < 1) { + list.add(areaDTO); + } // 封装子区域 List itemDTOList = new ArrayList(); 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()); diff --git a/src/main/java/cn/com/tenlion/service/difficult/IDifficultService.java b/src/main/java/cn/com/tenlion/service/difficult/IDifficultService.java index e020432..77b7af6 100644 --- a/src/main/java/cn/com/tenlion/service/difficult/IDifficultService.java +++ b/src/main/java/cn/com/tenlion/service/difficult/IDifficultService.java @@ -33,7 +33,7 @@ public interface IDifficultService { * @param page * @return */ - SuccessResultList> listPageArea(ListPage page); + SuccessResultList> listPageArea(ListPage page, String userId); /** * 统计案件疑难次数 @@ -214,7 +214,7 @@ public interface IDifficultService { * @param departmentIdList * @return */ - SuccessResultList> listPageDept(ListPage page, List departmentIdList); + SuccessResultList> listPageDept(ListPage page, List departmentIdList, String userId); /** * 单位疑难案件数量 diff --git a/src/main/java/cn/com/tenlion/service/difficult/impl/DifficultServiceImpl.java b/src/main/java/cn/com/tenlion/service/difficult/impl/DifficultServiceImpl.java index 0071003..026171f 100644 --- a/src/main/java/cn/com/tenlion/service/difficult/impl/DifficultServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/difficult/impl/DifficultServiceImpl.java @@ -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> listPageDept(ListPage page, List departmentIdList) { + public SuccessResultList> listPageDept(ListPage page, List 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 difficultReportDTOList = difficultDao.listDept(page.getParams()); + // 只有自己疑难的, 自己可以取消 + for(DifficultReportDTO difficultReportDTO : difficultReportDTOList) { + if(userId.equals(difficultReportDTO.getDifficultCreateUserId())) { + difficultReportDTO.setDifficultCancel(true); + } + } PageInfo 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> listPageArea(ListPage page) { + public SuccessResultList> 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 difficultReportDTOS = difficultDao.listArea(page.getParams()); + // 只有自己疑难的, 自己可以取消 + for(DifficultReportDTO difficultReportDTO : difficultReportDTOS) { + if(userId.equals(difficultReportDTO.getDifficultCreateUserId())) { + difficultReportDTO.setDifficultCancel(true); + } + } PageInfo pageInfo = new PageInfo<>(difficultReportDTOS); return new SuccessResultList<>(difficultReportDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); } - - - - @Override public void save(DifficultVO difficultVO) { saveReturnId(difficultVO); diff --git a/src/main/java/cn/com/tenlion/service/sample/ISampleService.java b/src/main/java/cn/com/tenlion/service/sample/ISampleService.java index 6bc2a8c..75c0042 100644 --- a/src/main/java/cn/com/tenlion/service/sample/ISampleService.java +++ b/src/main/java/cn/com/tenlion/service/sample/ISampleService.java @@ -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> listPageArea(ListPage page); - + SuccessResultList> listPageArea(ListPage page, String userId); /** * 根据区域统计 @@ -204,4 +204,19 @@ public interface ISampleService { */ Integer count(Map params); + /** + * 单位标杆案件分页列表 + * @param page + * @param departmentIdList + * @return + */ + SuccessResultList> listPageDept(ListPage page, List departmentIdList, String userId); + + /** + * 单位标杆案件数量 + * @param departmentIdList + * @return + */ + Integer countDept(List departmentIdList); + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/sample/impl/SampleServiceImpl.java b/src/main/java/cn/com/tenlion/service/sample/impl/SampleServiceImpl.java index d5604a0..c30f167 100644 --- a/src/main/java/cn/com/tenlion/service/sample/impl/SampleServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/sample/impl/SampleServiceImpl.java @@ -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> listPageDept(ListPage page, List 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 sampleReportDTOList = sampleDao.listDept(page.getParams()); + // 只有自己标记的, 自己可以取消 + for(SampleReportDTO sampleReportDTO : sampleReportDTOList) { + if(userId.equals(sampleReportDTO.getSampleCreateUserId())) { + sampleReportDTO.setSampleCancel(true); + } + } + PageInfo pageInfo = new PageInfo<>(sampleReportDTOList); + return new SuccessResultList<>(sampleReportDTOList, pageInfo.getPageNum(), pageInfo.getTotal()); + } + @Override + public Integer countDept(List departmentIdList) { + Map 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 params = new HashMap<>(); @@ -47,22 +81,24 @@ public class SampleServiceImpl extends DefaultBaseService implements ISampleServ return sampleDao.countByAreaCode(params); } - - - @Override - public SuccessResultList> listPageArea(ListPage page) { + public SuccessResultList> 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 sampleReportDTOS = sampleDao.listArea(page.getParams()); + // 只有自己标记的, 自己可以取消 + for(SampleReportDTO sampleReportDTO : sampleReportDTOS) { + if(userId.equals(sampleReportDTO.getSampleCreateUserId())) { + sampleReportDTO.setSampleCancel(true); + } + } PageInfo pageInfo = new PageInfo<>(sampleReportDTOS); return new SuccessResultList<>(sampleReportDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); } - - @Override public void save(SampleVO sampleVO) { saveReturnId(sampleVO); diff --git a/src/main/resources/mybatis/mapper/difficult/difficult-mapper.xml b/src/main/resources/mybatis/mapper/difficult/difficult-mapper.xml index b5fea2a..3564af3 100644 --- a/src/main/resources/mybatis/mapper/difficult/difficult-mapper.xml +++ b/src/main/resources/mybatis/mapper/difficult/difficult-mapper.xml @@ -38,6 +38,7 @@ + @@ -64,7 +65,7 @@ - + - + - - - - - - - - - + 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}' + ) + ) + - - + + @@ -214,6 +311,7 @@ -