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
a16f6728
Commit
a16f6728
authored
Jan 19, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
创建场景变更任务 See merge request
!54
parents
0c964a14
087ca2ef
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
124 additions
and
19 deletions
+124
-19
ReviewSceneChangeTask.java
...src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
+6
-0
ReviewSceneChangeTaskMapper.java
...in/java/com/ruoyi/mapper/ReviewSceneChangeTaskMapper.java
+6
-3
ReviewSceneChangeTaskService.java
.../java/com/ruoyi/service/ReviewSceneChangeTaskService.java
+6
-3
ReviewSceneChangeTaskServiceImpl.java
.../ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
+9
-6
ReviewSceneChangeTaskController.java
...n/java/com/ruoyi/web/ReviewSceneChangeTaskController.java
+5
-3
ReviewSceneChangeTaskCreateRequest.java
...ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
+3
-0
ReviewSceneChangeTaskFindCreateRequest.java
...i/web/request/ReviewSceneChangeTaskFindCreateRequest.java
+16
-1
ReviewSceneChangeTaskFindFinishRequest.java
...i/web/request/ReviewSceneChangeTaskFindFinishRequest.java
+13
-1
ReviewSceneChangeTaskFindPendingRequest.java
.../web/request/ReviewSceneChangeTaskFindPendingRequest.java
+13
-1
ReviewSceneChangeTaskResponse.java
...com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
+9
-0
ReviewSceneChangeTaskMapper.xml
...src/main/resources/mapper/ReviewSceneChangeTaskMapper.xml
+37
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
View file @
a16f6728
...
...
@@ -118,6 +118,12 @@ public class ReviewSceneChangeTask {
@ApiModelProperty
(
value
=
"操作"
,
notes
=
"[ADD DELETE UPDATE]"
)
private
String
operation
;
@ApiModelProperty
(
value
=
"分类"
,
notes
=
"[KEYPOINT DETAILS SCENE]"
)
private
String
sort
;
@ApiModelProperty
(
"评审类型"
)
private
String
operationSort
;
/**
* 当 operation 为 ADD 时该字段为空
*/
...
...
quality-review/src/main/java/com/ruoyi/mapper/ReviewSceneChangeTaskMapper.java
View file @
a16f6728
...
...
@@ -2,6 +2,9 @@ package com.ruoyi.mapper;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest
;
import
com.ruoyi.web.response.ReviewSceneChangeTaskResponse
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -25,21 +28,21 @@ public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChang
* @param userId
* @return
*/
List
<
ReviewSceneChangeTaskResponse
>
findPendingListByUserId
(
@Param
(
"userId"
)
Long
userId
);
List
<
ReviewSceneChangeTaskResponse
>
findPendingListByUserId
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"request"
)
ReviewSceneChangeTaskFindPendingRequest
request
);
/**
* 根据用户ID查询已办列表
* @param userId
* @return
*/
List
<
ReviewSceneChangeTaskResponse
>
findFinishListByUserId
(
@Param
(
"userId"
)
Long
userId
);
List
<
ReviewSceneChangeTaskResponse
>
findFinishListByUserId
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"request"
)
ReviewSceneChangeTaskFindFinishRequest
request
);
/**
* 查询当前用户创建的任务
* @param userId
* @return
*/
List
<
ReviewSceneChangeTask
>
findCreateListByUserId
(
@Param
(
"userId"
)
Long
userId
);
List
<
ReviewSceneChangeTask
>
findCreateListByUserId
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"request"
)
ReviewSceneChangeTaskFindCreateRequest
request
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/ReviewSceneChangeTaskService.java
View file @
a16f6728
...
...
@@ -2,6 +2,9 @@ package com.ruoyi.service;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest
;
import
com.ruoyi.web.response.ReviewSceneChangeTaskResponse
;
...
...
@@ -58,20 +61,20 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
* @param userId
* @return
*/
List
<
ReviewSceneChangeTaskResponse
>
findPendingListByUserId
(
Long
userId
);
List
<
ReviewSceneChangeTaskResponse
>
findPendingListByUserId
(
Long
userId
,
ReviewSceneChangeTaskFindPendingRequest
request
);
/**
* 根据用户ID查询已办列表
* @param userId
* @return
*/
List
<
ReviewSceneChangeTaskResponse
>
findFinishListByUserId
(
Long
userId
);
List
<
ReviewSceneChangeTaskResponse
>
findFinishListByUserId
(
Long
userId
,
ReviewSceneChangeTaskFindFinishRequest
request
);
/**
* 根据用户ID查询发布的任务列表
* @param userId
* @return
*/
List
<
ReviewSceneChangeTask
>
findCreateListByUserId
(
Long
userId
);
List
<
ReviewSceneChangeTask
>
findCreateListByUserId
(
Long
userId
,
ReviewSceneChangeTaskFindCreateRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
View file @
a16f6728
...
...
@@ -13,6 +13,9 @@ import com.ruoyi.service.ReviewSceneChangeTaskUserRelationService;
import
com.ruoyi.service.ReviewSceneService
;
import
com.ruoyi.service.ReviewTaskInboxService
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindCreateRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindFinishRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest
;
import
com.ruoyi.web.response.ReviewSceneChangeTaskResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -206,8 +209,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
* @return
*/
@Override
public
List
<
ReviewSceneChangeTaskResponse
>
findPendingListByUserId
(
Long
userId
)
{
List
<
ReviewSceneChangeTaskResponse
>
reviewSceneChangeTask
=
reviewSceneChangeTaskMapper
.
findPendingListByUserId
(
userId
);
public
List
<
ReviewSceneChangeTaskResponse
>
findPendingListByUserId
(
Long
userId
,
ReviewSceneChangeTaskFindPendingRequest
request
)
{
List
<
ReviewSceneChangeTaskResponse
>
reviewSceneChangeTask
=
reviewSceneChangeTaskMapper
.
findPendingListByUserId
(
userId
,
request
);
return
reviewSceneChangeTask
;
}
...
...
@@ -217,8 +220,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
* @return
*/
@Override
public
List
<
ReviewSceneChangeTaskResponse
>
findFinishListByUserId
(
Long
userId
)
{
List
<
ReviewSceneChangeTaskResponse
>
reviewSceneChangeTask
=
reviewSceneChangeTaskMapper
.
findFinishListByUserId
(
userId
);
public
List
<
ReviewSceneChangeTaskResponse
>
findFinishListByUserId
(
Long
userId
,
ReviewSceneChangeTaskFindFinishRequest
request
)
{
List
<
ReviewSceneChangeTaskResponse
>
reviewSceneChangeTask
=
reviewSceneChangeTaskMapper
.
findFinishListByUserId
(
userId
,
request
);
return
reviewSceneChangeTask
;
}
...
...
@@ -228,8 +231,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
* @return
*/
@Override
public
List
<
ReviewSceneChangeTask
>
findCreateListByUserId
(
Long
userId
)
{
List
<
ReviewSceneChangeTask
>
reviewSceneChangeTask
=
reviewSceneChangeTaskMapper
.
findCreateListByUserId
(
userId
);
public
List
<
ReviewSceneChangeTask
>
findCreateListByUserId
(
Long
userId
,
ReviewSceneChangeTaskFindCreateRequest
request
)
{
List
<
ReviewSceneChangeTask
>
reviewSceneChangeTask
=
reviewSceneChangeTaskMapper
.
findCreateListByUserId
(
userId
,
request
);
return
reviewSceneChangeTask
;
}
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewSceneChangeTaskController.java
View file @
a16f6728
...
...
@@ -39,6 +39,8 @@ public class ReviewSceneChangeTaskController extends BaseController {
ReviewSceneChangeTask
reviewSceneChangeTask
=
new
ReviewSceneChangeTask
();
BeanUtils
.
copyBeanProp
(
reviewSceneChangeTask
,
request
);
reviewSceneChangeTask
.
setOperationSort
(
request
.
getOperation
()+
"_"
+
request
.
getSort
());
reviewSceneChangeTaskService
.
create
(
reviewSceneChangeTask
);
return
R
.
ok
();
...
...
@@ -65,7 +67,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
public
TableDataInfo
<
ReviewSceneChangeTaskResponse
>
findPending
(
@Validated
@RequestBody
ReviewSceneChangeTaskFindPendingRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
reviewSceneChangeTaskService
.
findPendingListByUserId
(
getUserId
()));
return
getDataTable
(
reviewSceneChangeTaskService
.
findPendingListByUserId
(
getUserId
()
,
request
));
}
/**
...
...
@@ -78,7 +80,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findFinish"
)
public
TableDataInfo
<
ReviewSceneChangeTaskResponse
>
findFinish
(
@Validated
@RequestBody
ReviewSceneChangeTaskFindFinishRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
reviewSceneChangeTaskService
.
findFinishListByUserId
(
getUserId
()));
return
getDataTable
(
reviewSceneChangeTaskService
.
findFinishListByUserId
(
getUserId
()
,
request
));
}
/**
...
...
@@ -91,7 +93,7 @@ public class ReviewSceneChangeTaskController extends BaseController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findCreate"
)
public
TableDataInfo
<
ReviewSceneChangeTask
>
findCreate
(
@Validated
@RequestBody
ReviewSceneChangeTaskFindCreateRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
reviewSceneChangeTaskService
.
findCreateListByUserId
(
getUserId
()));
return
getDataTable
(
reviewSceneChangeTaskService
.
findCreateListByUserId
(
getUserId
()
,
request
));
}
@ApiOperation
(
"查询任务详情"
)
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
View file @
a16f6728
...
...
@@ -62,6 +62,9 @@ public class ReviewSceneChangeTaskCreateRequest {
@ApiModelProperty
(
value
=
"操作"
,
notes
=
"[ADD DELETE UPDATE]"
)
private
String
operation
;
@ApiModelProperty
(
value
=
"分类"
,
notes
=
"[KEYPOINT DETAILS SCENE]"
)
private
String
sort
;
/**
* 当 operation 为 ADD 时该字段为空
*/
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskFindCreateRequest.java
View file @
a16f6728
...
...
@@ -2,7 +2,22 @@ package com.ruoyi.web.request;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
@ApiModel
(
value
=
"ReviewSceneChangeTaskFindCreateRequest"
,
description
=
"查询发布的任务"
)
@Data
public
class
ReviewSceneChangeTaskFindCreateRequest
extends
PageDomain
{
@ApiModelProperty
(
"评审类型"
)
private
String
operationSort
;
@ApiModelProperty
(
"条款分类[system(体系审查)、car(车型审查)]"
)
private
String
type
;
@ApiModelProperty
(
"关键词"
)
private
String
keyword
;
@ApiModelProperty
(
"评审状态"
)
private
String
taskStatus
;
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskFindFinishRequest.java
View file @
a16f6728
...
...
@@ -2,7 +2,19 @@ package com.ruoyi.web.request;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
@ApiModel
(
value
=
"ReviewSceneChangeTaskFindFinishRequest"
,
description
=
"查询处理完成的任务"
)
@Data
public
class
ReviewSceneChangeTaskFindFinishRequest
extends
PageDomain
{
@ApiModelProperty
(
"评审类型"
)
private
String
operationSort
;
@ApiModelProperty
(
"条款分类[system(体系审查)、car(车型审查)]"
)
private
String
type
;
@ApiModelProperty
(
"关键词"
)
private
String
keyword
;
}
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskFindPendingRequest.java
View file @
a16f6728
...
...
@@ -2,7 +2,19 @@ package com.ruoyi.web.request;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
@ApiModel
(
value
=
"ReviewSceneChangeTaskFindPendingRequest"
,
description
=
"查询处理中的任务"
)
@Data
public
class
ReviewSceneChangeTaskFindPendingRequest
extends
PageDomain
{
@ApiModelProperty
(
"评审类型"
)
private
String
operationSort
;
@ApiModelProperty
(
"条款分类[system(体系审查)、car(车型审查)]"
)
private
String
type
;
@ApiModelProperty
(
"关键词"
)
private
String
keyword
;
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
View file @
a16f6728
...
...
@@ -40,6 +40,9 @@ public class ReviewSceneChangeTaskResponse {
@ApiModelProperty
(
"审查标准"
)
private
String
standard
;
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)]"
)
private
String
type
;
/**
* 审查要点id
*/
...
...
@@ -70,6 +73,12 @@ public class ReviewSceneChangeTaskResponse {
@ApiModelProperty
(
"操作(ADD DELETE UPDATE)"
)
private
String
operation
;
@ApiModelProperty
(
value
=
"分类"
,
notes
=
"[KEYPOINT DETAILS SCENE]"
)
private
String
sort
;
@ApiModelProperty
(
"评审类型"
)
private
String
operationSort
;
/**
* 当 operation 为 ADD 时该字段为空
*/
...
...
quality-review/src/main/resources/mapper/ReviewSceneChangeTaskMapper.xml
View file @
a16f6728
...
...
@@ -12,6 +12,8 @@
<result
property=
"keypoint"
column=
"keypoint"
jdbcType=
"VARCHAR"
/>
<result
property=
"details"
column=
"details"
jdbcType=
"VARCHAR"
/>
<result
property=
"operation"
column=
"operation"
jdbcType=
"VARCHAR"
/>
<result
property=
"sort"
column=
"sort"
jdbcType=
"VARCHAR"
/>
<result
property=
"operationSort"
column=
"operation_sort"
jdbcType=
"VARCHAR"
/>
<result
property=
"oldText"
column=
"old_text"
jdbcType=
"VARCHAR"
/>
<result
property=
"newText"
column=
"new_text"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskInitiator"
column=
"task_initiator"
jdbcType=
"VARCHAR"
/>
...
...
@@ -30,6 +32,8 @@
<result
property=
"keypoint"
column=
"keypoint"
jdbcType=
"VARCHAR"
/>
<result
property=
"details"
column=
"details"
jdbcType=
"VARCHAR"
/>
<result
property=
"operation"
column=
"operation"
jdbcType=
"VARCHAR"
/>
<result
property=
"sort"
column=
"sort"
jdbcType=
"VARCHAR"
/>
<result
property=
"operationSort"
column=
"operation_sort"
jdbcType=
"VARCHAR"
/>
<result
property=
"oldText"
column=
"old_text"
jdbcType=
"VARCHAR"
/>
<result
property=
"newText"
column=
"new_text"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskInitiator"
column=
"task_initiator"
jdbcType=
"VARCHAR"
/>
...
...
@@ -52,17 +56,50 @@
SELECT sct.*, sctu.decision FROM t_review_scene_change_task sct
LEFT JOIN t_review_scene_change_task_user_relation sctu ON sct.id = sctu.task_id
WHERE sctu.user_id = #{userId} and sctu.decision IS NULL
<if
test=
"request.operationSort != null and request.operationSort != ''"
>
and sct.operation_sort = #{request.operationSort}
</if>
<if
test=
"request.type != null and request.type != ''"
>
and sct.type = #{request.type}
</if>
<if
test=
"request.keyword != null and request.keyword != ''"
>
and (sct.old_text like concat('%',#{request.keyword},'%') || sct.new_text like concat('%',#{request.keyword},'%'))
</if>
order by sct.task_begin_time desc
</select>
<select
id=
"findFinishListByUserId"
resultType=
"com.ruoyi.web.response.ReviewSceneChangeTaskResponse"
>
SELECT sct.*, sctu.decision FROM t_review_scene_change_task sct
LEFT JOIN t_review_scene_change_task_user_relation sctu ON sct.id = sctu.task_id
WHERE sctu.user_id = #{userId} and sctu.decision IS NOT NULL
<if
test=
"request.operationSort != null and request.operationSort != ''"
>
and sct.operation_sort = #{request.operationSort}
</if>
<if
test=
"request.type != null and request.type != ''"
>
and sct.type = #{request.type}
</if>
<if
test=
"request.keyword != null and request.keyword != ''"
>
and (sct.old_text like concat('%',#{request.keyword},'%') || sct.new_text like concat('%',#{request.keyword},'%'))
</if>
order by sct.task_begin_time desc
</select>
<select
id=
"findCreateListByUserId"
resultType=
"com.ruoyi.domain.ReviewSceneChangeTask"
>
SELECT * FROM t_review_scene_change_task
WHERE task_initiator_id = #{userId}
<if
test=
"request.operationSort != null and request.operationSort != ''"
>
and operation_sort = #{request.operationSort}
</if>
<if
test=
"request.type != null and request.type != ''"
>
and type = #{request.type}
</if>
<if
test=
"request.keyword != null and request.keyword != ''"
>
and (old_text like concat('%',#{request.keyword},'%') || new_text like concat('%',#{request.keyword},'%'))
</if>
<if
test=
"request.taskStatus != null and request.taskStatus != ''"
>
and task_status = #{request.taskStatus}
</if>
order by task_begin_time desc
</select>
</mapper>
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
a16f6728
...
...
@@ -100,7 +100,7 @@
and t.task_begin_time = #{taskBeginTime}
</if>
<if
test=
"subStatus != null and subStatus != ''"
>
and
review_status = #{subStatus} OR car_review_status = #{subStatus} OR car_test_status = #{subStatus}
and
(srt.task_status = #{subStatus} OR crt.review_status = #{subStatus} OR crt.test_status = #{subStatus})
</if>
</where>
</select>
...
...
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