Commit df0c0495 authored by W_Y's avatar W_Y

查看总任务详情

parent c322cb6c
......@@ -5,10 +5,15 @@ 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.common.utils.bean.BeanUtils;
import com.ruoyi.domain.Task;
import com.ruoyi.domain.TaskUserRelation;
import com.ruoyi.service.TaskService;
import com.ruoyi.service.TaskUserRelationService;
import com.ruoyi.web.request.TaskCreateRequest;
import com.ruoyi.web.request.TaskGetInfoRequest;
import com.ruoyi.web.request.TaskListRequest;
import com.ruoyi.web.response.TaskGetInfoResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
......@@ -20,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(tags = "总任务")
@RestController
......@@ -29,6 +35,9 @@ public class TaskController extends BaseController {
@Autowired
private TaskService taskService;
@Autowired
private TaskUserRelationService taskUserRelationService;
@ApiOperation("查询任务列表")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......@@ -48,4 +57,19 @@ public class TaskController extends BaseController {
return R.ok();
}
@ApiOperation("查看任务详情")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getInfo")
public R<TaskGetInfoResponse> getInfo(@Validated @RequestBody TaskGetInfoRequest request) {
TaskGetInfoResponse response = new TaskGetInfoResponse();
Task task = taskService.getById(request.getId());
BeanUtils.copyBeanProp(response, task);
List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(request.getId());
response.setAuditors(relation);
return R.ok(response);
}
}
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "TaskGetInfoRequest", description = "查看任务详情")
@Data
public class TaskGetInfoRequest {
@ApiModelProperty("ID")
private Long id;
}
package com.ruoyi.web.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.domain.TaskUserRelation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@ApiModel(value = "TaskGetInfoResponse", description = "任务详情")
@Data
public class TaskGetInfoResponse {
@ApiModelProperty("主键")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("体系审查任务id")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long systemReviewTaskId;
@ApiModelProperty("车辆检查任务id")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long carReviewTaskId;
@ApiModelProperty("任务编号")
private String taskNo;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("任务状态(NEW、PENDING、FINISH)")
private String taskStatus;
@ApiModelProperty("产品名称")
private String productName;
@ApiModelProperty("产品型号")
private String productModel;
@ApiModelProperty("委托单位")
private String entrustedUnit;
@ApiModelProperty("委托单位地址")
private String entrustedUnitAddress;
@ApiModelProperty("委托单位电话")
private String entrustedUnitPhone;
@ApiModelProperty("委托单位邮政编码")
private String entrustedUnitCode;
@ApiModelProperty("车辆类型")
private String carType;
@ApiModelProperty("车辆识别码")
private String carIdentificationCode;
@ApiModelProperty("保密等级")
private String confidentialityLevel;
@ApiModelProperty("样品名称")
private String sampleName;
@ApiModelProperty("生产企业")
private String productionEnterprise;
@ApiModelProperty("送样者")
private String sampleSender;
@ApiModelProperty("送样日期")
private Date sendDate;
@ApiModelProperty("样品数量")
private String sampleNumber;
@ApiModelProperty("生产日期")
private Date productionDate;
@ApiModelProperty("商标")
private String trademark;
@ApiModelProperty("检验依据")
private String inspectionBasis;
@ApiModelProperty("任务发起人姓名")
private String taskInitiator;
@ApiModelProperty("任务发起人部门")
private String taskInitiatorDept;
@ApiModelProperty("任务开始时间")
private Date taskBeginTime;
@ApiModelProperty("任务结束时间")
private Date taskEndTime;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty("审核组长id")
private Long leaderId;
@ApiModelProperty("审核组长姓名")
private String leader;
@ApiModelProperty("创建时间")
private Date createTime;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty("关联标准表id")
private Long standardId;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("文件路径")
private String file;
@ApiModelProperty("小组成员")
private List<TaskUserRelation> auditors;
}
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