Commit 3eee2cd8 authored by yuanshuo's avatar yuanshuo

Merge branch 'master' of...

Merge branch 'master' of http://gitlab.91isoft.com:90/car-database/car-database-api into songyuanshuo
parents 45f500ba 56974d50
package com.ruoyi.domain.vo; package com.ruoyi.domain.vo;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
...@@ -10,6 +11,7 @@ public class RecaordUseCasesVO { ...@@ -10,6 +11,7 @@ public class RecaordUseCasesVO {
private String id; private String id;
private String displayID; private String displayID;
@Excel(name = "用例编号")
private String customizedID; private String customizedID;
private String name; private String name;
private String description; private String description;
......
...@@ -6,8 +6,11 @@ import com.ruoyi.common.annotation.Log; ...@@ -6,8 +6,11 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.R; 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.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.domain.TTestPlanRecord; import com.ruoyi.domain.TTestPlanRecord;
import com.ruoyi.domain.vo.ItemsByUseCaseVO;
import com.ruoyi.domain.vo.RecaordUseCasesVO;
import com.ruoyi.mapper.TTestPlanRecordMapper; import com.ruoyi.mapper.TTestPlanRecordMapper;
import com.ruoyi.service.TTestPlanRecordService; import com.ruoyi.service.TTestPlanRecordService;
import com.ruoyi.service.impl.ReviewStandardServiceImpl; import com.ruoyi.service.impl.ReviewStandardServiceImpl;
...@@ -26,7 +29,9 @@ import org.springframework.web.bind.annotation.*; ...@@ -26,7 +29,9 @@ import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -106,4 +111,22 @@ public class TestPlanRecordController extends BaseController{ ...@@ -106,4 +111,22 @@ public class TestPlanRecordController extends BaseController{
public R<Integer> getUseCases(@Validated @RequestBody TestPlanRecordGetInfoRequest testPlanRecordGetInfoRequest ) { public R<Integer> getUseCases(@Validated @RequestBody TestPlanRecordGetInfoRequest testPlanRecordGetInfoRequest ) {
return R.ok(tTestPlanRecordMapper.deleteById(testPlanRecordGetInfoRequest.getId())); return R.ok(tTestPlanRecordMapper.deleteById(testPlanRecordGetInfoRequest.getId()));
} }
@ApiOperation("导出检验记录")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/export")
public void exportPlanRecord(HttpServletResponse respon,@Validated @RequestBody String params) throws IOException{
List<ItemsByUseCaseVO> listUseCase = tTestPlanRecordService.getCarTestDetail(params);
List<RecaordUseCasesVO> list = new ArrayList<>();
listUseCase.forEach(item->{
item.getUseCases().forEach(data->{
list.add(data);
});
});
ExcelUtil<RecaordUseCasesVO> util = new ExcelUtil<RecaordUseCasesVO>(RecaordUseCasesVO.class);
util.exportExcel( respon, list, "自由裁量库(左)数据");
// return R.ok();
}
} }
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