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
f21f5f23
Commit
f21f5f23
authored
Jan 08, 2024
by
王飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat
1、针对体系审查问卷、车型审查问卷,使用同一个场景变更接收表。 Reference N/A
parent
917f40a7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
338 additions
and
3 deletions
+338
-3
CarReviewTask.java
...-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
+160
-0
ReviewSceneChangeTask.java
...src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
+6
-0
CarReviewTaskMapper.java
...w/src/main/java/com/ruoyi/mapper/CarReviewTaskMapper.java
+24
-0
CarReviewTaskService.java
...src/main/java/com/ruoyi/service/CarReviewTaskService.java
+17
-0
SystemReviewTaskInboxService.java
.../java/com/ruoyi/service/SystemReviewTaskInboxService.java
+1
-1
CarReviewTaskServiceImpl.java
...java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
+32
-0
ReviewSceneChangeTaskServiceImpl.java
.../ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
+1
-1
SystemReviewTaskInboxServiceImpl.java
.../ruoyi/service/impl/SystemReviewTaskInboxServiceImpl.java
+49
-1
ReviewSceneChangeTaskCreateRequest.java
...ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
+6
-0
CarReviewTaskMapper.xml
...-review/src/main/resources/mapper/CarReviewTaskMapper.xml
+42
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
0 → 100644
View file @
f21f5f23
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
java.io.Serializable
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 车型审查任务
* @TableName t_car_review_task
*/
@TableName
(
value
=
"t_car_review_task"
)
@Data
public
class
CarReviewTask
implements
Serializable
{
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_PENDING
=
"PENDING"
;
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_FINISH
=
"FINISH"
;
@TableField
(
exist
=
false
)
public
static
final
String
REVIEW_STATUS_NONE
=
"NONE"
;
@TableField
(
exist
=
false
)
public
static
final
String
REVIEW_STATUS_NEW
=
"NEW"
;
@TableField
(
exist
=
false
)
public
static
final
String
REVIEW_STATUS_PENDING
=
"PENDING"
;
@TableField
(
exist
=
false
)
public
static
final
String
REVIEW_STATUS_FINISH
=
"FINISH"
;
@TableField
(
exist
=
false
)
public
static
final
String
TEST_STATUS_NONE
=
"NONE"
;
@TableField
(
exist
=
false
)
public
static
final
String
TEST_STATUS_NEW
=
"NEW"
;
@TableField
(
exist
=
false
)
public
static
final
String
TEST_STATUS_PENDING
=
"PENDING"
;
@TableField
(
exist
=
false
)
public
static
final
String
TEST_STATUS_FINISH
=
"FINISH"
;
/**
* 主键
*/
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
id
;
/**
* 任务编号
*/
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
/**
* 任务状态(PENDING、FINISH)
*/
@ApiModelProperty
(
"任务状态(PENDING、FINISH)"
)
private
String
taskStatus
;
/**
* 任务发起人姓名
*/
@ApiModelProperty
(
"任务发起人姓名"
)
private
String
taskInitiator
;
/**
* 任务发起人部门
*/
@ApiModelProperty
(
"任务发起人部门"
)
private
String
taskInitiatorDept
;
/**
* 任务结果(PASS、REJECT)
*/
@ApiModelProperty
(
"任务结果(PASS、REJECT)"
)
private
String
taskResult
;
/**
* 任务开始时间
*/
@ApiModelProperty
(
"任务开始时间"
)
private
Date
taskBeginTime
;
/**
* 任务结束时间
*/
@ApiModelProperty
(
"任务结束时间"
)
private
Date
taskEndTime
;
/**
* 审查标准
*/
@ApiModelProperty
(
"审查标准"
)
private
Object
standard
;
/**
* 占位(开发人员根据具体业务自行增加业务字段)
*/
@ApiModelProperty
(
"占位(开发人员根据具体业务自行增加业务字段)"
)
private
String
bizInfo
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 审查组长id
*/
@ApiModelProperty
(
"审查组长id"
)
private
Long
leaderId
;
/**
* 审查组长姓名
*/
@ApiModelProperty
(
"审查组长姓名"
)
private
String
leader
;
/**
* 关联标准表id
*/
@ApiModelProperty
(
"关联标准表id"
)
private
Long
standardId
;
/**
* 标准名称
*/
@ApiModelProperty
(
"标准名称"
)
private
String
name
;
/**
* 标准号
*/
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
/**
* 文件路径
*/
@ApiModelProperty
(
"文件路径"
)
private
String
file
;
/**
* 车型问卷审查任务状态[NONE、NEW、PENDING、FINISH]
*/
@ApiModelProperty
(
"车型问卷审查任务状态[NONE、NEW、PENDING、FINISH]"
)
private
String
reviewStatus
;
/**
* 车型测试任务状态[NONE、NEW、PENDING、FINISH]
*/
@ApiModelProperty
(
"车型测试任务状态[NONE、NEW、PENDING、FINISH]"
)
private
String
testStatus
;
}
\ No newline at end of file
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
View file @
f21f5f23
...
...
@@ -77,6 +77,12 @@ public class ReviewSceneChangeTask {
@ApiModelProperty
(
"审查标准"
)
private
String
standard
;
/**
* 检查类型[system(体系审查)、car(车型审查)]
*/
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)]"
)
private
String
type
;
/**
* 审查要点id
*/
...
...
quality-review/src/main/java/com/ruoyi/mapper/CarReviewTaskMapper.java
0 → 100644
View file @
f21f5f23
package
com
.
ruoyi
.
mapper
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_car_review_task(车型审查任务)】的数据库操作Mapper
* @createDate 2024-01-08 13:14:13
* @Entity com.ruoyi.domain.CarReviewTask
*/
@Repository
public
interface
CarReviewTaskMapper
extends
BaseMapper
<
CarReviewTask
>
{
List
<
CarReviewTask
>
findListByReviewStatus
(
@Param
(
"reviewStatus"
)
String
reviewStatus
);
}
quality-review/src/main/java/com/ruoyi/service/CarReviewTaskService.java
0 → 100644
View file @
f21f5f23
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_car_review_task(车型审查任务)】的数据库操作Service
* @createDate 2024-01-08 13:14:13
*/
public
interface
CarReviewTaskService
extends
IService
<
CarReviewTask
>
{
List
<
CarReviewTask
>
findListByReviewStatus
(
String
reviewStatus
);
}
quality-review/src/main/java/com/ruoyi/service/SystemReviewTaskInboxService.java
View file @
f21f5f23
...
...
@@ -14,6 +14,6 @@ public interface SystemReviewTaskInboxService extends IService<SystemReviewTaskI
* 对受变更影响的问卷生成提醒消息
* @param reviewSceneChangeTaskId
*/
void
saveNotify
(
Long
reviewSceneChangeTaskId
);
void
saveNotify
(
Long
reviewSceneChangeTaskId
,
String
type
);
}
quality-review/src/main/java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
0 → 100644
View file @
f21f5f23
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.mapper.CarReviewTaskMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_car_review_task(车型审查任务)】的数据库操作Service实现
* @createDate 2024-01-08 13:14:13
*/
@Service
public
class
CarReviewTaskServiceImpl
extends
ServiceImpl
<
CarReviewTaskMapper
,
CarReviewTask
>
implements
CarReviewTaskService
{
@Autowired
private
CarReviewTaskMapper
carReviewTaskMapper
;
@Override
public
List
<
CarReviewTask
>
findListByReviewStatus
(
String
reviewStatus
)
{
return
carReviewTaskMapper
.
findListByReviewStatus
(
reviewStatus
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
View file @
f21f5f23
...
...
@@ -129,7 +129,7 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
reviewSceneService
.
change
(
task
);
// 通知受影响的问卷
systemReviewTaskInboxService
.
saveNotify
(
taskId
);
systemReviewTaskInboxService
.
saveNotify
(
taskId
,
task
.
getType
()
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskInboxServiceImpl.java
View file @
f21f5f23
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.SystemReviewTaskInbox
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskInboxService
;
import
com.ruoyi.mapper.SystemReviewTaskInboxMapper
;
import
com.ruoyi.service.SystemReviewTaskService
;
...
...
@@ -25,8 +30,50 @@ public class SystemReviewTaskInboxServiceImpl extends ServiceImpl<SystemReviewTa
@Autowired
private
SystemReviewTaskService
systemReviewTaskService
;
@Autowired
private
CarReviewTaskService
carReviewTaskService
;
/**
* 保存场景变更对进行中的问卷产生的影响,用于提醒问卷使用者场景发生了变更。
* 体系审查任务、侧性审查任务分别查询不同的表
* @param reviewSceneChangeTaskId
* @param type
*/
@Override
public
void
saveNotify
(
Long
reviewSceneChangeTaskId
)
{
public
void
saveNotify
(
Long
reviewSceneChangeTaskId
,
String
type
)
{
if
(
ReviewStandard
.
TYPE_SYSTEM
.
equals
(
type
))
{
doSaveNotifyBySystemReview
(
reviewSceneChangeTaskId
);
}
else
if
(
ReviewStandard
.
TYPE_CAR
.
equals
(
type
))
{
doSaveNotifyByCarReview
(
reviewSceneChangeTaskId
);
}
else
{
throw
new
ServiceException
(
"未知的检查类型["
+
type
+
"]"
,
HttpStatus
.
ERROR
);
}
}
public
void
doSaveNotifyByCarReview
(
Long
reviewSceneChangeTaskId
)
{
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务)
List
<
CarReviewTask
>
pendingTasks
=
carReviewTaskService
.
findListByReviewStatus
(
CarReviewTask
.
REVIEW_STATUS_PENDING
);
// 构建并保存提醒消息
List
<
SystemReviewTaskInbox
>
inboxes
=
new
ArrayList
();
for
(
CarReviewTask
task
:
pendingTasks
)
{
SystemReviewTaskInbox
inbox
=
new
SystemReviewTaskInbox
()
.
setReviewSceneChangeTaskId
(
reviewSceneChangeTaskId
)
.
setSystemReviewTaskId
(
task
.
getId
())
.
setIsConfirm
(
0
);
inboxes
.
add
(
inbox
);
}
saveBatch
(
inboxes
);
}
public
void
doSaveNotifyBySystemReview
(
Long
reviewSceneChangeTaskId
)
{
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务)
List
<
SystemReviewTask
>
pendingTasks
=
systemReviewTaskService
.
findListByStatus
(
SystemReviewTask
.
STATUS_PENDING
);
...
...
@@ -41,6 +88,7 @@ public class SystemReviewTaskInboxServiceImpl extends ServiceImpl<SystemReviewTa
}
saveBatch
(
inboxes
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
View file @
f21f5f23
...
...
@@ -26,6 +26,12 @@ public class ReviewSceneChangeTaskCreateRequest {
@ApiModelProperty
(
"审查标准"
)
private
String
standard
;
/**
* 检查类型[system(体系审查)、car(车型审查)]
*/
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)]"
)
private
String
type
;
/**
* 审查要点id
*/
...
...
quality-review/src/main/resources/mapper/CarReviewTaskMapper.xml
0 → 100644
View file @
f21f5f23
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.CarReviewTaskMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.CarReviewTask"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskNo"
column=
"task_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskInitiator"
column=
"task_initiator"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskInitiatorDept"
column=
"task_initiator_dept"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskResult"
column=
"task_result"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"taskEndTime"
column=
"task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"standard"
column=
"standard"
jdbcType=
"OTHER"
/>
<result
property=
"bizInfo"
column=
"biz_info"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"leaderId"
column=
"leader_id"
jdbcType=
"BIGINT"
/>
<result
property=
"leader"
column=
"leader"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardId"
column=
"standard_id"
jdbcType=
"BIGINT"
/>
<result
property=
"name"
column=
"name"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardNo"
column=
"standard_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"file"
column=
"file"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewStatus"
column=
"review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"testStatus"
column=
"test_status"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,task_no,task_status,
task_initiator,task_initiator_dept,task_result,
task_begin_time,task_end_time,standard,
biz_info,create_time,leader_id,
leader,standard_id,name,
standard_no,file,review_status,
test_status
</sql>
<select
id=
"findListByReviewStatus"
resultType=
"com.ruoyi.domain.CarReviewTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status
FROM t_system_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING'
</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