Commit 545fa439 authored by 盖献康's avatar 盖献康

Merge branch 'dev' of...

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wangfei/vehicle-quality-review into gaixiankang
parents f78a324a c1cb6e17
...@@ -74,9 +74,6 @@ public class Task { ...@@ -74,9 +74,6 @@ public class Task {
@ApiModelProperty("任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]") @ApiModelProperty("任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]")
private String runStatus; private String runStatus;
@ApiModelProperty("下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)")
private String nextNode;
@ApiModelProperty("任务编号") @ApiModelProperty("任务编号")
private String taskNo; private String taskNo;
...@@ -157,4 +154,21 @@ public class Task { ...@@ -157,4 +154,21 @@ public class Task {
@ApiModelProperty("选择的项目") @ApiModelProperty("选择的项目")
private String taskList; private String taskList;
@ApiModelProperty("指向待执行节点的指针[0、1、2]")
private int pointer;
@ApiModelProperty("子任务指针最大值")
private int maxPointer;
// 返回当前节点的下一个节点
public String getNextNode() {
String[] split = taskList.split(",");
if(pointer + 1 > maxPointer) {
return null;
} else {
return split[pointer + 1];
}
}
} }
...@@ -79,10 +79,12 @@ public class TestUseCase implements Serializable { ...@@ -79,10 +79,12 @@ public class TestUseCase implements Serializable {
/** 测试场景 */ /** 测试场景 */
@ApiModelProperty("测试场景") @ApiModelProperty("测试场景")
@TableField(exist = false)
private String testScenario; private String testScenario;
/** 测试类型*/ /** 测试类型*/
@ApiModelProperty("测试类型") @ApiModelProperty("测试类型")
@TableField(exist = false)
private String testType; private String testType;
/** /**
......
...@@ -3,6 +3,7 @@ package com.ruoyi.mapper; ...@@ -3,6 +3,7 @@ package com.ruoyi.mapper;
import com.ruoyi.domain.ReviewEnterpriseArchive; import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO; import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindByTaskIdRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest; import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -29,6 +30,8 @@ public interface ReviewEnterpriseArchiveMapper extends BaseMapper<ReviewEnterpri ...@@ -29,6 +30,8 @@ public interface ReviewEnterpriseArchiveMapper extends BaseMapper<ReviewEnterpri
ReviewEnterpriseArchive findByFileName(@Param("fileName") String fileName); ReviewEnterpriseArchive findByFileName(@Param("fileName") String fileName);
List<ReviewEnterpriseArchive> findList(@Param("taskId") Long taskId); List<ReviewEnterpriseArchive> findList(@Param("taskId") Long taskId);
List<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(ReviewEnterpriseArchiveFindByTaskIdRequest request);
} }
......
...@@ -33,4 +33,6 @@ public interface TaskMapper extends BaseMapper<Task> { ...@@ -33,4 +33,6 @@ public interface TaskMapper extends BaseMapper<Task> {
Long findBySystemReviewTaskId(@Param("systemReviewId") Long systemReviewId); Long findBySystemReviewTaskId(@Param("systemReviewId") Long systemReviewId);
Task getByUserIdTemporary(@Param("userId") Long userId); Task getByUserIdTemporary(@Param("userId") Long userId);
Task getBySubtaskId(@Param("subId") Long subId);
} }
...@@ -3,6 +3,7 @@ package com.ruoyi.service; ...@@ -3,6 +3,7 @@ package com.ruoyi.service;
import com.ruoyi.domain.ReviewEnterpriseArchive; import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO; import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindByTaskIdRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindFileNameListRequest; import com.ruoyi.web.request.ReviewEnterpriseArchiveFindFileNameListRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest; import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest; import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest;
...@@ -36,4 +37,6 @@ public interface ReviewEnterpriseArchiveService extends IService<ReviewEnterpris ...@@ -36,4 +37,6 @@ public interface ReviewEnterpriseArchiveService extends IService<ReviewEnterpris
ReviewEnterpriseArchive getInfo(ReviewEnterpriseArchiveGetInfoRequest request); ReviewEnterpriseArchive getInfo(ReviewEnterpriseArchiveGetInfoRequest request);
List<ReviewEnterpriseArchive> findList(ReviewEnterpriseArchiveFindFileNameListRequest request); List<ReviewEnterpriseArchive> findList(ReviewEnterpriseArchiveFindFileNameListRequest request);
List<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(ReviewEnterpriseArchiveFindByTaskIdRequest request);
} }
...@@ -58,4 +58,6 @@ public interface TaskService extends IService<Task> { ...@@ -58,4 +58,6 @@ public interface TaskService extends IService<Task> {
void temporaryStorageTask(TaskCreateRequest request); void temporaryStorageTask(TaskCreateRequest request);
TaskGetInfoResponse getByUserId(Long userId); TaskGetInfoResponse getByUserId(Long userId);
TaskGetInfoResponse getBySubtaskId(TaskSubGetInfoRequest request);
} }
...@@ -8,7 +8,8 @@ public interface TaskState { ...@@ -8,7 +8,8 @@ public interface TaskState {
void doCreate(Task task, List<String> taskList); void doCreate(Task task, List<String> taskList);
void doStart(Task task); void doStart(Task task);
void doSubmit(Task task); void doSubmit(Task task);
} }
...@@ -7,11 +7,14 @@ import com.ruoyi.common.core.domain.model.LoginUser; ...@@ -7,11 +7,14 @@ import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.ReviewEnterpriseArchive; import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.ruoyi.domain.Task;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO; import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewItemVO;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO; import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.mapper.TaskMapper;
import com.ruoyi.service.ReviewEnterpriseArchiveService; import com.ruoyi.service.ReviewEnterpriseArchiveService;
import com.ruoyi.mapper.ReviewEnterpriseArchiveMapper; import com.ruoyi.mapper.ReviewEnterpriseArchiveMapper;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindByTaskIdRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindFileNameListRequest; import com.ruoyi.web.request.ReviewEnterpriseArchiveFindFileNameListRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest; import com.ruoyi.web.request.ReviewEnterpriseArchiveFindRequest;
import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest; import com.ruoyi.web.request.ReviewEnterpriseArchiveGetInfoRequest;
...@@ -40,14 +43,29 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp ...@@ -40,14 +43,29 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
@Autowired @Autowired
private ReviewEnterpriseArchiveService reviewEnterpriseArchiveService; private ReviewEnterpriseArchiveService reviewEnterpriseArchiveService;
@Autowired
private TaskMapper taskMapper;
@Override @Override
public List<ReviewEnterpriseArchiveViewVO> view(Long taskId) { public List<ReviewEnterpriseArchiveViewVO> view(Long taskId) {
Task task = taskMapper.selectById(taskId);
List<ReviewEnterpriseArchive> archives = reviewEnterpriseArchiveMapper.findByTaskId(taskId); List<ReviewEnterpriseArchive> archives = reviewEnterpriseArchiveMapper.findByTaskId(taskId);
List<ReviewEnterpriseArchiveViewItemVO> viewItems = reviewEnterpriseArchiveMapper.findViewItemVOByTaskId(taskId);
return buildReviewEnterpriseArchiveViewVO(archives, viewItems); List<ReviewEnterpriseArchiveViewVO> resultList = new ArrayList<>();
resultList.addAll(
buildReviewEnterpriseArchiveViewVO(archives, reviewEnterpriseArchiveMapper.findViewItemVOByTaskId(task.getSystemReviewTaskId()))
);
resultList.addAll(
buildReviewEnterpriseArchiveViewVO(archives, reviewEnterpriseArchiveMapper.findViewItemVOByTaskId(task.getCarReviewTaskId()))
);
return resultList;
} }
@Override @Override
...@@ -88,6 +106,11 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp ...@@ -88,6 +106,11 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
return reviewEnterpriseArchiveMapper.findList(request.getTaskId()); return reviewEnterpriseArchiveMapper.findList(request.getTaskId());
} }
@Override
public List<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(ReviewEnterpriseArchiveFindByTaskIdRequest request) {
return reviewEnterpriseArchiveMapper.findEnterpriseArchiveByTaskId(request);
}
private List<ReviewEnterpriseArchiveViewVO> buildReviewEnterpriseArchiveViewVO(List<ReviewEnterpriseArchive> archives, List<ReviewEnterpriseArchiveViewItemVO> viewItems) { private List<ReviewEnterpriseArchiveViewVO> buildReviewEnterpriseArchiveViewVO(List<ReviewEnterpriseArchive> archives, List<ReviewEnterpriseArchiveViewItemVO> viewItems) {
List<ReviewEnterpriseArchiveViewVO> viewList = new ArrayList(); List<ReviewEnterpriseArchiveViewVO> viewList = new ArrayList();
...@@ -105,6 +128,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp ...@@ -105,6 +128,7 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
} }
private void setReviewEnterpriseArchiveViewItemVO(ReviewEnterpriseArchiveViewVO view, List<ReviewEnterpriseArchiveViewItemVO> viewItems) { private void setReviewEnterpriseArchiveViewItemVO(ReviewEnterpriseArchiveViewVO view, List<ReviewEnterpriseArchiveViewItemVO> viewItems) {
if (viewItems == null) return;
List<ReviewEnterpriseArchiveViewItemVO> subList = new ArrayList(); List<ReviewEnterpriseArchiveViewItemVO> subList = new ArrayList();
Long archiveId = view.getId(); Long archiveId = view.getId();
......
...@@ -16,6 +16,7 @@ import org.springframework.context.ApplicationContext; ...@@ -16,6 +16,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -165,12 +166,36 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init ...@@ -165,12 +166,36 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
Map<Long, ReviewDetailsResult> resultMap = results.stream().collect(Collectors.toMap(ReviewDetailsResult::getReviewDetailsId, Function.identity(), (v1, v2) -> v1)); Map<Long, ReviewDetailsResult> resultMap = results.stream().collect(Collectors.toMap(ReviewDetailsResult::getReviewDetailsId, Function.identity(), (v1, v2) -> v1));
for(ReviewStandard standard : standards) {
standard.setPassed(ReviewStandard.PASSED);
List<ReviewKeyPoint> keyPointList = standard.getKeyPointList();
for(ReviewKeyPoint keypoint : keyPointList) {
List<ReviewDetails> reviewDetailsList = keypoint.getReviewDetailsList();
for(ReviewDetails details : reviewDetailsList) {
ReviewDetailsResult reviewDetailsResult = resultMap.get(details.getId());
if(reviewDetailsResult == null || Objects.equals(reviewDetailsResult.getPassed(), ReviewStandard.NO_PASSED)) {
standard.setPassed(ReviewStandard.NO_PASSED);
}
if(reviewDetailsResult != null && reviewDetailsResult.getReviewEnterpriseArchiveId() != null) {
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(reviewDetailsResult.getReviewEnterpriseArchiveId());
reviewDetailsResult.setEnterpriseName(reviewEnterpriseArchive.getEnterpriseName());
}
details.setResult(reviewDetailsResult);
}
}
}
List<TaskUserRelation> relationList = taskUserRelationMapper.selectQTeamMembers(taskMapper.findByCarReviewTaskId(carReviewTask.getId())); List<TaskUserRelation> relationList = taskUserRelationMapper.selectQTeamMembers(taskMapper.findByCarReviewTaskId(carReviewTask.getId()));
carReviewTask.setStandards(calculateStandards(standards)); carReviewTask.setStandards(calculateStandards(standards));
carReviewTask.setStandardsPass( calculateStandardsPass(standards, resultMap) / (double) carReviewTask.getStandards()); BigDecimal standardPass = new BigDecimal(calculateStandardsPass(standards, resultMap) / (double) carReviewTask.getStandards());
carReviewTask.setStandardsPass(standardPass.setScale(3,BigDecimal.ROUND_UP).doubleValue() * 100);
carReviewTask.setDetails(calculateDetails(standards)); carReviewTask.setDetails(calculateDetails(standards));
carReviewTask.setDetailsPass((calculateDetailsPass(standards, resultMap) / (double) carReviewTask.getDetails())); BigDecimal detailsPass = new BigDecimal(calculateDetailsPass(standards, resultMap) / (double) carReviewTask.getDetails());
carReviewTask.setDetailsPass(detailsPass.setScale(3,BigDecimal.ROUND_UP).doubleValue() * 100);
carReviewTask.setPerson(relationList.size()); carReviewTask.setPerson(relationList.size());
} }
......
...@@ -14,6 +14,8 @@ import org.springframework.context.ApplicationContext; ...@@ -14,6 +14,8 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -160,12 +162,35 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -160,12 +162,35 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
Map<Long, ReviewDetailsResult> resultMap = results.stream().collect(Collectors.toMap(ReviewDetailsResult::getReviewDetailsId, Function.identity(), (v1, v2) -> v1)); Map<Long, ReviewDetailsResult> resultMap = results.stream().collect(Collectors.toMap(ReviewDetailsResult::getReviewDetailsId, Function.identity(), (v1, v2) -> v1));
List<TaskUserRelation> relationList = taskUserRelationMapper.selectQTeamMembers(taskMapper.findByCarReviewTaskId(systemReviewTask.getId())); for(ReviewStandard standard : standards) {
standard.setPassed(ReviewStandard.PASSED);
List<ReviewKeyPoint> keyPointList = standard.getKeyPointList();
for(ReviewKeyPoint keypoint : keyPointList) {
List<ReviewDetails> reviewDetailsList = keypoint.getReviewDetailsList();
for(ReviewDetails details : reviewDetailsList) {
ReviewDetailsResult reviewDetailsResult = resultMap.get(details.getId());
if(reviewDetailsResult == null || Objects.equals(reviewDetailsResult.getPassed(), ReviewStandard.NO_PASSED)) {
standard.setPassed(ReviewStandard.NO_PASSED);
}
if(reviewDetailsResult != null && reviewDetailsResult.getReviewEnterpriseArchiveId() != null) {
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(reviewDetailsResult.getReviewEnterpriseArchiveId());
reviewDetailsResult.setEnterpriseName(reviewEnterpriseArchive.getEnterpriseName());
}
details.setResult(reviewDetailsResult);
}
}
}
List<TaskUserRelation> relationList = taskUserRelationMapper.selectQTeamMembers(taskMapper.findBySystemReviewTaskId(systemReviewTask.getId()));
systemReviewTask.setStandards(calculateStandards(standards)); systemReviewTask.setStandards(calculateStandards(standards));
systemReviewTask.setStandardsPass( calculateStandardsPass(standards, resultMap) / (double) systemReviewTask.getStandards()); BigDecimal standardPass = new BigDecimal(calculateStandardsPass(standards, resultMap) / (double) systemReviewTask.getStandards());
systemReviewTask.setStandardsPass(standardPass.setScale(3,BigDecimal.ROUND_UP).doubleValue() * 100);
systemReviewTask.setDetails(calculateDetails(standards)); systemReviewTask.setDetails(calculateDetails(standards));
systemReviewTask.setDetailsPass((calculateDetailsPass(standards, resultMap) / (double) systemReviewTask.getDetails())); BigDecimal detailsPass = new BigDecimal(calculateDetailsPass(standards, resultMap) / (double) systemReviewTask.getDetails());
systemReviewTask.setDetailsPass(detailsPass.setScale(3,BigDecimal.ROUND_UP).doubleValue() * 100);
systemReviewTask.setPerson(relationList.size()); systemReviewTask.setPerson(relationList.size());
} }
......
...@@ -55,9 +55,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -55,9 +55,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
@Autowired @Autowired
private ReviewDetailsMapper reviewDetailsMapper; private ReviewDetailsMapper reviewDetailsMapper;
@Autowired
private AutomobileEnterpriseMapper automobileEnterpriseMapper;
@Autowired @Autowired
private TaskStateFacade taskStateFacade; private TaskStateFacade taskStateFacade;
...@@ -302,25 +299,24 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -302,25 +299,24 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
TaskGetInfoResponse response = new TaskGetInfoResponse(); TaskGetInfoResponse response = new TaskGetInfoResponse();
Task task = taskService.getById(request.getId()); Task task = taskService.getById(request.getId());
if (task != null) {
BeanUtils.copyBeanProp(response, task); BeanUtils.copyBeanProp(response, task);
// 小组成员 // 小组成员
List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(request.getId()); response.setAuditors(setAuditors(request.getId()));
response.setAuditors(relation);
// 整车样品信息 // 整车样品信息
List<TaskSampleRelation> relationList = taskSampleRelationService.selectByTaskId(request.getId(),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE); response.setCompleteVehicleSample(setSampleList(request.getId(),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE));
if (relationList.size() != 0 && relationList != null) {
List<Sample> completeVehicleSampleList = sampleManagementMapper.findByIdList(relationList);
response.setCompleteVehicleSample(completeVehicleSampleList);
}
// 零部件样品信息 // 零部件样品信息
List<TaskSampleRelation> partRelationList = taskSampleRelationService.selectByTaskId(request.getId(),TaskSampleRelation.PART_VEHICLE_SAMPLE); response.setPartVehicleSample(setSampleList(request.getId(),TaskSampleRelation.PART_VEHICLE_SAMPLE));
if (partRelationList.size() != 0 && partRelationList != null) {
List<Sample> partVehicleSampleList = sampleManagementMapper.findByIdList(partRelationList);
response.setPartVehicleSample(partVehicleSampleList);
}
return response; return response;
} else {
return null;
}
} }
@Override @Override
...@@ -337,16 +333,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -337,16 +333,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
SysUser initiator = sysUserService.selectUserById(loginUser.getUserId()); SysUser initiator = sysUserService.selectUserById(loginUser.getUserId());
Standard standard = standardService.findListById(request.getStandardId()); Standard standard = standardService.findListById(request.getStandardId());
// 找到审查组长
TaskUserRelation leader = null;
List<TaskUserRelation> auditors = request.getAuditors();
for(TaskUserRelation auditor : auditors) {
if(auditor.getIsLeader() == 1) {
leader = auditor;
break;
}
}
// 构建并保存任务信息 // 构建并保存任务信息
// 总任务 // 总任务
Task task = new Task(); Task task = new Task();
...@@ -354,8 +340,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -354,8 +340,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
task.setTaskInitiator(initiator.getNickName()); task.setTaskInitiator(initiator.getNickName());
task.setTaskInitiatorDept(initiator.getDept().getDeptName()); task.setTaskInitiatorDept(initiator.getDept().getDeptName());
task.setTaskStatus(Task.TASK_STATUS_TEMPORARILY); task.setTaskStatus(Task.TASK_STATUS_TEMPORARILY);
task.setLeaderId(leader.getUserId());
task.setLeader(leader.getName());
task.setName(standard.getName()); task.setName(standard.getName());
task.setStandardNo(standard.getStandardNo()); task.setStandardNo(standard.getStandardNo());
task.setFile(standard.getFile()); task.setFile(standard.getFile());
...@@ -363,7 +347,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -363,7 +347,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
task.setTaskList(joinTaskList); task.setTaskList(joinTaskList);
BeanUtils.copyBeanProp(task, request); BeanUtils.copyBeanProp(task, request);
taskService.save(task); // 找到审查组长
TaskUserRelation leader = null;
List<TaskUserRelation> auditors = request.getAuditors();
if (auditors.size() != 0 && auditors != null) {
for(TaskUserRelation auditor : auditors) {
if(auditor.getIsLeader() == 1) {
leader = auditor;
break;
}
}
// 构建并保存该任务所关联的审核组信息 // 构建并保存该任务所关联的审核组信息
for(TaskUserRelation auditor : auditors) { for(TaskUserRelation auditor : auditors) {
...@@ -372,6 +365,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -372,6 +365,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
taskUserRelationService.saveBatch(auditors); taskUserRelationService.saveBatch(auditors);
// 任务组长
task.setLeaderId(leader.getUserId());
task.setLeader(leader.getName());
}
// 暂存
taskService.save(task);
// 保存关联的整车样品信息 // 保存关联的整车样品信息
List<TaskSampleRelation> relations = request.getSample(); List<TaskSampleRelation> relations = request.getSample();
if (relations.size() != 0 && relations != null) { if (relations.size() != 0 && relations != null) {
...@@ -402,27 +404,65 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta ...@@ -402,27 +404,65 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
if (task != null && task.getId() != null) { if (task != null && task.getId() != null) {
BeanUtils.copyBeanProp(response, task); BeanUtils.copyBeanProp(response, task);
// 小组成员 // 小组成员
List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(task.getId()); response.setAuditors(setAuditors(task.getId()));
response.setAuditors(relation);
// 整车样品信息 // 整车样品信息
List<TaskSampleRelation> relationList = taskSampleRelationService.selectByTaskId(task.getId(), TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE); response.setCompleteVehicleSample(setSampleList(task.getId(), TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE));
if (relationList.size() != 0 && relationList != null) {
List<Sample> completeVehicleSampleList = sampleManagementMapper.findByIdList(relationList);
response.setCompleteVehicleSample(completeVehicleSampleList);
}
// 零部件样品信息 // 零部件样品信息
List<TaskSampleRelation> partRelationList = taskSampleRelationService.selectByTaskId(task.getId(), TaskSampleRelation.PART_VEHICLE_SAMPLE); response.setPartVehicleSample(setSampleList(task.getId(), TaskSampleRelation.PART_VEHICLE_SAMPLE));
if (partRelationList.size() != 0 && partRelationList != null) {
List<Sample> partVehicleSampleList = sampleManagementMapper.findByIdList(partRelationList); return response;
response.setPartVehicleSample(partVehicleSampleList); } else {
return null;
}
} }
@Override
public TaskGetInfoResponse getBySubtaskId(TaskSubGetInfoRequest request) {
TaskGetInfoResponse response = new TaskGetInfoResponse();
Task task = taskMapper.getBySubtaskId(request.getId());
if (task != null) {
BeanUtils.copyBeanProp(response, task);
// 小组成员
response.setAuditors(setAuditors(task.getId()));
// 整车样品信息
response.setCompleteVehicleSample(setSampleList(task.getId(),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE));
// 零部件样品信息
response.setPartVehicleSample(setSampleList(task.getId(),TaskSampleRelation.PART_VEHICLE_SAMPLE));
return response; return response;
} else { } else {
return null; return null;
} }
}
public List<TaskUserRelation> setAuditors ( Long id) {
// 小组成员
List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(id);
return relation;
}
public List<Sample> setSampleList(Long id,String type) {
// 样品信息
List<TaskSampleRelation> relationList = taskSampleRelationService.selectByTaskId(id,type);
if (relationList.size() != 0 && relationList != null) {
List<Sample> SampleList = sampleManagementMapper.findByIdList(relationList);
return SampleList;
} else {
return null;
}
} }
......
package com.ruoyi.service.impl;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.Task;
import com.ruoyi.service.CarReviewTaskService;
import com.ruoyi.service.SystemReviewTaskService;
import com.ruoyi.service.TaskService;
import com.ruoyi.service.TaskState;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Objects;
@Component
public abstract class TaskStateAdapter implements TaskState {
@Autowired
private SystemReviewTaskService systemReviewTaskService;
@Autowired
private CarReviewTaskService carReviewTaskService;
@Autowired
private TaskService taskService;
@Override
public void doStart(Task task) {
task.setTaskStatus(Task.TASK_STATUS_PENDING);
task.setRunStatus(Task.RUN_STATUS_STATUS_RUNNING);
if (Objects.equals(task.getNextNode(), Task.SUB_TASK_SRAIF)) {
systemReviewTaskService.start(task.getSystemReviewTaskId());
taskService.updateById(task);
} else if (Objects.equals(task.getNextNode(), Task.SUB_TASK_GRFIS)) {
carReviewTaskService.startReviewTask(task.getCarReviewTaskId());
taskService.updateById(task);
} else {
throw new ServiceException("已没有可执行的子任务节点", HttpStatus.ERROR);
}
task.setPointer(task.getPointer() + 1);
taskService.updateById(task);
}
}
...@@ -14,7 +14,7 @@ import java.util.List; ...@@ -14,7 +14,7 @@ import java.util.List;
@Transactional @Transactional
@Service @Service
public class TaskStateFinish implements TaskState, InitializingBean { public class TaskStateFinish extends TaskStateAdapter implements TaskState, InitializingBean {
@Autowired @Autowired
private TaskStateContext taskStateContext; private TaskStateContext taskStateContext;
......
...@@ -3,8 +3,6 @@ package com.ruoyi.service.impl; ...@@ -3,8 +3,6 @@ package com.ruoyi.service.impl;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.Task; import com.ruoyi.domain.Task;
import com.ruoyi.service.CarReviewTaskService;
import com.ruoyi.service.SystemReviewTaskService;
import com.ruoyi.service.TaskService; import com.ruoyi.service.TaskService;
import com.ruoyi.service.TaskState; import com.ruoyi.service.TaskState;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
...@@ -13,12 +11,12 @@ import org.springframework.context.ApplicationContext; ...@@ -13,12 +11,12 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
@Transactional @Transactional
@Service @Service
public class TaskStateNew implements TaskState, InitializingBean { public class TaskStateNew extends TaskStateAdapter implements TaskState, InitializingBean {
@Autowired @Autowired
private TaskStateContext taskStateContext; private TaskStateContext taskStateContext;
...@@ -29,52 +27,29 @@ public class TaskStateNew implements TaskState, InitializingBean { ...@@ -29,52 +27,29 @@ public class TaskStateNew implements TaskState, InitializingBean {
@Autowired @Autowired
private TaskService taskService; private TaskService taskService;
@Autowired
private SystemReviewTaskService systemReviewTaskService;
@Autowired
private CarReviewTaskService carReviewTaskService;
@Override @Override
public void doCreate(Task task, List<String> taskList) { public void doCreate(Task task, List<String> taskList) {
String nextNode = null; List<String> subTasks = new ArrayList<>();
if(taskList.contains(Task.SUB_TASK_TRFIS)) {
nextNode = Task.SUB_TASK_TRFIS;
}
if(taskList.contains(Task.SUB_TASK_GRFIS)) {
// 保存车型审查问卷任务
nextNode = Task.SUB_TASK_GRFIS;;
}
if(taskList.contains(Task.SUB_TASK_SRAIF)) {
// 保存体系审查任务 // 保存体系审查任务
nextNode = Task.SUB_TASK_SRAIF; if(taskList.contains(Task.SUB_TASK_SRAIF)) {
subTasks.add(Task.SUB_TASK_SRAIF);
} }
task.setNextNode(nextNode); // 保存车型审查问卷任务
if(taskList.contains(Task.SUB_TASK_GRFIS)) {
taskService.updateById(task); subTasks.add(Task.SUB_TASK_GRFIS);
} }
@Override // 车型试验任务
public void doStart(Task task) { if(taskList.contains(Task.SUB_TASK_TRFIS)) {
subTasks.add(Task.SUB_TASK_TRFIS);
task.setTaskStatus(Task.TASK_STATUS_PENDING);
task.setRunStatus(Task.RUN_STATUS_STATUS_RUNNING);
if (Objects.equals(task.getNextNode(), Task.SUB_TASK_SRAIF)) {
systemReviewTaskService.start(task.getSystemReviewTaskId());
task.setNextNode(Task.SUB_TASK_GRFIS);
taskService.updateById(task);
} else if (Objects.equals(task.getNextNode(), Task.SUB_TASK_GRFIS)) {
carReviewTaskService.startReviewTask(task.getCarReviewTaskId());
task.setNextNode(Task.SUB_TASK_TRFIS);
taskService.updateById(task);
} }
task.setPointer(0);
task.setMaxPointer(subTasks.size());
taskService.updateById(task); taskService.updateById(task);
} }
...@@ -87,4 +62,5 @@ public class TaskStateNew implements TaskState, InitializingBean { ...@@ -87,4 +62,5 @@ public class TaskStateNew implements TaskState, InitializingBean {
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
taskStateContext.putResource(Task.TASK_STATUS_NEW, applicationContext.getBean(this.getClass())); taskStateContext.putResource(Task.TASK_STATUS_NEW, applicationContext.getBean(this.getClass()));
} }
} }
...@@ -6,8 +6,7 @@ import com.ruoyi.domain.CarReviewTask; ...@@ -6,8 +6,7 @@ import com.ruoyi.domain.CarReviewTask;
import com.ruoyi.domain.SystemReviewTask; import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.domain.Task; import com.ruoyi.domain.Task;
import com.ruoyi.mapper.ReviewDetailsMapper; import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.service.CarReviewTaskService;
import com.ruoyi.service.SystemReviewTaskService;
import com.ruoyi.service.TaskService; import com.ruoyi.service.TaskService;
import com.ruoyi.service.TaskState; import com.ruoyi.service.TaskState;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
...@@ -17,11 +16,10 @@ import org.springframework.stereotype.Service; ...@@ -17,11 +16,10 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Objects;
@Transactional @Transactional
@Service @Service
public class TaskStatePending implements TaskState, InitializingBean { public class TaskStatePending extends TaskStateAdapter implements TaskState, InitializingBean {
@Autowired @Autowired
private TaskStateContext taskStateContext; private TaskStateContext taskStateContext;
...@@ -35,37 +33,13 @@ public class TaskStatePending implements TaskState, InitializingBean { ...@@ -35,37 +33,13 @@ public class TaskStatePending implements TaskState, InitializingBean {
@Autowired @Autowired
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
@Autowired
private SystemReviewTaskService systemReviewTaskService;
@Autowired
private CarReviewTaskService carReviewTaskService;
@Override @Override
public void doCreate(Task task, List<String> taskList) { public void doCreate(Task task, List<String> taskList) {
throw new ServiceException("不能创建一个已经开始的任务", HttpStatus.ERROR); throw new ServiceException("不能创建一个已经开始的任务", HttpStatus.ERROR);
} }
@Override
public void doStart(Task task) {
task.setTaskStatus(Task.TASK_STATUS_PENDING);
task.setRunStatus(Task.RUN_STATUS_STATUS_RUNNING);
if (Objects.equals(task.getNextNode(), Task.SUB_TASK_SRAIF)) {
systemReviewTaskService.start(task.getSystemReviewTaskId());
task.setNextNode(Task.SUB_TASK_GRFIS);
taskService.updateById(task);
} else if (Objects.equals(task.getNextNode(), Task.SUB_TASK_GRFIS)) {
carReviewTaskService.startReviewTask(task.getCarReviewTaskId());
task.setNextNode(Task.SUB_TASK_TRFIS);
taskService.updateById(task);
}
}
@Override @Override
public void doSubmit(Task task) { public void doSubmit(Task task) {
......
...@@ -40,6 +40,15 @@ public class ReviewEnterpriseArchiveController extends BaseController { ...@@ -40,6 +40,15 @@ public class ReviewEnterpriseArchiveController extends BaseController {
return getDataTable(reviewEnterpriseArchiveService.findEnterpriseArchive(request)); return getDataTable(reviewEnterpriseArchiveService.findEnterpriseArchive(request));
} }
@ApiOperation("根据任务id分页查询车企文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findEnterpriseArchiveByTaskId")
public TableDataInfo<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(@Validated @RequestBody ReviewEnterpriseArchiveFindByTaskIdRequest request) {
startPage(request);
return getDataTable(reviewEnterpriseArchiveService.findEnterpriseArchiveByTaskId(request));
}
@ApiOperation("根据id查询") @ApiOperation("根据id查询")
@Trace @Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......
...@@ -91,6 +91,16 @@ public class TaskController extends BaseController { ...@@ -91,6 +91,16 @@ public class TaskController extends BaseController {
return R.ok(response); return R.ok(response);
} }
@ApiOperation("根据子任务id查看任务详情")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getBySubtaskId")
public R<TaskGetInfoResponse> getBySubtaskId(@Validated @RequestBody TaskSubGetInfoRequest request) {
TaskGetInfoResponse response = taskService.getBySubtaskId(request);
return R.ok(response);
}
@ApiOperation("用户发布的任务") @ApiOperation("用户发布的任务")
@Trace @Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......
package com.ruoyi.web.request;
import com.ruoyi.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "ReviewEnterpriseArchiveFindByTaskIdRequest", description = "根据任务id查询车企文件")
@Data
public class ReviewEnterpriseArchiveFindByTaskIdRequest extends PageDomain {
@ApiModelProperty("文件名称")
private String fileName;
@ApiModelProperty("文件状态")
private String status;
@ApiModelProperty("文件识别号")
private String identifyNumber;
@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 = "TaskSubGetInfoRequest", description = "根据子任务id查看任务详情")
@Data
public class TaskSubGetInfoRequest {
@ApiModelProperty("id")
private Long id;
}
...@@ -42,9 +42,6 @@ public class TaskFindResponse { ...@@ -42,9 +42,6 @@ public class TaskFindResponse {
@ApiModelProperty("任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]") @ApiModelProperty("任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]")
private String runStatus; private String runStatus;
@ApiModelProperty("下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)")
private String nextNode;
@ApiModelProperty("总任务开始时间") @ApiModelProperty("总任务开始时间")
private Date taskBeginTime; private Date taskBeginTime;
......
...@@ -35,9 +35,6 @@ public class TaskGetInfoResponse { ...@@ -35,9 +35,6 @@ public class TaskGetInfoResponse {
@ApiModelProperty("任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]") @ApiModelProperty("任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]")
private String runStatus; private String runStatus;
@ApiModelProperty("下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)")
private String nextNode;
@ApiModelProperty("任务编号") @ApiModelProperty("任务编号")
private String taskNo; private String taskNo;
......
...@@ -65,4 +65,20 @@ ...@@ -65,4 +65,20 @@
FROM t_review_enterprise_archive FROM t_review_enterprise_archive
where task_id = #{taskId} where task_id = #{taskId}
</select> </select>
<select id="findEnterpriseArchiveByTaskId" resultType="com.ruoyi.domain.ReviewEnterpriseArchive">
SELECT id, enterprise_name, file_name, version, publish_date, status, identify_number, storage, photo, task_id, create_by, create_time
FROM t_review_enterprise_archive
<where>
task_id = #{taskId}
<if test="fileName != null and fileName != ''">
and file_name like concat('%',#{fileName},'%')
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
<if test="identifyNumber != null and identifyNumber != ''">
and identify_number = #{identifyNumber}
</if>
</where>
</select>
</mapper> </mapper>
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<result property="carReviewTaskId" column="car_review_task_id" jdbcType="BIGINT"/> <result property="carReviewTaskId" column="car_review_task_id" jdbcType="BIGINT"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/> <result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="runStatus" column="run_status" jdbcType="VARCHAR"/> <result property="runStatus" column="run_status" jdbcType="VARCHAR"/>
<result property="nextNode" column="next_node" jdbcType="VARCHAR"/>
<result property="taskNo" column="task_no" jdbcType="VARCHAR"/> <result property="taskNo" column="task_no" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/> <result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="confidentialityLevel" column="confidentiality_level" jdbcType="VARCHAR"/> <result property="confidentialityLevel" column="confidentiality_level" jdbcType="VARCHAR"/>
...@@ -35,6 +34,8 @@ ...@@ -35,6 +34,8 @@
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/> <result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
<result property="file" column="file" jdbcType="VARCHAR"/> <result property="file" column="file" jdbcType="VARCHAR"/>
<result property="taskList" column="task_list" jdbcType="VARCHAR"/> <result property="taskList" column="task_list" jdbcType="VARCHAR"/>
<result property="pointer" column="pointer" jdbcType="BIGINT"/>
<result property="maxPointer" column="max_pointer" jdbcType="BIGINT"/>
</resultMap> </resultMap>
<resultMap id="ResponseMap" type="com.ruoyi.web.response.TaskFindResponse"> <resultMap id="ResponseMap" type="com.ruoyi.web.response.TaskFindResponse">
...@@ -47,7 +48,6 @@ ...@@ -47,7 +48,6 @@
<result property="productModel" column="product_model" jdbcType="VARCHAR"/> <result property="productModel" column="product_model" jdbcType="VARCHAR"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/> <result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="runStatus" column="run_status" jdbcType="VARCHAR"/> <result property="runStatus" column="run_status" jdbcType="VARCHAR"/>
<result property="nextNode" column="next_node" jdbcType="VARCHAR"/>
<result property="taskBeginTime" column="task_begin_time" jdbcType="TIMESTAMP"/> <result property="taskBeginTime" column="task_begin_time" jdbcType="TIMESTAMP"/>
<result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/> <result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/>
<result property="systemTaskBeginTime" column="system_task_begin_time" jdbcType="TIMESTAMP"/> <result property="systemTaskBeginTime" column="system_task_begin_time" jdbcType="TIMESTAMP"/>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap"> <select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap">
SELECT id, system_review_task_id, car_review_task_id, SELECT id, system_review_task_id, car_review_task_id,
task_status,next_node,task_no,task_name,confidentiality_level, task_status,task_no,task_name,confidentiality_level,
product_name,product_model, product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone, entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,vehicle_sample_information,part_sample_information, entrusted_unit_code,vehicle_sample_information,part_sample_information,
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time, t.task_begin_time,
t.product_model, t.product_model,
t.next_node,
srt.task_begin_time system_task_begin_time, srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time, srt.task_end_time system_task_end_time,
srt.task_status review_status, srt.task_status review_status,
...@@ -168,7 +167,6 @@ ...@@ -168,7 +167,6 @@
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time, t.task_begin_time,
t.task_end_time, t.task_end_time,
t.next_node,
srt.task_begin_time system_task_begin_time, srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time, srt.task_end_time system_task_end_time,
srt.task_status review_status, srt.task_status review_status,
...@@ -241,7 +239,7 @@ ...@@ -241,7 +239,7 @@
</select> </select>
<select id="getByUserIdTemporary" resultType="com.ruoyi.domain.Task"> <select id="getByUserIdTemporary" resultType="com.ruoyi.domain.Task">
SELECT id, system_review_task_id, car_review_task_id, SELECT id, system_review_task_id, car_review_task_id,
task_status,run_status,next_node,task_no,task_name,confidentiality_level, task_status,run_status,task_no,task_name,confidentiality_level,
product_name,product_model, product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone, entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,vehicle_sample_information,part_sample_information, entrusted_unit_code,vehicle_sample_information,part_sample_information,
...@@ -252,6 +250,19 @@ ...@@ -252,6 +250,19 @@
FROM t_task FROM t_task
WHERE task_initiator_id = #{userId} and task_status = 'TEMPORARILY' WHERE task_initiator_id = #{userId} and task_status = 'TEMPORARILY'
</select> </select>
<select id="getBySubtaskId" resultType="com.ruoyi.domain.Task">
SELECT id, system_review_task_id, car_review_task_id,
task_status,run_status,task_no,task_name,confidentiality_level,
product_name,product_model,
entrusted_unit,entrusted_unit_address,entrusted_unit_phone,
entrusted_unit_code,vehicle_sample_information,part_sample_information,
task_initiator_id,task_initiator,task_initiator_dept,
task_begin_time,task_end_time,create_time,
leader_id,leader,standard_id,name,
standard_no,file,task_list
FROM t_task
WHERE system_review_task_id = #{subId} OR car_review_task_id = #{subId}
</select>
</mapper> </mapper>
This source diff could not be displayed because it is too large. You can view the blob instead.
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