Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
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
中汽研标准应用数据库
car-database-api
Commits
dfdcac44
Commit
dfdcac44
authored
Aug 30, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指定检测方案
parent
3db9d149
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
230 additions
and
0 deletions
+230
-0
TestObjectData.java
...review/src/main/java/com/ruoyi/domain/TestObjectData.java
+34
-0
TestPlanRecord.java
...review/src/main/java/com/ruoyi/domain/TestPlanRecord.java
+47
-0
TestObjectDataMapper.java
.../src/main/java/com/ruoyi/mapper/TestObjectDataMapper.java
+16
-0
TestObjectDataService.java
...rc/main/java/com/ruoyi/service/TestObjectDataService.java
+11
-0
TestObjectDataServiceImpl.java
...ava/com/ruoyi/service/impl/TestObjectDataServiceImpl.java
+24
-0
TestObjectDataController.java
...src/main/java/com/ruoyi/web/TestObjectDataController.java
+49
-0
TestPlanRecordRequest.java
...ain/java/com/ruoyi/web/request/TestPlanRecordRequest.java
+26
-0
TestObjectDataMapper.xml
...review/src/main/resources/mapper/TestObjectDataMapper.xml
+23
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/TestObjectData.java
0 → 100644
View file @
dfdcac44
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author gaoying
*/
@Data
@ApiModel
(
value
=
"t_test_object_data"
,
description
=
"指定检测方案"
)
public
class
TestObjectData
{
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
id
;
@ApiModelProperty
(
"类型"
)
private
String
type
;
@ApiModelProperty
(
"对象"
)
private
String
object
;
@ApiModelProperty
(
"描述"
)
private
String
describe
;
@ApiModelProperty
(
"用例编号"
)
private
String
useCaseNo
;
@ApiModelProperty
(
"排序"
)
private
int
sort
;
}
quality-review/src/main/java/com/ruoyi/domain/TestPlanRecord.java
0 → 100644
View file @
dfdcac44
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@ApiModel
@TableName
(
value
=
"t_test_plan_record"
)
@Data
public
class
TestPlanRecord
extends
BaseEntity
{
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
@ApiModelProperty
(
"被检车企"
)
private
String
inspectCarCompany
;
@ApiModelProperty
(
"被检车企id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
inspectCarCompanyId
;
@ApiModelProperty
(
"车辆型号"
)
private
String
carModel
;
@ApiModelProperty
(
"检测方案生成时间"
)
private
Date
generationTime
;
@ApiModelProperty
(
"检测机构"
)
private
String
testOrganization
;
@ApiModelProperty
(
"文件路径"
)
private
String
fileUrl
;
@ApiModelProperty
(
"测试结果"
)
private
String
testResult
;
}
quality-review/src/main/java/com/ruoyi/mapper/TestObjectDataMapper.java
0 → 100644
View file @
dfdcac44
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.TestObjectData
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
TestObjectDataMapper
extends
BaseMapper
<
TestObjectData
>
{
public
List
<
TestObjectData
>
selectTestObjectDataList
();
}
quality-review/src/main/java/com/ruoyi/service/TestObjectDataService.java
0 → 100644
View file @
dfdcac44
package
com
.
ruoyi
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.TestObjectData
;
import
java.util.List
;
public
interface
TestObjectDataService
extends
IService
<
TestObjectData
>
{
List
<
TestObjectData
>
selectTestObjectDataList
();
}
quality-review/src/main/java/com/ruoyi/service/impl/TestObjectDataServiceImpl.java
0 → 100644
View file @
dfdcac44
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.TestObjectData
;
import
com.ruoyi.mapper.TestObjectDataMapper
;
import
com.ruoyi.service.TestObjectDataService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Service
@Transactional
public
class
TestObjectDataServiceImpl
extends
ServiceImpl
<
TestObjectDataMapper
,
TestObjectData
>
implements
TestObjectDataService
{
@Autowired
private
TestObjectDataMapper
testObjectDataMapper
;
@Override
public
List
<
TestObjectData
>
selectTestObjectDataList
(){
return
testObjectDataMapper
.
selectTestObjectDataList
();
}
}
quality-review/src/main/java/com/ruoyi/web/TestObjectDataController.java
0 → 100644
View file @
dfdcac44
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.domain.TestObjectData
;
import
com.ruoyi.service.TestObjectDataService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Api
(
tags
=
"制定检测方案"
)
@RestController
@RequestMapping
(
"/Object/Data"
)
public
class
TestObjectDataController
{
@Autowired
private
TestObjectDataService
testObjectDataService
;
@ApiOperation
(
"获取制定方案列表"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getList"
)
public
R
<
List
>
SelectTestObjectDataList
(){
List
<
TestObjectData
>
objectList
=
testObjectDataService
.
selectTestObjectDataList
();
Map
<
String
,
List
<
TestObjectData
>>
groupedObject
=
objectList
.
stream
()
.
sorted
(
Comparator
.
comparingInt
(
TestObjectData:
:
getSort
)).
collect
(
Collectors
.
groupingBy
(
TestObjectData:
:
getDescribe
));
List
list
=
new
ArrayList
<>();
groupedObject
.
forEach
((
key
,
value
)->{
Map
map
=
new
HashMap
();
map
.
put
(
"describe"
,
value
.
get
(
0
).
getDescribe
());
map
.
put
(
"type"
,
value
.
get
(
0
).
getType
());
Map
mapObj
=
new
HashMap
();
mapObj
.
put
(
"options"
,
value
);
map
.
put
(
"componentProps"
,
mapObj
);
list
.
add
(
map
);
});
return
R
.
ok
(
list
);
}
}
quality-review/src/main/java/com/ruoyi/web/request/TestPlanRecordRequest.java
0 → 100644
View file @
dfdcac44
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author gaoying
*/
@Data
@ApiModel
(
value
=
"TestPlanRecordRequest"
,
description
=
"检测方案记录分页查询"
)
public
class
TestPlanRecordRequest
extends
PageDomain
{
@ApiModelProperty
(
"被检车企"
)
private
String
inspectCarCompany
;
@ApiModelProperty
(
"车辆型号"
)
private
String
carModel
;
@ApiModelProperty
(
"标准要求id"
)
private
Long
keyPointId
;
@ApiModelProperty
(
"文件路径"
)
private
String
fileUrl
;
}
quality-review/src/main/resources/mapper/TestObjectDataMapper.xml
0 → 100644
View file @
dfdcac44
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.TestObjectDataMapper"
>
<resultMap
type=
"com.ruoyi.domain.TestObjectData"
id=
"TestObjectData"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"object"
column=
"object"
/>
<result
property=
"describe"
column=
"describe"
/>
<result
property=
"useCaseNo"
column=
"use_case_no"
/>
<result
property=
"sort"
column=
"sort"
/>
</resultMap>
<sql
id=
"TestObjectDataVo"
>
select * from t_test_object_data order by sort asc
</sql>
<select
id=
"selectTestObjectDataList"
parameterType=
"com.ruoyi.domain.TestObjectData"
>
<include
refid=
"TestObjectDataVo"
/>
</select>
</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