1
huanghongfeng
9 天以前 eaa07b80e3400da9be84e9a7a834e56d829a625b
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 命名空间:WIDESEAWCS_TaskInfoService
 * 创建者:胡童庆
 * 创建时间:2024/8/2 16:13:36
 * 版本:V1.0.0
 * 描述:
 *
 * ----------------------------------------------------------------
 * 修改人:
 * 修改时间:
 * 版本:V1.0.1
 * 修改说明:
 * 
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
 
using AutoMapper;
using Microsoft.AspNetCore.Mvc.RazorPages;
using NetTaste;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using SqlSugar;
using StackExchange.Profiling.Internal;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.Http;
using WIDESEA_Common.Log;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_DTO.Enum;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ISystemRepository;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_Model.Models.System;
 
namespace WIDESEAWCS_SystemServices
{
    public class AgvStationService : ServiceBase<AGVStation, IAgvStationRepository>, IAgvStationService
    {
        public AgvStationService(IAgvStationRepository BaseDal) : base(BaseDal)
        {
        }
 
        /// <summary>
        /// 根据设备信息,获取小车内容
        /// </summary>
        /// <param name="ChildPosiDeviceCode">设备</param>
        /// <returns></returns>
        public AGVStation Corridorequipment(string ChildPosiDeviceCode)
        {
            return BaseDal.QueryFirst(x=>x.ChildPosiDeviceCode == ChildPosiDeviceCode && x.Station_enable==1);
        }
 
        /// <summary>
        /// 根据子地址,获取母车设备信息
        /// </summary>
        /// <param name="ZicheMotAddres">子地址</param>
        /// <returns></returns>
        public AGVStation GetMothervehicle(int ZicheMotAddres)
        {
            return BaseDal.QueryFirst(x => x.ZicheMotherinlaw == ZicheMotAddres && x.Station_enable == 1);
        }
 
        /// <summary>
        /// 根据过道地址,获取过道子车设备信息
        /// </summary>
        /// <param name="ZicheMotAddres">子地址</param>
        /// <returns></returns>
        public AGVStation GetMotheaisle(int ZicheMotAddres)
        {
            return BaseDal.QueryFirst(x => (x.MotherCarDeviceCode == ZicheMotAddres || x.MotherCardeputy == ZicheMotAddres) && x.Station_enable == 1);
        }
 
        /// <summary>
        /// 根据HCJ站台查找内侧子车设备信息
        /// </summary>
        /// <param name="HCJAddres">HCJ站台编号</param>
        /// <returns></returns>
        public AGVStation GetZicheDeep(int HCJAddres)
        {
            return BaseDal.QueryFirst(x => x.HCJStorageaddress == HCJAddres && x.Station_Area == 2 && x.Station_enable == 1);
        }
 
        /// <summary>
        /// 根据HCJ站台判断出库进行取货时,内侧子车是否在HCJ站台下面
        /// </summary>
        /// <param name="HCJAddres">HCJ站台编号</param>
        /// <returns></returns>
        public AGVStation GetOutZicheDeep(int HCJAddres)
        {
            return BaseDal.QueryFirst(x => x.HCJStorageaddress == HCJAddres && x.Station_Area == 5 && x.Station_enable == 1);
        }
 
        public AGVStation OutGetZicheDeepHCJ(int HCJAddres)
        {
            return BaseDal.QueryFirst(x => x.HCJStorageaddress == HCJAddres && x.Station_Area == 6 && x.Station_enable == 1);
        }
 
        /// <summary>
        /// 根据HCJ站台查找外侧子车设备信息
        /// </summary>
        /// <param name="HCJAddres">HCJ站台编号</param>
        /// <returns></returns>
        public AGVStation GetZicheOuterSide(int HCJAddres)
        {
            return BaseDal.QueryFirst(x => x.HCJStorageaddress == HCJAddres && x.Station_Area == 1 && x.Station_enable == 1);
        }
 
 
        public List<AGVStation> GetYljSide(string Station_code)
        {
            return BaseDal.QueryData(x => x.Station_code == Station_code && x.Station_enable == 1);
        }
        /// <summary>
        /// 根据巷道进行获取设备(入库版本)
        /// </summary>
        public AGVStation ObtainCcordingTunnel(int SCTunnel)
        {
            return BaseDal.QueryFirst(x => x.Station_tasktype == (int)RGVTasktype.Inbound && x.Station_Area== SCTunnel && x.Station_material== (int)RGVEquipment.Mothertrailer && x.Station_enable == 1);
        }
 
 
 
 
        /// <summary>
        /// 获取入库这边的子车,母车
        /// </summary>
        public List<AGVStation> GetInStroller()
        {
            return BaseDal.QueryData(x => x.Station_tasktype== (int)RGVTasktype.Inbound && (x.Station_Area == (int)RGVEquipment.Mothertrailer || x.Station_Area == (int)RGVEquipment.Corridorcar || x.Station_Area == (int)RGVEquipment.InRGVForklift) && x.Station_enable == 1);
        }
 
        /// <summary>
        /// 获取出库这边的子车,母车
        /// </summary>
        public List<AGVStation> GetOutStroller()
        {
            return BaseDal.QueryData(x => x.Station_tasktype == (int)RGVTasktype.Outbound && (x.Station_material == (int)RGVEquipment.Mothertrailer || x.Station_material == (int)RGVEquipment.Corridorcar || x.Station_material == (int)RGVEquipment.OutRGVForklift) && x.Station_enable == 1);
        }
 
        /// <summary>
        /// 获取出库这边的子车,母车
        /// </summary>
        public List<AGVStation> InGetOutStroller()
        {
            return BaseDal.QueryData(x => x.Station_tasktype == (int)RGVTasktype.Inbound && (x.Station_material == (int)RGVEquipment.Mothertrailer || x.Station_material == (int)RGVEquipment.Corridorcar || x.Station_material == (int)RGVEquipment.OutRGVForklift) && x.Station_enable == 1);
        }
    }
}