1
huangxiaoqiang
2025-04-14 02f63552cc964132b9348cf27c3f73f65db750f2
1
已修改5个文件
47 ■■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Communicator/Siemens/SiemensS7Communicator.cs
@@ -157,8 +157,9 @@
                }
                else
                {
                    //return true;
                    object? obj = null;
                    for (int i = 0; i < 5; i++)
                    for (int i = 0; i < 3; i++)
                    {
                        T readValue = Read<T>(address);
                        stringBuilder.AppendLine(string.Format(CommunicationInfoMessage.WriteAfterRead, readValue, value));
@@ -168,7 +169,7 @@
                            stringBuilder.AppendLine(string.Format(CommunicationInfoMessage.WriteAndReadCheckSuccess, address, value, readValue));
                            return true;
                        }
                        else if (i < 4)
                        else if (i < 2)
                        {
                            Write(address, value);
                        }
@@ -607,7 +608,7 @@
                if (operateResult.IsSuccess)
                {
                    object? obj = null;
                    for (int i = 0; i < 5; i++)
                    for (int i = 0; i < 2; i++)
                    {
                        T readValue = ReadCustomer<T>(address);
                        stringBuilder.AppendLine(string.Format(CommunicationInfoMessage.WriteAfterRead, address, JsonConvert.SerializeObject(readValue)));
@@ -628,7 +629,6 @@
                            if (j == propertyInfos.Length - 1)
                                return true;
                        }
                        plc.WriteCustomer(address, value);
                    }
                    stringBuilder.AppendLine(string.Format(CommunicationExceptionMessage.WriteAndReadCheckFaild, address, JsonConvert.SerializeObject(value), JsonConvert.SerializeObject(obj)));
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -6,8 +6,10 @@
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.LogHelper;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
namespace WIDESEAWCS_TaskInfoService
{
@@ -626,30 +628,6 @@
                var task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
                if (task == null) return WebResponseContent.Instance.Error($"未找到该任务信息,任务号:【{taskNum}】");
                //if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting)
                //{
                //    //todo
                //}
                //else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup && task.TaskState == (int)TaskInStatusEnum.SC_InExecuting)
                //{
                //    //todo 同步到WMS
                //    BaseDal.DeleteData(task);
                //}
                //else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
                //{
                //    //todo 调用WMS移库完成
                //}
                //else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OtherGroup)
                //{
                //}
                //else
                //{
                //    throw new Exception($"任务类型错误,未找到该任务类型,任务号:【{taskNum}】,任务类型:【{task.TaskType}】");
                //}
                #region WMS同步任务完成
                var keys = new Dictionary<string, object>()
@@ -698,7 +676,9 @@
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error($"任务完成异常,任务号:【{taskNum}】");
                QuartzLogger.WriteLogToFile($"Info_分容任务完成", $"任务完成异常,任务号:【{taskNum}】异常信息【{ex.Message}】{Environment.NewLine}{Environment.NewLine}");
            }
            QuartzLogger.WriteLogToFile($"Info_分容任务完成", $"任务完成,任务号:【{taskNum}】返回参数【{JsonConvert.SerializeObject(content)}】{Environment.NewLine}{Environment.NewLine}");
            return content;
        }
    }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -11,6 +11,7 @@
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.LogHelper;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_ISystemServices;
@@ -768,7 +769,9 @@
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error($"任务完成异常,任务号:【{taskNum}】");
                QuartzLogger.WriteLogToFile($"Info_任务完成", $"任务完成异常,任务号:【{taskNum}】异常信息【{ex.Message}】{Environment.NewLine}{Environment.NewLine}");
            }
            QuartzLogger.WriteLogToFile($"Info_任务完成", $"任务完成,任务号:【{taskNum}】返回参数【{JsonConvert.SerializeObject(content)}】{Environment.NewLine}{Environment.NewLine}");
            return content;
        }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -487,8 +487,8 @@
                }
                var wmsIpAddress = wmsBase + requestTrayOutTask;
                var device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1" && x.DeviceRemark == platform.Id.ToString());
                var deviceCode = device.Select(x => x.DeviceCode).ToList();
                //var device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1" && x.DeviceRemark == platform.Id.ToString());
                //var deviceCode = device.Select(x => x.DeviceCode).ToList();
                List<string> strings = platform.Location.Split(',').ToList();
                var result = await HttpHelper.PostAsync(wmsIpAddress, new { Position = childDeviceCode, Tag = (int)taskType, AreaCdoe = platform.Stacker, AreaCdoes = strings, platform.ProductionLine }.ToJsonString());
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -182,7 +182,7 @@
    {
        string[] chineseNumbers = new string[] { "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };
        var locationList = new List<DtLocationInfo>();
        for (int line = 3; line <= x; line++)
        for (int line = 1; line <= x; line++)
        {
            for (int column = 1; column <= y; column++)
            {
@@ -198,7 +198,7 @@
                        LocationType = locType,
                        Remark = "",
                        Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1,
                        RoadwayNo = locType > 1 ? $"GWSC{((line - 1) / 4) + 1}" : $"GWSC{((line - 1) / 2) + 1}",
                        RoadwayNo = locType > 1 ? $"JZSC{((line - 1) / 4) + 1}" : $"JZSC{((line - 1) / 2) + 1}",
                        LocationStatus = LocationEnum.Free.ObjToInt(),
                        AreaId = areaId,
                        Creater = "System",