肖洋
2025-01-04 a07e4702be045efa9b04b49a561463875dd28e0a
更新配置文件和事件总线逻辑,修复任务处理逻辑
已修改11个文件
66 ■■■■ 文件已修改
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/api/http.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.MvcApplicationPartsAssemblyInfo.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -1595,3 +1595,4 @@
/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile.pubxml
*.targets
Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
@@ -12,8 +12,8 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
     axios.defaults.baseURL = 'http://127.0.0.1:9291/';
    //axios.defaults.baseURL = 'http://192.168.5.251:9291/';
    //  axios.defaults.baseURL = 'http://127.0.0.1:9291/';
    axios.defaults.baseURL = 'http://192.168.20.251:9291/';
}
else if (process.env.NODE_ENV == 'debug') {
    axios.defaults.baseURL = 'http://127.0.0.1:8098/';
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue
@@ -54,7 +54,7 @@
     }
   });
   eventBus.on('stackerData', eventData => {
     if (eventData.deviceName == "陈化1号堆垛机"||eventData.deviceName == "陈化2号堆垛机") {
    if (eventData.deviceName.indexOf("陈化") != -1) {
       if (Stackers.length == 0) {
         Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
       }
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue
@@ -20,7 +20,7 @@
const devices = reactive([]);
const num = reactive([])
onMounted(() => {
  eventBus.on('stackerData', eventData => {
  eventBus.on('locationData', eventData => {
    if (eventData.deviceName === "分容3线入库输送线"||eventData.deviceName === "分容出库输送线") {
    if (devices.length <= 0) {
        devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.data.childDeviceCode });
@@ -36,7 +36,9 @@
    }
  })
  eventBus.on('stackerData', eventData => {
    if (eventData.deviceName == "分容3号堆垛机"||eventData.deviceName == "分容2号堆垛机") {
    // if (eventData.deviceName == "分容3号堆垛机"||eventData.deviceName == "分容2号堆垛机") {
    console.log(eventData.deviceName)
    if (eventData.deviceName.indexOf("分容") != -1) {
      if (Stackers.length == 0) {
        Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
      }
@@ -53,6 +55,4 @@
  })
})
</script>
<style scoped>
</style>
<style scoped></style>
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue
@@ -20,7 +20,7 @@
const devices = reactive([]);
const num = reactive([])
onMounted(() => {
  eventBus.on('stackerData', eventData => {
  eventBus.on('locationData', eventData => {
    // console.log(eventData)
   
      console.log(eventData)
@@ -41,7 +41,7 @@
    }
  })
  eventBus.on('stackerData', eventData => {
    if (eventData.deviceName == "常温1号堆垛机"||eventData.deviceName == "常温2号堆垛机"||eventData.deviceName == "常温3号堆垛机"||eventData.deviceName == "常温4号堆垛机") {
    if (eventData.deviceName.indexOf("常温")) {
      if (Stackers.length == 0) {
        Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
      }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -16,6 +16,7 @@
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IProcessRepository;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_ITaskInfo_HtyRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
@@ -35,6 +36,7 @@
    {
        private readonly ITaskService _taskService;
        private readonly ITaskRepository _taskRepository;
        private readonly ITask_HtyRepository _task_HtyRepository;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly IRouterService _routerService;
        private readonly IPlatFormRepository _platFormRepository;
@@ -50,7 +52,7 @@
        private static List<int>? userIds;
        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDeviceInfoRepository deviceInfoRepository)
        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDeviceInfoRepository deviceInfoRepository,ITask_HtyRepository task_HtyRepository)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
@@ -64,6 +66,7 @@
            _cacheService = cacheService;
            _noticeService = noticeService;
            _deviceInfoRepository = deviceInfoRepository;
            _task_HtyRepository = task_HtyRepository;
        }
        public async Task Execute(IJobExecutionContext context)
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
@@ -1,4 +1,5 @@
using HslCommunication;
using Mapster;
using Newtonsoft.Json;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@@ -215,6 +216,20 @@
                        ConsoleHelper.WriteWarningLine($"【{conveyorLine._deviceName}】任务号:【{task.TaskNum}】,托盘条码:【{task.PalletCode}】已到达【{childDeviceCode}】请求扫码入库(实盘),下一目标地址【{1000}】");
                        ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                    }
                    else if(task.TargetAddress == "1020-1")
                    {
                        var next = task.NextAddress;
                        var taskCommand = MapTaskCommand(task, command);
                        task.NextAddress = next;
                        ConsoleHelper.WriteWarningLine($"【{conveyorLine._deviceName}】任务号:【{command.TaskNum}】,托盘条码:【{command.Barcode}】已到达【{childDeviceCode}】请求扫码入库(实盘),下一目标地址【{taskCommand.TargetAddress}】");
                        conveyorLine.SendCommand(taskCommand, childDeviceCode);
                        ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                        var taskHty = task.Adapt<Dt_Task_Hty>();
                        _task_HtyRepository.AddData(taskHty);
                        _taskService.DeleteData(task);
                    }
                    else
                    {
                        var next = task.NextAddress;
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -163,7 +163,7 @@
                            childDeviceCode,
                            commandAfter = command,
                        };
                        _noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj });
                        _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj });
                        #endregion 调用事件总线通知前端
                    }
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -994,6 +994,15 @@
                    return content.Error(result.MOMMessage);
            }
            if (result.SerialNos.Count <= 0)
            {
                return await RequestTrayInTaskAsync(input);
            }
            else
            {
            // 处理异常电芯情况
            var serialNosError = result.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList();
            if (serialNosError.Count > 0)
@@ -1006,6 +1015,7 @@
            return await ProcessBasedOnProcessCode(boxing, area, input, result);
        }
        }
        catch (Exception err)
        {
            // 更详细的异常处理,可以根据异常类型记录不同的错误日志等
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -101,7 +101,11 @@
        if (!content.Status) return content.Error("工艺申请失败");
        var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString());
        if (!resultProcessApply.Success) return content.Error("工艺申请失败");
        if (!resultProcessApply.Success)
        {
            return await HandleErrorCells(input, area);
            //return content.Error("工艺申请失败");
        }
        var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault().Number.ToInt32();
        foreach (var item in resultProcessApply.ProcessInfo)
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.MvcApplicationPartsAssemblyInfo.cs
@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行时版本:4.0.30319.42000
//     This code was generated by a tool.
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------