Commit c1c6b940 authored by wdy's avatar wdy

Merge branch 'dev' of http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review into wangdingyi

parents 51388b7e 456fcd2a
...@@ -229,13 +229,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -229,13 +229,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
// 查询数据 // 查询数据
List<ReviewEnterpriseArchiveViewVO> viewList = reviewEnterpriseArchiveService.view(taskId); List<ReviewEnterpriseArchiveViewVO> viewList = reviewEnterpriseArchiveService.view(taskId);
for (ReviewEnterpriseArchiveViewVO view : viewList) { for (ReviewEnterpriseArchiveViewVO view : viewList) {
document.writeCell(view.getFileName(), Element.ALIGN_LEFT, 1, view.getItems().size(), table); if (view.getItems().size() > 0) {
view.getItems().forEach(item -> { document.writeCell(view.getFileName(), Element.ALIGN_LEFT, 1, view.getItems().size(), table);
document.writeCell(item.getCatalogue(), Element.ALIGN_LEFT, 1, 1, table); view.getItems().forEach(item -> {
document.writeCell(item.getChapter(), Element.ALIGN_LEFT, 1, 1, table); document.writeCell(item.getCatalogue(), Element.ALIGN_LEFT, 1, 1, table);
document.writeCell(item.getStandard(), Element.ALIGN_LEFT, 1, 1, table); document.writeCell(item.getChapter(), Element.ALIGN_LEFT, 1, 1, table);
document.writeCell(item.getKeyPoint(), Element.ALIGN_LEFT, 1, 1, table); document.writeCell(item.getStandard(), Element.ALIGN_LEFT, 1, 1, table);
}); document.writeCell(item.getKeyPoint(), Element.ALIGN_LEFT, 1, 1, table);
});
}
} }
document.addContent(table); document.addContent(table);
// 最后结尾签字 // 最后结尾签字
......
package com.ruoyi.service.impl; package com.ruoyi.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
...@@ -64,21 +65,23 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali ...@@ -64,21 +65,23 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
// 创建一个HashMap, 用于存放数据。用例条款ID作为key // 创建一个HashMap, 用于存放数据。用例条款ID作为key
HashMap<Long, List<TestCaseVO>> map = new HashMap<>(); HashMap<Long, List<TestCaseVO>> map = new HashMap<>();
for (TestUsecaseVO testUsecaseVO : testCaseList) { for (TestUsecaseVO testUsecaseVO : testCaseList) {
// map不存在此key,添加; 则,存数据 if (ObjectUtil.isNotEmpty(testUsecaseVO.getReviewStandardId())) {
if (!map.containsKey(testUsecaseVO.getReviewStandardId())) { // map不存在此key,添加; 则,存数据
TestCaseVO caseVO = new TestCaseVO(); if (!map.containsKey(testUsecaseVO.getReviewStandardId())) {
BeanUtils.copyProperties(testUsecaseVO, caseVO); TestCaseVO caseVO = new TestCaseVO();
List<TestCaseVO> caseList = new ArrayList<>(); BeanUtils.copyProperties(testUsecaseVO, caseVO);
caseList.add(caseVO); List<TestCaseVO> caseList = new ArrayList<>();
map.put(testUsecaseVO.getReviewStandardId(), caseList); caseList.add(caseVO);
} else { map.put(testUsecaseVO.getReviewStandardId(), caseList);
TestCaseVO caseVO = new TestCaseVO(); } else {
BeanUtils.copyProperties(testUsecaseVO, caseVO); TestCaseVO caseVO = new TestCaseVO();
map.get(testUsecaseVO.getReviewStandardId()).add(caseVO); BeanUtils.copyProperties(testUsecaseVO, caseVO);
map.get(testUsecaseVO.getReviewStandardId()).add(caseVO);
}
} }
} }
// 循环map, 给list赋值 // 循环map, 给list赋值
for (Map.Entry<Long, List<TestCaseVO>> entry : map.entrySet()) { for (Map.Entry<Long, List<TestCaseVO>> entry : map.entrySet()) {
List<TestUsecaseVO> collect = testCaseList.stream().filter(testCaseVO -> entry.getKey().equals(testCaseVO.getReviewStandardId())).collect(Collectors.toList()); List<TestUsecaseVO> collect = testCaseList.stream().filter(testCaseVO -> entry.getKey().equals(testCaseVO.getReviewStandardId())).collect(Collectors.toList());
if (collect.size() > 0){ if (collect.size() > 0){
TestUsecaseVO testUsecaseVO = collect.get(0); TestUsecaseVO testUsecaseVO = collect.get(0);
......
...@@ -42,4 +42,7 @@ public class ReviewStandardListByPageRequest extends PageDomain { ...@@ -42,4 +42,7 @@ public class ReviewStandardListByPageRequest extends PageDomain {
*/ */
@ApiModelProperty("文本内容") @ApiModelProperty("文本内容")
private String text; private String text;
@ApiModelProperty("测试方法")
private String testMethod;
} }
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
<select id="selectReviewStandardList" parameterType="com.ruoyi.web.request.ReviewStandardListByPageRequest" resultType="com.ruoyi.web.response.ReviewStandardResponse"> <select id="selectReviewStandardList" parameterType="com.ruoyi.web.request.ReviewStandardListByPageRequest" resultType="com.ruoyi.web.response.ReviewStandardResponse">
select select
id, chapter, text id,
chapter,
text,
test_method AS testMethod
from from
t_review_standard t_review_standard
<where> <where>
...@@ -49,6 +52,7 @@ ...@@ -49,6 +52,7 @@
<if test="type != null and type != ''"> and `type` = #{type} </if> <if test="type != null and type != ''"> and `type` = #{type} </if>
<if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if> <if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if>
<if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if> <if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if>
<if test="testMethod != null and testMethod != ''"> and test_method like concat('%', #{testMethod}, '%') </if>
</where> </where>
ORDER BY ORDER BY
chapter chapter
......
...@@ -49,32 +49,31 @@ ...@@ -49,32 +49,31 @@
</select> </select>
<select id="selectListByTaskId" resultType="com.ruoyi.domain.vo.TestUsecaseVO"> <select id="selectListByTaskId" resultType="com.ruoyi.domain.vo.TestUsecaseVO">
select select tu.id,
tu.id, tu.case_id caseId,
tu.case_id caseId, ts.test_scenario testScenario,
ts.test_scenario testScenario, tt.test_type testType,
tt.test_type testType, tu.usecase_no usecaseNo,
tu.usecase_no usecaseNo, tu.name,
tu.name, tu.tools,
tu.tools, tu.input,
tu.input, tu.description,
tu.description, tu.review_standard_id,
tu.review_standard_id, rs.chapter,
rs.chapter, rs.text,
rs.text, rs.test_method testMethod,
rs.test_method testMethod, tr.test_result testResult
tr.test_result testResult from t_test_usecase tu
from left join t_test_scenario ts on tu.test_scenario_id = ts.id
t_test_usecase tu left join t_test_type tt on tu.test_type_id = tt.id
left join t_test_scenario ts on tu.test_scenario_id = ts.id left join t_review_standard rs on tu.review_standard_id = rs.id
left join t_test_type tt on tu.test_type_id = tt.id left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id
left join t_review_standard rs on tu.review_standard_id = rs.id left join t_task t on tsr.task_id = t.id
left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id left join t_model_test_task mtt on mtt.id = t.model_test_task_id
left join t_task t on tsr.task_id = t.id left join t_test_records tr on tu.case_id = tr.usecase_id
left join t_model_test_task mtt on mtt.id = t.model_test_task_id where mtt.id = #{id}
left join t_test_records tr on tu.case_id = tr.usecase_id group by tu.id, tu.case_id, ts.test_scenario, tt.test_type, tu.usecase_no, tu.name, tu.tools, tu.input,
where tu.description, tu.review_standard_id, rs.chapter, rs.text, rs.test_method, tr.test_result
mtt.id = #{id}
</select> </select>
<select id="selectOptionalUsecase" resultType="com.ruoyi.domain.vo.OptionalUseCasesVO"> <select id="selectOptionalUsecase" resultType="com.ruoyi.domain.vo.OptionalUseCasesVO">
......
...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysLogininforService; ...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysLogininforService;
/** /**
* 系统访问记录 * 系统访问记录
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
...@@ -35,7 +35,6 @@ public class SysLogininforController extends BaseController ...@@ -35,7 +35,6 @@ public class SysLogininforController extends BaseController
@Autowired @Autowired
private SysPasswordService passwordService; private SysPasswordService passwordService;
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysLogininfor logininfor) public TableDataInfo list(SysLogininfor logininfor)
{ {
...@@ -45,7 +44,6 @@ public class SysLogininforController extends BaseController ...@@ -45,7 +44,6 @@ public class SysLogininforController extends BaseController
} }
@Log(title = "登录日志", businessType = BusinessType.EXPORT) @Log(title = "登录日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SysLogininfor logininfor) public void export(HttpServletResponse response, SysLogininfor logininfor)
{ {
...@@ -54,7 +52,6 @@ public class SysLogininforController extends BaseController ...@@ -54,7 +52,6 @@ public class SysLogininforController extends BaseController
util.exportExcel(response, list, "登录日志"); util.exportExcel(response, list, "登录日志");
} }
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.DELETE) @Log(title = "登录日志", businessType = BusinessType.DELETE)
@DeleteMapping("/{infoIds}") @DeleteMapping("/{infoIds}")
public AjaxResult remove(@PathVariable Long[] infoIds) public AjaxResult remove(@PathVariable Long[] infoIds)
...@@ -62,7 +59,6 @@ public class SysLogininforController extends BaseController ...@@ -62,7 +59,6 @@ public class SysLogininforController extends BaseController
return toAjax(logininforService.deleteLogininforByIds(infoIds)); return toAjax(logininforService.deleteLogininforByIds(infoIds));
} }
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.CLEAN) @Log(title = "登录日志", businessType = BusinessType.CLEAN)
@DeleteMapping("/clean") @DeleteMapping("/clean")
public AjaxResult clean() public AjaxResult clean()
...@@ -71,7 +67,6 @@ public class SysLogininforController extends BaseController ...@@ -71,7 +67,6 @@ public class SysLogininforController extends BaseController
return success(); return success();
} }
@PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')")
@Log(title = "账户解锁", businessType = BusinessType.OTHER) @Log(title = "账户解锁", businessType = BusinessType.OTHER)
@GetMapping("/unlock/{userName}") @GetMapping("/unlock/{userName}")
public AjaxResult unlock(@PathVariable("userName") String userName) public AjaxResult unlock(@PathVariable("userName") String userName)
......
...@@ -21,7 +21,7 @@ import com.ruoyi.system.service.ISysOperLogService; ...@@ -21,7 +21,7 @@ import com.ruoyi.system.service.ISysOperLogService;
/** /**
* 操作日志记录 * 操作日志记录
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
...@@ -31,7 +31,6 @@ public class SysOperlogController extends BaseController ...@@ -31,7 +31,6 @@ public class SysOperlogController extends BaseController
@Autowired @Autowired
private ISysOperLogService operLogService; private ISysOperLogService operLogService;
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysOperLog operLog) public TableDataInfo list(SysOperLog operLog)
{ {
...@@ -41,7 +40,6 @@ public class SysOperlogController extends BaseController ...@@ -41,7 +40,6 @@ public class SysOperlogController extends BaseController
} }
@Log(title = "操作日志", businessType = BusinessType.EXPORT) @Log(title = "操作日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SysOperLog operLog) public void export(HttpServletResponse response, SysOperLog operLog)
{ {
...@@ -51,7 +49,6 @@ public class SysOperlogController extends BaseController ...@@ -51,7 +49,6 @@ public class SysOperlogController extends BaseController
} }
@Log(title = "操作日志", businessType = BusinessType.DELETE) @Log(title = "操作日志", businessType = BusinessType.DELETE)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/{operIds}") @DeleteMapping("/{operIds}")
public AjaxResult remove(@PathVariable Long[] operIds) public AjaxResult remove(@PathVariable Long[] operIds)
{ {
...@@ -59,7 +56,6 @@ public class SysOperlogController extends BaseController ...@@ -59,7 +56,6 @@ public class SysOperlogController extends BaseController
} }
@Log(title = "操作日志", businessType = BusinessType.CLEAN) @Log(title = "操作日志", businessType = BusinessType.CLEAN)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/clean") @DeleteMapping("/clean")
public AjaxResult clean() public AjaxResult clean()
{ {
......
...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysNoticeService; ...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysNoticeService;
/** /**
* 公告 信息操作处理 * 公告 信息操作处理
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
...@@ -35,7 +35,6 @@ public class SysNoticeController extends BaseController ...@@ -35,7 +35,6 @@ public class SysNoticeController extends BaseController
/** /**
* 获取通知公告列表 * 获取通知公告列表
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysNotice notice) public TableDataInfo list(SysNotice notice)
{ {
...@@ -47,7 +46,6 @@ public class SysNoticeController extends BaseController ...@@ -47,7 +46,6 @@ public class SysNoticeController extends BaseController
/** /**
* 根据通知公告编号获取详细信息 * 根据通知公告编号获取详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:query')")
@GetMapping(value = "/{noticeId}") @GetMapping(value = "/{noticeId}")
public AjaxResult getInfo(@PathVariable Long noticeId) public AjaxResult getInfo(@PathVariable Long noticeId)
{ {
...@@ -57,7 +55,6 @@ public class SysNoticeController extends BaseController ...@@ -57,7 +55,6 @@ public class SysNoticeController extends BaseController
/** /**
* 新增通知公告 * 新增通知公告
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:add')")
@Log(title = "通知公告", businessType = BusinessType.INSERT) @Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@Validated @RequestBody SysNotice notice) public AjaxResult add(@Validated @RequestBody SysNotice notice)
...@@ -69,7 +66,6 @@ public class SysNoticeController extends BaseController ...@@ -69,7 +66,6 @@ public class SysNoticeController extends BaseController
/** /**
* 修改通知公告 * 修改通知公告
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
@Log(title = "通知公告", businessType = BusinessType.UPDATE) @Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@Validated @RequestBody SysNotice notice) public AjaxResult edit(@Validated @RequestBody SysNotice notice)
...@@ -81,7 +77,6 @@ public class SysNoticeController extends BaseController ...@@ -81,7 +77,6 @@ public class SysNoticeController extends BaseController
/** /**
* 删除通知公告 * 删除通知公告
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
@Log(title = "通知公告", businessType = BusinessType.DELETE) @Log(title = "通知公告", businessType = BusinessType.DELETE)
@DeleteMapping("/{noticeIds}") @DeleteMapping("/{noticeIds}")
public AjaxResult remove(@PathVariable Long[] noticeIds) public AjaxResult remove(@PathVariable Long[] noticeIds)
......
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