1
hutongqing
2025-01-19 20d5097c83e882f5107f9e571e8e4a28fa49bef4
1
已删除5个文件
已修改5个文件
已添加2个文件
101 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f17c315f-bf3a-4202-979b-dedf9d6cfa2f.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/265f8ac3-5496-4c98-ba0b-5077c8376b9f.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/471d11b3-4b7d-4bf3-869c-9513dd71c560.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5d6e89eb-c613-4d7c-8a88-4d58462d368b.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a84ae3b1-62ec-4eb3-b886-646f16e70474.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f17c315f-bf3a-4202-979b-dedf9d6cfa2f.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/ConveyorLineJob_BC.cs
@@ -172,6 +172,7 @@
                                        }
                                        else
                                        {
                                            //task.NextAddress可能是router.NextPosi
                                            device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
                                        }
                                        device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
@@ -240,6 +241,7 @@
                                            }
                                            else
                                            {
                                                //task.NextAddress可能是router.NextPosi
                                                device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
                                            }
                                            device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
@@ -269,7 +271,6 @@
                                    device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
                                    device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
                                }
                                //else
                                //{
                                //    task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && string.IsNullOrEmpty(x.DeviceCode) && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.WarehouseId == warehouseDevice.WarehouseId);
                                //    if (task != null)
@@ -281,6 +282,7 @@
                                //        }
                                //    }
                                //}
                                //else
                            }
                            else if (!conveyorLineSignalRead.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK)
                            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/StackerCraneJob_BC.cs
@@ -29,12 +29,15 @@
using WIDESEAWCS_Tasks.ConveyorLineJob;
using WIDESEAWCS_QuartzJob.Repository;
using Autofac.Core;
using WIDESEAWCS_DTO.TaskInfo;
using AutoMapper;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class StackerCraneJob_BC : JobBase, IJob
    {
        private readonly IMapper _mapper;
        private readonly ICacheService _cacheService;
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
@@ -45,8 +48,9 @@
        private List<Dt_ApiInfo> apiInfos;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public StackerCraneJob_BC(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
        public StackerCraneJob_BC(IMapper mapper, ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
        {
            _mapper = mapper;
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
@@ -85,7 +89,7 @@
        {
            try
            {
                Console.WriteLine(DateTime.Now);
                //Console.WriteLine(DateTime.Now);
                CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
                if (commonStackerCrane != null)
                {
@@ -285,15 +289,56 @@
            if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                //string? url = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.WMSIsReloaction.ToString())?.ApiAddress;
                //if (string.IsNullOrEmpty(url))
                //{
                //    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"未找到WMS移库判断接口");
                //    WriteError(commonStackerCrane.DeviceCode, $"未找到WMS移库判断接口");
                //    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到WMS移库判断接口");
                //    return null;
                //}
                //HttpHelper.Post($"{url}?taskNum={task.TaskNum}&locationCode={task.NextAddress}", "");//todo è°ƒç”¨WMS任务完成方法
                string? url = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.WMSIsReloaction.ToString())?.ApiAddress;
                if (string.IsNullOrEmpty(url))
                {
                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"未找到WMS移库判断接口");
                    WriteError(commonStackerCrane.DeviceCode, $"未找到WMS移库判断接口");
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到WMS移库判断接口");
                    return null;
                }
                string response = HttpHelper.Post($"{url}?taskNum={task.TaskNum}&locationCode={task.CurrentAddress}", "");//todo è°ƒç”¨WMS任务完成方法
                if (string.IsNullOrEmpty(response))
                {
                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"移库接口调用错误");
                    WriteError(commonStackerCrane.DeviceCode, $"移库接口调用错误");
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库接口调用错误");
                    return null;
                }
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(response);
                if (responseContent == null || !responseContent.Status)
                {
                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"移库接口调用错误");
                    WriteError(commonStackerCrane.DeviceCode, $"移库接口调用错误");
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库接口调用错误");
                    return null;
                }
                WMSTaskDTO? taskDTO =  JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.Serialize());
                if (taskDTO == null)
                {
                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"移库接口调用错误");
                    WriteError(commonStackerCrane.DeviceCode, $"移库接口调用错误");
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库接口调用错误");
                    return null;
                }
                if (task.TaskNum == taskDTO.TaskNum)
                {
                    return task;
                }
                else
                {
                    Dt_Task reloTask = _mapper.Map<Dt_Task>(taskDTO);
                    reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                    reloTask.CurrentAddress = taskDTO.SourceAddress;
                    reloTask.NextAddress = taskDTO.TargetAddress;
                    reloTask.DeviceCode = task.DeviceCode;
                    reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt();
                    int taskId = _taskRepository.AddData(reloTask);
                    reloTask.TaskId = taskId;
                    return reloTask;
                }
            }
            return task;
@@ -306,7 +351,7 @@
        /// <returns>如果未被占用,返回传入的任务信息,否则,返回null</returns>
        private Dt_Task? OutTaskStationIsOccupied([NotNull] Dt_Task task)
        {
            Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress && x.StackerCraneCode == task.DeviceCode);
            Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => (x.StationCode == task.NextAddress || x.StackerCraneStationCode == task.NextAddress) && x.StackerCraneCode == task.DeviceCode);
            if (stationManger != null)
            {
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/265f8ac3-5496-4c98-ba0b-5077c8376b9f.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/471d11b3-4b7d-4bf3-869c-9513dd71c560.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5d6e89eb-c613-4d7c-8a88-4d58462d368b.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/a84ae3b1-62ec-4eb3-b886-646f16e70474.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs
@@ -480,8 +480,7 @@
            int row = location.Row;
            for (int j = location.Depth + 1; j <= maxDepth; j++)
            {
                row += 1;
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row);
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
                if (locationInfo != null)
                {
                    groupLocations.Add(locationInfo);
@@ -490,8 +489,7 @@
            for (int j = location.Depth - 1; j >= 1; j--)
            {
                row -= 1;
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row);
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
                if (locationInfo != null)
                {
                    groupLocations.Add(locationInfo);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs
@@ -61,7 +61,21 @@
                        return WebResponseContent.Instance.OK(data: _mapper.Map<WMSTaskDTO>(taskTemp));
                    }
                    Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(needRelocationItem.RoadwayNo, task.PalletType, task.WarehouseId);
                    int heightType = 0;
                    if(needRelocationItem.Layer == 5)
                    {
                        heightType = 3;
                    }
                    else if(needRelocationItem.Layer == 4)
                    {
                        heightType = 2;
                    }
                    else if(needRelocationItem.Layer <= 3 && needRelocationItem.Layer >= 1)
                    {
                        heightType = 1;
                    }
                    Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(needRelocationItem.RoadwayNo, task.PalletType, task.WarehouseId, needRelocationItem.LocationCode, heightType);
                    if (newLocation != null)
                    {
                        Dt_Task newTask = new Dt_Task()
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -12,10 +12,10 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //旧WMS数据库连接
  "TeConnectionString": "Data Source=10.30.4.92;Initial Catalog=TeChuang;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"TeConnectionString": "Data Source=10.30.4.92;Initial Catalog=TeChuang;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
    "PolicyName": "CorsIpAccess", //策略名称