Commit 054e8bf1 authored by wdy's avatar wdy

预览企业留档文件

parent 6d6fabcc
package com.ruoyi.domain.vo; package com.ruoyi.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@ApiModel(value = "ReviewEnterpriseArchiveViewItemVO", description = "条目VO")
@Accessors(chain = true) @Accessors(chain = true)
@Data @Data
public class ReviewEnterpriseArchiveViewItemVO { public class ReviewEnterpriseArchiveViewItemVO {
// 文件目录 // 文件目录
@ApiModelProperty("文件目录")
private String catalogue; private String catalogue;
// 标准章节 // 标准章节
@ApiModelProperty("标准章节")
private String chapter; private String chapter;
// 标准要求 // 标准要求
@ApiModelProperty("标准要求")
private String standard; private String standard;
// 要点要求 // 要点要求
@ApiModelProperty("要点要求")
private String keyPoint; private String keyPoint;
// 企业留档文件id // 企业留档文件id
@ApiModelProperty("企业留档文件id")
private Long archiveId; private Long archiveId;
} }
package com.ruoyi.domain.vo; package com.ruoyi.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
@ApiModel(value = "ReviewEnterpriseArchiveViewVO", description = "企业留档文件VO")
@Data @Data
public class ReviewEnterpriseArchiveViewVO { public class ReviewEnterpriseArchiveViewVO {
// 企业留档文件id // 企业留档文件id
@ApiModelProperty("企业留档文件id")
private Long id; private Long id;
// 企业留档文件名称 // 企业留档文件名称
@ApiModelProperty("企业留档文件名称")
private String fileName; private String fileName;
// 条目 // 条目
@ApiModelProperty("条目")
private List<ReviewEnterpriseArchiveViewItemVO> items; private List<ReviewEnterpriseArchiveViewItemVO> items;
} }
...@@ -109,7 +109,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp ...@@ -109,7 +109,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
Long archiveId = view.getId(); Long archiveId = view.getId();
for(ReviewEnterpriseArchiveViewItemVO item : viewItems) { for(ReviewEnterpriseArchiveViewItemVO item : viewItems) {
if(item.getArchiveId().equals(archiveId)) { if(item.getArchiveId() != null && item.getArchiveId().equals(archiveId)) {
subList.add(item); subList.add(item);
} }
} }
......
...@@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.R; ...@@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.ReviewEnterpriseArchive; import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.service.ReviewEnterpriseArchiveService; import com.ruoyi.service.ReviewEnterpriseArchiveService;
import com.ruoyi.web.request.*; import com.ruoyi.web.request.*;
import com.ruoyi.web.response.TaskFindResponse; import com.ruoyi.web.response.TaskFindResponse;
...@@ -76,4 +77,13 @@ public class ReviewEnterpriseArchiveController extends BaseController { ...@@ -76,4 +77,13 @@ public class ReviewEnterpriseArchiveController extends BaseController {
reviewEnterpriseArchiveService.updateById(reviewEnterpriseArchive); reviewEnterpriseArchiveService.updateById(reviewEnterpriseArchive);
return R.ok(); return R.ok();
} }
@ApiOperation("预览企业留档文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/preview")
public TableDataInfo<ReviewEnterpriseArchiveViewVO> preview(@Validated @RequestBody ReviewEnterpriseArchivePreviewRequest request) {
return getDataTable(reviewEnterpriseArchiveService.view(request.getTaskId()));
}
} }
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "ReviewEnterpriseArchivePreviewRequest", description = "预览企业留档文件")
@Data
public class ReviewEnterpriseArchivePreviewRequest {
@ApiModelProperty("taskId")
private Long taskId;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment