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
1cbb16e9
Commit
1cbb16e9
authored
Dec 26, 2023
by
王飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat
1、新增实体SystemReviewTaskInbox及相关业务代码框架。 Reference N/A
parent
b747ae08
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
176 additions
and
1 deletion
+176
-1
SystemReviewTaskInbox.java
...src/main/java/com/ruoyi/domain/SystemReviewTaskInbox.java
+38
-0
SystemReviewTaskInboxMapper.java
...in/java/com/ruoyi/mapper/SystemReviewTaskInboxMapper.java
+18
-0
SystemReviewTaskMapper.java
...rc/main/java/com/ruoyi/mapper/SystemReviewTaskMapper.java
+4
-0
SystemReviewTaskInboxService.java
.../java/com/ruoyi/service/SystemReviewTaskInboxService.java
+19
-0
SystemReviewTaskService.java
.../main/java/com/ruoyi/service/SystemReviewTaskService.java
+8
-0
ReviewSceneChangeTaskServiceImpl.java
.../ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
+9
-1
SystemReviewTaskInboxServiceImpl.java
.../ruoyi/service/impl/SystemReviewTaskInboxServiceImpl.java
+49
-0
SystemReviewTaskServiceImpl.java
...a/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
+8
-0
SystemReviewTaskInboxMapper.xml
...src/main/resources/mapper/SystemReviewTaskInboxMapper.xml
+18
-0
SystemReviewTaskMapper.xml
...view/src/main/resources/mapper/SystemReviewTaskMapper.xml
+5
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/SystemReviewTaskInbox.java
0 → 100644
View file @
1cbb16e9
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* 体系审查任务收件箱(目前用来获取审查场景变更通知)
* @TableName t_system_review_task_inbox
*/
@TableName
(
value
=
"t_system_review_task_inbox"
)
@Accessors
(
chain
=
true
)
@Data
public
class
SystemReviewTaskInbox
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
id
;
/**
* 体系审查任务id
*/
private
Long
systemReviewTaskId
;
/**
* 场景变更任务id
*/
private
Long
reviewSceneChangeTaskId
;
/**
* 该消息是否已确认(0未确认:1已确认)
*/
private
Integer
isConfirm
;
}
\ No newline at end of file
quality-review/src/main/java/com/ruoyi/mapper/SystemReviewTaskInboxMapper.java
0 → 100644
View file @
1cbb16e9
package
com
.
ruoyi
.
mapper
;
import
com.ruoyi.domain.SystemReviewTaskInbox
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author wangfei
* @description 针对表【t_system_review_task_inbox(体系审查任务收件箱(目前用来获取审查场景变更通知))】的数据库操作Mapper
* @createDate 2023-12-26 09:55:39
* @Entity com.ruoyi.domain.SystemReviewTaskInbox
*/
public
interface
SystemReviewTaskInboxMapper
extends
BaseMapper
<
SystemReviewTaskInbox
>
{
}
quality-review/src/main/java/com/ruoyi/mapper/SystemReviewTaskMapper.java
View file @
1cbb16e9
...
...
@@ -2,8 +2,12 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.SystemReviewTask
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
SystemReviewTaskMapper
extends
BaseMapper
<
SystemReviewTask
>
{
List
<
SystemReviewTask
>
findListByStatus
(
@Param
(
"status"
)
String
status
);
}
quality-review/src/main/java/com/ruoyi/service/SystemReviewTaskInboxService.java
0 → 100644
View file @
1cbb16e9
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.SystemReviewTaskInbox
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* @author wangfei
* @description 针对表【t_system_review_task_inbox(体系审查任务收件箱(目前用来获取审查场景变更通知))】的数据库操作Service
* @createDate 2023-12-26 09:55:39
*/
public
interface
SystemReviewTaskInboxService
extends
IService
<
SystemReviewTaskInbox
>
{
/**
* 对受变更影响的问卷生成提醒消息
* @param reviewSceneChangeTaskId
*/
void
saveNotify
(
Long
reviewSceneChangeTaskId
);
}
quality-review/src/main/java/com/ruoyi/service/SystemReviewTaskService.java
View file @
1cbb16e9
...
...
@@ -6,6 +6,8 @@ import com.ruoyi.web.request.SystemReviewTaskCreateRequest;
import
com.ruoyi.web.request.SystemReviewTaskStartRequest
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_system_review_task(体系审查任务)】的数据库操作Service
...
...
@@ -32,4 +34,10 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> {
*/
void
start
(
SystemReviewTaskStartRequest
request
);
/**
* 根据状态查找体系审查任务
* @return
*/
List
<
SystemReviewTask
>
findListByStatus
(
String
status
);
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
View file @
1cbb16e9
...
...
@@ -11,6 +11,7 @@ import com.ruoyi.service.ReviewSceneChangeTaskService;
import
com.ruoyi.mapper.ReviewSceneChangeTaskMapper
;
import
com.ruoyi.service.ReviewSceneChangeTaskUserRelationService
;
import
com.ruoyi.service.ReviewSceneService
;
import
com.ruoyi.service.SystemReviewTaskInboxService
;
import
com.ruoyi.system.service.ISysUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -41,6 +42,9 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
@Autowired
private
ReviewSceneService
reviewSceneService
;
@Autowired
private
SystemReviewTaskInboxService
systemReviewTaskInboxService
;
@Autowired
private
ReviewSceneChangeTaskMapper
reviewSceneChangeTaskMapper
;
...
...
@@ -117,9 +121,13 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
reviewSceneChangeTaskService
.
updateById
(
task
);
// 如果当前任务为全员通过,则对审查标准文件进行更新
// 如果当前任务为全员通过,则对审查标准文件进行更新
,同时向受到变更影响的问卷的“收件箱”表中写入数据,记录变更用于提醒用户。
if
(
task
.
getTaskResult
().
equals
(
ReviewSceneChangeTaskUserRelation
.
DECISION_PASS
))
{
// 更新审核标准
reviewSceneService
.
change
(
task
);
// 通知受影响的问卷
systemReviewTaskInboxService
.
saveNotify
(
taskId
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskInboxServiceImpl.java
0 → 100644
View file @
1cbb16e9
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.SystemReviewTask
;
import
com.ruoyi.domain.SystemReviewTaskInbox
;
import
com.ruoyi.service.SystemReviewTaskInboxService
;
import
com.ruoyi.mapper.SystemReviewTaskInboxMapper
;
import
com.ruoyi.service.SystemReviewTaskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author wangfei
* @description 针对表【t_system_review_task_inbox(体系审查任务收件箱(目前用来获取审查场景变更通知))】的数据库操作Service实现
* @createDate 2023-12-26 09:55:39
*/
@Transactional
@Service
public
class
SystemReviewTaskInboxServiceImpl
extends
ServiceImpl
<
SystemReviewTaskInboxMapper
,
SystemReviewTaskInbox
>
implements
SystemReviewTaskInboxService
{
@Autowired
private
SystemReviewTaskService
systemReviewTaskService
;
@Override
public
void
saveNotify
(
Long
reviewSceneChangeTaskId
)
{
// 查找所有受变更影响的体系审查任务(所有PENDING状态的任务)
List
<
SystemReviewTask
>
pendingTasks
=
systemReviewTaskService
.
findListByStatus
(
SystemReviewTask
.
STATUS_PENDING
);
// 构建并保存提醒消息
List
<
SystemReviewTaskInbox
>
inboxes
=
new
ArrayList
();
for
(
SystemReviewTask
task
:
pendingTasks
)
{
SystemReviewTaskInbox
inbox
=
new
SystemReviewTaskInbox
()
.
setReviewSceneChangeTaskId
(
reviewSceneChangeTaskId
)
.
setSystemReviewTaskId
(
task
.
getId
())
.
setIsConfirm
(
0
);
inboxes
.
add
(
inbox
);
}
saveBatch
(
inboxes
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
View file @
1cbb16e9
...
...
@@ -36,6 +36,9 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
@Autowired
private
StrategySystemReviewTaskContext
strategySystemReviewTaskContext
;
@Autowired
private
SystemReviewTaskMapper
systemReviewTaskMapper
;
@Autowired
private
ISysUserService
sysUserService
;
...
...
@@ -90,6 +93,11 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
strategySystemReviewTaskContext
.
getResource
(
systemReviewTask
.
getTaskStatus
()).
doStart
(
systemReviewTask
);
}
@Override
public
List
<
SystemReviewTask
>
findListByStatus
(
String
status
)
{
return
systemReviewTaskMapper
.
findListByStatus
(
status
);
}
}
...
...
quality-review/src/main/resources/mapper/SystemReviewTaskInboxMapper.xml
0 → 100644
View file @
1cbb16e9
<?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.SystemReviewTaskInboxMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.SystemReviewTaskInbox"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"systemReviewTaskId"
column=
"system_review_task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"reviewSceneChangeTaskId"
column=
"review_scene_change_task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"isConfirm"
column=
"is_confirm"
jdbcType=
"TINYINT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,system_review_task_id,review_scene_change_task_id,
is_confirm
</sql>
</mapper>
quality-review/src/main/resources/mapper/SystemReviewTaskMapper.xml
View file @
1cbb16e9
...
...
@@ -18,4 +18,9 @@
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<select
id=
"findListByStatus"
resultMap=
"BaseResultMap"
>
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, biz_info, create_time
FROM t_system_review_task WHERE task_status = #{status}
</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