Browse Source

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

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
183bee6df4
24 changed files with 94 additions and 81 deletions
  1. +5
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFile.java
  2. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFileDistribution.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFileExtend.java
  4. +1
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFileDistributionListRequest.java
  5. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFilePageListByInspectionIdRequest.java
  6. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFilePageListRequest.java
  7. +2
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java
  8. +1
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java
  9. +3
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateInspectionStatusService.java
  10. +8
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/InspectionFileServiceImpl.java
  11. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/confirm/InspectionFileConfirmService.java
  12. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/handle/QueryInspectionFileHandleByInspectionFileIdService.java
  13. +3
    -8
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByInspectionIdService.java
  14. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByWorkOrderIdService.java
  15. +2
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListService.java
  16. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/update/UpdateInspectionFileQuestionTypeService.java
  17. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/GenerateReportWordService.java
  18. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/query/QueryInspectionReportService.java
  19. +4
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java
  20. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleVo.java
  21. +16
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListByInspectionIdVo.java
  22. +11
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListVo.java
  23. +18
    -20
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml
  24. +0
    -2
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 5
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFile.java View File

private String gaodeAddress; private String gaodeAddress;
/** /**
* 问题类型二级分类ID
* 图片来源:1AI 2后台 3视频
*/ */
private String questionId;
private Integer source;
/** /**
* 图片来源:1AI 2后台 3视频
* 问题类型二级分类ID
*/ */
private Integer source;
private String questionCode;
/** /**
* 问题名称 * 问题名称
/** /**
* 巡检内容 * 巡检内容
*/ */
private String content;
private String questionContent;
/** /**
* 详细描述 * 详细描述

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFileDistribution.java View File

/** /**
* 问题类型二级分类ID * 问题类型二级分类ID
*/ */
private String questionId;
private String questionCode;
/** /**
* 问题名称 * 问题名称

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFileExtend.java View File

/** /**
* 问题类型二级分类ID * 问题类型二级分类ID
*/ */
private String questionId;
private String questionCode;
/** /**
* 图片来源:1AI 2后台 3视频 * 图片来源:1AI 2后台 3视频
/** /**
* 巡检内容 * 巡检内容
*/ */
private String content;
private String questionContent;
/** /**
* 详细描述 * 详细描述

+ 1
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFileDistributionListRequest.java View File

package com.tuoheng.admin.request.inspectionfile; package com.tuoheng.admin.request.inspectionfile;


import com.tuoheng.common.core.common.BaseQuery;
import lombok.Data; import lombok.Data;


import java.util.List; import java.util.List;
/** /**
* 问题类型 * 问题类型
*/ */
private String questionId;
private String questionCode;


/** /**
* 问题状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理 * 问题状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFilePageListByInspectionIdRequest.java View File

/** /**
* 问题类型 * 问题类型
*/ */
private String questionId;
private String questionCode;


/** /**
* 问题状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理 * 问题状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspectionfile/QueryInspectionFilePageListRequest.java View File

/** /**
* 问题类型 * 问题类型
*/ */
private String questionId;
private String questionCode;


