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
cd6e9cf5
Commit
cd6e9cf5
authored
Sep 01, 2024
by
yuanshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标准内容库更新了界面布局,所以更新一个接口getReviewStandardList以及对应的实体类来提供使用
parent
329a9f4e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
183 additions
and
15 deletions
+183
-15
ReviewStandardMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
+13
-3
ReviewStandardService.java
...rc/main/java/com/ruoyi/service/ReviewStandardService.java
+6
-4
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+32
-7
ReviewStandardController.java
...src/main/java/com/ruoyi/web/ReviewStandardController.java
+12
-0
StandardListNewRequest.java
...in/java/com/ruoyi/web/request/StandardListNewRequest.java
+48
-0
ReviewStandardChapterListResponse.java
...ruoyi/web/response/ReviewStandardChapterListResponse.java
+21
-0
ReviewStandardListNewResponse.java
...com/ruoyi/web/response/ReviewStandardListNewResponse.java
+15
-0
StandardTypeListResponse.java
...java/com/ruoyi/web/response/StandardTypeListResponse.java
+19
-0
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+17
-1
No files found.
quality-review/src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
View file @
cd6e9cf5
...
@@ -6,9 +6,8 @@ import com.ruoyi.domain.ReviewStandard;
...
@@ -6,9 +6,8 @@ import com.ruoyi.domain.ReviewStandard;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.response.ReviewStandardListResponse
;
import
com.ruoyi.web.request.StandardListNewRequest
;
import
com.ruoyi.web.response.ReviewStandardResponse
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -39,4 +38,15 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
...
@@ -39,4 +38,15 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
// 根据要点列表查询标准列表
// 根据要点列表查询标准列表
List
<
ReviewStandard
>
findByKeyPointList
(
@Param
(
"keyPointList"
)
List
<
ReviewKeyPoint
>
keyPointList
,
@Param
(
"request"
)
ReviewFindListRequest
request
);
List
<
ReviewStandard
>
findByKeyPointList
(
@Param
(
"keyPointList"
)
List
<
ReviewKeyPoint
>
keyPointList
,
@Param
(
"request"
)
ReviewFindListRequest
request
);
/*
* 标准内容库新界面接口
* */
List
<
StandardTypeListResponse
>
findTypeByStandard
(
@Param
(
"request"
)
StandardListNewRequest
request
);
/*
* 标准内容库新界面接口
* */
List
<
ReviewStandardChapterListResponse
>
findChaptersByStandard
(
@Param
(
"request"
)
StandardListNewRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/ReviewStandardService.java
View file @
cd6e9cf5
...
@@ -2,10 +2,7 @@ package com.ruoyi.service;
...
@@ -2,10 +2,7 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.request.ReviewStandardSaveStandardUsecaseRequest
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.*
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -85,4 +82,9 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
...
@@ -85,4 +82,9 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* @return
* @return
*/
*/
List
<
UseCaseListResponse
>
getUseCaseList
(
String
request
)
throws
IOException
;
List
<
UseCaseListResponse
>
getUseCaseList
(
String
request
)
throws
IOException
;
/*
* 标准内容库新界面接口
* */
ReviewStandardListNewResponse
getListNew
(
StandardListNewRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
cd6e9cf5
...
@@ -17,10 +17,7 @@ import com.ruoyi.service.ReviewDetailsService;
...
@@ -17,10 +17,7 @@ import com.ruoyi.service.ReviewDetailsService;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.service.ReviewSceneService
;
import
com.ruoyi.service.ReviewSceneService
;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.request.ReviewStandardSaveStandardUsecaseRequest
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.*
;
import
okhttp3.*
;
import
okhttp3.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -28,9 +25,7 @@ import org.springframework.stereotype.Service;
...
@@ -28,9 +25,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Transactional
@Transactional
...
@@ -464,4 +459,34 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
...
@@ -464,4 +459,34 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
}
}
/*
* 标准内容库新界面接口
* */
@Override
public
ReviewStandardListNewResponse
getListNew
(
StandardListNewRequest
request
)
{
// 获取标准类型列表
List
<
StandardTypeListResponse
>
typeListResponses
=
reviewStandardMapper
.
findTypeByStandard
(
request
);
// 获取章节列表
List
<
ReviewStandardChapterListResponse
>
chapterList
=
reviewStandardMapper
.
findChaptersByStandard
(
request
);
// 去重类型列表,并为每种类型分配章节列表
Set
<
String
>
uniqueTypes
=
new
HashSet
<>();
List
<
StandardTypeListResponse
>
uniqueTypeList
=
typeListResponses
.
stream
()
.
filter
(
type
->
uniqueTypes
.
add
(
type
.
getType
()))
// 去重 type
.
peek
(
type
->
{
// 过滤并设置对应的章节列表
List
<
ReviewStandardChapterListResponse
>
filteredChapters
=
chapterList
.
stream
()
.
filter
(
chapter
->
chapter
.
getType
().
equals
(
type
.
getType
()))
// 这里使用 getType 方法
.
collect
(
Collectors
.
toList
());
type
.
setReviewStandardChapterListResponses
(
filteredChapters
);
})
.
collect
(
Collectors
.
toList
());
// 构建响应对象
ReviewStandardListNewResponse
response
=
new
ReviewStandardListNewResponse
();
response
.
setTypeList
(
uniqueTypeList
);
return
response
;
}
}
}
quality-review/src/main/java/com/ruoyi/web/ReviewStandardController.java
View file @
cd6e9cf5
...
@@ -152,4 +152,16 @@ public class ReviewStandardController extends BaseController {
...
@@ -152,4 +152,16 @@ public class ReviewStandardController extends BaseController {
return
getDataTable
(
reviewStandardService
.
getUseCaseList
(
request
));
return
getDataTable
(
reviewStandardService
.
getUseCaseList
(
request
));
}
}
/*
* 标准内容库新界面接口
* */
@ApiOperation
(
"标准内容库新界面接口"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getReviewStandardList"
,
produces
=
"application/json;charset=UTF-8"
)
public
R
<
ReviewStandardListNewResponse
>
getReviewStandardList
(
@RequestBody
StandardListNewRequest
request
){
ReviewStandardListNewResponse
response
=
reviewStandardService
.
getListNew
(
request
);
return
R
.
ok
(
response
);
}
}
}
quality-review/src/main/java/com/ruoyi/web/request/StandardListNewRequest.java
0 → 100644
View file @
cd6e9cf5
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
@ApiModel
(
value
=
"StandardListNewRequest"
,
description
=
"标准内容库新界面接口"
)
public
class
StandardListNewRequest
{
@ApiModelProperty
(
"标准id"
)
private
String
standardId
;
@ApiModelProperty
(
"标准编号"
)
private
String
standardNo
;
public
String
getStandardId
()
{
return
standardId
;
}
public
void
setStandardId
(
String
standardId
)
{
this
.
standardId
=
standardId
;
}
public
String
getStandardNo
()
{
return
standardNo
;
}
public
void
setStandardNo
(
String
standardNo
)
{
this
.
standardNo
=
standardNo
;
}
public
StandardListNewRequest
()
{
}
public
StandardListNewRequest
(
String
standardId
,
String
standardNo
)
{
this
.
standardId
=
standardId
;
this
.
standardNo
=
standardNo
;
}
@Override
public
String
toString
()
{
return
"StandardListNewRequest{"
+
"standardId='"
+
standardId
+
'\''
+
", standardNo='"
+
standardNo
+
'\''
+
'}'
;
}
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewStandardChapterListResponse.java
0 → 100644
View file @
cd6e9cf5
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"ReviewStandardChapterListResponse"
,
description
=
"标准内容库新界面接口"
)
public
class
ReviewStandardChapterListResponse
{
@ApiModelProperty
(
"标准号id"
)
private
String
standardId
;
@ApiModelProperty
(
"章节"
)
private
String
chapter
;
@ApiModelProperty
(
"章节内容"
)
private
String
text
;
@ApiModelProperty
(
"标准分类"
)
private
String
type
;
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewStandardListNewResponse.java
0 → 100644
View file @
cd6e9cf5
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"ReviewStandardListNewResponse"
,
description
=
"标准内容库新界面接口"
)
public
class
ReviewStandardListNewResponse
{
@ApiModelProperty
(
"标准分类集合"
)
private
List
<
StandardTypeListResponse
>
typeList
;
}
quality-review/src/main/java/com/ruoyi/web/response/StandardTypeListResponse.java
0 → 100644
View file @
cd6e9cf5
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"StandardTypeList"
,
description
=
"标准内容库新界面接口"
)
public
class
StandardTypeListResponse
{
@ApiModelProperty
(
"标准分类"
)
private
String
type
;
@ApiModelProperty
(
"章节集合"
)
private
List
<
ReviewStandardChapterListResponse
>
reviewStandardChapterListResponses
;
}
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
cd6e9cf5
...
@@ -97,7 +97,23 @@
...
@@ -97,7 +97,23 @@
and standard_id = #{request.standardId}
and standard_id = #{request.standardId}
and type = #{request.type}
and type = #{request.type}
</select>
</select>
<select
id=
"getListNew"
resultType=
"com.ruoyi.web.response.ReviewStandardListNewResponse"
>
select type,chapter
from t_review_standard
where standard_no = #{request.standardNo} and standard_id = #{request.standardId}
</select>
<select
id=
"findTypeByStandard"
resultType=
"com.ruoyi.web.response.StandardTypeListResponse"
>
SELECT DISTINCT type
FROM t_review_standard
WHERE standard_no = #{request.standardNo}
AND standard_id = #{request.standardId}
</select>
<select
id=
"findChaptersByStandard"
resultType=
"com.ruoyi.web.response.ReviewStandardChapterListResponse"
>
SELECT chapter, text, type ,standard_id as standardId
<!-- 添加 type 字段 -->
FROM t_review_standard
WHERE standard_no = #{request.standardNo}
AND standard_id = #{request.standardId}
</select>
</mapper>
</mapper>
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