Commit 05780c18 authored by W_Y's avatar W_Y

开始一个车辆审查任务中的问卷任务&提交问卷任务

parent 4b3c5ee5
......@@ -161,4 +161,28 @@ public class CarReviewTask implements Serializable {
@ApiModelProperty("车型测试任务状态[NONE、NEW、PENDING、FINISH]")
private String testStatus;
/**
* 车型问卷开始时间
*/
@ApiModelProperty("车型问卷开始时间")
private Date reviewStartTime;
/**
* 车型问卷提交时间
*/
@ApiModelProperty("车型问卷提交时间")
private Date reviewSubmitTime;
/**
* 车型问卷提交人id
*/
@ApiModelProperty("车型问卷提交人id")
private Long reviewSubmitId;
/**
* 车型问卷提交人姓名
*/
@ApiModelProperty("车型问卷提交人姓名")
private String reviewSubmitName;
}
......@@ -117,7 +117,7 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
@Override
public CarReviewTaskViewResponse viewReviewTask(Long taskId) {
CarReviewTask carReviewTask = carReviewTaskService.getById(taskId);
return strategyCarReviewTaskContext.getResource(carReviewTask.getTaskStatus()).doView(carReviewTask);
return strategyCarReviewTaskContext.getResource(carReviewTask.getReviewStatus()).doView(carReviewTask);
}
@Override
......
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.service.StrategyCarReviewTask;
import com.ruoyi.web.response.CarReviewTaskViewResponse;
......@@ -29,12 +31,12 @@ public class StrategyCarReviewTaskFinish implements StrategyCarReviewTask, Initi
@Override
public void doStartReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能开始一个结束的任务", HttpStatus.ERROR);
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能提交一个结束的任务", HttpStatus.ERROR);
}
@Override
......
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.ReviewStandard;
import com.ruoyi.service.ReviewStandardService;
......@@ -50,7 +52,7 @@ public class StrategyCarReviewTaskNew implements StrategyCarReviewTask, Initiali
@Override
public void doSubmitReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能提交一个未开始的任务", HttpStatus.ERROR);
}
@Override
......
......@@ -26,12 +26,12 @@ public class StrategyCarReviewTaskNone implements StrategyCarReviewTask, Initial
@Override
public void doStartReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能开始一个不存在的任务", HttpStatus.ERROR);
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能提交一个不存在的任务", HttpStatus.ERROR);
}
@Override
......
package com.ruoyi.service.impl;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.*;
import com.ruoyi.mapper.ReviewDetailsResultMapper;
import com.ruoyi.mapper.SystemReviewTaskMapper;
......@@ -75,7 +77,7 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Override
public void doStartReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能开始一个进行中的任务", HttpStatus.ERROR);
}
@Override
......
......@@ -24,6 +24,10 @@
<result property="file" column="file" jdbcType="VARCHAR"/>
<result property="reviewStatus" column="review_status" jdbcType="VARCHAR"/>
<result property="testStatus" column="test_status" jdbcType="VARCHAR"/>
<result property="reviewStartTime" column="review_start_time" jdbcType="TIMESTAMP"/>
<result property="reviewSubmitTime" column="review_submit_time" jdbcType="TIMESTAMP"/>
<result property="reviewSubmitId" column="review_submit_id" jdbcType="BIGINT"/>
<result property="reviewSubmitName" column="review_submit_name" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -33,10 +37,13 @@
biz_info,create_time,leader_id,
leader,standard_id,name,
standard_no,file,review_status,
test_status
test_status,review_start_time,
review_submit_time,
review_submit_id,
review_submit_name
</sql>
<select id="findListByReviewStatus" resultType="com.ruoyi.domain.CarReviewTask">
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,biz_info,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name
FROM t_system_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING'
</select>
</mapper>
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