/** /**
* 问题状态 * 问题状态

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

import com.tuoheng.admin.enums.RoleEnum; import com.tuoheng.admin.enums.RoleEnum;
import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum; import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum;
import com.tuoheng.admin.mapper.DeptMapper; import com.tuoheng.admin.mapper.DeptMapper;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.InspectionMapper; import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.UserMapper; import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest; import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.admin.service.inspection.query.handle.GenerateInspectionFieldHander; import com.tuoheng.admin.service.inspection.query.handle.GenerateInspectionFieldHander;
import com.tuoheng.admin.utils.CurrentUserUtil; import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.inspection.InspectionVo; import com.tuoheng.admin.vo.inspection.InspectionVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult; import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils; import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Autowired @Autowired
private InspectionMapper inspectionMapper; private InspectionMapper inspectionMapper;


@Autowired
private InspectionFileMapper inspectionFileMapper;

@Autowired @Autowired
@Qualifier("executeHandle") @Qualifier("executeHandle")
private GenerateInspectionFieldHander executeHandle; private GenerateInspectionFieldHander executeHandle;
for (InspectionVo inspectionVo : inspectionVoList) { for (InspectionVo inspectionVo : inspectionVoList) {
deptName = deptMap.get(inspectionVo.getDeptId()); deptName = deptMap.get(inspectionVo.getDeptId());
inspectionVo.setDeptName(deptName); inspectionVo.setDeptName(deptName);
inspectionVo.setAiVideoUrl(CommonConfig.videoURL + inspectionVo.getAiVideoUrl());
executeHandle.handler(user, dept, inspectionVo); executeHandle.handler(user, dept, inspectionVo);
} }
return inspectionVoList; return inspectionVoList;

+ 1
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java View File

private LiveChannel buildLiveChannel(Inspection inspection, DspCallbackVo dspCallbackVo) { private LiveChannel buildLiveChannel(Inspection inspection, DspCallbackVo dspCallbackVo) {
LiveChannel liveChannel = new LiveChannel(); LiveChannel liveChannel = new LiveChannel();
liveChannel.setTenantId(inspection.getTenantId()); liveChannel.setTenantId(inspection.getTenantId());
liveChannel.setDeptId(inspection.getDeptId());
liveChannel.setInspectionId(inspection.getId()); liveChannel.setInspectionId(inspection.getId());
liveChannel.setChannelCode("0"); liveChannel.setChannelCode("0");
liveChannel.setPushUrl(dspCallbackVo.getPushUrl()); liveChannel.setPushUrl(dspCallbackVo.getPushUrl());

+ 3
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateInspectionStatusService.java View File

*/ */
public JsonResult updateStatus(MissionStatusRequest missionStatusRequest) { public JsonResult updateStatus(MissionStatusRequest missionStatusRequest) {
log.info("进入修改任务状态业务接口, missionStatusRequest:{}", missionStatusRequest); log.info("进入修改任务状态业务接口, missionStatusRequest:{}", missionStatusRequest);
String tenantId = CurrentUserUtil.getTenantId();
JsonResult result = this.check(tenantId, missionStatusRequest);
JsonResult result = this.check(missionStatusRequest);
if (0 != result.getCode()) { if (0 != result.getCode()) {
log.info("修改任务状态业务接口:校验失败:{}", result.getMsg()); log.info("修改任务状态业务接口:校验失败:{}", result.getMsg());
return result; return result;


/** /**
* 检查参数 * 检查参数
* @param tenantId
*
* @param missionStatusRequest * @param missionStatusRequest
* @return * @return
*/ */
private JsonResult check(String tenantId, MissionStatusRequest missionStatusRequest) {
private JsonResult check(MissionStatusRequest missionStatusRequest) {
//查询出对应的巡检任务 //查询出对应的巡检任务
Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>()
.eq(Inspection::getMark, MarkTypeEnum.VALID.getCode()) .eq(Inspection::getMark, MarkTypeEnum.VALID.getCode())

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

} }
vo.setName(inspection.getName()); vo.setName(inspection.getName());
//问题类型 //问题类型
if (StringUtils.isNotEmpty(x.getQuestionId())) {
QuestionType questionType = questionTypeMapper.selectById(x.getQuestionId());
if (StringUtils.isNotEmpty(x.getQuestionCode())) {
QuestionType questionType = questionTypeMapper.selectOne(new LambdaQueryWrapper<QuestionType>()
.eq(QuestionType::getMark, 1)
.eq(QuestionType::getCode, x.getQuestionCode()));
if (null != questionType) { if (null != questionType) {
vo.setCode(questionType.getCode()); vo.setCode(questionType.getCode());
vo.setContent(questionType.getContent()); vo.setContent(questionType.getContent());
JsonResult.error(ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getCode(),ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getMsg()); JsonResult.error(ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getCode(),ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getMsg());
} }
for (InspectionFile inspectionFile : inspectionFileList) { for (InspectionFile inspectionFile : inspectionFileList) {
if(StringUtils.isEmpty(inspectionFile.getQuestionId())){
if(StringUtils.isEmpty(inspectionFile.getQuestionCode())){
JsonResult.error(ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getCode(),ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getMsg()); JsonResult.error(ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getCode(),ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getMsg());
} }
//查找问题类型 //查找问题类型
QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery() QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getMark, 1) .eq(QuestionType::getMark, 1)
.eq(QuestionType::getId, inspectionFile.getQuestionId()));
.eq(QuestionType::getCode, inspectionFile.getQuestionCode()));
if(ObjectUtil.isNull(questionType)){ if(ObjectUtil.isNull(questionType)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
} }
JsonResult.error(ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getCode(),ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getMsg()); JsonResult.error(ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getCode(),ListByDeptUserTypeEnum.INSPECTION_TYPE_LIST_IS_NULL.getMsg());
} }
for (InspectionFile inspectionFile : inspectionFileList) { for (InspectionFile inspectionFile : inspectionFileList) {
if(StringUtils.isEmpty(inspectionFile.getQuestionId())){
if(StringUtils.isEmpty(inspectionFile.getQuestionCode())){
JsonResult.error(ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getCode(),ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getMsg()); JsonResult.error(ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getCode(),ListByDeptUserTypeEnum.QUESTION_ID_IS_NULL.getMsg());
} }
//查找问题类型 //查找问题类型
QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery() QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getMark, 1) .eq(QuestionType::getMark, 1)
.eq(QuestionType::getId, inspectionFile.getQuestionId()));
.eq(QuestionType::getCode, inspectionFile.getQuestionCode()));
if(ObjectUtil.isNull(questionType)){ if(ObjectUtil.isNull(questionType)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
} }

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/confirm/InspectionFileConfirmService.java View File

map.put("status", InspectionFileStatusEnum.CONFIRMED.getCode()); map.put("status", InspectionFileStatusEnum.CONFIRMED.getCode());
map.put("updateUser", userId); map.put("updateUser", userId);
map.put("updateTime", DateUtils.now()); map.put("updateTime", DateUtils.now());
map.put("checkUser", userId);
map.put("checkTime", DateUtils.now());
map.put("idList", idList); map.put("idList", idList);


Integer rowCount = inspectionFileMapper.updateByIdList(map); Integer rowCount = inspectionFileMapper.updateByIdList(map);

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/handle/QueryInspectionFileHandleByInspectionFileIdService.java View File

} }


