Kaynağa Gözat

modify:

1. 项目申报列表、评审列表查询按照状态修改;
tags/24090601
WendyYang 2 ay önce
ebeveyn
işleme
fffb5ab1ba
5 değiştirilmiş dosya ile 61 ekleme ve 16 silme
  1. +22
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java
  2. +32
    -12
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java
  3. +4
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java
  4. +2
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/ProjectStatus.java
  5. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/QxWorkbenchManage.java

+ 22
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java Dosyayı Görüntüle

@@ -16,6 +16,7 @@ import com.hz.pm.api.common.enumeration.BoolDisplayEnum;
import com.hz.pm.api.common.enumeration.CommonEnum;
import com.hz.pm.api.common.enumeration.ProjectProcessType;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.ExistsSqlConst;
import com.hz.pm.api.common.model.constant.MhUnitConst;
import com.hz.pm.api.common.model.constant.TypeReferenceConst;
import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent;
@@ -353,19 +354,38 @@ public class DeclaredProjectManage {
* @return
*/
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
Integer status = req.getStatus();
req.setStatus(null);
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req);
// 当非预审申报的时候 是自己单位 当是预审申报的时候 要主管单位
if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) {
return PageVo.empty();
}
if (status != null) {
if (ProjectStatus.COMPLIANCE_REVIEW_PASSED.eq(status)) {
query.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE +
" and npsc.event = {0}", ProjectStateChangeEvent.COMPLIANCE_REVIEW_PASS);
} else {
query.eq(Project::getStatus, status);
}
}
query.ne(Project::getStage, ProjectStatus.STOPPED.getCode());
query.eq(Project::getNewest, Boolean.TRUE);
Page<Project> page = projectService.page(req.page(), query);
if (page.getTotal() == 0) {
return PageVo.empty();
}
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(),
w -> BeanUtil.copyProperties(w, ProjectLibListItemVO.class));
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> {
ProjectLibListItemVO item = BeanUtil.copyProperties(w, ProjectLibListItemVO.class);
if (!ProjectStatus.TO_BE_DECLARED.eq(w.getStatus())
&& ProjectStatus.COMPLIANCE_REVIEW_FAILED.eq(w.getStatus())
&& ProjectStatus.ON_COMPLIANCE_REVIEW.eq(w.getStatus())
&& !ProjectStatus.CHANGE.eq(w.getStage())) {
item.setStatus(ProjectStatus.COMPLIANCE_REVIEW_PASSED.getCode());
}
return item;
});
return PageVo.of(records, page.getTotal());
}



+ 32
- 12
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java Dosyayı Görüntüle

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.enumeration.ProjectProcessType;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.ExistsSqlConst;
import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent;
import com.hz.pm.api.common.statemachine.util.ProjectStateMachineUtil;
import com.hz.pm.api.datascope.model.DataScopeDTO;
import com.hz.pm.api.datascope.utils.DataScopeUtil;
@@ -121,8 +123,8 @@ public class ProjectReviewManage {
/**
* 项目列表
*
* @param req
* @return
* @param req \
* @return \
*/
public PageVo<ProjectLibListItemVO> pageReviewProject(ProjectListReq req) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
@@ -130,20 +132,38 @@ public class ProjectReviewManage {
if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) {
return PageVo.empty();
}
Integer status = req.getStatus();
if (status != null) {
req.setStatus(null);
if (ProjectStatus.PROJECT_REVIEW_PASSED.eq(status)) {
query.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE +
" and npsc.event = {0}", ProjectStateChangeEvent.PROJECT_REVIEW_PASS);
} else {
query.eq(Project::getStatus, status);
}
} else {
query.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE +
" and npsc.event = {0}", ProjectStateChangeEvent.COMPLIANCE_REVIEW_PASS);
}
ProjectManageUtil.projectQuery(query, req);
query.in(Project::getStatus,
ProjectStatus.WITHOUT_PROJECT_REVIEW.getCode(),
ProjectStatus.ON_PROJECT_REVIEW.getCode(),
ProjectStatus.PROJECT_REVIEW_FAILED.getCode())
.eq(Project::getNewest, Boolean.TRUE);
query.eq(Project::getNewest, Boolean.TRUE)
.ne(Project::getStage, ProjectStatus.STOPPED.getCode());
Page<Project> page = projectService.page(req.page(), query);
long total;
if ((total = page.getTotal()) == 0) {
if (page.getTotal() == 0) {
return PageVo.empty();
}
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(),
w -> BeanUtil.copyProperties(w, ProjectLibListItemVO.class));
return PageVo.of(records, total);
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> {
ProjectLibListItemVO item = BeanUtil.copyProperties(w, ProjectLibListItemVO.class);
if (!ProjectStatus.PROJECT_REVIEW_FAILED.eq(w.getStatus())
&& !ProjectStatus.COMPLIANCE_REVIEW_PASSED.eq(w.getStatus())
&& !ProjectStatus.WITHOUT_PROJECT_REVIEW.eq(w.getStatus())
&& !ProjectStatus.ON_PROJECT_REVIEW.eq(w.getStatus())
&& !ProjectStatus.CHANGE.eq(w.getStage())) {
item.setStatus(ProjectStatus.PROJECT_REVIEW_PASSED.getCode());
}
return item;
});
return PageVo.of(records, page.getTotal());
}

