Commit 42e67f77 authored by 王飞's avatar 王飞

Merge branch 'wangdingyi' into 'dev'

添加待签字状态&确认体系审查问卷接口

See merge request !44
parents fc0b7078 887736a7
......@@ -39,6 +39,8 @@ public class CarReviewTask implements Serializable {
@TableField(exist = false)
public static final String REVIEW_STATUS_PENDING = "PENDING";
@TableField(exist = false)
public static final String REVIEW_STATUS_SIGNED = "SIGNED";
@TableField(exist = false)
public static final String REVIEW_STATUS_FINISH = "FINISH";
......@@ -195,4 +197,7 @@ public class CarReviewTask implements Serializable {
@ApiModelProperty("车型问卷审查结果")
private String reviewResult;
@ApiModelProperty("问卷签名图片地址")
private String reviewImagesUrl;
}
......@@ -82,4 +82,21 @@ public class ReviewStandard {
@ApiModelProperty("文件路径")
private String file;
@ApiModelProperty("审核是否通过(0未通过、1通过)")
@TableField(exist = false)
private Integer passed;
/**
* 符合
*/
@ApiModelProperty("符合")
private String conformity;
/**
* 不符合
*/
@ApiModelProperty("不符合")
private String inconformity;
}
......@@ -45,15 +45,4 @@ public class Standard {
@ApiModelProperty("文件路径")
private String file;
/**
* 符合
*/
@ApiModelProperty("符合")
private String conformity;
/**
* 不符合
*/
@ApiModelProperty("不符合")
private String inconformity;
}
......@@ -29,6 +29,8 @@ public class SystemReviewTask {
@TableField(exist = false)
public static final String STATUS_PENDING = "PENDING";
@TableField(exist = false)
public static final String STATUS_SIGNED = "SIGNED";
@TableField(exist = false)
public static final String STATUS_FINISH = "FINISH";
@TableField(exist = false)
public static final String STATUS_CLOSE = "CLOSE";
......@@ -148,4 +150,7 @@ public class SystemReviewTask {
@ApiModelProperty("提交人姓名")
private String submitByName;
@ApiModelProperty("签名图片地址")
private String imagesUrl;
}
......@@ -41,6 +41,12 @@ public interface CarReviewTaskService extends IService<CarReviewTask> {
*/
void startReviewTask(CarReviewTaskStartRequest request);
/**
* 确认一个车辆审查任务中的问卷任务
* @param request
*/
void confirmReviewTask(CarReviewTaskConfirmRequest request);
/**
* 提交一个车辆审查任务中的问卷任务
* @param request
......
......@@ -9,5 +9,7 @@ public interface StrategyCarReviewTask {
void doStartReview(CarReviewTask carReviewTask);
void doSubmitReview(CarReviewTask carReviewTask);
void doConfirmReview(CarReviewTask carReviewTask);
void doSubmitReview(CarReviewTask carReviewTask, String imagesUrl);
}
......@@ -7,10 +7,14 @@ public interface StrategySystemReviewTask {
void doStart(SystemReviewTask systemReviewTask);
void doSubmit(SystemReviewTask systemReviewTask);
void doConfirm(SystemReviewTask systemReviewTask);
void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl);
void doClose(SystemReviewTask systemReviewTask);
SystemReviewTaskViewResponse doView(SystemReviewTask systemReviewTask);
}
......@@ -2,6 +2,7 @@ package com.ruoyi.service;
import com.ruoyi.domain.SystemReviewTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.web.request.SystemReviewTaskConfirmRequest;
import com.ruoyi.web.request.SystemReviewTaskCreateRequest;
import com.ruoyi.web.request.SystemReviewTaskStartRequest;
import com.ruoyi.web.request.SystemReviewTaskSubmitRequest;
......@@ -47,6 +48,12 @@ public interface SystemReviewTaskService extends IService<SystemReviewTask> {
*/
List<SystemReviewTask> findListInProcess();
/**
* 确认审查问卷
* @param request
*/
void confirm(SystemReviewTaskConfirmRequest request);
/**
* 提交审查问卷
* @param request
......
......@@ -12,6 +12,7 @@ import com.ruoyi.mapper.CarReviewTaskMapper;
import com.ruoyi.service.TaskUserRelationService;
import com.ruoyi.service.StandardService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.CarReviewTaskConfirmRequest;
import com.ruoyi.web.request.CarReviewTaskCreateRequest;
import com.ruoyi.web.request.CarReviewTaskStartRequest;
import com.ruoyi.web.request.CarReviewTaskSubmitRequest;
......@@ -125,11 +126,18 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
strategyCarReviewTaskContext.getResource(carReviewTask.getReviewStatus()).doStartReview(carReviewTask);
}
@Override
public void confirmReviewTask(CarReviewTaskConfirmRequest request) {
CarReviewTask carReviewTask = carReviewTaskService.getById(request.getTaskId());
strategyCarReviewTaskContext.getResource(carReviewTask.getReviewStatus()).doConfirmReview(carReviewTask);
}
@Override
public void submitReviewTask(CarReviewTaskSubmitRequest request) {
CarReviewTask carReviewTask = carReviewTaskService.getById(request.getTaskId());
strategyCarReviewTaskContext.getResource(carReviewTask.getReviewStatus()).doSubmitReview(carReviewTask);
strategyCarReviewTaskContext.getResource(carReviewTask.getReviewStatus()).doSubmitReview(carReviewTask,request.getImagesUrl());
}
@Override
......
......@@ -39,7 +39,12 @@ public class StrategyCarReviewTaskFinish implements StrategyCarReviewTask, Initi
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask) {
public void doConfirmReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能确认一个结束的任务", HttpStatus.ERROR);
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask,String imagesUrl) {
throw new ServiceException("不能提交一个结束的任务", HttpStatus.ERROR);
}
......
......@@ -62,7 +62,12 @@ public class StrategyCarReviewTaskNew implements StrategyCarReviewTask, Initiali
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask) {
public void doConfirmReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能确认一个未开始的任务", HttpStatus.ERROR);
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask,String imagesUrl) {
throw new ServiceException("不能提交一个未开始的任务", HttpStatus.ERROR);
}
......
......@@ -34,7 +34,12 @@ public class StrategyCarReviewTaskNone implements StrategyCarReviewTask, Initial
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask) {
public void doConfirmReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能确认一个不存在的任务", HttpStatus.ERROR);
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask,String imagesUrl) {
throw new ServiceException("不能提交一个不存在的任务", HttpStatus.ERROR);
}
......
......@@ -89,8 +89,7 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask) {
public void doConfirmReview(CarReviewTask carReviewTask) {
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId());
if (detailsList != null) {
......@@ -106,15 +105,8 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
setDetailsResult(standardTree, results);
carReviewTask.setStandard(standardTree);
// 4. 填充review_submit_time
carReviewTask.setReviewSubmitTime(new Date());
// 5. 修改任务状态为 FINISH
carReviewTask.setReviewStatus(CarReviewTask.REVIEW_STATUS_FINISH);
// 6. 填写当前用户id
// 获取当前登陆人
SysUser loginUser = SecurityUtils.getLoginUser().getUser();
carReviewTask.setReviewSubmitId(loginUser.getUserId());
carReviewTask.setReviewSubmitName(loginUser.getNickName());
// 4. 修改任务状态为 SIGNED 待签字
carReviewTask.setReviewStatus(CarReviewTask.REVIEW_STATUS_SIGNED);
// 7. 设置问卷结果
if (reviewDetailsResultMapper.findNotPass(carReviewTask.getId()) > 0) {
......@@ -124,6 +116,12 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
}
carReviewTaskMapper.updateById(carReviewTask);
}
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask,String imagesUrl) {
throw new ServiceException("不能提交一个未确认的任务", HttpStatus.ERROR);
}
......@@ -132,13 +130,18 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
Map<Long, ReviewDetailsResult> resultMap = results.stream().collect(Collectors.toMap(ReviewDetailsResult::getReviewDetailsId, Function.identity(), (v1, v2) -> v1));
for(ReviewStandard standard : standards) {
standard.setPassed(0);
List<ReviewKeyPoint> keyPointList = standard.getKeyPointList();
for(ReviewKeyPoint keypoint : keyPointList) {
List<ReviewDetails> reviewDetailsList = keypoint.getReviewDetailsList();
for(ReviewDetails details : reviewDetailsList) {
details.setResult(resultMap.get(details.getId()));
ReviewDetailsResult reviewDetailsResult = resultMap.get(details.getId());
if(reviewDetailsResult.getPassed() != 0) {
standard.setPassed(reviewDetailsResult.getPassed());
}
details.setResult(reviewDetailsResult);
}
}
}
......
package com.ruoyi.service.impl;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.*;
import com.ruoyi.mapper.CarReviewTaskMapper;
import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.mapper.ReviewDetailsResultMapper;
import com.ruoyi.service.ReviewDetailsResultService;
import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.service.StrategyCarReviewTask;
import com.ruoyi.web.response.CarReviewTaskViewResponse;
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.Date;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
@Transactional
@Service
public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, InitializingBean {
@Autowired
private StrategyCarReviewTaskContext strategyCarReviewTaskContext;
@Autowired
private ApplicationContext applicationContext;
@Autowired
private CarReviewTaskMapper carReviewTaskMapper;
// SIGNED状态下
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
// 3.无需联查问卷答案
@Override
public CarReviewTaskViewResponse doView(CarReviewTask carReviewTask) {
CarReviewTaskViewResponse response = new CarReviewTaskViewResponse();
response.setCarReviewTask(carReviewTask);
return response;
}
@Override
public void doStartReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能开始一个已确认的任务", HttpStatus.ERROR);
}
@Override
public void doConfirmReview(CarReviewTask carReviewTask) {
throw new ServiceException("不能确认一个已确认的任务", HttpStatus.ERROR);
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask, String imagesUrl) {
// 1. 填充review_submit_time
carReviewTask.setReviewSubmitTime(new Date());
// 2. 修改任务状态为 FINISH
carReviewTask.setReviewStatus(CarReviewTask.REVIEW_STATUS_FINISH);
// 3. 填写当前用户id
// 获取当前登陆人
SysUser loginUser = SecurityUtils.getLoginUser().getUser();
carReviewTask.setReviewSubmitId(loginUser.getUserId());
carReviewTask.setReviewSubmitName(loginUser.getNickName());
// 4. 保存签名图片地址
carReviewTask.setReviewImagesUrl(imagesUrl);
carReviewTaskMapper.updateById(carReviewTask);
}
@Override
public void afterPropertiesSet() throws Exception {
strategyCarReviewTaskContext.putResource(CarReviewTask.REVIEW_STATUS_SIGNED, applicationContext.getBean(this.getClass()));
}
}
......@@ -26,7 +26,7 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask,
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask) {
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
throw new ServiceException("不能提交一个已关闭的任务", HttpStatus.ERROR);
}
......@@ -35,6 +35,11 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask,
throw new ServiceException("不能关闭一个已关闭的任务", HttpStatus.ERROR);
}
@Override
public void doConfirm(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能确认一个已关闭的任务", HttpStatus.ERROR);
}
// CLOSE状态下
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
......
......@@ -26,7 +26,7 @@ public class StrategySystemReviewTaskFinish implements StrategySystemReviewTask,
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask) {
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
throw new ServiceException("不能提交一个已完成的任务", HttpStatus.ERROR);
}
......@@ -35,6 +35,11 @@ public class StrategySystemReviewTaskFinish implements StrategySystemReviewTask,
throw new ServiceException("不能关闭一个已完成的任务", HttpStatus.ERROR);
}
@Override
public void doConfirm(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能确认一个已完成的任务", HttpStatus.ERROR);
}
// FINISH状态下
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
......
......@@ -40,7 +40,7 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask, In
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask) {
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
throw new ServiceException("不能提交一个尚未开始的任务", HttpStatus.ERROR);
}
......@@ -51,6 +51,11 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask, In
systemReviewTaskMapper.updateById(systemReviewTask);
}
@Override
public void doConfirm(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能确认一个尚未开始的任务", HttpStatus.ERROR);
}
// NEW状态下
// 1.standard字段查询当前最新问卷
// 2.不查询场景变更任务
......
......@@ -55,7 +55,19 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask) {
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
throw new ServiceException("不能提交一个未确认的任务", HttpStatus.ERROR);
}
@Override
public void doClose(SystemReviewTask systemReviewTask) {
systemReviewTask.setTaskEndTime(new Date());
systemReviewTask.setTaskStatus(SystemReviewTask.STATUS_CLOSE);
systemReviewTaskMapper.updateById(systemReviewTask);
}
@Override
public void doConfirm(SystemReviewTask systemReviewTask) {
// TODO
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId());
if (detailsList != null) {
......@@ -69,19 +81,13 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
// 3. 将最终问卷归档到 standard 字段
setDetailsResult(standardTree, results);
systemReviewTask.setStandard(standardTree);
// 4. 填充task_end_time
systemReviewTask.setTaskEndTime(new Date());
// 5. 修改任务状态为 FINISH
systemReviewTask.setTaskStatus(SystemReviewTask.STATUS_FINISH);
// 6. 填写当前用户id
// 获取当前登陆人
SysUser loginUser = SecurityUtils.getLoginUser().getUser();
systemReviewTask.setSubmitById(loginUser.getUserId());
systemReviewTask.setSubmitByName(loginUser.getNickName());
// 7. 设置问卷结果
// 4. 修改任务状态为 SIGNED 待签字
systemReviewTask.setTaskStatus(SystemReviewTask.STATUS_SIGNED);
// 5. 设置问卷结果
if (reviewDetailsResultMapper.findNotPass(systemReviewTask.getId()) > 0) {
systemReviewTask.setTaskResult("REJECT");
} else {
......@@ -89,14 +95,6 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
}
systemReviewTaskMapper.updateById(systemReviewTask);
}
}
@Override
public void doClose(SystemReviewTask systemReviewTask) {
systemReviewTask.setTaskEndTime(new Date());
systemReviewTask.setTaskStatus(SystemReviewTask.STATUS_CLOSE);
systemReviewTaskMapper.updateById(systemReviewTask);
}
// PENDING状态下
......@@ -134,13 +132,18 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
Map<Long, ReviewDetailsResult> resultMap = results.stream().collect(Collectors.toMap(ReviewDetailsResult::getReviewDetailsId, Function.identity(), (v1, v2) -> v1));
for(ReviewStandard standard : standards) {
standard.setPassed(0);
List<ReviewKeyPoint> keyPointList = standard.getKeyPointList();
for(ReviewKeyPoint keypoint : keyPointList) {
List<ReviewDetails> reviewDetailsList = keypoint.getReviewDetailsList();
for(ReviewDetails details : reviewDetailsList) {
details.setResult(resultMap.get(details.getId()));
ReviewDetailsResult reviewDetailsResult = resultMap.get(details.getId());
if(reviewDetailsResult.getPassed() != 0) {
standard.setPassed(reviewDetailsResult.getPassed());
}
details.setResult(reviewDetailsResult);
}
}
}
......
package com.ruoyi.service.impl;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.*;
import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.mapper.ReviewDetailsResultMapper;
import com.ruoyi.mapper.SystemReviewTaskMapper;
import com.ruoyi.service.ReviewDetailsResultService;
import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.service.StrategySystemReviewTask;
import com.ruoyi.web.response.SystemReviewTaskViewResponse;
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.Date;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
@Transactional
@Service
public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask, InitializingBean {
@Autowired
private StrategySystemReviewTaskContext strategySystemReviewTaskContext;
@Autowired
private ApplicationContext applicationContext;
@Autowired
private SystemReviewTaskMapper systemReviewTaskMapper;
@Override
public void doStart(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能开始一个已确认的任务", HttpStatus.ERROR);
}
@Override
public void doConfirm(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能确认一个已确认的任务", HttpStatus.ERROR);
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
// 1. 填充task_end_time
systemReviewTask.setTaskEndTime(new Date());
// 2. 修改任务状态为 FINISH
systemReviewTask.setTaskStatus(SystemReviewTask.STATUS_FINISH);
// 3. 填写当前用户id
// 获取当前登陆人
SysUser loginUser = SecurityUtils.getLoginUser().getUser();
systemReviewTask.setSubmitById(loginUser.getUserId());
systemReviewTask.setSubmitByName(loginUser.getNickName());
// 4.保存签名图片地址
systemReviewTask.setImagesUrl(imagesUrl);
systemReviewTaskMapper.updateById(systemReviewTask);
}
@Override
public void doClose(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能关闭一个已确认的任务", HttpStatus.ERROR);
}
// SIGNED状态下
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
// 3.无需联查问卷答案
@Override
public SystemReviewTaskViewResponse doView(SystemReviewTask systemReviewTask) {
SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse();
response.setSystemReviewTask(systemReviewTask);
return response;
}
@Override
public void afterPropertiesSet() throws Exception {
strategySystemReviewTaskContext.putResource(SystemReviewTask.STATUS_SIGNED, applicationContext.getBean(this.getClass()));
}
}
......@@ -10,6 +10,7 @@ import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.mapper.SystemReviewTaskMapper;
import com.ruoyi.service.*;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.SystemReviewTaskConfirmRequest;
import com.ruoyi.web.request.SystemReviewTaskCreateRequest;
import com.ruoyi.web.request.SystemReviewTaskStartRequest;
import com.ruoyi.web.request.SystemReviewTaskSubmitRequest;
......@@ -115,10 +116,16 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
return systemReviewTaskMapper.findListInProcess();
}
@Override
public void confirm(SystemReviewTaskConfirmRequest request) {
SystemReviewTask systemReviewTask = systemReviewTaskService.getById(request.getTaskId());
strategySystemReviewTaskContext.getResource(systemReviewTask.getTaskStatus()).doConfirm(systemReviewTask);
}
@Override
public void submit(SystemReviewTaskSubmitRequest request) {
SystemReviewTask systemReviewTask = systemReviewTaskService.getById(request.getTaskId());
strategySystemReviewTaskContext.getResource(systemReviewTask.getTaskStatus()).doSubmit(systemReviewTask);
strategySystemReviewTaskContext.getResource(systemReviewTask.getTaskStatus()).doSubmit(systemReviewTask,request.getImagesUrl());
}
}
......
......@@ -58,6 +58,15 @@ public class CarReviewTaskController extends BaseController {
return R.ok();
}
@ApiOperation("确认车辆问卷审查任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/confirmReview")
public R<String> confirmReview(@Validated @RequestBody CarReviewTaskConfirmRequest request) {
carReviewTaskService.confirmReviewTask(request);
return R.ok();
}
@ApiOperation("提交车辆问卷审查任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......
......@@ -61,6 +61,15 @@ public class SystemReviewTaskController extends BaseController {
return R.ok();
}
@ApiOperation("确认体系审查问卷")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/confirm")
public R<String> confirm(@Validated @RequestBody SystemReviewTaskConfirmRequest request) {
systemReviewTaskService.confirm(request);
return R.ok();
}
@ApiOperation("提交体系审查任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "CarReviewTaskConfirmRequest", description = "确认车辆问卷审查任务")
@Data
public class CarReviewTaskConfirmRequest {
@ApiModelProperty("任务id")
private Long taskId;
}
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "SystemReviewTaskConfirmRequest", description = "确认体系审查问卷")
@Data
public class SystemReviewTaskConfirmRequest {
@ApiModelProperty("任务id")
private Long taskId;
}
......@@ -28,6 +28,7 @@
<result property="reviewSubmitId" column="review_submit_id" jdbcType="BIGINT"/>
<result property="reviewSubmitName" column="review_submit_name" jdbcType="VARCHAR"/>
<result property="reviewResult" column="review_result" jdbcType="VARCHAR"/>
<result property="reviewImagesUrl" column="review_images_url" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -41,14 +42,14 @@
review_submit_time,
review_submit_id,
review_submit_name,
review_result
review_result,review_images_url
</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,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,review_result
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,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,review_result,review_images_url
FROM t_car_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING'
</select>
<select id="findListByTaskStatus" 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,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,review_result
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,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,review_result,review_images_url
FROM t_car_review_task WHERE task_status = #{taskStatus}
</select>
</mapper>
......@@ -14,6 +14,8 @@
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
<result property="file" column="file" jdbcType="VARCHAR"/>
<result property="conformity" column="conformity" jdbcType="VARCHAR"/>
<result property="inconformity" column="inconformity" jdbcType="VARCHAR"/>
<collection property="keyPointList" ofType="com.ruoyi.domain.ReviewKeyPoint" select="com.ruoyi.mapper.ReviewKeyPointMapper.findAllByReviewStandardId" column="id">
<result property="id" column="u_id" jdbcType="BIGINT"/>
......@@ -23,11 +25,11 @@
</resultMap>
<select id="findTree" resultMap="StandardTreeResultMap">
SELECT id, chapter, text, standard_id, name, standard_no, file FROM t_review_standard;
SELECT id, chapter, text, standard_id, name, standard_no, file, conformity, inconformity FROM t_review_standard;
</select>
<select id="findListByStandardIdAndType" resultType="com.ruoyi.domain.ReviewStandard">
SELECT id, type, chapter, text, standard_id, name, standard_no, file FROM t_review_standard WHERE standard_id = #{standardId} AND type = #{type};
SELECT id, type, chapter, text, standard_id, name, standard_no, file, conformity, inconformity FROM t_review_standard WHERE standard_id = #{standardId} AND type = #{type};
</select>
......
......@@ -9,12 +9,10 @@
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
<result property="file" column="file" jdbcType="VARCHAR"/>
<result property="conformity" column="conformity" jdbcType="VARCHAR"/>
<result property="inconformity" column="inconformity" jdbcType="VARCHAR"/>
</resultMap>
<select id="findList" parameterType="com.ruoyi.web.request.StandardListRequest" resultMap="BaseResultMap">
SELECT id, name, standard_no, file, conformity, inconformity
SELECT id, name, standard_no, file
FROM t_standard
<where>
<if test="params.name != null and params.name != ''">
......@@ -27,7 +25,7 @@
</select>
<select id="findListById" resultMap="BaseResultMap">
SELECT id, name, standard_no, file, conformity, inconformity
SELECT id, name, standard_no, file
FROM t_standard WHERE id = #{id}
</select>
......
......@@ -23,16 +23,17 @@
<result property="file" column="file" jdbcType="VARCHAR"/>
<result property="submitById" column="submit_by_id" jdbcType="BIGINT"/>
<result property="submitByName" column="submit_by_name" jdbcType="VARCHAR"/>
<result property="imagesUrl" column="images_url" jdbcType="VARCHAR"/>
</resultMap>
<select id="findListByStatus" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time,leader,leader_id, standard_id, name, standard_no, file, submit_by_id, submit_by_name
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time,leader,leader_id, standard_id, name, standard_no, file, submit_by_id, submit_by_name,images_url
FROM t_system_review_task WHERE task_status = #{status}
ORDER BY create_time DESC
</select>
<select id="findListInProcess" resultMap="BaseResultMap">
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time,leader,leader_id, standard_id, name, standard_no, file, submit_by_id, submit_by_name
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time,leader,leader_id, standard_id, name, standard_no, file, submit_by_id, submit_by_name,images_url
FROM t_system_review_task WHERE task_status IN ('NEW','PENDING')
ORDER BY create_time DESC
</select>
......
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