@@ -82,6 +82,7 @@ public class ProjectLibManage { | |||||
item.setBizDomain(w.getBizDomain()); | item.setBizDomain(w.getBizDomain()); | ||||
item.setProcessStatus(w.getProcessStatus()); | item.setProcessStatus(w.getProcessStatus()); | ||||
item.setInstCode(w.getInstCode()); | item.setInstCode(w.getInstCode()); | ||||
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg()); | |||||
return item; | return item; | ||||
}); | }); | ||||
return PageVo.of(records, total); | return PageVo.of(records, total); | ||||
@@ -109,6 +110,7 @@ public class ProjectLibManage { | |||||
item.setBizDomain(w.getBizDomain()); | item.setBizDomain(w.getBizDomain()); | ||||
item.setProcessStatus(w.getProcessStatus()); | item.setProcessStatus(w.getProcessStatus()); | ||||
item.setInstCode(w.getInstCode()); | item.setInstCode(w.getInstCode()); | ||||
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg()); | |||||
if(user.getIsOrgAdmin() && | if(user.getIsOrgAdmin() && | ||||
ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus()) | ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus()) | ||||
&& StringUtils.isNotBlank(w.getSuperOrgCode()) && StringUtils.isNotBlank(user.getOrganizationCode()) | && StringUtils.isNotBlank(w.getSuperOrgCode()) && StringUtils.isNotBlank(user.getOrganizationCode()) | ||||
@@ -1,7 +1,11 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.vo; | package com.ningdatech.pmapi.projectlib.model.vo; | ||||
import com.fasterxml.jackson.annotation.JsonFormat; | 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.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.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Builder; | import lombok.Builder; | ||||
@@ -95,4 +99,23 @@ public class ProjectLibListItemVO { | |||||
@ApiModelProperty("21位项目编号") | @ApiModelProperty("21位项目编号") | ||||
private String projectCode; | 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; | |||||
} | |||||
} | } |
@@ -3,6 +3,7 @@ package com.ningdatech.pmapi.user.security.auth.model; | |||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import cn.hutool.core.collection.CollectionUtil; | import cn.hutool.core.collection.CollectionUtil; | ||||
import com.ningdatech.basic.auth.AbstractLoginUser; | 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.sys.model.entity.Role; | ||||
import com.ningdatech.pmapi.user.entity.enumeration.RoleEnum; | import com.ningdatech.pmapi.user.entity.enumeration.RoleEnum; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -133,4 +134,12 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails { | |||||
} | } | ||||
return Boolean.FALSE; | return Boolean.FALSE; | ||||
} | } | ||||
public Boolean getIsMunicipalOrg(){ | |||||
//如果是丽水市本级的code 就是 | |||||
if(RegionConst.RC_LS.equals(this.regionCode)){ | |||||
return Boolean.TRUE; | |||||
} | |||||
return Boolean.FALSE; | |||||
} | |||||
} | } |