QuestionType questionType = questionTypeMapper.selectOne(new LambdaQueryWrapper<QuestionType>() QuestionType questionType = questionTypeMapper.selectOne(new LambdaQueryWrapper<QuestionType>()
.eq(QuestionType::getId, inspectionFile.getQuestionId())
.eq(QuestionType::getCode, inspectionFile.getQuestionCode())
.eq(QuestionType::getMark, 1)); .eq(QuestionType::getMark, 1));
if (null != questionType) { if (null != questionType) {
inspectionFileHandleVo.setQuestionName(questionType.getName()); inspectionFileHandleVo.setQuestionName(questionType.getName());
inspectionFileHandleVo.setQuestionContent(questionType.getContent()); inspectionFileHandleVo.setQuestionContent(questionType.getContent());
} }
inspectionFileHandleVo.setQuestionId(inspectionFile.getQuestionId());
inspectionFileHandleVo.setQuestionCode(inspectionFile.getQuestionCode());
inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail());
return inspectionFileHandleVo; return inspectionFileHandleVo;
} }

+ 3
- 8
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByInspectionIdService.java View File

private QuestionTypeMapper questionTypeMapper; private QuestionTypeMapper questionTypeMapper;


public JsonResult getPageListByInspectionId(QueryInspectionFilePageListByInspectionIdRequest request) { public JsonResult getPageListByInspectionId(QueryInspectionFilePageListByInspectionIdRequest request) {
log.info("进入根据任务ID查询巡检任务问题分页列表业务, inspectionId:{}, questionId:{}", request.getInspectionId(), request.getQuestionId());
log.info("进入根据任务ID查询巡检任务问题分页列表业务, inspectionId:{}, questionId:{}", request.getInspectionId(), request.getQuestionCode());
JsonResult result = this.check(request); JsonResult result = this.check(request);
if (0 != result.getCode()) { if (0 != result.getCode()) {
log.info("进入根据任务ID查询巡检任务问题分页列表业务:校验失败:{}", result.getMsg()); log.info("进入根据任务ID查询巡检任务问题分页列表业务:校验失败:{}", result.getMsg());
Map<String, QuestionType> questionTypeMap = questionTypeList.stream().collect(Collectors.toMap(QuestionType::getId, Function.identity())); Map<String, QuestionType> questionTypeMap = questionTypeList.stream().collect(Collectors.toMap(QuestionType::getId, Function.identity()));


List<InspectionFilePageListByInspectionIdVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFilePageByInspectionIdListVoList(inspectionFileList); List<InspectionFilePageListByInspectionIdVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFilePageByInspectionIdListVoList(inspectionFileList);
QuestionType questionType;
Integer questionName;
for (InspectionFilePageListByInspectionIdVo inspectionFilePageListVo : inspectionFilePageListVoList) { for (InspectionFilePageListByInspectionIdVo inspectionFilePageListVo : inspectionFilePageListVoList) {
questionType = questionTypeMap.get(inspectionFilePageListVo.getQuestionId());
if (null != questionType) {
questionName = questionType.getName();
inspectionFilePageListVo.setQuestionName(Integer.toString(questionName));
}

inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail()); inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail());
inspectionFilePageListVo.setFileOriginal(CommonConfig.imageURL + inspectionFilePageListVo.getFileOriginal());
} }
return inspectionFilePageListVoList; return inspectionFilePageListVoList;
} }

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByWorkOrderIdService.java View File

