|
|
@ -19,6 +19,7 @@ import com.ccsens.util.cron.NatureToDate; |
|
|
|
import com.ccsens.util.exception.BaseException; |
|
|
|
import com.sun.org.apache.bcel.internal.classfile.Code; |
|
|
|
import io.swagger.annotations.ApiModelProperty; |
|
|
|
import jdk.nashorn.internal.runtime.regexp.joni.CodeRangeBuffer; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Repository; |
|
|
@ -974,28 +975,27 @@ public class ProTaskDetailService implements IProTaskDetailService { |
|
|
|
} |
|
|
|
return normalTask; |
|
|
|
} |
|
|
|
// private void changeTime(ProTaskDetail taskDetail,Long beginTime,Long endTime,SysProject project){
|
|
|
|
// if(beginTime >= project.getBeginTime() || endTime <= project.getEndTime()){
|
|
|
|
// throw new BaseException(CodeEnum.TIME_ERROR_PROJECT);
|
|
|
|
// }
|
|
|
|
// if(taskDetail.getLevel() == 2){
|
|
|
|
// ProTaskDetailExample detailExample = new ProTaskDetailExample();
|
|
|
|
// detailExample.createCriteria().andParentIdEqualTo(taskDetail.getId());
|
|
|
|
// List<ProTaskDetail> detailList = taskDetailDao.selectByExample(detailExample);
|
|
|
|
// if(CollectionUtil.isNotEmpty(detailList)){
|
|
|
|
//
|
|
|
|
// }else {
|
|
|
|
// if (ObjectUtil.isNotNull(beginTime)) {
|
|
|
|
// taskDetail.setBeginTime(beginTime);
|
|
|
|
// }
|
|
|
|
// if (ObjectUtil.isNotNull(endTime)) {
|
|
|
|
// taskDetail.setEndTime(endTime);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }else if(taskDetail.getLevel() == 3){
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
private void changeTime(ProTaskDetail taskDetail,Long beginTime,Long endTime,SysProject project){ |
|
|
|
if(beginTime >= project.getBeginTime() || endTime <= project.getEndTime()){ |
|
|
|
throw new BaseException(CodeEnum.TIME_ERROR_PROJECT); |
|
|
|
} |
|
|
|
|
|
|
|
if(taskDetail.getLevel() == 2){ |
|
|
|
//组任务不能修改时间(组任务的时间是其子任务的最早和最晚的时间)
|
|
|
|
if(taskDetail.getHasGroup() == 1){ |
|
|
|
throw new BaseException(CodeEnum.HAS_GROUP_TIME_CHANGE); |
|
|
|
}else { |
|
|
|
if (ObjectUtil.isNotNull(beginTime)) { |
|
|
|
taskDetail.setBeginTime(beginTime); |
|
|
|
} |
|
|
|
if (ObjectUtil.isNotNull(endTime)) { |
|
|
|
taskDetail.setEndTime(endTime); |
|
|
|
} |
|
|
|
} |
|
|
|
}else if(taskDetail.getLevel() == 3){ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
private void partTaskSubTime(ProTaskDetail taskDetail){ |
|
|
|
//cycle为空或者组任务,只加一条数据
|
|
|
|
if (StrUtil.isEmpty(taskDetail.getCycle()) || taskDetail.getHasGroup() == 1) { |
|
|
|