feat(oa): 新增项目进度步骤分页查询功能
- 在OaProjectScheduleStepMapper中添加selectVoPageNew方法 - 在OaProjectScheduleStepMapper.xml中实现对应的SQL查询逻辑 - 修改OaProjectScheduleStepServiceImpl中的queryPageListPage方法,使用新的查询方法 - 删除旧的buildQueryWrapperLambda方法,改用QueryWrapper构建查询条件 - 在buildQueryWrapper方法中增加nodeHeader、startTime和endTime的查询条件- 在OaProjectScheduleStepVo中添加projectId和projectName字段
This commit is contained in:
@@ -187,6 +187,10 @@ public class OaProjectScheduleStepVo extends BaseEntity {
|
||||
//其他
|
||||
private String other;
|
||||
|
||||
private Long projectId;
|
||||
|
||||
private String projectName;
|
||||
|
||||
/** 进度统计内部类(封装total、completed等字段) */
|
||||
@Data
|
||||
public static class ProgressStats {
|
||||
|
||||
@@ -37,4 +37,6 @@ public interface OaProjectScheduleStepMapper extends BaseMapperPlus<OaProjectSch
|
||||
* @return 删除的记录数
|
||||
*/
|
||||
int deleteByScheduleIds(@Param("scheduleIds") Collection<Long> scheduleIds);
|
||||
|
||||
Page<OaProjectScheduleStepVo> selectVoPageNew(Page<Object> build,@Param(Constants.WRAPPER) QueryWrapper<OaProjectScheduleStep> lqw);
|
||||
}
|
||||
|
||||
@@ -100,25 +100,11 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<OaProjectScheduleStepVo> queryPageListPage(OaProjectScheduleStepBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaProjectScheduleStep> lqw = buildQueryWrapperLambda(bo);
|
||||
Page<OaProjectScheduleStepVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
QueryWrapper<OaProjectScheduleStep> lqw = buildQueryWrapper(bo);
|
||||
Page<OaProjectScheduleStepVo> result = baseMapper.selectVoPageNew(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaProjectScheduleStep> buildQueryWrapperLambda(OaProjectScheduleStepBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaProjectScheduleStep> lqw = Wrappers.lambdaQuery();
|
||||
|
||||
lqw.eq(bo.getScheduleId() != null, OaProjectScheduleStep::getScheduleId, bo.getScheduleId())
|
||||
.eq(OaProjectScheduleStep::getDelFlag, 0)
|
||||
.eq(bo.getStepOrder() != null, OaProjectScheduleStep::getStepOrder, bo.getStepOrder())
|
||||
.like(StringUtils.isNotBlank(bo.getStepName()), OaProjectScheduleStep::getStepName, bo.getStepName())
|
||||
.eq(bo.getStatus() != null, OaProjectScheduleStep::getStatus, bo.getStatus());
|
||||
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询项目进度步骤跟踪列表
|
||||
*/
|
||||
@@ -137,6 +123,10 @@ public class OaProjectScheduleStepServiceImpl implements IOaProjectScheduleStepS
|
||||
lqw.eq(bo.getStepOrder() != null, "opss.step_order", bo.getStepOrder());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getStepName()), "opss.step_name", bo.getStepName());
|
||||
lqw.eq(bo.getStatus() != null, "opss.status", bo.getStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getNodeHeader()), "opss.node_header", bo.getNodeHeader());
|
||||
//根据开始时间和结束时间作为范围判断planEnd
|
||||
lqw.ge(bo.getStartTime() != null, "opss.plan_end", bo.getStartTime());
|
||||
lqw.le(bo.getEndTime() != null, "opss.plan_end", bo.getEndTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user