fix(测试跟踪): 测试计划开始结束时间无法修改

This commit is contained in:
chenjianxing 2020-09-28 11:59:12 +08:00
parent b106f13dd6
commit 3ca92d1a9c
2 changed files with 6 additions and 10 deletions

View File

@ -95,10 +95,6 @@ public class TestPlanService {
testPlan.setId(testPlanId); testPlan.setId(testPlanId);
testPlan.setStatus(TestPlanStatus.Prepare.name()); testPlan.setStatus(TestPlanStatus.Prepare.name());
testPlan.setPlannedStartTime(System.currentTimeMillis());
testPlan.setPlannedEndTime(System.currentTimeMillis());
testPlan.setActualStartTime(System.currentTimeMillis());
testPlan.setActualEndTime(System.currentTimeMillis());
testPlan.setCreateTime(System.currentTimeMillis()); testPlan.setCreateTime(System.currentTimeMillis());
testPlan.setUpdateTime(System.currentTimeMillis()); testPlan.setUpdateTime(System.currentTimeMillis());
testPlanMapper.insert(testPlan); testPlanMapper.insert(testPlan);
@ -120,16 +116,14 @@ public class TestPlanService {
testPlan.setUpdateTime(System.currentTimeMillis()); testPlan.setUpdateTime(System.currentTimeMillis());
checkTestPlanExist(testPlan); checkTestPlanExist(testPlan);
//进行中状态写入实际开始时间 //进行中状态写入实际开始时间
if ("Underway".equals(testPlan.getStatus())) { if (TestPlanStatus.Underway.name().equals(testPlan.getStatus())) {
testPlan.setActualStartTime(System.currentTimeMillis()); testPlan.setActualStartTime(System.currentTimeMillis());
return testPlanMapper.updateByPrimaryKeySelective(testPlan);
} else if("Completed".equals(testPlan.getStatus())){ } else if(TestPlanStatus.Completed.name().equals(testPlan.getStatus())){
//已完成写入实际完成时间 //已完成写入实际完成时间
testPlan.setActualEndTime(System.currentTimeMillis()); testPlan.setActualEndTime(System.currentTimeMillis());
return testPlanMapper.updateByPrimaryKeySelective(testPlan);
} else {
return 0;
} }
return testPlanMapper.updateByPrimaryKeySelective(testPlan);
} }
private void editTestPlanProject(TestPlanDTO testPlan) { private void editTestPlanProject(TestPlanDTO testPlan) {

View File

@ -271,6 +271,8 @@ export default {
this.form.stage = ''; this.form.stage = '';
this.form.description = ''; this.form.description = '';
this.form.status = null; this.form.status = null;
this.form.plannedStartTime = null;
this.form.plannedEndTime = null;
return true; return true;
}); });
} }