Commit ffd36c26 authored by 高滢's avatar 高滢
parents 33b2c5da a6e4473f
package com.ruoyi.domain; package com.ruoyi.domain;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
...@@ -19,6 +20,10 @@ import lombok.experimental.Accessors; ...@@ -19,6 +20,10 @@ import lombok.experimental.Accessors;
@Data @Data
public class TaskUserRelation { public class TaskUserRelation {
// 用户状态禁用
@TableField(exist = false)
public static final String USER_STATUS_PROHIBIT = "1";
/** /**
* 任务id * 任务id
*/ */
...@@ -52,4 +57,8 @@ public class TaskUserRelation { ...@@ -52,4 +57,8 @@ public class TaskUserRelation {
@ApiModelProperty("部门名称") @ApiModelProperty("部门名称")
private String deptName; private String deptName;
@TableField(exist = false)
@ApiModelProperty("用户状态")
private String status;
} }
...@@ -9,6 +9,7 @@ import com.ruoyi.web.request.TaskFindPendingRequest; ...@@ -9,6 +9,7 @@ import com.ruoyi.web.request.TaskFindPendingRequest;
import com.ruoyi.web.request.TaskFindRequest; import com.ruoyi.web.request.TaskFindRequest;
import com.ruoyi.web.request.TaskListRequest; import com.ruoyi.web.request.TaskListRequest;
import com.ruoyi.web.response.TaskFindResponse; import com.ruoyi.web.response.TaskFindResponse;
import com.ruoyi.web.response.TaskScenarioResponse;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -52,4 +53,7 @@ public interface TaskMapper extends BaseMapper<Task> { ...@@ -52,4 +53,7 @@ public interface TaskMapper extends BaseMapper<Task> {
* @return * @return
*/ */
InspectionReportPdfVO selectInspectionReportData(Long taskId); InspectionReportPdfVO selectInspectionReportData(Long taskId);
// 根据任务列表查询对应的场景数量
List<TaskScenarioResponse> findByTaskList(@Param("responses") List<TaskFindResponse> responses);
} }
...@@ -23,6 +23,9 @@ public interface TaskUserRelationMapper extends BaseMapper<TaskUserRelation> { ...@@ -23,6 +23,9 @@ public interface TaskUserRelationMapper extends BaseMapper<TaskUserRelation> {
*/ */
List<TaskUserRelation> selectQTeamMembers(@Param("taskId") Long taskId); List<TaskUserRelation> selectQTeamMembers(@Param("taskId") Long taskId);
// 根据小组成员id列表查询状态
List<TaskUserRelation> findByIdList(@Param("idList") List<TaskUserRelation> idList);
} }
......
...@@ -73,7 +73,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -73,7 +73,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
PdfStamper ps = null; PdfStamper ps = null;
ByteArrayOutputStream bos = null; ByteArrayOutputStream bos = null;
// 模板绝对路径--服务器 // 模板绝对路径--服务器
String fileName = "/template/receipt_template_03_27.pdf"; String fileName = "/template/receipt_template_04_02.pdf";
// 读取现有模板内容 // 读取现有模板内容
reader = new PdfReader(fileName); reader = new PdfReader(fileName);
// 创建输出流 // 创建输出流
...@@ -140,8 +140,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -140,8 +140,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
document.writeBottomCell("共 10 页", Element.ALIGN_RIGHT, 1, 1, signTable).setRightIndent(30f); document.writeBottomCell("共 10 页", Element.ALIGN_RIGHT, 1, 1, signTable).setRightIndent(30f);
document.writeBottomCell("第 10 页", Element.ALIGN_RIGHT, 1, 1, signTable); document.writeBottomCell("第 10 页", Element.ALIGN_RIGHT, 1, 1, signTable);
document.addContent(signTable); document.addContent(signTable);
document.setParagraph("7.附录", 10.5f, Element.ALIGN_LEFT, 45,1f, 0f); document.setParagraph("7.附录", 10.5f, Element.ALIGN_LEFT, 45,1f, 10f);
document.setParagraph("图 1 样品照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f);
// 添加内容到新页面 // 添加内容到新页面
PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25}); PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25});
pictureTable.setWidthPercentage(90); pictureTable.setWidthPercentage(90);
...@@ -157,7 +156,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -157,7 +156,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
Optional<String> optionalElement = i < pictureList.size() Optional<String> optionalElement = i < pictureList.size()
? Optional.of(pictureList.get(i)) ? Optional.of(pictureList.get(i))
: Optional.empty(); : Optional.empty();
if (optionalElement.isPresent()) { if (optionalElement.isPresent() && StrUtil.isNotEmpty(optionalElement.get())) {
Image image = Image.getInstance(new URL(minioEndpoint + optionalElement.get())); Image image = Image.getInstance(new URL(minioEndpoint + optionalElement.get()));
image.scaleAbsolute(100, 100); image.scaleAbsolute(100, 100);
cell.addElement(image); cell.addElement(image);
...@@ -168,6 +167,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -168,6 +167,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
pictureTable.addCell(cell); pictureTable.addCell(cell);
} }
document.addContent(pictureTable); document.addContent(pictureTable);
document.setParagraph("图 1 样品照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f);
document.setParagraph("图 2 试验照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f); document.setParagraph("图 2 试验照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f);
// 关闭PDF // 关闭PDF
document.close(); document.close();
...@@ -229,13 +229,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -229,13 +229,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
// 查询数据 // 查询数据
List<ReviewEnterpriseArchiveViewVO> viewList = reviewEnterpriseArchiveService.view(taskId); List<ReviewEnterpriseArchiveViewVO> viewList = reviewEnterpriseArchiveService.view(taskId);
for (ReviewEnterpriseArchiveViewVO view : viewList) { for (ReviewEnterpriseArchiveViewVO view : viewList) {
document.writeCell(view.getFileName(), Element.ALIGN_LEFT, 1, view.getItems().size(), table); if (view.getItems().size() > 0) {
view.getItems().forEach(item -> { document.writeCell(view.getFileName(), Element.ALIGN_LEFT, 1, view.getItems().size(), table);
document.writeCell(item.getCatalogue(), Element.ALIGN_LEFT, 1, 1, table); view.getItems().forEach(item -> {
document.writeCell(item.getChapter(), Element.ALIGN_LEFT, 1, 1, table); document.writeCell(item.getCatalogue(), Element.ALIGN_LEFT, 1, 1, table);
document.writeCell(item.getStandard(), Element.ALIGN_LEFT, 1, 1, table); document.writeCell(item.getChapter(), Element.ALIGN_LEFT, 1, 1, table);
document.writeCell(item.getKeyPoint(), Element.ALIGN_LEFT, 1, 1, table); document.writeCell(item.getStandard(), Element.ALIGN_LEFT, 1, 1, table);
}); document.writeCell(item.getKeyPoint(), Element.ALIGN_LEFT, 1, 1, table);
});
}
} }
document.addContent(table); document.addContent(table);
// 最后结尾签字 // 最后结尾签字
...@@ -346,13 +348,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -346,13 +348,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
} }
// 图片域 // 图片域
// 样品 // 样品
String url = inspectionReportPdfVO.getBrandImage(); // String url = inspectionReportPdfVO.getBrandImage();
if (StrUtil.isNotBlank(url)) { // if (StrUtil.isNotBlank(url)) {
if (url.startsWith(",")) { // if (url.startsWith(",")) {
url = inspectionReportPdfVO.getBrandImage().substring(1); // url = inspectionReportPdfVO.getBrandImage().substring(1);
} // }
addImageToPdf("brand", fields, ps, "http://49.232.167.247:22038" + url.split(",")[0]); // addImageToPdf("brand", fields, ps, "http://49.232.167.247:22038" + url.split(",")[0]);
} // }
} }
......
package com.ruoyi.service.impl; package com.ruoyi.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -156,9 +157,9 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper, ...@@ -156,9 +157,9 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
// 查看此标准下所有的测试用例 // 查看此标准下所有的测试用例
List<TestUseCase> usecaseRelationList = testUseCaseMapper.selectList(new QueryWrapper<TestUseCase>().eq("review_standard_id", standardId)); List<TestUseCase> usecaseRelationList = testUseCaseMapper.selectList(new QueryWrapper<TestUseCase>().eq("review_standard_id", standardId));
// 此标准还可以选择的用例 // 此标准还可以选择的用例
List<OptionalUseCasesVO> optionalUseCasesVOList = testUseCases.stream().filter(a -> !a.getStandardId().equals(standardId)).collect(Collectors.toList()); // List<OptionalUseCasesVO> optionalUseCasesVOList = testUseCases.stream().filter(a -> !a.getStandardId().equals(standardId)).collect(Collectors.toList());
optionalUseCasesVOList.stream().forEach(obj -> obj.setDisabled(false)); testUseCases.stream().forEach(obj -> obj.setDisabled(false));
response.setOptionalUseCasesList(optionalUseCasesVOList); response.setOptionalUseCasesList(testUseCases);
response.setSelectedUseCaseList(usecaseRelationList.stream().map(TestUseCase::getId).collect(Collectors.toList())); response.setSelectedUseCaseList(usecaseRelationList.stream().map(TestUseCase::getId).collect(Collectors.toList()));
return response; return response;
} }
...@@ -169,9 +170,18 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper, ...@@ -169,9 +170,18 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
*/ */
@Override @Override
public void saveStandardUsecase(ReviewStandardSaveStandardUsecaseRequest request) { public void saveStandardUsecase(ReviewStandardSaveStandardUsecaseRequest request) {
// 删除之前绑定关系
testUseCaseMapper.update( testUseCaseMapper.update(
TestUseCase.builder().reviewStandardId(request.getStandardId()).build(), null,
new UpdateWrapper<TestUseCase>().in("id", request.getUsecaseIdList())); new UpdateWrapper<TestUseCase>()
.set("review_standard_id", null)
.in("review_standard_id", request.getStandardId()));
if (CollUtil.isNotEmpty(request.getUsecaseIdList())) {
// 绑定现在的
testUseCaseMapper.update(
TestUseCase.builder().reviewStandardId(request.getStandardId()).build(),
new UpdateWrapper<TestUseCase>().in("id", request.getUsecaseIdList()));
}
} }
/** /**
......
...@@ -127,9 +127,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init ...@@ -127,9 +127,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
public void doConfirmReview(CarReviewTask carReviewTask) { public void doConfirmReview(CarReviewTask carReviewTask) {
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId(),CarReviewTask.TYPE); List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(carReviewTask.getId(),CarReviewTask.TYPE);
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(carReviewTask.getId()); List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(carReviewTask.getId());
if (detailsList.size() != 0 && detailsList != null) { if (detailsList != null && detailsList.size() != 0) {
throw new ServiceException("存在未填写的表单,请填写完整", HttpStatus.ERROR, detailsList); throw new ServiceException("存在未填写的表单,请填写完整", HttpStatus.ERROR, detailsList);
} else if (inboxList.size() != 0 && inboxList != null){ } else if (inboxList != null && inboxList.size() != 0){
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR); throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
}else { }else {
// 1. 获取最新问卷 // 1. 获取最新问卷
......
package com.ruoyi.service.impl; package com.ruoyi.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
...@@ -64,21 +65,23 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali ...@@ -64,21 +65,23 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
// 创建一个HashMap, 用于存放数据。用例条款ID作为key // 创建一个HashMap, 用于存放数据。用例条款ID作为key
HashMap<Long, List<TestCaseVO>> map = new HashMap<>(); HashMap<Long, List<TestCaseVO>> map = new HashMap<>();
for (TestUsecaseVO testUsecaseVO : testCaseList) { for (TestUsecaseVO testUsecaseVO : testCaseList) {
// map不存在此key,添加; 则,存数据 if (ObjectUtil.isNotEmpty(testUsecaseVO.getReviewStandardId())) {
if (!map.containsKey(testUsecaseVO.getReviewStandardId())) { // map不存在此key,添加; 则,存数据
TestCaseVO caseVO = new TestCaseVO(); if (!map.containsKey(testUsecaseVO.getReviewStandardId())) {
BeanUtils.copyProperties(testUsecaseVO, caseVO); TestCaseVO caseVO = new TestCaseVO();
List<TestCaseVO> caseList = new ArrayList<>(); BeanUtils.copyProperties(testUsecaseVO, caseVO);
caseList.add(caseVO); List<TestCaseVO> caseList = new ArrayList<>();
map.put(testUsecaseVO.getReviewStandardId(), caseList); caseList.add(caseVO);
} else { map.put(testUsecaseVO.getReviewStandardId(), caseList);
TestCaseVO caseVO = new TestCaseVO(); } else {
BeanUtils.copyProperties(testUsecaseVO, caseVO); TestCaseVO caseVO = new TestCaseVO();
map.get(testUsecaseVO.getReviewStandardId()).add(caseVO); BeanUtils.copyProperties(testUsecaseVO, caseVO);
map.get(testUsecaseVO.getReviewStandardId()).add(caseVO);
}
} }
} }
// 循环map, 给list赋值 // 循环map, 给list赋值
for (Map.Entry<Long, List<TestCaseVO>> entry : map.entrySet()) { for (Map.Entry<Long, List<TestCaseVO>> entry : map.entrySet()) {
List<TestUsecaseVO> collect = testCaseList.stream().filter(testCaseVO -> entry.getKey().equals(testCaseVO.getReviewStandardId())).collect(Collectors.toList()); List<TestUsecaseVO> collect = testCaseList.stream().filter(testCaseVO -> entry.getKey().equals(testCaseVO.getReviewStandardId())).collect(Collectors.toList());
if (collect.size() > 0){ if (collect.size() > 0){
TestUsecaseVO testUsecaseVO = collect.get(0); TestUsecaseVO testUsecaseVO = collect.get(0);
...@@ -104,6 +107,7 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali ...@@ -104,6 +107,7 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
public void doStartTest(ModelTestTask modelTestTask) { public void doStartTest(ModelTestTask modelTestTask) {
modelTestTaskMapper.update(new ModelTestTask(), modelTestTaskMapper.update(new ModelTestTask(),
new LambdaUpdateWrapper<ModelTestTask>() new LambdaUpdateWrapper<ModelTestTask>()
.set(ModelTestTask::getTaskBeginTime, new Date())
.set(ModelTestTask::getTaskStatus, ModelTestTask.TASK_STATUS_PENDING) .set(ModelTestTask::getTaskStatus, ModelTestTask.TASK_STATUS_PENDING)
.eq(ModelTestTask::getId, modelTestTask.getId())); .eq(ModelTestTask::getId, modelTestTask.getId()));
} }
......
...@@ -13,6 +13,7 @@ import org.springframework.context.ApplicationContext; ...@@ -13,6 +13,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.util.Date;
import java.util.List; import java.util.List;
@Service @Service
...@@ -47,6 +48,7 @@ public class StrategyModelTestTaskPending implements StrategyModelTestTask, Init ...@@ -47,6 +48,7 @@ public class StrategyModelTestTaskPending implements StrategyModelTestTask, Init
// 进行中的任务, 点击确认后, 状态改为待签字 // 进行中的任务, 点击确认后, 状态改为待签字
modelTestTaskMapper.update(new ModelTestTask(), modelTestTaskMapper.update(new ModelTestTask(),
new LambdaUpdateWrapper<ModelTestTask>() new LambdaUpdateWrapper<ModelTestTask>()
.set(ModelTestTask::getTaskEndTime, new Date())
.set(ModelTestTask::getTaskStatus, ModelTestTask.TASK_STATUS_SIGNED) .set(ModelTestTask::getTaskStatus, ModelTestTask.TASK_STATUS_SIGNED)
.eq(ModelTestTask::getId, modelTestTask.getId())); .eq(ModelTestTask::getId, modelTestTask.getId()));
} }
......
...@@ -88,9 +88,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -88,9 +88,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
public void doConfirm(SystemReviewTask systemReviewTask) { public void doConfirm(SystemReviewTask systemReviewTask) {
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId(),SystemReviewTask.TYPE); List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(systemReviewTask.getId(),SystemReviewTask.TYPE);
List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(systemReviewTask.getId()); List<ReviewTaskInbox> inboxList = reviewTaskInboxMapper.findConfirmListByTaskId(systemReviewTask.getId());
if (detailsList.size() != 0 && detailsList != null) { if (detailsList != null && detailsList.size() != 0) {
throw new ServiceException("存在未填写的表单,请填写完整", HttpStatus.ERROR, detailsList); throw new ServiceException("存在未填写的表单,请填写完整", HttpStatus.ERROR, detailsList);
} else if (inboxList.size() != 0 && inboxList != null){ } else if (inboxList != null && inboxList.size() != 0){
throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR); throw new ServiceException("存在未确认的场景变更信息,请确认", HttpStatus.ERROR);
} else { } else {
// 1. 获取最新问卷 // 1. 获取最新问卷
......
...@@ -18,10 +18,7 @@ import com.ruoyi.mapper.*; ...@@ -18,10 +18,7 @@ import com.ruoyi.mapper.*;
import com.ruoyi.service.*; import com.ruoyi.service.*;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.request.*; import com.ruoyi.web.request.*;
import com.ruoyi.web.response.DataStatisticsResponse; import com.ruoyi.web.response.*;
import com.ruoyi.web.response.ResultCountResponse;
import com.ruoyi.web.response.TaskFindResponse;
import com.ruoyi.web.response.TaskGetInfoResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -104,6 +101,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -104,6 +101,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
@Autowired @Autowired
private ModelTestTaskMapper modelTestTaskMapper; private ModelTestTaskMapper modelTestTaskMapper;
@Autowired
private TaskUserRelationMapper taskUserRelationMapper;
@Override @Override
public List<Task> findList(TaskListRequest request) { public List<Task> findList(TaskListRequest request) {
return taskMapper.findList(request); return taskMapper.findList(request);
...@@ -232,6 +232,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -232,6 +232,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List<ModelTestTask> modelTestTaskList = modelTestTaskMapper.findByTaskList(responses); List<ModelTestTask> modelTestTaskList = modelTestTaskMapper.findByTaskList(responses);
setModelProgress(modelTestTaskList,responses); setModelProgress(modelTestTaskList,responses);
// 任务是否有选择场景
List<TaskScenarioResponse> scenarioResponseList = taskMapper.findByTaskList(responses);
setTaskScenario(scenarioResponseList,responses);
for (TaskFindResponse response : responses) { for (TaskFindResponse response : responses) {
String[] taskList = response.getTaskList().split(","); String[] taskList = response.getTaskList().split(",");
...@@ -667,6 +671,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -667,6 +671,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
} }
private void setTaskScenario(List<TaskScenarioResponse> scenarioResponseList, List<TaskFindResponse> responses) {
if (scenarioResponseList != null && scenarioResponseList.size() != 0) {
for (TaskScenarioResponse response : scenarioResponseList) {
for (TaskFindResponse findResponse : responses) {
if (Objects.equals(findResponse.getId(), response.getTaskId())) {
if (response.getNum() > 0) {
findResponse.setTaskScenario(true);
}
}
}
}
}
}
private void setModelProgress(List<ModelTestTask> modelTestTaskList, List<TaskFindResponse> responses) { private void setModelProgress(List<ModelTestTask> modelTestTaskList, List<TaskFindResponse> responses) {
if (modelTestTaskList != null && modelTestTaskList.size() != 0) { if (modelTestTaskList != null && modelTestTaskList.size() != 0) {
...@@ -992,6 +1011,17 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -992,6 +1011,17 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 小组成员 // 小组成员
List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(id); List<TaskUserRelation> relation = taskUserRelationService.selectQTeamMembers(id);
// 小组成员状态
List<TaskUserRelation> relationList = taskUserRelationMapper.findByIdList(relation);
for ( TaskUserRelation userRelation : relationList) {
for (TaskUserRelation taskUserRelation : relation) {
if (Objects.equals(userRelation.getUserId(), taskUserRelation.getUserId())) {
taskUserRelation.setStatus(userRelation.getStatus());
}
}
}
return relation; return relation;
} }
......
...@@ -42,4 +42,7 @@ public class ReviewStandardListByPageRequest extends PageDomain { ...@@ -42,4 +42,7 @@ public class ReviewStandardListByPageRequest extends PageDomain {
*/ */
@ApiModelProperty("文本内容") @ApiModelProperty("文本内容")
private String text; private String text;
@ApiModelProperty("测试方法")
private String testMethod;
} }
...@@ -121,4 +121,7 @@ public class TaskFindResponse { ...@@ -121,4 +121,7 @@ public class TaskFindResponse {
@ApiModelProperty("试验方案ID") @ApiModelProperty("试验方案ID")
private String testSchemeId; private String testSchemeId;
@ApiModelProperty("是否选择场景")
private Boolean taskScenario;
} }
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("任务场景VO")
public class TaskScenarioResponse {
@ApiModelProperty("任务id")
private Long taskId;
@ApiModelProperty("场景数量")
private Long num;
}
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
<select id="selectReviewStandardList" parameterType="com.ruoyi.web.request.ReviewStandardListByPageRequest" resultType="com.ruoyi.web.response.ReviewStandardResponse"> <select id="selectReviewStandardList" parameterType="com.ruoyi.web.request.ReviewStandardListByPageRequest" resultType="com.ruoyi.web.response.ReviewStandardResponse">
select select
id, chapter, text id,
chapter,
text,
test_method AS testMethod
from from
t_review_standard t_review_standard
<where> <where>
...@@ -49,6 +52,7 @@ ...@@ -49,6 +52,7 @@
<if test="type != null and type != ''"> and `type` = #{type} </if> <if test="type != null and type != ''"> and `type` = #{type} </if>
<if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if> <if test="chapter != null and chapter != ''"> and chapter like concat('%', #{chapter}, '%') </if>
<if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if> <if test="text != null and text != ''"> and text like concat('%', #{text}, '%') </if>
<if test="testMethod != null and testMethod != ''"> and test_method like concat('%', #{testMethod}, '%') </if>
</where> </where>
ORDER BY ORDER BY
chapter chapter
......
...@@ -343,6 +343,14 @@ ...@@ -343,6 +343,14 @@
FROM t_task FROM t_task
WHERE task_name = #{taskName} WHERE task_name = #{taskName}
</select> </select>
<select id="findByTaskList" resultType="com.ruoyi.web.response.TaskScenarioResponse">
SELECT COUNT(*) num, task_id as taskId FROM t_task_scenario_relation
WHERE task_id IN
<foreach item="item" collection="responses" open="(" separator="," close=")">
#{item.id}
</foreach>
GROUP BY task_id
</select>
</mapper> </mapper>
...@@ -23,4 +23,13 @@ ...@@ -23,4 +23,13 @@
task_id = #{taskId} task_id = #{taskId}
</if> </if>
</select> </select>
<select id="findByIdList" resultType="com.ruoyi.domain.TaskUserRelation">
select user_id as userId,
status
from sys_user
WHERE sys_user.user_id IN
<foreach item="item" collection="idList" open="(" separator="," close=")">
#{item.userId}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -49,32 +49,31 @@ ...@@ -49,32 +49,31 @@
</select> </select>
<select id="selectListByTaskId" resultType="com.ruoyi.domain.vo.TestUsecaseVO"> <select id="selectListByTaskId" resultType="com.ruoyi.domain.vo.TestUsecaseVO">
select select tu.id,
tu.id, tu.case_id caseId,
tu.case_id caseId, ts.test_scenario testScenario,
ts.test_scenario testScenario, tt.test_type testType,
tt.test_type testType, tu.usecase_no usecaseNo,
tu.usecase_no usecaseNo, tu.name,
tu.name, tu.tools,
tu.tools, tu.input,
tu.input, tu.description,
tu.description, tu.review_standard_id,
tu.review_standard_id, rs.chapter,
rs.chapter, rs.text,
rs.text, rs.test_method testMethod,
rs.test_method testMethod, tr.test_result testResult
tr.test_result testResult from t_test_usecase tu
from left join t_test_scenario ts on tu.test_scenario_id = ts.id
t_test_usecase tu left join t_test_type tt on tu.test_type_id = tt.id
left join t_test_scenario ts on tu.test_scenario_id = ts.id left join t_review_standard rs on tu.review_standard_id = rs.id
left join t_test_type tt on tu.test_type_id = tt.id left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id
left join t_review_standard rs on tu.review_standard_id = rs.id left join t_task t on tsr.task_id = t.id
left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id left join t_model_test_task mtt on mtt.id = t.model_test_task_id
left join t_task t on tsr.task_id = t.id left join t_test_records tr on tu.case_id = tr.usecase_id
left join t_model_test_task mtt on mtt.id = t.model_test_task_id where mtt.id = #{id}
left join t_test_records tr on tu.case_id = tr.usecase_id group by tu.id, tu.case_id, ts.test_scenario, tt.test_type, tu.usecase_no, tu.name, tu.tools, tu.input,
where tu.description, tu.review_standard_id, rs.chapter, rs.text, rs.test_method, tr.test_result
mtt.id = #{id}
</select> </select>
<select id="selectOptionalUsecase" resultType="com.ruoyi.domain.vo.OptionalUseCasesVO"> <select id="selectOptionalUsecase" resultType="com.ruoyi.domain.vo.OptionalUseCasesVO">
......
...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysLogininforService; ...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysLogininforService;
/** /**
* 系统访问记录 * 系统访问记录
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
...@@ -35,7 +35,6 @@ public class SysLogininforController extends BaseController ...@@ -35,7 +35,6 @@ public class SysLogininforController extends BaseController
@Autowired @Autowired
private SysPasswordService passwordService; private SysPasswordService passwordService;
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysLogininfor logininfor) public TableDataInfo list(SysLogininfor logininfor)
{ {
...@@ -45,7 +44,6 @@ public class SysLogininforController extends BaseController ...@@ -45,7 +44,6 @@ public class SysLogininforController extends BaseController
} }
@Log(title = "登录日志", businessType = BusinessType.EXPORT) @Log(title = "登录日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SysLogininfor logininfor) public void export(HttpServletResponse response, SysLogininfor logininfor)
{ {
...@@ -54,7 +52,6 @@ public class SysLogininforController extends BaseController ...@@ -54,7 +52,6 @@ public class SysLogininforController extends BaseController
util.exportExcel(response, list, "登录日志"); util.exportExcel(response, list, "登录日志");
} }
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.DELETE) @Log(title = "登录日志", businessType = BusinessType.DELETE)
@DeleteMapping("/{infoIds}") @DeleteMapping("/{infoIds}")
public AjaxResult remove(@PathVariable Long[] infoIds) public AjaxResult remove(@PathVariable Long[] infoIds)
...@@ -62,7 +59,6 @@ public class SysLogininforController extends BaseController ...@@ -62,7 +59,6 @@ public class SysLogininforController extends BaseController
return toAjax(logininforService.deleteLogininforByIds(infoIds)); return toAjax(logininforService.deleteLogininforByIds(infoIds));
} }
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.CLEAN) @Log(title = "登录日志", businessType = BusinessType.CLEAN)
@DeleteMapping("/clean") @DeleteMapping("/clean")
public AjaxResult clean() public AjaxResult clean()
...@@ -71,7 +67,6 @@ public class SysLogininforController extends BaseController ...@@ -71,7 +67,6 @@ public class SysLogininforController extends BaseController
return success(); return success();
} }
@PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')")
@Log(title = "账户解锁", businessType = BusinessType.OTHER) @Log(title = "账户解锁", businessType = BusinessType.OTHER)
@GetMapping("/unlock/{userName}") @GetMapping("/unlock/{userName}")
public AjaxResult unlock(@PathVariable("userName") String userName) public AjaxResult unlock(@PathVariable("userName") String userName)
......
...@@ -21,7 +21,7 @@ import com.ruoyi.system.service.ISysOperLogService; ...@@ -21,7 +21,7 @@ import com.ruoyi.system.service.ISysOperLogService;
/** /**
* 操作日志记录 * 操作日志记录
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
...@@ -31,7 +31,6 @@ public class SysOperlogController extends BaseController ...@@ -31,7 +31,6 @@ public class SysOperlogController extends BaseController
@Autowired @Autowired
private ISysOperLogService operLogService; private ISysOperLogService operLogService;
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysOperLog operLog) public TableDataInfo list(SysOperLog operLog)
{ {
...@@ -41,7 +40,6 @@ public class SysOperlogController extends BaseController ...@@ -41,7 +40,6 @@ public class SysOperlogController extends BaseController
} }
@Log(title = "操作日志", businessType = BusinessType.EXPORT) @Log(title = "操作日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SysOperLog operLog) public void export(HttpServletResponse response, SysOperLog operLog)
{ {
...@@ -51,7 +49,6 @@ public class SysOperlogController extends BaseController ...@@ -51,7 +49,6 @@ public class SysOperlogController extends BaseController
} }
@Log(title = "操作日志", businessType = BusinessType.DELETE) @Log(title = "操作日志", businessType = BusinessType.DELETE)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/{operIds}") @DeleteMapping("/{operIds}")
public AjaxResult remove(@PathVariable Long[] operIds) public AjaxResult remove(@PathVariable Long[] operIds)
{ {
...@@ -59,7 +56,6 @@ public class SysOperlogController extends BaseController ...@@ -59,7 +56,6 @@ public class SysOperlogController extends BaseController
} }
@Log(title = "操作日志", businessType = BusinessType.CLEAN) @Log(title = "操作日志", businessType = BusinessType.CLEAN)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/clean") @DeleteMapping("/clean")
public AjaxResult clean() public AjaxResult clean()
{ {
......
...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysNoticeService; ...@@ -22,7 +22,7 @@ import com.ruoyi.system.service.ISysNoticeService;
/** /**
* 公告 信息操作处理 * 公告 信息操作处理
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
...@@ -35,7 +35,6 @@ public class SysNoticeController extends BaseController ...@@ -35,7 +35,6 @@ public class SysNoticeController extends BaseController
/** /**
* 获取通知公告列表 * 获取通知公告列表
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysNotice notice) public TableDataInfo list(SysNotice notice)
{ {
...@@ -47,7 +46,6 @@ public class SysNoticeController extends BaseController ...@@ -47,7 +46,6 @@ public class SysNoticeController extends BaseController
/** /**
* 根据通知公告编号获取详细信息 * 根据通知公告编号获取详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:query')")
@GetMapping(value = "/{noticeId}") @GetMapping(value = "/{noticeId}")
public AjaxResult getInfo(@PathVariable Long noticeId) public AjaxResult getInfo(@PathVariable Long noticeId)
{ {
...@@ -57,7 +55,6 @@ public class SysNoticeController extends BaseController ...@@ -57,7 +55,6 @@ public class SysNoticeController extends BaseController
/** /**
* 新增通知公告 * 新增通知公告
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:add')")
@Log(title = "通知公告", businessType = BusinessType.INSERT) @Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@Validated @RequestBody SysNotice notice) public AjaxResult add(@Validated @RequestBody SysNotice notice)
...@@ -69,7 +66,6 @@ public class SysNoticeController extends BaseController ...@@ -69,7 +66,6 @@ public class SysNoticeController extends BaseController
/** /**
* 修改通知公告 * 修改通知公告
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
@Log(title = "通知公告", businessType = BusinessType.UPDATE) @Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@Validated @RequestBody SysNotice notice) public AjaxResult edit(@Validated @RequestBody SysNotice notice)
...@@ -81,7 +77,6 @@ public class SysNoticeController extends BaseController ...@@ -81,7 +77,6 @@ public class SysNoticeController extends BaseController
/** /**
* 删除通知公告 * 删除通知公告
*/ */
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
@Log(title = "通知公告", businessType = BusinessType.DELETE) @Log(title = "通知公告", businessType = BusinessType.DELETE)
@DeleteMapping("/{noticeIds}") @DeleteMapping("/{noticeIds}")
public AjaxResult remove(@PathVariable Long[] noticeIds) public AjaxResult remove(@PathVariable Long[] noticeIds)
......
...@@ -51,7 +51,13 @@ public class SysDept extends BaseEntity ...@@ -51,7 +51,13 @@ public class SysDept extends BaseEntity
/** 父部门名称 */ /** 父部门名称 */
private String parentName; private String parentName;
/** 地址 */
private String address;
/** 邮编 */
private String postcode;
/** 子部门 */ /** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>(); private List<SysDept> children = new ArrayList<SysDept>();
...@@ -181,6 +187,22 @@ public class SysDept extends BaseEntity ...@@ -181,6 +187,22 @@ public class SysDept extends BaseEntity
this.children = children; this.children = children;
} }
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPostcode() {
return postcode;
}
public void setPostcode(String postcode) {
this.postcode = postcode;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
...@@ -198,6 +220,8 @@ public class SysDept extends BaseEntity ...@@ -198,6 +220,8 @@ public class SysDept extends BaseEntity
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("address",getAddress())
.append("postcode",getPostcode())
.toString(); .toString();
} }
} }
...@@ -20,10 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -20,10 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="address" column="address" />
<result property="postcode" column="postcode" />
</resultMap> </resultMap>
<sql id="selectDeptVo"> <sql id="selectDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time, d.address, d.postcode
from sys_dept d from sys_dept d
</sql> </sql>
...@@ -99,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -99,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">email,</if> <if test="email != null and email != ''">email,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="address != null and address != ''">address,</if>
<if test="postcode != null and postcode != ''">postcode,</if>
create_time create_time
)values( )values(
<if test="deptId != null and deptId != 0">#{deptId},</if> <if test="deptId != null and deptId != 0">#{deptId},</if>
...@@ -111,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -111,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">#{email},</if> <if test="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="postcode != null and postcode != ''">#{postcode},</if>
sysdate() sysdate()
) )
</insert> </insert>
...@@ -127,6 +133,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -127,6 +133,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null">email = #{email},</if> <if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if> <if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="postcode != null and postcode != ''">postcode = #{postcode},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where dept_id = #{deptId} where dept_id = #{deptId}
......
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