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
5ee9c279
Commit
5ee9c279
authored
Mar 07, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评审所需查询
parent
264abdef
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
232 additions
and
2 deletions
+232
-2
ReviewDetailsMapper.java
...w/src/main/java/com/ruoyi/mapper/ReviewDetailsMapper.java
+7
-0
ReviewKeyPointMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewKeyPointMapper.java
+7
-0
ReviewSceneMapper.java
...iew/src/main/java/com/ruoyi/mapper/ReviewSceneMapper.java
+7
-0
ReviewStandardMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
+5
-0
ReviewSceneService.java
...w/src/main/java/com/ruoyi/service/ReviewSceneService.java
+3
-0
ReviewStandardService.java
...rc/main/java/com/ruoyi/service/ReviewStandardService.java
+7
-0
ReviewSceneServiceImpl.java
...n/java/com/ruoyi/service/impl/ReviewSceneServiceImpl.java
+7
-0
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+64
-0
ReviewSceneController.java
...ew/src/main/java/com/ruoyi/web/ReviewSceneController.java
+37
-0
ReviewStandardController.java
...src/main/java/com/ruoyi/web/ReviewStandardController.java
+18
-0
ReviewFindListRequest.java
...ain/java/com/ruoyi/web/request/ReviewFindListRequest.java
+2
-2
ReviewSceneFindListRequest.java
...ava/com/ruoyi/web/request/ReviewSceneFindListRequest.java
+18
-0
ReviewDetailsMapper.xml
...-review/src/main/resources/mapper/ReviewDetailsMapper.xml
+13
-0
ReviewKeyPointMapper.xml
...review/src/main/resources/mapper/ReviewKeyPointMapper.xml
+15
-0
ReviewSceneMapper.xml
...ty-review/src/main/resources/mapper/ReviewSceneMapper.xml
+13
-0
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+9
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/ReviewDetailsMapper.java
View file @
5ee9c279
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -20,4 +21,10 @@ public interface ReviewDetailsMapper extends BaseMapper<ReviewDetails> {
List
<
ReviewDetails
>
findNoResult
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"type"
)
String
type
);
Long
count
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"type"
)
String
type
);
// 根据要点id查询细则列表
List
<
ReviewDetails
>
findByKeyPointId
(
@Param
(
"keyPointId"
)
Long
keyPointId
);
// 查询细则列表
List
<
ReviewDetails
>
findDetailsList
(
ReviewFindListRequest
request
);
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewKeyPointMapper.java
View file @
5ee9c279
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -13,4 +15,9 @@ public interface ReviewKeyPointMapper extends BaseMapper<ReviewKeyPoint> {
List
<
ReviewKeyPoint
>
findByStandardList
(
@Param
(
"reviewStandardList"
)
List
<
ReviewStandard
>
reviewStandardList
);
// 条件查询要点列表
List
<
ReviewKeyPoint
>
findKeyPointList
(
ReviewFindListRequest
request
);
// 根据细则列表查询要点列表
List
<
ReviewKeyPoint
>
findByDetailsList
(
@Param
(
"detailsList"
)
List
<
ReviewDetails
>
detailsList
);
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewSceneMapper.java
View file @
5ee9c279
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.web.request.ReviewSceneFindListRequest
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -12,4 +13,10 @@ import java.util.List;
@Repository
public
interface
ReviewSceneMapper
extends
BaseMapper
<
ReviewScene
>
{
List
<
ReviewScene
>
findByDetailsList
(
@Param
(
"reviewDetailsList"
)
List
<
ReviewDetails
>
reviewDetailsList
);
// 根据细则id查询场景列表
List
<
ReviewScene
>
findByDetailId
(
@Param
(
"detailId"
)
Long
detailId
);
// 查询场景列表
List
<
ReviewScene
>
findList
(
ReviewSceneFindListRequest
request
);
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
View file @
5ee9c279
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.response.ReviewStandardListResponse
;
...
...
@@ -34,4 +36,7 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
List
<
ReviewStandardTestInspectionContentResponse
>
selectTestInspectionContent
(
Long
id
);
List
<
ReviewStandardListResponse
>
findReviewStandardList
(
ReviewStandardListRequest
request
);
// 根据要点列表查询标准列表
List
<
ReviewStandard
>
findByKeyPointList
(
@Param
(
"keyPointList"
)
List
<
ReviewKeyPoint
>
keyPointList
,
@Param
(
"request"
)
ReviewFindListRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewSceneService.java
View file @
5ee9c279
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.web.request.ReviewSceneFindListRequest
;
import
java.util.List
;
...
...
@@ -22,4 +23,6 @@ public interface ReviewSceneService extends IService<ReviewScene> {
*/
void
change
(
ReviewSceneChangeTask
reviewSceneChangeTask
);
List
<
ReviewScene
>
findList
(
ReviewSceneFindListRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewStandardService.java
View file @
5ee9c279
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
...
...
@@ -52,4 +53,10 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* @return
*/
List
<
ReviewStandardListResponse
>
findReviewStandardList
(
ReviewStandardListRequest
request
);
// 标准-要点
List
<
ReviewStandard
>
findKeyPointList
(
ReviewFindListRequest
request
);
// 标准-要点-细则
List
<
ReviewStandard
>
findDetailsList
(
ReviewFindListRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneServiceImpl.java
View file @
5ee9c279
...
...
@@ -6,6 +6,7 @@ import com.ruoyi.domain.ReviewScene;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.service.ReviewSceneService
;
import
com.ruoyi.web.request.ReviewSceneFindListRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -32,4 +33,10 @@ public class ReviewSceneServiceImpl extends ServiceImpl<ReviewSceneMapper, Revie
String
operation
=
reviewSceneChangeTask
.
getOperation
();
strategyReviewSceneChangeContext
.
getResource
(
operation
).
doChange
(
reviewSceneChangeTask
);
}
@Override
public
List
<
ReviewScene
>
findList
(
ReviewSceneFindListRequest
request
)
{
return
reviewSceneMapper
.
findList
(
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
5ee9c279
...
...
@@ -3,8 +3,11 @@ package com.ruoyi.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewStandardMapper
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.request.ReviewFindListRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.ReviewStandardListRequest
;
import
com.ruoyi.web.response.ReviewStandardInspectionContentResponse
;
...
...
@@ -35,6 +38,12 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
@Autowired
private
ReviewStandardMapper
reviewStandardMapper
;
@Autowired
private
ReviewKeyPointMapper
reviewKeyPointMapper
;
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
/**
* 查询所有审查 标准、要点、细则、场景 并组织成树状结构返回
* @param standardId 关联到标准库中的id
...
...
@@ -105,6 +114,32 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
return
reviewStandardMapper
.
findReviewStandardList
(
request
);
}
// 标准-要点
@Override
public
List
<
ReviewStandard
>
findKeyPointList
(
ReviewFindListRequest
request
)
{
List
<
ReviewKeyPoint
>
keyPointList
=
reviewKeyPointMapper
.
findKeyPointList
(
request
);
List
<
ReviewStandard
>
standardList
=
reviewStandardMapper
.
findByKeyPointList
(
keyPointList
,
request
);
return
onlyBuildStandard
(
standardList
,
keyPointList
);
}
// 标准-要点-细则
@Override
public
List
<
ReviewStandard
>
findDetailsList
(
ReviewFindListRequest
request
)
{
List
<
ReviewDetails
>
detailsList
=
reviewDetailsMapper
.
findDetailsList
(
request
);
List
<
ReviewKeyPoint
>
keyPointList
=
reviewKeyPointMapper
.
findByDetailsList
(
detailsList
);
List
<
ReviewStandard
>
standardList
=
reviewStandardMapper
.
findByKeyPointList
(
keyPointList
,
request
);
List
<
ReviewKeyPoint
>
keyPointListTree
=
buildKeyPoint
(
keyPointList
,
detailsList
);
return
buildStandard
(
standardList
,
keyPointListTree
);
}
/**
* 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中
* @param reviewStandardList
...
...
@@ -289,4 +324,33 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
return
reviewStandardList
;
}
/**
* 构建负责关系 - 只构建 审查标准&审查要点
* @param reviewStandardList
* @param reviewKeyPointList
* @return
*/
private
List
<
ReviewStandard
>
onlyBuildStandard
(
List
<
ReviewStandard
>
reviewStandardList
,
List
<
ReviewKeyPoint
>
reviewKeyPointList
)
{
for
(
ReviewStandard
reviewStandard
:
reviewStandardList
)
{
Long
standardId
=
reviewStandard
.
getId
();
List
<
ReviewKeyPoint
>
children
=
new
ArrayList
<>();
for
(
ReviewKeyPoint
reviewKeyPoint
:
reviewKeyPointList
)
{
if
(
reviewKeyPoint
.
getReviewStandardId
().
equals
(
standardId
))
{
children
.
add
(
reviewKeyPoint
);
}
}
if
(
children
.
size
()
>
0
)
{
reviewStandard
.
setKeyPointList
(
children
);
}
}
return
reviewStandardList
;
}
}
quality-review/src/main/java/com/ruoyi/web/Review
KeyPoint
Controller.java
→
quality-review/src/main/java/com/ruoyi/web/Review
Scene
Controller.java
View file @
5ee9c279
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.web.request.KeyPointFindListRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.service.ReviewSceneService
;
import
com.ruoyi.web.request.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
...
...
@@ -13,26 +13,25 @@ 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.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
@Api
(
tags
=
"审查要点"
)
@Api
(
tags
=
"审查场景"
)
@RestController
@RequestMapping
(
"/review/
keypoint
"
)
public
class
Review
KeyPoint
Controller
extends
BaseController
{
@RequestMapping
(
"/review/
scene
"
)
public
class
Review
Scene
Controller
extends
BaseController
{
@Autowired
private
ReviewKeyPointService
reviewKeyPointService
;
private
ReviewSceneService
reviewSceneService
;
@ApiOperation
(
"查询审查
要点
"
)
@ApiOperation
(
"查询审查
场景列表
"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findKeyPointList"
)
public
TableDataInfo
<
ReviewStandard
>
findKeyPointList
(
@Validated
@RequestBody
KeyPointFindListRequest
request
)
{
// return getDataTable(reviewKeyPointService.findKeyPointList(request));
return
null
;
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findSceneList"
)
public
TableDataInfo
<
ReviewScene
>
findSceneList
(
@Validated
@RequestBody
ReviewSceneFindListRequest
request
)
{
return
getDataTable
(
reviewSceneService
.
findList
(
request
));
}
}
quality-review/src/main/java/com/ruoyi/web/ReviewStandardController.java
View file @
5ee9c279
...
...
@@ -79,4 +79,22 @@ public class ReviewStandardController extends BaseController {
public
TableDataInfo
<
ReviewStandardListResponse
>
findReviewStandardList
(
@Validated
@RequestBody
ReviewStandardListRequest
request
)
{
return
getDataTable
(
reviewStandardService
.
findReviewStandardList
(
request
));
}
// 标准-要点
@ApiOperation
(
"查询审查要点列表"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findKeyPointList"
)
public
TableDataInfo
<
ReviewStandard
>
findKeyPointList
(
@Validated
@RequestBody
ReviewFindListRequest
request
)
{
return
getDataTable
(
reviewStandardService
.
findKeyPointList
(
request
));
}
// 标准-要点-细则
@ApiOperation
(
"查询审查细则列表"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findDetailsList"
)
public
TableDataInfo
<
ReviewStandard
>
findDetailsList
(
@Validated
@RequestBody
ReviewFindListRequest
request
)
{
return
getDataTable
(
reviewStandardService
.
findDetailsList
(
request
));
}
}
quality-review/src/main/java/com/ruoyi/web/request/
KeyPoint
FindListRequest.java
→
quality-review/src/main/java/com/ruoyi/web/request/
Review
FindListRequest.java
View file @
5ee9c279
...
...
@@ -7,9 +7,9 @@ import lombok.Data;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
@ApiModel
(
value
=
"
KeyPointFindListRequest"
,
description
=
"查询审查要点
"
)
@ApiModel
(
value
=
"
ReviewFindListRequest"
,
description
=
"查询审查参数
"
)
@Data
public
class
KeyPoint
FindListRequest
{
public
class
Review
FindListRequest
{
@ApiModelProperty
(
"审查要点"
)
private
String
text
;
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneFindListRequest.java
0 → 100644
View file @
5ee9c279
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"ReviewSceneFindListRequest"
,
description
=
"查询审查场景"
)
@Data
public
class
ReviewSceneFindListRequest
{
@ApiModelProperty
(
"细则id"
)
private
Long
detailId
;
@ApiModelProperty
(
"场景内容"
)
private
String
text
;
}
quality-review/src/main/resources/mapper/ReviewDetailsMapper.xml
View file @
5ee9c279
...
...
@@ -30,4 +30,17 @@
INNER JOIN t_review_standard trs ON trs.id = trk.review_standard_id
WHERE trs.type = #{type}), 1) AS resultOverSum
</select>
<select
id=
"findByKeyPointId"
resultType=
"com.ruoyi.domain.ReviewDetails"
>
SELECT id, text, review_keypoint_id FROM t_review_details
WHERE review_keypoint_id = #{keyPointId}
</select>
<select
id=
"findDetailsList"
resultType=
"com.ruoyi.domain.ReviewDetails"
>
SELECT id, text, review_keypoint_id
FROM t_review_details
<where>
<if
test=
"text != null and text != ''"
>
text like concat('%',#{text},'%')
</if>
</where>
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewKeyPointMapper.xml
View file @
5ee9c279
...
...
@@ -11,5 +11,20 @@
#{standard.id}
</foreach>
</select>
<select
id=
"findKeyPointList"
resultType=
"com.ruoyi.domain.ReviewKeyPoint"
>
SELECT id, text, review_standard_id FROM t_review_keypoint
<where>
<if
test=
"text != null and text != ''"
>
and text like concat('%',#{text},'%')
</if>
</where>
</select>
<select
id=
"findByDetailsList"
resultType=
"com.ruoyi.domain.ReviewKeyPoint"
>
SELECT id, text, review_standard_id FROM t_review_keypoint
WHERE id IN
<foreach
collection=
"detailsList"
item=
"detail"
open=
"("
separator=
","
close=
")"
>
#{detail.reviewKeypointId}
</foreach>
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewSceneMapper.xml
View file @
5ee9c279
...
...
@@ -13,4 +13,17 @@
</foreach>
</select>
<select
id=
"findByDetailId"
resultType=
"com.ruoyi.domain.ReviewScene"
>
SELECT id, text, review_details_id FROM t_review_scene
WHERE review_details_id = #{detailId}
</select>
<select
id=
"findList"
resultType=
"com.ruoyi.domain.ReviewScene"
>
SELECT id, text, review_details_id FROM t_review_scene
<where>
review_details_id = #{detailId}
<if
test=
"text != null and text != ''"
>
and text like concat('%', #{text}, '%')
</if>
</where>
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
5ee9c279
...
...
@@ -80,6 +80,15 @@
</if>
</where>
</select>
<select
id=
"findByKeyPointList"
resultType=
"com.ruoyi.domain.ReviewStandard"
>
SELECT id, chapter, text FROM t_review_standard
WHERE id IN
<foreach
collection=
"keyPointList"
item=
"keyPoint"
open=
"("
separator=
","
close=
")"
>
#{keyPoint.reviewStandardId}
</foreach>
and standard_id = #{request.standardId}
and type = #{request.type}
</select>
</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