文件记录-重构-通用申请流程
This commit is contained in:
@@ -6,6 +6,9 @@ import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.zt.plat.module.qms.resource.record.controller.admin.recordassign.vo.RecordAssignRespVO;
|
||||
import com.zt.plat.module.qms.resource.record.dal.dataobject.recordassign.RecordAssignDO;
|
||||
import com.zt.plat.module.qms.resource.record.service.recordassign.RecordAssignService;
|
||||
import com.zt.plat.module.system.api.dept.DeptApi;
|
||||
import com.zt.plat.module.system.api.dept.dto.DeptRespDTO;
|
||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||
@@ -44,6 +47,30 @@ public class CommonRecordController {
|
||||
@Resource
|
||||
private PermissionCommonApi permissionCommonApi;
|
||||
|
||||
@Resource
|
||||
private RecordAssignService recordAssignService;
|
||||
|
||||
@GetMapping("/dept-assign-list")
|
||||
@Operation(summary = "获取当前用户所在公司的所有部门,以及分发号")
|
||||
public CommonResult<List<RecordAssignRespVO>> getDeptAssignList() {
|
||||
CommonResult<List<DeptRespDTO>> deptList = this.getDeptList();
|
||||
if (ObjectUtils.isEmpty(deptList)) return CommonResult.success(new ArrayList<>());
|
||||
List<DeptRespDTO> data = deptList.getData();
|
||||
List<Long> deptIds = data.stream().map(DeptRespDTO::getId).toList();
|
||||
List<RecordAssignRespVO> recordAssignDOList = recordAssignService.selectListByTargetIds(deptIds);
|
||||
return CommonResult.success(recordAssignDOList);
|
||||
}
|
||||
|
||||
@GetMapping("/user-assign-list")
|
||||
@Operation(summary = "获取当前用户所在公司的所有部门,以及分发号")
|
||||
public CommonResult<List<RecordAssignRespVO>> getUserAssignList() {
|
||||
CommonResult<List<AdminUserRespDTO>> deptList = this.getUserList();
|
||||
if (ObjectUtils.isEmpty(deptList)) return CommonResult.success(new ArrayList<>());
|
||||
List<AdminUserRespDTO> data = deptList.getData();
|
||||
List<Long> deptIds = data.stream().map(AdminUserRespDTO::getId).toList();
|
||||
List<RecordAssignRespVO> recordAssignDOList = recordAssignService.selectListByTargetIds(deptIds);
|
||||
return CommonResult.success(recordAssignDOList);
|
||||
}
|
||||
|
||||
@GetMapping("/dept-list")
|
||||
@Operation(summary = "获取当前用户所在公司的所有部门")
|
||||
@@ -80,7 +107,7 @@ public class CommonRecordController {
|
||||
*/
|
||||
private void getChildDeptListRecursive(List<DeptRespDTO> list, List<DeptRespDTO> allDeptList, int depth) {
|
||||
// 递归深度限制为4层
|
||||
if (ObjectUtils.isEmpty(list) || depth >= 4) {
|
||||
if (ObjectUtils.isEmpty(list) || depth >= 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,37 +134,6 @@ public class RecordApplyController extends AbstractFileUploadController implemen
|
||||
return success(BeanUtils.toBean(pageResult, RecordApplyPageReqVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/recordDistributePage")
|
||||
@Operation(summary = "文件分发分页")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:record-record:query')")
|
||||
public CommonResult<PageResult<RecordApplyJoinPageVO>> recordDistributePage(@Valid RecordApplyPageReqVO pageReqVO) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
Long userId = loginUser.getId();
|
||||
pageReqVO.setApplyUserId(userId);
|
||||
PageResult<RecordApplyJoinPageVO> recordApplyJoinPageVOPageResult = recordApplyService.recordDistributePage(pageReqVO);
|
||||
return success(recordApplyJoinPageVOPageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/recordUpdatePage")
|
||||
@Operation(summary = "文件更改申请分页")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:record-record:query')")
|
||||
public CommonResult<PageResult<RecordApplyJoinPageVO>> recordUpdatePage(@Valid RecordApplyPageReqVO pageReqVO) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
Long userId = loginUser.getId();
|
||||
pageReqVO.setApplyUserId(userId);
|
||||
return success(recordApplyService.recordUpdatePage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/recordInvalidPage")
|
||||
@Operation(summary = "文件更改申请分页")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:record-record:query')")
|
||||
public CommonResult<PageResult<RecordApplyJoinPageVO>> recordInvalidPage(@Valid RecordApplyPageReqVO pageReqVO) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
Long userId = loginUser.getId();
|
||||
pageReqVO.setApplyUserId(userId);
|
||||
return success(recordApplyService.recordInvalidPage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出文件记录通用申请 Excel")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:record-apply:export')")
|
||||
|
||||
@@ -44,8 +44,8 @@ public class RecordApplyPageReqVO extends PageParam {
|
||||
@Schema(description = "评审范围")
|
||||
private String reviewRange;
|
||||
|
||||
@Schema(description = "分发目标")
|
||||
private String assignTarget;
|
||||
// @Schema(description = "分发目标")
|
||||
// private String assignTarget;
|
||||
|
||||
@Schema(description = "参加评审部门")
|
||||
private String targetDepartmentIds;
|
||||
|
||||
@@ -56,8 +56,8 @@ public class RecordApplyRespVO {
|
||||
@ExcelProperty("评审范围")
|
||||
private String reviewRange;
|
||||
|
||||
@Schema(description = "分发目标")
|
||||
private String assignTarget;
|
||||
// @Schema(description = "分发目标")
|
||||
// private String assignTarget;
|
||||
|
||||
@Schema(description = "参加评审部门")
|
||||
@ExcelProperty("参加评审部门")
|
||||
|
||||
@@ -45,8 +45,8 @@ public class RecordApplySaveReqVO {
|
||||
@ExcelProperty("部门名称")
|
||||
private String applyDepartmentName;
|
||||
|
||||
@Schema(description = "分发目标")
|
||||
private String assignTarget;
|
||||
// @Schema(description = "分发目标")
|
||||
// private String assignTarget;
|
||||
|
||||
@Schema(description = "评审时间")
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
@@ -41,8 +41,14 @@ public class RecordApplyDetailPageReqVO extends PageParam {
|
||||
@Schema(description = "是否保留")
|
||||
private String saveFlag;
|
||||
|
||||
@Schema(description = "保留结束日期")
|
||||
private LocalDateTime saveEndDate;
|
||||
@Schema(description = "分发号")
|
||||
private String assignCode;
|
||||
|
||||
@Schema(description = "分发编号")
|
||||
private String assignId;
|
||||
|
||||
@Schema(description = "结束日期")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@Schema(description = "是否长期有效")
|
||||
private String permanently;
|
||||
|
||||
@@ -50,6 +50,12 @@ public class RecordApplyDetailRespVO {
|
||||
@ExcelProperty("更改原因")
|
||||
private String modifyCause;
|
||||
|
||||
@Schema(description = "分发号")
|
||||
private String assignCode;
|
||||
|
||||
@Schema(description = "分发编号")
|
||||
private String assignId;
|
||||
|
||||
@Schema(description = "表单数据")
|
||||
@ExcelProperty("表单数据")
|
||||
private String formData;
|
||||
@@ -62,7 +68,7 @@ public class RecordApplyDetailRespVO {
|
||||
private String saveFlag;
|
||||
|
||||
@Schema(description = "保留结束日期")
|
||||
private LocalDateTime saveEndDate;
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@Schema(description = "开始日期")
|
||||
@ExcelProperty("开始日期")
|
||||
|
||||
@@ -40,8 +40,8 @@ public class RecordApplyDetailSaveReqVO {
|
||||
@Schema(description = "是否保留")
|
||||
private String saveFlag;
|
||||
|
||||
@Schema(description = "保留结束日期")
|
||||
private LocalDateTime saveEndDate;
|
||||
@Schema(description = "结束日期")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
private String formData;
|
||||
|
||||
@@ -63,8 +63,12 @@ public class RecordApplyDetailSaveReqVO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
//================================
|
||||
@Schema(description = "分发号")
|
||||
private String assignCode;
|
||||
|
||||
@Schema(description = "分发编号")
|
||||
private String assignId;
|
||||
|
||||
//================================
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.resource.record.controller.admin.recordassign.vo.RecordAssignPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.record.controller.admin.recordassign.vo.RecordAssignRespVO;
|
||||
@@ -35,6 +36,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
@RestController
|
||||
@RequestMapping("/qms/resource/record-assign")
|
||||
@Validated
|
||||
@DeptDataPermissionIgnore(enable = "true")
|
||||
@FileUploadController(source = "qms.recordassign")
|
||||
public class RecordAssignController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
|
||||
@@ -44,8 +44,11 @@ public class RecordAssignPageReqVO extends PageParam {
|
||||
@Schema(description = "长期有效")
|
||||
private String permanently;
|
||||
|
||||
@Schema(description = "通知")
|
||||
private String adviceFlag;
|
||||
@Schema(description = "原始父级Id")
|
||||
private String mainId;
|
||||
|
||||
@Schema(description = "当前版标志")
|
||||
private Integer currentFlag;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user