@@ -48,7 +48,7 @@ public class InspectionFileController { | |||
*/ | |||
@GetMapping("/page/list") | |||
public JsonResult getPageList(@RequestBody QueryInspectionFilePageListRequest request){ | |||
return null; | |||
return iInspectionFileService.getPageList(request); | |||
} | |||
/** | |||
@@ -57,7 +57,7 @@ public class InspectionFileController { | |||
* @return | |||
*/ | |||
@GetMapping("/page/list/by/inspectionid") | |||
public JsonResult getPageListByInspectionId(@RequestBody QueryInspectionFilePageListByInspectionIdRequest request){ | |||
public JsonResult getPageListByInspectionId(QueryInspectionFilePageListByInspectionIdRequest request){ | |||
return iInspectionFileService.getPageListByInspectionId(request); | |||
} | |||
@@ -66,8 +66,8 @@ public class InspectionFileController { | |||
* | |||
* @return | |||
*/ | |||
@PostMapping("/confirm") | |||
public JsonResult confirm(@RequestParam("idList") List<String> idList){ | |||
@PostMapping("/confirm/{idList}") | |||
public JsonResult confirm(@PathVariable("idList") List<String> idList){ | |||
return iInspectionFileService.confirm(idList); | |||
} | |||
@@ -76,8 +76,8 @@ public class InspectionFileController { | |||
* | |||
* @return | |||
*/ | |||
@PostMapping("/ignore") | |||
public JsonResult ignore(@RequestParam("idList") List<String> idList){ | |||
@PostMapping("/ignore/{idList}") | |||
public JsonResult ignore(@PathVariable("idList") List<String> idList){ | |||
return iInspectionFileService.ignore(idList); | |||
} | |||
@@ -1,5 +1,9 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.service.questiontype.IQuestionTypeService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
@@ -8,10 +12,20 @@ import org.springframework.web.bind.annotation.RestController; | |||
* @Date 2022/11/29 | |||
*/ | |||
@RestController | |||
@RequestMapping("/questionType") | |||
@RequestMapping("/question/type") | |||
public class QuestionTypeController { | |||
@Autowired | |||
private IQuestionTypeService questionTypeService; | |||
/** | |||
* 查询问题类型列表 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/list") | |||
public JsonResult getList() { | |||
return questionTypeService.getList(); | |||
} | |||
} |
@@ -1,8 +1,8 @@ | |||
package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.InspectionFile; | |||
import com.tuoheng.admin.vo.InspectionFilePageListByInspectionIdVo; | |||
import com.tuoheng.admin.vo.InspectionFilePageListVo; | |||
import com.tuoheng.admin.vo.InspectionFileVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
@@ -13,6 +13,8 @@ public interface InspectionFileConverMapper { | |||
InspectionFileConverMapper INSTANCE = Mappers.getMapper(InspectionFileConverMapper.class); | |||
List<InspectionFilePageListByInspectionIdVo> fromInspectionFileListToInspectionFilePageByInspectionIdListVoList(List<InspectionFile> inspectionFileList); | |||
List<InspectionFilePageListVo> fromInspectionFileListToInspectionFilePageListVoList(List<InspectionFile> inspectionFileList); | |||
} |
@@ -1,7 +1,7 @@ | |||
package com.tuoheng.admin.enums.code.inspection; | |||
/** | |||
* 重新提交任务信息返回码 | |||
* 立即执行任务信息返回码 | |||
* 模块代码:23(任务管理) | |||
* 接口代码:08 (立即执行) | |||
* | |||
@@ -11,7 +11,7 @@ package com.tuoheng.admin.enums.code.inspection; | |||
*/ | |||
public enum ExecuteInspectionCodeEnum { | |||
Execute_IS_FAILED(1230800, "重新提交失败"), | |||
EXECUTE_IS_FAILED(1230800, "立即执行失败"), | |||
ID_IS_NULL(1230801, "任务ID为空"), | |||
INSPECTION_IS_NOT_EXIST(1230802, "任务不存在"), | |||
USER_ONLY_EXECUTE_DEPARTMENT_TASK(1230803, "用户只能执行本部门任务"), |
@@ -7,6 +7,7 @@ import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.entity.InspectionFile; | |||
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListByInspectionIdRequest; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
@@ -44,11 +45,19 @@ public interface InspectionFileMapper extends BaseMapper<InspectionFile> { | |||
List<InspectionFile> selectListByInspectIdList(List<String> inspectionIdList); | |||
/** | |||
* 查询任务ID查询任务分页列表 | |||
* 查询任务ID查询任务问题分页列表 | |||
* | |||
* @param request 巡检任务查询实体 | |||
* @return 巡检任务集合 | |||
*/ | |||
Page<InspectionFile> selectPageListByInspectionId(@Param("page") IPage page, @Param("request") QueryInspectionFilePageListByInspectionIdRequest request); | |||
/** | |||
* 查询任务问题分页列表 | |||
* | |||
* @param request 巡检任务查询实体 | |||
* @return 巡检任务集合 | |||
*/ | |||
Page<InspectionFile> selectPageList(@Param("page") IPage page, @Param("request") QueryInspectionFilePageListRequest request); | |||
} |
@@ -1,8 +1,11 @@ | |||
package com.tuoheng.admin.request.inspectionfile; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.common.core.common.BaseQuery; | |||
import lombok.Data; | |||
import java.util.Date; | |||
/** | |||
* 查询巡检任务请求实体 | |||
* | |||
@@ -14,14 +17,29 @@ import lombok.Data; | |||
public class QueryInspectionFilePageListRequest extends BaseQuery { | |||
/** | |||
* 任务Id | |||
* 关键字,匹配任务编号和任务名称 | |||
*/ | |||
private String inspectionId; | |||
private String key; | |||
/** | |||
* 问题类型 | |||
*/ | |||
private String questionId; | |||
/** | |||
* 问题状态 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 部门Id | |||
*/ | |||
private String deptId; | |||
/** | |||
* 核实时间 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
private Date checkTime; | |||
} |
@@ -2,6 +2,7 @@ package com.tuoheng.admin.service; | |||
import com.tuoheng.admin.query.InspectionFileQuery; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListByInspectionIdRequest; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import java.util.List; | |||
@@ -15,8 +16,24 @@ public interface IInspectionFileService { | |||
JsonResult getListByDeptUserType(InspectionFileQuery query); | |||
/** | |||
* | |||
* 根据任务Id查询任务分页列表 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
JsonResult getPageListByInspectionId(QueryInspectionFilePageListByInspectionIdRequest request); | |||
/** | |||
* | |||
* 查询任务分页列表 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
JsonResult getPageList(QueryInspectionFilePageListRequest request); | |||
/** | |||
* | |||
* 确认 |
@@ -1,8 +0,0 @@ | |||
package com.tuoheng.admin.service; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/11/29 | |||
*/ | |||
public interface IQuestionTypeService { | |||
} |
@@ -14,10 +14,12 @@ import com.tuoheng.admin.enums.code.questiontype.QuestionTypeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.query.InspectionFileQuery; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListByInspectionIdRequest; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest; | |||
import com.tuoheng.admin.service.IInspectionFileService; | |||
import com.tuoheng.admin.service.inspectionfile.confirm.InspectionFileConfirmService; | |||
import com.tuoheng.admin.service.inspectionfile.ignore.InspectionFileIgnoreService; | |||
import com.tuoheng.admin.service.inspectionfile.query.QueryInspectionFilePageListByInspectionIdService; | |||
import com.tuoheng.admin.service.inspectionfile.query.QueryInspectionFilePageListService; | |||
import com.tuoheng.admin.utils.ShiroUtils; | |||
import com.tuoheng.admin.vo.InspectionFileVo; | |||
import com.tuoheng.admin.vo.ListByDeptUserTypeVo; | |||
@@ -63,6 +65,9 @@ public class InspectionFileServiceImpl implements IInspectionFileService { | |||
@Autowired | |||
private QueryInspectionFilePageListByInspectionIdService queryInspectionFilePageListByInspectionIdService; | |||
@Autowired | |||
private QueryInspectionFilePageListService queryInspectionFilePageListService; | |||
@Autowired | |||
private InspectionFileIgnoreService inspectionFileIgnoreService; | |||
@@ -257,7 +262,7 @@ public class InspectionFileServiceImpl implements IInspectionFileService { | |||
} | |||
/** | |||
* 根据任务ID查询任务分页列表 | |||
* 根据任务ID查询任务问题分页列表 | |||
* | |||
* @return | |||
*/ | |||
@@ -266,6 +271,18 @@ public class InspectionFileServiceImpl implements IInspectionFileService { | |||
return queryInspectionFilePageListByInspectionIdService.getPageListByInspectionId(request); | |||
} | |||
/** | |||
* | |||
* 查询任务问题分页列表 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult getPageList(QueryInspectionFilePageListRequest request) { | |||
return queryInspectionFilePageListService.getPageList(request); | |||
} | |||
/** | |||
* | |||
* 确认 |
@@ -1,14 +0,0 @@ | |||
package com.tuoheng.admin.service.impl; | |||
import com.tuoheng.admin.service.IQuestionTypeService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/11/29 | |||
*/ | |||
@Service | |||
@Slf4j | |||
public class QuestionTypeServiceImpl implements IQuestionTypeService { | |||
} |
@@ -64,8 +64,8 @@ public class ExecuteInspectionService { | |||
// 立即执行任务 | |||
this.executeTask(userId, tenantId, inspection); | |||
log.info("立即执行任务业务:重新提交任务成功:{}", inspection); | |||
return JsonResult.success(inspection); | |||
log.info("立即执行任务业务:立即执行成功:id:{}", inspection.getId()); | |||
return JsonResult.success(); | |||
} | |||
/** |
@@ -11,7 +11,8 @@ import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum; | |||
import com.tuoheng.admin.enums.code.inspectionfile.QueryInspectionFilePageListByInspectionIdCodeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListByInspectionIdRequest; | |||
import com.tuoheng.admin.vo.InspectionFilePageListVo; | |||
import com.tuoheng.admin.vo.InspectionFilePageListByInspectionIdVo; | |||
import com.tuoheng.common.core.config.common.CommonConfig; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import com.tuoheng.common.core.utils.StringUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
@@ -61,10 +62,10 @@ public class QueryInspectionFilePageListByInspectionIdService { | |||
} | |||
// 构造返回结果对象 | |||
List<InspectionFilePageListVo> inspectionFilePageListVoList = this.buildInspectionFilePageListVoList(pageData.getRecords()); | |||
List<InspectionFilePageListByInspectionIdVo> inspectionFilePageListVoList = this.buildInspectionFilePageListVoList(pageData.getRecords()); | |||
// 重写返回结果对象 | |||
IPage<InspectionFilePageListVo> inspectionFilePageListVoPageData = new Page<>(); | |||
IPage<InspectionFilePageListByInspectionIdVo> inspectionFilePageListVoPageData = new Page<>(); | |||
inspectionFilePageListVoPageData.setPages(pageData.getPages()); | |||
inspectionFilePageListVoPageData.setCurrent(pageData.getCurrent()); | |||
inspectionFilePageListVoPageData.setSize(pageData.getSize()); | |||
@@ -99,27 +100,28 @@ public class QueryInspectionFilePageListByInspectionIdService { | |||
} | |||
/** | |||
* 1)、查找已确认问题数、发现问题数字段 | |||
* 2)、判断是否有操作权限:立即执行、直播、回放、问题详情、问题核实、重新提交 | |||
* 1)、查找问题类型字段 | |||
* 2)、拼接缩略图路径 | |||
* | |||
* @param inspectionFileList | |||
* @return | |||
*/ | |||
private List<InspectionFilePageListVo> buildInspectionFilePageListVoList(List<InspectionFile> inspectionFileList) { | |||
private List<InspectionFilePageListByInspectionIdVo> buildInspectionFilePageListVoList(List<InspectionFile> inspectionFileList) { | |||
List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>() | |||
.eq(QuestionType::getMark, 1)); | |||
Map<String, QuestionType> questionTypeMap = questionTypeList.stream().collect(Collectors.toMap(QuestionType::getId, Function.identity())); | |||
List<InspectionFilePageListVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFilePageListVoList(inspectionFileList); | |||
List<InspectionFilePageListByInspectionIdVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFilePageByInspectionIdListVoList(inspectionFileList); | |||
QuestionType questionType; | |||
Integer questionName; | |||
for (InspectionFilePageListVo 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()); | |||
} | |||
return inspectionFilePageListVoList; | |||
} |
@@ -0,0 +1,154 @@ | |||
package com.tuoheng.admin.service.inspectionfile.query; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.conver.InspectionFileConverMapper; | |||
import com.tuoheng.admin.entity.InspectionFile; | |||
import com.tuoheng.admin.entity.QuestionType; | |||
import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum; | |||
import com.tuoheng.admin.mapper.DeptMapper; | |||
import com.tuoheng.admin.mapper.InspectionFileMapper; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.mapper.QuestionTypeMapper; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest; | |||
import com.tuoheng.admin.vo.InspectionFilePageListByInspectionIdVo; | |||
import com.tuoheng.admin.vo.InspectionFilePageListVo; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import com.tuoheng.common.core.utils.StringUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.function.Function; | |||
import java.util.stream.Collectors; | |||
/** | |||
* 查询任务问题分页列表业务层处理 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-05 | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class QueryInspectionFilePageListService { | |||
@Autowired | |||
private DeptMapper deptMapper; | |||
@Autowired | |||
private InspectionMapper inspectionMapper; | |||
@Autowired | |||
private InspectionFileMapper inspectionFileMapper; | |||
@Autowired | |||
private QuestionTypeMapper questionTypeMapper; | |||
public JsonResult getPageList(QueryInspectionFilePageListRequest request) { | |||
log.info("进入查询任务问题分页列表业务, request:{}", request.toString()); | |||
JsonResult result = this.check(request); | |||
if (0 != result.getCode()) { | |||
log.info("进入查询任务问题分页列表业务:校验失败:{}", result.getMsg()); | |||
return result; | |||
} | |||
// 设置分页参数 | |||
IPage<InspectionFile> page = new Page<>(request.getPage(), request.getLimit()); | |||
// 查询结果 | |||
IPage<InspectionFile> pageData = inspectionFileMapper.selectPageList(page, request); | |||
if (null == pageData || pageData.getTotal() == 0) { | |||
log.info("获取任务分页列表为空"); | |||
return JsonResult.success(null, QueryInspectionPageListCodeEnum.DATA_IS_FAILED.getMsg()); | |||
} | |||
// 构造返回结果对象 | |||
List<InspectionFilePageListVo> inspectionFilePageListVoList = this.buildInspectionFilePageListVoList(pageData.getRecords()); | |||
// 重写返回结果对象 | |||
IPage<InspectionFilePageListVo> inspectionFilePageListVoPageData = new Page<>(); | |||
inspectionFilePageListVoPageData.setPages(pageData.getPages()); | |||
inspectionFilePageListVoPageData.setCurrent(pageData.getCurrent()); | |||
inspectionFilePageListVoPageData.setSize(pageData.getSize()); | |||
inspectionFilePageListVoPageData.setTotal(pageData.getTotal()); | |||
inspectionFilePageListVoPageData.setRecords(inspectionFilePageListVoList); | |||
return JsonResult.success(inspectionFilePageListVoPageData); | |||
} | |||
/** | |||
* 检查参数 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
private JsonResult check(QueryInspectionFilePageListRequest request) { | |||
return JsonResult.success(); | |||
} | |||
/** | |||
* 超级管理员可查全部的任务 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
private IPage<InspectionFile> getAllList(QueryInspectionFilePageListRequest request) { | |||
// 设置分页参数 | |||
IPage<InspectionFile> page = new Page<>(request.getPage(), request.getLimit()); | |||
// 查询结果 | |||
IPage<InspectionFile> pageData = inspectionFileMapper.selectPageList(page, request); | |||
return pageData; | |||
} | |||
/** | |||
* 管理员和普通用户可查本部门及子部门的任务 | |||
* 1)、如果前端检索条件,传了部门Id,则根据deptId来查 | |||
* 2)、如果前端检索条件,部门Id为空,则表示查本部门及子部门的任务 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
private IPage<InspectionFile> getListByDept(QueryInspectionFilePageListRequest request) { | |||
// 获取本部门及子孙部门id列表 | |||
if (StringUtils.isEmpty(request.getDeptId())) { | |||
List<String> deptIdList = deptMapper.selectAllChildListById(request.getDeptId()); | |||
// request.setDeptIdList(deptIdList); | |||
} | |||
// 设置分页参数 | |||
IPage<InspectionFile> page = new Page<>(request.getPage(), request.getLimit()); | |||
// 查询结果 | |||
IPage<InspectionFile> pageData = inspectionFileMapper.selectPageList(page, request); | |||
return pageData; | |||
} | |||
/** | |||
* 1)、查找已确认问题数、发现问题数字段 | |||
* 2)、判断是否有操作权限:立即执行、直播、回放、问题详情、问题核实、重新提交 | |||
* | |||
* @param inspectionFileList | |||
* @return | |||
*/ | |||
private List<InspectionFilePageListVo> buildInspectionFilePageListVoList(List<InspectionFile> inspectionFileList) { | |||
List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>() | |||
.eq(QuestionType::getMark, 1)); | |||
Map<String, QuestionType> questionTypeMap = questionTypeList.stream().collect(Collectors.toMap(QuestionType::getId, Function.identity())); | |||
List<InspectionFilePageListVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFilePageListVoList(inspectionFileList); | |||
QuestionType questionType; | |||
for (InspectionFilePageListVo inspectionFilePageListVo : inspectionFilePageListVoList) { | |||
questionType = questionTypeMap.get(inspectionFilePageListVo.getQuestionId()); | |||
if (null != questionType) { | |||
inspectionFilePageListVo.setQuestionName(Integer.toString(questionType.getName())); | |||
inspectionFilePageListVo.setQuestionContent(questionType.getContent()); | |||
} | |||
} | |||
return inspectionFilePageListVoList; | |||
} | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.tuoheng.admin.service.questiontype; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
/** | |||
* 问题类型Service接口 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-06 | |||
*/ | |||
public interface IQuestionTypeService { | |||
/** | |||
* 查询任务问题类型列表 | |||
* | |||
* @return | |||
*/ | |||
JsonResult getList(); | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.admin.service.questiontype; | |||
import com.tuoheng.admin.service.questiontype.query.QueryQuestionTypeListService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@Slf4j | |||
@Service | |||
public class QuestionTypeServiceImpl implements IQuestionTypeService { | |||
@Autowired | |||
private QueryQuestionTypeListService queryQuestionTypeListService; | |||
@Override | |||
public JsonResult getList() { | |||
return queryQuestionTypeListService.getist(); | |||
} | |||
} |
@@ -0,0 +1,35 @@ | |||
package com.tuoheng.admin.service.questiontype.query; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.tuoheng.admin.entity.QuestionType; | |||
import com.tuoheng.admin.entity.Structure; | |||
import com.tuoheng.admin.mapper.QuestionTypeMapper; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
/** | |||
* 查询问题类型列表业务层处理 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-06 | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class QueryQuestionTypeListService { | |||
@Autowired | |||
private QuestionTypeMapper questionTypeMapper; | |||
public JsonResult getist() { | |||
log.info("进入查询问题类型列表业务"); | |||
List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>() | |||
.eq(QuestionType::getMark, 1)); | |||
return JsonResult.success(questionTypeList); | |||
} | |||
} |
@@ -0,0 +1,55 @@ | |||
package com.tuoheng.admin.vo; | |||
import lombok.Data; | |||
/** | |||
* 返回任务详情视图Vo | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-05 | |||
*/ | |||
@Data | |||
public class InspectionFilePageListByInspectionIdVo { | |||
/** | |||
* 问题id | |||
*/ | |||
private String id; | |||
/** | |||
* 问题类型:1坑槽,2积水,3裂缝 | |||
*/ | |||
private String questionId; | |||
/** | |||
* 类型名称:1坑槽,2积水,3裂缝 | |||
*/ | |||
private String questionName; | |||
/** | |||
* 缩略图 | |||
*/ | |||
private String fileThumbnail; | |||
/** | |||
* 经度 | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度 | |||
*/ | |||
private String longitude; | |||
/** | |||
* 位置信息 | |||
*/ | |||
private String location; | |||
/** | |||
* 状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理 | |||
*/ | |||
private Integer status; | |||
} |
@@ -23,10 +23,15 @@ public class InspectionFilePageListVo { | |||
private String questionId; | |||
/** | |||
* 类型名称:1坑槽,2积水,3裂缝 | |||
* 问题名称:1坑槽,2积水,3裂缝 | |||
*/ | |||
private String questionName; | |||
/** | |||
* 问题内容 | |||
*/ | |||
private String questionContent; | |||
/** | |||
* 缩略图 | |||
*/ |
@@ -82,6 +82,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
order by create_time desc | |||
</select> | |||
<select id="selectPageList" parameterType="com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest" resultMap="InspectionFileResult"> | |||
select <include refid="Base_Column_List"/> | |||
from th_inspection_file tif | |||
<!-- left join th_inspection ti on tif.inspection_id = ti.id--> | |||
<!-- <where>--> | |||
<!-- <if test="1 == 1"> and tif.mark = 1 </if>--> | |||
<!-- <if test="request.questionId != null and request.questionId != ''"> and tif.question_id = #{request.questionId} </if>--> | |||
<!-- <if test="request.status != null and request.status != 0"> and tif.status = #{request.status} </if>--> | |||
<!-- <if test="request.key != null and request.key != 0"> and (ti.code liek concat('%', #{request.key}, '%') or ti.name liek concat('%', #{request.key}, '%')) </if>--> | |||
<!-- <if test="request.deptIdList != null and request.deptIdList.size() > 0">--> | |||
<!-- and ti.dept_id in--> | |||
<!-- <foreach item="deptId" collection="request.deptIdList" open="(" separator="," close=")">--> | |||
<!-- #{deptId}--> | |||
<!-- </foreach>--> | |||
<!-- </if>--> | |||
<!-- </where>--> | |||
order by create_time desc | |||
</select> | |||
<update id="updateByIdList" parameterType="hashmap"> | |||
update th_inspection_file | |||
<trim prefix="SET" suffixOverrides=","> |