Commit 3d2e0f12 authored by wdy's avatar wdy

新建任务

parent c01766c2
...@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> { ...@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> {
*/ */
List<Task> findList(TaskListRequest request); List<Task> findList(TaskListRequest request);
void createTask(TaskCreateRequest request,Long userId); void createTask(TaskCreateRequest request);
/** /**
* 查询进行中的任务 * 查询进行中的任务
......
...@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
} }
@Override @Override
public void createTask(TaskCreateRequest request,Long userId) { public void createTask(TaskCreateRequest request) {
// 构建任务创建者 // 构建任务创建者
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
...@@ -167,9 +167,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -167,9 +167,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
taskStateFacade.doCreate(task, request.getTaskList()); taskStateFacade.doCreate(task, request.getTaskList());
TaskGetInfoResponse temporaryStorageTask = taskService.getByUserId(userId); TaskGetInfoResponse temporaryStorageTask = taskService.getByUserId(loginUser.getUserId());
taskMapper.deleteById(temporaryStorageTask.getId()); if(temporaryStorageTask != null) {
taskMapper.deleteById(temporaryStorageTask.getId());
}
} }
@Override @Override
......
...@@ -58,7 +58,7 @@ public class TaskController extends BaseController { ...@@ -58,7 +58,7 @@ public class TaskController extends BaseController {
@Log(title = "总任务", businessType = BusinessType.INSERT) @Log(title = "总任务", businessType = BusinessType.INSERT)
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
public R<String> createTask(@Validated @RequestBody TaskCreateRequest request) { public R<String> createTask(@Validated @RequestBody TaskCreateRequest request) {
taskService.createTask(request,getUserId()); taskService.createTask(request);
return R.ok(); return R.ok();
} }
......
...@@ -27,6 +27,9 @@ public class TaskFindResponse { ...@@ -27,6 +27,9 @@ public class TaskFindResponse {
@ApiModelProperty("标准名称(检验依据)") @ApiModelProperty("标准名称(检验依据)")
private String name; private String name;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("任务编号") @ApiModelProperty("任务编号")
private String taskNo; private String taskNo;
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<result property="leader" column="leader" jdbcType="VARCHAR"/> <result property="leader" column="leader" jdbcType="VARCHAR"/>
<result property="reviewStatus" column="review_status" jdbcType="VARCHAR"/> <result property="reviewStatus" column="review_status" jdbcType="VARCHAR"/>
<result property="carReviewStatus" column="car_review_status" jdbcType="VARCHAR"/> <result property="carReviewStatus" column="car_review_status" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="BIGINT"/>
</resultMap> </resultMap>
<select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap"> <select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap">
...@@ -87,6 +88,7 @@ ...@@ -87,6 +88,7 @@
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time, t.task_begin_time,
t.product_model, t.product_model,
t.standard_no,
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,
...@@ -167,6 +169,7 @@ ...@@ -167,6 +169,7 @@
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time, t.task_begin_time,
t.task_end_time, t.task_end_time,
t.standard_no,
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