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
3738eea8
Commit
3738eea8
authored
Feb 18, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into gaoying
parents
2c440960
eaaf04b0
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
896 additions
and
259 deletions
+896
-259
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+36
-44
TaskSampleRelation.java
...ew/src/main/java/com/ruoyi/domain/TaskSampleRelation.java
+51
-0
SampleManagementMapper.java
...rc/main/java/com/ruoyi/mapper/SampleManagementMapper.java
+4
-0
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+5
-2
TaskSampleRelationMapper.java
.../main/java/com/ruoyi/mapper/TaskSampleRelationMapper.java
+19
-0
CarReviewTaskService.java
...src/main/java/com/ruoyi/service/CarReviewTaskService.java
+5
-0
SystemReviewTaskService.java
.../main/java/com/ruoyi/service/SystemReviewTaskService.java
+6
-0
TaskSampleRelationService.java
...ain/java/com/ruoyi/service/TaskSampleRelationService.java
+11
-0
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+12
-3
TaskState.java
...ity-review/src/main/java/com/ruoyi/service/TaskState.java
+14
-0
CarReviewTaskServiceImpl.java
...java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
+6
-1
StrategyCarReviewTaskSigned.java
...a/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
+4
-1
StrategySystemReviewTaskSigned.java
...om/ruoyi/service/impl/StrategySystemReviewTaskSigned.java
+4
-1
SystemReviewTaskServiceImpl.java
...a/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
+6
-1
TaskSampleRelationServiceImpl.java
...com/ruoyi/service/impl/TaskSampleRelationServiceImpl.java
+22
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+96
-35
TaskStateContext.java
...rc/main/java/com/ruoyi/service/impl/TaskStateContext.java
+24
-0
TaskStateFacade.java
...src/main/java/com/ruoyi/service/impl/TaskStateFacade.java
+32
-0
TaskStateFinish.java
...src/main/java/com/ruoyi/service/impl/TaskStateFinish.java
+44
-0
TaskStateNew.java
...ew/src/main/java/com/ruoyi/service/impl/TaskStateNew.java
+90
-0
TaskStatePending.java
...rc/main/java/com/ruoyi/service/impl/TaskStatePending.java
+95
-0
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+18
-8
TaskCreateRequest.java
...rc/main/java/com/ruoyi/web/request/TaskCreateRequest.java
+17
-38
TaskEditRequest.java
.../src/main/java/com/ruoyi/web/request/TaskEditRequest.java
+16
-35
TaskFindFinishRequest.java
...ain/java/com/ruoyi/web/request/TaskFindFinishRequest.java
+12
-6
TaskFindPendingRequest.java
...in/java/com/ruoyi/web/request/TaskFindPendingRequest.java
+12
-6
TaskFindRequest.java
.../src/main/java/com/ruoyi/web/request/TaskFindRequest.java
+31
-0
SampleListResponse.java
.../main/java/com/ruoyi/web/response/SampleListResponse.java
+28
-0
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+9
-3
TaskGetInfoResponse.java
...main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
+27
-38
SampleManagementMapper.xml
...view/src/main/resources/mapper/SampleManagementMapper.xml
+16
-1
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+96
-36
TaskSampleRelationMapper.xml
...ew/src/main/resources/mapper/TaskSampleRelationMapper.xml
+28
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
3738eea8
...
@@ -24,18 +24,32 @@ import java.util.List;
...
@@ -24,18 +24,32 @@ import java.util.List;
public
class
Task
{
public
class
Task
{
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
public
static
final
String
STATUS_RUNNABLE
=
"RUNNABLE"
;
public
static
final
String
RUN_
STATUS_RUNNABLE
=
"RUNNABLE"
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
public
static
final
String
STATUS_RUNNING
=
"RUNNING"
;
public
static
final
String
RUN_STATUS_STATUS_RUNNING
=
"RUNNING"
;
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_NEW
=
"NEW"
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
public
static
final
String
STATUS_FINISH
=
"FINISH"
;
public
static
final
String
TASK_STATUS_PENDING
=
"PENDING"
;
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_FINISH
=
"FINISH"
;
/**
* 汽车信息安全一般要求
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
public
static
final
String
SUB_TASK_GRFIS
=
"grfis"
;
public
static
final
String
SUB_TASK_GRFIS
=
"grfis"
;
/**
* 汽车信息安全技术要求
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
public
static
final
String
SUB_TASK_TRFIS
=
"trfis"
;
public
static
final
String
SUB_TASK_TRFIS
=
"trfis"
;
/**
* 汽车信息安全管理体系要求
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
public
static
final
String
SUB_TASK_SRAIF
=
"sraif"
;
public
static
final
String
SUB_TASK_SRAIF
=
"sraif"
;
...
@@ -52,22 +66,28 @@ public class Task {
...
@@ -52,22 +66,28 @@ public class Task {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
carReviewTaskId
;
private
Long
carReviewTaskId
;
@ApiModelProperty
(
"任务状态NEW(新建的)、PENDING(运行中的)、FINISH(已结束的)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"任务编号"
)
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
private
String
taskNo
;
@ApiModelProperty
(
"任务名称"
)
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
private
String
taskName
;
@ApiModelProperty
(
"任务状态(NEW、FINISH)"
)
@ApiModelProperty
(
"保密等级"
)
private
String
taskStatus
;
private
String
confidentialityLevel
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"产品名称"
)
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
private
String
productName
;
@ApiModelProperty
(
"
产品型号
"
)
@ApiModelProperty
(
"
车辆型号(产品型号)
"
)
private
String
productModel
;
private
String
productModel
;
@ApiModelProperty
(
"委托单位"
)
@ApiModelProperty
(
"委托单位"
)
...
@@ -82,42 +102,14 @@ public class Task {
...
@@ -82,42 +102,14 @@ public class Task {
@ApiModelProperty
(
"委托单位邮政编码"
)
@ApiModelProperty
(
"委托单位邮政编码"
)
private
String
entrustedUnitCode
;
private
String
entrustedUnitCode
;
@ApiModelProperty
(
"车辆类型"
)
@ApiModelProperty
(
"整车样品信息"
)
private
String
carType
;
private
String
vehicleSampleInformation
;
@ApiModelProperty
(
"车辆识别码"
)
private
String
carIdentificationCode
;
@ApiModelProperty
(
"保密等级"
)
private
String
confidentialityLevel
;
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
@ApiModelProperty
(
"生产企业id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
productionId
;
@ApiModelProperty
(
"生产企业"
)
private
String
productionEnterprise
;
@ApiModelProperty
(
"送样者"
)
private
String
sampleSender
;
@ApiModelProperty
(
"送样日期"
)
private
Date
sendDate
;
@ApiModelProperty
(
"样品数量"
)
private
String
sampleNumber
;
@ApiModelProperty
(
"生产日期"
)
private
Date
productionDate
;
@ApiModelProperty
(
"
商标
"
)
@ApiModelProperty
(
"
零件样品信息
"
)
private
String
trademark
;
private
String
partSampleInformation
;
@ApiModelProperty
(
"
检验依据
"
)
@ApiModelProperty
(
"
任务发起人id
"
)
private
String
inspectionBasis
;
private
Long
taskInitiatorId
;
@ApiModelProperty
(
"任务发起人姓名"
)
@ApiModelProperty
(
"任务发起人姓名"
)
private
String
taskInitiator
;
private
String
taskInitiator
;
...
@@ -146,7 +138,7 @@ public class Task {
...
@@ -146,7 +138,7 @@ public class Task {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联标准表id"
)
@ApiModelProperty
(
"关联标准表id
(检验依据)
"
)
private
Long
standardId
;
private
Long
standardId
;
...
...
quality-review/src/main/java/com/ruoyi/domain/TaskSampleRelation.java
0 → 100644
View file @
3738eea8
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
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 任务表
*/
@ApiModel
@TableName
(
value
=
"t_task_sample_relation"
,
autoResultMap
=
true
)
@Accessors
(
chain
=
true
)
@Data
public
class
TaskSampleRelation
{
/**
* 整车样品
*/
@TableField
(
exist
=
false
)
public
static
final
String
COMPLETE_VEHICLE_SAMPLE
=
"0"
;
/**
* 零部件样品
*/
@TableField
(
exist
=
false
)
public
static
final
String
PART_VEHICLE_SAMPLE
=
"1"
;
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
@ApiModelProperty
(
"任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
taskId
;
@ApiModelProperty
(
"样品id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
sampleId
;
@ApiModelProperty
(
"0:整车样品 1:零部件样品"
)
private
String
flag
;
}
quality-review/src/main/java/com/ruoyi/mapper/SampleManagementMapper.java
View file @
3738eea8
...
@@ -2,7 +2,9 @@ package com.ruoyi.mapper;
...
@@ -2,7 +2,9 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.web.request.SampleManagementRequest
;
import
com.ruoyi.web.request.SampleManagementRequest
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -57,4 +59,6 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
...
@@ -57,4 +59,6 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
* */
* */
public
List
<
Sample
>
selectSampleList
(
SampleManagementRequest
sampleManagementRequest
);
public
List
<
Sample
>
selectSampleList
(
SampleManagementRequest
sampleManagementRequest
);
List
<
Sample
>
findByIdList
(
@Param
(
"relationList"
)
List
<
TaskSampleRelation
>
relationList
);
}
}
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
3738eea8
...
@@ -4,8 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,8 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.web.request.TaskFindFinishRequest
;
import
com.ruoyi.web.request.TaskFindFinishRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskFindRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFind
Pending
Response
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -16,10 +17,12 @@ public interface TaskMapper extends BaseMapper<Task> {
...
@@ -16,10 +17,12 @@ public interface TaskMapper extends BaseMapper<Task> {
List
<
Task
>
findList
(
TaskListRequest
request
);
List
<
Task
>
findList
(
TaskListRequest
request
);
List
<
TaskFind
Pending
Response
>
findPending
(
TaskFindPendingRequest
request
);
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
);
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
);
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
);
List
<
TaskFindResponse
>
findByUserId
(
@Param
(
"request"
)
TaskFindRequest
request
,
@Param
(
"userId"
)
Long
userId
);
Long
findByCarReviewTaskId
(
@Param
(
"carReviewId"
)
Long
carReviewId
);
Long
findByCarReviewTaskId
(
@Param
(
"carReviewId"
)
Long
carReviewId
);
Long
findBySystemReviewTaskId
(
@Param
(
"systemReviewId"
)
Long
systemReviewId
);
Long
findBySystemReviewTaskId
(
@Param
(
"systemReviewId"
)
Long
systemReviewId
);
...
...
quality-review/src/main/java/com/ruoyi/mapper/TaskSampleRelationMapper.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
TaskSampleRelationMapper
extends
BaseMapper
<
TaskSampleRelation
>
{
/**
* 根据任务id查询
* @param taskId
* @return
*/
List
<
TaskSampleRelation
>
selectByTaskId
(
@Param
(
"taskId"
)
Long
taskId
,
@Param
(
"flag"
)
String
flag
);
}
quality-review/src/main/java/com/ruoyi/service/CarReviewTaskService.java
View file @
3738eea8
...
@@ -41,6 +41,11 @@ public interface CarReviewTaskService extends IService<CarReviewTask> {
...
@@ -41,6 +41,11 @@ public interface CarReviewTaskService extends IService<CarReviewTask> {
*/
*/
void
startReviewTask
(
CarReviewTaskStartRequest
request
);
void
startReviewTask
(
CarReviewTaskStartRequest
request
);
/**
* 开始一个车辆审查任务中的问卷任务
*/
void
startReviewTask
(
Long
id
);
/**
/**
* 确认一个车辆审查任务中的问卷任务
* 确认一个车辆审查任务中的问卷任务
* @param request
* @param request
...
...
quality-review/src/main/java/com/ruoyi/service/SystemReviewTaskService.java
View file @
3738eea8
...
@@ -36,6 +36,12 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> {
...
@@ -36,6 +36,12 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> {
*/
*/
void
start
(
SystemReviewTaskStartRequest
request
);
void
start
(
SystemReviewTaskStartRequest
request
);
/**
* 开始一个任务
* @param id
*/
void
start
(
Long
id
);
/**
/**
* 根据状态查找体系审查任务
* 根据状态查找体系审查任务
* @return
* @return
...
...
quality-review/src/main/java/com/ruoyi/service/TaskSampleRelationService.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
java.util.List
;
public
interface
TaskSampleRelationService
extends
IService
<
TaskSampleRelation
>
{
List
<
TaskSampleRelation
>
selectByTaskId
(
Long
taskId
,
String
flag
);
}
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
3738eea8
...
@@ -3,8 +3,8 @@ package com.ruoyi.service;
...
@@ -3,8 +3,8 @@ 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.*
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.TaskFind
Pending
Response
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
org.apache.ibatis.annotations.Param
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
java.util.List
;
import
java.util.List
;
...
@@ -24,7 +24,7 @@ public interface TaskService extends IService<Task> {
...
@@ -24,7 +24,7 @@ public interface TaskService extends IService<Task> {
* @param request
* @param request
* @return
* @return
*/
*/
List
<
TaskFind
Pending
Response
>
findPending
(
TaskFindPendingRequest
request
);
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
);
/**
/**
* 查询完成的任务
* 查询完成的任务
...
@@ -38,4 +38,13 @@ public interface TaskService extends IService<Task> {
...
@@ -38,4 +38,13 @@ public interface TaskService extends IService<Task> {
void
deleteTask
(
TaskDeleteRequest
request
);
void
deleteTask
(
TaskDeleteRequest
request
);
void
startTask
(
TaskStartRequest
request
);
void
startTask
(
TaskStartRequest
request
);
/**
* 用户发起的任务
* @param request
* @return
*/
List
<
TaskFindResponse
>
findCreate
(
TaskFindRequest
request
,
Long
userId
);
TaskGetInfoResponse
getInfo
(
TaskGetInfoRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/TaskState.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.Task
;
import
java.util.List
;
public
interface
TaskState
{
void
doCreate
(
Task
task
,
List
<
String
>
taskList
);
void
doStart
(
Task
task
);
void
doSubmit
(
Task
task
);
}
quality-review/src/main/java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
View file @
3738eea8
...
@@ -113,7 +113,12 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
...
@@ -113,7 +113,12 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
@Override
@Override
public
void
startReviewTask
(
CarReviewTaskStartRequest
request
)
{
public
void
startReviewTask
(
CarReviewTaskStartRequest
request
)
{
CarReviewTask
carReviewTask
=
carReviewTaskService
.
getById
(
request
.
getTaskId
());
startReviewTask
(
request
.
getTaskId
());
}
@Override
public
void
startReviewTask
(
Long
id
)
{
CarReviewTask
carReviewTask
=
carReviewTaskService
.
getById
(
id
);
strategyCarReviewTaskContext
.
getResource
(
carReviewTask
.
getTaskStatus
()).
doStartReview
(
carReviewTask
);
strategyCarReviewTaskContext
.
getResource
(
carReviewTask
.
getTaskStatus
()).
doStartReview
(
carReviewTask
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
View file @
3738eea8
...
@@ -43,6 +43,9 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
...
@@ -43,6 +43,9 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
@Autowired
@Autowired
private
TaskMapper
taskMapper
;
private
TaskMapper
taskMapper
;
@Autowired
private
TaskStateFacade
taskStateFacade
;
// SIGNED状态下
// SIGNED状态下
// 1.standard字段使用task中归档的问卷
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
// 2.不查询场景变更任务
...
@@ -84,7 +87,7 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
...
@@ -84,7 +87,7 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
Task
task
=
taskMapper
.
selectById
(
taskMapper
.
findByCarReviewTaskId
(
carReviewTask
.
getId
()));
Task
task
=
taskMapper
.
selectById
(
taskMapper
.
findByCarReviewTaskId
(
carReviewTask
.
getId
()));
task
.
setTaskStatus
(
Task
.
STATUS_RUNNABLE
);
task
StateFacade
.
doSubmit
(
task
);
carReviewTaskMapper
.
updateById
(
carReviewTask
);
carReviewTaskMapper
.
updateById
(
carReviewTask
);
taskMapper
.
updateById
(
task
);
taskMapper
.
updateById
(
task
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskSigned.java
View file @
3738eea8
...
@@ -42,6 +42,9 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
...
@@ -42,6 +42,9 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
@Autowired
@Autowired
private
TaskMapper
taskMapper
;
private
TaskMapper
taskMapper
;
@Autowired
private
TaskStateFacade
taskStateFacade
;
@Override
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
...
@@ -73,7 +76,7 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
...
@@ -73,7 +76,7 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
Task
task
=
taskMapper
.
selectById
(
taskMapper
.
findBySystemReviewTaskId
(
systemReviewTask
.
getId
()));
Task
task
=
taskMapper
.
selectById
(
taskMapper
.
findBySystemReviewTaskId
(
systemReviewTask
.
getId
()));
task
.
setTaskStatus
(
Task
.
STATUS_RUNNABLE
);
task
StateFacade
.
doSubmit
(
task
);
systemReviewTaskMapper
.
updateById
(
systemReviewTask
);
systemReviewTaskMapper
.
updateById
(
systemReviewTask
);
taskMapper
.
updateById
(
task
);
taskMapper
.
updateById
(
task
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
View file @
3738eea8
...
@@ -102,7 +102,12 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
...
@@ -102,7 +102,12 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
@Override
@Override
public
void
start
(
SystemReviewTaskStartRequest
request
)
{
public
void
start
(
SystemReviewTaskStartRequest
request
)
{
SystemReviewTask
systemReviewTask
=
systemReviewTaskService
.
getById
(
request
.
getTaskId
());
start
(
request
.
getTaskId
());
}
@Override
public
void
start
(
Long
id
)
{
SystemReviewTask
systemReviewTask
=
systemReviewTaskService
.
getById
(
id
);
strategySystemReviewTaskContext
.
getResource
(
systemReviewTask
.
getTaskStatus
()).
doStart
(
systemReviewTask
);
strategySystemReviewTaskContext
.
getResource
(
systemReviewTask
.
getTaskStatus
()).
doStart
(
systemReviewTask
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskSampleRelationServiceImpl.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.mapper.TaskSampleRelationMapper
;
import
com.ruoyi.service.TaskSampleRelationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
TaskSampleRelationServiceImpl
extends
ServiceImpl
<
TaskSampleRelationMapper
,
TaskSampleRelation
>
implements
TaskSampleRelationService
{
@Autowired
private
TaskSampleRelationMapper
taskSampleRelationMapper
;
@Override
public
List
<
TaskSampleRelation
>
selectByTaskId
(
Long
taskId
,
String
flag
)
{
return
taskSampleRelationMapper
.
selectByTaskId
(
taskId
,
flag
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
3738eea8
package
com
.
ruoyi
.
service
.
impl
;
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.core.domain.entity.SysDictData
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.mapper.*
;
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.*
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.TaskFind
Pending
Response
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
org.checkerframework.checker.units.qual.A
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -59,6 +57,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -59,6 +57,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
@Autowired
@Autowired
private
AutomobileEnterpriseMapper
automobileEnterpriseMapper
;
private
AutomobileEnterpriseMapper
automobileEnterpriseMapper
;
@Autowired
private
TaskStateFacade
taskStateFacade
;
@Autowired
private
TaskSampleRelationService
taskSampleRelationService
;
@Autowired
private
SampleManagementMapper
sampleManagementMapper
;
@Override
@Override
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
return
taskMapper
.
findList
(
request
);
return
taskMapper
.
findList
(
request
);
...
@@ -85,9 +93,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -85,9 +93,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
// 构建并保存任务信息
// 构建并保存任务信息
// 总任务
// 总任务
Task
task
=
new
Task
();
Task
task
=
new
Task
();
task
.
setTaskInitiatorId
(
loginUser
.
getUserId
());
task
.
setTaskInitiator
(
initiator
.
getNickName
());
task
.
setTaskInitiator
(
initiator
.
getNickName
());
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
task
.
setTaskStatus
(
Task
.
STATUS_RUNNABLE
);
task
.
setTaskStatus
(
Task
.
TASK_STATUS_NEW
);
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeader
(
leader
.
getName
());
task
.
setLeader
(
leader
.
getName
());
task
.
setCreateTime
(
new
Date
());
task
.
setCreateTime
(
new
Date
());
...
@@ -95,27 +104,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -95,27 +104,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
task
.
setStandardNo
(
standard
.
getStandardNo
());
task
.
setStandardNo
(
standard
.
getStandardNo
());
task
.
setFile
(
standard
.
getFile
());
task
.
setFile
(
standard
.
getFile
());
BeanUtils
.
copyBeanProp
(
task
,
request
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
AutomobileEnterprise
automobileEnterprise
=
automobileEnterpriseMapper
.
selectAutomobileEnterpriseById
(
request
.
getProductionId
());
task
.
setProductionEnterprise
(
automobileEnterprise
.
getEnterpriseName
());
String
nextNode
=
null
;
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_TRFIS
))
{
nextNode
=
Task
.
SUB_TASK_TRFIS
;
}
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
))
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
))
{
// 保存车型审查问卷任务
// 保存车型审查问卷任务
nextNode
=
Task
.
SUB_TASK_GRFIS
;;
task
.
setCarReviewTaskId
(
saveCarReview
(
request
,
initiator
,
standard
,
leader
));
task
.
setCarReviewTaskId
(
saveCarReview
(
request
,
initiator
,
standard
,
leader
));
}
}
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
))
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
))
{
// 保存体系审查任务
// 保存体系审查任务
nextNode
=
Task
.
SUB_TASK_SRAIF
;
task
.
setSystemReviewTaskId
(
saveSystemReview
(
request
,
initiator
,
standard
,
leader
));
task
.
setSystemReviewTaskId
(
saveSystemReview
(
request
,
initiator
,
standard
,
leader
));
}
}
task
.
setNextNode
(
nextNode
);
taskService
.
save
(
task
);
taskService
.
save
(
task
);
// 构建并保存该任务所关联的审核组信息
// 构建并保存该任务所关联的审核组信息
...
@@ -125,12 +123,34 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -125,12 +123,34 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
taskUserRelationService
.
saveBatch
(
auditors
);
taskUserRelationService
.
saveBatch
(
auditors
);
// 保存关联的整车样品信息
List
<
TaskSampleRelation
>
relations
=
request
.
getSample
();
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
for
(
TaskSampleRelation
sampleRelation
:
relations
)
{
sampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
saveBatch
(
relations
);
}
// 保存关联的零部件样品信息
List
<
TaskSampleRelation
>
partRelations
=
request
.
getPartSample
();
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
for
(
TaskSampleRelation
sampleRelation
:
partRelations
)
{
sampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
saveBatch
(
partRelations
);
}
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
}
}
@Override
@Override
public
List
<
TaskFind
Pending
Response
>
findPending
(
TaskFindPendingRequest
request
)
{
public
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
)
{
List
<
TaskFind
Pending
Response
>
responses
=
taskMapper
.
findPending
(
request
);
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findPending
(
request
);
for
(
TaskFind
Pending
Response
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
response
.
setSystemReview
(
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
));
response
.
setSystemReview
(
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
));
}
}
...
@@ -173,6 +193,26 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -173,6 +193,26 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
auditor
.
setTaskId
(
task
.
getId
());
auditor
.
setTaskId
(
task
.
getId
());
}
}
taskUserRelationService
.
updateBatchById
(
auditors
);
taskUserRelationService
.
updateBatchById
(
auditors
);
// 保存关联的整车样品信息
List
<
TaskSampleRelation
>
relations
=
request
.
getSample
();
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
for
(
TaskSampleRelation
sampleRelation
:
relations
)
{
sampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
updateBatchById
(
relations
);
}
// 保存关联的零部件样品信息
List
<
TaskSampleRelation
>
partRelations
=
request
.
getPartSample
();
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
for
(
TaskSampleRelation
sampleRelation
:
partRelations
)
{
sampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
updateBatchById
(
partRelations
);
}
}
}
@Override
@Override
...
@@ -187,26 +227,47 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -187,26 +227,47 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
@Override
@Override
public
void
startTask
(
TaskStartRequest
request
)
{
public
void
startTask
(
TaskStartRequest
request
)
{
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
taskStateFacade
.
doStart
(
task
);
}
SystemReviewTaskStartRequest
systemRequest
=
new
SystemReviewTaskStartRequest
();
@Override
systemRequest
.
setTaskId
(
task
.
getSystemReviewTaskId
());
public
List
<
TaskFindResponse
>
findCreate
(
TaskFindRequest
request
,
Long
userId
)
{
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
CarReviewTaskStartRequest
carRequest
=
new
CarReviewTaskStartRequest
();
for
(
TaskFindResponse
response
:
responses
)
{
carRequest
.
setTaskId
(
task
.
getCarReviewTaskId
());
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
response
.
setSystemReview
(
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
));
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_SRAIF
))
{
}
systemReviewTaskService
.
start
(
systemRequest
);
if
(
response
.
getCarReviewTaskId
()
!=
null
)
{
task
.
setTaskStatus
(
Task
.
STATUS_RUNNING
);
response
.
setCarReview
(
reviewDetailsMapper
.
count
(
response
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
));
task
.
setNextNode
(
Task
.
SUB_TASK_GRFIS
);
}
}
return
responses
;
}
taskMapper
.
updateById
(
task
);
@Override
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
public
TaskGetInfoResponse
getInfo
(
TaskGetInfoRequest
request
)
{
carReviewTaskService
.
startReviewTask
(
carRequest
);
task
.
setTaskStatus
(
Task
.
STATUS_RUNNING
);
TaskGetInfoResponse
response
=
new
TaskGetInfoResponse
();
task
.
setNextNode
(
Task
.
SUB_TASK_TRFIS
);
Task
task
=
taskService
.
getById
(
request
.
getId
());
BeanUtils
.
copyBeanProp
(
response
,
task
);
// 小组成员
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
request
.
getId
());
response
.
setAuditors
(
relation
);
// 整车样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
if
(
relationList
.
size
()
!=
0
&&
relationList
!=
null
)
{
List
<
Sample
>
completeVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
relationList
);
response
.
setCompleteVehicleSample
(
completeVehicleSampleList
);
}
taskMapper
.
updateById
(
task
);
// 零部件样品信息
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
);
if
(
partRelationList
.
size
()
!=
0
&&
partRelationList
!=
null
)
{
List
<
Sample
>
partVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
partRelationList
);
response
.
setPartVehicleSample
(
partVehicleSampleList
);
}
}
return
response
;
}
}
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/service/impl/TaskStateContext.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.service.TaskState
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@Transactional
@Service
public
class
TaskStateContext
{
private
final
Map
<
String
,
TaskState
>
strategyMap
=
new
ConcurrentHashMap
<>();
public
void
putResource
(
String
key
,
TaskState
taskState
)
{
strategyMap
.
put
(
key
,
taskState
);
}
public
TaskState
getResource
(
String
operation
){
return
strategyMap
.
get
(
operation
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateFacade.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.service.TaskState
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Transactional
@Component
public
class
TaskStateFacade
implements
TaskState
{
@Autowired
private
TaskStateContext
taskStateContext
;
@Override
public
void
doCreate
(
Task
task
,
List
<
String
>
taskList
)
{
taskStateContext
.
getResource
(
task
.
getTaskStatus
()).
doCreate
(
task
,
taskList
);
}
@Override
public
void
doStart
(
Task
task
)
{
taskStateContext
.
getResource
(
task
.
getTaskStatus
()).
doStart
(
task
);
}
@Override
public
void
doSubmit
(
Task
task
)
{
taskStateContext
.
getResource
(
task
.
getTaskStatus
()).
doSubmit
(
task
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateFinish.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.service.TaskState
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Transactional
@Service
public
class
TaskStateFinish
implements
TaskState
,
InitializingBean
{
@Autowired
private
TaskStateContext
taskStateContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Override
public
void
doCreate
(
Task
task
,
List
<
String
>
taskList
)
{
throw
new
ServiceException
(
"不能创建一个已经结束的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
doStart
(
Task
task
)
{
throw
new
ServiceException
(
"不能开始一个已经结束的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
doSubmit
(
Task
task
)
{
throw
new
ServiceException
(
"不能完成一个已经结束的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
taskStateContext
.
putResource
(
Task
.
TASK_STATUS_FINISH
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateNew.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskService
;
import
com.ruoyi.service.TaskService
;
import
com.ruoyi.service.TaskState
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Objects
;
@Transactional
@Service
public
class
TaskStateNew
implements
TaskState
,
InitializingBean
{
@Autowired
private
TaskStateContext
taskStateContext
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
TaskService
taskService
;
@Autowired
private
SystemReviewTaskService
systemReviewTaskService
;
@Autowired
private
CarReviewTaskService
carReviewTaskService
;
@Override
public
void
doCreate
(
Task
task
,
List
<
String
>
taskList
)
{
String
nextNode
=
null
;
if
(
taskList
.
contains
(
Task
.
SUB_TASK_TRFIS
))
{
nextNode
=
Task
.
SUB_TASK_TRFIS
;
}
if
(
taskList
.
contains
(
Task
.
SUB_TASK_GRFIS
))
{
// 保存车型审查问卷任务
nextNode
=
Task
.
SUB_TASK_GRFIS
;;
}
if
(
taskList
.
contains
(
Task
.
SUB_TASK_SRAIF
))
{
// 保存体系审查任务
nextNode
=
Task
.
SUB_TASK_SRAIF
;
}
task
.
setNextNode
(
nextNode
);
taskService
.
updateById
(
task
);
}
@Override
public
void
doStart
(
Task
task
)
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_PENDING
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_STATUS_RUNNING
);
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_SRAIF
))
{
systemReviewTaskService
.
start
(
task
.
getSystemReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_GRFIS
);
taskService
.
updateById
(
task
);
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
carReviewTaskService
.
startReviewTask
(
task
.
getCarReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_TRFIS
);
taskService
.
updateById
(
task
);
}
taskService
.
updateById
(
task
);
}
@Override
public
void
doSubmit
(
Task
task
)
{
throw
new
ServiceException
(
"不能提交一个尚未开始的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
taskStateContext
.
putResource
(
Task
.
TASK_STATUS_NEW
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskStatePending.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.domain.SystemReviewTask
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.service.SystemReviewTaskService
;
import
com.ruoyi.service.TaskService
;
import
com.ruoyi.service.TaskState
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Objects
;
@Transactional
@Service
public
class
TaskStatePending
implements
TaskState
,
InitializingBean
{
@Autowired
private
TaskStateContext
taskStateContext
;
private
ReviewDetailsMapper
reviewDetailsMapper
;
@Autowired
private
TaskService
taskService
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
SystemReviewTaskService
systemReviewTaskService
;
@Autowired
private
CarReviewTaskService
carReviewTaskService
;
@Override
public
void
doCreate
(
Task
task
,
List
<
String
>
taskList
)
{
throw
new
ServiceException
(
"不能创建一个已经开始的任务"
,
HttpStatus
.
ERROR
);
}
@Override
public
void
doStart
(
Task
task
)
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_PENDING
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_STATUS_RUNNING
);
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_SRAIF
))
{
systemReviewTaskService
.
start
(
task
.
getSystemReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_GRFIS
);
taskService
.
updateById
(
task
);
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
carReviewTaskService
.
startReviewTask
(
task
.
getCarReviewTaskId
());
task
.
setNextNode
(
Task
.
SUB_TASK_TRFIS
);
taskService
.
updateById
(
task
);
}
}
@Override
public
void
doSubmit
(
Task
task
)
{
long
subTaskCount
=
0
;
if
(
task
.
getSystemReviewTaskId
()
!=
null
)
{
subTaskCount
=
reviewDetailsMapper
.
count
(
task
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
);
}
if
(
task
.
getCarReviewTaskId
()
!=
null
)
{
subTaskCount
=
reviewDetailsMapper
.
count
(
task
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
);
}
if
(
subTaskCount
>
0
)
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_PENDING
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
}
else
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_FINISH
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_STATUS_RUNNING
);
}
taskService
.
updateById
(
task
);
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
taskStateContext
.
putResource
(
Task
.
TASK_STATUS_PENDING
,
applicationContext
.
getBean
(
this
.
getClass
()));
}
}
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
3738eea8
...
@@ -7,11 +7,13 @@ import com.ruoyi.common.core.page.TableDataInfo;
...
@@ -7,11 +7,13 @@ import com.ruoyi.common.core.page.TableDataInfo;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.service.TaskSampleRelationService
;
import
com.ruoyi.service.TaskService
;
import
com.ruoyi.service.TaskService
;
import
com.ruoyi.service.TaskUserRelationService
;
import
com.ruoyi.service.TaskUserRelationService
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.TaskFind
Pending
Response
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -37,6 +39,9 @@ public class TaskController extends BaseController {
...
@@ -37,6 +39,9 @@ public class TaskController extends BaseController {
@Autowired
@Autowired
private
TaskUserRelationService
taskUserRelationService
;
private
TaskUserRelationService
taskUserRelationService
;
@Autowired
private
TaskSampleRelationService
taskSampleRelationService
;
@ApiOperation
(
"查询任务列表"
)
@ApiOperation
(
"查询任务列表"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
...
@@ -62,20 +67,25 @@ public class TaskController extends BaseController {
...
@@ -62,20 +67,25 @@ public class TaskController extends BaseController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getInfo"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getInfo"
)
public
R
<
TaskGetInfoResponse
>
getInfo
(
@Validated
@RequestBody
TaskGetInfoRequest
request
)
{
public
R
<
TaskGetInfoResponse
>
getInfo
(
@Validated
@RequestBody
TaskGetInfoRequest
request
)
{
TaskGetInfoResponse
response
=
new
TaskGetInfoResponse
();
TaskGetInfoResponse
response
=
taskService
.
getInfo
(
request
);
Task
task
=
taskService
.
getById
(
request
.
getId
());
BeanUtils
.
copyBeanProp
(
response
,
task
);
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
request
.
getId
());
response
.
setAuditors
(
relation
);
return
R
.
ok
(
response
);
return
R
.
ok
(
response
);
}
}
@ApiOperation
(
"用户发布的任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findCreate"
)
public
TableDataInfo
<
TaskFindResponse
>
findCreate
(
@Validated
@RequestBody
TaskFindRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
taskService
.
findCreate
(
request
,
getUserId
()));
}
@ApiOperation
(
"查询处理中的任务"
)
@ApiOperation
(
"查询处理中的任务"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
public
TableDataInfo
<
TaskFind
Pending
Response
>
findPending
(
@Validated
@RequestBody
TaskFindPendingRequest
request
)
{
public
TableDataInfo
<
TaskFindResponse
>
findPending
(
@Validated
@RequestBody
TaskFindPendingRequest
request
)
{
startPage
(
request
);
startPage
(
request
);
return
getDataTable
(
taskService
.
findPending
(
request
));
return
getDataTable
(
taskService
.
findPending
(
request
));
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/TaskCreateRequest.java
View file @
3738eea8
...
@@ -2,6 +2,7 @@ package com.ruoyi.web.request;
...
@@ -2,6 +2,7 @@ package com.ruoyi.web.request;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.domain.entity.SysDictData
;
import
com.ruoyi.common.core.domain.entity.SysDictData
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -18,16 +19,26 @@ public class TaskCreateRequest {
...
@@ -18,16 +19,26 @@ public class TaskCreateRequest {
@ApiModelProperty
(
"小组成员"
)
@ApiModelProperty
(
"小组成员"
)
private
List
<
TaskUserRelation
>
auditors
;
private
List
<
TaskUserRelation
>
auditors
;
/**
* 标准id
* 根据哪个标准新建的审查任务
*/
@ApiModelProperty
(
"标准id(检验依据)"
)
private
Long
standardId
;
@ApiModelProperty
(
"任务编号"
)
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
private
String
taskNo
;
@ApiModelProperty
(
"任务名称"
)
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
private
String
taskName
;
@ApiModelProperty
(
"保密等级"
)
private
String
confidentialityLevel
;
@ApiModelProperty
(
"产品名称"
)
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
private
String
productName
;
@ApiModelProperty
(
"
产品型号
"
)
@ApiModelProperty
(
"
车辆型号(产品型号)
"
)
private
String
productModel
;
private
String
productModel
;
@ApiModelProperty
(
"委托单位"
)
@ApiModelProperty
(
"委托单位"
)
...
@@ -42,46 +53,14 @@ public class TaskCreateRequest {
...
@@ -42,46 +53,14 @@ public class TaskCreateRequest {
@ApiModelProperty
(
"委托单位邮政编码"
)
@ApiModelProperty
(
"委托单位邮政编码"
)
private
String
entrustedUnitCode
;
private
String
entrustedUnitCode
;
@ApiModelProperty
(
"车辆类型"
)
@ApiModelProperty
(
"整车样品信息"
)
private
String
carType
;
private
List
<
TaskSampleRelation
>
sample
;
@ApiModelProperty
(
"车辆识别码"
)
private
String
carIdentificationCode
;
@ApiModelProperty
(
"保密等级"
)
private
String
confidentialityLevel
;
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
@ApiModelProperty
(
"生产企业id"
)
private
Long
productionId
;
@ApiModelProperty
(
"送样者"
)
private
String
sampleSender
;
@ApiModelProperty
(
"送样日期"
)
private
Date
sendDate
;
@ApiModelProperty
(
"样品数量"
)
private
String
sampleNumber
;
@ApiModelProperty
(
"生产日期"
)
private
Date
productionDate
;
@ApiModelProperty
(
"商标"
)
private
String
trademark
;
@ApiModelProperty
(
"
检验依据
"
)
@ApiModelProperty
(
"
零部件样品信息
"
)
private
String
inspectionBasis
;
private
List
<
TaskSampleRelation
>
partSample
;
@ApiModelProperty
(
"选择的任务"
)
@ApiModelProperty
(
"选择的任务"
)
List
<
String
>
taskList
;
List
<
String
>
taskList
;
/**
* 标准id
* 根据哪个标准新建的审查任务
*/
@ApiModelProperty
(
"标准id(根据哪个标准新建的任务)"
)
private
Long
standardId
;
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskEditRequest.java
View file @
3738eea8
package
com
.
ruoyi
.
web
.
request
;
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -12,22 +13,29 @@ import java.util.List;
...
@@ -12,22 +13,29 @@ import java.util.List;
@Data
@Data
public
class
TaskEditRequest
{
public
class
TaskEditRequest
{
@ApiModelProperty
(
"ID"
)
private
Long
id
;
@ApiModelProperty
(
"小组成员"
)
@ApiModelProperty
(
"小组成员"
)
private
List
<
TaskUserRelation
>
auditors
;
private
List
<
TaskUserRelation
>
auditors
;
/**
* 标准id
* 根据哪个标准新建的审查任务
*/
@ApiModelProperty
(
"标准id(检验依据)"
)
private
Long
standardId
;
@ApiModelProperty
(
"任务编号"
)
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
private
String
taskNo
;
@ApiModelProperty
(
"任务名称"
)
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
private
String
taskName
;
@ApiModelProperty
(
"保密等级"
)
private
String
confidentialityLevel
;
@ApiModelProperty
(
"产品名称"
)
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
private
String
productName
;
@ApiModelProperty
(
"
产品型号
"
)
@ApiModelProperty
(
"
车辆型号(产品型号)
"
)
private
String
productModel
;
private
String
productModel
;
@ApiModelProperty
(
"委托单位"
)
@ApiModelProperty
(
"委托单位"
)
...
@@ -42,38 +50,11 @@ public class TaskEditRequest {
...
@@ -42,38 +50,11 @@ public class TaskEditRequest {
@ApiModelProperty
(
"委托单位邮政编码"
)
@ApiModelProperty
(
"委托单位邮政编码"
)
private
String
entrustedUnitCode
;
private
String
entrustedUnitCode
;
@ApiModelProperty
(
"车辆类型"
)
@ApiModelProperty
(
"整车样品信息"
)
private
String
carType
;
private
List
<
TaskSampleRelation
>
sample
;
@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
(
"
检验依据
"
)
@ApiModelProperty
(
"
零部件样品信息
"
)
private
String
inspectionBasis
;
private
List
<
TaskSampleRelation
>
partSample
;
@ApiModelProperty
(
"选择的任务"
)
@ApiModelProperty
(
"选择的任务"
)
List
<
String
>
taskList
;
List
<
String
>
taskList
;
...
...
quality-review/src/main/java/com/ruoyi/web/request/TaskFindFinishRequest.java
View file @
3738eea8
...
@@ -11,12 +11,18 @@ import java.util.Date;
...
@@ -11,12 +11,18 @@ import java.util.Date;
@Data
@Data
public
class
TaskFindFinishRequest
extends
PageDomain
{
public
class
TaskFindFinishRequest
extends
PageDomain
{
@ApiModelProperty
(
"
任务编号或名称关键词
"
)
@ApiModelProperty
(
"
检验依据
"
)
private
String
taskNoOrName
;
private
Long
standardId
;
@ApiModelProperty
(
"任务
开始时间
"
)
@ApiModelProperty
(
"任务
编号
"
)
private
Date
taskBeginTime
;
private
String
taskNo
;
@ApiModelProperty
(
"任务结束时间"
)
@ApiModelProperty
(
"任务名称"
)
private
Date
taskEndTime
;
private
String
taskName
;
@ApiModelProperty
(
"车辆型号"
)
private
String
productModel
;
@ApiModelProperty
(
"检验项目"
)
private
String
inspectionItem
;
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskFindPendingRequest.java
View file @
3738eea8
...
@@ -11,12 +11,18 @@ import java.util.Date;
...
@@ -11,12 +11,18 @@ import java.util.Date;
@Data
@Data
public
class
TaskFindPendingRequest
extends
PageDomain
{
public
class
TaskFindPendingRequest
extends
PageDomain
{
@ApiModelProperty
(
"
任务编号或名称关键词
"
)
@ApiModelProperty
(
"
检验依据
"
)
private
String
taskNoOrName
;
private
Long
standardId
;
@ApiModelProperty
(
"任务
开始时间
"
)
@ApiModelProperty
(
"任务
编号
"
)
private
Date
taskBeginTime
;
private
String
taskNo
;
@ApiModelProperty
(
"子任务状态"
)
@ApiModelProperty
(
"任务名称"
)
private
String
subStatus
;
private
String
taskName
;
@ApiModelProperty
(
"车辆型号"
)
private
String
productModel
;
@ApiModelProperty
(
"检验项目"
)
private
String
inspectionItem
;
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskFindRequest.java
0 → 100644
View file @
3738eea8
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
;
import
java.util.Date
;
@ApiModel
(
value
=
"TaskFindRequest"
,
description
=
"用户创建的任务"
)
@Data
public
class
TaskFindRequest
extends
PageDomain
{
@ApiModelProperty
(
"检验依据"
)
private
Long
standardId
;
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
@ApiModelProperty
(
"车辆型号"
)
private
String
productModel
;
@ApiModelProperty
(
"检验项目"
)
private
String
inspectionItem
;
@ApiModelProperty
(
"任务状态"
)
private
String
taskStatus
;
}
quality-review/src/main/java/com/ruoyi/web/response/SampleListResponse.java
0 → 100644
View file @
3738eea8
package
com
.
ruoyi
.
web
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"SampleListResponse"
,
description
=
"样品信息"
)
@Data
public
class
SampleListResponse
{
@ApiModelProperty
(
"主键"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联车企的id"
)
private
Long
enterpriseId
;
@ApiModelProperty
(
"车辆识别码"
)
private
String
identificationCode
;
@ApiModelProperty
(
"样品编号"
)
private
String
sampleNumber
;
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskFind
Pending
Response.java
→
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
3738eea8
...
@@ -9,7 +9,7 @@ import java.util.Date;
...
@@ -9,7 +9,7 @@ import java.util.Date;
@ApiModel
(
value
=
"TaskFindPendingResponse"
,
description
=
"进行中的总任务"
)
@ApiModel
(
value
=
"TaskFindPendingResponse"
,
description
=
"进行中的总任务"
)
@Data
@Data
public
class
TaskFind
Pending
Response
{
public
class
TaskFindResponse
{
@ApiModelProperty
(
"主键"
)
@ApiModelProperty
(
"主键"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
...
@@ -29,9 +29,15 @@ public class TaskFindPendingResponse {
...
@@ -29,9 +29,15 @@ public class TaskFindPendingResponse {
@ApiModelProperty
(
"任务名称"
)
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
private
String
taskName
;
@ApiModelProperty
(
"车辆型号(产品型号)"
)
private
String
productModel
;
@ApiModelProperty
(
"任务状态(NEW、PENDING、FINISH)"
)
@ApiModelProperty
(
"任务状态(NEW、PENDING、FINISH)"
)
private
String
taskStatus
;
private
String
taskStatus
;
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
private
String
nextNode
;
...
@@ -54,7 +60,7 @@ public class TaskFindPendingResponse {
...
@@ -54,7 +60,7 @@ public class TaskFindPendingResponse {
@ApiModelProperty
(
"体系问卷任务开始时间"
)
@ApiModelProperty
(
"体系问卷任务开始时间"
)
private
Date
systemTaskBeginTime
;
private
Date
systemTaskBeginTime
;
@ApiModelProperty
(
"体系问卷任务
开始
时间"
)
@ApiModelProperty
(
"体系问卷任务
结束
时间"
)
private
Date
systemTaskEndTime
;
private
Date
systemTaskEndTime
;
@ApiModelProperty
(
"车型审查任务状态"
)
@ApiModelProperty
(
"车型审查任务状态"
)
...
@@ -66,7 +72,7 @@ public class TaskFindPendingResponse {
...
@@ -66,7 +72,7 @@ public class TaskFindPendingResponse {
@ApiModelProperty
(
"车辆问卷任务开始时间"
)
@ApiModelProperty
(
"车辆问卷任务开始时间"
)
private
Date
carTaskBeginTime
;
private
Date
carTaskBeginTime
;
@ApiModelProperty
(
"车辆问卷任务
开始
时间"
)
@ApiModelProperty
(
"车辆问卷任务
结束
时间"
)
private
Date
carTaskEndTime
;
private
Date
carTaskEndTime
;
@ApiModelProperty
(
"测试任务状态"
)
@ApiModelProperty
(
"测试任务状态"
)
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
View file @
3738eea8
...
@@ -3,6 +3,8 @@ package com.ruoyi.web.response;
...
@@ -3,6 +3,8 @@ package com.ruoyi.web.response;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.domain.TaskSampleRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -27,19 +29,28 @@ public class TaskGetInfoResponse {
...
@@ -27,19 +29,28 @@ public class TaskGetInfoResponse {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
carReviewTaskId
;
private
Long
carReviewTaskId
;
@ApiModelProperty
(
"任务状态NEW(新建的)、PENDING(运行中的)、FINISH(已结束的)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
@ApiModelProperty
(
"任务编号"
)
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
private
String
taskNo
;
@ApiModelProperty
(
"任务名称"
)
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
private
String
taskName
;
@ApiModelProperty
(
"
任务状态(NEW、PENDING、FINISH)
"
)
@ApiModelProperty
(
"
保密等级
"
)
private
String
taskStatus
;
private
String
confidentialityLevel
;
@ApiModelProperty
(
"产品名称"
)
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
private
String
productName
;
@ApiModelProperty
(
"
产品型号
"
)
@ApiModelProperty
(
"
车辆型号(产品型号)
"
)
private
String
productModel
;
private
String
productModel
;
@ApiModelProperty
(
"委托单位"
)
@ApiModelProperty
(
"委托单位"
)
...
@@ -54,42 +65,14 @@ public class TaskGetInfoResponse {
...
@@ -54,42 +65,14 @@ public class TaskGetInfoResponse {
@ApiModelProperty
(
"委托单位邮政编码"
)
@ApiModelProperty
(
"委托单位邮政编码"
)
private
String
entrustedUnitCode
;
private
String
entrustedUnitCode
;
@ApiModelProperty
(
"
车辆类型
"
)
@ApiModelProperty
(
"
整车样品信息
"
)
private
String
carType
;
private
String
vehicleSampleInformation
;
@ApiModelProperty
(
"
车辆识别码
"
)
@ApiModelProperty
(
"
零件样品信息
"
)
private
String
carIdentificationCode
;
private
String
partSampleInformation
;
@ApiModelProperty
(
"保密等级"
)
@ApiModelProperty
(
"任务发起人id"
)
private
String
confidentialityLevel
;
private
Long
taskInitiatorId
;
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
@ApiModelProperty
(
"生产企业id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
productionId
;
@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
(
"任务发起人姓名"
)
@ApiModelProperty
(
"任务发起人姓名"
)
private
String
taskInitiator
;
private
String
taskInitiator
;
...
@@ -118,7 +101,7 @@ public class TaskGetInfoResponse {
...
@@ -118,7 +101,7 @@ public class TaskGetInfoResponse {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联标准表id"
)
@ApiModelProperty
(
"关联标准表id
(检验依据)
"
)
private
Long
standardId
;
private
Long
standardId
;
...
@@ -135,4 +118,10 @@ public class TaskGetInfoResponse {
...
@@ -135,4 +118,10 @@ public class TaskGetInfoResponse {
@ApiModelProperty
(
"小组成员"
)
@ApiModelProperty
(
"小组成员"
)
private
List
<
TaskUserRelation
>
auditors
;
private
List
<
TaskUserRelation
>
auditors
;
@ApiModelProperty
(
"整车样品信息"
)
private
List
<
Sample
>
completeVehicleSample
;
@ApiModelProperty
(
"零件样品信息"
)
private
List
<
Sample
>
partVehicleSample
;
}
}
quality-review/src/main/resources/mapper/SampleManagementMapper.xml
View file @
3738eea8
...
@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sm.remark,
sm.remark,
sm.trademark,
sm.trademark,
sm.sample_photos,
sm.sample_photos,
sm.car_company_name
m
sm.car_company_name
from t_sample sm
from t_sample sm
</sql>
</sql>
...
@@ -164,4 +164,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -164,4 +164,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"flag != null and flag != ''"
>
and sm.flag = #{flag}
</if>
<if
test=
"flag != null and flag != ''"
>
and sm.flag = #{flag}
</if>
</where>
</where>
</select>
</select>
<resultMap
type=
"com.ruoyi.web.response.SampleListResponse"
id=
"SampleListResponse"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"identificationCode"
column=
"identification_code"
/>
<result
property=
"sampleNumber"
column=
"sample_number"
/>
<result
property=
"sampleName"
column=
"sample_name"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
</resultMap>
<select
id=
"findByIdList"
resultMap=
"SampleListResponse"
>
select id,identification_code,sample_number,sample_name,enterprise_id from t_sample
WHERE id IN
<foreach
collection=
"relationList"
item=
"relation"
open=
"("
separator=
","
close=
")"
>
#{relation.sampleId}
</foreach>
</select>
</mapper>
</mapper>
\ No newline at end of file
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
3738eea8
This diff is collapsed.
Click to expand it.
quality-review/src/main/resources/mapper/TaskSampleRelationMapper.xml
0 → 100644
View file @
3738eea8
<?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.TaskSampleRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.TaskSampleRelation"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"sampleId"
column=
"sample_id"
jdbcType=
"BIGINT"
/>
<result
property=
"flag"
column=
"flag"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
select id,task_id,sample_id,flag from t_task_sample_relation
</sql>
<select
id=
"selectByTaskId"
resultType=
"com.ruoyi.domain.TaskSampleRelation"
>
<include
refid=
"Base_Column_List"
/>
where
<if
test=
"taskId != null and taskId != ''"
>
task_id = #{taskId}
</if>
<if
test=
"flag != null and flag != ''"
>
and flag = #{flag}
</if>
</select>
</mapper>
\ No newline at end of file
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