Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
6a7c1baab6
5 changed files with 28 additions and 14 deletions
  1. +3
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java
  2. +3
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/query/QueryInspectionHandleReportService.java
  3. +10
    -8
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/query/QueryRoadListByDeptIdService.java
  4. +0
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/SectionServiceImpl.java
  5. +12
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/query/QuerySectionListByRoadIdAndDeptIdService.java

+ 3
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java View File

@@ -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;

+ 3
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/query/QueryInspectionHandleReportService.java View File

@@ -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;

+ 10
- 8
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/query/QueryRoadListByDeptIdService.java View File

@@ -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());

+ 0
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/SectionServiceImpl.java View File

@@ -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;

+ 12
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/query/QuerySectionListByRoadIdAndDeptIdService.java View File

@@ -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());
}

Loading…
Cancel
Save