inspectionFileHandleVo.setLocation(inspectionFile.getLocation()); inspectionFileHandleVo.setLocation(inspectionFile.getLocation());
inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail());


questionType = questionTypeMap.get(inspectionFile.getQuestionId());
questionType = questionTypeMap.get(inspectionFile.getQuestionCode());
if (null != questionType) { if (null != questionType) {
inspectionFileHandleVo.setQuestionId(questionType.getId());
inspectionFileHandleVo.setQuestionCode(questionType.getCode());
inspectionFileHandleVo.setQuestionName(questionType.getName()); inspectionFileHandleVo.setQuestionName(questionType.getName());
inspectionFileHandleVo.setQuestionContent(questionType.getContent()); inspectionFileHandleVo.setQuestionContent(questionType.getContent());
} }
private Map<String, QuestionType> getQuestionTypeMap() { private Map<String, QuestionType> getQuestionTypeMap() {
List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>() List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>()
.eq(QuestionType::getMark, 1)); .eq(QuestionType::getMark, 1));
Map<String, QuestionType> questionTypeMap = questionTypeList.stream().collect(Collectors.toMap(QuestionType::getId, Function.identity()));
Map<String, QuestionType> questionTypeMap = questionTypeList.stream().collect(Collectors.toMap(QuestionType::getCode, Function.identity()));
return questionTypeMap; return questionTypeMap;
} }



+ 2
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListService.java View File

private List<InspectionFilePageListVo> buildInspectionFilePageListVoList(List<InspectionFileExtend> inspectionFileExtendList) { private List<InspectionFilePageListVo> buildInspectionFilePageListVoList(List<InspectionFileExtend> inspectionFileExtendList) {
Map<String, RoadInformation> roadMap = this.getRoadMap(inspectionFileExtendList); Map<String, RoadInformation> roadMap = this.getRoadMap(inspectionFileExtendList);
Map<String, Dept> deptMap = this.getDeptMap(inspectionFileExtendList); Map<String, Dept> deptMap = this.getDeptMap(inspectionFileExtendList);
Map<String, QuestionType> questionTypeMap = this.getQuestionTypeMap();
// Map<String, QuestionType> questionTypeMap = this.getQuestionTypeMap();
List<InspectionFilePageListVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileExtendListToInspectionFilePageListVoList(inspectionFileExtendList); List<InspectionFilePageListVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileExtendListToInspectionFilePageListVoList(inspectionFileExtendList);
QuestionType questionType;
RoadInformation road; RoadInformation road;
Dept dept; Dept dept;
for (InspectionFilePageListVo inspectionFilePageListVo : inspectionFilePageListVoList) { for (InspectionFilePageListVo inspectionFilePageListVo : inspectionFilePageListVoList) {
questionType = questionTypeMap.get(inspectionFilePageListVo.getQuestionId());
if (null != questionType) {
inspectionFilePageListVo.setQuestionName(Integer.toString(questionType.getName()));
inspectionFilePageListVo.setQuestionContent(questionType.getContent());
}
road = roadMap.get(inspectionFilePageListVo.getRoadId()); road = roadMap.get(inspectionFilePageListVo.getRoadId());
dept = deptMap.get(inspectionFilePageListVo.getDeptId()); dept = deptMap.get(inspectionFilePageListVo.getDeptId());
if (ObjectUtil.isNotNull(road)) { if (ObjectUtil.isNotNull(road)) {
inspectionFilePageListVo.setDeptName(dept.getName()); inspectionFilePageListVo.setDeptName(dept.getName());
} }
inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail()); inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail());
inspectionFilePageListVo.setFileOriginal(CommonConfig.imageURL + inspectionFilePageListVo.getFileOriginal());
} }
return inspectionFilePageListVoList; return inspectionFilePageListVoList;
} }

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/update/UpdateInspectionFileQuestionTypeService.java View File

QuestionType questionType = (QuestionType) result.getData(); QuestionType questionType = (QuestionType) result.getData();
InspectionFile inspectionFile = new InspectionFile(); InspectionFile inspectionFile = new InspectionFile();
inspectionFile.setId(id); inspectionFile.setId(id);
inspectionFile.setQuestionId(questionType.getId());
inspectionFile.setQuestionCode(questionType.getCode());
inspectionFile.setUpdateUser(userId); inspectionFile.setUpdateUser(userId);
inspectionFile.setUpdateTime(DateUtils.now()); inspectionFile.setUpdateTime(DateUtils.now());
Integer rowId = inspectionFileMapper.updateById(inspectionFile); Integer rowId = inspectionFileMapper.updateById(inspectionFile);

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/GenerateReportWordService.java View File

