Commit d65c7bd3 authored by wujiang's avatar wujiang

添加权限过滤

parent ed8343b3
...@@ -42,6 +42,10 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -42,6 +42,10 @@ public class McbWarningServiceImpl implements IMcbWarningService {
@Override @Override
public Map<String, Object> queryTodayCount(Integer processingStatus) { public Map<String, Object> queryTodayCount(Integer processingStatus) {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty())
{
projectOrgCodes.add("NULL");
}
return mcbWarningMapper.queryTodayCount(projectOrgCodes, processingStatus); return mcbWarningMapper.queryTodayCount(projectOrgCodes, processingStatus);
} }
...@@ -53,6 +57,10 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -53,6 +57,10 @@ public class McbWarningServiceImpl implements IMcbWarningService {
@Override @Override
public List<Map<String, Object>> queryWeekCount() { public List<Map<String, Object>> queryWeekCount() {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty())
{
projectOrgCodes.add("NULL");
}
return mcbWarningMapper.queryWeekCount(projectOrgCodes); return mcbWarningMapper.queryWeekCount(projectOrgCodes);
} }
...@@ -69,6 +77,10 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -69,6 +77,10 @@ public class McbWarningServiceImpl implements IMcbWarningService {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
long start = page.getCurrent() - 1; long start = page.getCurrent() - 1;
long offset = page.getSize() * page.getCurrent(); long offset = page.getSize() * page.getCurrent();
if(projectOrgCodes.isEmpty())
{
projectOrgCodes.add("NULL");
}
List<Map<String, Object>> records = mcbWarningMapper.queryWarningList(start, offset, projectOrgCodes, List<Map<String, Object>> records = mcbWarningMapper.queryWarningList(start, offset, projectOrgCodes,
processingStatus, eventLevel, createDate, warningSourceType); processingStatus, eventLevel, createDate, warningSourceType);
Long total = mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate, Long total = mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate,
...@@ -88,6 +100,10 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -88,6 +100,10 @@ public class McbWarningServiceImpl implements IMcbWarningService {
public Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate, public Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate,
String warningSourceType) { String warningSourceType) {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty())
{
projectOrgCodes.add("NULL");
}
return mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate, return mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate,
warningSourceType); warningSourceType);
} }
...@@ -104,6 +120,10 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -104,6 +120,10 @@ public class McbWarningServiceImpl implements IMcbWarningService {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
long start = page.getCurrent() - 1; long start = page.getCurrent() - 1;
long offset = page.getSize() * page.getCurrent(); long offset = page.getSize() * page.getCurrent();
if(projectOrgCodes.isEmpty())
{
projectOrgCodes.add("NULL");
}
List<Map<String, Object>> records = mcbWarningMapper.queryQuestionList(start, offset, projectOrgCodes, List<Map<String, Object>> records = mcbWarningMapper.queryQuestionList(start, offset, projectOrgCodes,
completionStatus); completionStatus);
Long total = mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus); Long total = mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus);
...@@ -121,6 +141,10 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -121,6 +141,10 @@ public class McbWarningServiceImpl implements IMcbWarningService {
@Override @Override
public Long queryQuestionCount(Integer completionStatus) { public Long queryQuestionCount(Integer completionStatus) {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty())
{
projectOrgCodes.add("NULL");
}
return mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus); return mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus);
} }
...@@ -223,7 +247,8 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -223,7 +247,8 @@ public class McbWarningServiceImpl implements IMcbWarningService {
*/ */
@Override @Override
public Object getTaskDetailStatistic(Map<String, Object> map) { public Object getTaskDetailStatistic(Map<String, Object> map) {
map.put("projectOrgCodes", this.getProjectOrgCodes()); List<String> projectOrgCodes = this.getProjectOrgCodes();
map.put("projectOrgCodes", projectOrgCodes);
FeignClientResult result = mcbWarningFeign.getTaskDetailStatistic(map); FeignClientResult result = mcbWarningFeign.getTaskDetailStatistic(map);
return result.getResult(); return result.getResult();
} }
...@@ -234,6 +259,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -234,6 +259,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
*/ */
@Override @Override
public Object getQuestionRecordStatistic(Map<String, Object> map) { public Object getQuestionRecordStatistic(Map<String, Object> map) {
List<String> projectOrgCodes = this.getProjectOrgCodes();
map.put("projectOrgCodes", this.getProjectOrgCodes()); map.put("projectOrgCodes", this.getProjectOrgCodes());
FeignClientResult result = mcbWarningFeign.getQuestionRecordStatistic(map); FeignClientResult result = mcbWarningFeign.getQuestionRecordStatistic(map);
return result.getResult(); return result.getResult();
...@@ -245,7 +271,12 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -245,7 +271,12 @@ public class McbWarningServiceImpl implements IMcbWarningService {
*/ */
@Override @Override
public Object getMapRouteInfoByCodes(String province) { public Object getMapRouteInfoByCodes(String province) {
FeignClientResult<Object> result = mcbWarningFeign.getMapRouteInfoByCodes(province, this.getProjectOrgCodes(), "in"); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty())
{
projectOrgCodes.add("NULL");
}
FeignClientResult<Object> result = mcbWarningFeign.getMapRouteInfoByCodes(province, projectOrgCodes, "in");
return result.getResult(); return result.getResult();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment