Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
b9d65507
Commit
b9d65507
authored
Feb 22, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaoying' into 'dev'
Gaoying See merge request
!96
parents
138e1e7a
8de2cbc3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
89 additions
and
14 deletions
+89
-14
Sample.java
quality-review/src/main/java/com/ruoyi/domain/Sample.java
+4
-0
SampleTaskVo.java
...eview/src/main/java/com/ruoyi/domain/vo/SampleTaskVo.java
+18
-0
TaskSampleRelationMapper.java
.../main/java/com/ruoyi/mapper/TaskSampleRelationMapper.java
+6
-0
SampleManagementServiceImpl.java
...a/com/ruoyi/service/impl/SampleManagementServiceImpl.java
+31
-1
SampleManagementController.java
...c/main/java/com/ruoyi/web/SampleManagementController.java
+3
-2
TestScenarioController.java
...w/src/main/java/com/ruoyi/web/TestScenarioController.java
+6
-3
TestTypeController.java
...eview/src/main/java/com/ruoyi/web/TestTypeController.java
+8
-8
TaskSampleRelationMapper.xml
...ew/src/main/resources/mapper/TaskSampleRelationMapper.xml
+13
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/Sample.java
View file @
b9d65507
package
com
.
ruoyi
.
domain
;
package
com
.
ruoyi
.
domain
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
com.ruoyi.domain.vo.SampleTaskVo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -93,4 +95,6 @@ public class Sample extends BaseEntity
...
@@ -93,4 +95,6 @@ public class Sample extends BaseEntity
/** 车企名称 */
/** 车企名称 */
@ApiModelProperty
(
"车企名称"
)
@ApiModelProperty
(
"车企名称"
)
private
String
carCompanyName
;
private
String
carCompanyName
;
private
List
<
SampleTaskVo
>
taskSampleRelation
;
}
}
quality-review/src/main/java/com/ruoyi/domain/vo/SampleTaskVo.java
0 → 100644
View file @
b9d65507
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@ApiModel
(
description
=
"样品任务联查字段"
)
@AllArgsConstructor
@NoArgsConstructor
@Data
public
class
SampleTaskVo
{
private
Long
taskId
;
private
Long
SampleId
;
private
String
taskName
;
}
quality-review/src/main/java/com/ruoyi/mapper/TaskSampleRelationMapper.java
View file @
b9d65507
...
@@ -2,6 +2,7 @@ package com.ruoyi.mapper;
...
@@ -2,6 +2,7 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.domain.vo.SampleTaskVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -16,4 +17,9 @@ public interface TaskSampleRelationMapper extends BaseMapper<TaskSampleRelation>
...
@@ -16,4 +17,9 @@ public interface TaskSampleRelationMapper extends BaseMapper<TaskSampleRelation>
* @return
* @return
*/
*/
List
<
TaskSampleRelation
>
selectByTaskId
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"flag"
)
String
flag
);
List
<
TaskSampleRelation
>
selectByTaskId
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"flag"
)
String
flag
);
/**
* 根据样品id查询*/
List
<
SampleTaskVo
>
selectTaskBysampleId
(
@Param
(
"idList"
)
List
<
Long
>
idList
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/SampleManagementServiceImpl.java
View file @
b9d65507
package
com
.
ruoyi
.
service
.
impl
;
package
com
.
ruoyi
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
@@ -7,7 +8,9 @@ import com.ruoyi.common.exception.ServiceException;
...
@@ -7,7 +8,9 @@ import com.ruoyi.common.exception.ServiceException;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.domain.vo.SampleTaskVo
;
import
com.ruoyi.mapper.SampleManagementMapper
;
import
com.ruoyi.mapper.SampleManagementMapper
;
import
com.ruoyi.mapper.TaskSampleRelationMapper
;
import
com.ruoyi.service.SampleManagementService
;
import
com.ruoyi.service.SampleManagementService
;
import
com.ruoyi.web.request.SampleManagementRequest
;
import
com.ruoyi.web.request.SampleManagementRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -27,6 +30,9 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
...
@@ -27,6 +30,9 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
@Autowired
@Autowired
private
SampleManagementMapper
sampleManagementMapper
;
private
SampleManagementMapper
sampleManagementMapper
;
@Autowired
private
TaskSampleRelationMapper
taskSampleRelationMapper
;
/**
/**
* 查询样品管理
* 查询样品管理
*
*
...
@@ -48,7 +54,11 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
...
@@ -48,7 +54,11 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
@Override
@Override
public
List
<
Sample
>
selectSampleManagementList
(
SampleManagementRequest
sampleManagementRequest
)
public
List
<
Sample
>
selectSampleManagementList
(
SampleManagementRequest
sampleManagementRequest
)
{
{
return
sampleManagementMapper
.
selectSampleManagementList
(
sampleManagementRequest
);
List
<
Sample
>
list
=
sampleManagementMapper
.
selectSampleManagementList
(
sampleManagementRequest
);
if
(
list
.
size
()>
0
){
setSampleTask
(
list
);
}
return
list
;
}
}
/**
/**
...
@@ -106,4 +116,24 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
...
@@ -106,4 +116,24 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
public
List
<
Sample
>
selectSampleList
(
SampleManagementRequest
sampleManagementRequest
){
public
List
<
Sample
>
selectSampleList
(
SampleManagementRequest
sampleManagementRequest
){
return
sampleManagementMapper
.
selectSampleList
(
sampleManagementRequest
);
return
sampleManagementMapper
.
selectSampleList
(
sampleManagementRequest
);
}
}
/**
* 给样品的数据赋值任务集合*/
public
void
setSampleTask
(
List
<
Sample
>
sampleList
){
List
<
Long
>
listId
=
new
ArrayList
<>();
for
(
Sample
sample
:
sampleList
){
listId
.
add
(
sample
.
getId
());
}
List
<
SampleTaskVo
>
sampleTaskVoList
=
taskSampleRelationMapper
.
selectTaskBysampleId
(
listId
);
for
(
Sample
sample
:
sampleList
){
List
<
SampleTaskVo
>
sampleTaskVos
=
new
ArrayList
<>();
for
(
SampleTaskVo
sampleTaskVo
:
sampleTaskVoList
){
if
(
sampleTaskVo
.
getSampleId
().
equals
(
sample
.
getId
())){
sampleTaskVos
.
add
(
sampleTaskVo
);
}
}
sample
.
setTaskSampleRelation
(
sampleTaskVos
);
}
}
}
}
quality-review/src/main/java/com/ruoyi/web/SampleManagementController.java
View file @
b9d65507
...
@@ -42,11 +42,12 @@ public class SampleManagementController extends BaseController
...
@@ -42,11 +42,12 @@ public class SampleManagementController extends BaseController
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/list"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/list"
)
public
TableDataInfo
list
(
@Validated
@RequestBody
SampleManagementRequest
request
)
public
TableDataInfo
<
Sample
>
list
(
@Validated
@RequestBody
SampleManagementRequest
request
)
{
{
startPage
();
startPage
(
request
);
List
<
Sample
>
list
=
sampleManagementService
.
selectSampleManagementList
(
request
);
List
<
Sample
>
list
=
sampleManagementService
.
selectSampleManagementList
(
request
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
/**
...
...
quality-review/src/main/java/com/ruoyi/web/TestScenarioController.java
View file @
b9d65507
...
@@ -7,6 +7,7 @@ import com.ruoyi.domain.Sample;
...
@@ -7,6 +7,7 @@ import com.ruoyi.domain.Sample;
import
com.ruoyi.domain.TestScenario
;
import
com.ruoyi.domain.TestScenario
;
import
com.ruoyi.service.ITestScenarioService
;
import
com.ruoyi.service.ITestScenarioService
;
import
com.ruoyi.web.request.TestScenarioRequest
;
import
com.ruoyi.web.request.TestScenarioRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
...
@@ -20,10 +21,12 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -20,10 +21,12 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.List
;
import
java.util.List
;
@Api
(
tags
=
"测试场景"
)
@RestController
@RestController
@RequestMapping
(
"/system/scenario"
)
@RequestMapping
(
"/system/scenario"
)
public
class
TestScenarioController
extends
BaseController
{
public
class
TestScenarioController
extends
BaseController
{
@Autowired
@Autowired
private
ITestScenarioService
testScenarioService
;
private
ITestScenarioService
testScenarioService
;
...
@@ -34,8 +37,8 @@ public class TestScenarioController extends BaseController {
...
@@ -34,8 +37,8 @@ public class TestScenarioController extends BaseController {
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getList"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getList"
)
public
TableDataInfo
list
(
@Validated
@RequestBody
TestScenarioRequest
testScenarioRequest
){
public
TableDataInfo
<
TestScenario
>
list
(
@Validated
@RequestBody
TestScenarioRequest
testScenarioRequest
){
startPage
();
startPage
(
testScenarioRequest
);
List
<
TestScenario
>
list
=
testScenarioService
.
selectTestScenarioList
(
testScenarioRequest
);
List
<
TestScenario
>
list
=
testScenarioService
.
selectTestScenarioList
(
testScenarioRequest
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/TestTypeController.java
View file @
b9d65507
...
@@ -3,11 +3,10 @@ package com.ruoyi.web;
...
@@ -3,11 +3,10 @@ package com.ruoyi.web;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.controller.BaseController
;
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.domain.TestScenario
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.service.ITestTypeService
;
import
com.ruoyi.service.ITestTypeService
;
import
com.ruoyi.web.request.TestScenarioRequest
;
import
com.ruoyi.web.request.TestTypeRequest
;
import
com.ruoyi.web.request.TestTypeRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
...
@@ -21,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -21,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.List
;
import
java.util.List
;
@Api
(
tags
=
"测试类型"
)
@RestController
@RestController
@RequestMapping
(
"/system/type"
)
@RequestMapping
(
"/system/type"
)
public
class
TestTypeController
extends
BaseController
{
public
class
TestTypeController
extends
BaseController
{
...
@@ -28,22 +28,22 @@ public class TestTypeController extends BaseController {
...
@@ -28,22 +28,22 @@ public class TestTypeController extends BaseController {
private
ITestTypeService
testTypeService
;
private
ITestTypeService
testTypeService
;
/**
/**
*
测试场景
分页
*
查询测试类型
分页
*/
*/
@ApiOperation
(
"查询测试
场景
分页查询"
)
@ApiOperation
(
"查询测试
类型
分页查询"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getList"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getList"
)
public
TableDataInfo
list
(
@Validated
@RequestBody
TestTypeRequest
testTypeRequest
){
public
TableDataInfo
<
TestType
>
list
(
@Validated
@RequestBody
TestTypeRequest
testTypeRequest
){
startPage
();
startPage
(
testTypeRequest
);
List
<
TestType
>
list
=
testTypeService
.
selectTestTypeList
(
testTypeRequest
);
List
<
TestType
>
list
=
testTypeService
.
selectTestTypeList
(
testTypeRequest
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
/**
*
测试场景
列表不分页
*
查询测试类型
列表不分页
*/
*/
@ApiOperation
(
"查询测试
场景
"
)
@ApiOperation
(
"查询测试
类型
"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getListAll"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getListAll"
)
...
...
quality-review/src/main/resources/mapper/TaskSampleRelationMapper.xml
View file @
b9d65507
...
@@ -25,4 +25,17 @@
...
@@ -25,4 +25,17 @@
</if>
</if>
</select>
</select>
<select
id=
"selectTaskBysampleId"
resultType=
"com.ruoyi.domain.vo.SampleTaskVo"
>
SELECT
relation.sample_id,
relation.task_id,
task.NAME As taskName
FROM
t_task_sample_relation relation
LEFT JOIN t_task task ON task.id = relation.task_id
WHERE relation.sample_id IN
<foreach
item=
"id"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment