#update
This commit is contained in:
@@ -9,6 +9,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.maibu.memory.DeviceSessionManager;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -29,7 +30,6 @@ import com.maibu.dto.DevicePlanStatisticsDTO;
|
||||
import com.maibu.dto.DevicePlanTaskStatisticsDTO;
|
||||
import com.maibu.dto.DeviceTaskQueryDTO;
|
||||
import com.maibu.dto.DeviceWorkStatisticsDTO;
|
||||
import com.maibu.manager.DeviceSessionManager;
|
||||
import com.maibu.mapper.DeviceMapper;
|
||||
import com.maibu.mapper.DevicePlanMapper;
|
||||
import com.maibu.mapper.DevicePlanTaskMapper;
|
||||
@@ -454,7 +454,7 @@ public class DeviceTaskService {
|
||||
return list;
|
||||
}
|
||||
|
||||
public boolean createDeviceTask(DeviceTaskCommandDTO dto, String username) {
|
||||
public Long createDeviceTask(DeviceTaskCommandDTO dto, String username) {
|
||||
DevicePlanTask task = new DevicePlanTask();
|
||||
task.setOrgId(dto.getOrgId());
|
||||
task.setSiteId(dto.getSiteId());
|
||||
@@ -464,7 +464,7 @@ public class DeviceTaskService {
|
||||
task.setCreateTime(LocalDateTime.now());
|
||||
task.setRouteId(dto.getRouteId());
|
||||
task.setStartTime(dto.getStartTime());
|
||||
boolean result = devicePlanTaskMapper.saveOrUpdate(task);
|
||||
devicePlanTaskMapper.saveOrUpdate(task);
|
||||
if (dto.getOrgId() == null) {
|
||||
SysSite site = sysSiteMapper.selectById(dto.getSiteId());
|
||||
if (site != null) {
|
||||
@@ -473,7 +473,7 @@ public class DeviceTaskService {
|
||||
}
|
||||
SiteMemory siteMemory = GlobalMemory.getSiteMemory(task.getOrgId(), task.getSiteId());
|
||||
siteMemory.addDevicePlanPrepare(task);
|
||||
return result;
|
||||
return task.getId();
|
||||
}
|
||||
|
||||
public boolean cancelTask(DeviceTaskCommandDTO dto, String username) {
|
||||
|
||||
Reference in New Issue
Block a user