Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.1.0^2
wanjing 1 year ago
parent
commit
f615c31c95
3 changed files with 23 additions and 8 deletions
  1. +3
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java
  2. +15
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/SectionServiceImpl.java
  3. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileVo.java

+ 3
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java View File

@@ -28,6 +28,7 @@ import com.tuoheng.admin.service.inspectionfile.update.UpdateInspectionFileQuest
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.inspection.InspectionFileVo;
import com.tuoheng.admin.vo.ListByDeptUserTypeVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.enums.ServiceExceptionEnum;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.JsonResult;
@@ -119,9 +120,6 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(Wrappers.<InspectionFile>lambdaQuery()
.eq(InspectionFile::getMark, 1)
.eq(InspectionFile::getTenantId, tenantId));
if (CollectionUtil.isEmpty(inspectionFileList)) {
return JsonResult.success("该覆盖区域范围内没有问题");
}
for (InspectionFile inspectionFile : inspectionFileList) {
//任务状态判断
if(20 == inspectionFile.getStatus()){
@@ -147,9 +145,6 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
.eq(InspectionFile::getMark, 1)
.eq(InspectionFile::getTenantId, tenantId)
.eq(InspectionFile::getInspectionId, inspection.getId()));
if (CollectionUtil.isEmpty(inspectionFileList)) {
return JsonResult.success("该覆盖区域范围内没有问题");
}
for (InspectionFile inspectionFile : inspectionFileList) {
//任务状态判断
if(20 == inspectionFile.getStatus()){
@@ -168,6 +163,8 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
List<InspectionFileVo> list = inspectionFileLists.stream().map(x -> {
InspectionFileVo vo = new InspectionFileVo();
BeanUtils.copyProperties(x, vo);
//标记图片
vo.setFileImage(CommonConfig.imageURL+x.getFileImage());
//任务名称
if (StringUtils.isNotEmpty(x.getInspectionId())) {
Inspection inspection = inspectionMapper.selectById(x.getInspectionId());

+ 15
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/section/SectionServiceImpl.java View File

@@ -306,14 +306,27 @@ public class SectionServiceImpl extends BaseServiceImpl<SectionMapper, Section>
//对应部门下的路段列表
List<SectionDept> sectionDeptList = sectionDeptMapper.selectList(new LambdaQueryWrapper<SectionDept>()
.eq(SectionDept::getDeptId, deptId).eq(SectionDept::getTenantId, tenantId));
//获取对应的路列表
//获取对应的路列表
List<String> sectionList = sectionDeptList.stream().map(t -> t.getSectionId()).collect(Collectors.toList());
//获取当前租户当前部门下的路段列表
list = sectionMapper.selectList(Wrappers.<Section>lambdaQuery()
.eq(Section::getTenantId, tenantId)
.eq(Section::getMark, MarkEnum.VALID.getCode())
.in(Section::getId, sectionList));
return JsonResult.success(list);
List<Section> sections = new ArrayList<>();
for (Section section : list) {
String roadId = section.getRoadId();
//每条路段对应的公路代号
RoadInformation roadInformation = roadInformationMapper.selectOne(Wrappers.<RoadInformation>lambdaQuery()
.eq(RoadInformation::getTenantId, tenantId)
.eq(RoadInformation::getId, roadId)
.eq(RoadInformation::getMark, MarkEnum.VALID.getCode()));
if(roadInformation !=null){
section.setCode(roadInformation.getCode());
}
sections.add(section);
}
return JsonResult.success(sections);
}

return JsonResult.error(SectionEnum.QUERY_IS_FAILED.getCode());

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileVo.java View File

@@ -46,4 +46,9 @@ public class InspectionFileVo {
*/
private String content;

/**
* 标记图
*/
private String fileImage;

}

Loading…
Cancel
Save