|
|
|
|
@ -25,7 +25,9 @@ |
|
|
|
|
*/ |
|
|
|
|
package org.springblade.scheduling.scheduling.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import org.apache.commons.lang3.ObjectUtils; |
|
|
|
|
import org.springblade.core.tool.utils.CollectionUtil; |
|
|
|
|
import org.springblade.scheduling.pojo.entity.WorkPlanEntity; |
|
|
|
|
import org.springblade.scheduling.scheduling.excel.WorkPlanExcel; |
|
|
|
|
import org.springblade.scheduling.scheduling.mapper.WorkPlanMapper; |
|
|
|
|
@ -69,6 +71,15 @@ public class WorkPlanServiceImpl extends BaseServiceImpl<WorkPlanMapper, WorkPla |
|
|
|
|
if (ObjectUtils.isNotEmpty(factStartTime)) { |
|
|
|
|
workPlanUpdate.setFactStartTime(factStartTime); |
|
|
|
|
workPlanUpdate.setStatus(WorkPlanEntity.STATUS_START); |
|
|
|
|
//获取当前计划
|
|
|
|
|
WorkPlanEntity workPlan = baseMapper.selectById(id); |
|
|
|
|
List<WorkPlanEntity> workPlanList = baseMapper.selectList(Wrappers.<WorkPlanEntity>lambdaQuery().lt(WorkPlanEntity::getOrders,workPlan.getOrders())); |
|
|
|
|
if(CollectionUtil.isNotEmpty(workPlanList)){ |
|
|
|
|
workPlanList.forEach(item ->{ |
|
|
|
|
item.setStatus(5); |
|
|
|
|
baseMapper.updateById(item); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (ObjectUtils.isNotEmpty(factEndTime)) { |
|
|
|
|
workPlanUpdate.setFactEndTime(factEndTime); |
|
|
|
|
|