|
@@ -3095,11 +3095,12 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@Transactional
|
|
@Transactional
|
|
- public void updateInspectStatus(Long archiveId,Long projectId) {
|
|
|
|
|
|
+ public void updateInspectStatus(Long archiveId,Long projectId,Long conclusionId) {
|
|
//查看当前档案是否存在有意见的数据,存在则什么都不修改,不存在则修改已抽检,合格
|
|
//查看当前档案是否存在有意见的数据,存在则什么都不修改,不存在则修改已抽检,合格
|
|
long count2 = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
long count2 = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getIsPass, 0)
|
|
.eq(ExpertInspection::getIsPass, 0)
|
|
- .eq(ExpertInspection::getArchiveId, archiveId));
|
|
|
|
|
|
+ .eq(ExpertInspection::getArchiveId, archiveId)
|
|
|
|
+ .eq(ExpertInspection::getConclusionId,conclusionId));
|
|
//修改档案抽检状态
|
|
//修改档案抽检状态
|
|
if (count2 == 0) {
|
|
if (count2 == 0) {
|
|
this.update(new LambdaUpdateWrapper<ArchivesAuto>()
|
|
this.update(new LambdaUpdateWrapper<ArchivesAuto>()
|
|
@@ -3111,7 +3112,8 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
Long userId = AuthUtil.getUserId();
|
|
Long userId = AuthUtil.getUserId();
|
|
long count = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
long count = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
- .eq(ExpertInspection::getArchiveId, archiveId));
|
|
|
|
|
|
+ .eq(ExpertInspection::getArchiveId, archiveId)
|
|
|
|
+ .eq(ExpertInspection::getConclusionId,conclusionId));
|
|
if (count == 0){
|
|
if (count == 0){
|
|
String userName = AuthUtil.getNickName();
|
|
String userName = AuthUtil.getNickName();
|
|
//获取档案信息,如果状态未未查阅则修改
|
|
//获取档案信息,如果状态未未查阅则修改
|
|
@@ -3132,6 +3134,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
inspection.setUnitType(unitType);
|
|
inspection.setUnitType(unitType);
|
|
inspection.setArchiveId(archiveId);
|
|
inspection.setArchiveId(archiveId);
|
|
inspection.setArchiveName(archive.getName());
|
|
inspection.setArchiveName(archive.getName());
|
|
|
|
+ inspection.setConclusionId(conclusionId);
|
|
inspectionService.save(inspection);
|
|
inspectionService.save(inspection);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3179,18 +3182,21 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
ExpertInspection one = inspectionService.getOne(new LambdaQueryWrapper<ExpertInspection>()
|
|
ExpertInspection one = inspectionService.getOne(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getArchiveId, archive.getId())
|
|
.eq(ExpertInspection::getArchiveId, archive.getId())
|
|
- .eq(ExpertInspection::getIsPass, 1));
|
|
|
|
|
|
+ .eq(ExpertInspection::getIsPass, 1)
|
|
|
|
+ .eq(ExpertInspection::getConclusionId, inspection.getConclusionId()));
|
|
if (one == null) {
|
|
if (one == null) {
|
|
//先删除当前专家对当前案卷当前文件的意见
|
|
//先删除当前专家对当前案卷当前文件的意见
|
|
inspectionService.remove(new LambdaQueryWrapper<ExpertInspection>()
|
|
inspectionService.remove(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getArchiveId, inspection.getArchiveId())
|
|
.eq(ExpertInspection::getArchiveId, inspection.getArchiveId())
|
|
- .eq(ExpertInspection::getFileId, inspection.getFileId()));
|
|
|
|
|
|
+ .eq(ExpertInspection::getFileId, inspection.getFileId())
|
|
|
|
+ .eq(ExpertInspection::getConclusionId, inspection.getConclusionId()));
|
|
//判断当前档案是否存在其他意见,有则直接跳过
|
|
//判断当前档案是否存在其他意见,有则直接跳过
|
|
long count3 = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
long count3 = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getArchiveId, archive.getId())
|
|
.eq(ExpertInspection::getArchiveId, archive.getId())
|
|
- .eq(ExpertInspection::getIsPass, 0));
|
|
|
|
|
|
+ .eq(ExpertInspection::getIsPass, 0)
|
|
|
|
+ .eq(ExpertInspection::getConclusionId, inspection.getConclusionId()));
|
|
if (count3 == 0) {
|
|
if (count3 == 0) {
|
|
//没有就直接保存合格
|
|
//没有就直接保存合格
|
|
inspection.setFileId(null);
|
|
inspection.setFileId(null);
|
|
@@ -3203,12 +3209,14 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
inspectionService.remove(new LambdaQueryWrapper<ExpertInspection>()
|
|
inspectionService.remove(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getArchiveId, inspection.getArchiveId())
|
|
.eq(ExpertInspection::getArchiveId, inspection.getArchiveId())
|
|
- .eq(ExpertInspection::getIsPass, 1));
|
|
|
|
|
|
+ .eq(ExpertInspection::getIsPass, 1)
|
|
|
|
+ .eq(ExpertInspection::getConclusionId, inspection.getConclusionId()));
|
|
//再去查看意见表是否存在对当前档案当前文件的意见
|
|
//再去查看意见表是否存在对当前档案当前文件的意见
|
|
ExpertInspection one = inspectionService.getOne(new LambdaQueryWrapper<ExpertInspection>()
|
|
ExpertInspection one = inspectionService.getOne(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getExpertId, userId)
|
|
.eq(ExpertInspection::getArchiveId, inspection.getArchiveId())
|
|
.eq(ExpertInspection::getArchiveId, inspection.getArchiveId())
|
|
- .eq(ExpertInspection::getFileId, inspection.getFileId()));
|
|
|
|
|
|
+ .eq(ExpertInspection::getFileId, inspection.getFileId())
|
|
|
|
+ .eq(ExpertInspection::getConclusionId, inspection.getConclusionId()));
|
|
//如果不存在数据,然后保存
|
|
//如果不存在数据,然后保存
|
|
if (one == null) {
|
|
if (one == null) {
|
|
inspectionService.save(inspection);
|
|
inspectionService.save(inspection);
|
|
@@ -3222,7 +3230,8 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
//查询当前档案的所有不合格专家意见
|
|
//查询当前档案的所有不合格专家意见
|
|
long count = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
long count = inspectionService.count(new LambdaQueryWrapper<ExpertInspection>()
|
|
.eq(ExpertInspection::getArchiveId, archive.getId())
|
|
.eq(ExpertInspection::getArchiveId, archive.getId())
|
|
- .eq(ExpertInspection::getIsPass, 0));
|
|
|
|
|
|
+ .eq(ExpertInspection::getIsPass, 0)
|
|
|
|
+ .eq(ExpertInspection::getConclusionId, inspection.getConclusionId()));
|
|
if (count > 0){
|
|
if (count > 0){
|
|
//如果有则修改档案不合格
|
|
//如果有则修改档案不合格
|
|
archive.setUpdateStatus(1);
|
|
archive.setUpdateStatus(1);
|
|
@@ -3237,17 +3246,17 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
* 在线验收-抽检记录
|
|
* 在线验收-抽检记录
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExpertInspectionVO> getUserInspectInfo(Query query, Long projectId) {
|
|
|
|
|
|
+ public IPage<ExpertInspectionVO> getUserInspectInfo(Query query, Long projectId, Long conclusionId) {
|
|
Long userId = AuthUtil.getUserId();
|
|
Long userId = AuthUtil.getUserId();
|
|
IPage<ExpertInspectionVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
IPage<ExpertInspectionVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
- return baseMapper.getUserInspectInfo(page,projectId,userId);
|
|
|
|
|
|
+ return baseMapper.getUserInspectInfo(page,projectId,userId,conclusionId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 在线验收-抽检记录-汇总
|
|
* 在线验收-抽检记录-汇总
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<ExpertInspectionVO> getUserInspectInfo2(Query query, Long projectId) {
|
|
|
|
|
|
+ public IPage<ExpertInspectionVO> getUserInspectInfo2(Query query, Long projectId,Long conclusionId) {
|
|
Long userId = AuthUtil.getUserId();
|
|
Long userId = AuthUtil.getUserId();
|
|
//判断当前用户职位是否为专家组长,专家组长查看所有
|
|
//判断当前用户职位是否为专家组长,专家组长查看所有
|
|
String userRole = AuthUtil.getUserRole();
|
|
String userRole = AuthUtil.getUserRole();
|
|
@@ -3255,7 +3264,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
userId = null;
|
|
userId = null;
|
|
}
|
|
}
|
|
IPage<ExpertInspectionVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
IPage<ExpertInspectionVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
- return baseMapper.getUserInspectInfo(page,projectId,userId);
|
|
|
|
|
|
+ return baseMapper.getUserInspectInfo(page,projectId,userId,conclusionId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -3360,12 +3369,12 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
* 在线验收-获取档案文件抽检意见
|
|
* 在线验收-获取档案文件抽检意见
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public ExpertInspectionVO getArchiveFileOpinion(Long fileId, Long projectId) {
|
|
|
|
|
|
+ public ExpertInspectionVO getArchiveFileOpinion(Long fileId, Long projectId,Long conclusionId) {
|
|
Long userId = AuthUtil.getUserId();
|
|
Long userId = AuthUtil.getUserId();
|
|
String userName = AuthUtil.getNickName();
|
|
String userName = AuthUtil.getNickName();
|
|
ExpertInspectionVO vo = new ExpertInspectionVO();
|
|
ExpertInspectionVO vo = new ExpertInspectionVO();
|
|
//获取意见表里当前文件相关意见
|
|
//获取意见表里当前文件相关意见
|
|
- List<ExpertInspection> list = inspectionService.getListByFileId(fileId,projectId);
|
|
|
|
|
|
+ List<ExpertInspection> list = inspectionService.getListByFileId(fileId,projectId,conclusionId);
|
|
if (list != null && list.size() > 0){
|
|
if (list != null && list.size() > 0){
|
|
StringBuilder str = new StringBuilder();
|
|
StringBuilder str = new StringBuilder();
|
|
for (ExpertInspection inspection : list) {
|
|
for (ExpertInspection inspection : list) {
|