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
9e6848ee
Commit
9e6848ee
authored
Jan 05, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into wangdingyi
parents
f745ca00
00a26db3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
7 deletions
+33
-7
ReviewStandard.java
...review/src/main/java/com/ruoyi/domain/ReviewStandard.java
+13
-0
ReviewStandardMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
+4
-0
ReviewStandardService.java
...rc/main/java/com/ruoyi/service/ReviewStandardService.java
+1
-1
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+6
-2
StrategySystemReviewTaskNew.java
...a/com/ruoyi/service/impl/StrategySystemReviewTaskNew.java
+1
-1
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+1
-1
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+5
-0
ReviewStandardTest.java
ruoyi-admin/src/test/java/com/ruoyi/ReviewStandardTest.java
+2
-2
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewStandard.java
View file @
9e6848ee
...
...
@@ -18,6 +18,9 @@ import java.util.List;
@Data
public
class
ReviewStandard
{
public
static
final
String
TYPE_SYSTEM
=
"system"
;
// 体系审查类型
public
static
final
String
TYPE_CAR
=
"car"
;
// 车型审查类型
/**
* 主键
*/
...
...
@@ -25,6 +28,12 @@ public class ReviewStandard {
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
id
;
/**
* 检查类型[system(体系审查)、car(车型审查)]
*/
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)]"
)
private
String
type
;
/**
* 章节
*/
...
...
@@ -48,21 +57,25 @@ public class ReviewStandard {
/**
* 关联标准表id
*/
@ApiModelProperty
(
"关联标准表id"
)
private
Long
standardId
;
/**
* 标准名称
*/
@ApiModelProperty
(
"标准名称"
)
private
String
name
;
/**
* 标准号
*/
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
/**
* 文件路径
*/
@ApiModelProperty
(
"文件路径"
)
private
String
file
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
View file @
9e6848ee
...
...
@@ -2,10 +2,14 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.ReviewStandard
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
ReviewStandardMapper
extends
BaseMapper
<
ReviewStandard
>
{
List
<
ReviewStandard
>
findListByStandardIdAndType
(
@Param
(
"standardId"
)
Long
standardId
,
@Param
(
"type"
)
String
type
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewStandardService.java
View file @
9e6848ee
...
...
@@ -9,6 +9,6 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
void
initData
(
List
<
ReviewStandard
>
reviewStandardList
);
List
<
ReviewStandard
>
findTree
();
List
<
ReviewStandard
>
findTree
(
Long
standardId
,
String
type
);
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
9e6848ee
...
...
@@ -26,14 +26,18 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
@Autowired
private
ReviewSceneService
reviewSceneService
;
@Autowired
private
ReviewStandardMapper
reviewStandardMapper
;
/**
* 查询所有审查 标准、要点、细则、场景 并组织成树状结构返回
* @param standardId 关联到标准库中的id
* @param type 问卷类型[system(体系审查),car(车型审查)]
* @return
*/
public
List
<
ReviewStandard
>
findTree
()
{
public
List
<
ReviewStandard
>
findTree
(
Long
standardId
,
String
type
)
{
List
<
ReviewStandard
>
reviewStandardList
=
list
(
);
// 查询审查标准
List
<
ReviewStandard
>
reviewStandardList
=
reviewStandardMapper
.
findListByStandardIdAndType
(
standardId
,
type
);
// 查询审查标准
List
<
ReviewKeyPoint
>
reviewKeyPointList
=
reviewKeyPointService
.
findByStandardList
(
reviewStandardList
);
// 查询审查要点
List
<
ReviewDetails
>
reivewDetailsList
=
reviewDetailsService
.
findByKeyPointsList
(
reviewKeyPointList
);
// 查询审查细则
List
<
ReviewScene
>
reviewSceneList
=
reviewSceneService
.
findByDetailsList
(
reivewDetailsList
);
// 查询审查场景
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskNew.java
View file @
9e6848ee
...
...
@@ -52,7 +52,7 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask {
public
SystemReviewTaskViewResponse
doView
(
SystemReviewTask
systemReviewTask
)
{
// 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
();
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
systemReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_SYSTEM
);
// 将问卷赋值到任务
systemReviewTask
.
setStandard
(
standardTree
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
9e6848ee
...
...
@@ -63,7 +63,7 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
public
SystemReviewTaskViewResponse
doView
(
SystemReviewTask
systemReviewTask
)
{
// 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
();
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
systemReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_SYSTEM
);
// 获取当前问卷答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
systemReviewTask
.
getId
());
...
...
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
9e6848ee
...
...
@@ -7,6 +7,7 @@
<resultMap
id=
"StandardTreeResultMap"
type=
"com.ruoyi.domain.ReviewStandard"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"type"
column=
"type"
jdbcType=
"VARBINARY"
/>
<result
property=
"chapter"
column=
"chapter"
jdbcType=
"VARCHAR"
/>
<result
property=
"text"
column=
"text"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardId"
column=
"standard_id"
jdbcType=
"BIGINT"
/>
...
...
@@ -25,5 +26,9 @@
SELECT id, chapter, text, standard_id, name, standard_no, file FROM t_review_standard;
</select>
<select
id=
"findListByStandardIdAndType"
resultType=
"com.ruoyi.domain.ReviewStandard"
>
SELECT id, type, chapter, text, standard_id, name, standard_no, file FROM t_review_standard WHERE standard_id = #{standardId} AND type = #{type};
</select>
</mapper>
ruoyi-admin/src/test/java/com/ruoyi/ReviewStandardTest.java
View file @
9e6848ee
...
...
@@ -17,7 +17,7 @@ public class ReviewStandardTest {
@Test
public
void
converterTest
()
{
String
json
=
"[{\"id\":
\"\",\"chapter\":\"5.1\",\"text\":\"车辆制造商应具备车辆全生命周期的汽车信息安全管理体系。注:车辆全生命周期包括车辆的开发阶段、生产阶段及后生产阶段。\",\"keyPointList\":[{\"id\":\"\",\"text\":\"车辆制造商是否建立汽车信息安全管理制度。\",\"reviewDetailsList\":[{\"id\":\"\",\"text\":\"车辆制造商是否能够提供/展示汽车信息安全管理制度正式发布的证明材料。\",\"reviewSceneList\":[{\"id\":\"\",\"text\":\"1.管理制度发布会红头文件\"},{\"id\":\"\",\"text\":\"2.管理制度正式发布会议纪要\"},{\"id\":\"\",\"text\":\"3.专用系统正式发布流程或记录\"}]}]}]},{\"id\":\"\",\"chapter\":\"5.2\",\"text\":\"汽车信息安全管理体系应包括以下内容。建立企业内部管理汽车信息安全的过程。\",\"keyPointList\":[{\"id\":\"\",\"text\":\"车辆制造商汽车信息安全管理制度是否建立并明确汽车信息安全管理制度的组织架构及权责。\",\"reviewDetailsList\":[{\"id\":\"\",\"text\":\"车辆制造商汽车信息安全管理制度的角色应覆盖车辆/车辆产品在生命周期中的信息安全活动。\",\"reviewSceneList\":[{\"id\":\"\",\"text\":\"1.汽车信息安全管理制度或其配套的流程文件中包含流程图,定义了信息安全活动及对应的角色,并有角色的权责定义。\"}]},{\"id\":\"\",\"text\":\"车辆制造商汽车信息安全管理制度的角色应与车辆制造商的组织架构匹配。\",\"reviewSceneList\":[{\"id\":\"\",\"text\":\"1.汽车信息安全管理制度中定义的角色与车辆制造商的组织架构岗位名称一致。\"},{\"id\":\"\",\"text\":\"2.汽车信息安全管理制度中定义的角色与车辆制造商的组织架构岗位有映射关系。\"}]}]},{\"id\":\"\",\"text\":\"车辆制造商汽车信息安全管理制度是否明确为保障汽车信息安全需求实现和维持所投入的资源。\",\"reviewDetailsList\":[{\"id\":\"\",\"text\":\"车辆制造商应提供在信息安全方面提供资源支持的证明材料,包括投入的场地、基础软硬件设备、技术人员和资金等。\",\"reviewSceneList\":[{\"id\":\"\",\"text\":\"1.典型的资源要求为人力投入,例如负责网络安全风险管理的人员、研发人员和事件管理响应人员。\"}]}]},{\"id\":\"\",\"text\":\"车辆制造商汽车信息安全管理制度是否明确与其它管理流程(如QMS、ISMS)的适配性。\",\"reviewDetailsList\":[{\"id\":\"\",\"text\":\"车辆制造商应提供信息安全管理制度在建设实施中与企业其他管理流程相适配的证明材料。\",\"reviewSceneList\":[{\"id\":\"\",\"text\":\"1.明确信息安全管理要求融合到现有管理制度流程中,如在现有ISMS制度中增加汽车信息安全管理要求。\"},{\"id\":\"\",\"text\":\"2.在信息安全管理制度中明确与其它管理流程的接口。\"}]}]}]
}]"
;
String
json
=
"[{\"id\":
1735216941104238592,\"type\":\"system\",\"chapter\":\"5.1\",\"text\":\"车辆制造商应具备车辆全生命周期的汽车信息安全管理体系。注:车辆全生命周期包括车辆的开发阶段、生产阶段及后生产阶段。\",\"keyPointList\":[{\"id\":1735216941104238593,\"text\":\"车辆制造商是否建立汽车信息安全管理制度。\",\"reviewStandardId\":1735216941104238592,\"reviewDetailsList\":[{\"id\":1735216941104238594,\"text\":\"车辆制造商是否能够提供/展示汽车信息安全管理制度正式发布的证明材料。\",\"reviewKeypointId\":1735216941104238593,\"reviewSceneList\":[{\"id\":1735216941104238595,\"text\":\"1.管理制度发布会红头文件\",\"reviewDetailsId\":1735216941104238594},{\"id\":1735217011274944512,\"text\":\"2.管理制度正式发布会议纪要\",\"reviewDetailsId\":1735216941104238594},{\"id\":1735217022993829888,\"text\":\"3.专用系统正式发布流程或记录\",\"reviewDetailsId\":1735216941104238594},{\"id\":1737393098847203330,\"text\":\"修改一个场景\",\"reviewDetailsId\":1735216941104238594}]}]}],\"standardId\":1,\"name\":\"汽车整车信息安全技术要求-报批稿\",\"standardNo\":\"---\",\"file\":\"/vehicle-quality-review-oss/2024/01/04/汽车整车信息安全技术要求-报批稿_20240104170818A002.pdf\"},{\"id\":1735217023899799552,\"type\":\"system\",\"chapter\":\"5.2\",\"text\":\"汽车信息安全管理体系应包括以下内容。建立企业内部管理汽车信息安全的过程。\",\"keyPointList\":[{\"id\":1735217023899799553,\"text\":\"车辆制造商汽车信息安全管理制度是否建立并明确汽车信息安全管理制度的组织架构及权责。\",\"reviewStandardId\":1735217023899799552,\"reviewDetailsList\":[{\"id\":1735217023899799554,\"text\":\"车辆制造商汽车信息安全管理制度的角色应覆盖车辆/车辆产品在生命周期中的信息安全活动。\",\"reviewKeypointId\":1735217023899799553,\"reviewSceneList\":[{\"id\":1735217023899799555,\"text\":\"1.汽车信息安全管理制度或其配套的流程文件中包含流程图,定义了信息安全活动及对应的角色,并有角色的权责定义。\",\"reviewDetailsId\":1735217023899799554}]},{\"id\":1735217024327618560,\"text\":\"车辆制造商汽车信息安全管理制度的角色应与车辆制造商的组织架构匹配。\",\"reviewKeypointId\":1735217023899799553,\"reviewSceneList\":[{\"id\":1735217024327618561,\"text\":\"1.汽车信息安全管理制度中定义的角色与车辆制造商的组织架构岗位名称一致。\",\"reviewDetailsId\":1735217024327618560},{\"id\":1735217024608636928,\"text\":\"2.汽车信息安全管理制度中定义的角色与车辆制造商的组织架构岗位有映射关系。\",\"reviewDetailsId\":1735217024327618560}]}]},{\"id\":1735217025212616704,\"text\":\"车辆制造商汽车信息安全管理制度是否明确为保障汽车信息安全需求实现和维持所投入的资源。\",\"reviewStandardId\":1735217023899799552,\"reviewDetailsList\":[{\"id\":1735217025212616705,\"text\":\"车辆制造商应提供在信息安全方面提供资源支持的证明材料,包括投入的场地、基础软硬件设备、技术人员和资金等。\",\"reviewKeypointId\":1735217025212616704,\"reviewSceneList\":[{\"id\":1735217025212616706,\"text\":\"1.典型的资源要求为人力投入,例如负责网络安全风险管理的人员、研发人员和事件管理响应人员。\",\"reviewDetailsId\":1735217025212616705}]}]},{\"id\":1735217025887899648,\"text\":\"车辆制造商汽车信息安全管理制度是否明确与其它管理流程(如QMS、ISMS)的适配性。\",\"reviewStandardId\":1735217023899799552,\"reviewDetailsList\":[{\"id\":1735217025887899649,\"text\":\"车辆制造商应提供信息安全管理制度在建设实施中与企业其他管理流程相适配的证明材料。\",\"reviewKeypointId\":1735217025887899648,\"reviewSceneList\":[{\"id\":1735217025887899650,\"text\":\"1.明确信息安全管理要求融合到现有管理制度流程中,如在现有ISMS制度中增加汽车信息安全管理要求。\",\"reviewDetailsId\":1735217025887899649},{\"id\":1735217026223443968,\"text\":\"2.在信息安全管理制度中明确与其它管理流程的接口。\",\"reviewDetailsId\":1735217025887899649}]}]}],\"standardId\":1,\"name\":\"汽车整车信息安全技术要求-报批稿\",\"standardNo\":\"---\",\"file\":\"/vehicle-quality-review-oss/2024/01/04/汽车整车信息安全技术要求-报批稿_20240104170818A002.pdf\"
}]"
;
List
<
ReviewStandard
>
list
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
json
),
ReviewStandard
.
class
);
reviewStandardService
.
initData
(
list
);
...
...
@@ -27,7 +27,7 @@ public class ReviewStandardTest {
@Test
public
void
findTreeTest
()
{
List
<
ReviewStandard
>
tree
=
reviewStandardService
.
findTree
();
List
<
ReviewStandard
>
tree
=
reviewStandardService
.
findTree
(
1L
,
ReviewStandard
.
TYPE_SYSTEM
);
System
.
out
.
println
(
JSONUtil
.
toJsonPrettyStr
(
tree
));
}
...
...
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