Cell questionTypeCell; Cell questionTypeCell;
for (int i = 0; i < questionTypeList.size(); i++) { for (int i = 0; i < questionTypeList.size(); i++) {
questionType = questionTypeList.get(i); questionType = questionTypeList.get(i);
String count = this.getCount(report.getInspectionId(), questionType.getId());
String count = this.getCount(report.getInspectionId(), questionType.getCode());
questionTypeContentCell = this.getCell(font, questionType.getContent()); questionTypeContentCell = this.getCell(font, questionType.getContent());
questionTypeCell = this.getCell(font, count); questionTypeCell = this.getCell(font, count);
table.addCell(questionTypeContentCell); table.addCell(questionTypeContentCell);
return cell; return cell;
} }


private String getCount(String inspectionId, String questionTypeId) {
private String getCount(String inspectionId, String questionCode) {
Integer count = inspectionFileMapper.selectCount(new LambdaQueryWrapper<InspectionFile>() Integer count = inspectionFileMapper.selectCount(new LambdaQueryWrapper<InspectionFile>()
.eq(InspectionFile::getInspectionId, inspectionId) .eq(InspectionFile::getInspectionId, inspectionId)
.eq(InspectionFile::getQuestionId, questionTypeId)
.eq(InspectionFile::getQuestionCode, questionCode)
.eq(InspectionFile::getMark, 1)); .eq(InspectionFile::getMark, 1));
return Integer.toString(count); return Integer.toString(count);
} }

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

for (int i = 0; i < questionTypeList.size(); i++) { for (int i = 0; i < questionTypeList.size(); i++) {
inspectionResultVo = new InspectionResultVo(); inspectionResultVo = new InspectionResultVo();
questionType = questionTypeList.get(i); questionType = questionTypeList.get(i);
Integer count = this.getCount(report.getInspectionId(), questionType.getId());
Integer count = this.getCount(report.getInspectionId(), questionType.getCode());
inspectionResultVo.setQuestionTypeContent(questionType.getContent()); inspectionResultVo.setQuestionTypeContent(questionType.getContent());
inspectionResultVo.setCount(count); inspectionResultVo.setCount(count);
inspectionResultVoList.add(inspectionResultVo); inspectionResultVoList.add(inspectionResultVo);
return inspectionResultVoList; return inspectionResultVoList;
} }


private Integer getCount(String inspectionId, String questionTypeId) {
private Integer getCount(String inspectionId, String questionCode) {
Integer count = inspectionFileMapper.selectCount(new LambdaQueryWrapper<InspectionFile>() Integer count = inspectionFileMapper.selectCount(new LambdaQueryWrapper<InspectionFile>()
.eq(InspectionFile::getInspectionId, inspectionId) .eq(InspectionFile::getInspectionId, inspectionId)
.eq(InspectionFile::getQuestionId, questionTypeId)
.eq(InspectionFile::getQuestionCode, questionCode)
.eq(InspectionFile::getMark, 1)); .eq(InspectionFile::getMark, 1));
return count; return count;
} }

+ 4
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java View File

// 对象属性拷贝 // 对象属性拷贝
BeanUtils.copyProperties(questionFile, inspectionFile); BeanUtils.copyProperties(questionFile, inspectionFile);
//问题编号 //问题编号
inspectionFile.setQuestionId(questionFile.getQuestionCode());
inspectionFile.setQuestionCode(questionFile.getQuestionCode());
// 问题名称
inspectionFile.setQuestionContent(questionFile.getQuestionName());
inspectionFile.setTenantId(inspection.getTenantId()); inspectionFile.setTenantId(inspection.getTenantId());
inspectionFile.setInspectionId(inspectionId); inspectionFile.setInspectionId(inspectionId);
// 文件类型 // 文件类型
fileMarkerUrl = fileMarkerUrl.replaceAll(CommonConfig.imageURL, ""); fileMarkerUrl = fileMarkerUrl.replaceAll(CommonConfig.imageURL, "");
} }
inspectionFile.setFileImage(fileMarkerUrl); inspectionFile.setFileImage(fileMarkerUrl);
// 问题名称
inspectionFile.setQuestionName(questionFile.getQuestionName());

