Commit 3d1602ff authored by 盖献康's avatar 盖献康

Merge branch 'dev' into 'master'

dev - master 7

See merge request !303
parents 9f6ba851 54d0c773
...@@ -485,6 +485,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -485,6 +485,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
document.setParagraph("4." + (index + 1) + " " + record.getUsecase(), 10f, Element.ALIGN_LEFT, 0,2f, 10f); document.setParagraph("4." + (index + 1) + " " + record.getUsecase(), 10f, Element.ALIGN_LEFT, 0,2f, 10f);
PdfPTable useCaseTable = new PdfPTable(new float[]{15, 35, 15, 35}); PdfPTable useCaseTable = new PdfPTable(new float[]{15, 35, 15, 35});
useCaseTable.setWidthPercentage(100); useCaseTable.setWidthPercentage(100);
useCaseTable.setSplitLate(false);
document.writeCell("测试编号", Element.ALIGN_LEFT, 1, 1, useCaseTable); document.writeCell("测试编号", Element.ALIGN_LEFT, 1, 1, useCaseTable);
document.writeCell(record.getUsecaseNo(), Element.ALIGN_LEFT, 1, 1, useCaseTable); document.writeCell(record.getUsecaseNo(), Element.ALIGN_LEFT, 1, 1, useCaseTable);
document.writeCell("测试时间", Element.ALIGN_LEFT, 1, 1, useCaseTable); document.writeCell("测试时间", Element.ALIGN_LEFT, 1, 1, useCaseTable);
......
...@@ -309,6 +309,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -309,6 +309,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 构建并保存任务信息 // 构建并保存任务信息
// 总任务 // 总任务
Task task = taskMapper.selectById(request.getId()); Task task = taskMapper.selectById(request.getId());
// 小组组长是否发生变化
changeSubLeader(task,leader);
task.setLeaderId(leader.getUserId()); task.setLeaderId(leader.getUserId());
task.setLeader(leader.getName()); task.setLeader(leader.getName());
setTaskList(request.getTaskList(),task); setTaskList(request.getTaskList(),task);
...@@ -776,6 +780,29 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -776,6 +780,29 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
} }
private void changeSubLeader(Task task, TaskUserRelation leader) {
if (!Objects.equals(task.getLeaderId(), leader.getUserId())) {
if (task.getSystemReviewTaskId() != null) {
SystemReviewTask systemReviewTask = systemReviewTaskMapper.selectById(task.getSystemReviewTaskId());
systemReviewTask.setLeaderId(leader.getUserId());
systemReviewTask.setLeader(leader.getName());
systemReviewTaskMapper.updateById(systemReviewTask);
}
if (task.getCarReviewTaskId() != null) {
CarReviewTask carReviewTask = carReviewTaskMapper.selectById(task.getCarReviewTaskId());
carReviewTask.setLeaderId(leader.getUserId());
carReviewTask.setLeader(leader.getName());
carReviewTaskMapper.updateById(carReviewTask);
}
if (task.getModelTestTaskId() != null) {
ModelTestTask modelTestTask = modelTestTaskMapper.selectById(task.getModelTestTaskId());
modelTestTask.setLeaderId(leader.getUserId());
modelTestTask.setLeader(leader.getName());
modelTestTaskMapper.updateById(modelTestTask);
}
}
}
private void setFinishLeader(List<UserNameResponse> responseList, List<Task> taskList) { private void setFinishLeader(List<UserNameResponse> responseList, List<Task> taskList) {
if (responseList != null && responseList.size() != 0) { if (responseList != null && responseList.size() != 0) {
......
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
select select
su.nick_name AS principal, su.nick_name AS principal,
GROUP_CONCAT(distinct u.nick_name) AS inspectionPersonnel, GROUP_CONCAT(distinct u.nick_name) AS inspectionPersonnel,
DATE_FORMAT(mtt.task_begin_time, '%Y-%m-%d') AS inspectionDate DATE_FORMAT(mtt.task_end_time, '%Y-%m-%d') AS inspectionDate
from from
t_task t t_task t
left join t_task_user_relation tur on t.id = tur.task_id left join t_task_user_relation tur on t.id = tur.task_id
......
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