@@ -1,18 +1,14 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.ThFeedback; | |||
import com.tuoheng.admin.entity.request.FeedBackQuery; | |||
import com.tuoheng.admin.entity.request.RiverRequest; | |||
import com.tuoheng.admin.entity.vo.RiverProblemVo; | |||
import com.tuoheng.admin.entity.vo.SubmitPromVo; | |||
import com.tuoheng.admin.service.ThFeedbackService; | |||
import com.tuoheng.admin.service.feedback.ThFeedbackService; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.system.entity.City; | |||
import com.tuoheng.system.entity.User; | |||
import com.tuoheng.system.query.WorkQuery; | |||
import com.tuoheng.system.service.ICityService; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.request.FeedBackQuery; | |||
import com.tuoheng.admin.entity.request.FeedBackRequest; | |||
import com.tuoheng.admin.entity.vo.ThFeedBackVo; | |||
import com.tuoheng.admin.service.ThFeedbackService; | |||
import com.tuoheng.admin.service.feedback.ThFeedbackService; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import com.tuoheng.system.query.WorkQuery; | |||
import org.springframework.beans.factory.annotation.Autowired; |
@@ -0,0 +1,71 @@ | |||
package com.tuoheng.admin.entity.request.feedback; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import java.util.Date; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class EditFeedbackRequest { | |||
private Integer id; | |||
/** | |||
* 河道ID | |||
*/ | |||
private Integer streamId; | |||
/** | |||
* 河道名称 | |||
*/ | |||
private String streamName; | |||
/** | |||
* 责任河湖长ID | |||
*/ | |||
private Integer streamAdminId; | |||
/** | |||
* 责任河湖长名称 | |||
*/ | |||
private String streamAdminName; | |||
/** | |||
* 位置 | |||
*/ | |||
private String location; | |||
/** | |||
* 反馈图片地址 多张用,隔开 | |||
*/ | |||
private String feedbackUrl; | |||
/** | |||
* 问题类型 | |||
*/ | |||
private Integer questionType; | |||
/** | |||
* 问题描述 | |||
*/ | |||
private String feedbackDesc; | |||
/** | |||
* 反馈人姓名 | |||
*/ | |||
private String feedbackName; | |||
/** | |||
* 反馈人手机号 | |||
*/ | |||
private String feedbackPhone; | |||
/** | |||
* 问题视频地址 | |||
*/ | |||
private String videoUrl; | |||
} |
@@ -1,4 +1,4 @@ | |||
package com.tuoheng.admin.service; | |||
package com.tuoheng.admin.service.feedback; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.ThFeedback; |
@@ -1,4 +1,4 @@ | |||
package com.tuoheng.admin.service.impl; | |||
package com.tuoheng.admin.service.feedback; | |||
import java.text.ParseException; | |||
import java.text.SimpleDateFormat; | |||
@@ -8,7 +8,6 @@ import cn.hutool.core.convert.Convert; | |||
import cn.hutool.core.date.DateUtil; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
@@ -22,7 +21,6 @@ import com.tuoheng.admin.entity.dto.WestreamUserDto; | |||
import com.tuoheng.admin.entity.request.FeedBackQuery; | |||
import com.tuoheng.admin.entity.request.FeedBackRequest; | |||
import com.tuoheng.admin.entity.request.RiverRequest; | |||
import com.tuoheng.admin.entity.vo.RiverListVo; | |||
import com.tuoheng.admin.entity.vo.RiverProblemVo; | |||
import com.tuoheng.admin.entity.vo.SubmitPromVo; | |||
import com.tuoheng.admin.entity.vo.ThFeedBackVo; | |||
@@ -30,7 +28,6 @@ import com.tuoheng.admin.enums.AuditStatusEnum; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.PointsTypeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.service.ThFeedbackService; | |||
import com.tuoheng.admin.service.ThWestreamMessageService; | |||
import com.tuoheng.admin.utils.DictConstants; | |||
import com.tuoheng.admin.utils.PointsTitleConstants; | |||
@@ -40,13 +37,11 @@ import com.tuoheng.common.config.CommonConfig; | |||
import com.tuoheng.common.exception.ServiceException; | |||
import com.tuoheng.common.utils.CommonUtils; | |||
import com.tuoheng.common.utils.DateUtils; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.common.utils.StringUtils; | |||
import com.tuoheng.system.entity.*; | |||
import com.tuoheng.system.mapper.*; | |||
import com.tuoheng.system.query.WorkQuery; | |||
import com.tuoheng.system.service.IRoleService; | |||
import com.tuoheng.system.service.impl.RoleServiceImpl; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.BeanUtils; |
@@ -4,17 +4,15 @@ import cn.hutool.core.date.DateField; | |||
import cn.hutool.core.date.DateUtil; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.tuoheng.admin.common.ServiceExceptionEnum; | |||
import com.tuoheng.admin.common.UrlConstant; | |||
import com.tuoheng.admin.entity.domain.*; | |||
import com.tuoheng.admin.entity.vo.*; | |||
import com.tuoheng.admin.enums.HttpStatusEnum; | |||
import com.tuoheng.admin.enums.InspectionWayEnum; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.mapper.QuestionMapper; | |||
import com.tuoheng.admin.mapper.StreamMapper; | |||
import com.tuoheng.admin.mapper.ThInspectionFileMapper; | |||
import com.tuoheng.admin.mapper.ThInspectionMapper; | |||
import com.tuoheng.admin.service.ThFeedbackService; | |||
import com.tuoheng.admin.service.feedback.ThFeedbackService; | |||
import com.tuoheng.admin.service.LargeScreenService; | |||
import com.tuoheng.common.exception.ServiceException; | |||
import com.tuoheng.common.utils.CommonUtils; |
@@ -39,28 +39,19 @@ | |||
<!-- 查询巡检问题列表 --> | |||
<select id="selectQuestionList" resultType="com.tuoheng.admin.entity.vo.ThInspectionQuestionVo"> | |||
SELECT | |||
i.id AS inspectionId, | |||
i.CODE AS inspectionCode, | |||
i.NAME AS inspectionName, | |||
s.NAME AS streamName, | |||
i.inspection_time AS inspectionTime, | |||
i.`status`, | |||
i.execution_start_time AS executionStartTime, | |||
(SELECT count(1) FROM th_inspection_file fi | |||
WHERE fi.inspection_id = i.id AND fi.`status` = 1 AND fi.mark = 1 AND fi.tenant_id=#{tenantId}) AS | |||
reviewedPictureNum, | |||
(SELECT count(1) FROM th_inspection_file fi | |||
WHERE fi.inspection_id = i.id AND fi.`status` = 0 AND fi.mark = 1 AND fi.tenant_id=#{tenantId}) AS | |||
unreviewedPictureNum, | |||
(SELECT count(1) FROM th_inspection_file fi | |||
WHERE fi.inspection_id = i.id AND fi.mark = 1 AND fi.tenant_id=#{tenantId}) AS totalPictureNum | |||
FROM | |||
th_inspection i | |||
LEFT JOIN th_inspection_file f ON i.id = f.inspection_id | |||
LEFT JOIN th_stream s ON i.stream_id = s.id | |||
WHERE | |||
i.mark = 1 and i.tenant_id=#{tenantId} AND s.tenant_id=#{tenantId} | |||
AND ( i.STATUS = 10 OR i.STATUS = 15 ) | |||
i.id AS inspectionId, | |||
i.CODE AS inspectionCode, | |||
i.NAME AS inspectionName, | |||
s.NAME AS streamName, | |||
i.inspection_time AS inspectionTime, | |||
i.`status`, | |||
i.execution_start_time AS executionStartTime, | |||
(SELECT count(1) FROM th_inspection_file fi WHERE fi.inspection_id = i.id AND fi.`status` = 1 AND fi.mark = 1 AND fi.tenant_id=#{tenantId}) AS reviewedPictureNum, | |||
(SELECT count(1) FROM th_inspection_file fi WHERE fi.inspection_id = i.id AND fi.`status` = 0 AND fi.mark = 1 AND fi.tenant_id=#{tenantId}) AS unreviewedPictureNum, | |||
(SELECT count(1) FROM th_inspection_file fi WHERE fi.inspection_id = i.id AND fi.mark = 1 AND fi.tenant_id=#{tenantId}) AS totalPictureNum FROM th_inspection i | |||
LEFT JOIN th_inspection_file f ON i.id = f.inspection_id | |||
LEFT JOIN th_stream s ON i.stream_id = s.id | |||
WHERE i.mark = 1 and i.tenant_id = #{tenantId} AND s.tenant_id = #{tenantId} AND ( i.STATUS = 10 OR i.STATUS = 15 ) | |||
<if test="request.streamName != '' and request.streamName != null"> | |||
AND s.name LIKE concat('%',#{request.streamName},'%') | |||
</if> | |||
@@ -76,11 +67,8 @@ | |||
<if test="request.inspectionName != '' and request.inspectionName != null"> | |||
AND i.name LIKE concat('%',#{request.inspectionName},'%') | |||
</if> | |||
GROUP BY | |||
i.id | |||
ORDER BY | |||
unreviewedPictureNum DESC, | |||
i.inspection_time DESC | |||
GROUP BY i.id | |||
ORDER BY i.status ASC, i.inspection_time DESC | |||
</select> | |||
<!-- 查询巡检任务问题图片列表 --> |
@@ -1,5 +1,6 @@ | |||
package com.tuoheng.common.exception; | |||
import com.tuoheng.common.common.ExceptionInterface; | |||
import com.tuoheng.common.utils.JsonResult; | |||
/** | |||
* 业务异常类(业务处理时手动抛出异常) | |||
@@ -42,5 +43,15 @@ public class ServiceException extends RuntimeException { | |||
this.code = code; | |||
} | |||
/** | |||
* 构造器 | |||
* | |||
* @param msg | |||
*/ | |||
public ServiceException(String msg) { | |||
super(msg); | |||
this.msg = msg; | |||
this.code = JsonResult.ERROR; | |||
} | |||
} | |||