// 问题图片审核状态 // 问题图片审核状态
inspectionFile.setStatus(InspectionFileStatusEnum.WAIT_CONFIRMED.getCode()); inspectionFile.setStatus(InspectionFileStatusEnum.WAIT_CONFIRMED.getCode());
// 问题图片来源 // 问题图片来源

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleVo.java View File

/** /**
* 问题类型:1坑槽,2积水,3裂缝 * 问题类型:1坑槽,2积水,3裂缝
*/ */
private String questionId;
private String questionCode;


/** /**
* 问题名称:1坑槽,2积水,3裂缝 * 问题名称:1坑槽,2积水,3裂缝

+ 16
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListByInspectionIdVo.java View File

/** /**
* 问题类型:1坑槽,2积水,3裂缝 * 问题类型:1坑槽,2积水,3裂缝
*/ */
private String questionId;
private String questionCode;


/** /**
* 类型名称:1坑槽,2积水,3裂缝 * 类型名称:1坑槽,2积水,3裂缝
*/ */
private String questionName; private String questionName;


/**
* 问题内容
*/
private String questionContent;

/**
* 文件名称
*/
private String fileName;

/** /**
* 缩略图 * 缩略图
*/ */
private String fileThumbnail; private String fileThumbnail;


/**
* 原图
*/
private String fileOriginal;

/** /**
* 经度 * 经度
*/ */

+ 11
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListVo.java View File

/** /**
* 问题类型:1坑槽,2积水,3裂缝 * 问题类型:1坑槽,2积水,3裂缝
*/ */
private String questionId;
private String questionCode;


/** /**
* 问题名称:1坑槽,2积水,3裂缝 * 问题名称:1坑槽,2积水,3裂缝
*/ */
private String questionContent; private String questionContent;


/**
* 文件名称
*/
private String fileName;

/** /**
* 缩略图 * 缩略图
*/ */
private String fileThumbnail; private String fileThumbnail;


/**
* 原图
*/
private String fileOriginal;

/** /**
* 经度 * 经度
*/ */

+ 18
- 20
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml View File

<result property="gaodeLongitude" column="gaode_longitude" /> <result property="gaodeLongitude" column="gaode_longitude" />
<result property="gaodeLatitude" column="gaode_latitude" /> <result property="gaodeLatitude" column="gaode_latitude" />
<result property="gaodeAddress" column="gaode_address" /> <result property="gaodeAddress" column="gaode_address" />
<result property="questionId" column="question_id" />
<result property="questionCode" column="question_code" />
<result property="source" column="source" /> <result property="source" column="source" />
<result property="questionName" column="question_name" /> <result property="questionName" column="question_name" />
<result property="content" column="content" />
<result property="questionContent" column="question_content" />
<result property="questionDesc" column="question_desc" /> <result property="questionDesc" column="question_desc" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="checkUser" column="check_user" /> <result property="checkUser" column="check_user" />
<result property="gaodeLongitude" column="gaode_longitude" /> <result property="gaodeLongitude" column="gaode_longitude" />
<result property="gaodeLatitude" column="gaode_latitude" /> <result property="gaodeLatitude" column="gaode_latitude" />
<result property="gaodeAddress" column="gaode_address" /> <result property="gaodeAddress" column="gaode_address" />
<result property="questionId" column="question_id" />
<result property="questionCode" column="question_code" />
<result property="source" column="source" /> <result property="source" column="source" />
<result property="questionName" column="question_name" /> <result property="questionName" column="question_name" />
<result property="content" column="content" />
<result property="questionContent" column="question_content" />
<result property="questionDesc" column="question_desc" /> <result property="questionDesc" column="question_desc" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="checkUser" column="check_user" /> <result property="checkUser" column="check_user" />
<result property="gaodeLongitude" column="gaode_longitude" /> <result property="gaodeLongitude" column="gaode_longitude" />
<result property="gaodeLatitude" column="gaode_latitude" /> <result property="gaodeLatitude" column="gaode_latitude" />
<result property="gaodeAddress" column="gaode_address" /> <result property="gaodeAddress" column="gaode_address" />
<result property="questionId" column="question_id" />
<result property="questionCode" column="question_code" />
<result property="questionName" column="question_name" /> <result property="questionName" column="question_name" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="inspectionCode" column="inspection_code" /> <result property="inspectionCode" column="inspection_code" />
</resultMap> </resultMap>


