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
d57d1e54
Commit
d57d1e54
authored
Mar 07, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into wangfei
parents
5d1f63ec
3ba8ba44
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
42 deletions
+45
-42
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+1
-1
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+36
-39
AutomobileEnterpriseController.java
...in/java/com/ruoyi/web/AutomobileEnterpriseController.java
+1
-1
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+1
-1
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+3
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+3
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
d57d1e54
...
...
@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> {
*/
List
<
Task
>
findList
(
TaskListRequest
request
);
void
createTask
(
TaskCreateRequest
request
,
Long
userId
);
void
createTask
(
TaskCreateRequest
request
);
/**
* 查询进行中的任务
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
d57d1e54
...
...
@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
@Override
public
void
createTask
(
TaskCreateRequest
request
,
Long
userId
)
{
public
void
createTask
(
TaskCreateRequest
request
)
{
// 构建任务创建者
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
...
...
@@ -167,9 +167,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
TaskGetInfoResponse
temporaryStorageTask
=
taskService
.
getByUserId
(
userId
);
TaskGetInfoResponse
temporaryStorageTask
=
taskService
.
getByUserId
(
loginUser
.
getUserId
());
if
(
temporaryStorageTask
!=
null
)
{
taskMapper
.
deleteById
(
temporaryStorageTask
.
getId
());
}
}
@Override
...
...
@@ -219,7 +220,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
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
)
&&
oldTask
.
getCarReviewTaskId
()
==
null
)
{
// 保存车型审查问卷任务
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
...
...
@@ -238,6 +239,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldTask
.
getSystemReviewTaskId
()
!=
null
)
{
systemReviewTaskMapper
.
deleteById
(
oldTask
.
getSystemReviewTaskId
());
}
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
}
taskService
.
updateById
(
task
);
...
...
@@ -280,31 +283,25 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
if
(
sampleRelations
.
size
()
!=
0
&&
sampleRelations
!=
null
)
{
// 获取之前的第一个企业名称
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
Sample
s
ample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
Sample
oldS
ample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
// 获取编辑任务后的第一个企业名称
TaskSampleRelation
taskSampleRelation1
=
relations
.
get
(
0
);
Sample
sample1
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation1
.
getSampleId
());
TaskSampleRelation
newTaskSampleRelation
=
relations
.
get
(
0
);
Sample
newSample
=
sampleManagementMapper
.
selectSampleManagementById
(
newTaskSampleRelation
.
getSampleId
());
// 第一个企业名称不相同则修改
if
(!
Objects
.
equals
(
sample
.
getManufacturingEnterprise
(),
sample1
.
getManufacturingEnterprise
())){
Task
task1
=
taskMapper
.
selectById
(
request
.
getId
());
// 体系审查对应的留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getSystemReviewTaskId
());
if
(!
Objects
.
equals
(
oldSample
.
getManufacturingEnterprise
(),
newSample
.
getManufacturingEnterprise
())){
// 留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList
=
reviewEnterpriseArchiveMapper
.
findList
(
request
.
getId
());
if
(
reviewEnterpriseArchiveList
.
size
()
!=
0
&&
reviewEnterpriseArchiveList
!=
null
)
{
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
:
reviewEnterpriseArchiveList
)
{
reviewEnterpriseArchive
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
reviewEnterpriseArchive
.
setEnterpriseName
(
newSample
.
getManufacturingEnterprise
());
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList
);
// 车辆对应的留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList1
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getCarReviewTaskId
());
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive1
:
reviewEnterpriseArchiveList1
)
{
reviewEnterpriseArchive1
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList1
);
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/AutomobileEnterpriseController.java
View file @
d57d1e54
...
...
@@ -46,7 +46,7 @@ public class AutomobileEnterpriseController extends BaseController
@PostMapping
(
"/list"
)
public
TableDataInfo
<
AutomobileEnterprise
>
list
(
@Validated
@RequestBody
AutomobileEnterpriseListRequest
request
)
{
startPage
();
startPage
(
request
);
List
<
AutomobileEnterprise
>
list
=
automobileEnterpriseService
.
selectAutomobileEnterpriseList
(
request
);
return
getDataTable
(
list
);
}
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
d57d1e54
...
...
@@ -58,7 +58,7 @@ public class TaskController extends BaseController {
@Log
(
title
=
"总任务"
,
businessType
=
BusinessType
.
INSERT
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
public
R
<
String
>
createTask
(
@Validated
@RequestBody
TaskCreateRequest
request
)
{
taskService
.
createTask
(
request
,
getUserId
()
);
taskService
.
createTask
(
request
);
return
R
.
ok
();
}
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
d57d1e54
...
...
@@ -27,6 +27,9 @@ public class TaskFindResponse {
@ApiModelProperty
(
"标准名称(检验依据)"
)
private
String
name
;
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
d57d1e54
...
...
@@ -58,6 +58,7 @@
<result
property=
"leader"
column=
"leader"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewStatus"
column=
"review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"carReviewStatus"
column=
"car_review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"standardNo"
column=
"standard_no"
jdbcType=
"BIGINT"
/>
</resultMap>
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.TaskListRequest"
resultMap=
"BaseResultMap"
>
...
...
@@ -87,6 +88,7 @@
t.leader_id,t.leader,
t.task_begin_time,
t.product_model,
t.standard_no,
srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time,
srt.task_status review_status,
...
...
@@ -167,6 +169,7 @@
t.leader_id,t.leader,
t.task_begin_time,
t.task_end_time,
t.standard_no,
srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time,
srt.task_status review_status,
...
...
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