|
@@ -14,7 +14,6 @@ import com.management.platform.service.*;
|
|
|
import com.management.platform.service.impl.WxCorpInfoServiceImpl;
|
|
|
import com.management.platform.util.HttpRespMsg;
|
|
|
import com.management.platform.util.MessageUtils;
|
|
|
-import com.sun.org.apache.xpath.internal.operations.Bool;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.poi.hssf.usermodel.*;
|
|
@@ -203,9 +202,22 @@ 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.getProjectId()!=null){
|
|
|
+ Project project = projectMapper.selectById(task.getProjectId());
|
|
|
+ task.setCheckFirstId(project.getInchargerId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (user.getCompanyId()==Constant.MLD_COMPANY_ID&&task.getIsTaskPlan()==1){
|
|
|
task.setTaskPlan(1);
|
|
|
task.setTaskStatus(3);
|
|
|
+ //状态是请假 直接变成任务
|
|
|
+ if (task.getTaskPlanType()==3){
|
|
|
+ task.setIsTaskPlan(0);
|
|
|
+ task.setTaskStatus(0);
|
|
|
+ task.setTaskPlan(1);
|
|
|
+ }
|
|
|
}
|
|
|
// TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
|
|
|
// Integer taskFileCharge = timeType.getTaskFileCharge();
|
|
@@ -317,7 +329,9 @@ public class TaskController {
|
|
|
Participation participation=new Participation();
|
|
|
participation.setUserId(executor.getExecutorId());
|
|
|
participation.setProjectId(task.getProjectId());
|
|
|
- participationMapper.insert(participation);
|
|
|
+ if (participation.getProjectId()!=null) {
|
|
|
+ participationMapper.insert(participation);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -355,7 +369,7 @@ public class TaskController {
|
|
|
if (task.getExecutorId() != null) {
|
|
|
msgRecepientList = task.getExecutorList().stream().filter(exe->!StringUtils.isEmpty(exe.getExecutorId())).map(TaskExecutor::getExecutorId).collect(Collectors.toList());
|
|
|
}
|
|
|
- if (task.getTaskType() == 1) {
|
|
|
+ if (task.getTaskType()!=null&&task.getTaskType() == 1) {
|
|
|
needRecalculateProgress = true;
|
|
|
}
|
|
|
} else {
|
|
@@ -857,6 +871,7 @@ public class TaskController {
|
|
|
//已超期的任务,未完成的任务
|
|
|
queryWrapper.lt("end_date", LocalDate.now()).eq("task_status", 0);
|
|
|
}
|
|
|
+ queryWrapper.eq("is_task_plan",0);
|
|
|
List<Task> list = taskService.simpleList(queryWrapper,start,size);
|
|
|
int total = taskMapper.selectCount(queryWrapper);
|
|
|
//没有权限只能看到自己创建的,负责的和待分配的任务
|