From 47712cc6cd4d52fcd1dde44e2a400ccbb9c6ae7a Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 12 Apr 2024 15:20:49 +0800
Subject: [PATCH] 民警网格区域查询合并,网格员区域树查询修改,解决不显示网格问题
---
src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java
index 664a15e..2da3a52 100644
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java
+++ b/src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java
@@ -22,6 +22,7 @@
import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
import org.springblade.common.constant.CommonConstant;
import org.springblade.common.constant.DictConstant;
+import org.springblade.common.exception.CustomException;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.utils.AuthUtils;
import org.springblade.common.utils.SpringUtils;
@@ -136,12 +137,12 @@
@Override
@Transactional(rollbackFor = Exception.class)
- public Boolean savePlace(TaskPlaceSelfCheckVO taskPlaceSelfCheck) throws Exception {
+ public Boolean savePlace(TaskPlaceSelfCheckVO taskPlaceSelfCheck) {
taskPlaceSelfCheck.setCreateUser(AuthUtil.getUserId());
// 1.保存任务表
ITaskService bean2 = SpringUtils.getBean(ITaskService.class);
Long aLong = bean2.saveTask(CommonConstant.NUMBER_ONE, DictConstant.FIRE_SELF_CHECK_NOTICE, 1,
- "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_TWO, 1);
+ "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_SEVEN, 1);
if (aLong <= 0) {
return false;
}
@@ -155,6 +156,7 @@
taskPlaceRecordList.stream().forEach(item -> {
item.setTaskPlaceSelfCheckId(taskPlaceSelfCheck.getId());
item.setCreateUser(AuthUtil.getUserId());
+ item.setType("1");
});
List<TaskPlaceRecordEntity> collect = taskPlaceRecordList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList());
if (collect.size() > 0) {
@@ -167,8 +169,8 @@
}
@Override
- @Transactional(rollbackFor = Exception.class)
- public Boolean updateTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck) throws Exception {
+ @Transactional
+ public Boolean updateTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck) {
// 1.更新任务表
ITaskService taskService = SpringUtils.getBean(ITaskService.class);
Long aLong = taskService.updateTask(null, null, null, taskPlaceSelfCheck.getReasonFailure(), AuthUtil.getUserId(), taskPlaceSelfCheck.getTaskId(), taskPlaceSelfCheck.getStatus());
@@ -187,11 +189,11 @@
if (b) {
return b;
}
- throw new Exception("保存失败!");
+ throw new CustomException("保存失败!");
}
return save;
}
- throw new Exception("保存失败!");
+ throw new CustomException("保存失败!");
}
/**
@@ -251,4 +253,9 @@
}
return 0;
}
+
+ @Override
+ public TaskPlaceSelfCheckEntity getDetailByTaskId(Long taskId) {
+ return baseMapper.getDetailByTaskId( taskId);
+ }
}
--
Gitblit v1.9.3