|
@@ -2,6 +2,9 @@ package cn.iocoder.yudao.module.work.controller.admin.score;
|
|
|
|
|
|
import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
|
|
|
import cn.iocoder.yudao.module.work.dal.dataobject.score.ScoreStatusDO;
|
|
|
+import cn.iocoder.yudao.module.work.dal.dataobject.type.TypeDO;
|
|
|
+import cn.iocoder.yudao.module.work.dal.dataobject.work.WorkDO;
|
|
|
+import cn.iocoder.yudao.module.work.service.work.WorkService;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -38,6 +41,8 @@ public class ScoreController {
|
|
|
|
|
|
@Resource
|
|
|
private ScoreService scoreService;
|
|
|
+ @Resource
|
|
|
+ private WorkService workService;
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建作品评分")
|
|
@@ -108,6 +113,12 @@ public class ScoreController {
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
List<ScoreDO> list = scoreService.getScorePage(pageReqVO).getList();
|
|
|
+
|
|
|
+ for (ScoreDO scoreDO : list) {
|
|
|
+ WorkDO workDO = workService.getwork(Integer.parseInt(scoreDO.getWorkId()));
|
|
|
+ scoreDO.setId(Integer.valueOf(scoreDO.getWorkId()));
|
|
|
+ scoreDO.setWorkId(workDO.getWorkName());
|
|
|
+ }
|
|
|
// 导出 Excel
|
|
|
ExcelUtils.write(response, "作品评分.xls", "数据", ScoreRespVO.class,
|
|
|
BeanUtils.toBean(list, ScoreRespVO.class));
|