@@ -84,7 +84,7 @@ public class ProjectFileManage { | |||||
List<Project> projectList = projectService.list(Wrappers.lambdaQuery(Project.class) | List<Project> projectList = projectService.list(Wrappers.lambdaQuery(Project.class) | ||||
.like(StringUtils.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) | .like(StringUtils.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) | ||||
.like(StringUtils.isNotBlank(param.getBuildOrgName()), Project::getBuildOrgName, param.getBuildOrgName()) | .like(StringUtils.isNotBlank(param.getBuildOrgName()), Project::getBuildOrgName, param.getBuildOrgName()) | ||||
.eq(Project::getStatus, ProjectStatusEnum.ARCHIVED.getCode()).orderByDesc(Project::getUpdateOn)); | |||||
.eq(Project::getStatus, ProjectStatusEnum.ACCEPTED.getCode()).orderByDesc(Project::getUpdateOn)); | |||||
// 从申请借阅信息表中查出本单位及下属单位审批通过的项目添加到列表中 | // 从申请借阅信息表中查出本单位及下属单位审批通过的项目添加到列表中 | ||||
HashSet<Long> borrowProjectIdSet = new HashSet<>(); | HashSet<Long> borrowProjectIdSet = new HashSet<>(); | ||||
@@ -177,7 +177,7 @@ public class ProjectFileManage { | |||||
VUtils.isTrue(Objects.isNull(project)).throwMessage("提交失败 此项目不存在!"); | VUtils.isTrue(Objects.isNull(project)).throwMessage("提交失败 此项目不存在!"); | ||||
// 首先要判断 项目当前状态 是不是 已归档 | // 首先要判断 项目当前状态 是不是 已归档 | ||||
VUtils.isTrue(!ProjectStatusEnum.ARCHIVED.getCode().equals(project.getStatus())).throwMessage("提交失败 该项目不是 已归档"); | |||||
VUtils.isTrue(!ProjectStatusEnum.ACCEPTED.getCode().equals(project.getStatus())).throwMessage("提交失败 该项目不是 已归档"); | |||||
String regionCode = user.getRegionCode(); | String regionCode = user.getRegionCode(); | ||||
@@ -59,8 +59,9 @@ public class PerformanceAppraisalPlanController { | |||||
@GetMapping("/group/list/{appraisalId}") | @GetMapping("/group/list/{appraisalId}") | ||||
@ApiOperation("绩效评价分组列表") | @ApiOperation("绩效评价分组列表") | ||||
public List<PerformanceAppraisalProjectGroupVO> groupList(@PathVariable Long appraisalId) { | |||||
return performanceAppraisalPlanManage.groupList(appraisalId); | |||||
public List<PerformanceAppraisalProjectGroupVO> groupList(@PathVariable Long appraisalId, | |||||
@RequestParam(required = false) String name) { | |||||
return performanceAppraisalPlanManage.groupList(appraisalId,name); | |||||
} | } | ||||
@PostMapping("/group/save") | @PostMapping("/group/save") | ||||
@@ -368,11 +368,11 @@ public class PerformanceAppraisalPlanManage { | |||||
} | } | ||||
} | } | ||||
public List<PerformanceAppraisalProjectGroupVO> groupList(Long appraisalId) { | |||||
public List<PerformanceAppraisalProjectGroupVO> groupList(Long appraisalId,String name) { | |||||
List<PerformanceAppraisalProjectGroup> groups = groupService.list( | List<PerformanceAppraisalProjectGroup> groups = groupService.list( | ||||
Wrappers.lambdaQuery(PerformanceAppraisalProjectGroup.class) | Wrappers.lambdaQuery(PerformanceAppraisalProjectGroup.class) | ||||
.eq(PerformanceAppraisalProjectGroup::getAppraisalId, appraisalId)); | |||||
.eq(PerformanceAppraisalProjectGroup::getAppraisalId, appraisalId) | |||||
.like(StringUtils.isNotBlank(name),PerformanceAppraisalProjectGroup::getName,name)); | |||||
if(CollUtil.isEmpty(groups)){ | if(CollUtil.isEmpty(groups)){ | ||||
return Collections.emptyList(); | return Collections.emptyList(); | ||||
} | } | ||||
@@ -4,7 +4,9 @@ import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.log.annotation.WebLog; | import com.ningdatech.log.annotation.WebLog; | ||||
import com.ningdatech.pmapi.common.helper.UserInfoHelper; | import com.ningdatech.pmapi.common.helper.UserInfoHelper; | ||||
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | ||||
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.ProjectApplicationVO; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; | import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; | ||||
@@ -44,6 +46,12 @@ public class ProjectLibController { | |||||
return projectLibManage.projectLibListWithPermission(req,user); | return projectLibManage.projectLibListWithPermission(req,user); | ||||
} | } | ||||
@GetMapping("/application/list") | |||||
@ApiOperation("应用列表") | |||||
public PageVo<ProjectApplicationVO> applicationList(ProjectApplicationListReq req) { | |||||
return projectLibManage.applicationList(req); | |||||
} | |||||
@GetMapping("/{id}") | @GetMapping("/{id}") | ||||
@ApiOperation("获取项目详情") | @ApiOperation("获取项目详情") | ||||
public ProjectDetailVO detail (@PathVariable Long id){ | public ProjectDetailVO detail (@PathVariable Long id){ | ||||
@@ -34,8 +34,10 @@ import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; | |||||
import com.ningdatech.pmapi.projectlib.model.dto.ProjectApplicationDTO; | import com.ningdatech.pmapi.projectlib.model.dto.ProjectApplicationDTO; | ||||
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.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; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectApplicationVO; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import com.ningdatech.pmapi.projectlib.service.*; | import com.ningdatech.pmapi.projectlib.service.*; | ||||
@@ -218,6 +220,8 @@ public class ProjectLibManage { | |||||
BeanUtils.copyProperties(application, projectApplication); | BeanUtils.copyProperties(application, projectApplication); | ||||
projectApplication.setId(null); | projectApplication.setId(null); | ||||
projectApplication.setProjectId(finalProject.getId()); | projectApplication.setProjectId(finalProject.getId()); | ||||
projectApplication.setBuildOrgCode(finalProject.getBuildOrgCode()); | |||||
projectApplication.setBuildOrgName(finalProject.getBuildOrgName()); | |||||
return projectApplication; | return projectApplication; | ||||
}).collect(Collectors.toList()); | }).collect(Collectors.toList()); | ||||
projectApplicationService.saveOrUpdateBatch(applications); | projectApplicationService.saveOrUpdateBatch(applications); | ||||
@@ -325,6 +329,8 @@ public class ProjectLibManage { | |||||
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ||||
app.setId(null); | app.setId(null); | ||||
app.setProjectId(project.getId()); | app.setProjectId(project.getId()); | ||||
app.setBuildOrgName(project.getBuildOrgName()); | |||||
app.setBuildOrgCode(project.getBuildOrgCode()); | |||||
return app; | return app; | ||||
}) | }) | ||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
@@ -373,6 +379,8 @@ public class ProjectLibManage { | |||||
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ||||
app.setId(null); | app.setId(null); | ||||
app.setProjectId(project.getId()); | app.setProjectId(project.getId()); | ||||
app.setBuildOrgName(project.getBuildOrgName()); | |||||
app.setBuildOrgCode(project.getBuildOrgCode()); | |||||
return app; | return app; | ||||
}) | }) | ||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
@@ -418,6 +426,8 @@ public class ProjectLibManage { | |||||
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ||||
app.setId(null); | app.setId(null); | ||||
app.setProjectId(project.getId()); | app.setProjectId(project.getId()); | ||||
app.setBuildOrgName(project.getBuildOrgName()); | |||||
app.setBuildOrgCode(project.getBuildOrgCode()); | |||||
return app; | return app; | ||||
}) | }) | ||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
@@ -464,6 +474,8 @@ public class ProjectLibManage { | |||||
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class); | ||||
app.setId(null); | app.setId(null); | ||||
app.setProjectId(project.getId()); | app.setProjectId(project.getId()); | ||||
app.setBuildOrgName(project.getBuildOrgName()); | |||||
app.setBuildOrgCode(project.getBuildOrgCode()); | |||||
return app; | return app; | ||||
}) | }) | ||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
@@ -674,4 +686,32 @@ public class ProjectLibManage { | |||||
projectInst.setUpdateOn(LocalDateTime.now()); | projectInst.setUpdateOn(LocalDateTime.now()); | ||||
projectInstService.save(projectInst); | projectInstService.save(projectInst); | ||||
} | } | ||||
/** | |||||
* 应用列表 | |||||
* @param req | |||||
* @return | |||||
*/ | |||||
public PageVo<ProjectApplicationVO> applicationList(ProjectApplicationListReq req) { | |||||
Page<ProjectApplication> page = req.page(); | |||||
LambdaQueryWrapper<ProjectApplication> wrapper = Wrappers.lambdaQuery(ProjectApplication.class) | |||||
.eq(StringUtils.isNotBlank(req.getBuildOrgName()),ProjectApplication::getBuildOrgName,req.getBuildOrgName()); | |||||
if(StringUtils.isNotBlank(req.getApplicationName())){ | |||||
wrapper.and(q1 -> q1.like(ProjectApplication::getApplicationName,req.getApplicationName()) | |||||
.or(q2 -> q2.like(ProjectApplication::getAccountAppName,req.getApplicationName()))); | |||||
} | |||||
wrapper.orderByDesc(ProjectApplication::getUpdateOn); | |||||
projectApplicationService.page(page,wrapper); | |||||
if(0L == page.getTotal()){ | |||||
return PageVo.empty(); | |||||
} | |||||
List<ProjectApplicationVO> res = page.getRecords().stream() | |||||
.map(app -> BeanUtil.copyProperties(app,ProjectApplicationVO.class)) | |||||
.collect(Collectors.toList()); | |||||
return PageVo.of(res,page.getTotal()); | |||||
} | |||||
} | } |
@@ -156,4 +156,10 @@ public class ProjectApplicationDTO implements Serializable { | |||||
@ApiModelProperty("试点文件") | @ApiModelProperty("试点文件") | ||||
private String experimentsFile; | private String experimentsFile; | ||||
@ApiModelProperty("申报单位名称") | |||||
private String buildOrgName; | |||||
@ApiModelProperty("申报单位编码") | |||||
private String buildOrgCode; | |||||
} | } |
@@ -166,6 +166,12 @@ public class ProjectApplication implements Serializable { | |||||
@ApiModelProperty("试点文件") | @ApiModelProperty("试点文件") | ||||
private String experimentsFile; | private String experimentsFile; | ||||
@ApiModelProperty("申报单位名称") | |||||
private String buildOrgName; | |||||
@ApiModelProperty("申报单位编码") | |||||
private String buildOrgCode; | |||||
private Long createBy; | private Long createBy; | ||||
private Long updateBy; | private Long updateBy; | ||||
@@ -0,0 +1,32 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.req; | |||||
import com.ningdatech.basic.model.PagePo; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.*; | |||||
/** | |||||
* <p> | |||||
* ProjectLibListReq | |||||
* </p> | |||||
* | |||||
* @author ZPF | |||||
* @since 14:35 2023/2/1 | |||||
*/ | |||||
@Data | |||||
@Builder | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@ApiModel("应用列表查询") | |||||
@EqualsAndHashCode(callSuper = true) | |||||
public class ProjectApplicationListReq extends PagePo { | |||||
@ApiModelProperty("申报单位code") | |||||
private String buildOrgCode; | |||||
@ApiModelProperty("申报单位名") | |||||
private String buildOrgName; | |||||
@ApiModelProperty("应用名") | |||||
private String applicationName; | |||||
} |
@@ -162,6 +162,12 @@ public class ProjectApplicationVO implements Serializable { | |||||
@ApiModelProperty("试点文件") | @ApiModelProperty("试点文件") | ||||
private String experimentsFile; | private String experimentsFile; | ||||
@ApiModelProperty("申报单位名称") | |||||
private String buildOrgName; | |||||
@ApiModelProperty("申报单位编码") | |||||
private String buildOrgCode; | |||||
private Long createBy; | private Long createBy; | ||||
private Long updateBy; | private Long updateBy; | ||||
@@ -215,17 +215,12 @@ public class HandlerManage { | |||||
} | } | ||||
private void updateProjectApplyBorrowInfo(Project declaredProject, String instanceId) { | private void updateProjectApplyBorrowInfo(Project declaredProject, String instanceId) { | ||||
// 获取申请借阅信息 | // 获取申请借阅信息 | ||||
ProjectApplyBorrow projectApplyBorrow = projectApplyBorrowService.getOne(Wrappers.lambdaQuery(ProjectApplyBorrow.class) | ProjectApplyBorrow projectApplyBorrow = projectApplyBorrowService.getOne(Wrappers.lambdaQuery(ProjectApplyBorrow.class) | ||||
.eq(ProjectApplyBorrow::getProjectId, declaredProject.getId()) | .eq(ProjectApplyBorrow::getProjectId, declaredProject.getId()) | ||||
.eq(ProjectApplyBorrow::getInstanceId, instanceId)); | .eq(ProjectApplyBorrow::getInstanceId, instanceId)); | ||||
// 更新项目借阅信息为成功 | // 更新项目借阅信息为成功 | ||||
projectApplyBorrow.setProjectId(declaredProject.getId()); | |||||
projectApplyBorrow.setInstanceId(instanceId); | |||||
projectApplyBorrow.setIsSuccess(Boolean.TRUE); | projectApplyBorrow.setIsSuccess(Boolean.TRUE); | ||||
projectApplyBorrow.setCreateOn(LocalDateTime.now()); | |||||
projectApplyBorrow.setCreateBy(LoginUserUtil.getUserId()); | |||||
projectApplyBorrow.setUpdateOn(LocalDateTime.now()); | projectApplyBorrow.setUpdateOn(LocalDateTime.now()); | ||||
projectApplyBorrow.setUpdateBy(LoginUserUtil.getUserId()); | projectApplyBorrow.setUpdateBy(LoginUserUtil.getUserId()); | ||||
projectApplyBorrowService.updateById(projectApplyBorrow); | projectApplyBorrowService.updateById(projectApplyBorrow); | ||||
@@ -243,7 +238,6 @@ public class HandlerManage { | |||||
String constructCycle = String.valueOf(Integer.parseInt(buildCycle) + delayApply.getDelayTime()); | String constructCycle = String.valueOf(Integer.parseInt(buildCycle) + delayApply.getDelayTime()); | ||||
declaredProject.setBuildCycle(constructCycle); | declaredProject.setBuildCycle(constructCycle); | ||||
Long constructMonth = Long.valueOf(constructCycle); | Long constructMonth = Long.valueOf(constructCycle); | ||||
declaredProject.setBuildCycle(String.valueOf(constructMonth)); | |||||
String acceptTime = NdDateUtils.format(approvalDate.plusMonths(constructMonth), DatePattern.NORM_DATETIME_MINUTE_PATTERN); | String acceptTime = NdDateUtils.format(approvalDate.plusMonths(constructMonth), DatePattern.NORM_DATETIME_MINUTE_PATTERN); | ||||
LocalDateTime time = LocalDateTime.parse(acceptTime, DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MINUTE_PATTERN)); | LocalDateTime time = LocalDateTime.parse(acceptTime, DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MINUTE_PATTERN)); | ||||
declaredProject.setPlanAcceptanceTime(time); | declaredProject.setPlanAcceptanceTime(time); | ||||