|
|
@@ -1,11 +1,11 @@
|
|
|
import { PhoneListService } from './../phone-list/phone-list.service'
|
|
|
-import { Inject, Injectable, Logger, OnModuleInit, forwardRef, NotFoundException } from '@nestjs/common'
|
|
|
+import { forwardRef, Inject, Injectable, Logger, OnModuleInit } from '@nestjs/common'
|
|
|
import { InjectRepository } from '@nestjs/typeorm'
|
|
|
import { Task, TaskStatus } from './entities/task.entity'
|
|
|
import { Repository } from 'typeorm'
|
|
|
import { TaskItem, TaskItemStatus } from './entities/task-item.entity'
|
|
|
import { PageRequest } from '../common/dto/page-request'
|
|
|
-import { Pagination, paginate } from 'nestjs-typeorm-paginate'
|
|
|
+import { paginate, Pagination } from 'nestjs-typeorm-paginate'
|
|
|
import { EventsGateway } from '../events/events.gateway'
|
|
|
import { randomUUID } from 'crypto'
|
|
|
import { setTimeout } from 'timers/promises'
|
|
|
@@ -13,6 +13,7 @@ import { DeviceService } from '../device/device.service'
|
|
|
import { SysConfigService } from '../sys-config/sys-config.service'
|
|
|
import { Users } from '../users/entities/users.entity'
|
|
|
import { Balance } from '../balance/entities/balance.entities'
|
|
|
+import { ta } from 'date-fns/locale'
|
|
|
|
|
|
@Injectable()
|
|
|
export class TaskService implements OnModuleInit {
|
|
|
@@ -138,6 +139,17 @@ export class TaskService implements OnModuleInit {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ async getExportTaskItem(id: number) {
|
|
|
+ // 查询数据
|
|
|
+ const taskItems = await this.taskItemRepository.find({
|
|
|
+ where: {
|
|
|
+ taskId: id
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ return taskItems
|
|
|
+ }
|
|
|
+
|
|
|
async runTask(task: Task) {
|
|
|
let controller = new AbortController()
|
|
|
this.taskControllers[task.id] = controller
|