文件记录-流程查询-添加评审,分发--记录列表
This commit is contained in:
@@ -109,6 +109,6 @@ public class RecordRecordPageReqVO extends PageParam {
|
|||||||
@Schema(description = "是否查询历史数据")
|
@Schema(description = "是否查询历史数据")
|
||||||
private Integer isQueryHistory; // 1-查询,0-不查询
|
private Integer isQueryHistory; // 1-查询,0-不查询
|
||||||
|
|
||||||
private String ew;
|
private String appraisalFlag;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -176,6 +176,7 @@ public class RecordRecordRespVO {
|
|||||||
private String flowInstanceId;
|
private String flowInstanceId;
|
||||||
|
|
||||||
@Schema(description = "文件提交业务状态")
|
@Schema(description = "文件提交业务状态")
|
||||||
|
@Dict(dicCode = "flow_status")
|
||||||
private String applyBusinessStatus;
|
private String applyBusinessStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -91,6 +91,14 @@ public interface RecordRecordMapper extends BaseMapperX<RecordRecordDO> {
|
|||||||
@Param("userId") Long userId,
|
@Param("userId") Long userId,
|
||||||
@Param("userDepts") List<Long> userDepts);
|
@Param("userDepts") List<Long> userDepts);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过 idPath 模糊查询 关联的文件记录
|
||||||
|
* @param pathList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RecordRecordDO> selectRecordByIdPathLike(@Param("reqVO") RecordRecordPageReqVO reqVO,
|
||||||
|
@Param("pathList") List<String> pathList);
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// List<RecordRecordDO> selectViewApplyRecordList(@Param("pageReqVO") RecordRecordPageReqVO pageReqVO);
|
// List<RecordRecordDO> selectViewApplyRecordList(@Param("pageReqVO") RecordRecordPageReqVO pageReqVO);
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -73,4 +73,5 @@ public interface RecordCategoryService {
|
|||||||
|
|
||||||
List<RecordCategoryRespVO> getReviewRecordList();
|
List<RecordCategoryRespVO> getReviewRecordList();
|
||||||
|
|
||||||
|
List<RecordCategoryDO> selectCategoryAppraisalList(String appraisalFlag);
|
||||||
}
|
}
|
||||||
@@ -186,6 +186,13 @@ public class RecordCategoryServiceImpl implements RecordCategoryService {
|
|||||||
return BeanUtils.toBean(recordCategories, RecordCategoryRespVO.class);
|
return BeanUtils.toBean(recordCategories, RecordCategoryRespVO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RecordCategoryDO> selectCategoryAppraisalList(String appraisalFlag) {
|
||||||
|
LambdaQueryWrapper<RecordCategoryDO> queryWrapper = Wrappers.lambdaQuery();
|
||||||
|
queryWrapper.like(RecordCategoryDO::getCustomConfig,"%" + appraisalFlag + "%");
|
||||||
|
return recordCategoryMapper.selectList(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void updateRecordCategory(RecordCategorySaveReqVO updateReqVO) {
|
public void updateRecordCategory(RecordCategorySaveReqVO updateReqVO) {
|
||||||
|
|||||||
@@ -138,7 +138,26 @@ public class RecordRecordServiceImpl implements RecordRecordService {
|
|||||||
@Override
|
@Override
|
||||||
public List<RecordRecordRespVO> getRecordList(RecordRecordPageReqVO pageReqVO) {
|
public List<RecordRecordRespVO> getRecordList(RecordRecordPageReqVO pageReqVO) {
|
||||||
|
|
||||||
|
String appraisalFlag = pageReqVO.getAppraisalFlag();
|
||||||
Long categoryId = pageReqVO.getCategoryId();
|
Long categoryId = pageReqVO.getCategoryId();
|
||||||
|
if (appraisalFlag.equals("1")) { // 评审获取所有需要参加评审的列表
|
||||||
|
// 查询所有 根分类上 appraisalFlag 为 1 的数据
|
||||||
|
String appraisal = "\"appraisalFlag\":" + 1 + ",";
|
||||||
|
|
||||||
|
List<RecordCategoryDO> recordCategoryDOS = recordCategoryService.selectCategoryAppraisalList(appraisal);
|
||||||
|
// 获取所有 分类id
|
||||||
|
List<String> categoryIdPath = new ArrayList<>();
|
||||||
|
recordCategoryDOS.forEach(item -> {
|
||||||
|
Long id = item.getId();
|
||||||
|
String idPath = "/0//" + id +"//"; // 根分类的路径
|
||||||
|
categoryIdPath.add(idPath);
|
||||||
|
});
|
||||||
|
if (ObjectUtils.isEmpty(categoryIdPath)) return new ArrayList<>();
|
||||||
|
// 查询 分类下面所有的记录
|
||||||
|
List<RecordRecordDO> recordRecordDOS = recordRecordMapper.selectRecordByIdPathLike(pageReqVO, categoryIdPath);
|
||||||
|
return BeanUtils.toBean(recordRecordDOS, RecordRecordRespVO.class);
|
||||||
|
|
||||||
|
}
|
||||||
RecordCategoryDO recordCategoryDO = validateRecordCategoryExists(categoryId);
|
RecordCategoryDO recordCategoryDO = validateRecordCategoryExists(categoryId);
|
||||||
if (categoryId == null) CommonResult.error(RECORD_CATEGORY_NOT_EXISTS);
|
if (categoryId == null) CommonResult.error(RECORD_CATEGORY_NOT_EXISTS);
|
||||||
|
|
||||||
@@ -146,24 +165,24 @@ public class RecordRecordServiceImpl implements RecordRecordService {
|
|||||||
if (ObjectUtils.isEmpty(recordCategoryDO)) return new ArrayList<>();
|
if (ObjectUtils.isEmpty(recordCategoryDO)) return new ArrayList<>();
|
||||||
String idPath = recordCategoryDO.getIdPath();
|
String idPath = recordCategoryDO.getIdPath();
|
||||||
|
|
||||||
|
if (ObjectUtils.isEmpty(idPath)) return new ArrayList<>();
|
||||||
Long rootCategoryId = getRootCategoryId(idPath);
|
Long rootCategoryId = getRootCategoryId(idPath);
|
||||||
|
|
||||||
// 判断是否有权限
|
// 判断是否有权限
|
||||||
// 判断是否有当前分类的父分类权限 (可编辑,可查看,管理员--> 任意条件)
|
// 判断是否有当前分类的父分类权限 (可编辑,可查看,管理员--> 任意条件)
|
||||||
List<RecordPermissionDO> recordPermissionDOS = recordPermissionService.selectPermissionList(rootCategoryId, null);
|
List<RecordPermissionDO> recordPermissionDOS = recordPermissionService.selectPermissionList(rootCategoryId, null);
|
||||||
|
|
||||||
List<RecordRecordDO> recordRecordList = new ArrayList<>();
|
List<RecordRecordDO> recordRecordList ;
|
||||||
|
|
||||||
if (recordPermissionDOS.isEmpty()) return new ArrayList<>();
|
if (recordPermissionDOS.isEmpty()) return new ArrayList<>();
|
||||||
|
|
||||||
Long parentId = getRootCategoryId(idPath);
|
|
||||||
String businessType = pageReqVO.getBusinessType();
|
String businessType = pageReqVO.getBusinessType();
|
||||||
if (ObjectUtils.isEmpty(businessType)) return new ArrayList<>();
|
if (ObjectUtils.isEmpty(businessType)) return new ArrayList<>();
|
||||||
|
|
||||||
switch (businessType) {
|
switch (businessType) {
|
||||||
case RecordConstants.BusinessType.REVIEW: // 评审
|
case RecordConstants.BusinessType.REVIEW: // 评审
|
||||||
// TODO
|
// TODO
|
||||||
boolean b = getRecordReviewList(parentId);
|
boolean b = getRecordReviewList(rootCategoryId);
|
||||||
if (!b) return new ArrayList<>();
|
if (!b) return new ArrayList<>();
|
||||||
// 查询评审---记录列表
|
// 查询评审---记录列表
|
||||||
break;
|
break;
|
||||||
@@ -333,8 +352,34 @@ public class RecordRecordServiceImpl implements RecordRecordService {
|
|||||||
// 校验分类存在
|
// 校验分类存在
|
||||||
if (ObjectUtils.isEmpty(recordCategoryDO)) return new PageResult<RecordRecordDO>().setTotal(0L);
|
if (ObjectUtils.isEmpty(recordCategoryDO)) return new PageResult<RecordRecordDO>().setTotal(0L);
|
||||||
String idPath = recordCategoryDO.getIdPath();
|
String idPath = recordCategoryDO.getIdPath();
|
||||||
|
if (ObjectUtils.isEmpty(idPath)) return new PageResult<RecordRecordDO>().setTotal(0L);
|
||||||
|
|
||||||
Long parentId = getRootCategoryId(idPath);
|
Long parentId = getRootCategoryId(idPath);
|
||||||
|
// String businessType = pageReqVO.getBusinessType();
|
||||||
|
// if (ObjectUtils.isEmpty(businessType)) return new PageResult<RecordRecordDO>().setTotal(0L);
|
||||||
|
// List<RecordRecordDO> recordRecordList;
|
||||||
|
// switch (businessType) {
|
||||||
|
// case RecordConstants.BusinessType.REVIEW: // 评审
|
||||||
|
// // TODO
|
||||||
|
// boolean b = getRecordReviewList(parentId);
|
||||||
|
// if (!b) return new PageResult<RecordRecordDO>().setTotal(0L);
|
||||||
|
// // 查询评审---记录列表
|
||||||
|
// break;
|
||||||
|
// case RecordConstants.BusinessType.DISTRIBUTION,
|
||||||
|
// RecordConstants.BusinessType.RECORD_UPDATE,
|
||||||
|
// RecordConstants.BusinessType.INVALID: // 修改
|
||||||
|
// //TODO
|
||||||
|
//// List<RecordRecordDO> recordRecordDOS = this.selectViewApplyRecordList(pageReqVO);
|
||||||
|
//// return new PageResult<RecordRecordDO>().setList(recordRecordDOS).setTotal((long) recordRecordDOS.size());
|
||||||
|
// break;
|
||||||
|
// case RecordConstants.BusinessType.VIEW_APPLY: // 查看申请,默认查看所有
|
||||||
|
// pageReqVO.setBusinessType(null);//
|
||||||
|
// // 参数 categoryId
|
||||||
|
// // TODO
|
||||||
|
// PageResult<RecordRecordDO> iPage = recordRecordMapper.selectPage(pageReqVO);
|
||||||
|
// PageResult<RecordRecordDO> result = new PageResult<>(iPage.getList(), iPage.getTotal());
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
|
|
||||||
// 判断是否有当前分类的父分类权限 (可编辑,可查看,管理员--> 任意条件)
|
// 判断是否有当前分类的父分类权限 (可编辑,可查看,管理员--> 任意条件)
|
||||||
List<RecordPermissionDO> recordPermissionDOS = recordPermissionService.selectPermissionList(parentId, null);
|
List<RecordPermissionDO> recordPermissionDOS = recordPermissionService.selectPermissionList(parentId, null);
|
||||||
@@ -350,7 +395,7 @@ public class RecordRecordServiceImpl implements RecordRecordService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 设置默认查询最新版
|
// 设置默认查询最新版
|
||||||
pageReqVO.setCurrentFlag(1);
|
// pageReqVO.setCurrentFlag(1);
|
||||||
|
|
||||||
// 多表关联分页查询(关联 RecordApply 获取文件提交信息)
|
// 多表关联分页查询(关联 RecordApply 获取文件提交信息)
|
||||||
IPage<RecordRecordDO> iPage = recordRecordMapper.selectRecordWithApplyPage(page, pageReqVO);
|
IPage<RecordRecordDO> iPage = recordRecordMapper.selectRecordWithApplyPage(page, pageReqVO);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user