Parcourir la source

'问题列表'

master
dongyuangong il y a 4 ans
Parent
révision
19fe241cc1
3 fichiers modifiés avec 22 ajouts et 8 suppressions
  1. +2
    -8
      src/main/java/com/taauav/front/mapper/UserInspectQuestionMapper.xml
  2. +15
    -0
      src/main/java/com/taauav/front/service/impl/UserInspectQuestionServiceImpl.java
  3. +5
    -0
      src/main/java/com/taauav/front/vo/inspectquestion/UserInspectQuestionListVo.java

+ 2
- 8
src/main/java/com/taauav/front/mapper/UserInspectQuestionMapper.xml Voir le fichier

@@ -4,17 +4,11 @@

<!-- 获取巡检问题列表 -->
<select id="getUserInspectQuestionList" parameterType="com.taauav.front.query.UserInspectQuestionQuery" resultType="com.taauav.front.vo.inspectquestion.UserInspectQuestionListVo">
SELECT q.id,q.question_no,q.assign_user,q.`status`,f.src as file_src,o.content as question_type,f.description,
d.driver_id,d.driver_name,d.driver_area,c.name as driver_area_name,q.create_time as inspect_time,q.inspect_driver_id,
a1.realname as `assignUserName`,a2.realname as `handlerUserName`
SELECT q.id,q.question_no,q.assign_user,q.`status`,f.src AS file_src,f.description,d.`driver_area`,d.`driver_name`,
q.create_time AS inspect_time,q.inspect_driver_id,q.question_id
FROM tauv_inspect_question q
LEFT JOIN tauv_inspect_file f ON f.id=q.inspect_file_id
INNER JOIN tauv_inspect_driver d ON d.id=q.inspect_driver_id
INNER JOIN sys_city c ON c.id=d.driver_area
INNER JOIN tauv_question_options o ON o.id=q.question_id
LEFT JOIN user_admin as a1 on q.assign_user = a1.id
LEFT JOIN user_admin as a2 on q.handler_user = a2.id
WHERE q.mark=1 AND d.mark=1
<if test="query.questionNo != null and query.questionNo != ''">
and q.question_no like concat('%', #{query.questionNo}, '%')
</if>

+ 15
- 0
src/main/java/com/taauav/front/service/impl/UserInspectQuestionServiceImpl.java Voir le fichier

@@ -2,9 +2,13 @@ package com.taauav.front.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.taauav.admin.entity.SysCity;
import com.taauav.admin.entity.TauvInspectDriver;
import com.taauav.admin.entity.TauvInspectQuestion;
import com.taauav.admin.entity.TauvQuestionOptions;
import com.taauav.admin.service.ISysCityService;
import com.taauav.admin.service.ITauvInspectQuestionService;
import com.taauav.admin.service.ITauvQuestionOptionsService;
import com.taauav.common.bean.Response;
import com.taauav.common.core.mps.BaseQuery;
import com.taauav.common.service.impl.BaseServiceImpl;
@@ -64,6 +68,9 @@ public class UserInspectQuestionServiceImpl extends BaseServiceImpl<UserInspectQ
@Autowired
private IUserInspectDriverService inspectDriverService;

@Autowired
private ITauvQuestionOptionsService iTauvQuestionOptionsService;

@Value("${server.UPLOAD_URL}")
private String uploadUrl;
@Value("${file.uploadFolder}")
@@ -104,6 +111,14 @@ public class UserInspectQuestionServiceImpl extends BaseServiceImpl<UserInspectQ
List<UserInspectQuestionListVo> inspectQuestionList = inspectQuestionMapper.getUserInspectQuestionList(page, query);
if (!inspectQuestionList.isEmpty()) {
inspectQuestionList.forEach(item -> {
SysCity cityInfo = sysCityService.getInfoById(item.getDriverArea());
if (!StringUtils.isEmpty(cityInfo)) {
item.setDriverAreaName(cityInfo.getName());
}
TauvQuestionOptions questionInfo = iTauvQuestionOptionsService.getInfoById(item.getQuestionId());
if (!StringUtils.isEmpty(questionInfo)) {
item.setQuestionType(questionInfo.getContent());
}
// 状态描述
item.setStatusName(UserInspectQuestionConstant.INSPECT_QUESTION_STATUS_LIST.get(item.getStatus()));
// 图片处理

+ 5
- 0
src/main/java/com/taauav/front/vo/inspectquestion/UserInspectQuestionListVo.java Voir le fichier

@@ -18,6 +18,11 @@ public class UserInspectQuestionListVo {
*/
private Integer id;

/**
* 问题编号
*/
private Integer questionId;

/**
* 问题编号
*/

Chargement…
Annuler
Enregistrer