Переглянути джерело

应用列表 并且提交应用的时候 有申报单位

tags/24080901
PoffyZhang 1 рік тому
джерело
коміт
633108f4c9
10 змінених файлів з 106 додано та 13 видалено
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java
  2. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/PerformanceAppraisalPlanController.java
  3. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java
  4. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java
  5. +40
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  6. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDTO.java
  7. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectApplication.java
  8. +32
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectApplicationListReq.java
  9. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectApplicationVO.java
  10. +0
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java Переглянути файл

@@ -84,7 +84,7 @@ public class ProjectFileManage {
List<Project> projectList = projectService.list(Wrappers.lambdaQuery(Project.class)
.like(StringUtils.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName())
.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<>();
@@ -177,7 +177,7 @@ public class ProjectFileManage {
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();



+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/PerformanceAppraisalPlanController.java Переглянути файл

@@ -59,8 +59,9 @@ public class PerformanceAppraisalPlanController {

@GetMapping("/group/list/{appraisalId}")
@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")


+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java Переглянути файл

@@ -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(
Wrappers.lambdaQuery(PerformanceAppraisalProjectGroup.class)
.eq(PerformanceAppraisalProjectGroup::getAppraisalId, appraisalId));
.eq(PerformanceAppraisalProjectGroup::getAppraisalId, appraisalId)
.like(StringUtils.isNotBlank(name),PerformanceAppraisalProjectGroup::getName,name));
if(CollUtil.isEmpty(groups)){
return Collections.emptyList();
}


+ 8
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java Переглянути файл

@@ -4,7 +4,9 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
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.vo.ProjectApplicationVO;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
@@ -44,6 +46,12 @@ public class ProjectLibController {
return projectLibManage.projectLibListWithPermission(req,user);
}

@GetMapping("/application/list")
@ApiOperation("应用列表")
public PageVo<ProjectApplicationVO> applicationList(ProjectApplicationListReq req) {
return projectLibManage.applicationList(req);
}

@GetMapping("/{id}")
@ApiOperation("获取项目详情")
public ProjectDetailVO detail (@PathVariable Long id){


+ 40
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Переглянути файл

@@ -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.ProjectDTO;
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.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.ProjectLibListItemVO;
import com.ningdatech.pmapi.projectlib.service.*;
@@ -218,6 +220,8 @@ public class ProjectLibManage {
BeanUtils.copyProperties(application, projectApplication);
projectApplication.setId(null);
projectApplication.setProjectId(finalProject.getId());
projectApplication.setBuildOrgCode(finalProject.getBuildOrgCode());
projectApplication.setBuildOrgName(finalProject.getBuildOrgName());
return projectApplication;
}).collect(Collectors.toList());
projectApplicationService.saveOrUpdateBatch(applications);
@@ -325,6 +329,8 @@ public class ProjectLibManage {
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class);
app.setId(null);
app.setProjectId(project.getId());
app.setBuildOrgName(project.getBuildOrgName());
app.setBuildOrgCode(project.getBuildOrgCode());
return app;
})
.collect(Collectors.toList());
@@ -373,6 +379,8 @@ public class ProjectLibManage {
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class);
app.setId(null);
app.setProjectId(project.getId());
app.setBuildOrgName(project.getBuildOrgName());
app.setBuildOrgCode(project.getBuildOrgCode());
return app;
})
.collect(Collectors.toList());
@@ -418,6 +426,8 @@ public class ProjectLibManage {
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class);
app.setId(null);
app.setProjectId(project.getId());
app.setBuildOrgName(project.getBuildOrgName());
app.setBuildOrgCode(project.getBuildOrgCode());
return app;
})
.collect(Collectors.toList());
@@ -464,6 +474,8 @@ public class ProjectLibManage {
ProjectApplication app = BeanUtil.copyProperties(a,ProjectApplication.class);
app.setId(null);
app.setProjectId(project.getId());
app.setBuildOrgName(project.getBuildOrgName());
app.setBuildOrgCode(project.getBuildOrgCode());
return app;
})
.collect(Collectors.toList());
@@ -674,4 +686,32 @@ public class ProjectLibManage {
projectInst.setUpdateOn(LocalDateTime.now());
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());
}
}

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDTO.java Переглянути файл

@@ -156,4 +156,10 @@ public class ProjectApplicationDTO implements Serializable {
@ApiModelProperty("试点文件")
private String experimentsFile;

@ApiModelProperty("申报单位名称")
private String buildOrgName;

@ApiModelProperty("申报单位编码")
private String buildOrgCode;

}

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectApplication.java Переглянути файл

@@ -166,6 +166,12 @@ public class ProjectApplication implements Serializable {
@ApiModelProperty("试点文件")
private String experimentsFile;

@ApiModelProperty("申报单位名称")
private String buildOrgName;

@ApiModelProperty("申报单位编码")
private String buildOrgCode;

private Long createBy;

private Long updateBy;


+ 32
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectApplicationListReq.java Переглянути файл

@@ -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;
}

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectApplicationVO.java Переглянути файл

@@ -162,6 +162,12 @@ public class ProjectApplicationVO implements Serializable {
@ApiModelProperty("试点文件")
private String experimentsFile;

@ApiModelProperty("申报单位名称")
private String buildOrgName;

@ApiModelProperty("申报单位编码")
private String buildOrgCode;

private Long createBy;

private Long updateBy;


+ 0
- 6
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java Переглянути файл

@@ -215,17 +215,12 @@ public class HandlerManage {
}

private void updateProjectApplyBorrowInfo(Project declaredProject, String instanceId) {

// 获取申请借阅信息
ProjectApplyBorrow projectApplyBorrow = projectApplyBorrowService.getOne(Wrappers.lambdaQuery(ProjectApplyBorrow.class)
.eq(ProjectApplyBorrow::getProjectId, declaredProject.getId())
.eq(ProjectApplyBorrow::getInstanceId, instanceId));
// 更新项目借阅信息为成功
projectApplyBorrow.setProjectId(declaredProject.getId());
projectApplyBorrow.setInstanceId(instanceId);
projectApplyBorrow.setIsSuccess(Boolean.TRUE);
projectApplyBorrow.setCreateOn(LocalDateTime.now());
projectApplyBorrow.setCreateBy(LoginUserUtil.getUserId());
projectApplyBorrow.setUpdateOn(LocalDateTime.now());
projectApplyBorrow.setUpdateBy(LoginUserUtil.getUserId());
projectApplyBorrowService.updateById(projectApplyBorrow);
@@ -243,7 +238,6 @@ public class HandlerManage {
String constructCycle = String.valueOf(Integer.parseInt(buildCycle) + delayApply.getDelayTime());
declaredProject.setBuildCycle(constructCycle);
Long constructMonth = Long.valueOf(constructCycle);
declaredProject.setBuildCycle(String.valueOf(constructMonth));
String acceptTime = NdDateUtils.format(approvalDate.plusMonths(constructMonth), DatePattern.NORM_DATETIME_MINUTE_PATTERN);
LocalDateTime time = LocalDateTime.parse(acceptTime, DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MINUTE_PATTERN));
declaredProject.setPlanAcceptanceTime(time);


Завантаження…
Відмінити
Зберегти