Administrator
2024-12-02 58a8a8843f101b2a1ba25622e2ef8ade605e0c49
OCV2-包装代码
已删除1个文件
已修改4个文件
86 ■■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BZLOCK/JCBZYLController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/obj/Debug/net6.0/WIDESEAWCS_Server.MvcApplicationPartsAssemblyInfo.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/GetStationService.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/IGetStationService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BZLOCK/JCBZYLController.cs
@@ -2,13 +2,13 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Core;
using WIDESEAWCS_Tasks.ConveyorLineJob_GW;
using WIDESEAWCS_Tasks;
namespace WIDESEAWCS_Server.Controllers.BZLOCK
{
    [Route("api/[controller]")]
    [ApiController]
    public class JCBZYLController : ControllerBase
    public class JCBZYLController : Controller
    {
        private readonly IGetStationService _getStationService;
        public JCBZYLController(IGetStationService getStationService) { _getStationService = getStationService; }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/obj/Debug/net6.0/WIDESEAWCS_Server.MvcApplicationPartsAssemblyInfo.cs
文件已删除
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -19,6 +19,7 @@
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
namespace WIDESEAWCS_TaskInfoService
@@ -32,6 +33,7 @@
        private readonly IMapper _mapper;
        private readonly IDt_StationManagerService _stationManagerService;
        private readonly IDt_StationManagerRepository _stationManagerRepository;
        private readonly IRouterRepository _routerRepository;
        private Dictionary<string, OrderByType> _taskOrderBy = new()
        {
@@ -46,7 +48,7 @@
        public List<int> TaskOutboundTypes => typeof(TaskOutboundTypeEnum).GetEnumIndexList();
        public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IMapper mapper, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository) : base(BaseDal)
        public TaskService(ITaskRepository BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IMapper mapper, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, IRouterRepository routerRepository) : base(BaseDal)
        {
            _routerService = routerService;
            _taskExecuteDetailService = taskExecuteDetailService;
@@ -55,6 +57,7 @@
            _sys_ConfigService = sys_ConfigService;
            _stationManagerService = stationManagerService;
            _stationManagerRepository = stationManagerRepository;
            _routerRepository = routerRepository;
        }
        /// <summary>
@@ -84,6 +87,16 @@
                            task.TaskState = (int)TaskOutStatusEnum.OutNew;
                            task.CurrentAddress = item.SourceAddress;
                            task.NextAddress = routers.FirstOrDefault().ChildPosi;
                        }
                        else
                        {
                            routers = _routerService.QueryNextRoutes(item.SourceAddress, item.TargetAddress);
                            if (routers.Count > 0)
                            {
                                task.TaskState = (int)TaskOutStatusEnum.SC_OutFinish;
                                task.CurrentAddress = item.SourceAddress;
                                task.NextAddress = routers.FirstOrDefault().ChildPosi;
                            }
                        }
                    }
                    else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
@@ -125,7 +138,7 @@
                var hasTask = await BaseDal.QueryFirstAsync(x => x.PalletCode == palletCode);
                if (hasTask != null)
                {
                    return content.Error("褰撳墠鎵樼洏瀛樺湪浠诲姟");
                    return content.OK("褰撳墠鎵樼洏瀛樺湪浠诲姟");
                }
                var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
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);
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/IGetStationService.cs
@@ -4,10 +4,12 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_Tasks.ConveyorLineJob_GW
namespace WIDESEAWCS_Tasks
{
    public interface IGetStationService
    public interface IGetStationService : IService<Dt_StationManager>
    {
        WebResponseContent GetStationHasPallet(List<string> stations);
    }