<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, tenant_id, file_code, inspection_id, file_type, file_name, file_thumbnail, file_original, file_image, file_size, latitude, longitude, location, gaode_longitude, gaode_latitude, gaode_address, question_id, source, question_name, content, question_desc, status, check_user, check_time, create_user, create_time, update_user, update_time, mark
id, tenant_id, file_code, inspection_id, file_type, file_name, file_thumbnail, file_original, file_image, file_size, latitude, longitude, location, gaode_longitude, gaode_latitude, gaode_address, question_code, source, question_name, question_content, question_desc, status, check_user, check_time, create_user, create_time, update_user, update_time, mark
</sql> </sql>


<sql id="selectThInspectionFileVo"> <sql id="selectThInspectionFileVo">
select id, tenant_id, file_code, inspection_id, file_type, file_name, file_thumbnail, file_original, file_image, file_size, latitude, longitude, location, gaode_longitude, gaode_latitude, gaode_address, question_id, source, question_name, content, question_desc, status, check_user, check_time, create_user, create_time, update_user, update_time, mark from th_inspection_file
select id, tenant_id, file_code, inspection_id, file_type, file_name, file_thumbnail, file_original, file_image, file_size, latitude, longitude, location, gaode_longitude, gaode_latitude, gaode_address, question_code, source, question_name, question_content, question_desc, status, check_user, check_time, create_user, create_time, update_user, update_time, mark from th_inspection_file
</sql> </sql>


<sql id="Base_Extend_Column_List"> <sql id="Base_Extend_Column_List">
tif.id, tif.tenant_id, tif.file_code, tif.inspection_id, tif.file_type, tif.file_name, tif.file_thumbnail, tif.file_original, tif.file_image, tif.file_size, tif.id, tif.tenant_id, tif.file_code, tif.inspection_id, tif.file_type, tif.file_name, tif.file_thumbnail, tif.file_original, tif.file_image, tif.file_size,
tif.latitude, tif.longitude, tif.location, tif.gaode_longitude, tif.gaode_latitude, tif.gaode_address, tif.question_id, tif.source, tif.question_name, tif.content, tif.question_desc, tif.status,
tif.latitude, tif.longitude, tif.location, tif.gaode_longitude, tif.gaode_latitude, tif.gaode_address, tif.source, tif.question_code, tif.question_name, tif.question_content, tif.question_desc, tif.status,
tif.check_user, tif.check_time, tif.create_user, tif.create_time, tif.update_user, tif.update_time, tif.mark, tif.check_user, tif.check_time, tif.create_user, tif.create_time, tif.update_user, tif.update_time, tif.mark,
ti.code as inspection_code, ti.name as inspection_name, ti.road_id, ti.dept_id ti.code as inspection_code, ti.name as inspection_name, ti.road_id, ti.dept_id
</sql> </sql>


<sql id="Base_Distribution_Column_List"> <sql id="Base_Distribution_Column_List">
tif.id, tif.tenant_id, tif.file_thumbnail, tif.latitude, tif.longitude, tif.location, tif.gaode_longitude, tif.gaode_latitude, tif.gaode_address, tif.question_id, tif.question_name, tif.status,
tif.id, tif.tenant_id, tif.file_thumbnail, tif.latitude, tif.longitude, tif.location, tif.gaode_longitude, tif.gaode_latitude, tif.gaode_address, tif.question_code, tif.question_name, tif.status,
ti.code as inspection_code, ti.name as inspection_name ti.code as inspection_code, ti.name as inspection_name
</sql> </sql>


