Quellcode durchsuchen

查询 借阅详情

tags/24080901
PoffyZhang vor 1 Jahr
Ursprung
Commit
9c4d93a75a
3 geänderte Dateien mit 100 neuen und 0 gelöschten Zeilen
  1. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/controller/ProjectFileController.java
  2. +34
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java
  3. +59
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectApplyBorrowVO.java

+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/controller/ProjectFileController.java Datei anzeigen

@@ -4,6 +4,7 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.filemanage.manage.ProjectFileManage;
import com.ningdatech.pmapi.filemanage.model.param.ProjectFileListParam;
import com.ningdatech.pmapi.filemanage.model.vo.ProjectApplyBorrowVO;
import com.ningdatech.pmapi.filemanage.model.vo.ProjectFileListVO;
import com.ningdatech.pmapi.filemanage.model.vo.ProjectFileVO;
import io.swagger.annotations.Api;
@@ -49,6 +50,12 @@ public class ProjectFileController {
return "启动申请借阅流程实例 【" + instanceId + "】 成功";
}

@GetMapping("/wantRead-detail/{instanceId}")
@ApiOperation(value = "借阅详情", notes = "借阅详情")
public ProjectApplyBorrowVO wantReadDetail(@PathVariable String instanceId){
return projectFileManage.wantReadDetail(instanceId);
}

@PostMapping("/download/{projectId}")
@ApiOperation(value = "档案下载",notes = "档案下载")
public void downloadFile(@PathVariable Long projectId,HttpServletResponse response){


+ 34
- 0
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java Datei anzeigen

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.filemanage.manage;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@@ -23,6 +24,7 @@ import com.ningdatech.pmapi.expert.model.vo.ExpertReviewDetailVO;
import com.ningdatech.pmapi.expert.model.vo.ProjectReviewDetailVO;
import com.ningdatech.pmapi.filemanage.model.entity.ProjectApplyBorrow;
import com.ningdatech.pmapi.filemanage.model.param.ProjectFileListParam;
import com.ningdatech.pmapi.filemanage.model.vo.ProjectApplyBorrowVO;
import com.ningdatech.pmapi.filemanage.model.vo.ProjectFileListVO;
import com.ningdatech.pmapi.filemanage.model.vo.ProjectFileVO;
import com.ningdatech.pmapi.filemanage.service.INdProjectApplyBorrowService;
@@ -524,4 +526,36 @@ public class ProjectFileManage {
List<Long> prePlanFileIdList = CollUtils.fieldList(prePlanFileArray, w -> w.getLong(CommonConst.ID_STR));
return prePlanFileIdList;
}

/**
* 查看 借阅的详情
* @param instanceId
* @return
*/
public ProjectApplyBorrowVO wantReadDetail(String instanceId) {
ProjectApplyBorrow apply = projectApplyBorrowService.getOne(Wrappers.lambdaQuery(ProjectApplyBorrow.class)
.eq(ProjectApplyBorrow::getInstanceId, instanceId)
.last(BizConst.LIMIT_1));

if(Objects.isNull(apply)){
return null;
}

ProjectApplyBorrowVO vo = BeanUtil.copyProperties(apply,ProjectApplyBorrowVO.class);
if(StringUtils.isNotBlank(vo.getApplyBorrowEmployeeCode())){
UserFullInfoDTO user = userInfoHelper.getUserFullInfoByEmployeeCode(vo.getApplyBorrowEmployeeCode());
if(Objects.nonNull(user)){
vo.setApplyBorrowEmployeeName(user.getUsername());
}
}
if(StringUtils.isNotBlank(vo.getApplyBorrowEmpPosUnitCode())){
DingOrganization organization = dingOrganizationService.getOne(Wrappers.lambdaQuery(DingOrganization.class)
.eq(DingOrganization::getOrganizationCode, vo.getApplyBorrowEmpPosUnitCode())
.last(BizConst.LIMIT_1));
if(Objects.nonNull(organization)){
vo.setApplyBorrowEmpPosUnitName(organization.getOrganizationName());
}
}
return vo;
}
}

+ 59
- 0
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectApplyBorrowVO.java Datei anzeigen

@@ -0,0 +1,59 @@
package com.ningdatech.pmapi.filemanage.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* <p>
*
* </p>
*
* @author CMM
* @since 2023-06-16
*/
@Data
@ApiModel(value = "ProjectApplyBorrowVO", description = "")
public class ProjectApplyBorrowVO implements Serializable {

private static final long serialVersionUID = 1L;

@ApiModelProperty("主键")
private Long id;

@ApiModelProperty("借阅项目ID")
private Long projectId;

@ApiModelProperty("申请借阅员工code")
private String applyBorrowEmployeeCode;

@ApiModelProperty("申请借阅员工名字")
private String applyBorrowEmployeeName;

@ApiModelProperty("申请借阅用户任职单位code")
private String applyBorrowEmpPosUnitCode;

@ApiModelProperty("申请借阅用户任职单位")
private String applyBorrowEmpPosUnitName;

@ApiModelProperty("申请借阅审批流程ID")
private String instanceId;

@ApiModelProperty("创建人")
private Long createBy;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("更新人")
private Long updateBy;

@ApiModelProperty("更新时间")
private LocalDateTime updateOn;

@ApiModelProperty("申请借阅是否成功")
private Boolean isSuccess;
}

Laden…
Abbrechen
Speichern