소스 검색

增加一个 可上传上级条线文件的boolean值

tags/24080901
PoffyZhang 1 년 전
부모
커밋
54b75751cf
3개의 변경된 파일34개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  2. +23
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java
  3. +9
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java

+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java 파일 보기

@@ -82,6 +82,7 @@ public class ProjectLibManage {
item.setBizDomain(w.getBizDomain());
item.setProcessStatus(w.getProcessStatus());
item.setInstCode(w.getInstCode());
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg());
return item;
});
return PageVo.of(records, total);
@@ -109,6 +110,7 @@ public class ProjectLibManage {
item.setBizDomain(w.getBizDomain());
item.setProcessStatus(w.getProcessStatus());
item.setInstCode(w.getInstCode());
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg());
if(user.getIsOrgAdmin() &&
ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus())
&& StringUtils.isNotBlank(w.getSuperOrgCode()) && StringUtils.isNotBlank(user.getOrganizationCode())


+ 23
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java 파일 보기

@@ -1,7 +1,11 @@
package com.ningdatech.pmapi.projectlib.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ningdatech.pmapi.common.enumeration.CommonEnum;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
@@ -95,4 +99,23 @@ public class ProjectLibListItemVO {

@ApiModelProperty("21位项目编号")
private String projectCode;

@ApiModelProperty("是否有上级条线主管部门 0没有 1有")
private Integer isHigherSuperOrg;

//预审申报时候 需不需要上传上级条线意见文件
private Boolean needUploadSuperLineFile;
public Boolean getNeedUploadSuperLineFile() {
UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail();
//要满足条件 1.当前登录人是市本级单位 2.有上级条线单位 3.项目状态是待预审
if (Objects.nonNull(userInfoDetail) && userInfoDetail.getIsMunicipalOrg()
&& Objects.nonNull(this.isHigherSuperOrg)
&& ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(this.status)
&& CommonEnum.YES.getCode().equals(this.isHigherSuperOrg)) {
this.needUploadSuperLineFile = Boolean.TRUE;
return this.needUploadSuperLineFile;
}
this.needUploadSuperLineFile = null;
return this.needUploadSuperLineFile;
}
}

+ 9
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java 파일 보기

@@ -3,6 +3,7 @@ package com.ningdatech.pmapi.user.security.auth.model;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.ningdatech.basic.auth.AbstractLoginUser;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.sys.model.entity.Role;
import com.ningdatech.pmapi.user.entity.enumeration.RoleEnum;
import lombok.Data;
@@ -133,4 +134,12 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails {
}
return Boolean.FALSE;
}

public Boolean getIsMunicipalOrg(){
//如果是丽水市本级的code 就是
if(RegionConst.RC_LS.equals(this.regionCode)){
return Boolean.TRUE;
}
return Boolean.FALSE;
}
}

불러오는 중...
취소
저장