|
@@ -14,6 +14,7 @@ import com.management.platform.mapper.*;
|
|
|
import com.management.platform.service.*;
|
|
|
import com.management.platform.util.ExcelUtil;
|
|
|
import com.management.platform.util.HttpRespMsg;
|
|
|
+import org.apache.commons.lang3.BooleanUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.ss.usermodel.CellType;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
@@ -1290,6 +1291,57 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
|
|
|
return respMsg;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public HttpRespMsg getTaskDetail(Integer id, HttpServletRequest request) {
|
|
|
+ HttpRespMsg respMsg = new HttpRespMsg();
|
|
|
+ TasKVo tasKVo = new TasKVo();
|
|
|
+ Task task = taskMapper.selectById(id);
|
|
|
+ if (task!=null){
|
|
|
+ BeanUtils.copyProperties(task,tasKVo);
|
|
|
+ if (task.getContactsId()!=null){
|
|
|
+ Contacts contacts = contactsMapper.selectById(task.getContactsId());
|
|
|
+ if (contacts!=null){
|
|
|
+ tasKVo.setContactsName(contacts.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (task.getClueId()!=null){
|
|
|
+ Clue clue = clueMapper.selectById(task.getClueId());
|
|
|
+ if (clue!=null){
|
|
|
+ tasKVo.setClueName(clue.getClueName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (task.getCustomId()!=null){
|
|
|
+ Custom custom = customMapper.selectById(task.getCustomId());
|
|
|
+ if (custom!=null){
|
|
|
+ tasKVo.setCustomName(custom.getCustomName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (task.getBusinessOpportunityId()!=null){
|
|
|
+ BusinessOpportunity businessOpportunity = businessOpportunityMapper.selectById(task.getBusinessOpportunityId());
|
|
|
+ if (businessOpportunity!=null){
|
|
|
+ tasKVo.setBusinessName(businessOpportunity.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (task.getOrderId()!=null){
|
|
|
+ SalesOrder salesOrder = salesOrderMapper.selectById(task.getOrderId());
|
|
|
+ if (salesOrder!=null){
|
|
|
+ tasKVo.setOrderName(salesOrder.getOrderName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<TaskExecutor> executorList = taskExecutorService.list(new QueryWrapper<TaskExecutor>().eq("task_id", id));
|
|
|
+ if (!executorList.isEmpty()){
|
|
|
+ List<String> collect = executorList.stream().map(TaskExecutor::getExecutorName).collect(Collectors.toList());
|
|
|
+ tasKVo.setTaskExecutors(collect);
|
|
|
+ }
|
|
|
+ List<TaskLog> taskLogList = taskLogService.list(new QueryWrapper<TaskLog>().eq("task_id", id));
|
|
|
+ if (!taskLogList.isEmpty()){
|
|
|
+ tasKVo.setTaskLogs(taskLogList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ respMsg.setData(tasKVo);
|
|
|
+ return respMsg;
|
|
|
+ }
|
|
|
+
|
|
|
public void updateTaskRepeatConfigure(Task task){
|
|
|
task.setRepeatType(null).setRepeatEndNever(null).setRepeatEndCount(null)
|
|
|
.setRepeatEndDate(null).setRepeatDesignDay(null).setRepeatDesignSameday(null)
|