|
@@ -2640,10 +2640,10 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
}else {
|
|
}else {
|
|
unitAllArchive = baseMapper.getUnitAllArchive2(FirstNode.getId(),4,isApply);
|
|
unitAllArchive = baseMapper.getUnitAllArchive2(FirstNode.getId(),4,isApply);
|
|
}
|
|
}
|
|
|
|
+ vo.setUnitInfo(unitName+"("+unitAllArchive.size()+"卷)");
|
|
if (unitAllArchive.size() == 0){
|
|
if (unitAllArchive.size() == 0){
|
|
- return null;
|
|
|
|
|
|
+ return vo;
|
|
}
|
|
}
|
|
- vo.setUnitInfo(unitName+"("+unitAllArchive.size()+"卷)");
|
|
|
|
List<ArchiveInspectPreviewVO.NodeList> nodeLists = new ArrayList<>();
|
|
List<ArchiveInspectPreviewVO.NodeList> nodeLists = new ArrayList<>();
|
|
//档案按照二级节点分组
|
|
//档案按照二级节点分组
|
|
Map<Long, List<ArchivesAutoVO2>> archiveMap = unitAllArchive.stream().collect(Collectors.groupingBy(ArchivesAutoVO2::getMasterNode));
|
|
Map<Long, List<ArchivesAutoVO2>> archiveMap = unitAllArchive.stream().collect(Collectors.groupingBy(ArchivesAutoVO2::getMasterNode));
|
|
@@ -2667,6 +2667,8 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
return vo;
|
|
return vo;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void batchDownloadFileToZip(String ids, HttpServletResponse response) {
|
|
public void batchDownloadFileToZip(String ids, HttpServletResponse response) {
|
|
List<Long> longs = Func.toLongList(ids);
|
|
List<Long> longs = Func.toLongList(ids);
|
|
@@ -2951,9 +2953,11 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
public IPage<ArchiveInspectVO> getNodeArchives(Query query,Long nodeId,Long projectId,Integer searchType,String searchValue,Integer type) {
|
|
public IPage<ArchiveInspectVO> getNodeArchives(Query query,Long nodeId,Long projectId,Integer searchType,String searchValue,Integer type) {
|
|
IPage<ArchiveInspectVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
IPage<ArchiveInspectVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
if (type == 1){
|
|
if (type == 1){
|
|
- return baseMapper.getNodeArchives(page,nodeId,projectId,searchType,searchValue,null);
|
|
|
|
- }else {
|
|
|
|
|
|
+ //查询所有的,树不加id,档案状态加
|
|
return baseMapper.getNodeArchives(page,nodeId,projectId,searchType,searchValue,AuthUtil.getUserId());
|
|
return baseMapper.getNodeArchives(page,nodeId,projectId,searchType,searchValue,AuthUtil.getUserId());
|
|
|
|
+ }else {
|
|
|
|
+ //查询专家的,树加id,档案状态加
|
|
|
|
+ return baseMapper.getNodeArchives2(page,nodeId,projectId,searchType,searchValue,AuthUtil.getUserId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2972,6 +2976,9 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
map.put("total",t1+"");
|
|
map.put("total",t1+"");
|
|
//获取用户归属档案所有已阅总数
|
|
//获取用户归属档案所有已阅总数
|
|
Integer t2 = baseMapper.getUserReviewedTotal(projectId, userId);
|
|
Integer t2 = baseMapper.getUserReviewedTotal(projectId, userId);
|
|
|
|
+ if (t2 == null){
|
|
|
|
+ t2 = 0;
|
|
|
|
+ }
|
|
if (t2 > t1){
|
|
if (t2 > t1){
|
|
throw new ServiceException("数据错误,已阅比总数多");
|
|
throw new ServiceException("数据错误,已阅比总数多");
|
|
}
|
|
}
|
|
@@ -3055,42 +3062,45 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
ContractInfo contract = contractClient.getContractById(archive.getContractId());
|
|
ContractInfo contract = contractClient.getContractById(archive.getContractId());
|
|
unitType = contract.getContractType();
|
|
unitType = contract.getContractType();
|
|
}
|
|
}
|
|
- //判断是否存在意见
|
|
|
|
|
|
+ //判断是否合格
|
|
Integer isPass = 1;
|
|
Integer isPass = 1;
|
|
if (StringUtils.isNotBlank(inspection.getOpinion())){
|
|
if (StringUtils.isNotBlank(inspection.getOpinion())){
|
|
|
|
+ //专家有填写意见,不合格
|
|
isPass = 0;
|
|
isPass = 0;
|
|
}
|
|
}
|
|
|
|
+ inspection.setProjectId(archive.getProjectId());
|
|
inspection.setArchiveName(archive.getName());
|
|
inspection.setArchiveName(archive.getName());
|
|
inspection.setExpertId(userId);
|
|
inspection.setExpertId(userId);
|
|
inspection.setExpertName(userName);
|
|
inspection.setExpertName(userName);
|
|
inspection.setIsPass(isPass);
|
|
inspection.setIsPass(isPass);
|
|
inspection.setUnitType(unitType);
|
|
inspection.setUnitType(unitType);
|
|
- //如果专家对案卷没有意见
|
|
|
|
|
|
+ //合格,专家对案卷没有意见
|
|
if (isPass == 1){
|
|
if (isPass == 1){
|
|
- //判断是否有合格意见,有则直接跳过
|
|
|
|
- long count3 = inspectionService.count(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));
|
|
- if (count3 == 0){
|
|
|
|
|
|
+ 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()));
|
|
- //再查看当前专家是否对当前档案有意见
|
|
|
|
- long count2 = 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));
|
|
- //没有就直接保存合格
|
|
|
|
- if (count2 == 0) {
|
|
|
|
|
|
+ if (count3 == 0) {
|
|
|
|
+ //没有就直接保存合格
|
|
inspection.setFileId(null);
|
|
inspection.setFileId(null);
|
|
|
|
+ inspection.setId(null);
|
|
inspectionService.save(inspection);
|
|
inspectionService.save(inspection);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
- //如果专家对案卷有意见,先删除当前专家在意见表对当前档案合格的意见
|
|
|
|
|
|
+ //专家对案卷有意见,先删除当前专家在意见表对当前档案合格的意见
|
|
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())
|
|
@@ -3129,10 +3139,20 @@ 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 userId = AuthUtil.getUserId();
|
|
|
|
+ IPage<ExpertInspectionVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
|
|
+ return baseMapper.getUserInspectInfo(page,projectId,userId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 在线验收-抽检记录-汇总
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public IPage<ExpertInspectionVO> getUserInspectInfo2(Query query, Long projectId) {
|
|
Long userId = AuthUtil.getUserId();
|
|
Long userId = AuthUtil.getUserId();
|
|
//判断当前用户职位是否为专家组长,专家组长查看所有
|
|
//判断当前用户职位是否为专家组长,专家组长查看所有
|
|
String userRole = AuthUtil.getUserRole();
|
|
String userRole = AuthUtil.getUserRole();
|
|
- if ("1656191696348082177".equals(userRole)){
|
|
|
|
|
|
+ if ("专家组长".equals(userRole)){
|
|
userId = null;
|
|
userId = null;
|
|
}
|
|
}
|
|
IPage<ExpertInspectionVO> page = new Page<>(query.getCurrent(),query.getSize());
|
|
IPage<ExpertInspectionVO> page = new Page<>(query.getCurrent(),query.getSize());
|