肖洋
2024-12-24 b24ef0d9a6a572529cf7e34a0fc8de4fa24bb9e7
合并
已删除2个文件
已修改8个文件
88 ■■■■ 文件已修改
.gitignore 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/.vs/Code Management/v17/.wsuo 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/.vs/Code Management/v17/workspaceFileList.bin 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/AutofacModuleRegister.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneDBName.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/api/http.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -1587,3 +1587,5 @@
/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/CodeChunks.db-wal
/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
/Code Management/.vs/slnx.sqlite
/Code Management/.vs/Code Management/v17/.wsuo
/Code Management/.vs/Code Management/v17/workspaceFileList.bin
Code Management/.vs/Code Management/v17/.wsuo
Binary files differ
Code Management/.vs/Code Management/v17/workspaceFileList.bin
Binary files differ
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/AutofacModuleRegister.cs
@@ -23,8 +23,8 @@
            var basePath = AppContext.BaseDirectory;
            var cacheType = new List<Type>();
            builder.RegisterType<LogAOP>();
            cacheType.Add(typeof(LogAOP));
            //builder.RegisterType<LogAOP>();
            //cacheType.Add(typeof(LogAOP));
            builder.RegisterGeneric(typeof(RepositoryBase<>)).As(typeof(IRepository<>)).InstancePerDependency();//注册仓储
            builder.RegisterGeneric(typeof(ServiceBase<,>)).As(typeof(IService<>)).InstancePerDependency();//注册服务
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
@@ -274,7 +274,7 @@
        }
        /// <summary>
        ///
        /// 检测站台是否有货
        /// </summary>
        /// <param name="deviceChildCode"></param>
        /// <returns></returns>
@@ -306,6 +306,31 @@
            return false;
        }
        /// <summary>
        /// 检测站台是否有货
        /// </summary>
        /// <param name="deviceChildCode"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public bool IsOccupiedx(string deviceChildCode)
        {
            if (Communicator.IsConnected)
            {
                var device = _deviceProDTOs.Where(x => x.DeviceChildCode == deviceChildCode && x.DeviceProParamName == "InteractiveSignal").FirstOrDefault();
                object readStatus = Communicator.ReadAsObj(device.DeviceProAddress, device.DeviceDataType);
                //todo 协议明细信息未获取到时抛出异常
                if (readStatus.ToString() != "2")
                {
                    return true;
                }
                return false;
            }
            //todo 通讯未连接时抛出异常
            return false;
        }
        public void Dispose()
        {
            _heartStatr = false;
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,9 +12,9 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True",
  //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True",
  //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
    "PolicyName": "CorsIpAccess", //策略名称
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -157,6 +157,9 @@
        private Task ProcessDeviceAsync(CommonConveyorLine conveyorLine, string childDeviceCode)
        {
            try
            {
            // 读取任务命令和设备命令
            ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
            ConveyorLineTaskCommandWrite commandWrite = conveyorLine.ReadCustomer<ConveyorLineTaskCommandWrite>(childDeviceCode, "DeviceCommand");
@@ -252,6 +255,11 @@
                        }
                    }
                }
                }
            }
            catch (Exception ex)
            {
            }
            return Task.CompletedTask;
@@ -370,6 +378,9 @@
        /// <param name="ProtocalDetailValue">线体当前bool读取偏移地址</param>
        public void ConveyorLineInFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
        {
            try
            {
            ConsoleHelper.WriteWarningLine($"【{conveyorLine._deviceName}】任务号:【{command.TaskNum}】,托盘条码:【{command.Barcode}】已到达【{childDeviceCode}】输送线入库完成");
            var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
            if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish)
@@ -403,6 +414,11 @@
                }
            }
        }
            catch (Exception ex)
            {
            }
        }
        #endregion 入库
@@ -417,6 +433,9 @@
        /// <param name="ProtocalDetailValue">线体当前bool读取偏移地址</param>
        public void RequestOutbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
        {
            try
            {
            // 查询输送线任务,根据输送线设备和子设备代码获取任务信息
            var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
@@ -452,6 +471,11 @@
                {
                    _taskService.UpdateTaskStatusToNext(task);
                }
                }
            }
            catch (Exception ex)
            {
            }
        }
@@ -511,6 +535,9 @@
        /// <param name="childDeviceCode">子设备编号</param>
        public void ConveyorLineOutFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
        {
            try
            {
            // 打印成功信息,表示托盘已到达指定输送线并完成出库
            ConsoleHelper.WriteSuccessLine($"【{conveyorLine.DeviceName}】任务号:【{command.TaskNum}】,托盘条码:【{command.Barcode}】已到达【{childDeviceCode}】输送线出库完成");
@@ -571,6 +598,11 @@
                }
            }
        }
            catch (Exception ex)
            {
            }
        }
        #endregion 出库
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -81,6 +81,7 @@
                                    bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                    if (sendFlag)
                                    {
                                        commonStackerCrane.SetValue(StackerCraneDBName.StartCommand, 1);
                                        commonStackerCrane.LastTaskType = task.TaskType;
                                        _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                    }
@@ -294,7 +295,7 @@
                    if (device != null)
                    {
                        CommonConveyorLine conveyorLine = (CommonConveyorLine)device;
                        //if (conveyorLine.IsOccupied(router.ChildPosi))//出库站台未被占用
                        if (conveyorLine.IsOccupiedx(router.ChildPosi))//出库站台未被占用
                        {
                            return task;
                        }
@@ -357,7 +358,7 @@
            stackerCraneTaskCommand.TaskNum = task.TaskNum;
            stackerCraneTaskCommand.WorkType = 1;
            stackerCraneTaskCommand.TrayType = 0;
            stackerCraneTaskCommand.StartCommand = 1;
            //stackerCraneTaskCommand.StartCommand = 1;
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                if (task.SourceAddress == "1359-4" && task.Roadway.Contains("JZ"))
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneDBName.cs
@@ -70,5 +70,15 @@
        /// 托盘号
        /// </summary>
        Barcode,
        /// <summary>
        /// 启动命令
        /// </summary>
        StartCommand,
        /// <summary>
        /// 消防命令
        /// </summary>
        FireCommand,
    }
}
Code Management/WMS/WIDESEA_WMSClient/src/api/http.js
@@ -11,8 +11,8 @@
let loadingInstance
let loadingStatus = false
if (process.env.NODE_ENV == 'development') {
  // axios.defaults.baseURL = 'http://localhost:5000/';
  axios.defaults.baseURL = 'http://192.168.5.251:5000/';
  axios.defaults.baseURL = 'http://localhost:5000/';
  // axios.defaults.baseURL = 'http://192.168.5.251:5000/';
}
else if (process.env.NODE_ENV == 'debug') {
  axios.defaults.baseURL = 'http://127.0.0.1:9991/';