|  | @@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
	
		
			
				|  |  | +import com.xunmei.common.core.constant.Constants;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.constant.ErrorMsgConstants;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.constant.SecurityConstants;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.domain.DateRange;
 | 
	
	
		
			
				|  | @@ -23,11 +24,14 @@ import com.xunmei.common.core.domain.retrieval.vo.CoreMonitoringRetrievalTaskOne
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.domain.retrieval.vo.CoreMonitoringRetrievalTaskVo;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.domain.retrieval.vo.TaskDataVo;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyExceptionData;
 | 
	
		
			
				|  |  | +import com.xunmei.common.core.domain.worktime.dto.WorkTimeDto;
 | 
	
		
			
				|  |  | +import com.xunmei.common.core.enums.CycleCommonEnum;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.enums.EduTrainingPlanCycleEnum;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.enums.RetrievalTaskCycle;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.event.WorkTimeChangeEvent;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.utils.DateHelper;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.utils.DateUtils;
 | 
	
		
			
				|  |  | +import com.xunmei.common.core.utils.KeyValue;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.utils.Ymd;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.web.domain.AjaxResult;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.web.page.TableDataInfo;
 | 
	
	
		
			
				|  | @@ -43,6 +47,7 @@ import com.xunmei.system.api.RemoteOrgService;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.RemoteWorkTimeService;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.domain.SysDictData;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.domain.SysOrg;
 | 
	
		
			
				|  |  | +import com.xunmei.system.api.domain.SysWorkTime;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.model.LoginUser;
 | 
	
		
			
				|  |  |  import io.swagger.models.auth.In;
 | 
	
	
		
			
				|  | @@ -51,14 +56,13 @@ import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.context.annotation.Lazy;
 | 
	
		
			
				|  |  |  import org.springframework.scheduling.annotation.Async;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | +import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  |  import java.io.IOException;
 | 
	
		
			
				|  |  |  import java.net.URLEncoder;
 | 
	
		
			
				|  |  | -import java.time.DayOfWeek;
 | 
	
		
			
				|  |  | -import java.time.LocalDate;
 | 
	
		
			
				|  |  | -import java.time.ZoneId;
 | 
	
		
			
				|  |  | +import java.time.*;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  import java.util.stream.Stream;
 | 
	
	
		
			
				|  | @@ -586,10 +590,201 @@ public class CoreMonitoringRetrievalTaskServiceImpl extends ServiceImpl<CoreMoni
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | +    @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |      public void taskChangeForTimeWorkChange(WorkTimeChangeEvent event) {
 | 
	
		
			
				|  |  | +        //修改的作息的日期
 | 
	
		
			
				|  |  | +        Date ymdDate  =  event.getYmdDate();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //受影响的机构
 | 
	
		
			
				|  |  | +        List<Long> orgIds = event.getOrgIds();
 | 
	
		
			
				|  |  | +        //判断ymdDate是否是当天
 | 
	
		
			
				|  |  | +        Date today = new Date();
 | 
	
		
			
				|  |  | +        //要删除的任务
 | 
	
		
			
				|  |  | +        List<CoreMonitoringRetrievalTask> deleteTaskList = new ArrayList<>();
 | 
	
		
			
				|  |  | +        //要重新生成任务的机构和计划
 | 
	
		
			
				|  |  | +        List<KeyValue> keyValues = new ArrayList<>();
 | 
	
		
			
				|  |  | +        //判断ymdDate 月today是否是同一日期
 | 
	
		
			
				|  |  | +        if(DateUtil.isSameDay(ymdDate,today)){
 | 
	
		
			
				|  |  | +           //获取当天的调阅任务
 | 
	
		
			
				|  |  | +            Map<String,Object> dayObjectMap = this.deleteTaskList(ymdDate,orgIds,RetrievalTaskCycle.DAYCYCLE.getCode());
 | 
	
		
			
				|  |  | +            List<CoreMonitoringRetrievalTask> list = (List<CoreMonitoringRetrievalTask>) dayObjectMap.get("deleteTaskList");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(list)){
 | 
	
		
			
				|  |  | +                deleteTaskList.addAll(list);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<KeyValue> keyValueList = (List<KeyValue>) dayObjectMap.get("keyValues");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(keyValueList)){
 | 
	
		
			
				|  |  | +                keyValues.addAll(keyValueList);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }else{
 | 
	
		
			
				|  |  | +            //周
 | 
	
		
			
				|  |  | +            Map<String,Object> weekObjectMap = this.deleteTaskList(ymdDate,orgIds,RetrievalTaskCycle.WEEKCYCLE.getCode());
 | 
	
		
			
				|  |  | +            List<CoreMonitoringRetrievalTask> listweek = (List<CoreMonitoringRetrievalTask>) weekObjectMap.get("deleteTaskList");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(listweek)){
 | 
	
		
			
				|  |  | +                deleteTaskList.addAll(listweek);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<KeyValue> keyValueListweek = (List<KeyValue>) weekObjectMap.get("keyValues");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(keyValueListweek)){
 | 
	
		
			
				|  |  | +                keyValues.addAll(keyValueListweek);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            //月
 | 
	
		
			
				|  |  | +            Map<String,Object> monthObjectMap = this.deleteTaskList(ymdDate,orgIds,RetrievalTaskCycle.MONTHCYCLE.getCode());
 | 
	
		
			
				|  |  | +            List<CoreMonitoringRetrievalTask> listmonth = (List<CoreMonitoringRetrievalTask>) monthObjectMap.get("deleteTaskList");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(listmonth)){
 | 
	
		
			
				|  |  | +                deleteTaskList.addAll(listmonth);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<KeyValue> keyValueListmonth = (List<KeyValue>) monthObjectMap.get("keyValues");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(keyValueListmonth)){
 | 
	
		
			
				|  |  | +                keyValues.addAll(keyValueListmonth);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            //季度
 | 
	
		
			
				|  |  | +            Map<String,Object> quarterObjectMap = this.deleteTaskList(ymdDate,orgIds,RetrievalTaskCycle.QUARTERCYCLE.getCode());
 | 
	
		
			
				|  |  | +            List<CoreMonitoringRetrievalTask> listquarter = (List<CoreMonitoringRetrievalTask>) quarterObjectMap.get("deleteTaskList");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(listquarter)){
 | 
	
		
			
				|  |  | +                deleteTaskList.addAll(listquarter);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<KeyValue> keyValueListquarter = (List<KeyValue>) quarterObjectMap.get("keyValues");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(keyValueListquarter)){
 | 
	
		
			
				|  |  | +                keyValues.addAll(keyValueListquarter);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            //半年
 | 
	
		
			
				|  |  | +            Map<String,Object> halfYearObjectMap = this.deleteTaskList(ymdDate,orgIds,RetrievalTaskCycle.HALFYEARCYCLE.getCode());
 | 
	
		
			
				|  |  | +            List<CoreMonitoringRetrievalTask> listhalfYear = (List<CoreMonitoringRetrievalTask>) halfYearObjectMap.get("deleteTaskList");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(listhalfYear)){
 | 
	
		
			
				|  |  | +                deleteTaskList.addAll(listhalfYear);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<KeyValue> keyValueListhalfYear = (List<KeyValue>) halfYearObjectMap.get("keyValues");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(keyValueListhalfYear)){
 | 
	
		
			
				|  |  | +                keyValues.addAll(keyValueListhalfYear);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            //年
 | 
	
		
			
				|  |  | +            Map<String,Object> yearObjectMap = this.deleteTaskList(ymdDate,orgIds,RetrievalTaskCycle.YEARCYCLE.getCode());
 | 
	
		
			
				|  |  | +            List<CoreMonitoringRetrievalTask> listYear = (List<CoreMonitoringRetrievalTask>) yearObjectMap.get("deleteTaskList");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(listYear)){
 | 
	
		
			
				|  |  | +                deleteTaskList.addAll(listYear);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<KeyValue> keyValueListYear = (List<KeyValue>) yearObjectMap.get("keyValues");
 | 
	
		
			
				|  |  | +            if(CollectionUtil.isNotEmpty(keyValueListYear)){
 | 
	
		
			
				|  |  | +                keyValues.addAll(keyValueListYear);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //删除任务
 | 
	
		
			
				|  |  | +        if(CollectionUtil.isNotEmpty(deleteTaskList)){
 | 
	
		
			
				|  |  | +            this.removeBatchByIds(deleteTaskList);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //生成新的任务
 | 
	
		
			
				|  |  | +        if(CollectionUtil.isNotEmpty(keyValues)){
 | 
	
		
			
				|  |  | +           this.createNewtask(keyValues,ymdDate);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    private void createNewtask(List<KeyValue> keyValues,Date taskTime) {
 | 
	
		
			
				|  |  | +        List<CoreMonitoringRetrievalTask> taskList = new ArrayList<>();
 | 
	
		
			
				|  |  | +        Set<Long>  planId = new HashSet<>();
 | 
	
		
			
				|  |  | +        for(KeyValue keyValue:keyValues){
 | 
	
		
			
				|  |  | +            planId.add((Long) keyValue.getValue());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        QueryWrapper<TMonitoringRetrievalPlan> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  | +        queryWrapper.lambda().in(TMonitoringRetrievalPlan::getId, planId);
 | 
	
		
			
				|  |  | +        queryWrapper.lambda().eq(TMonitoringRetrievalPlan::getPlanStatus, 1);
 | 
	
		
			
				|  |  | +        queryWrapper.lambda().eq(TMonitoringRetrievalPlan::getIsDeleted, 0);
 | 
	
		
			
				|  |  | +        queryWrapper.lambda().eq(TMonitoringRetrievalPlan::getCreateType, 1);
 | 
	
		
			
				|  |  | +        List<TMonitoringRetrievalPlan> plans = itMonitoringRetrievalPlanService.list(queryWrapper);
 | 
	
		
			
				|  |  | +        List<TMonitoringRetrievalPlan> planList = new ArrayList<>();
 | 
	
		
			
				|  |  | +        //获取所有机构
 | 
	
		
			
				|  |  | +        List<SysOrg> orgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.findAllOrg(SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
 | 
	
		
			
				|  |  | +        for(TMonitoringRetrievalPlan p:plans){
 | 
	
		
			
				|  |  | +            List<KeyValue> keyValuesa = keyValues.stream().filter(r->r.getValue().toString().equals(p.getId().toString())).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +            List<SysOrg> orgs = orgList.stream().filter(r->keyValuesa.stream().anyMatch(s->s.getKey().toString().equals(r.getId().toString()))).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +            for (SysOrg s : orgs) {
 | 
	
		
			
				|  |  | +                TMonitoringRetrievalPlan plan = new TMonitoringRetrievalPlan();
 | 
	
		
			
				|  |  | +                BeanUtils.copyProperties(p, plan);
 | 
	
		
			
				|  |  | +                plan.setPlanName(p.getPlanName());
 | 
	
		
			
				|  |  | +                plan.setOrgId(s.getId());
 | 
	
		
			
				|  |  | +                plan.setOrgName(s.getShortName());
 | 
	
		
			
				|  |  | +                plan.setRoleId(p.getRoleId());
 | 
	
		
			
				|  |  | +                plan.setRoleName(p.getRoleName());
 | 
	
		
			
				|  |  | +                plan.setOrgPath(s.getPath());
 | 
	
		
			
				|  |  | +                plan.setOrgType(p.getOrgType());
 | 
	
		
			
				|  |  | +                plan.setPlanCycle(p.getPlanCycle());
 | 
	
		
			
				|  |  | +                plan.setPlanFrequency(p.getPlanFrequency());
 | 
	
		
			
				|  |  | +                plan.setPlanStatus(0);
 | 
	
		
			
				|  |  | +                plan.setCreateBy(SecurityUtils.getUsername());
 | 
	
		
			
				|  |  | +                plan.setUpdateTime(DateUtils.getNowDate());
 | 
	
		
			
				|  |  | +                plan.setUpdateBy(SecurityUtils.getUsername());
 | 
	
		
			
				|  |  | +                plan.setCreateTime(DateUtils.getNowDate());
 | 
	
		
			
				|  |  | +                plan.setDescription(p.getDescription());
 | 
	
		
			
				|  |  | +                plan.setCreateType(1);
 | 
	
		
			
				|  |  | +                plan.setParentId(p.getId());
 | 
	
		
			
				|  |  | +                plan.setIsDistribute("1");
 | 
	
		
			
				|  |  | +                planList.add(plan);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        for (TMonitoringRetrievalPlan plan : planList) {
 | 
	
		
			
				|  |  | +            DateRange dateRange =  DateUtils.getStartAndEnd(taskTime, Integer.valueOf(plan.getPlanCycle()+1));
 | 
	
		
			
				|  |  | +            Instant instant = dateRange.getStartTime().toInstant();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            // 创建 ZonedDateTime 对象,并指定时区
 | 
	
		
			
				|  |  | +            ZonedDateTime zdt = instant.atZone(ZoneId.systemDefault());
 | 
	
		
			
				|  |  | +            // 转换为 LocalDate 对象
 | 
	
		
			
				|  |  | +            LocalDate localDate = zdt.toLocalDate();
 | 
	
		
			
				|  |  | +            //获取计划关联的机构
 | 
	
		
			
				|  |  | +            List<SysOrg> listByType = orgList.stream().filter(r -> r.getId().equals(plan.getOrgId()) && r.getDeleted() == 0 && r.getIsLock().equals(0)).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +            if (CollectionUtil.isNotEmpty(listByType)) {
 | 
	
		
			
				|  |  | +                List<CoreMonitoringRetrievalTask> list = this.buildCoreMonitoringRetrievalTask(plan, localDate, listByType.get(0));
 | 
	
		
			
				|  |  | +                if (CollectionUtil.isNotEmpty(list)) {
 | 
	
		
			
				|  |  | +                    taskList.addAll(list);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        this.saveBatch(taskList);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    private Map<String,Object> deleteTaskList(Date ymdDate,List<Long> orgIds,Integer cycle){
 | 
	
		
			
				|  |  | +        Map<String,Object> objectMap = new HashMap<>();
 | 
	
		
			
				|  |  | +        QueryWrapper<CoreMonitoringRetrievalTask> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  | +         //每日条件
 | 
	
		
			
				|  |  | +        Date datetime = ymdDate;
 | 
	
		
			
				|  |  | +        if(!cycle.equals(RetrievalTaskCycle.DAYCYCLE.getCode())){
 | 
	
		
			
				|  |  | +             //根据ymdDate获取周的第一天的日期
 | 
	
		
			
				|  |  | +            DateRange dateRange =  DateUtils.getStartAndEnd(ymdDate,cycle+1);
 | 
	
		
			
				|  |  | +            datetime = dateRange.getStartTime();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        queryWrapper.lambda().eq(CoreMonitoringRetrievalTask::getYmdDate,datetime);
 | 
	
		
			
				|  |  | +        //公共条件
 | 
	
		
			
				|  |  | +        queryWrapper.lambda().in(CoreMonitoringRetrievalTask::getOrgId,orgIds);
 | 
	
		
			
				|  |  | +        queryWrapper.lambda().eq(CoreMonitoringRetrievalTask::getCycle,cycle);
 | 
	
		
			
				|  |  | +        List<CoreMonitoringRetrievalTask> taskList = this.list(queryWrapper);
 | 
	
		
			
				|  |  | +        List<CoreMonitoringRetrievalTask> deleteTaskList = new ArrayList<>();
 | 
	
		
			
				|  |  | +        List<KeyValue> keyValues = new ArrayList<>();
 | 
	
		
			
				|  |  | +        if(CollectionUtil.isNotEmpty(taskList)){
 | 
	
		
			
				|  |  | +            //将数据按机构分组
 | 
	
		
			
				|  |  | +            Map<Long,List<CoreMonitoringRetrievalTask>> taskMap = taskList.stream().collect(Collectors.groupingBy(CoreMonitoringRetrievalTask::getOrgId));
 | 
	
		
			
				|  |  | +            for(Long key:taskMap.keySet()){
 | 
	
		
			
				|  |  | +                List<CoreMonitoringRetrievalTask> taskList1 = taskMap.get(key);
 | 
	
		
			
				|  |  | +               //将taskList1 按batchNum进行分组
 | 
	
		
			
				|  |  | +                Map<Long,List<CoreMonitoringRetrievalTask>> taskMap1 = taskList1.stream().collect(Collectors.groupingBy(CoreMonitoringRetrievalTask::getBatchNum));
 | 
	
		
			
				|  |  | +                for(Long key1:taskMap1.keySet()){
 | 
	
		
			
				|  |  | +                    List<CoreMonitoringRetrievalTask> taskList2 = taskMap1.get(key1);
 | 
	
		
			
				|  |  | +                    int num = (int) taskList2.stream().filter(t->t.getStatus().equals(2)).count();
 | 
	
		
			
				|  |  | +                    //没有完成的任务,改批次的任务删除
 | 
	
		
			
				|  |  | +                    if(num==0){
 | 
	
		
			
				|  |  | +                        deleteTaskList.addAll(taskList2);
 | 
	
		
			
				|  |  | +                        Long planId = taskList2.get(0).getPlanId();
 | 
	
		
			
				|  |  | +                        KeyValue keyValue = new KeyValue();
 | 
	
		
			
				|  |  | +                        keyValue.setKey(key);
 | 
	
		
			
				|  |  | +                        keyValue.setValue(planId);
 | 
	
		
			
				|  |  | +                        keyValues.add(keyValue);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        objectMap.put("deleteTaskList",deleteTaskList);
 | 
	
		
			
				|  |  | +        objectMap.put("keyValues",keyValues);
 | 
	
		
			
				|  |  | +        return objectMap;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      private boolean checkWorkTime(Date workstartTime, Date workendTime,Long orgId){
 | 
	
		
			
				|  |  |          Map<String,Object> map = new HashMap<>();
 | 
	
		
			
				|  |  |          map.put("workstartTime",DateUtil.format(workstartTime,"yyyy-MM-dd"));
 | 
	
	
		
			
				|  | @@ -602,4 +797,14 @@ public class CoreMonitoringRetrievalTaskServiceImpl extends ServiceImpl<CoreMoni
 | 
	
		
			
				|  |  |              return  false;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    private List<SysWorkTime> selectWorkTimeList(Date now, CycleCommonEnum cycle, WorkTimeChangeEvent event) {
 | 
	
		
			
				|  |  | +        DateRange range = DateUtils.getStartAndEnd(now, cycle);
 | 
	
		
			
				|  |  | +        String startTime = DateUtil.format(range.getStartTime(), Constants.DAILY_FORMAT);
 | 
	
		
			
				|  |  | +        String endTime = DateUtil.format(range.getEndTime(), Constants.DAILY_FORMAT);
 | 
	
		
			
				|  |  | +        WorkTimeDto workTimeDto = new WorkTimeDto();
 | 
	
		
			
				|  |  | +        workTimeDto.setOrgIdList(event.getOrgIds());
 | 
	
		
			
				|  |  | +        workTimeDto.setStartTime(startTime);
 | 
	
		
			
				|  |  | +        workTimeDto.setEndTime(endTime);
 | 
	
		
			
				|  |  | +        return workTimeService.findWorkTimeByRange(workTimeDto, SecurityConstants.FROM_SOURCE);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |