1
wankeda
2025-03-07 b55d324f4b7465f9a7dc50e999346697f5cc35a2
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_DTO.Enum;
using WIDESEAWCS_ISystemRepository;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_Model.Models.System;
 
namespace WIDESEAWCS_SystemServices
{
 
    public class PlatformStationService : ServiceBase<PlatformStation, IPlatformStationRepository>, IPlatformStationService
    {
        public PlatformStationService(IPlatformStationRepository BaseDal) : base(BaseDal)
        {
 
        }
 
        /// <summary>
        /// 获取RGV入库站台编号
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        public List<string> GetPlatform(string deviceNo)
        {
            return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && (x.Station_material == (int)PlatformStationEnum.BoardStore)).Select(x => x.Station_code).ToList();
        }
 
        /// <summary>
        /// 获取RGV出库站台编号
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        public List<string> GetPlatform2(string deviceNo)
        {
            return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.PadUse).Select(x => x.Station_code).ToList();
        }
        public List<string> GetPlatform3(string deviceNo)
        {
            return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && (x.Station_material == (int)PlatformStationEnum.BoardUnload || x.Station_material == (int)PlatformStationEnum.BoardStore)).Select(x => x.Station_code).ToList();
        }
        /// <summary>
        /// 获取入库口站台信息
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        public List<PlatformStation> GetPlatformList(string deviceNo)
        {
            return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo)  && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.BoardLoad).ToList();
        }
 
 
        /// <summary>
        /// 获取出库站台信息,更新出库口
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        public List<PlatformStation> GetPlatformOutList(string deviceNo)
        {
            return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.BoardUnload).ToList();
        }
 
        /// <summary>
        /// 获取单个RGV出库站台编号
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        public string GetSCName(string deviceNo)
        {
            return BaseDal.QueryFirst(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_material == (int)PlatformStationEnum.PadUse && x.Station_enable == 1).Station_code;
        }
 
        /// <summary>
        /// 获取堆垛机出库站台编号
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        public string GetOutSCName(string deviceNo, int Station_storey)
        {
            return BaseDal.QueryFirst(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_storey == Station_storey && x.Station_material == (int)PlatformStationEnum.PadStore && x.Station_enable == 1).Station_code;
 
        }
 
        /// <summary>
        /// 获取堆垛机入库站台编号
        /// </summary>
        /// <param name="deviceNo"></param>
        /// <returns></returns>
        public List<string> GetPlatIn(string deviceNo)
        {
            return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.PadRecycle).Select(x => x.Station_code).ToList();
        }
    }
}