|
|
|
|
@ -582,6 +582,9 @@ public class ErpTempTaskServiceImpl implements IErpTempTaskService {
|
|
|
|
|
if (bo == null) {
|
|
|
|
|
throw new ServiceException("临时任务数据不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isBlank(bo.getTaskTitle())) {
|
|
|
|
|
throw new ServiceException("任务标题不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isBlank(bo.getTaskDesc())) {
|
|
|
|
|
throw new ServiceException("任务描述不能为空");
|
|
|
|
|
}
|
|
|
|
|
@ -589,14 +592,22 @@ public class ErpTempTaskServiceImpl implements IErpTempTaskService {
|
|
|
|
|
if (StringUtils.isBlank(bo.getTaskType())) {
|
|
|
|
|
throw new ServiceException("任务类型不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (bo.getPlanStartTime() == null) {
|
|
|
|
|
throw new ServiceException("计划开始时间不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (bo.getPlanEndTime() == null) {
|
|
|
|
|
throw new ServiceException("计划完成时间不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (bo.getRealRequestDeptId() == null) {
|
|
|
|
|
throw new ServiceException("实际需求部门不能为空");
|
|
|
|
|
}
|
|
|
|
|
if ("3".equals(bo.getTaskType()) && bo.getProjectId() == null) {
|
|
|
|
|
throw new ServiceException("项目任务必须关联具体项目");
|
|
|
|
|
}
|
|
|
|
|
if ("1".equals(bo.getTaskType()) && bo.getDeptId() == null) {
|
|
|
|
|
throw new ServiceException("部门任务必须明确归属部门");
|
|
|
|
|
}
|
|
|
|
|
if (bo.getPlanStartTime() != null && bo.getPlanEndTime() != null
|
|
|
|
|
&& bo.getPlanEndTime().before(bo.getPlanStartTime())) {
|
|
|
|
|
if (bo.getPlanEndTime().before(bo.getPlanStartTime())) {
|
|
|
|
|
throw new ServiceException("计划完成时间不能早于计划开始时间");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|