feat(oa): 新增反馈类型字段及查询功能
- 在 OaFeedback 实体类中新增 type 字段- 在 OaFeedbackBo 业务对象中新增 type 查询参数 - 在 OaFeedbackVo 视图对象中新增 type 展示字段 - 更新 OaFeedbackMapper.xml 映射文件以支持 type 字段 - 新增 queryPageIndexList 方法用于分页查询反馈列表 - 新增 /indexList 接口用于前端调用反馈列表查询 - 实现 buildQueryWrapperIndex 构建查询条件的方法 - 添加注释说明反馈类型默认值为 feedback
This commit is contained in:
@@ -39,6 +39,13 @@ public class OaFeedbackController extends BaseController {
|
||||
|
||||
private final IOaFeedbackService iOaFeedbackService;
|
||||
|
||||
/**
|
||||
* 查询反馈列表
|
||||
*/
|
||||
@GetMapping("/indexList")
|
||||
public TableDataInfo<OaFeedbackVo> listFeedback(OaFeedbackBo bo, PageQuery pageQuery) {
|
||||
return iOaFeedbackService.queryPageIndexList(bo, pageQuery);
|
||||
}
|
||||
/**
|
||||
* 查询问题反馈列表
|
||||
*/
|
||||
|
||||
@@ -52,4 +52,7 @@ public class OaFeedback extends BaseEntity {
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
||||
@@ -57,4 +57,6 @@ public class OaFeedbackBo extends BaseEntity {
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
private String type;
|
||||
}
|
||||
|
||||
@@ -85,4 +85,7 @@ public class OaFeedbackVo {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
private String type;
|
||||
}
|
||||
|
||||
@@ -53,4 +53,5 @@ public interface IOaFeedbackService {
|
||||
|
||||
TableDataInfo<OaFeedbackVo> indexQueryList(OaFeedbackBo bo, PageQuery pageQuery);
|
||||
|
||||
TableDataInfo<OaFeedbackVo> queryPageIndexList(OaFeedbackBo bo, PageQuery pageQuery);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
@@ -32,6 +34,7 @@ public class OaFeedbackServiceImpl implements IOaFeedbackService {
|
||||
|
||||
private final OaFeedbackMapper baseMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询问题反馈
|
||||
*/
|
||||
@@ -40,6 +43,27 @@ public class OaFeedbackServiceImpl implements IOaFeedbackService {
|
||||
return baseMapper.selectVoByIdPlus(feedbackId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询反馈列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaFeedbackVo> queryPageIndexList(OaFeedbackBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaFeedback> lqw = buildQueryWrapperIndex(bo);
|
||||
Page<OaFeedbackVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaFeedback> buildQueryWrapperIndex(OaFeedbackBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaFeedback> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), OaFeedback::getTitle, bo.getTitle());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContent()), OaFeedback::getContent, bo.getContent());
|
||||
lqw.eq(bo.getStatus() != null, OaFeedback::getStatus, bo.getStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getType()), OaFeedback::getType, bo.getType());
|
||||
lqw.eq(bo.getProjectId() != null, OaFeedback::getProjectId, bo.getProjectId());
|
||||
lqw.orderByDesc(OaFeedback::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
/**
|
||||
* 查询问题反馈列表
|
||||
*/
|
||||
|
||||
@@ -769,7 +769,7 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
||||
LambdaQueryWrapper<OaExpressQuestion> wrapper = Wrappers.<OaExpressQuestion>lambdaQuery()
|
||||
.eq(OaExpressQuestion::getReportBy, nickName)
|
||||
.eq(OaExpressQuestion::getDelFlag, 0);
|
||||
|
||||
//type feedback vachar 默认值叫feedback
|
||||
// 添加时间范围条件(基于汇报时间)
|
||||
if (startDate != null && endDate != null) {
|
||||
wrapper.between(OaExpressQuestion::getReportTime, startDate, endDate);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<result property="feedbackId" column="feedback_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
@@ -47,6 +48,7 @@
|
||||
oaf.create_time,
|
||||
oaf.create_by,
|
||||
oaf.project_id,
|
||||
oaf.type,
|
||||
sop.project_name,
|
||||
sop.project_code,
|
||||
sop.project_num,
|
||||
@@ -63,6 +65,7 @@
|
||||
oaf.status,
|
||||
oaf.title,
|
||||
oaf.project_id,
|
||||
oaf.type,
|
||||
sop.project_name,
|
||||
sop.project_code,
|
||||
sop.project_num,
|
||||
|
||||
Reference in New Issue
Block a user