@@ -332,6 +332,7 @@ public class DeclaredProjectManage { | |||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
//当非预审申报的时候 是自己单位 当是预审申报的时候 要主管单位 | //当非预审申报的时候 是自己单位 当是预审申报的时候 要主管单位 | ||||
preQuery(query,user); | preQuery(query,user); | ||||
query.eq(Project::getNewest,Boolean.TRUE); | |||||
Page<Project> page = projectService.page(req.page(), query); | Page<Project> page = projectService.page(req.page(), query); | ||||
long total; | long total; | ||||
if ((total = page.getTotal()) == 0) { | if ((total = page.getTotal()) == 0) { | ||||
@@ -376,6 +377,7 @@ public class DeclaredProjectManage { | |||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(param); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(param); | ||||
//当非预审申报的时候 是自己单位 当是预审申报的时候 要主管单位 | //当非预审申报的时候 是自己单位 当是预审申报的时候 要主管单位 | ||||
preQuery(query,user); | preQuery(query,user); | ||||
query.eq(Project::getNewest,Boolean.TRUE); | |||||
List<Project> records = projectService.list(query); | List<Project> records = projectService.list(query); | ||||
AtomicInteger serialNumber = new AtomicInteger(0); | AtomicInteger serialNumber = new AtomicInteger(0); | ||||
@@ -250,6 +250,7 @@ public class PrequalificationDeclaredProjectManage { | |||||
ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode())); | ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS.getCode())); | ||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
buildPermission(query,user); | buildPermission(query,user); | ||||
query.eq(Project::getNewest,Boolean.TRUE); | |||||
Page<Project> page = projectService.page(req.page(), query); | Page<Project> page = projectService.page(req.page(), query); | ||||
long total; | long total; | ||||
if ((total = page.getTotal()) == 0) { | if ((total = page.getTotal()) == 0) { | ||||
@@ -311,6 +312,7 @@ public class PrequalificationDeclaredProjectManage { | |||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
//角色权限 | //角色权限 | ||||
buildPermission(query,user); | buildPermission(query,user); | ||||
query.eq(Project::getNewest,Boolean.TRUE); | |||||
List<Project> records = projectService.list(query); | List<Project> records = projectService.list(query); | ||||
List<PretrialDeclaredExportDTO> collect = records.stream().map(r -> { | List<PretrialDeclaredExportDTO> collect = records.stream().map(r -> { | ||||
@@ -79,6 +79,7 @@ public class ProjectLibManage { | |||||
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | ||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
query.eq(Project::getNewest,Boolean.TRUE); | |||||
Page<Project> page = projectService.page(req.page(), query); | Page<Project> page = projectService.page(req.page(), query); | ||||
long total; | long total; | ||||
if ((total = page.getTotal()) == 0) { | if ((total = page.getTotal()) == 0) { | ||||
@@ -297,12 +298,12 @@ public class ProjectLibManage { | |||||
if(Objects.nonNull(statusCode)){ | if(Objects.nonNull(statusCode)){ | ||||
project.setStatus(statusCode); | project.setStatus(statusCode); | ||||
} | } | ||||
projectService.save(project); | |||||
projectService.update(Wrappers.lambdaUpdate(Project.class) | |||||
.set(Project::getNewest,Boolean.FALSE) | |||||
.ne(Project::getId,project.getId()) | |||||
.eq(Project::getProjectCode,project.getProjectCode())); | |||||
if(projectService.save(project)){ | |||||
projectService.update(Wrappers.lambdaUpdate(Project.class) | |||||
.set(Project::getNewest,Boolean.FALSE) | |||||
.ne(Project::getId,project.getId()) | |||||
.eq(Project::getProjectCode,project.getProjectCode())); | |||||
} | |||||
return project; | return project; | ||||
} | } | ||||
@@ -75,6 +75,11 @@ public class CheckProvincialReviewResultTask { | |||||
log.info("此项目 【{}】 还未审核",projectRes.getProjectId()); | log.info("此项目 【{}】 还未审核",projectRes.getProjectId()); | ||||
} else if(ProjectProvincialAuditStatusEnum.AUDITING.getCode().equals(projectRes.getProjectStatus())){ | } else if(ProjectProvincialAuditStatusEnum.AUDITING.getCode().equals(projectRes.getProjectStatus())){ | ||||
log.info("此项目 【{}】 还在审核中",projectRes.getProjectId()); | log.info("此项目 【{}】 还在审核中",projectRes.getProjectId()); | ||||
project.setUpdateOn(LocalDateTime.now()); | |||||
//保存审核结果 | |||||
project.setSjlsResult(CollUtil.isNotEmpty(projectRes.getProcessComment()) | |||||
? JSON.toJSONString(projectRes.getProcessComment()) : StringUtils.EMPTY); | |||||
projectService.updateById(project); | |||||
}else if(ProjectProvincialAuditStatusEnum.SUCCESS.getCode().equals(projectRes.getProjectStatus())){ | }else if(ProjectProvincialAuditStatusEnum.SUCCESS.getCode().equals(projectRes.getProjectStatus())){ | ||||
log.info("此项目 【{}】 审核通过",projectRes.getProjectId()); | log.info("此项目 【{}】 审核通过",projectRes.getProjectId()); | ||||
stateMachineUtils.pass(project); | stateMachineUtils.pass(project); | ||||