Commit 5b7d534c authored by 盖献康's avatar 盖献康

Merge branch 'dev' of...

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wangfei/vehicle-quality-review into gaixiankang
parents 66919e83 acc1f43f
......@@ -2,6 +2,7 @@ package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.Standard;
import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardListRequest;
import java.util.List;
......@@ -16,4 +17,6 @@ public interface StandardService extends IService<Standard> {
//根据id查询
Standard findListById(Long id);
void editStandard(StandardEditRequest request);
}
......@@ -3,6 +3,8 @@ package com.ruoyi.service;
import com.ruoyi.domain.CarReviewTask;
import com.ruoyi.web.response.CarReviewTaskViewResponse;
import java.util.List;
public interface StrategyCarReviewTask {
CarReviewTaskViewResponse doView(CarReviewTask carReviewTask);
......@@ -11,5 +13,5 @@ public interface StrategyCarReviewTask {
void doConfirmReview(CarReviewTask carReviewTask);
void doSubmitReview(CarReviewTask carReviewTask, String imagesUrl);
void doSubmitReview(CarReviewTask carReviewTask, List<String> imagesUrl);
}
......@@ -3,13 +3,15 @@ package com.ruoyi.service;
import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.web.response.SystemReviewTaskViewResponse;
import java.util.List;
public interface StrategySystemReviewTask {
void doStart(SystemReviewTask systemReviewTask);
void doConfirm(SystemReviewTask systemReviewTask);
void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl);
void doSubmit(SystemReviewTask systemReviewTask, List<String> imagesUrl);
void doClose(SystemReviewTask systemReviewTask);
......
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.Standard;
import com.ruoyi.mapper.StandardMapper;
import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardListRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -16,6 +18,9 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
@Autowired
private StandardMapper standardMapper;
@Autowired
private StandardService standardService;
/**
* 分页查询
* @param
......@@ -35,4 +40,12 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
public Standard findListById(Long id) {
return standardMapper.findListById(id);
}
@Override
public void editStandard(StandardEditRequest request) {
Standard standard = new Standard();
BeanUtils.copyBeanProp(standard, request);
standardService.updateById(standard);
}
}
......@@ -11,6 +11,8 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
@Service
public class StrategyCarReviewTaskFinish implements StrategyCarReviewTask, InitializingBean {
......@@ -44,7 +46,7 @@ public class StrategyCarReviewTaskFinish implements StrategyCarReviewTask, Initi
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask,String imagesUrl) {
public void doSubmitReview(CarReviewTask carReviewTask, List<String> imagesUrl) {
throw new ServiceException("不能提交一个结束的任务", HttpStatus.ERROR);
}
......
......@@ -67,7 +67,7 @@ public class StrategyCarReviewTaskNew implements StrategyCarReviewTask, Initiali
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask,String imagesUrl) {
public void doSubmitReview(CarReviewTask carReviewTask,List<String> imagesUrl) {
throw new ServiceException("不能提交一个未开始的任务", HttpStatus.ERROR);
}
......
......@@ -121,7 +121,7 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask,String imagesUrl) {
public void doSubmitReview(CarReviewTask carReviewTask,List<String> imagesUrl) {
throw new ServiceException("不能提交一个未确认的任务", HttpStatus.ERROR);
......
......@@ -4,6 +4,7 @@ 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.common.utils.StringUtils;
import com.ruoyi.domain.*;
import com.ruoyi.mapper.CarReviewTaskMapper;
import com.ruoyi.mapper.ReviewDetailsMapper;
......@@ -68,7 +69,7 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
}
@Override
public void doSubmitReview(CarReviewTask carReviewTask, String imagesUrl) {
public void doSubmitReview(CarReviewTask carReviewTask, List<String> imagesUrl) {
// 1. 填充review_submit_time
carReviewTask.setTaskEndTime(new Date());
......@@ -83,7 +84,8 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
carReviewTask.setSubmitName(loginUser.getNickName());
// 4. 保存签名图片地址
carReviewTask.setImagesUrl(imagesUrl);
String joinImageUrl = StringUtils.join(imagesUrl,",");
carReviewTask.setImagesUrl(joinImageUrl);
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
Task task = taskMapper.selectById(taskMapper.findByCarReviewTaskId(carReviewTask.getId()));
......
......@@ -11,6 +11,8 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
@Service
public class StrategySystemReviewTaskClose implements StrategySystemReviewTask, InitializingBean {
......@@ -26,7 +28,7 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask,
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
public void doSubmit(SystemReviewTask systemReviewTask, List<String> imagesUrl) {
throw new ServiceException("不能提交一个已关闭的任务", HttpStatus.ERROR);
}
......
......@@ -11,6 +11,8 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
@Service
public class StrategySystemReviewTaskFinish implements StrategySystemReviewTask, InitializingBean {
......@@ -26,7 +28,7 @@ public class StrategySystemReviewTaskFinish implements StrategySystemReviewTask,
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
public void doSubmit(SystemReviewTask systemReviewTask, List<String> imagesUrl) {
throw new ServiceException("不能提交一个已完成的任务", HttpStatus.ERROR);
}
......
......@@ -40,7 +40,7 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask, In
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
public void doSubmit(SystemReviewTask systemReviewTask, List<String> imagesUrl) {
throw new ServiceException("不能提交一个尚未开始的任务", HttpStatus.ERROR);
}
......
......@@ -59,7 +59,7 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
public void doSubmit(SystemReviewTask systemReviewTask, List<String> imagesUrl) {
throw new ServiceException("不能提交一个未确认的任务", HttpStatus.ERROR);
}
......
......@@ -4,6 +4,7 @@ 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.common.utils.StringUtils;
import com.ruoyi.domain.*;
import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.mapper.ReviewDetailsResultMapper;
......@@ -57,7 +58,7 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
}
@Override
public void doSubmit(SystemReviewTask systemReviewTask, String imagesUrl) {
public void doSubmit(SystemReviewTask systemReviewTask, List<String> imagesUrl) {
// 1. 填充task_end_time
systemReviewTask.setTaskEndTime(new Date());
......@@ -72,7 +73,8 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
systemReviewTask.setSubmitByName(loginUser.getNickName());
// 4.保存签名图片地址
systemReviewTask.setImagesUrl(imagesUrl);
String joinImageUrl = StringUtils.join(imagesUrl,",");
systemReviewTask.setImagesUrl(joinImageUrl);
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
Task task = taskMapper.selectById(taskMapper.findBySystemReviewTaskId(systemReviewTask.getId()));
......
package com.ruoyi.web;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.Standard;
import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest;
import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardListRequest;
import com.ruoyi.web.request.TaskEditRequest;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -39,4 +44,14 @@ public class StandardController extends BaseController {
startPage(request);
return getDataTable(standardService.findList());
}
@ApiOperation("编辑标准库")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "编辑任务", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/editStandard")
public R<String> editTask(@Validated @RequestBody StandardEditRequest request) {
standardService.editStandard(request);
return R.ok();
}
}
......@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(value = "CarReviewTaskSubmitRequest", description = "提交车辆审查问卷")
@Data
public class CarReviewTaskSubmitRequest {
......@@ -12,6 +14,6 @@ public class CarReviewTaskSubmitRequest {
private Long taskId;
@ApiModelProperty("图片地址")
private String imagesUrl;
private List<String> imagesUrl;
}
package com.ruoyi.web.request;
import com.fasterxml.jackson.annotation.JsonFormat;
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 = "StandardEditRequest", description = "编辑标准")
@Data
public class StandardEditRequest {
@ApiModelProperty("主键")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("文件路径")
private String file;
@ApiModelProperty("标准分类")
private String standardType;
@ApiModelProperty("标准状态")
private String standardStatus;
@ApiModelProperty("发布日期")
private Date releaseDate;
@ApiModelProperty("实施日期")
private Date implementationDate;
}
......@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(value = "SystemReviewTaskSubmitRequest", description = "提交体系审查问卷")
@Data
public class SystemReviewTaskSubmitRequest {
......@@ -12,6 +14,6 @@ public class SystemReviewTaskSubmitRequest {
private Long taskId;
@ApiModelProperty("图片地址")
private String imagesUrl;
private List<String> imagesUrl;
}
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