@@ -54,6 +54,13 @@ public class ProjectLibController { | |||||
return projectLibManage.projectAllListWithPermission(req,user); | return projectLibManage.projectAllListWithPermission(req,user); | ||||
} | } | ||||
@GetMapping("/lib-list") | |||||
@ApiOperation("包含申报项目列表和项目归集(运维项目)列表") | |||||
public PageVo<ProjectLibListItemVO> libList(ProjectListReq req) { | |||||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | |||||
return projectLibManage.libListWithPermission(req,user); | |||||
} | |||||
@GetMapping("/history-list/{id}") | @GetMapping("/history-list/{id}") | ||||
@ApiOperation("项目历史版本列表") | @ApiOperation("项目历史版本列表") | ||||
public JSONObject historyProjects(@PathVariable Long id) { | public JSONObject historyProjects(@PathVariable Long id) { | ||||
@@ -53,6 +53,7 @@ import com.ningdatech.pmapi.projectlib.handle.ProcessExecuteChainHandle; | |||||
import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; | import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; | ||||
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; | import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.*; | import com.ningdatech.pmapi.projectlib.model.entity.*; | ||||
import com.ningdatech.pmapi.projectlib.model.po.ProjectPO; | |||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectApplicationListReq; | import com.ningdatech.pmapi.projectlib.model.req.ProjectApplicationListReq; | ||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.AnnualAmountVO; | import com.ningdatech.pmapi.projectlib.model.vo.AnnualAmountVO; | ||||
@@ -276,11 +277,8 @@ public class ProjectLibManage { | |||||
* @return | * @return | ||||
*/ | */ | ||||
public PageVo<ProjectLibListItemVO> projectAllListWithPermission(ProjectListReq req, UserFullInfoDTO user) { | public PageVo<ProjectLibListItemVO> projectAllListWithPermission(ProjectListReq req, UserFullInfoDTO user) { | ||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | |||||
user = buildProjectLibPermission(query, user); | |||||
//项目查最新 | |||||
query.eq(Project::getNewest, Boolean.TRUE); | |||||
Page<Project> page = projectService.page(req.page(), query); | |||||
req = buildProjectLibPermission(req,user); | |||||
Page<ProjectPO> page = projectService.pageAllWithPermission(req.page(), req); | |||||
long total; | long total; | ||||
if (CollUtil.isEmpty(page.getRecords())) { | if (CollUtil.isEmpty(page.getRecords())) { | ||||
return PageVo.empty(); | return PageVo.empty(); | ||||
@@ -288,9 +286,11 @@ public class ProjectLibManage { | |||||
UserFullInfoDTO finalUser = user; | UserFullInfoDTO finalUser = user; | ||||
Set<String> projectCodes = page.getRecords().stream() | Set<String> projectCodes = page.getRecords().stream() | ||||
.map(Project::getProjectCode).collect(Collectors.toSet()); | |||||
.map(ProjectPO::getProjectCode).collect(Collectors.toSet()); | |||||
List<ProjectTag> pts = projectTagService.list(Wrappers.lambdaQuery(ProjectTag.class) | List<ProjectTag> pts = projectTagService.list(Wrappers.lambdaQuery(ProjectTag.class) | ||||
.in(ProjectTag::getProjectCode, projectCodes)); | .in(ProjectTag::getProjectCode, projectCodes)); | ||||
Map<String,List<ProjectTag>> tagMap = Maps.newHashMap(); | Map<String,List<ProjectTag>> tagMap = Maps.newHashMap(); | ||||
Map<Long,String> tagNameMap = Maps.newHashMap(); | Map<Long,String> tagNameMap = Maps.newHashMap(); | ||||
if(CollUtil.isNotEmpty(pts)){ | if(CollUtil.isNotEmpty(pts)){ | ||||
@@ -305,14 +305,91 @@ public class ProjectLibManage { | |||||
Map<String, List<ProjectTag>> finalTagMap = tagMap; | Map<String, List<ProjectTag>> finalTagMap = tagMap; | ||||
Map<Long,String> finalTagNameMap = tagNameMap; | Map<Long,String> finalTagNameMap = tagNameMap; | ||||
//已验收项目编号 | |||||
List<String> acceptedProjectCode = page.getRecords().stream().filter(p -> ProjectStatusEnum.ACCEPTED.getCode().equals(p.getStatus())) | |||||
.map(Project::getProjectCode).collect(Collectors.toList()); | |||||
Map<Long,List<ProjectRenewalFundDeclaration>> renewalMap = Maps.newHashMap(); | |||||
if(CollUtil.isNotEmpty(projectCodes)){ | |||||
List<ProjectRenewalFundDeclaration> renewalDeclarations = renewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||||
.in(ProjectRenewalFundDeclaration::getProjectCode, projectCodes) | |||||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | |||||
.eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE) | |||||
.orderByAsc(ProjectRenewalFundDeclaration::getProjectYear)); | |||||
renewalMap = renewalDeclarations.stream().collect(Collectors.groupingBy(ProjectRenewalFundDeclaration::getProjectId)); | |||||
} | |||||
Map<Long, List<ProjectRenewalFundDeclaration>> finalRenewalMap = renewalMap; | |||||
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | |||||
ProjectLibListItemVO item = new ProjectLibListItemVO(); | |||||
item.setId(w.getId()); | |||||
item.setProjectName(w.getProjectName()); | |||||
item.setProjectCode(w.getProjectCode()); | |||||
item.setArea(w.getArea()); | |||||
item.setAreaCode(w.getAreaCode()); | |||||
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()); | |||||
if (finalUser.getIsOrgAdmin() && | |||||
ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus()) | |||||
&& StringUtils.isNotBlank(w.getSuperOrgCode()) && StringUtils.isNotBlank(finalUser.getEmpPosUnitCode()) | |||||
&& w.getSuperOrgCode().equals(finalUser.getEmpPosUnitCode())) { | |||||
item.setCanPreDeclared(Boolean.TRUE); | |||||
} | |||||
item.setApprovedAmount(w.getApprovalAmount()); | |||||
item.setAnnualPlanAmount(w.getAnnualPlanAmount()); | |||||
item.setPrePlanProjectId(w.getPrePlanProjectId()); | |||||
setTag(item,finalTagMap,finalTagNameMap); | |||||
if(finalRenewalMap.containsKey(item.getId())){ | |||||
List<ProjectRenewalFundDeclaration> prfs = finalRenewalMap.get(item.getId()); | |||||
item.setAnnualAccumulateAmount(computeAmount(w.getAnnualPlanAmount(),prfs)); | |||||
item.setAnnualAccumulateAmountList(convertAccmulate(w,prfs)); | |||||
}else{ | |||||
item.setAnnualAccumulateAmount(w.getAnnualPlanAmount()); | |||||
item.setAnnualAccumulateAmountList(convertAccmulate(w,Collections.emptyList())); | |||||
} | |||||
return item; | |||||
}); | |||||
return PageVo.of(records, page.getTotal()); | |||||
} | |||||
public PageVo<ProjectLibListItemVO> libListWithPermission(ProjectListReq req, UserFullInfoDTO user) { | |||||
req = buildProjectLibPermission(req,user); | |||||
Page<ProjectPO> page = projectService.pagelibWithPermission(req.page(), req); | |||||
long total; | |||||
if (CollUtil.isEmpty(page.getRecords())) { | |||||
return PageVo.empty(); | |||||
} | |||||
UserFullInfoDTO finalUser = user; | |||||
Set<String> projectCodes = page.getRecords().stream() | |||||
.map(ProjectPO::getProjectCode).collect(Collectors.toSet()); | |||||
List<ProjectTag> pts = projectTagService.list(Wrappers.lambdaQuery(ProjectTag.class) | |||||
.in(ProjectTag::getProjectCode, projectCodes)); | |||||
Map<String,List<ProjectTag>> tagMap = Maps.newHashMap(); | |||||
Map<Long,String> tagNameMap = Maps.newHashMap(); | |||||
if(CollUtil.isNotEmpty(pts)){ | |||||
tagMap = pts.stream().collect(Collectors.groupingBy(ProjectTag::getProjectCode)); | |||||
Set<Long> tagIds = pts.stream().map(ProjectTag::getTagId).collect(Collectors.toSet()); | |||||
List<Tag> tags = tagService.list(Wrappers.lambdaQuery(Tag.class) | |||||
.in(Tag::getId, tagIds)); | |||||
if(CollUtil.isNotEmpty(tags)){ | |||||
tagNameMap = tags.stream().collect(Collectors.toMap(Tag::getId,Tag::getName)); | |||||
} | |||||
} | |||||
Map<String, List<ProjectTag>> finalTagMap = tagMap; | |||||
Map<Long,String> finalTagNameMap = tagNameMap; | |||||
Map<Long,List<ProjectRenewalFundDeclaration>> renewalMap = Maps.newHashMap(); | Map<Long,List<ProjectRenewalFundDeclaration>> renewalMap = Maps.newHashMap(); | ||||
if(CollUtil.isNotEmpty(acceptedProjectCode)){ | |||||
if(CollUtil.isNotEmpty(projectCodes)){ | |||||
List<ProjectRenewalFundDeclaration> renewalDeclarations = renewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | List<ProjectRenewalFundDeclaration> renewalDeclarations = renewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | ||||
.in(ProjectRenewalFundDeclaration::getProjectCode, acceptedProjectCode) | |||||
.in(ProjectRenewalFundDeclaration::getProjectCode, projectCodes) | |||||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | .eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | ||||
.eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE) | .eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE) | ||||
.orderByAsc(ProjectRenewalFundDeclaration::getProjectYear)); | .orderByAsc(ProjectRenewalFundDeclaration::getProjectYear)); | ||||
@@ -369,6 +446,23 @@ public class ProjectLibManage { | |||||
return res; | return res; | ||||
} | } | ||||
private List<AnnualAmountVO> convertAccmulate(ProjectPO project,List<ProjectRenewalFundDeclaration> prfs) { | |||||
List<AnnualAmountVO> annualAmounts = Lists.newArrayList(); | |||||
annualAmounts.add(AnnualAmountVO.builder() | |||||
.projectId(project.getId()) | |||||
.projectYear(project.getProjectYear()) | |||||
.annualAmount(project.getAnnualPlanAmount()) | |||||
.build()); | |||||
for(ProjectRenewalFundDeclaration prf : prfs){ | |||||
annualAmounts.add(AnnualAmountVO.builder() | |||||
.projectId(prf.getProjectId()) | |||||
.projectYear(prf.getProjectYear()) | |||||
.annualAmount(prf.getAnnualPaymentAmount()) | |||||
.build()); | |||||
} | |||||
return annualAmounts; | |||||
} | |||||
private List<AnnualAmountVO> convertAccmulate(Project project,List<ProjectRenewalFundDeclaration> prfs) { | private List<AnnualAmountVO> convertAccmulate(Project project,List<ProjectRenewalFundDeclaration> prfs) { | ||||
List<AnnualAmountVO> annualAmounts = Lists.newArrayList(); | List<AnnualAmountVO> annualAmounts = Lists.newArrayList(); | ||||
annualAmounts.add(AnnualAmountVO.builder() | annualAmounts.add(AnnualAmountVO.builder() | ||||
@@ -1201,6 +1295,51 @@ public class ProjectLibManage { | |||||
return user; | return user; | ||||
} | } | ||||
private ProjectListReq buildProjectLibPermission(ProjectListReq req,UserFullInfoDTO user) { | |||||
Optional<DataScopeDTO> currentUserDataScope = DataScopeUtil.getCurrentUserDataScope(user); | |||||
if (!currentUserDataScope.isPresent()) { | |||||
log.warn("没有取到权限信息 当前查询 没有权限条件"); | |||||
return req; | |||||
} | |||||
switch (currentUserDataScope.get().getRole()) { | |||||
case NORMAL_MEMBER: | |||||
//普通用户 只能看到自己单位去申报的 | |||||
req.setUserType("normal"); | |||||
req.setUserValue(user.getEmpPosUnitCode()); | |||||
break; | |||||
case COMPANY_MANAGER: | |||||
//单位管理员 看到自己单位去申报的 + 待预审的主管单位是自己单位的项目 | |||||
req.setUserType("org"); | |||||
req.setUserValue(user.getEmpPosUnitCode()); | |||||
break; | |||||
case SUPER_ADMIN: | |||||
//超级管理员 看到丽水全市的 并且也要判断他 同时是不是单位管理员 | |||||
break; | |||||
case REGION_MANAGER: | |||||
//区域管理员 看到自己区域的项目 如果是市本级 就看全市的 | |||||
if (RegionConst.RC_LS.equals(user.getRegionCode())) { | |||||
Collection<String> regionCodes = regionCacheHelper.listChildRegionCodeList(user.getRegionCode(), | |||||
RegionConst.RL_CITY); | |||||
req.setRegionCodes(regionCodes); | |||||
} else { | |||||
req.setUserRegionCode(user.getRegionCode()); | |||||
} | |||||
req.setUserType("region"); | |||||
break; | |||||
case VISITOR: | |||||
//访客可以看全市的 | |||||
break; | |||||
case DASHBOARD: | |||||
break; | |||||
default: | |||||
//没有权限的话 就让它查不到 | |||||
req.setId(0L); | |||||
break; | |||||
} | |||||
return req; | |||||
} | |||||
public void saveProjectByApplyDelay(DelayedApplyDTO dto, Project project, String instanceId) { | public void saveProjectByApplyDelay(DelayedApplyDTO dto, Project project, String instanceId) { | ||||
// 更新项目流程实例ID | // 更新项目流程实例ID | ||||
@@ -1,7 +1,11 @@ | |||||
package com.ningdatech.pmapi.projectlib.mapper; | package com.ningdatech.pmapi.projectlib.mapper; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
import com.ningdatech.pmapi.projectlib.model.po.ProjectPO; | |||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||||
import org.apache.ibatis.annotations.Param; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -13,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
*/ | */ | ||||
public interface ProjectMapper extends BaseMapper<Project> { | public interface ProjectMapper extends BaseMapper<Project> { | ||||
Page<ProjectPO> pageAllWithPermission(Page<ProjectPO> page, @Param("req") ProjectListReq req); | |||||
Page<ProjectPO> pagelibWithPermission(Page<ProjectPO> page, @Param("req") ProjectListReq req); | |||||
} | } |
@@ -1,5 +1,403 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
<mapper namespace="com.ningdatech.pmapi.projectlib.mapper.ProjectMapper"> | <mapper namespace="com.ningdatech.pmapi.projectlib.mapper.ProjectMapper"> | ||||
<select id="pageAllWithPermission" resultType="com.ningdatech.pmapi.projectlib.model.po.ProjectPO" | |||||
parameterType="com.ningdatech.pmapi.projectlib.model.req.ProjectListReq"> | |||||
SELECT | |||||
from_type, | |||||
id, | |||||
project_name, | |||||
project_year, | |||||
build_org_code, | |||||
build_org_name, | |||||
project_code, | |||||
project_type, | |||||
area, | |||||
area_code, | |||||
declare_amount, | |||||
approval_amount, | |||||
stage, | |||||
status, | |||||
annual_plan_amount, | |||||
biz_domain, | |||||
inst_code, | |||||
is_higher_super_org, | |||||
pre_plan_project_id, | |||||
create_on, | |||||
update_on | |||||
from | |||||
(SELECT | |||||
1 as from_type, | |||||
id, | |||||
project_name, | |||||
project_year, | |||||
build_org_code, | |||||
build_org_name, | |||||
project_code, | |||||
project_type, | |||||
area, | |||||
area_code, | |||||
declare_amount, | |||||
approval_amount, | |||||
stage, | |||||
status, | |||||
annual_plan_amount, | |||||
biz_domain, | |||||
inst_code, | |||||
is_higher_super_org, | |||||
pre_plan_project_id, | |||||
create_on, | |||||
update_on | |||||
FROM nd_project p | |||||
WHERE p.newest = TRUE | |||||
<if test="req.id != null"> | |||||
and p.id = #{req.id} | |||||
</if> | |||||
<if test="req.regionCode != null and req.regionCode != ''"> | |||||
and p.area_code = #{req.regionCode} | |||||
</if> | |||||
<if test="req.areaCode != null and req.areaCode != ''"> | |||||
and p.area_code = #{req.areaCode} | |||||
</if> | |||||
<if test="req.projectName != null and req.projectName != ''"> | |||||
and p.project_name like concat('%',#{req.projectName},'%') | |||||
</if> | |||||
<if test="req.projectType != null and req.projectType != ''"> | |||||
and p.project_type = #{req.projectType} | |||||
</if> | |||||
<if test="req.buildOrgName != null and req.buildOrgName != ''"> | |||||
and p.build_org_name like concat('%',#{req.buildOrgName},'%') | |||||
</if> | |||||
<if test="req.status != null"> | |||||
and p.status = #{req.status} | |||||
</if> | |||||
<if test="req.projectYear != null"> | |||||
and p.project_year = #{req.projectYear} | |||||
</if> | |||||
<if test="req.createOnMin != null"> | |||||
and p.create_on >= #{req.createOnMin} | |||||
</if> | |||||
<if test="req.createOnMax != null"> | |||||
and p.create_on <= #{req.createOnMax} | |||||
</if> | |||||
<if test="req.declareAmountMin != null"> | |||||
and p.declare_amount >= #{req.declareAmountMin} | |||||
</if> | |||||
<if test="req.declareAmountMax != null"> | |||||
and p.declare_amount <= #{req.declareAmountMax} | |||||
</if> | |||||
<if test="req.approveAmountMin != null"> | |||||
and p.approval_amount >= #{req.approveAmountMin} | |||||
</if> | |||||
<if test="req.approveAmountMax != null"> | |||||
and p.approval_amount <= #{req.approveAmountMax} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'normal'"> | |||||
and p.buil_org_code = #{req.userValue} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'org'"> | |||||
and (p.buil_org_code = #{req.userValue} or | |||||
(p.stage = 10000 and p.status = 10003 and p.super_org_code = #{req.userValue})) | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'region'"> | |||||
<if test="req.regionCodes != null"> | |||||
and p.area_code in | |||||
<foreach close=")" collection="regionCodes" item="code" open="(" separator=","> | |||||
#{code} | |||||
</foreach> | |||||
</if> | |||||
<if test="req.userRegionCode != null"> | |||||
and p.area_code = #{req.userRegionCode} | |||||
</if> | |||||
</if> | |||||
UNION ALL | |||||
( | |||||
SELECT | |||||
2 AS from_type, | |||||
b.id id, | |||||
b.base_proj_name project_name, | |||||
CAST(apply.base_proj_set_year AS INTEGER) project_year, | |||||
b.base_build_deprt_ding build_org_code, | |||||
b.base_build_deprt build_org_name, | |||||
b.base_proj_id project_code, | |||||
b.base_proj_type project_type, | |||||
b.base_area_name area, | |||||
(CASE WHEN b.base_area_code IS NOT NULL then substring(b.base_area_code,0,6) end) area_code, | |||||
apply.base_proj_decl_amount declare_amount, | |||||
approve.base_initial_review_total_money approval_amount, | |||||
NULL stage, | |||||
CAST(b.base_proj_set_prog AS INTEGER) status, | |||||
NULL annual_plan_amount, | |||||
NULL biz_domain, | |||||
NULL inst_code, | |||||
NULL is_higher_super_org, | |||||
NULL pre_plan_project_id, | |||||
b.tong_time create_on, | |||||
b.biz_time update_on | |||||
FROM gov_biz_project_baseinfo b | |||||
LEFT JOIN gov_biz_project_apply apply ON b.base_proj_id = apply.base_proj_id | |||||
LEFT JOIN gov_biz_project_approve approve ON b.base_proj_id = approve.base_proj_id | |||||
WHERE b.deleted = false | |||||
<if test="req.id != null"> | |||||
and b.id = #{req.id} | |||||
</if> | |||||
<if test="req.regionCode != null and req.regionCode != ''"> | |||||
and b.base_area_code = concat(#{req.regionCode},'000') | |||||
</if> | |||||
<if test="req.areaCode != null and req.areaCode != ''"> | |||||
and b.base_area_code = concat(#{req.regionCode},'000') | |||||
</if> | |||||
<if test="req.projectName != null and req.projectName != ''"> | |||||
and b.base_proj_name like concat('%',#{req.projectName},'%') | |||||
</if> | |||||
<if test="req.projectType != null and req.projectType != ''"> | |||||
and b.base_proj_type = #{req.projectType} | |||||
</if> | |||||
<if test="req.buildOrgName != null and req.buildOrgName != ''"> | |||||
and b.base_build_deprt like concat('%',#{req.buildOrgName},'%') | |||||
</if> | |||||
<if test="req.status != null"> | |||||
and b.base_proj_set_prog = #{req.status} | |||||
</if> | |||||
<if test="req.projectYear != null"> | |||||
and apply.base_proj_set_year = #{req.projectYear} | |||||
</if> | |||||
<if test="req.createOnMin != null"> | |||||
and b.tong_time >= #{req.createOnMin} | |||||
</if> | |||||
<if test="req.createOnMax != null"> | |||||
and b.tong_time <= #{req.createOnMax} | |||||
</if> | |||||
<if test="req.declareAmountMin != null"> | |||||
and apply.base_proj_decl_amount >= #{req.declareAmountMin} | |||||
</if> | |||||
<if test="req.declareAmountMax != null"> | |||||
and apply.base_proj_decl_amount <= #{req.declareAmountMax} | |||||
</if> | |||||
<if test="req.approveAmountMin != null"> | |||||
and approve.base_initial_review_total_money >= #{req.approveAmountMin} | |||||
</if> | |||||
<if test="req.approveAmountMax != null"> | |||||
and approve.base_initial_review_total_money <= #{req.approveAmountMax} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'normal'"> | |||||
and b.base_build_deprt_ding = #{req.userValue} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'org'"> | |||||
and b.base_build_deprt_ding = #{req.userValue} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'region'"> | |||||
<if test="req.regionCodes != null"> | |||||
and b.base_area_code in | |||||
<foreach close=")" collection="regionCodes" item="code" open="(" separator=","> | |||||
concat(#{code},'000') | |||||
</foreach> | |||||
</if> | |||||
<if test="req.userRegionCode != null"> | |||||
and b.base_area_code = concat(#{req.userRegionCode},'000') | |||||
</if> | |||||
</if> | |||||
) | |||||
) ORDER BY update_on DESC | |||||
</select> | |||||
<select id="pagelibWithPermission" resultType="com.ningdatech.pmapi.projectlib.model.po.ProjectPO" | |||||
parameterType="com.ningdatech.pmapi.projectlib.model.req.ProjectListReq"> | |||||
SELECT | |||||
from_type, | |||||
id, | |||||
project_name, | |||||
project_year, | |||||
build_org_code, | |||||
build_org_name, | |||||
project_code, | |||||
project_type, | |||||
area, | |||||
area_code, | |||||
declare_amount, | |||||
approval_amount, | |||||
stage, | |||||
status, | |||||
annual_plan_amount, | |||||
biz_domain, | |||||
inst_code, | |||||
is_higher_super_org, | |||||
pre_plan_project_id, | |||||
create_on, | |||||
update_on | |||||
from | |||||
(SELECT | |||||
1 as from_type, | |||||
id, | |||||
project_name, | |||||
project_year, | |||||
build_org_code, | |||||
build_org_name, | |||||
project_code, | |||||
project_type, | |||||
area, | |||||
area_code, | |||||
declare_amount, | |||||
approval_amount, | |||||
stage, | |||||
status, | |||||
annual_plan_amount, | |||||
biz_domain, | |||||
inst_code, | |||||
is_higher_super_org, | |||||
pre_plan_project_id, | |||||
create_on, | |||||
update_on | |||||
FROM nd_project p | |||||
WHERE p.newest = TRUE | |||||
<if test="req.id != null"> | |||||
and p.id = #{req.id} | |||||
</if> | |||||
<if test="req.regionCode != null and req.regionCode != ''"> | |||||
and p.area_code = #{req.regionCode} | |||||
</if> | |||||
<if test="req.areaCode != null and req.areaCode != ''"> | |||||
and p.area_code = #{req.areaCode} | |||||
</if> | |||||
<if test="req.projectName != null and req.projectName != ''"> | |||||
and p.project_name like concat('%',#{req.projectName},'%') | |||||
</if> | |||||
<if test="req.projectType != null and req.projectType != ''"> | |||||
and p.project_type = #{req.projectType} | |||||
</if> | |||||
<if test="req.buildOrgName != null and req.buildOrgName != ''"> | |||||
and p.build_org_name like concat('%',#{req.buildOrgName},'%') | |||||
</if> | |||||
<if test="req.status != null"> | |||||
and p.status = #{req.status} | |||||
</if> | |||||
<if test="req.projectYear != null"> | |||||
and p.project_year = #{req.projectYear} | |||||
</if> | |||||
<if test="req.createOnMin != null"> | |||||
and p.create_on >= #{req.createOnMin} | |||||
</if> | |||||
<if test="req.createOnMax != null"> | |||||
and p.create_on <= #{req.createOnMax} | |||||
</if> | |||||
<if test="req.declareAmountMin != null"> | |||||
and p.declare_amount >= #{req.declareAmountMin} | |||||
</if> | |||||
<if test="req.declareAmountMax != null"> | |||||
and p.declare_amount <= #{req.declareAmountMax} | |||||
</if> | |||||
<if test="req.approveAmountMin != null"> | |||||
and p.approval_amount >= #{req.approveAmountMin} | |||||
</if> | |||||
<if test="req.approveAmountMax != null"> | |||||
and p.approval_amount <= #{req.approveAmountMax} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'normal'"> | |||||
and p.buil_org_code = #{req.userValue} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'org'"> | |||||
and (p.buil_org_code = #{req.userValue} or | |||||
(p.stage = 10000 and p.status = 10003 and p.super_org_code = #{req.userValue})) | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'region'"> | |||||
<if test="req.regionCodes != null"> | |||||
and p.area_code in | |||||
<foreach close=")" collection="regionCodes" item="code" open="(" separator=","> | |||||
#{code} | |||||
</foreach> | |||||
</if> | |||||
<if test="req.userRegionCode != null"> | |||||
and p.area_code = #{req.userRegionCode} | |||||
</if> | |||||
</if> | |||||
UNION ALL | |||||
( | |||||
SELECT | |||||
2 AS from_type, | |||||
b.id id, | |||||
b.base_proj_name project_name, | |||||
CAST(apply.base_proj_set_year AS INTEGER) project_year, | |||||
b.base_build_deprt_ding build_org_code, | |||||
b.base_build_deprt build_org_name, | |||||
b.base_proj_id project_code, | |||||
b.base_proj_type project_type, | |||||
b.base_area_name area, | |||||
(CASE WHEN b.base_area_code IS NOT NULL then substring(b.base_area_code,0,6) end) area_code, | |||||
apply.base_proj_decl_amount declare_amount, | |||||
approve.base_initial_review_total_money approval_amount, | |||||
NULL stage, | |||||
CAST(b.base_proj_set_prog AS INTEGER) status, | |||||
NULL annual_plan_amount, | |||||
NULL biz_domain, | |||||
NULL inst_code, | |||||
NULL is_higher_super_org, | |||||
NULL pre_plan_project_id, | |||||
b.tong_time create_on, | |||||
b.biz_time update_on | |||||
FROM gov_biz_project_baseinfo b | |||||
LEFT JOIN gov_biz_project_apply apply ON b.base_proj_id = apply.base_proj_id | |||||
LEFT JOIN gov_biz_project_approve approve ON b.base_proj_id = approve.base_proj_id | |||||
WHERE b.deleted = false and b.base_proj_type in ('04','05') | |||||
<if test="req.id != null"> | |||||
and b.id = #{req.id} | |||||
</if> | |||||
<if test="req.regionCode != null and req.regionCode != ''"> | |||||
and b.base_area_code = concat(#{req.regionCode},'000') | |||||
</if> | |||||
<if test="req.areaCode != null and req.areaCode != ''"> | |||||
and b.base_area_code = concat(#{req.regionCode},'000') | |||||
</if> | |||||
<if test="req.projectName != null and req.projectName != ''"> | |||||
and b.base_proj_name like concat('%',#{req.projectName},'%') | |||||
</if> | |||||
<if test="req.projectType != null and req.projectType != ''"> | |||||
and b.base_proj_type = #{req.projectType} | |||||
</if> | |||||
<if test="req.buildOrgName != null and req.buildOrgName != ''"> | |||||
and b.base_build_deprt like concat('%',#{req.buildOrgName},'%') | |||||
</if> | |||||
<if test="req.status != null"> | |||||
and b.base_proj_set_prog = #{req.status} | |||||
</if> | |||||
<if test="req.projectYear != null"> | |||||
and apply.base_proj_set_year = #{req.projectYear} | |||||
</if> | |||||
<if test="req.createOnMin != null"> | |||||
and b.tong_time >= #{req.createOnMin} | |||||
</if> | |||||
<if test="req.createOnMax != null"> | |||||
and b.tong_time <= #{req.createOnMax} | |||||
</if> | |||||
<if test="req.declareAmountMin != null"> | |||||
and apply.base_proj_decl_amount >= #{req.declareAmountMin} | |||||
</if> | |||||
<if test="req.declareAmountMax != null"> | |||||
and apply.base_proj_decl_amount <= #{req.declareAmountMax} | |||||
</if> | |||||
<if test="req.approveAmountMin != null"> | |||||
and approve.base_initial_review_total_money >= #{req.approveAmountMin} | |||||
</if> | |||||
<if test="req.approveAmountMax != null"> | |||||
and approve.base_initial_review_total_money <= #{req.approveAmountMax} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'normal'"> | |||||
and b.base_build_deprt_ding = #{req.userValue} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'org'"> | |||||
and b.base_build_deprt_ding = #{req.userValue} | |||||
</if> | |||||
<if test="req.userType != null and req.userType == 'region'"> | |||||
<if test="req.regionCodes != null"> | |||||
and b.base_area_code in | |||||
<foreach close=")" collection="regionCodes" item="code" open="(" separator=","> | |||||
concat(#{code},'000') | |||||
</foreach> | |||||
</if> | |||||
<if test="req.userRegionCode != null"> | |||||
and b.base_area_code = concat(#{req.userRegionCode},'000') | |||||
</if> | |||||
</if> | |||||
) | |||||
) ORDER BY update_on DESC | |||||
</select> | |||||
</mapper> | </mapper> |
@@ -0,0 +1,547 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.po; | |||||
import com.baomidou.mybatisplus.annotation.*; | |||||
import com.ningdatech.pmapi.common.compare.Compare; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.math.BigDecimal; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* <p> | |||||
* 项目所有并集 | |||||
* </p> | |||||
* | |||||
* @author ZPF | |||||
* @since 2023-09-26 | |||||
*/ | |||||
@Data | |||||
@ApiModel(value = "NdProject对象", description = "") | |||||
public class ProjectPO implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
@ApiModelProperty("来源 1申报项目 2项目归集") | |||||
private String fromType; | |||||
@ApiModelProperty("主键") | |||||
private Long id; | |||||
@ApiModelProperty("所属地区编号") | |||||
@Compare("所属地区编号") | |||||
private String areaCode; | |||||
@ApiModelProperty("所属地区名称") | |||||
@Compare("所属地区名称") | |||||
private String area; | |||||
@ApiModelProperty("项目阶段") | |||||
private Integer stage; | |||||
@ApiModelProperty("项目状态") | |||||
private Integer status; | |||||
@ApiModelProperty("项目名称") | |||||
@Compare("项目名称") | |||||
private String projectName; | |||||
@ApiModelProperty("历年项目名称") | |||||
private String baseHistorProjName; | |||||
@ApiModelProperty("'历年项目编码'") | |||||
private String baseHistorProjId; | |||||
@ApiModelProperty("历年项目年度") | |||||
private String baseHistorProjYear; | |||||
@ApiModelProperty("预算来源说明") | |||||
private String baseBasisAmountOri; | |||||
@ApiModelProperty("是否临时增补 0:否 1:是") | |||||
@Compare("是否临时增补") | |||||
private Integer isTemporaryAugment; | |||||
@ApiModelProperty("项目负责人") | |||||
@Compare("项目负责人") | |||||
private String responsibleMan; | |||||
@ApiModelProperty("负责人手机号码") | |||||
@Compare("负责人手机号码") | |||||
private String responsibleManMobile; | |||||
@ApiModelProperty("项目联系人") | |||||
@Compare("项目联系人") | |||||
private String contactName; | |||||
@ApiModelProperty("项目联系人手机号码") | |||||
@Compare("项目联系人手机号码") | |||||
private String contactPhone; | |||||
@ApiModelProperty("建设单位名称") | |||||
@Compare("建设单位名称") | |||||
private String buildOrgName; | |||||
@ApiModelProperty("建设单位统一社会信用代码") | |||||
@Compare("建设单位统一社会信用代码") | |||||
private String orgCreditCode; | |||||
@ApiModelProperty("公司编码code") | |||||
@Compare("公司编码code") | |||||
private String buildOrgCode; | |||||
@ApiModelProperty("建设单位浙政钉ID") | |||||
@Compare("建设单位浙政钉ID") | |||||
private String buildOrgZheJiangGovDingId; | |||||
@ApiModelProperty("项目类型 01:首次建设 02:迭代升级 03:结转建设 04新运维 05续运维") | |||||
@Compare("项目类型") | |||||
private String projectType; | |||||
@ApiModelProperty("是否省级 1省级 2非省级") | |||||
private Integer baseProvManDeprtType; | |||||
@ApiModelProperty("是否首次新建 0:否 1:是") | |||||
@Compare("是否首次新建") | |||||
private Integer isFirst; | |||||
@ApiModelProperty("项目预算年度") | |||||
@Compare("项目预算年度") | |||||
private Integer projectYear; | |||||
@ApiModelProperty("项目建设起始时间") | |||||
@Compare("项目建设起始时间") | |||||
private String beginTime; | |||||
@ApiModelProperty("项目建设终止时间") | |||||
@Compare("项目建设终止时间") | |||||
private String endTime; | |||||
@ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") | |||||
@Compare("四大体系") | |||||
private Integer fourSystems; | |||||
@ApiModelProperty("是否数字化改革项目 0:否 1:是") | |||||
@Compare("是否数字化改革项目") | |||||
private Integer isDigitalReform; | |||||
@ApiModelProperty("综合业务领域 1: '党政机关整体智治',2: '数字政府',3: '数字经济',4: '数字社会',7: '数字文化',5: '数字法治',6: '一体化智能化公共数据平台', 8: '基层智治'") | |||||
@Compare("综合业务领域") | |||||
private Integer bizDomain; | |||||
@ApiModelProperty("建设层级 P省级 M市级 C县级 T乡镇级 V村级") | |||||
@Compare("建设层级") | |||||
private String buildLevel; | |||||
@ApiModelProperty("贯通层级 P省级 M市级 C县级 T乡镇级 V村级") | |||||
@Compare("贯通层级") | |||||
private String lowestLevel; | |||||
@ApiModelProperty("立项依据") | |||||
@Compare("立项依据") | |||||
private String buildBasis; | |||||
@ApiModelProperty("立项依据说明") | |||||
private String baseBasisEstablish; | |||||
@ApiModelProperty("发改编码") | |||||
@Compare("发改编码") | |||||
private String developCode; | |||||
@ApiModelProperty("财政编码") | |||||
@Compare("财政编码") | |||||
private String financialCode; | |||||
@ApiModelProperty("是否上云 0:否 1:是") | |||||
@Compare("是否上云") | |||||
private Integer isCloud; | |||||
@ApiModelProperty("云类型") | |||||
@Compare("云类型") | |||||
private String cloudType; | |||||
@ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") | |||||
@Compare("等保级别") | |||||
private Integer protectionLevel; | |||||
@ApiModelProperty("是否密评 0:否 1:是") | |||||
@Compare("是否密评") | |||||
private Integer isSecretComments; | |||||
@ApiModelProperty("项目简介") | |||||
@Compare("项目简介") | |||||
private String projectIntroduction; | |||||
@ApiModelProperty("资金申报情况-申报金额(万元)") | |||||
@Compare("资金申报情况-申报金额") | |||||
private BigDecimal declareAmount; | |||||
@ApiModelProperty("资金申报情况-自有金额(万元)") | |||||
@Compare("资金申报情况-自有金额") | |||||
private BigDecimal declareHaveAmount; | |||||
@ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") | |||||
@Compare("资金申报情况-政府投资-本级财政资金") | |||||
private BigDecimal declareGovOwnFinanceAmount; | |||||
@ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") | |||||
@Compare("资金申报情况-政府投资-上级补助资金") | |||||
private BigDecimal declareGovSuperiorFinanceAmount; | |||||
@ApiModelProperty("银行贷款(万元)") | |||||
@Compare("银行贷款") | |||||
private BigDecimal declareBankLendingAmount; | |||||
@ApiModelProperty("其它资金(万元)") | |||||
@Compare("其它资金") | |||||
private BigDecimal declareOtherAmount; | |||||
@ApiModelProperty("资金分配情况-软件开发(万元)") | |||||
@Compare("资金分配情况-软件开发") | |||||
private BigDecimal softwareDevelopmentAmount; | |||||
@ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") | |||||
@Compare("资金分配情况-云资源、硬件购置") | |||||
private BigDecimal cloudHardwarePurchaseAmount; | |||||
@ApiModelProperty("资金分配情况-第三方服务(万元)") | |||||
@Compare("资金分配情况-第三方服务") | |||||
private BigDecimal thirdPartyAmount; | |||||
@ApiModelProperty("年度支付计划-年度支付计划(万元)") | |||||
@Compare("年度支付计划-年度支付计划") | |||||
private BigDecimal annualPlanAmount; | |||||
@ApiModelProperty("年度支付计划-自有金额(万元)") | |||||
@Compare("年度支付计划-自有金额") | |||||
private BigDecimal annualPlanHaveAmount; | |||||
@ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") | |||||
@Compare("年度支付计划-政府投资-本级财政资金") | |||||
private BigDecimal annualPlanGovOwnFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") | |||||
@Compare("年度支付计划-政府投资-上级补助资金") | |||||
private BigDecimal annualPlanGovSuperiorFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-银行贷款(万元)") | |||||
@Compare("年度支付计划-银行贷款") | |||||
private BigDecimal annualPlanBankLendingAmount; | |||||
@ApiModelProperty("年度支付计划-其它资金(万元)") | |||||
@Compare("年度支付计划-其它资金") | |||||
private BigDecimal annualPlanOtherAmount; | |||||
@ApiModelProperty("立项批复总投资(万元)") | |||||
@Compare("立项批复总投资") | |||||
private BigDecimal approvalAmount; | |||||
@ApiModelProperty("立项批复总预算(万元)") | |||||
@Compare("立项批复总预算") | |||||
private BigDecimal approvalBudget; | |||||
@ApiModelProperty("年度计划添加时间") | |||||
@Compare("年度计划添加时间") | |||||
private LocalDateTime annualPlanAddTime; | |||||
@ApiModelProperty("核心业务-核心业务模块") | |||||
@Compare("核心业务-核心业务模块") | |||||
private String coreBusiness; | |||||
@ApiModelProperty("安全投入-投入项") | |||||
@Compare("安全投入-投入项") | |||||
private String safetyInputTitle; | |||||
@ApiModelProperty("安全投入-内容描述") | |||||
@Compare("安全投入-内容描述") | |||||
private String safetyInputDescribe; | |||||
@ApiModelProperty("安全投入-金额(万元)") | |||||
@Compare("安全投入-金额") | |||||
private BigDecimal safetyInputAmount; | |||||
@ApiModelProperty("附件-初步方案") | |||||
@Compare("附件-初步方案") | |||||
private String preliminaryPlanFile; | |||||
@ApiModelProperty("附件-佐证材料") | |||||
@Compare("附件-佐证材料") | |||||
private String supportingMaterialsFile; | |||||
@ApiModelProperty("附件-项目总投资测算明细") | |||||
@Compare("附件-项目总投资测算明细") | |||||
private String calculationTotalInvestmentFile; | |||||
@ApiModelProperty("附件-申报单位主要职责(单位三定方案)") | |||||
@Compare("附件-申报单位主要职责(单位三定方案)") | |||||
private String mainResponsibilitiesApplicantFile; | |||||
@ApiModelProperty("备注") | |||||
@Compare("备注") | |||||
private String projectRemarks; | |||||
@ApiModelProperty("是否包含应用 0:否 1:是") | |||||
@Compare("是否包含应用") | |||||
private Integer includeApplication; | |||||
@ApiModelProperty("工程形象进度-第一季度") | |||||
@Compare("工程形象进度-第一季度") | |||||
private String engineeringSpeedOne; | |||||
@ApiModelProperty("工程形象进度-第二季度") | |||||
@Compare("工程形象进度-第二季度") | |||||
private String engineeringSpeedTwo; | |||||
@ApiModelProperty("工程形象进度-第三季度") | |||||
@Compare("工程形象进度-第三季度") | |||||
private String engineeringSpeedThree; | |||||
@ApiModelProperty("工程形象进度-第四季度") | |||||
@Compare("工程形象进度-第四季度") | |||||
private String engineeringSpeedFour; | |||||
@ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") | |||||
@Compare("核心业务-是否开启核心业务模块") | |||||
private Boolean isOpenCoreBusiness; | |||||
@ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") | |||||
@Compare("安全投入-是否开启安全投入模块") | |||||
private Boolean isOpenSafetyInput; | |||||
@ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") | |||||
@Compare("工程形象进度-是否开启") | |||||
private Boolean isEngineeringSpeed; | |||||
@ApiModelProperty("附件-是否开启 false:关闭 true:开启") | |||||
@Compare("附件-是否开启") | |||||
private Boolean isAccessories; | |||||
@ApiModelProperty("备注-是否开启 false:关闭 true:开启") | |||||
@Compare("备注-是否开启") | |||||
private Boolean isRemarks; | |||||
@ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") | |||||
@Compare("年度支付计划-是否开启") | |||||
private Boolean isAnnualPlanAmount; | |||||
@ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") | |||||
@Compare("一地创新全省共享项目-是否开启") | |||||
private Boolean isInnovateWholeProvinceShare; | |||||
private LocalDateTime createOn; | |||||
private LocalDateTime updateOn; | |||||
@ApiModelProperty("流程实例编号") | |||||
private String instCode; | |||||
@ApiModelProperty("安全投入-模块信息") | |||||
@Compare("安全投入-模块信息") | |||||
private String safetyInputModular; | |||||
@ApiModelProperty("项目申报pdf") | |||||
@Compare("项目申报pdf") | |||||
private String projectPdf; | |||||
@ApiModelProperty("立项申报pdf") | |||||
@Compare("立项申报pdf") | |||||
private String declarationPdf; | |||||
@ApiModelProperty("建设周期(月)") | |||||
@Compare("建设周期(月)") | |||||
private String buildCycle; | |||||
@ApiModelProperty("原始建设周期(月)") | |||||
@Compare("建设周期(月)") | |||||
private Integer originBuildCycle; | |||||
@ApiModelProperty("建设方案文件") | |||||
@Compare("建设方案文件") | |||||
private String constructionPlanFile; | |||||
@ApiModelProperty("立项批复建设方案文件") | |||||
@Compare("立项批复建设方案文件") | |||||
private String approvedConstructionPlanFile; | |||||
@ApiModelProperty("立项批复文件") | |||||
@Compare("立项批复文件") | |||||
private String approvedFile; | |||||
@ApiModelProperty("立项批复时间") | |||||
@Compare("立项批复时间") | |||||
private LocalDateTime approvalDate; | |||||
@ApiModelProperty("批复金额") | |||||
@Compare("批复金额") | |||||
private BigDecimal approvedTotalInvestmentIncrease; | |||||
@ApiModelProperty("是否有上级条线主管部门 0没有 1有") | |||||
@Compare("是否有上级条线主管部门") | |||||
private Integer isHigherSuperOrg; | |||||
@ApiModelProperty("上级条线主管部门") | |||||
@Compare("上级条线主管部门") | |||||
private String higherSuperOrg; | |||||
@ApiModelProperty("上级主管部门Code") | |||||
@Compare("上级主管部门Code") | |||||
private String higherSuperOrgCode; | |||||
@ApiModelProperty("是否有主管部门 0没有 1有") | |||||
@Compare("是否有主管部门") | |||||
private Integer isSuperOrg; | |||||
@ApiModelProperty("主管部门名称") | |||||
@Compare("主管部门名称") | |||||
private String superOrg; | |||||
@ApiModelProperty("主管部门Code") | |||||
@Compare("主管部门Code") | |||||
private String superOrgCode; | |||||
@ApiModelProperty("主管单位统一社会信用代码") | |||||
@Compare("主管单位统一社会信用代码") | |||||
private String superOrgCreditCode; | |||||
@ApiModelProperty("前端所需验证字段") | |||||
@Compare("前端所需验证字段") | |||||
private String allApplicationsDone; | |||||
@ApiModelProperty("流程状态") | |||||
@Compare("流程状态") | |||||
private Integer processStatus; | |||||
@ApiModelProperty("动态表单 json") | |||||
@Compare("动态表单 json") | |||||
private String dynamicForm; | |||||
@ApiModelProperty("项目发起人 员工code") | |||||
@Compare("项目发起人 员工code") | |||||
private String sponsor; | |||||
@ApiModelProperty("预审发起人 员工code") | |||||
@Compare("预审发起人 员工code") | |||||
private String preStartUserId; | |||||
@ApiModelProperty("上级条线单位审核意见") | |||||
@Compare("上级条线单位审核意见") | |||||
private String higherLineSuperOrgReviewComments; | |||||
@TableField(fill = FieldFill.INSERT) | |||||
private Long createBy; | |||||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||||
private Long updateBy; | |||||
@ApiModelProperty("项目预审申请单文件ID") | |||||
@Compare("项目预审申请单文件ID") | |||||
private Long pretrialFileId; | |||||
@ApiModelProperty("项目预审申请单文件名") | |||||
@Compare("项目预审申请单文件名") | |||||
private String pretrialFileName; | |||||
@ApiModelProperty("项目建设方案申请单文件ID") | |||||
@Compare("项目建设方案申请单文件ID") | |||||
private Long constructFileId; | |||||
@ApiModelProperty("项目建设方案申请单文件名") | |||||
@Compare("项目建设方案申请单文件名") | |||||
private String constructFileName; | |||||
@ApiModelProperty("21位项目编号") | |||||
@Compare("项目编号") | |||||
private String projectCode; | |||||
@ApiModelProperty("项目申报书") | |||||
@Compare("项目申报书") | |||||
private String projectApplicationForm; | |||||
@ApiModelProperty("省级联审 审批结果") | |||||
private String sjlsResult; | |||||
@ApiModelProperty("版本号") | |||||
private Integer version; | |||||
@ApiModelProperty("是否是最新版本") | |||||
private Boolean newest; | |||||
@ApiModelProperty("成交金额") | |||||
private BigDecimal transactionAmount; | |||||
@ApiModelProperty("成交时间") | |||||
private LocalDateTime transactionTime; | |||||
@ApiModelProperty("交货时间") | |||||
private LocalDateTime deliveryTime; | |||||
@ApiModelProperty("初验材料") | |||||
@Compare("初验材料") | |||||
private String preliminaryInspectionMaterials; | |||||
@ApiModelProperty("终验材料") | |||||
@Compare("终验材料") | |||||
private String finalAcceptanceMaterials; | |||||
@ApiModelProperty("合同总金额") | |||||
@Compare("合同总金额") | |||||
private BigDecimal contractAmount; | |||||
@ApiModelProperty("计划验收时间(有可能是延期后的)") | |||||
private LocalDateTime planAcceptanceTime; | |||||
@ApiModelProperty("原本计划验收时间") | |||||
private LocalDateTime originPlanAcceptanceTime; | |||||
@ApiModelProperty("延期月份数") | |||||
private Integer applyDelayMonths; | |||||
@ApiModelProperty("申请延期佐证材料") | |||||
private String applyDelayFile; | |||||
@ApiModelProperty("申请延期理由") | |||||
private String applyDelayReason; | |||||
@ApiModelProperty("是否为建设方案申报") | |||||
private Boolean isConstruct; | |||||
@ApiModelProperty("初步方案项目ID") | |||||
private Long prePlanProjectId; | |||||
@ApiModelProperty("区县预审上级条线主管单位盖章审核意见") | |||||
private String countryHigherSealAuditOpinion; | |||||
@ApiModelProperty("区县预审上级条线主管单位盖章审核日期") | |||||
private String countryHigherSealAuditDate; | |||||
@ApiModelProperty("区县预审盖章上级条线主管单位印章编号") | |||||
private String countryHigherSealNo; | |||||
@ApiModelProperty("区县预审本级主管单位盖章审核意见") | |||||
private String countrySealAuditOpinion; | |||||
@ApiModelProperty("区县预审本级主管单位盖章审核日期") | |||||
private String countrySealAuditDate; | |||||
@ApiModelProperty("是否退回|驳回的项目版本") | |||||
private Boolean isBackReject; | |||||
@ApiModelProperty("项目内容与预期成效") | |||||
private String beseExpectedResults; | |||||
@ApiModelProperty("内容类别") | |||||
private String baseConstructionType; | |||||
@ApiModelProperty("可研报告") | |||||
private String baseResearchReportFile; | |||||
@ApiModelProperty("其他附件") | |||||
private String baseProjOtherFile; | |||||
@ApiModelProperty("是否完成日志数据归集") | |||||
private Boolean isCompletedLogCollection; | |||||
@ApiModelProperty("实际成效指标") | |||||
private String actualPerformanceIndicators; | |||||
} |
@@ -9,6 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat; | |||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.Collection; | |||||
import java.util.List; | import java.util.List; | ||||
/** | /** | ||||
@@ -27,6 +28,8 @@ import java.util.List; | |||||
@EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
public class ProjectListReq extends PagePo { | public class ProjectListReq extends PagePo { | ||||
private Long id; | |||||
@ApiModelProperty("区域编码") | @ApiModelProperty("区域编码") | ||||
private String regionCode; | private String regionCode; | ||||
@@ -106,4 +109,12 @@ public class ProjectListReq extends PagePo { | |||||
@ApiModelProperty("导出选项") | @ApiModelProperty("导出选项") | ||||
private List<ExportOptionEnum> exportOptionList; | private List<ExportOptionEnum> exportOptionList; | ||||
private String userType; | |||||
private String userValue; | |||||
private Collection<String> regionCodes; | |||||
@ApiModelProperty("区域编码") | |||||
private String userRegionCode; | |||||
} | } |
@@ -1,7 +1,10 @@ | |||||
package com.ningdatech.pmapi.projectlib.service; | package com.ningdatech.pmapi.projectlib.service; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.ningdatech.pmapi.projectlib.model.po.ProjectPO; | |||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||||
import java.util.List; | import java.util.List; | ||||
@@ -24,4 +27,9 @@ public interface IProjectService extends IService<Project> { | |||||
Project getNewConstructProject(Long projectId); | Project getNewConstructProject(Long projectId); | ||||
Project getProjectByCode(String projectCode); | Project getProjectByCode(String projectCode); | ||||
Page<ProjectPO> pageAllWithPermission(Page<ProjectPO> page, ProjectListReq req); | |||||
Page<ProjectPO> pagelibWithPermission(Page<ProjectPO> page, ProjectListReq req); | |||||
} | } |
@@ -3,13 +3,17 @@ package com.ningdatech.pmapi.projectlib.service.impl; | |||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||
import com.ningdatech.pmapi.common.constant.BizConst; | import com.ningdatech.pmapi.common.constant.BizConst; | ||||
import com.ningdatech.pmapi.performance.model.entity.ProjectCoreBusinessIndicators; | import com.ningdatech.pmapi.performance.model.entity.ProjectCoreBusinessIndicators; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.mapper.ProjectMapper; | import com.ningdatech.pmapi.projectlib.mapper.ProjectMapper; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; | import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; | ||||
import com.ningdatech.pmapi.projectlib.model.po.ProjectPO; | |||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import java.util.Collections; | import java.util.Collections; | ||||
@@ -26,8 +30,11 @@ import java.util.stream.Collectors; | |||||
* @since 2023-02-03 | * @since 2023-02-03 | ||||
*/ | */ | ||||
@Service | @Service | ||||
@RequiredArgsConstructor | |||||
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService { | public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService { | ||||
private final ProjectMapper projectMapper; | |||||
@Override | @Override | ||||
public List<Long> getAllVersionProjectId(Project project) { | public List<Long> getAllVersionProjectId(Project project) { | ||||
//查出 项目code | //查出 项目code | ||||
@@ -101,4 +108,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl | |||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
return project; | return project; | ||||
} | } | ||||
@Override | |||||
public Page<ProjectPO> pageAllWithPermission(Page<ProjectPO> page, ProjectListReq req) { | |||||
return projectMapper.pageAllWithPermission(page,req); | |||||
} | |||||
@Override | |||||
public Page<ProjectPO> pagelibWithPermission(Page<ProjectPO> page, ProjectListReq req) { | |||||
return projectMapper.pagelibWithPermission(page,req); | |||||
} | |||||
} | } |
@@ -128,4 +128,34 @@ public class ProjectCollection2Test extends AppTests { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@Test | |||||
public void test2(){ | |||||
//恢复误删 | |||||
String baseProjId = "33110000020210100116"; | |||||
baseinfoService.update(Wrappers.lambdaUpdate(GovBizProjectBaseinfo.class) | |||||
.eq(GovBizProjectBaseinfo::getBaseProjId,baseProjId) | |||||
.set(GovBizProjectBaseinfo::getDeleted,Boolean.FALSE)); | |||||
applyService.update(Wrappers.lambdaUpdate(GovBizProjectApply.class) | |||||
.eq(GovBizProjectApply::getBaseProjId,baseProjId) | |||||
.set(GovBizProjectApply::getDeleted,Boolean.FALSE)); | |||||
approveService.update(Wrappers.lambdaUpdate(GovBizProjectApprove.class) | |||||
.eq(GovBizProjectApprove::getBaseProjId,baseProjId) | |||||
.set(GovBizProjectApprove::getDeleted,Boolean.FALSE)); | |||||
cimplementService.update(Wrappers.lambdaUpdate(GovBizProjectCimplement.class) | |||||
.eq(GovBizProjectCimplement::getBaseProjId,baseProjId) | |||||
.set(GovBizProjectCimplement::getDeleted,Boolean.FALSE)); | |||||
mimplementService.update(Wrappers.lambdaUpdate(GovBizProjectMimplement.class) | |||||
.eq(GovBizProjectMimplement::getBaseProjId,baseProjId) | |||||
.set(GovBizProjectMimplement::getDeleted,Boolean.FALSE)); | |||||
procureService.update(Wrappers.lambdaUpdate(GovBizProjectProcure.class) | |||||
.eq(GovBizProjectProcure::getBaseProjId,baseProjId) | |||||
.set(GovBizProjectProcure::getDeleted,Boolean.FALSE)); | |||||
} | |||||
} | } |