wanshenmean
8 小时以前 ba9c1994b95624b88ef606ec00394990d8f2009f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using MapsterMapper;
using SqlSugar;
using System.Diagnostics.CodeAnalysis;
using WIDESEA_Core;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.Stock;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Service;
 
namespace WIDESEAWCS_TaskInfoService;
 
/// <summary>
/// 任务服务 - 核心业务逻辑
/// </summary>
public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService
{
    private readonly IRouterService _routerService;
    private readonly ITaskExecuteDetailService _taskExecuteDetailService;
    private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository;
    private readonly IMapper _mapper;
    private readonly IOutboundTaskFlowService _outboundTaskFlowService;
    private readonly IInboundTaskFlowService _inboundTaskFlowService;
    private readonly IRelocationTaskFlowService _relocationTaskFlowService;
    private readonly IRobotTaskFlowService _robotTaskFlowService;
 
    private Dictionary<string, OrderByType> _taskOrderBy = new()
    {
        {nameof(Dt_Task.Grade),OrderByType.Desc },
        {nameof(Dt_Task.CreateDate),OrderByType.Asc},
    };
 
    public Dictionary<string, OrderByType> TaskOrderBy
    { get { return _taskOrderBy; } set { _taskOrderBy = value; } }
 
    public List<int> TaskInboundTypes => typeof(TaskInboundTypeEnum).GetEnumIndexList();
 
    public List<int> TaskOutboundTypes => typeof(TaskOutboundTypeEnum).GetEnumIndexList();
 
    public List<int> TaskRelocationTypes => typeof(TaskRelocationTypeEnum).GetEnumIndexList();
 
    public List<int> TaskRobotTypes => typeof(TaskOtherTypeEnum).GetEnumIndexList();
 
    public TaskService(
        ITaskRepository BaseDal,
        IRouterService routerService,
        ITaskExecuteDetailService taskExecuteDetailService,
        ITaskExecuteDetailRepository taskExecuteDetailRepository,
        IMapper mapper,
        IOutboundTaskFlowService outboundTaskFlowService,
        IInboundTaskFlowService inboundTaskFlowService,
        IRelocationTaskFlowService relocationTaskFlowService,
        IRobotTaskFlowService robotTaskFlowService) : base(BaseDal)
    {
        _routerService = routerService;
        _taskExecuteDetailService = taskExecuteDetailService;
        _taskExecuteDetailRepository = taskExecuteDetailRepository;
        _mapper = mapper;
        _outboundTaskFlowService = outboundTaskFlowService;
        _inboundTaskFlowService = inboundTaskFlowService;
        _relocationTaskFlowService = relocationTaskFlowService;
        _robotTaskFlowService = robotTaskFlowService;
    }
}