@@ -218,7 +218,9 @@ public class QueryInspectionPageListService { | |||
for (InspectionVo inspectionVo : inspectionVoList) { | |||
deptName = deptMap.get(inspectionVo.getDeptId()); | |||
inspectionVo.setDeptName(deptName); | |||
inspectionVo.setAiVideoUrl(CommonConfig.videoURL + inspectionVo.getAiVideoUrl()); | |||
if (StringUtils.isNotEmpty(inspectionVo.getAiVideoUrl())) { | |||
inspectionVo.setAiVideoUrl(CommonConfig.videoURL + inspectionVo.getAiVideoUrl()); | |||
} | |||
executeHandle.handler(user, dept, inspectionVo); | |||
} | |||
return inspectionVoList; |
@@ -180,6 +180,9 @@ public class QueryInspectionHandleReportService { | |||
* @return | |||
*/ | |||
private Map<String, User> getUserMap(List<InspectionFileHandle> inspectionFileHandleList) { | |||
if (CollectionUtil.isEmpty(inspectionFileHandleList)) { | |||
return null; | |||
} | |||
List<String> userIdList = inspectionFileHandleList.stream().map(o -> o.getHandlerUser()).collect(Collectors.toList()); | |||
if (CollectionUtil.isEmpty(userIdList)) { | |||
return null; |
@@ -57,14 +57,16 @@ public class QueryRoadListByDeptIdService { | |||
Dept dept = (Dept) result.getData(); | |||
// 获取公路列表 | |||
List<RoadInformation> roadInformationList; | |||
if (SystemConstant.ROOT_DEPT_PID.equals(dept.getPid())) { | |||
// 顶级部门获取所有的公路列表 | |||
roadInformationList = this.getAllRoadInformationList(tenantId); | |||
} else { | |||
// 非顶级部门获取该部门下公路列表 | |||
roadInformationList = this.getRoadInformationListByDeptId(tenantId, deptId); | |||
} | |||
// List<RoadInformation> roadInformationList; | |||
// if (SystemConstant.ROOT_DEPT_PID.equals(dept.getPid())) { | |||
// // 顶级部门获取所有的公路列表 | |||
// roadInformationList = this.getAllRoadInformationList(tenantId); | |||
// } else { | |||
// // 非顶级部门获取该部门下公路列表 | |||
// roadInformationList = this.getRoadInformationListByDeptId(tenantId, deptId); | |||
// } | |||
// 获取公路列表 | |||
List<RoadInformation> roadInformationList = this.getRoadInformationListByDeptId(tenantId, deptId); | |||
if (CollectionUtil.isEmpty(roadInformationList)) { | |||
log.info("根据部门Id查询公路列表业务:公路信息为空"); | |||
return JsonResult.error(QueryRoadListByDeptIdCodeEnum.ROAD_LIST_IS_NULL.getCode(), QueryRoadListByDeptIdCodeEnum.ROAD_LIST_IS_NULL.getMsg()); |
@@ -17,7 +17,6 @@ import com.tuoheng.admin.mapper.RoadInformationMapper; | |||
import com.tuoheng.admin.mapper.SectionDeptMapper; | |||
import com.tuoheng.admin.mapper.SectionMapper; | |||
import com.tuoheng.admin.query.SectionQuery; | |||
import com.tuoheng.admin.service.section.ISectionService; | |||
import com.tuoheng.admin.service.section.query.QuerySectionListByDeptIdService; | |||
import com.tuoheng.admin.service.section.query.QuerySectionListByRoadIdAndDeptIdService; | |||
import com.tuoheng.admin.service.section.query.QuerySectionListByRoadIdService; |
@@ -92,10 +92,18 @@ public class QuerySectionListByRoadIdAndDeptIdService { | |||
return JsonResult.error(QuerySectionListByRoadIdCodeEnum.DEPT_ID_IS_NULL.getCode(), QuerySectionListByRoadIdCodeEnum.DEPT_ID_IS_NULL.getMsg()); | |||
} | |||
// 判断部门是否存在 | |||
Dept dept = deptMapper.selectOne(new LambdaQueryWrapper<Dept>() | |||
.eq(Dept::getTenantId, tenantId) | |||
.eq(Dept::getId, deptId) | |||
.eq(Dept::getMark, 1)); | |||
Dept dept; | |||
if (SystemConstant.ROOT_DEPT_PID.equals(deptId)) { | |||
dept = deptMapper.selectOne(new LambdaQueryWrapper<Dept>() | |||
.eq(Dept::getTenantId, tenantId) | |||
.eq(Dept::getPid, SystemConstant.ROOT_DEPT_PID) | |||
.eq(Dept::getMark, 1)); | |||
} else { | |||
dept = deptMapper.selectOne(new LambdaQueryWrapper<Dept>() | |||
.eq(Dept::getTenantId, tenantId) | |||
.eq(Dept::getId, deptId) | |||
.eq(Dept::getMark, 1)); | |||
} | |||
if (ObjectUtil.isNull(dept)) { | |||
return JsonResult.error(QuerySectionListByRoadIdCodeEnum.DEPT_IS_NOT_EXIST.getCode(), QuerySectionListByRoadIdCodeEnum.DEPT_IS_NOT_EXIST.getMsg()); | |||
} |