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
5c34a6b9
Commit
5c34a6b9
authored
Jan 18, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑任务
parent
36e05475
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
129 additions
and
8 deletions
+129
-8
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+8
-4
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+30
-4
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+10
-0
TaskEditRequest.java
.../src/main/java/com/ruoyi/web/request/TaskEditRequest.java
+81
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
5c34a6b9
...
@@ -2,10 +2,7 @@ package com.ruoyi.service;
...
@@ -2,10 +2,7 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.web.request.TaskCreateRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.TaskFindFinishRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -29,5 +26,12 @@ public interface TaskService extends IService<Task> {
...
@@ -29,5 +26,12 @@ public interface TaskService extends IService<Task> {
*/
*/
List
<
TaskFindPendingResponse
>
findPending
(
TaskFindPendingRequest
request
);
List
<
TaskFindPendingResponse
>
findPending
(
TaskFindPendingRequest
request
);
/**
* 查询完成的任务
* @param request
* @return
*/
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
);
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
);
void
editTask
(
TaskEditRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
5c34a6b9
...
@@ -11,10 +11,7 @@ import com.ruoyi.domain.*;
...
@@ -11,10 +11,7 @@ import com.ruoyi.domain.*;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.service.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.web.request.TaskCreateRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.TaskFindFinishRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
org.checkerframework.checker.units.qual.A
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -120,6 +117,35 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -120,6 +117,35 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
return
taskMapper
.
findFinish
(
request
);
return
taskMapper
.
findFinish
(
request
);
}
}
@Override
public
void
editTask
(
TaskEditRequest
request
)
{
// 找到审查组长
TaskUserRelation
leader
=
null
;
List
<
TaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
TaskUserRelation
auditor
:
auditors
)
{
if
(
auditor
.
getIsLeader
()
==
1
)
{
leader
=
auditor
;
break
;
}
}
// 构建并保存任务信息
// 总任务
Task
task
=
new
Task
();
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeader
(
leader
.
getName
());
BeanUtils
.
copyBeanProp
(
task
,
request
);
taskService
.
updateById
(
task
);
// 构建并保存该任务所关联的审核组信息
for
(
TaskUserRelation
auditor
:
auditors
)
{
auditor
.
setTaskId
(
task
.
getId
());
}
taskUserRelationService
.
updateBatchById
(
auditors
);
}
public
Long
saveSystemReview
(
TaskCreateRequest
request
,
SysUser
initiator
,
Standard
standard
,
TaskUserRelation
leader
)
{
public
Long
saveSystemReview
(
TaskCreateRequest
request
,
SysUser
initiator
,
Standard
standard
,
TaskUserRelation
leader
)
{
// 构建并保存任务信息
// 构建并保存任务信息
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
5c34a6b9
...
@@ -89,4 +89,14 @@ public class TaskController extends BaseController {
...
@@ -89,4 +89,14 @@ public class TaskController extends BaseController {
return
getDataTable
(
taskService
.
findFinish
(
request
));
return
getDataTable
(
taskService
.
findFinish
(
request
));
}
}
@ApiOperation
(
"编辑任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"编辑任务"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/editTask"
)
public
R
<
String
>
editTask
(
@Validated
@RequestBody
TaskEditRequest
request
)
{
taskService
.
editTask
(
request
);
return
R
.
ok
();
}
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskEditRequest.java
0 → 100644
View file @
5c34a6b9
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.domain.TaskUserRelation
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@ApiModel
(
value
=
"TaskEditRequest"
,
description
=
"编辑总任务"
)
@Data
public
class
TaskEditRequest
{
@ApiModelProperty
(
"ID"
)
private
Long
id
;
@ApiModelProperty
(
"小组成员"
)
private
List
<
TaskUserRelation
>
auditors
;
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
@ApiModelProperty
(
"产品型号"
)
private
String
productModel
;
@ApiModelProperty
(
"委托单位"
)
private
String
entrustedUnit
;
@ApiModelProperty
(
"委托单位地址"
)
private
String
entrustedUnitAddress
;
@ApiModelProperty
(
"委托单位电话"
)
private
String
entrustedUnitPhone
;
@ApiModelProperty
(
"委托单位邮政编码"
)
private
String
entrustedUnitCode
;
@ApiModelProperty
(
"车辆类型"
)
private
String
carType
;
@ApiModelProperty
(
"车辆识别码"
)
private
String
carIdentificationCode
;
@ApiModelProperty
(
"保密等级"
)
private
String
confidentialityLevel
;
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
@ApiModelProperty
(
"生产企业"
)
private
String
productionEnterprise
;
@ApiModelProperty
(
"送样者"
)
private
String
sampleSender
;
@ApiModelProperty
(
"送样日期"
)
private
Date
sendDate
;
@ApiModelProperty
(
"样品数量"
)
private
String
sampleNumber
;
@ApiModelProperty
(
"生产日期"
)
private
Date
productionDate
;
@ApiModelProperty
(
"商标"
)
private
String
trademark
;
@ApiModelProperty
(
"检验依据"
)
private
String
inspectionBasis
;
@ApiModelProperty
(
"选择的任务"
)
List
<
String
>
taskList
;
}
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