|
@@ -169,25 +169,6 @@ public class TaskController {
|
|
|
return taskService.getFileRejectReason(taskId,request);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// /***
|
|
|
-// * 文件审核
|
|
|
-// * @param taskId 任务id
|
|
|
-// * @param projectId 项目id
|
|
|
-// * @param auditStatus 审核状态 1通过 2驳回
|
|
|
-// * @param reason 驳回理由
|
|
|
-// * @param request
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// @PostMapping("/auditFile")
|
|
|
-// public HttpRespMsg auditFile(@RequestParam("taskId")Integer taskId
|
|
|
-// ,@RequestParam("projectId")String projectId
|
|
|
-// ,@RequestParam("auditStatus")Integer auditStatus
|
|
|
-// ,@RequestParam(value = "reason",required = false)String reason
|
|
|
-// ,HttpServletRequest request) {
|
|
|
-// return taskService.auditFile(taskId,projectId,auditStatus,reason,request);
|
|
|
-// }
|
|
|
-
|
|
|
@RequestMapping("/save")
|
|
|
@Transactional
|
|
|
public HttpRespMsg save(Task task) throws Exception {
|
|
@@ -209,14 +190,14 @@ public class TaskController {
|
|
|
task.setCreatorColor(user.getColor());
|
|
|
task.setCompanyId(user.getCompanyId());
|
|
|
|
|
|
- if (user.getCompanyId()==Constant.MLD_COMPANY_ID&&task.getIsTaskPlan()==0&&task.getCheckFirstId()==null){
|
|
|
+ if (task.getIsTaskPlan()==0&&task.getCheckFirstId()==null){
|
|
|
if (task.getProjectId()!=null){
|
|
|
Project project = projectMapper.selectById(task.getProjectId());
|
|
|
task.setCheckFirstId(project.getInchargerId());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (user.getCompanyId()==Constant.MLD_COMPANY_ID&&task.getIsTaskPlan()==1){
|
|
|
+ if (task.getIsTaskPlan()==1){
|
|
|
task.setTaskPlan(1);
|
|
|
task.setTaskStatus(3);
|
|
|
//状态是请假 直接变成任务
|
|
@@ -226,24 +207,6 @@ public class TaskController {
|
|
|
task.setTaskPlan(1);
|
|
|
}
|
|
|
}
|
|
|
-// TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
|
|
|
-// Integer taskFileCharge = timeType.getTaskFileCharge();
|
|
|
-// if(1 == taskFileCharge){
|
|
|
-// //主管: 员工所在部门[department]的manager_id 阶段一
|
|
|
-// //项目经理:project表的in_charge_id 阶段二
|
|
|
-// Department department = departmentMapper.selectById(user.getDepartmentId());
|
|
|
-// Project project = projectMapper.selectById(task.getProjectId());
|
|
|
-// if(org.apache.commons.lang3.StringUtils.isBlank(department.getManagerId())){
|
|
|
-// msg.setError("员工所在部门无负责人,请重新设置");
|
|
|
-// return msg;
|
|
|
-// }
|
|
|
-// if(org.apache.commons.lang3.StringUtils.isBlank(project.getInchargerId())){
|
|
|
-// msg.setError("该项目未设置项目经理,请重新设置");
|
|
|
-// return msg;
|
|
|
-// }
|
|
|
-// task.setChargeOneId(department.getManagerId());
|
|
|
-// task.setChargeTwoId(project.getInchargerId());
|
|
|
-// }
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(executorListStr)) {
|
|
|
List<User> allUsers = userMapper.selectList(new QueryWrapper<User>().eq("company_id", user.getCompanyId()));
|
|
@@ -297,28 +260,6 @@ public class TaskController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //针对依斯呗的校验
|
|
|
- if(user.getCompanyId()==3092){
|
|
|
- Project project = projectService.getById(task.getProjectId());
|
|
|
- //除了报价项目 售后报价项目和研发项目不管控 其它项目都管控
|
|
|
- List<String> excludeCategoryNames = Arrays.asList(new String[]{"报价项目","售后报价项目","研发项目","运维项目","数字化服务项目"});
|
|
|
- List<ProjectCategory> extList = projectCategoryMapper.selectList(new QueryWrapper<ProjectCategory>().eq("company_id", user.getCompanyId()).in("name", excludeCategoryNames));
|
|
|
- List<Integer> extIds = extList.stream().map(ProjectCategory::getId).collect(Collectors.toList());
|
|
|
- if(task.getGroupId()!=null&&(project.getCategory()!=null && !extIds.contains(project.getCategory()))){
|
|
|
- TaskGroup taskGroup = taskGroupService.getById(task.getGroupId());
|
|
|
- if(taskGroup.getManDay()==null){
|
|
|
- msg.setError("创建失败,请先分配任务分组的预估工时");
|
|
|
- return msg;
|
|
|
- }
|
|
|
- //计算当前分组下的所有任务的计划工时
|
|
|
- List<Task> taskList = taskMapper.selectList(new LambdaQueryWrapper<Task>().select(Task::getPlanHours).eq(Task::getGroupId, taskGroup.getId()).isNotNull(Task::getPlanHours).ne(task.getId()!=null,Task::getId,task.getId()));
|
|
|
- int sum = taskList.stream().mapToInt(Task::getPlanHours).sum();
|
|
|
- if((sum+(task.getPlanHours()==null?0:task.getPlanHours()))>(taskGroup.getManDay()*8)){
|
|
|
- msg.setError("任务分组的预估工时不足,请增加预估工时");
|
|
|
- return msg;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
//检查执行人是否在当前分组的参与人当中
|
|
|
List<GroupParticipator> groupParticipatorList = groupParticipatorMapper.selectList(new QueryWrapper<GroupParticipator>().eq("group_id", task.getGroupId()));
|
|
|
List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", task.getProjectId()));
|
|
@@ -380,15 +321,6 @@ public class TaskController {
|
|
|
needRecalculateProgress = true;
|
|
|
}
|
|
|
} else {
|
|
|
-// task.setChargeOneId(null);
|
|
|
-// task.setChargeStage(null);
|
|
|
-// task.setChargeOneStatus(null);
|
|
|
-// task.setChargeOneTime(null);
|
|
|
-// task.setChargeTwoId(null);
|
|
|
-// task.setChargeTwoStatus(null);
|
|
|
-// task.setChargeTwoTime(null);
|
|
|
-// task.setFinalChargeStatus(null);
|
|
|
-// task.setFileRejectReason(null);
|
|
|
//更新的情况,需要对比是否修改了任务标题,更新子任务的parentTname
|
|
|
Task oldTask = taskService.getById(task.getId());
|
|
|
if (!oldTask.getName().equals(task.getName())) {
|
|
@@ -479,15 +411,13 @@ public class TaskController {
|
|
|
needRecalculateProgress = true;
|
|
|
}
|
|
|
// 未驳回之前 第一审核人 修改工作计划
|
|
|
- if (user.getCompanyId()==Constant.MLD_COMPANY_ID
|
|
|
- &&task.getIsTaskPlan()==1
|
|
|
+ if (task.getIsTaskPlan()==1
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckFirstId())
|
|
|
&&task.getCheckFirstId().equals(userId)
|
|
|
&&task.getTaskStatus()==3){
|
|
|
isUpdate=1;
|
|
|
task.setTaskStatus(4);//待第二审核人审核
|
|
|
- } else if (user.getCompanyId() == Constant.MLD_COMPANY_ID
|
|
|
- && task.getIsTaskPlan() == 1
|
|
|
+ } else if (task.getIsTaskPlan() == 1
|
|
|
&& org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckSecondId())
|
|
|
&& task.getCheckSecondId().equals(userId)
|
|
|
&&task.getTaskStatus()==4) {
|
|
@@ -496,8 +426,7 @@ public class TaskController {
|
|
|
task.setIsTaskPlan(0);//不再是计划
|
|
|
}
|
|
|
// 驳回后,小组长对计划进行修改
|
|
|
- if (user.getCompanyId()==Constant.MLD_COMPANY_ID
|
|
|
- &&task.getIsTaskPlan()==1
|
|
|
+ if (task.getIsTaskPlan()==1
|
|
|
&&(task.getTaskStatus()==5||task.getTaskStatus()==6)
|
|
|
&&(!userId.equals(task.getCheckFirstId())&&!userId.equals(task.getCheckSecondId()))
|
|
|
){
|
|
@@ -505,8 +434,7 @@ public class TaskController {
|
|
|
task.setTaskStatus(3);//待第一审核人审核
|
|
|
}
|
|
|
// 撤回后,对计划进行修改
|
|
|
- if (user.getCompanyId()==Constant.MLD_COMPANY_ID
|
|
|
- &&task.getIsTaskPlan()==1
|
|
|
+ if (task.getIsTaskPlan()==1
|
|
|
&&(task.getTaskStatus()==2)
|
|
|
){
|
|
|
if (user.getId().equals(task.getCheckFirstId())){
|
|
@@ -522,7 +450,7 @@ public class TaskController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (Constant.MLD_COMPANY_ID==user.getCompanyId()&&task.getIsTaskPlan()==1) {
|
|
|
+ if (task.getIsTaskPlan()==1) {
|
|
|
if (task.getCheckSecondId() != null && !task.getExecutorList().isEmpty()) {
|
|
|
System.out.println("===>"+task.getExecutorList());
|
|
|
List<User> userManagers = userMapper.selectList(new QueryWrapper<User>()
|
|
@@ -539,7 +467,7 @@ public class TaskController {
|
|
|
boolean saved = taskService.saveOrUpdate(task);
|
|
|
//新增成功,给第一审核人发送信息提醒
|
|
|
if (saved&&isInsert==1){
|
|
|
- if (user.getCompanyId()==Constant.MLD_COMPANY_ID&&task.getIsTaskPlan()==1&& org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckFirstId())){
|
|
|
+ if (task.getIsTaskPlan()==1&& org.apache.commons.lang3.StringUtils.isNotEmpty(task.getCheckFirstId())){
|
|
|
//给第一审核人发送信息提醒
|
|
|
msgRecepientList=new ArrayList<>();
|
|
|
log.info("添加工作计划,给第一审核人发送信息提醒");
|
|
@@ -644,7 +572,7 @@ public class TaskController {
|
|
|
informationService.save(new Information().setType(1).setContent(String.valueOf(task.getProjectId())).setUserId(msgRecepient));
|
|
|
});
|
|
|
List<User> recpUserList = userMapper.selectList(new QueryWrapper<User>().in("id", msgRecepientList));
|
|
|
- if(user.getCompanyId()!=Constant.MLD_COMPANY_ID||task.getIsTaskPlan()!=1) {
|
|
|
+ if(task.getIsTaskPlan()!=1) {
|
|
|
if (recpUserList.size() > 0) {
|
|
|
if (recpUserList.get(0).getDingdingUserid() != null) {
|
|
|
//钉钉用户
|
|
@@ -1283,41 +1211,40 @@ public class TaskController {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
String token = request.getHeader("TOKEN");
|
|
|
User user = userMapper.selectById(token);
|
|
|
- if (Constant.MLD_COMPANY_ID==user.getCompanyId()){
|
|
|
- int count= projectLeaderMapper.selectCountIsLeader(id,user.getId());
|
|
|
- //是这个计划的小组长
|
|
|
- if (count>0){
|
|
|
- /**
|
|
|
- * 任务状态,0-进行中 1-已完成 2-已撤销 3-待第一审核人审核 4-待第二审核人审核 5-第一审核人驳回 6-第二审核人驳回
|
|
|
- */
|
|
|
- //待第一审核人审核
|
|
|
- if (task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
|
|
|
- msg.setError("当前计划已处于一级审核状态,小组长不能删除");
|
|
|
- return msg;
|
|
|
- }else if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
|
|
|
- msg.setError("当前计划已处于二级审核状态,小组长不能删除");
|
|
|
- return msg;
|
|
|
- }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
|
|
|
- msg.setError("当前计划已审核通过,小组长不能删除");
|
|
|
- return msg;
|
|
|
- }
|
|
|
+ //状态检查
|
|
|
+ int count= projectLeaderMapper.selectCountIsLeader(id,user.getId());
|
|
|
+ //是这个计划的小组长
|
|
|
+ if (count>0){
|
|
|
+ /**
|
|
|
+ * 任务状态,0-进行中 1-已完成 2-已撤销 3-待第一审核人审核 4-待第二审核人审核 5-第一审核人驳回 6-第二审核人驳回
|
|
|
+ */
|
|
|
+ //待第一审核人审核
|
|
|
+ if (task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
|
|
|
+ msg.setError("当前计划已处于一级审核状态,小组长不能删除");
|
|
|
+ return msg;
|
|
|
+ }else if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
|
|
|
+ msg.setError("当前计划已处于二级审核状态,小组长不能删除");
|
|
|
+ return msg;
|
|
|
+ }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
|
|
|
+ msg.setError("当前计划已审核通过,小组长不能删除");
|
|
|
+ return msg;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- if (task.getCheckFirstId()!=null&&task.getCheckFirstId().equals(user.getId())){
|
|
|
- if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
|
|
|
- msg.setError("当前计划已处于二级审核状态,项目经理不能删除");
|
|
|
- return msg;
|
|
|
- }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
|
|
|
- msg.setError("当前计划已审核通过,项目经理不能删除");
|
|
|
- return msg;
|
|
|
- }
|
|
|
+ if (task.getCheckFirstId()!=null&&task.getCheckFirstId().equals(user.getId())){
|
|
|
+ if(task.getTaskStatus()==4&&task.getIsTaskPlan()==1){
|
|
|
+ msg.setError("当前计划已处于二级审核状态,项目经理不能删除");
|
|
|
+ return msg;
|
|
|
+ }else if(task.getTaskStatus()==0&&task.getIsTaskPlan()==0){
|
|
|
+ msg.setError("当前计划已审核通过,项目经理不能删除");
|
|
|
+ return msg;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- if (task.getCheckSecondId()!=null&&task.getCheckSecondId().equals(user.getId())){
|
|
|
- if(task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
|
|
|
- msg.setError("当前计划已处于一级审核状态,区域经理不能删除");
|
|
|
- return msg;
|
|
|
- }
|
|
|
+ if (task.getCheckSecondId()!=null&&task.getCheckSecondId().equals(user.getId())){
|
|
|
+ if(task.getTaskStatus()==3&&task.getIsTaskPlan()==1){
|
|
|
+ msg.setError("当前计划已处于一级审核状态,区域经理不能删除");
|
|
|
+ return msg;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1633,13 +1560,11 @@ public class TaskController {
|
|
|
if(null != startDate && null != endDate){
|
|
|
queryWrapper.ge("start_date",startDate).le("start_date",endDate);
|
|
|
}
|
|
|
-
|
|
|
break;
|
|
|
case 1:
|
|
|
if(null != startDate && null != endDate){
|
|
|
queryWrapper.ge("task.end_date",startDate).le("task.end_date",endDate);
|
|
|
}
|
|
|
-
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -1652,13 +1577,6 @@ public class TaskController {
|
|
|
if(!StringUtils.isEmpty(targetUserId)){
|
|
|
queryWrapper.like("task.executor_id",targetUserId);
|
|
|
}
|
|
|
-// else if (viewId == 3) {
|
|
|
-// //今天的任务
|
|
|
-// queryWrapper.eq("end_date", LocalDate.now());
|
|
|
-// } else if (viewId == 4) {
|
|
|
-// //已超期的任务,未完成的任务
|
|
|
-// queryWrapper.lt("end_date", LocalDate.now()).eq("task_status", 0);
|
|
|
-// }
|
|
|
List<Integer> branchDepartment=null;
|
|
|
if(deptId!=null){
|
|
|
List<Department> departmentList=departmentService.list(new QueryWrapper<Department>().eq("company_id",companyId));
|
|
@@ -1668,137 +1586,15 @@ public class TaskController {
|
|
|
if(pageIndex!=null&&pageSize!=null){
|
|
|
pageStart = (pageIndex - 1) * pageSize;
|
|
|
}
|
|
|
- if (companyId==Constant.MLD_COMPANY_ID){
|
|
|
- //美莱德 任务计划状态是1
|
|
|
- queryWrapper.ne("is_task_plan",1);
|
|
|
- }
|
|
|
+ //美莱德 任务计划状态是1
|
|
|
+ queryWrapper.ne("is_task_plan",1);
|
|
|
List<Task> list = taskMapper.getTaskWithProjectName(queryWrapper,pageStart, pageSize,companyId,branchDepartment);
|
|
|
List<Integer> collect = list.stream().map(l -> l.getId()).distinct().collect(Collectors.toList());
|
|
|
collect.add(-1);
|
|
|
List<TaskExecutor> taskExecutorList = taskExecutorMapper.selectList(new QueryWrapper<TaskExecutor>().in("task_id", collect));
|
|
|
- List<TaskFiles> taskFilesList = taskFilesMapper.selectList(new LambdaQueryWrapper<TaskFiles>().eq(TaskFiles::getNeedFileCharge,1).in(TaskFiles::getTaskId, collect));
|
|
|
List<Integer> pids = list.stream().map(Task::getProjectId).collect(Collectors.toList());
|
|
|
pids.add(-1);
|
|
|
List<Project> projectList = projectService.list(new QueryWrapper<Project>().in("id", pids));
|
|
|
- TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
|
|
|
-// WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",user.getCompanyId()));
|
|
|
-// CompanyDingding dingding = companyDingdingService.getOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, user.getCompanyId()));
|
|
|
- if(0 != timeType.getTaskFileCharge()){
|
|
|
- //根据该任务下的文件所处的状态判断
|
|
|
- for (Task task : list) {
|
|
|
- /**
|
|
|
- * 1、是否存在驳回文件
|
|
|
- * 过滤出上传人为当前登录人或审核人为当前登录人的任务文件
|
|
|
- * 若存在驳回文件,则显示存在驳回文件
|
|
|
- * 2、审核通过
|
|
|
- * 过滤出上传人为当前登录人或审核人为当前登录人的任务文件
|
|
|
- * 若都审核通过,则显示审核通过
|
|
|
- * 3、待审核
|
|
|
- * 过滤出上传人为当前登录人或审核人为当前登录人的任务文件
|
|
|
- * 若都是待审核或部分审核通过状态,则显示审核中
|
|
|
- **/
|
|
|
- List<TaskFiles> currentTaskFiles = taskFilesList.stream().filter(tmp -> tmp.getTaskId().equals(task.getId()))
|
|
|
- .filter(t->{
|
|
|
- if(userId.equals(t.getCreatorId())){
|
|
|
- return true;
|
|
|
- } else if (userId.equals(t.getChargeOneId())) {
|
|
|
- return true;
|
|
|
- } else if (userId.equals(t.getChargeTwoId())) {
|
|
|
- return true;
|
|
|
- }else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- })
|
|
|
- .collect(Collectors.toList());
|
|
|
- if(CollectionUtils.isNotEmpty(currentTaskFiles)){
|
|
|
- //是否存在驳回
|
|
|
- long rejectCount = currentTaskFiles.stream().filter(tmp -> {
|
|
|
- if (2 == tmp.getChargeOneStatus() || 2 == tmp.getChargeTwoStatus()) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }).count();
|
|
|
- //是否都是全部通过
|
|
|
- long allPassCount = currentTaskFiles.stream().filter(tmp -> 1 == tmp.getFinalChargeStatus()).count();
|
|
|
- if(rejectCount > 0 ){
|
|
|
- task.setFileChargeStatus(2);
|
|
|
- task.setFinalChargeStatusText("存在驳回文件");
|
|
|
- } else if (allPassCount == currentTaskFiles.size()) {
|
|
|
- task.setFileChargeStatus(3);
|
|
|
- task.setFinalChargeStatusText("审核通过");
|
|
|
- }else {
|
|
|
- task.setFileChargeStatus(1);
|
|
|
- task.setFinalChargeStatusText("审核中");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-// List<String> userIds = new ArrayList<>();
|
|
|
-// List<String> chargeOneIds = list.stream().filter(t-> org.apache.commons.lang3.StringUtils.isNotBlank(t.getChargeOneId()))
|
|
|
-// .map(Task::getChargeOneId).collect(Collectors.toList());
|
|
|
-// List<String> chargeTwoIds = list.stream().filter(t-> org.apache.commons.lang3.StringUtils.isNotBlank(t.getChargeTwoId()))
|
|
|
-// .map(Task::getChargeTwoId).collect(Collectors.toList());
|
|
|
-// userIds.addAll(chargeOneIds);
|
|
|
-// userIds.addAll(chargeTwoIds);
|
|
|
-// Map<String, User> userIdMap = new HashMap<>();
|
|
|
-// if(CollectionUtils.isNotEmpty(userIds)){
|
|
|
-// userIds = userIds.stream().distinct().collect(Collectors.toList());
|
|
|
-// List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>()
|
|
|
-// .select(User::getId,User::getName)
|
|
|
-// .in(User::getId, userIds)
|
|
|
-// );
|
|
|
-// userIdMap = users.stream().collect(Collectors.toMap(User::getId, t->t));
|
|
|
-// }
|
|
|
-// Map<Integer, List<TaskFiles>> taskFilesMap = new HashMap<>();
|
|
|
-// if(CollectionUtils.isNotEmpty(taskFilesList)){
|
|
|
-// taskFilesMap = taskFilesList.stream().collect(Collectors.groupingBy(TaskFiles::getTaskId));
|
|
|
-// }
|
|
|
-// for (Task task : list) {
|
|
|
-// List<TaskFiles> tmp = taskFilesMap.get(task.getId());
|
|
|
-// if(CollectionUtils.isEmpty(tmp)){
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-// if(org.apache.commons.lang3.StringUtils.isBlank(task.getChargeOneId()) || org.apache.commons.lang3.StringUtils.isBlank(task.getChargeTwoId())){
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-// if(1 == task.getFinalChargeStatus()){
|
|
|
-// task.setFinalChargeStatusText("审核通过");
|
|
|
-// task.setFileChargeStatus(1);
|
|
|
-// } else if (0 == task.getFinalChargeStatus()) {
|
|
|
-// String name = "";
|
|
|
-// String statusText = "";
|
|
|
-// String userWxId = "";
|
|
|
-// String fileChargeStatusText = "";
|
|
|
-// int finalStatus = 1==task.getChargeStage()?task.getChargeOneStatus():task.getChargeTwoStatus();
|
|
|
-// String tmpUserId = 1==task.getChargeStage()?task.getChargeOneId():task.getChargeTwoId();
|
|
|
-// User chargeUser = userIdMap.get(tmpUserId);
|
|
|
-// if(null != chargeUser){
|
|
|
-// if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
-// userWxId = chargeUser.getCorpwxRealUserid();
|
|
|
-// }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
-// userWxId = chargeUser.getDingdingUserid();
|
|
|
-// }
|
|
|
-// name = chargeUser.getName();
|
|
|
-// }
|
|
|
-// switch (finalStatus)
|
|
|
-// {
|
|
|
-// case 0: statusText = "待审核"; task.setFileChargeStatus(0);break;
|
|
|
-// case 1: statusText = "通过";break;
|
|
|
-// case 2: statusText = "驳回"; task.setFileChargeStatus(2);break;
|
|
|
-// }
|
|
|
-// if(org.apache.commons.lang3.StringUtils.isBlank(userWxId)){
|
|
|
-// fileChargeStatusText = statusText+"("+name+")";
|
|
|
-// }else{
|
|
|
-// fileChargeStatusText = statusText+"("+("$userName=" + userWxId + "$")+")";
|
|
|
-// }
|
|
|
-// task.setFinalChargeStatusText(fileChargeStatusText);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
list.forEach(l->{
|
|
|
List<TaskExecutor> executorList = taskExecutorList.stream().filter(tl -> tl.getTaskId().equals(l.getId())&&tl.getExecutorId()!=null).collect(Collectors.toList());
|
|
|
l.setExecutorList(executorList);
|