Commit 3ffee819 authored by W_Y's avatar W_Y

任务表添加nextNode字段,状态修改

parent 0012c55f
...@@ -24,7 +24,9 @@ import java.util.List; ...@@ -24,7 +24,9 @@ import java.util.List;
public class Task { public class Task {
@TableField(exist = false) @TableField(exist = false)
public static final String STATUS_NEW = "NEW"; public static final String STATUS_RUNNABLE = "RUNNABLE";
@TableField(exist = false)
public static final String STATUS_RUNNING = "RUNNING";
@TableField(exist = false) @TableField(exist = false)
public static final String STATUS_FINISH = "FINISH"; public static final String STATUS_FINISH = "FINISH";
...@@ -59,6 +61,9 @@ public class Task { ...@@ -59,6 +61,9 @@ public class Task {
@ApiModelProperty("任务状态(NEW、FINISH)") @ApiModelProperty("任务状态(NEW、FINISH)")
private String taskStatus; private String taskStatus;
@ApiModelProperty("下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)")
private String nextNode;
@ApiModelProperty("产品名称") @ApiModelProperty("产品名称")
private String productName; private String productName;
......
...@@ -86,7 +86,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -86,7 +86,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
Task task = new Task(); Task task = new Task();
task.setTaskInitiator(initiator.getNickName()); task.setTaskInitiator(initiator.getNickName());
task.setTaskInitiatorDept(initiator.getDept().getDeptName()); task.setTaskInitiatorDept(initiator.getDept().getDeptName());
task.setTaskStatus(Task.STATUS_NEW); task.setTaskStatus(Task.STATUS_RUNNABLE);
task.setLeaderId(leader.getUserId()); task.setLeaderId(leader.getUserId());
task.setLeader(leader.getName()); task.setLeader(leader.getName());
task.setCreateTime(new Date()); task.setCreateTime(new Date());
...@@ -101,9 +101,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -101,9 +101,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
Long carReviewTaskId = null; Long carReviewTaskId = null;
if (request.getTaskList().contains(Task.SUB_TASK_SRAIF)) { if (request.getTaskList().contains(Task.SUB_TASK_SRAIF)) {
task.setNextNode(Task.SUB_TASK_SRAIF);
// 保存体系审查任务 // 保存体系审查任务
systemReviewTaskId = saveSystemReview(request,initiator,standard,leader); systemReviewTaskId = saveSystemReview(request,initiator,standard,leader);
} else if (request.getTaskList().contains(Task.SUB_TASK_GRFIS)) {
task.setNextNode(Task.SUB_TASK_GRFIS);
} else if (request.getTaskList().contains(Task.SUB_TASK_TRFIS)) {
task.setNextNode(Task.SUB_TASK_TRFIS);
} }
if (request.getTaskList().contains(Task.SUB_TASK_GRFIS)) { if (request.getTaskList().contains(Task.SUB_TASK_GRFIS)) {
// 保存车型审查问卷任务 // 保存车型审查问卷任务
carReviewTaskId = saveCarReview(request,initiator,standard,leader); carReviewTaskId = saveCarReview(request,initiator,standard,leader);
...@@ -211,7 +217,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -211,7 +217,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
.setLeaderId(leader.getUserId()) .setLeaderId(leader.getUserId())
.setLeader(leader.getName()) .setLeader(leader.getName())
.setCreateTime(new Date()) .setCreateTime(new Date())
.setTaskBeginTime(new Date())
.setStandardId(standard.getId()) .setStandardId(standard.getId())
.setName(standard.getName()) .setName(standard.getName())
.setStandardNo(standard.getStandardNo()) .setStandardNo(standard.getStandardNo())
......
...@@ -32,6 +32,9 @@ public class TaskFindPendingResponse { ...@@ -32,6 +32,9 @@ public class TaskFindPendingResponse {
@ApiModelProperty("任务状态(NEW、PENDING、FINISH)") @ApiModelProperty("任务状态(NEW、PENDING、FINISH)")
private String taskStatus; private String taskStatus;
@ApiModelProperty("下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)")
private String nextNode;
@ApiModelProperty("总任务开始时间") @ApiModelProperty("总任务开始时间")
private Date taskBeginTime; private Date taskBeginTime;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<result property="taskNo" column="task_no" jdbcType="VARCHAR"/> <result property="taskNo" column="task_no" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/> <result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/> <result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="nextNode" column="next_node" jdbcType="VARCHAR"/>
<result property="productName" column="product_name" jdbcType="VARCHAR"/> <result property="productName" column="product_name" jdbcType="VARCHAR"/>
<result property="productModel" column="product_model" jdbcType="VARCHAR"/> <result property="productModel" column="product_model" jdbcType="VARCHAR"/>
<result property="entrustedUnit" column="entrusted_unit" jdbcType="VARCHAR"/> <result property="entrustedUnit" column="entrusted_unit" jdbcType="VARCHAR"/>
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
<result property="taskNo" column="task_no" jdbcType="VARCHAR"/> <result property="taskNo" column="task_no" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/> <result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/> <result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="nextNode" column="next_node" jdbcType="VARCHAR"/>
<result property="taskBeginTime" column="task_begin_time" jdbcType="TIMESTAMP"/> <result property="taskBeginTime" column="task_begin_time" jdbcType="TIMESTAMP"/>
<result property="systemTaskBeginTime" column="system_task_begin_time" jdbcType="TIMESTAMP"/> <result property="systemTaskBeginTime" column="system_task_begin_time" jdbcType="TIMESTAMP"/>
<result property="systemTaskEndTime" column="system_task_end_time" jdbcType="TIMESTAMP"/> <result property="systemTaskEndTime" column="system_task_end_time" jdbcType="TIMESTAMP"/>
...@@ -62,7 +64,7 @@ ...@@ -62,7 +64,7 @@
<select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap"> <select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap">
SELECT id, system_review_task_id, car_review_task_id, SELECT id, system_review_task_id, car_review_task_id,
task_no,task_name,task_status,product_name,product_model, task_no,task_name,task_status,next_node,product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone, entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,car_type,car_identification_code, entrusted_unit_code,car_type,car_identification_code,
confidentiality_level,sample_name,production_id,production_enterprise, confidentiality_level,sample_name,production_id,production_enterprise,
...@@ -87,6 +89,7 @@ ...@@ -87,6 +89,7 @@
t.task_no,t.task_name,t.task_status, t.task_no,t.task_name,t.task_status,
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time, t.task_begin_time,
t.next_node,
srt.task_begin_time system_task_begin_time, srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time, srt.task_end_time system_task_end_time,
srt.task_status review_status, srt.task_status review_status,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment