From ef5d830f76ff15b892e8a8ae4c4685323806f3fa Mon Sep 17 00:00:00 2001 From: WendyYang Date: Wed, 31 Jan 2024 09:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=8B=E9=A1=B9=E5=A4=87?= =?UTF-8?q?=E6=A1=88=E6=9F=A5=E8=AF=A2=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hz/pm/api/projectlib/manage/MhProjectManage.java | 13 +++++-------- .../pm/api/projectlib/model/req/DeclaredProjectListReq.java | 10 ++++++---- .../pm/api/projectlib/model/vo/DeclaredProjectListVO.java | 3 --- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/MhProjectManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/MhProjectManage.java index 7da64a7..5f93fed 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/MhProjectManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/MhProjectManage.java @@ -23,8 +23,6 @@ import com.ningdatech.basic.util.CollUtils; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; -import java.time.LocalDate; -import java.time.LocalDateTime; import java.util.Collections; import java.util.List; import java.util.Map; @@ -51,11 +49,11 @@ public class MhProjectManage { LambdaQueryWrapper query = Wrappers.lambdaQuery(MhProject.class) .like(StrUtil.isNotBlank(req.getProjectName()), MhProject::getProjectName, req.getProjectName()) .like(StrUtil.isNotBlank(req.getDeclaredUnit()), MhProject::getUnitName, req.getDeclaredUnit()); - if (req.getBudgetYear() != null) { - LocalDateTime startTime = LocalDate.of(req.getBudgetYear(), 1, 1).atStartOfDay(); - LocalDateTime endTime = startTime.plusYears(1); - query.ge(MhProject::getCreateTime, startTime); - query.lt(MhProject::getCreateTime, endTime); + if (req.getCreateDateMin() != null) { + query.ge(MhProject::getCreateTime, req.getCreateDateMin()); + } + if (req.getCreateDateMax() != null) { + query.lt(MhProject::getCreateTime, req.getCreateDateMax().minusDays(1)); } UserInfoDetails user = LoginUserUtil.loginUserDetail(); if (!user.getSuperAdmin() && !user.getRegionAdmin()) { @@ -89,7 +87,6 @@ public class MhProjectManage { } else { item.setStatus(project.getStatus()); item.setStage(project.getStage()); - item.setBizDomain(project.getBizDomain()); } item.setProjectCode(w.getProjectCode()); item.setProjectName(w.getProjectName()); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/DeclaredProjectListReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/DeclaredProjectListReq.java index ab5d047..b65c41c 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/DeclaredProjectListReq.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/DeclaredProjectListReq.java @@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import java.time.LocalDate; + /** *

* DeclaredProjectListReq @@ -23,10 +25,10 @@ public class DeclaredProjectListReq extends PagePo { @ApiModelProperty("申报单位") private String declaredUnit; - @ApiModelProperty("项目类型") - private String projectType; + @ApiModelProperty("创建时间(开始)") + private LocalDate createDateMin; - @ApiModelProperty("预算年度") - private Integer budgetYear; + @ApiModelProperty("创建时间(结束)") + private LocalDate createDateMax; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/DeclaredProjectListVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/DeclaredProjectListVO.java index cece008..a35368f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/DeclaredProjectListVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/DeclaredProjectListVO.java @@ -23,9 +23,6 @@ public class DeclaredProjectListVO { @ApiModelProperty("申报单位") private String declaredUnit; - @ApiModelProperty("领域") - private Integer bizDomain; - @ApiModelProperty("项目申报金额(万元)") private BigDecimal declaredAmount;