huangxiaoqiang
2025-04-28 a9b86405ec73459aab599119c6a593f1f3e0c767
优化
已修改12个文件
75 ■■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task_Hty.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -291,7 +291,7 @@
        // 处理 stationType 为 7 的情况
        private async Task<WebResponseContent> HandleStationType7(string palletCode, Dt_StationManager stationManager)
        {
            var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 6 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea);
            var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 6 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea && x.Roadway == stationManager.Roadway);
            var runTask = await BaseDal.QueryFirstAsync(x => x.CurrentAddress == station.stationChildCode && x.TaskState == (int)TaskInStatusEnum.Line_InFinish && x.TaskType == (int)TaskInboundTypeEnum.InTray);
            if (runTask != null)
@@ -328,7 +328,7 @@
        // 处理 stationType 为 6 的情况
        private async Task<WebResponseContent> HandleStationType6(string palletCode, Dt_StationManager stationManager)
        {
            var emptyStation = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 7 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea);
            var emptyStation = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 7 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea && x.Roadway==stationManager.Roadway);
            var runTask = await BaseDal.QueryFirstAsync(x => x.NextAddress == emptyStation.stationChildCode && x.TaskState == (int)TaskInStatusEnum.Line_InFinish && x.TaskType == (int)TaskInboundTypeEnum.InTray);
            if (runTask != null)
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -709,18 +709,24 @@
                var wmsIpAddress = wmsBase + completeTask;
                var result = HttpHelper.GetAsync(wmsIpAddress, keys).Result;
                content = JsonConvert.DeserializeObject<WebResponseContent>(result);
                if (!content.Data.IsNullOrEmpty())
                {
                    if (content.Data.ToString() == "NG")
                    {
                        task.Remark = "NG";
                        //BaseDal.UpdateData(task);
                        //_taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"堆垛机出库完成,MOM返回NG");
                    }
                }
                task.ExceptionMessage += "   " + content.Message;
                QuartzLogger.WriteLogToFile($"Info_任务完成", $"任务完成,任务号:【{taskNum}】返回参数【{JsonConvert.SerializeObject(result)}】{Environment.NewLine}{Environment.NewLine}");
                if(result != null)
                {
                    content = JsonConvert.DeserializeObject<WebResponseContent>(result);
                    if (!content.Data.IsNullOrEmpty())
                    {
                        if (content.Data.ToString() == "NG")
                        {
                            task.Remark = "NG";
                            //BaseDal.UpdateData(task);
                            //_taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"堆垛机出库完成,MOM返回NG");
                        }
                    }
                    task.ExceptionMessage += "   " + content.Message;
                }
                #endregion WMS同步任务完成
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting)
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -213,7 +213,7 @@
                else
                {
                    var GWTask = _taskRepository.QueryData(x => x.Roadway.Contains("GWSC2") && x.SourceAddress == "1039" && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskInStatusEnum.Line_InFinish)).ToList();
                    if (GWTask.Count >= 2 && childDeviceCode == "1039")
                    if (GWTask.Count >= 2 && childDeviceCode == "1039"&& task.Roadway.Contains("GWSC2"))
                    {
                        ConsoleHelper.WriteErrorLine($"托盘号:【{command.ConveyorLineBarcode}】高温二已存在【{GWTask.Count}】个任务大于2个任务不可下发");
                        return;
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -334,7 +334,7 @@
                    //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode);
                    //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, command.ConveyorLineBarcode, childDeviceCode);
                    var GWTask = _taskRepository.QueryData(x => x.Roadway.Contains("GWSC2") && x.SourceAddress == "1039" && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskInStatusEnum.Line_InFinish)).ToList();
                    if (GWTask.Count >= 2 && childDeviceCode == "1039")
                    if (GWTask.Count >= 2 && childDeviceCode == "1039"&&task.Roadway.Contains("GWSC2"))
                    {
                        ConsoleHelper.WriteErrorLine($"托盘号:【{command.ConveyorLineBarcode}】高温二已存在【{GWTask.Count}】个任务大于2个任务不可下发");
                        return;
Code Management/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js
@@ -17,8 +17,7 @@
    methods: {
        //下面这些方法可以保留也可以删除
        onInit() {
            // this.$Notice.success({ title: this.detailOptions.cnName + ',查询结果', desc: '返回的对象:' + JSON.stringify(data) });
            // this.$Notice.success({ title: this.detailOptions.cnName + ',查询结果', desc: '返回的对象:' + JSON.stringify(data) });
            var previousButton = this.buttons.find((x) => x.value == "Previous");
            if (previousButton) previousButton.hidden = true;
            var nextButton = this.buttons.find((x) => x.value == "Next");
Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx
@@ -23,6 +23,20 @@
  methods: {
    //下面这些方法可以保留也可以删除
    onInit() {
      this.columns.forEach(x => {
        if (x.field == "errorMessage") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            if (row.errorMessage == null||row.errorMessage=="") {
              return { background: "White", color: "Black" }
            }
            else{
              return { background: "#FF4500", color: "Black" }
            }
          }
        }
      })
      //框架初始化配置前,
      let TaskHandCompleteBtn=this.buttons.find(x=>x.value=='TaskHandComplete');
      if(TaskHandCompleteBtn){
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue
@@ -68,7 +68,7 @@
        { field: 'targetAddress', title: '目标位置', type: 'string', width: 110, align: 'left' },
        { field: 'grade', title: '优先级', type: 'int', width: 60, align: 'left' },
        { field: 'productionLine', title: '产线', type: 'string', width: 70, align: 'left', bind: { key: "ProductionLine", data: [] }  },
        { field: 'processCode', title: '工序', type: 'string', width: 90, align: 'left' },
        { field: 'errorMessage', title: '异常信息', type: 'string', width: 110,  align: 'left',sort: true },
        { field: 'dispatchertime', title: '任务下发时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'remark', title: '备注', type: 'string', width: 110, align: 'left',hidden: true, },
        { field: 'createDate', title: '创建时间', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
@@ -78,6 +78,7 @@
        { field: 'locationCode', title: '货位号', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'materialNo', title: '物料编号', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'targetAddress', title: '目标地址', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'processCode', title: '工序', type: 'string', width: 90, align: 'left' },
        { field: 'createID', title: '创建ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },
        { field: 'modifyID', title: '修改人ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },]);
        const detail = ref({
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task_Hty.vue
@@ -78,8 +78,8 @@
        { field: 'nextAddress', title: '下一位置', type: 'string', width: 110, align: 'left' },
        { field: 'targetAddress', title: '目标位置', type: 'string', width: 110, align: 'left' },
        { field: 'grade', title: '优先级', type: 'int', width: 60, align: 'left' },
        { field: 'productionLine', title: '产线', type: 'string', width: 70, align: 'left', bind: { key: "ProductionLine", data: [] }  },
        { field: 'processCode', title: '工序', type: 'string', width: 90, align: 'left' },
        { field: 'productionLine', title: '产线', type: 'string', width: 70, align: 'left', bind: { key: "ProductionLine", data: [] }  },
        { field: 'errorMessage', title: '异常信息', type: 'string', width: 110,  align: 'left' },
        { field: 'dispatchertime', title: '任务下发时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'operateType', title: '操作类型', type: 'string', width: 110, align: 'left', bind: { key: "operateType", data: [] }},
        { field: 'remark', title: '备注', type: 'string', width: 110, align: 'left',hidden: true, },
@@ -89,7 +89,7 @@
        { field: 'modifier', title: '修改人', type: 'string', sort: true, width: 100, align: 'left' },
        { field: 'locationCode', title: '货位号', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'materialNo', title: '物料编号', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'targetAddress', title: '目标地址', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'processCode', title: '工序', type: 'string', width: 90, align: 'left' },
        { field: 'createID', title: '创建ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },
        { field: 'modifyID', title: '修改人ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },]);
        const detail = ref({
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -37,7 +37,7 @@
                LogFactory.GetLog("分容测试完成通知").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("分容测试完成通知").Info(true, result.ToJsonString());
                var location = _locationRepository.QueryFirst(x => x.AreaId == result.LocationArea && x.LocationCode == result.LocationID);
                var location = _locationRepository.QueryFirst(x => x.AreaId == result.LocationArea && x.LocationCode == result.LocationID && x.EnalbeStatus == 1);
                if (location == null) throw new Exception("未知库位");
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
@@ -45,7 +45,7 @@
            }
            var wmsIpAddress = wmsBase + ipAddress;
            var result = HttpsClient.PostAsync(wmsIpAddress, inputJson).Result;
            var result =await HttpsClient.PostAsync(wmsIpAddress, inputJson);
            content.OK(data: result);
            var respone = JsonConvert.DeserializeObject<ResponeAgingInputDto>(result.ToString());
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -248,7 +248,7 @@
        var isStockUpdated = await _locationRepository.UpdateDataAsync(info);
        if (!isStockUpdated)
        {
            throw new Exception("库存信息更新失败");
            throw new Exception("库位信息更新失败");
        }
    }
@@ -358,7 +358,7 @@
        WebResponseContent content = new WebResponseContent();
        try
        {
            if (task.TaskType == (int)TaskInboundTypeEnum.InNG || task.TaskType == (int)TaskInboundTypeEnum.InQuality)
            if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
            {
                task.TaskState = (int)TaskInStatusEnum.SC_InFinish;
                // 创建历史任务实例模型
@@ -425,6 +425,9 @@
            Console.WriteLine(err.Message.ToString());
            LogFactory.GetLog("任务完成").Error(true, err);
            content.Error(err.Message);
            task.ErrorMessage= err.Message;
            task.TaskState=(int)TaskInStatusEnum.SC_InExecuting;
            await BaseDal.Update(task);
        }
        return content;
    }
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -80,7 +80,7 @@
            // TODO 判断在途数量
            var needBarcode = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == STATION.productLine && x.fromArea == "CW");
            var needCount = needBarcode.inLineNum = BaseDal.QueryData(x => x.TargetAddress == STATION.stationChildCode).Count();
            var needCount =  BaseDal.QueryData(x => x.TargetAddress == needBarcode.toArea).Count();
            //var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;
            if (needCount < needBarcode.cacheNum)
            {