private boolean projectQueryPermission(LambdaQueryWrapper<Project> query,


+ 4
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java Dosyayı Görüntüle

@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
@@ -962,7 +963,9 @@ public class ProjectLibManage {
replaceInfo.setSourceSystem(curr.getSourceSystemNames().get(i1));
replaceInfo.setTargetSystem(curr.getTargetSystemName());
replaceInfo.setBatchNo(i + 1);
replaceInfo.setSourceSystemId(curr.getSourceSystemIds().get(i1));
if (ArrayUtil.isNotEmpty(curr.getSourceSystemIds())) {
replaceInfo.setSourceSystemId(curr.getSourceSystemIds().get(i1));
}
replaceInfos.add(replaceInfo);
}
}


+ 2
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/ProjectStatus.java Dosyayı Görüntüle

@@ -31,6 +31,7 @@ public enum ProjectStatus implements IStatus<Integer, String> {
*/
ON_COMPLIANCE_REVIEW(10030, "合规性审查中", 10000),
COMPLIANCE_REVIEW_FAILED(10031, "合规性审查不通过", 10000),
COMPLIANCE_REVIEW_PASSED(10032, "合规性审查通过", 10000),

/**
* 项目评审
@@ -38,6 +39,7 @@ public enum ProjectStatus implements IStatus<Integer, String> {
WITHOUT_PROJECT_REVIEW(10040, "待项目评审", 10000),
ON_PROJECT_REVIEW(10041, "项目评审中", 10000),
PROJECT_REVIEW_FAILED(10042, "项目评审不通过", 10000),
PROJECT_REVIEW_PASSED(10043, "项目评审通过", 10000),

ON_ANNUAL_PLAN(10010, "年度计划中", 10000),



+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/QxWorkbenchManage.java Dosyayı Görüntüle

@@ -68,7 +68,7 @@ public class QxWorkbenchManage {
stat.setTotalBudget(DecimalUtil.sum(purchases, QxPurchase::getPurchaseBudget));
stat.setTotalContractAmount(DecimalUtil.sum(purchases, QxPurchase::getContractAmount));
QueryWrapper<QxProjectSystemReplaceInfos> wrapper = new QueryWrapper<>();
wrapper.select("count(distinct project_id) adaptCount");
wrapper.select("count(distinct project_id) \"adaptCount\"");
wrapper.in("project_id", projectIds);
wrapper.isNotNull("has_security_eval");
Map<String, Object> map = qxProjectSystemReplaceInfosService.getMap(wrapper);


Yükleniyor…
İptal
Kaydet