Commit 054e8bf1 authored by wdy's avatar wdy

预览企业留档文件

parent 6d6fabcc
package com.ruoyi.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
@ApiModel(value = "ReviewEnterpriseArchiveViewItemVO", description = "条目VO")
@Accessors(chain = true)
@Data
public class ReviewEnterpriseArchiveViewItemVO {
// 文件目录
@ApiModelProperty("文件目录")
private String catalogue;
// 标准章节
@ApiModelProperty("标准章节")
private String chapter;
// 标准要求
@ApiModelProperty("标准要求")
private String standard;
// 要点要求
@ApiModelProperty("要点要求")
private String keyPoint;
// 企业留档文件id
@ApiModelProperty("企业留档文件id")
private Long archiveId;
}
package com.ruoyi.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(value = "ReviewEnterpriseArchiveViewVO", description = "企业留档文件VO")
@Data
public class ReviewEnterpriseArchiveViewVO {
// 企业留档文件id
@ApiModelProperty("企业留档文件id")
private Long id;
// 企业留档文件名称
@ApiModelProperty("企业留档文件名称")
private String fileName;
// 条目
@ApiModelProperty("条目")
private List<ReviewEnterpriseArchiveViewItemVO> items;
}
......@@ -109,7 +109,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
Long archiveId = view.getId();
for(ReviewEnterpriseArchiveViewItemVO item : viewItems) {
if(item.getArchiveId().equals(archiveId)) {
if(item.getArchiveId() != null && item.getArchiveId().equals(archiveId)) {
subList.add(item);
}
}
......
......@@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.service.ReviewEnterpriseArchiveService;
import com.ruoyi.web.request.*;
import com.ruoyi.web.response.TaskFindResponse;
......@@ -76,4 +77,13 @@ public class ReviewEnterpriseArchiveController extends BaseController {
reviewEnterpriseArchiveService.updateById(reviewEnterpriseArchive);
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