<!-- 批量新增问题图片 --> <!-- 批量新增问题图片 -->
<insert id="addBatch" parameterType="com.tuoheng.admin.entity.InspectionFile"> <insert id="addBatch" parameterType="com.tuoheng.admin.entity.InspectionFile">
insert into th_inspection_file (id,file_code, inspection_id, file_type, file_name, insert into th_inspection_file (id,file_code, inspection_id, file_type, file_name,
file_thumbnail, file_original, file_image,
file_size, latitude, longitude,
`location`, gaode_longitude, gaode_latitude,
gaode_address, `source`, question_id, question_name, content,
question_desc, `status`, check_user,
check_time, create_user, tenant_id)
file_thumbnail, file_original, file_image, file_size, latitude, longitude, `location`, gaode_longitude, gaode_latitude,
gaode_address, `source`, question_code, question_name, question_content, question_desc, `status`, check_user, check_time, create_user, tenant_id)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
( (
#{item.gaodeLatitude,jdbcType=VARCHAR}, #{item.gaodeLatitude,jdbcType=VARCHAR},
#{item.gaodeAddress,jdbcType=VARCHAR}, #{item.gaodeAddress,jdbcType=VARCHAR},
#{item.source,jdbcType=BOOLEAN}, #{item.source,jdbcType=BOOLEAN},
#{item.questionId,jdbcType=VARCHAR},
#{item.questionCode,jdbcType=VARCHAR},
#{item.questionName,jdbcType=VARCHAR}, #{item.questionName,jdbcType=VARCHAR},
#{item.content,jdbcType=VARCHAR},
#{item.questionContent,jdbcType=VARCHAR},
#{item.questionDesc,jdbcType=VARCHAR}, #{item.questionDesc,jdbcType=VARCHAR},
#{item.status,jdbcType=TINYINT}, #{item.status,jdbcType=TINYINT},
#{item.checkUser,jdbcType=INTEGER}, #{item.checkUser,jdbcType=INTEGER},
<where> <where>
<if test="1 == 1"> and mark = 1 </if> <if test="1 == 1"> and mark = 1 </if>
<if test="request.inspectionId != null and request.inspectionId != ''"> and inspection_id = #{request.inspectionId} </if> <if test="request.inspectionId != null and request.inspectionId != ''"> and inspection_id = #{request.inspectionId} </if>
<if test="request.questionId != null and request.questionId != ''"> and question_id = #{request.questionId} </if>
<if test="request.questionCode != null and request.questionCode != ''"> and question_Code = #{request.questionCode} </if>
<if test="request.status != null and request.status != 0"> and status = #{request.status} </if> <if test="request.status != null and request.status != 0"> and status = #{request.status} </if>
</where> </where>
order by create_time desc order by create_time desc
<where> <where>
<if test="1 == 1"> and tif.mark = 1 </if> <if test="1 == 1"> and tif.mark = 1 </if>
<if test="request.key != null and request.key != 0"> and (ti.code like concat('%', #{request.key}, '%') or ti.name like concat('%', #{request.key}, '%')) </if> <if test="request.key != null and request.key != 0"> and (ti.code like concat('%', #{request.key}, '%') or ti.name like concat('%', #{request.key}, '%')) </if>
<if test="request.questionId != null and request.questionId != ''"> and tif.question_id = #{request.questionId} </if>
<if test="request.questionCode != null and request.questionCode != ''"> and tif.question_Code = #{request.questionCode} </if>
<if test="request.status != null"> <if test="request.status != null">
<choose> <choose>
<when test="request.status != 0"> <when test="request.status != 0">
<where> <where>
<if test="1 == 1"> and tif.mark = 1 </if> <if test="1 == 1"> and tif.mark = 1 </if>
<if test="request.inspectionName != null and request.inspectionName != ''"> and ti.name like concat('%', #{request.inspectionName}, '%') </if> <if test="request.inspectionName != null and request.inspectionName != ''"> and ti.name like concat('%', #{request.inspectionName}, '%') </if>
<if test="request.questionId != null and request.questionId != ''"> and tif.question_id = #{request.questionId} </if>
<if test="request.questionCode != null and request.questionCode != ''"> and tif.question_code = #{request.questionCode} </if>
<if test="request.status != null"> <if test="request.status != null">
<choose> <choose>
<when test="request.status != 0"> <when test="request.status != 0">
<if test="status != null"> status = #{status}, </if> <if test="status != null"> status = #{status}, </if>
<if test="updateUser != null and updateUser != ''"> update_user = #{updateUser}, </if> <if test="updateUser != null and updateUser != ''"> update_user = #{updateUser}, </if>
<if test="updateTime != null"> update_time = #{updateTime}, </if> <if test="updateTime != null"> update_time = #{updateTime}, </if>
<if test="checkUser != null and checkUser != ''"> check_user = #{checkUser}, </if>
<if test="checkTime != null"> check_time = #{checkTime}, </if>
</trim> </trim>
<where> <where>
<if test="idList != null and idList.size() > 0"> <if test="idList != null and idList.size() > 0">

+ 0
- 2
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml View File

analyse_status = #{analyseStatus,jdbcType=TINYINT}, analyse_status = #{analyseStatus,jdbcType=TINYINT},
progressbar = #{progressbar,jdbcType=DOUBLE}, progressbar = #{progressbar,jdbcType=DOUBLE},
note = #{note,jdbcType=VARCHAR}, note = #{note,jdbcType=VARCHAR},
create_user = #{createUser,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user = #{updateUser,jdbcType=INTEGER}, update_user = #{updateUser,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
start_longitude = #{startLongitude,jdbcType=VARCHAR}, start_longitude = #{startLongitude,jdbcType=VARCHAR},

Loading…
Cancel
Save