Commit 57d07b73 authored by W_Y's avatar W_Y

创建车辆审查任务

parent fd9778dd
...@@ -83,6 +83,7 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C ...@@ -83,6 +83,7 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
.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())
......
package com.ruoyi.web; 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.enums.BusinessType;
import com.ruoyi.service.CarReviewTaskService;
import com.ruoyi.web.request.CarReviewTaskCreateRequest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@Api("车辆审查任务") @Api("车辆审查任务")
@RestController @RestController
@RequestMapping("/car/review/task") @RequestMapping("/car/review/task")
public class CarReviewTaskController { public class CarReviewTaskController extends BaseController {
@Autowired
private CarReviewTaskService carReviewTaskService;
@ApiOperation("创建车辆审查任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "车辆审查任务", businessType = BusinessType.INSERT)
@RequestMapping(method = RequestMethod.POST, value = "/create")
public R<String> create(@Validated @RequestBody CarReviewTaskCreateRequest request) {
carReviewTaskService.createTask(request);
return R.ok();
}
} }
package com.ruoyi.web.request; package com.ruoyi.web.request;
import com.ruoyi.domain.ReviewTaskUserRelation; import com.ruoyi.domain.ReviewTaskUserRelation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
@ApiModel(value = "CarReviewTaskCreateRequest", description = "创建车辆审查任务")
@Data @Data
public class CarReviewTaskCreateRequest { public class CarReviewTaskCreateRequest {
@ApiModelProperty("占位")
private String bizInfo; private String bizInfo;
@ApiModelProperty("小组信息")
private List<ReviewTaskUserRelation> auditors; private List<ReviewTaskUserRelation> auditors;
/** /**
* 是否创建车型问卷审查任务 * 是否创建车型问卷审查任务
*/ */
@ApiModelProperty("是否创建车型问卷审查任务")
private Boolean review; private Boolean review;
/** /**
* 是否创建车型测试任务 * 是否创建车型测试任务
*/ */
@ApiModelProperty("是否创建车型测试任务")
private Boolean test; private Boolean test;
/** /**
* 标准id * 标准id
* 根据哪个标准新建的审查任务 * 根据哪个标准新建的审查任务
*/ */
@ApiModelProperty("标准id(根据哪个标准新建的审查任务)")
private Long standardId; private Long standardId;
} }
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