瀏覽代碼

预审不通过 要在申报管理看到

master
PoffyZhang 1 年之前
父節點
當前提交
2631cff619
共有 1 個文件被更改,包括 40 次插入3 次删除
  1. +40
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java

+ 40
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java 查看文件

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.constant.RegionConst;
@@ -378,9 +379,45 @@ public class DeclaredProjectManage {
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
//放入用户的单位 因为数据权限 只能看自己单位
req.setBuildOrgCode(user.getOrganizationCode());
return projectlibManager.projectLibList(req);
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
//当非预审申报的时候 是自己单位 当是预审申报的时候 要主管单位
preQuery(query,user);
Page<Project> page = projectService.page(req.page(), query);
long total;
if ((total = page.getTotal()) == 0) {
return PageVo.empty();
}
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> {
ProjectLibListItemVO item = new ProjectLibListItemVO();
item.setId(w.getId());
item.setProjectName(w.getProjectName());
item.setCreateOn(w.getCreateOn());
item.setDeclaredAmount(w.getDeclareAmount());
item.setStage(w.getStage());
item.setStatus(w.getStatus());
item.setProjectType(w.getProjectType());
item.setProjectYear(w.getProjectYear());
item.setBuildOrg(w.getBuildOrgName());
item.setBizDomain(w.getBizDomain());
item.setProcessStatus(w.getProcessStatus());
item.setInstCode(w.getInstCode());
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg());
return item;
});
return PageVo.of(records, total);
}

//当非预审申报的时候 是自己单位 当是预审申报的时候 要主管单位 并且他是单位管理员
private void preQuery(LambdaQueryWrapper<Project> query,UserFullInfoDTO user) {
//如果当前登录是单位管理员
if(user.getIsOrgAdmin()){
query.and(s1 -> s1.eq(Project::getStatus,ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode())
.eq(Project::getSuperOrgCode,user.getOrganizationCode())
.or(q2 -> q2.eq(Project::getBuildOrgCode,user.getOrganizationCode())));
}else{
//否则 只能看到 非预审 并且
query.and(q2 -> q2.eq(Project::getBuildOrgCode,user.getOrganizationCode()));
}
}

public void exportList(HttpServletResponse response, ProjectListReq param) {


Loading…
取消
儲存