From 01ba2e2affa33320ef8aca6e033248388bb8f60e Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期二, 10 十二月 2024 11:04:41 +0800 Subject: [PATCH] 高温出库修改 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/GetStationService.cs | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/GetStationService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/GetStationService.cs index ae7d875..f2b4ed0 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/GetStationService.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/GetStationService.cs @@ -5,30 +5,36 @@ using System.Threading.Tasks; using WIDESEAWCS_BasicInfoRepository; using WIDESEAWCS_Core; +using WIDESEAWCS_Core.BaseServices; +using WIDESEAWCS_ISystemServices; +using WIDESEAWCS_Model.Models; using WIDESEAWCS_QuartzJob; using WIDESEAWCS_Tasks.ConveyorLineJob; -namespace WIDESEAWCS_Tasks.ConveyorLineJob_GW +namespace WIDESEAWCS_Tasks { - public class GetStationService: IGetStationService + public class GetStationService:ServiceBase<Dt_StationManager, IDt_StationManagerRepository>, IGetStationService { - private readonly IDt_StationManagerRepository _stationManagerRepository; - public GetStationService(IDt_StationManagerRepository stationManagerRepository) { _stationManagerRepository = stationManagerRepository; } + //private readonly IDt_StationManagerRepository _stationManagerRepository; + + public GetStationService(IDt_StationManagerRepository BaseDal, ISys_ConfigService sys_ConfigService) : base(BaseDal) + { + } public WebResponseContent GetStationHasPallet(List<string> stations) { WebResponseContent content = new WebResponseContent(); try { var x = 0; - var stationManagers = _stationManagerRepository.QueryData(x => stations.Contains(x.stationChildCode)); + var stationManagers = BaseDal.QueryData(x => stations.Contains(x.stationChildCode)); foreach (var item in stationManagers) { if (Convert.ToInt32(item.stationPLC) > 1010) { CommonConveyorLine_GW commonConveyorLine_GW = Storage.Devices.FirstOrDefault(x => x.DeviceCode == item.stationPLC) as CommonConveyorLine_GW; - var isHasPallet = Convert.ToInt32(commonConveyorLine_GW.ReadValue(ConveyorLineDBName_After.HasPallet, item.stationPLC)); - if (isHasPallet > 1) x++; + var isHasPallet = Convert.ToInt32(commonConveyorLine_GW.ReadValue(ConveyorLineDBName_After.HasPallet, item.stationChildCode)); + if (isHasPallet == 0) x++; } } content.OK(data: x); -- Gitblit v1.9.3