|
@@ -836,19 +836,20 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
data.put("image", new ArrayList<>());
|
|
data.put("image", new ArrayList<>());
|
|
|
} else {
|
|
} else {
|
|
|
List<String> collect = taskUserList.stream().filter(item -> item.getType() == 1 && ObjectUtil.isNotEmpty(item.getSignImage())).map(CoreEduTrainingTaskToUser::getSignImage).collect(Collectors.toList());
|
|
List<String> collect = taskUserList.stream().filter(item -> item.getType() == 1 && ObjectUtil.isNotEmpty(item.getSignImage())).map(CoreEduTrainingTaskToUser::getSignImage).collect(Collectors.toList());
|
|
|
- data.put("image", getFileRealPath(collect,prefixPath,staticsPath));
|
|
|
|
|
|
|
+ data.put("image", getFileRealPath(collect, prefixPath, staticsPath));
|
|
|
}
|
|
}
|
|
|
return data;
|
|
return data;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取文件真实地址
|
|
* 获取文件真实地址
|
|
|
- * @param fileList 文件数组
|
|
|
|
|
- * @param prefixPath 真实磁盘路径,配置于yml中 D:xxx/xxx
|
|
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param fileList 文件数组
|
|
|
|
|
+ * @param prefixPath 真实磁盘路径,配置于yml中 D:xxx/xxx
|
|
|
* @param staticsPath 转发路径 /statics
|
|
* @param staticsPath 转发路径 /statics
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- private List<String> getFileRealPath(List<String> fileList,String prefixPath,String staticsPath) {
|
|
|
|
|
|
|
+ private List<String> getFileRealPath(List<String> fileList, String prefixPath, String staticsPath) {
|
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
|
if (ObjectUtil.isEmpty(fileList)) {
|
|
if (ObjectUtil.isEmpty(fileList)) {
|
|
|
return list;
|
|
return list;
|
|
@@ -1167,8 +1168,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
//删除任务
|
|
//删除任务
|
|
|
delTaskByIdList(delTaskIdList);
|
|
delTaskByIdList(delTaskIdList);
|
|
|
|
|
|
|
|
- List<SysOrg> orgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectParentHs(workOrgIdList, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
|
|
|
|
|
- final List<Long> collect = orgList.stream().map(SysOrg::getId).collect(Collectors.toList());
|
|
|
|
|
|
|
+ final List<Long> collect = getNeedBuildPlanOrgIdList(workOrgIdList);
|
|
|
//查询需要生成任务的机构的计划
|
|
//查询需要生成任务的机构的计划
|
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
@@ -1214,14 +1214,14 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
|
//删除任务
|
|
//删除任务
|
|
|
delTaskByIdList(delTaskIdList);
|
|
delTaskByIdList(delTaskIdList);
|
|
|
-
|
|
|
|
|
|
|
+ List<Long> collect = getNeedBuildPlanOrgIdList(workOrgIdList);
|
|
|
//查询需要生成任务的机构的计划
|
|
//查询需要生成任务的机构的计划
|
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.MONTHLY.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.MONTHLY.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
|
- .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
|
|
|
|
|
|
|
+ .in(CoreEduTrainingPlan::getBelongOrgId, collect)
|
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
|
buildTaskByPlan(planList, today);
|
|
buildTaskByPlan(planList, today);
|
|
@@ -1260,14 +1260,14 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
|
//删除任务
|
|
//删除任务
|
|
|
delTaskByIdList(delTaskIdList);
|
|
delTaskByIdList(delTaskIdList);
|
|
|
-
|
|
|
|
|
|
|
+ List<Long> collect = getNeedBuildPlanOrgIdList(workOrgIdList);
|
|
|
//查询需要生成任务的机构的计划
|
|
//查询需要生成任务的机构的计划
|
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.QUARTERLY.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.QUARTERLY.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
|
- .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
|
|
|
|
|
|
|
+ .in(CoreEduTrainingPlan::getBelongOrgId, collect)
|
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
|
buildTaskByPlan(planList, today);
|
|
buildTaskByPlan(planList, today);
|
|
@@ -1306,14 +1306,14 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
|
//删除任务
|
|
//删除任务
|
|
|
delTaskByIdList(delTaskIdList);
|
|
delTaskByIdList(delTaskIdList);
|
|
|
-
|
|
|
|
|
|
|
+ List<Long> collect = getNeedBuildPlanOrgIdList(workOrgIdList);
|
|
|
//查询需要生成任务的机构的计划
|
|
//查询需要生成任务的机构的计划
|
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.HALF_YEARLY.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.HALF_YEARLY.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
|
- .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
|
|
|
|
|
|
|
+ .in(CoreEduTrainingPlan::getBelongOrgId, collect)
|
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
|
buildTaskByPlan(planList, today);
|
|
buildTaskByPlan(planList, today);
|
|
@@ -1353,14 +1353,14 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
|
//删除任务
|
|
//删除任务
|
|
|
delTaskByIdList(delTaskIdList);
|
|
delTaskByIdList(delTaskIdList);
|
|
|
-
|
|
|
|
|
|
|
+ List<Long> collect = getNeedBuildPlanOrgIdList(workOrgIdList);
|
|
|
//查询需要生成任务的机构的计划
|
|
//查询需要生成任务的机构的计划
|
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
//.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.YEARLY.getCode())
|
|
.eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.YEARLY.getCode())
|
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
|
- .in(CoreEduTrainingPlan::getBelongOrgId, workOrgIdList)
|
|
|
|
|
|
|
+ .in(CoreEduTrainingPlan::getBelongOrgId, collect)
|
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
//此list中Plan对象仅id与planCycle字段有值,
|
|
|
buildTaskByPlan(planList, today);
|
|
buildTaskByPlan(planList, today);
|
|
@@ -1377,6 +1377,20 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
workTimeDto.setEndTime(endTime);
|
|
workTimeDto.setEndTime(endTime);
|
|
|
return workTimeService.findWorkTimeByRange(workTimeDto, SecurityConstants.FROM_SOURCE).getData();
|
|
return workTimeService.findWorkTimeByRange(workTimeDto, SecurityConstants.FROM_SOURCE).getData();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ private List<Long> getNeedBuildPlanOrgIdList(List<Long> workOrgIdList) {
|
|
|
|
|
+ final List<SysOrg> sysOrgList = orgService.selectOrgByIdList(workOrgIdList, SecurityConstants.INNER);
|
|
|
|
|
+ //行社及以上机构
|
|
|
|
|
+ final List<SysOrg> hsList = sysOrgList.stream().filter(org -> OrgTypeEnum.HANG_SHE.getCode() >= org.getType()).collect(Collectors.toList());
|
|
|
|
|
+ //网点及以下机构
|
|
|
|
|
+ final List<SysOrg> wdList = sysOrgList.stream().filter(org -> OrgTypeEnum.HANG_SHE.getCode() < org.getType()).collect(Collectors.toList());
|
|
|
|
|
+ final List<Long> wdIdList = wdList.stream().map(SysOrg::getId).collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
|
|
+ //网点及以下机构 需要找所属的行社
|
|
|
|
|
+ List<SysOrg> orgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectParentHs(wdIdList, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
|
|
|
|
|
+ return Stream.of(hsList, orgList).flatMap(Collection::stream).map(SysOrg::getId).distinct().collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|