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
90ce24af
Commit
90ce24af
authored
Mar 08, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into gaoying
parents
8a856380
369ab8d4
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
516 additions
and
53 deletions
+516
-53
ReviewDetails.java
...-review/src/main/java/com/ruoyi/domain/ReviewDetails.java
+2
-0
ReviewKeyPoint.java
...review/src/main/java/com/ruoyi/domain/ReviewKeyPoint.java
+2
-0
ReviewSceneChangeTask.java
...src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
+2
-2
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+14
-8
CarReviewTaskMapper.java
...w/src/main/java/com/ruoyi/mapper/CarReviewTaskMapper.java
+2
-0
ReviewDetailsMapper.java
...w/src/main/java/com/ruoyi/mapper/ReviewDetailsMapper.java
+7
-0
ReviewDetailsResultMapper.java
...main/java/com/ruoyi/mapper/ReviewDetailsResultMapper.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
SystemReviewTaskMapper.java
...rc/main/java/com/ruoyi/mapper/SystemReviewTaskMapper.java
+2
-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
ReviewSceneChangeTaskServiceImpl.java
.../ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
+7
-2
ReviewSceneServiceImpl.java
...n/java/com/ruoyi/service/impl/ReviewSceneServiceImpl.java
+7
-0
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+64
-0
ReviewTaskInboxServiceImpl.java
...va/com/ruoyi/service/impl/ReviewTaskInboxServiceImpl.java
+21
-8
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+1
-0
StrategyReviewSceneChangeAdd.java
.../com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
+50
-8
StrategyReviewSceneChangeDelete.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
+74
-1
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+1
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+18
-10
TaskStateAdapter.java
...rc/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
+3
-1
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
+3
-3
ReviewSceneChangeTaskCreateRequest.java
...ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
+6
-0
ReviewSceneFindListRequest.java
...ava/com/ruoyi/web/request/ReviewSceneFindListRequest.java
+18
-0
ReviewSceneChangeTaskResponse.java
...com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
+2
-2
AutomobileEnterpriseMapper.xml
.../src/main/resources/mapper/AutomobileEnterpriseMapper.xml
+7
-6
CarReviewTaskMapper.xml
...-review/src/main/resources/mapper/CarReviewTaskMapper.xml
+9
-0
ReviewDetailsMapper.xml
...-review/src/main/resources/mapper/ReviewDetailsMapper.xml
+13
-0
ReviewDetailsResultMapper.xml
...w/src/main/resources/mapper/ReviewDetailsResultMapper.xml
+11
-0
ReviewKeyPointMapper.xml
...review/src/main/resources/mapper/ReviewKeyPointMapper.xml
+15
-0
ReviewSceneChangeTaskMapper.xml
...src/main/resources/mapper/ReviewSceneChangeTaskMapper.xml
+2
-2
ReviewSceneMapper.xml
...ty-review/src/main/resources/mapper/ReviewSceneMapper.xml
+13
-0
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+9
-0
SystemReviewTaskMapper.xml
...view/src/main/resources/mapper/SystemReviewTaskMapper.xml
+9
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+2
-0
BeanUtils.java
.../src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java
+29
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewDetails.java
View file @
90ce24af
...
...
@@ -11,6 +11,7 @@ import lombok.AllArgsConstructor;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
...
...
@@ -19,6 +20,7 @@ import java.util.List;
*/
@ApiModel
@TableName
(
value
=
"t_review_details"
)
@Accessors
(
chain
=
true
)
@Data
@Builder
@NoArgsConstructor
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewKeyPoint.java
View file @
90ce24af
...
...
@@ -11,6 +11,7 @@ import lombok.AllArgsConstructor;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
...
...
@@ -19,6 +20,7 @@ import java.util.List;
*/
@ApiModel
@TableName
(
value
=
"t_review_keypoint"
)
@Accessors
(
chain
=
true
)
@Data
@Builder
@NoArgsConstructor
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
View file @
90ce24af
...
...
@@ -77,8 +77,8 @@ public class ReviewSceneChangeTask {
@ApiModelProperty
(
"检验标准id"
)
private
String
inspectStandardId
;
@ApiModelProperty
(
"检验标准
名称
"
)
private
String
inspectStandardN
ame
;
@ApiModelProperty
(
"检验标准
号
"
)
private
String
inspectStandardN
o
;
/**
* 章节
...
...
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
90ce24af
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.StandardJsonTypeHandler
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -62,10 +59,12 @@ public class Task {
@ApiModelProperty
(
"体系审查任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@TableField
(
insertStrategy
=
FieldStrategy
.
IGNORED
,
updateStrategy
=
FieldStrategy
.
IGNORED
,
whereStrategy
=
FieldStrategy
.
IGNORED
)
private
Long
systemReviewTaskId
;
@ApiModelProperty
(
"车辆检查任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@TableField
(
insertStrategy
=
FieldStrategy
.
IGNORED
,
updateStrategy
=
FieldStrategy
.
IGNORED
,
whereStrategy
=
FieldStrategy
.
IGNORED
)
private
Long
carReviewTaskId
;
@ApiModelProperty
(
"任务状态NEW(新建的)、PENDING(运行中的)、FINISH(已结束的)、TEMPORARILY(暂存)"
)
...
...
@@ -174,10 +173,17 @@ public class Task {
public
String
getNextNode
()
{
String
[]
split
=
taskList
.
split
(
","
);
if
(
pointer
+
1
>
maxPointer
)
{
return
null
;
}
else
{
return
split
[
pointer
+
1
];
if
(
pointer
<
split
.
length
)
{
return
split
[
pointer
];
}
return
null
;
}
public
void
setSystemReviewTaskIdNull
(){
this
.
systemReviewTaskId
=
null
;
}
public
void
setCarReviewTaskIdNull
()
{
this
.
carReviewTaskId
=
null
;
}
}
quality-review/src/main/java/com/ruoyi/mapper/CarReviewTaskMapper.java
View file @
90ce24af
...
...
@@ -19,6 +19,8 @@ public interface CarReviewTaskMapper extends BaseMapper<CarReviewTask> {
List
<
CarReviewTask
>
findListByReviewStatus
(
@Param
(
"reviewStatus"
)
String
reviewStatus
);
List
<
CarReviewTask
>
findListByTaskStatus
(
@Param
(
"taskStatus"
)
String
taskStatus
);
List
<
CarReviewTask
>
findByDetailsResult
(
@Param
(
"detailId"
)
Long
detailId
);
}
...
...
quality-review/src/main/java/com/ruoyi/mapper/ReviewDetailsMapper.java
View file @
90ce24af
...
...
@@ -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/ReviewDetailsResultMapper.java
View file @
90ce24af
package
com
.
ruoyi
.
mapper
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewDetailsResult
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -26,6 +27,12 @@ public interface ReviewDetailsResultMapper extends BaseMapper<ReviewDetailsResul
* @return
*/
Long
findNotPass
(
@Param
(
"taskId"
)
Long
taskId
);
// 根据细则列表查询结果
List
<
ReviewDetailsResult
>
findByDetailsList
(
@Param
(
"reviewDetailsList"
)
List
<
ReviewDetails
>
reviewDetailsList
);
// 根据细则id查询结果
List
<
ReviewDetailsResult
>
findByDetailsId
(
@Param
(
"detailsId"
)
Long
detailsId
);
}
...
...
quality-review/src/main/java/com/ruoyi/mapper/ReviewKeyPointMapper.java
View file @
90ce24af
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 @
90ce24af
...
...
@@ -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 @
90ce24af
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/mapper/SystemReviewTaskMapper.java
View file @
90ce24af
...
...
@@ -13,4 +13,6 @@ public interface SystemReviewTaskMapper extends BaseMapper<SystemReviewTask> {
// 查询处理中的任务
List
<
SystemReviewTask
>
findListInProcess
();
List
<
SystemReviewTask
>
findByDetailsResult
(
@Param
(
"detailId"
)
Long
detailId
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewSceneService.java
View file @
90ce24af
...
...
@@ -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 @
90ce24af
...
...
@@ -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/ReviewSceneChangeTaskServiceImpl.java
View file @
90ce24af
...
...
@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author wangfei
...
...
@@ -145,8 +146,12 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
// 更新审核标准
reviewSceneService
.
change
(
task
);
// 通知受影响的问卷
reviewTaskInboxService
.
saveNotify
(
taskId
,
task
.
getType
());
//场景变更时发送信息
if
(
Objects
.
equals
(
task
.
getOperationSort
(),
"ADD_SCENE"
)
||
Objects
.
equals
(
task
.
getOperationSort
(),
"DELETE_SCENE"
))
{
// 通知受影响的问卷
reviewTaskInboxService
.
saveNotify
(
taskId
,
task
.
getType
());
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneServiceImpl.java
View file @
90ce24af
...
...
@@ -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 @
90ce24af
...
...
@@ -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/service/impl/ReviewTaskInboxServiceImpl.java
View file @
90ce24af
...
...
@@ -3,11 +3,11 @@ package com.ruoyi.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.domain.SystemReviewTask
;
import
com.ruoyi.domain.ReviewTaskInbox
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.CarReviewTaskMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
com.ruoyi.service.ReviewTaskInboxService
;
import
com.ruoyi.mapper.ReviewTaskInboxMapper
;
import
com.ruoyi.service.SystemReviewTaskService
;
...
...
@@ -37,6 +37,15 @@ public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMappe
@Autowired
private
ReviewTaskInboxMapper
reviewTaskInboxMapper
;
@Autowired
private
ReviewSceneChangeTaskService
reviewSceneChangeTaskService
;
@Autowired
private
SystemReviewTaskMapper
systemReviewTaskMapper
;
@Autowired
private
CarReviewTaskMapper
carReviewTaskMapper
;
/**
* 保存场景变更对进行中的问卷产生的影响,用于提醒问卷使用者场景发生了变更。
* 体系审查任务、侧性审查任务分别查询不同的表
...
...
@@ -71,8 +80,10 @@ public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMappe
public
void
doSaveNotifyByCarReview
(
Long
reviewSceneChangeTaskId
)
{
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务)
List
<
CarReviewTask
>
pendingTasks
=
carReviewTaskService
.
findListByStatus
(
CarReviewTask
.
TASK_STATUS_PENDING
);
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务 且回答过的)
ReviewSceneChangeTask
reviewSceneChangeTask
=
reviewSceneChangeTaskService
.
getById
(
reviewSceneChangeTaskId
);
List
<
CarReviewTask
>
pendingTasks
=
carReviewTaskMapper
.
findByDetailsResult
(
reviewSceneChangeTask
.
getDetailsId
());
// 构建并保存提醒消息
List
<
ReviewTaskInbox
>
inboxes
=
new
ArrayList
();
...
...
@@ -89,8 +100,10 @@ public class ReviewTaskInboxServiceImpl extends ServiceImpl<ReviewTaskInboxMappe
public
void
doSaveNotifyBySystemReview
(
Long
reviewSceneChangeTaskId
)
{
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务)
List
<
SystemReviewTask
>
pendingTasks
=
systemReviewTaskService
.
findListByStatus
(
SystemReviewTask
.
STATUS_PENDING
);
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务 且回答过的)
ReviewSceneChangeTask
reviewSceneChangeTask
=
reviewSceneChangeTaskService
.
getById
(
reviewSceneChangeTaskId
);
List
<
SystemReviewTask
>
pendingTasks
=
systemReviewTaskMapper
.
findByDetailsResult
(
reviewSceneChangeTask
.
getDetailsId
());
// 构建并保存提醒消息
List
<
ReviewTaskInbox
>
inboxes
=
new
ArrayList
();
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
90ce24af
...
...
@@ -111,6 +111,7 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
// 构建返回结果
CarReviewTaskViewResponse
response
=
new
CarReviewTaskViewResponse
();
carReviewTask
.
setImagesUrl
(
"/vehicle-quality-review-oss/2024/03/04/qianzi1_20240304104011A001.jpg,/vehicle-quality-review-oss/2024/03/04/qianzi2_20240304104121A002.jpg"
);
response
.
setCarReviewTask
(
carReviewTask
);
response
.
setReviewSceneChangeTasks
(
lastChanges
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
View file @
90ce24af
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
...
...
@@ -11,6 +15,8 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Objects
;
@Transactional
@Service
public
class
StrategyReviewSceneChangeAdd
implements
StrategyReviewSceneChange
,
InitializingBean
{
...
...
@@ -26,6 +32,12 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
@Autowired
private
ReviewSceneChangeTaskService
reviewSceneChangeTaskService
;
@Autowired
private
ReviewKeyPointMapper
reviewKeyPointMapper
;
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
/**
* 新增审查场景
* @param reviewSceneChangeTask
...
...
@@ -33,15 +45,45 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
@Override
public
void
doChange
(
ReviewSceneChangeTask
reviewSceneChangeTask
)
{
// 保存新增的场景
ReviewScene
reviewScene
=
new
ReviewScene
()
.
setText
(
reviewSceneChangeTask
.
getNewText
())
.
setReviewDetailsId
(
reviewSceneChangeTask
.
getDetailsId
());
reviewSceneMapper
.
insert
(
reviewScene
);
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"ADD_SCENE"
))
{
// 保存新增的场景
ReviewScene
reviewScene
=
new
ReviewScene
()
.
setText
(
reviewSceneChangeTask
.
getNewText
())
.
setReviewDetailsId
(
reviewSceneChangeTask
.
getDetailsId
());
reviewSceneMapper
.
insert
(
reviewScene
);
// 为场景变更任务的 场景关联id字段赋值
reviewSceneChangeTask
.
setReviewSceneId
(
reviewScene
.
getId
());
reviewSceneChangeTaskService
.
updateById
(
reviewSceneChangeTask
);
}
// 保存新增的要点
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"ADD_KEYPOINT"
))
{
// 要点
ReviewKeyPoint
reviewKeyPoint
=
new
ReviewKeyPoint
()
.
setText
(
reviewSceneChangeTask
.
getKeypoint
())
.
setReviewStandardId
(
reviewSceneChangeTask
.
getStandardId
());
reviewKeyPointMapper
.
insert
(
reviewKeyPoint
);
// 细则
ReviewDetails
reviewDetails
=
new
ReviewDetails
()
.
setText
(
reviewSceneChangeTask
.
getDetails
())
.
setReviewKeypointId
(
reviewKeyPoint
.
getId
());
reviewDetailsMapper
.
insert
(
reviewDetails
);
}
// 保存新增的细则
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"ADD_DETAILS"
))
{
// 细则
ReviewDetails
reviewDetails
=
new
ReviewDetails
()
.
setText
(
reviewSceneChangeTask
.
getDetails
())
.
setReviewKeypointId
(
reviewSceneChangeTask
.
getKeypointId
());
reviewDetailsMapper
.
insert
(
reviewDetails
);
}
// 为场景变更任务的 场景关联id字段赋值
reviewSceneChangeTask
.
setReviewSceneId
(
reviewScene
.
getId
());
reviewSceneChangeTaskService
.
updateById
(
reviewSceneChangeTask
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
View file @
90ce24af
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewDetailsResult
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.service.ReviewDetailsService
;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneService
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -9,6 +18,9 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Objects
;
@Transactional
@Service
public
class
StrategyReviewSceneChangeDelete
implements
StrategyReviewSceneChange
,
InitializingBean
{
...
...
@@ -21,9 +33,70 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
@Autowired
private
ReviewSceneService
reviewSceneService
;
@Autowired
private
ReviewKeyPointService
reviewKeyPointService
;
@Autowired
private
ReviewDetailsService
reviewDetailsService
;
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
@Autowired
private
ReviewSceneMapper
reviewSceneMapper
;
@Autowired
private
ReviewDetailsResultMapper
reviewDetailsResultMapper
;
@Override
public
void
doChange
(
ReviewSceneChangeTask
reviewSceneChangeTask
)
{
reviewSceneService
.
removeById
(
reviewSceneChangeTask
.
getReviewSceneId
());
// 删除场景
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"DELETE_SCENE"
))
{
reviewSceneService
.
removeById
(
reviewSceneChangeTask
.
getReviewSceneId
());
}
// 删除要点
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"DELETE_KEYPOINT"
))
{
// 删除要点
reviewKeyPointService
.
removeById
(
reviewSceneChangeTask
.
getKeypointId
());
// 删除包含的细则
List
<
ReviewDetails
>
reviewDetailsList
=
reviewDetailsMapper
.
findByKeyPointId
(
reviewSceneChangeTask
.
getKeypointId
());
if
(
reviewDetailsList
!=
null
&&
reviewDetailsList
.
size
()
!=
0
)
{
reviewDetailsService
.
removeBatchByIds
(
reviewDetailsList
);
}
// 删除细则对应的结果
List
<
ReviewDetailsResult
>
resultList
=
reviewDetailsResultMapper
.
findByDetailsList
(
reviewDetailsList
);
if
(
resultList
!=
null
&&
resultList
.
size
()
!=
0
)
{
reviewDetailsResultMapper
.
deleteBatchIds
(
resultList
);
}
// 删除包含的场景
List
<
ReviewScene
>
reviewScenesList
=
reviewSceneService
.
findByDetailsList
(
reviewDetailsList
);
if
(
reviewScenesList
!=
null
&&
reviewScenesList
.
size
()
!=
0
)
{
reviewSceneService
.
removeBatchByIds
(
reviewScenesList
);
}
}
// 删除细则
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"DELETE_DETAILS"
))
{
// 删除细则
reviewDetailsService
.
removeById
(
reviewSceneChangeTask
.
getDetailsId
());
// 删除细则对应的结果
List
<
ReviewDetailsResult
>
resultList
=
reviewDetailsResultMapper
.
findByDetailsId
(
reviewSceneChangeTask
.
getDetailsId
());
if
(
resultList
!=
null
&&
resultList
.
size
()
!=
0
)
{
reviewDetailsResultMapper
.
deleteBatchIds
(
resultList
);
}
// 删除包含的场景
List
<
ReviewScene
>
reviewScenesList
=
reviewSceneMapper
.
findByDetailId
(
reviewSceneChangeTask
.
getDetailsId
());
if
(
reviewScenesList
!=
null
&&
reviewScenesList
.
size
()
!=
0
)
{
reviewSceneService
.
removeBatchByIds
(
reviewScenesList
);
}
}
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
90ce24af
...
...
@@ -153,6 +153,7 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
// 构建返回结果
SystemReviewTaskViewResponse
response
=
new
SystemReviewTaskViewResponse
();
systemReviewTask
.
setImagesUrl
(
"/vehicle-quality-review-oss/2024/03/04/qianzi1_20240304104011A001.jpg,/vehicle-quality-review-oss/2024/03/04/qianzi2_20240304104121A002.jpg"
);
response
.
setSystemReviewTask
(
systemReviewTask
);
response
.
setReviewSceneChangeTasks
(
lastChanges
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
90ce24af
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.DataStatisticsUtils
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
...
...
@@ -212,38 +214,44 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 构建并保存任务信息
// 总任务
Task
task
=
new
Task
(
);
Task
task
=
taskMapper
.
selectById
(
request
.
getId
()
);
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeader
(
leader
.
getName
());
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
task
.
setTaskList
(
joinTaskList
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
Task
oldTask
=
taskMapper
.
selectById
(
request
.
getId
());
if
(
task
.
getTaskStatus
()
==
Task
.
TASK_STATUS_NEW
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldT
ask
.
getCarReviewTaskId
()
==
null
)
{
if
(
Objects
.
equals
(
task
.
getTaskStatus
(),
Task
.
TASK_STATUS_NEW
)
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
t
ask
.
getCarReviewTaskId
()
==
null
)
{
// 保存车型审查问卷任务
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
task
.
setCarReviewTaskId
(
saveCarReview
(
createRequest
,
initiator
,
standard
,
leader
));
}
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldTask
.
getCarReviewTaskId
()
!=
null
)
{
carReviewTaskMapper
.
deleteById
(
oldTask
.
getCarReviewTaskId
());
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
task
.
getCarReviewTaskId
()
!=
null
)
{
carReviewTaskMapper
.
deleteById
(
task
.
getCarReviewTaskId
());
task
.
setCarReviewTaskIdNull
();
}
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldT
ask
.
getSystemReviewTaskId
()
==
null
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
t
ask
.
getSystemReviewTaskId
()
==
null
)
{
// 保存体系审查任务
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
task
.
setSystemReviewTaskId
(
saveSystemReview
(
createRequest
,
initiator
,
standard
,
leader
));
}
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldTask
.
getSystemReviewTaskId
()
!=
null
)
{
systemReviewTaskMapper
.
deleteById
(
oldTask
.
getSystemReviewTaskId
());
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
task
.
getSystemReviewTaskId
()
!=
null
)
{
systemReviewTaskMapper
.
deleteById
(
task
.
getSystemReviewTaskId
());
task
.
setSystemReviewTaskIdNull
();
}
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
}
task
.
setMaxPointer
(
request
.
getTaskList
().
size
());
taskService
.
updateById
(
task
);
// 构建并保存该任务所关联的审核组信息
List
<
TaskUserRelation
>
list
=
taskUserRelationService
.
selectQTeamMembers
(
request
.
getId
());
taskUserRelationService
.
removeBatchByIds
(
list
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
View file @
90ce24af
...
...
@@ -39,7 +39,9 @@ public abstract class TaskStateAdapter implements TaskState {
throw
new
ServiceException
(
"已没有可执行的子任务节点"
,
HttpStatus
.
ERROR
);
}
task
.
setPointer
(
task
.
getPointer
()
+
1
);
if
(
task
.
getPointer
()
+
1
<=
task
.
getMaxPointer
()
)
{
task
.
setPointer
(
task
.
getPointer
()
+
1
);
}
taskService
.
updateById
(
task
);
}
...
...
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 @
90ce24af
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 @
90ce24af
...
...
@@ -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 @
90ce24af
...
...
@@ -7,11 +7,11 @@ 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
(
"审查
要点
"
)
@ApiModelProperty
(
"审查
内容
"
)
private
String
text
;
@ApiModelProperty
(
"总标准ID"
)
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
View file @
90ce24af
...
...
@@ -8,6 +8,12 @@ import lombok.Data;
@Data
public
class
ReviewSceneChangeTaskCreateRequest
{
@ApiModelProperty
(
"检验标准id"
)
private
String
inspectStandardId
;
@ApiModelProperty
(
"检验标准名称"
)
private
String
inspectStandardNo
;
/**
* 章节
*/
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneFindListRequest.java
0 → 100644
View file @
90ce24af
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/java/com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
View file @
90ce24af
...
...
@@ -25,8 +25,8 @@ public class ReviewSceneChangeTaskResponse {
@ApiModelProperty
(
"检验标准id"
)
private
String
inspectStandardId
;
@ApiModelProperty
(
"检验标准
名称
"
)
private
String
inspectStandardN
ame
;
@ApiModelProperty
(
"检验标准
号
"
)
private
String
inspectStandardN
o
;
/**
* 章节
...
...
quality-review/src/main/resources/mapper/AutomobileEnterpriseMapper.xml
View file @
90ce24af
...
...
@@ -53,17 +53,18 @@
resultMap=
"AutomobileEnterpriseResult"
>
<include
refid=
"selectAutomobileEnterpriseListSQL"
/>
<where>
deleted = 0
<if
test=
"enterpriseName != null and enterpriseName != ''"
>
and enterprise_name like concat('%',
ae.
deleted = 0
<if
test=
"enterpriseName != null and enterpriseName != ''"
>
and
ae.
enterprise_name like concat('%',
#{enterpriseName}, '%')
</if>
<if
test=
"address != null and address != ''"
>
and address like concat('%', #{address}, '%')
</if>
<if
test=
"postcode != null and postcode != ''"
>
and postcode like concat('%', #{postcode}, '%')
</if>
<if
test=
"address != null and address != ''"
>
and a
e.a
ddress like concat('%', #{address}, '%')
</if>
<if
test=
"postcode != null and postcode != ''"
>
and
ae.
postcode like concat('%', #{postcode}, '%')
</if>
<if
test=
"enterpriseContact != null and enterpriseContact != ''"
>
and enterprise_contact like concat('%', #{enterpriseContact}, '%')
and
ae.
enterprise_contact like concat('%', #{enterpriseContact}, '%')
</if>
<if
test=
"contactNumber != null and contactNumber != ''"
>
and contact_number like concat('%', #{contactNumber}, '%')
</if>
<if
test=
"contactNumber != null and contactNumber != ''"
>
and
ae.
contact_number like concat('%', #{contactNumber}, '%')
</if>
</where>
order by ae.create_time desc
</select>
<select
id=
"selectAutomobileEnterpriseById"
parameterType=
"Long"
resultMap=
"AutomobileEnterpriseResult"
>
...
...
quality-review/src/main/resources/mapper/CarReviewTaskMapper.xml
View file @
90ce24af
...
...
@@ -45,4 +45,13 @@
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,create_time,leader_id,leader,standard_id,name,standard_no,file,submit_id,submit_name,images_url
FROM t_car_review_task WHERE task_status = #{taskStatus}
</select>
<select
id=
"findByDetailsResult"
resultType=
"com.ruoyi.domain.CarReviewTask"
>
SELECT tr.id,tr.task_no,tr.task_status,tr.task_initiator,tr.task_initiator_dept,
tr.task_result,tr.task_begin_time,tr.task_end_time,tr.standard,tr.create_time,
tr.leader_id,tr.leader,tr.standard_id,tr.name,tr.standard_no,tr.file,tr.submit_id,
tr.submit_name,tr.images_url
FROM t_car_review_task tr
LEFT JOIN t_review_details_result trdr ON tr.id = trdr.task_id
WHERE trdr.review_details_id = #{detailId} and tr.task_status = 'PENDING'
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewDetailsMapper.xml
View file @
90ce24af
...
...
@@ -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/ReviewDetailsResultMapper.xml
View file @
90ce24af
...
...
@@ -38,5 +38,16 @@
SELECT COUNT(*) sum FROM t_review_details_result
WHERE passed = 0 AND task_id = #{taskId}
</select>
<select
id=
"findByDetailsList"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id
FROM t_review_details_result WHERE review_details_id IN
<foreach
collection=
"reviewDetailsList"
item=
"details"
open=
"("
separator=
","
close=
")"
>
#{details.id}
</foreach>
</select>
<select
id=
"findByDetailsId"
resultType=
"com.ruoyi.domain.ReviewDetailsResult"
>
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id
FROM t_review_details_result WHERE review_details_id = #{detailsId}
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewKeyPointMapper.xml
View file @
90ce24af
...
...
@@ -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/ReviewSceneChangeTaskMapper.xml
View file @
90ce24af
...
...
@@ -23,7 +23,7 @@
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"taskEndTime"
column=
"task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"inspectStandardId"
column=
"inspect_standard_id"
jdbcType=
"BIGINT"
/>
<result
property=
"inspectStandardN
ame"
column=
"inspect_standard_name
"
jdbcType=
"VARCHAR"
/>
<result
property=
"inspectStandardN
o"
column=
"inspect_standard_no
"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
id=
"ResponseResultMap"
type=
"com.ruoyi.web.response.ReviewSceneChangeTaskResponse"
>
...
...
@@ -46,7 +46,7 @@
<result
property=
"taskEndTime"
column=
"task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"decision"
column=
"decision"
jdbcType=
"VARCHAR"
/>
<result
property=
"inspectStandardId"
column=
"inspect_standard_id"
jdbcType=
"BIGINT"
/>
<result
property=
"inspectStandardN
ame"
column=
"inspect_standard_name
"
jdbcType=
"VARCHAR"
/>
<result
property=
"inspectStandardN
o"
column=
"inspect_standard_no
"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"findLastChangeByTaskId"
resultType=
"com.ruoyi.domain.ReviewSceneChangeTask"
>
...
...
quality-review/src/main/resources/mapper/ReviewSceneMapper.xml
View file @
90ce24af
...
...
@@ -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 @
90ce24af
...
...
@@ -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>
quality-review/src/main/resources/mapper/SystemReviewTaskMapper.xml
View file @
90ce24af
...
...
@@ -37,5 +37,14 @@
FROM t_system_review_task WHERE task_status IN ('NEW','PENDING')
ORDER BY create_time DESC
</select>
<select
id=
"findByDetailsResult"
resultType=
"com.ruoyi.domain.SystemReviewTask"
>
SELECT ts.id, ts.task_no, ts.task_status, ts.task_initiator, ts.task_initiator_dept,
ts.task_result, ts.task_begin_time, ts.task_end_time, ts.standard, ts.create_time,
ts.leader,ts.leader_id, ts.standard_id, ts.name, ts.standard_no, ts.file, ts.submit_by_id,
ts.submit_by_name,ts.images_url
FROM t_system_review_task ts
LEFT JOIN t_review_details_result trdr ON ts.id = trdr.task_id
WHERE trdr.review_details_id = #{detailId} and ts.task_status = 'PENDING'
</select>
</mapper>
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
90ce24af
...
...
@@ -126,6 +126,7 @@
SELECT t.id, t.system_review_task_id, t.car_review_task_id,
t.task_no,t.task_name,t.task_status,t.name,
t.product_model,
t.standard_no,
t.leader_id,t.leader,
t.task_begin_time,t.task_end_time
FROM t_task t
...
...
@@ -210,6 +211,7 @@
<select
id=
"findUserFinish"
parameterType=
"com.ruoyi.web.request.TaskFindFinishRequest"
resultType=
"com.ruoyi.domain.Task"
>
SELECT t.id, t.system_review_task_id, t.car_review_task_id,
t.task_no,t.task_name,t.task_status,t.name,
t.standard_no,
t.product_model,
t.leader_id,t.leader,
t.task_begin_time,t.task_end_time
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java
View file @
90ce24af
package
com
.
ruoyi
.
common
.
utils
.
bean
;
import
java.beans.BeanInfo
;
import
java.beans.Introspector
;
import
java.beans.PropertyDescriptor
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -107,4 +110,30 @@ public class BeanUtils extends org.springframework.beans.BeanUtils
{
return
m1
.
substring
(
BEAN_METHOD_PROP_INDEX
).
equals
(
m2
.
substring
(
BEAN_METHOD_PROP_INDEX
));
}
public
static
<
M
>
void
mergeObject
(
M
target
,
M
source
)
{
BeanInfo
beanInfo
=
null
;
try
{
beanInfo
=
Introspector
.
getBeanInfo
(
target
.
getClass
());
// Iterate over all the attributes
for
(
PropertyDescriptor
descriptor
:
beanInfo
.
getPropertyDescriptors
())
{
// Only copy writable attributes
if
(
descriptor
.
getWriteMethod
()
!=
null
)
{
Object
originalValue
=
descriptor
.
getReadMethod
()
.
invoke
(
target
);
// Only copy values where the destination values is null
if
(
originalValue
==
null
)
{
Object
defaultValue
=
descriptor
.
getReadMethod
().
invoke
(
source
);
descriptor
.
getWriteMethod
().
invoke
(
target
,
defaultValue
);
}
}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"merge objects error"
,
e
);
}
}
}
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