feat(oa): 增强项目进度和需求查询功能
- 为项目进度添加贸易类型和项目代号查询条件 - 优化项目进度时间筛选逻辑,支持单独指定开始或结束时间 - 为多个业务对象添加日期格式化注解,统一日期处理 - 修改需求查询逻辑,标题和描述改为模糊匹配 - 为任务和仓库主表添加时间段查询功能 - 增加项目名称模糊搜索支持
This commit is contained in:
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 项目进度业务对象 oa_project_schedule
|
||||
@@ -50,11 +51,15 @@ public class OaProjectScheduleBo extends BaseEntity {
|
||||
/**
|
||||
* 进度开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 进度完成时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
@@ -77,4 +82,8 @@ public class OaProjectScheduleBo extends BaseEntity {
|
||||
|
||||
//进度负责人
|
||||
private String steward;
|
||||
|
||||
private Integer tradeType;
|
||||
//项目代号
|
||||
private String projectCode;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.Date;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述业务对象 oa_report_summary
|
||||
@@ -39,6 +40,8 @@ public class OaReportSummaryBo extends BaseEntity {
|
||||
* 汇报日期
|
||||
*/
|
||||
@NotNull(message = "汇报日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date reportDate;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.Date;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* OA 需求业务对象 oa_requirements
|
||||
@@ -56,6 +57,8 @@ public class OaRequirementsBo extends BaseEntity {
|
||||
/**
|
||||
* 截止日期(最终时间)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date deadline;
|
||||
|
||||
/**
|
||||
|
||||
@@ -191,4 +191,6 @@ public class SysOaTaskBo extends BaseEntity {
|
||||
|
||||
//关联项目进度id
|
||||
private Long trackId;
|
||||
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
@@ -80,4 +80,11 @@ public class SysOaWarehouseMasterBo extends BaseEntity {
|
||||
|
||||
private Long requirementId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -90,9 +90,21 @@ public class OaProjectScheduleServiceImpl implements IOaProjectScheduleService {
|
||||
lqw.eq(bo.getTemplateId() != null, "ops.template_id", bo.getTemplateId());
|
||||
lqw.eq(bo.getCurrentStep() != null, "ops.current_step", bo.getCurrentStep());
|
||||
lqw.eq(bo.getStatus() != null, "ops.status", bo.getStatus());
|
||||
//根据内外贸
|
||||
lqw.eq(bo.getTradeType() !=null, "op.trade_type",bo.getTradeType());
|
||||
//根据代号
|
||||
lqw.like(bo.getProjectCode() != null, "op.project_code", bo.getProjectCode());
|
||||
lqw.gt(bo.getPrePay()!=null&&bo.getPrePay()>0, "op.pre_pay", 0);
|
||||
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
||||
"op.begin_time", params.get("beginCreateTime"), params.get("endCreateTime"));
|
||||
// lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
||||
// "op.begin_time", params.get("beginCreateTime"), params.get("endCreateTime"));
|
||||
// 使用 startTime 和 endTime 字段进行时间筛选
|
||||
lqw.between(bo.getStartTime() != null && bo.getEndTime() != null,
|
||||
"ops.start_time", bo.getStartTime(), bo.getEndTime());
|
||||
// 单独指定开始时间或结束时间的情况
|
||||
lqw.ge(bo.getStartTime() != null && bo.getEndTime() == null,
|
||||
"ops.start_time", bo.getStartTime());
|
||||
lqw.le(bo.getStartTime() == null && bo.getEndTime() != null,
|
||||
"ops.end_time", bo.getEndTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,11 +61,11 @@ public class OaRequirementsServiceImpl implements IOaRequirementsService {
|
||||
|
||||
private QueryWrapper<OaRequirements> buildQueryWrapper(OaRequirementsBo bo) {
|
||||
QueryWrapper<OaRequirements> qw = new QueryWrapper<>();
|
||||
qw.eq(StringUtils.isNotBlank(bo.getTitle()), "r.title", bo.getTitle());
|
||||
qw.like(StringUtils.isNotBlank(bo.getTitle()), "r.title", bo.getTitle());
|
||||
qw.eq(bo.getRequesterId() != null, "r.requester_id", bo.getRequesterId());
|
||||
qw.eq(bo.getOwnerId() != null, "r.owner_id", bo.getOwnerId());
|
||||
qw.eq(bo.getProjectId() != null, "r.project_id", bo.getProjectId());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getDescription()), "r.description", bo.getDescription());
|
||||
qw.like(StringUtils.isNotBlank(bo.getDescription()), "r.description", bo.getDescription());
|
||||
qw.eq(bo.getDeadline() != null, "r.deadline", bo.getDeadline());
|
||||
qw.eq(bo.getStatus() != null, "r.status", bo.getStatus());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getAccessory()), "r.accessory", bo.getAccessory());
|
||||
|
||||
@@ -152,7 +152,7 @@ public class SysOaTaskServiceImpl implements ISysOaTaskService {
|
||||
lqw.eq(bo.getCreateUserId()!=null, "sot.create_user_id", bo.getCreateUserId());
|
||||
lqw.eq(bo.getWorkerId()!=null, "sot.worker_id", bo.getWorkerId());
|
||||
lqw.eq(bo.getProjectId()!=null, "sot.project_id", bo.getProjectId());
|
||||
lqw.eq(bo.getProjectNum()!=null, "sop.project_num", bo.getProjectNum());
|
||||
lqw.like(bo.getProjectNum()!=null, "sop.project_num", bo.getProjectNum());
|
||||
lqw.eq(bo.getState()!=null, "sot.state", bo.getState());
|
||||
lqw.eq(bo.getItemStatus()!=null, "soti.status", bo.getItemStatus());
|
||||
lqw.like(bo.getTaskTitle()!=null, "sot.task_title", bo.getTaskTitle());
|
||||
@@ -167,6 +167,8 @@ public class SysOaTaskServiceImpl implements ISysOaTaskService {
|
||||
lqw.le(bo.getFinishTime() != null, "sot.finish_time", bo.getFinishTime());
|
||||
// 添加部门ID筛选条件
|
||||
lqw.eq(bo.getDeptId() != null, "sd.dept_id", bo.getDeptId());
|
||||
//添加项目名称搜索
|
||||
lqw.like(bo.getProjectName() != null, "sop.project_name", bo.getProjectName());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,9 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
||||
.eq(bo.getRequirementId() != null, "sowm.requirement_id", bo.getRequirementId())
|
||||
// 其他过滤……
|
||||
.eq("sowm.del_flag",0)
|
||||
// 根据开始时间和结束时间筛选signTime
|
||||
.ge(bo.getStartTime() != null, "sowm.sign_time", bo.getStartTime())
|
||||
.le(bo.getEndTime() != null, "sowm.sign_time", bo.getEndTime())
|
||||
.orderByDesc("sowm.update_time");
|
||||
lqw.select("sowm.*");
|
||||
return lqw;
|
||||
@@ -117,6 +120,10 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
|
||||
// 其他过滤……
|
||||
.eq("sowm.del_flag", 0)
|
||||
.orderByDesc("sowm.create_time");
|
||||
//根据开始时间和结束时间筛选signTime
|
||||
lqw.ge(bo.getStartTime() != null, "sowm.sign_time", bo.getStartTime()); // 根据开始时间筛选
|
||||
lqw.le(bo.getEndTime() != null, "sowm.sign_time", bo.getEndTime()); // 根据结束时间筛选
|
||||
|
||||
|
||||
// 只有在 type = 2 时,才附带这个子查询字段
|
||||
if (bo.getType() != null && bo.getType() == 2L) {
|
||||
|
||||
Reference in New Issue
Block a user