yanjinhui
10 小时以前 0875bfa35d389e238ae82142ce45b71c9715133b
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -392,7 +392,7 @@
                bool isAGV = dt_Task.TaskType == (int)TaskTypeEnum.CPInbound || dt_Task.TaskType == (int)TaskTypeEnum.CPOutbound;
                //海康
                bool isHK = dt_Task.TaskType == (int)TaskTypeEnum.F01 || dt_Task.TaskType == (int)TaskTypeEnum.RK3F || dt_Task.TaskType == (int)TaskTypeEnum.CK3F || dt_Task.TaskType == (int)TaskTypeEnum.Q1TSJ4 || dt_Task.TaskType == (int)TaskTypeEnum.STU0003 || dt_Task.TaskType == (int)TaskTypeEnum.F02 || dt_Task.TaskType == (int)TaskTypeEnum.CHUKU1 || dt_Task.TaskType == (int)TaskTypeEnum.Q3RK || dt_Task.TaskType == (int)TaskTypeEnum.Q3CK||dt_Task.TaskType == (int)TaskTypeEnum.STUPTBY;
                bool isHK = dt_Task.TaskType == (int)TaskTypeEnum.F01 || dt_Task.TaskType == (int)TaskTypeEnum.RK3F || dt_Task.TaskType == (int)TaskTypeEnum.CK3F || dt_Task.TaskType == (int)TaskTypeEnum.Q1TSJ4 || dt_Task.TaskType == (int)TaskTypeEnum.STU0003 || dt_Task.TaskType == (int)TaskTypeEnum.F02 || dt_Task.TaskType == (int)TaskTypeEnum.CHUKU1 || dt_Task.TaskType == (int)TaskTypeEnum.Q3RK || dt_Task.TaskType == (int)TaskTypeEnum.Q3CK || dt_Task.TaskType == (int)TaskTypeEnum.STUPTBY;
                //修改原本任务优先级
                dt_Task.Grade = updateTaskPriority.taskPriority;
                #region å‡¯ä¹å£«
@@ -523,7 +523,7 @@
                var kls = new List<Dt_KLSLocationInfo>();
                var hk = new List<Dt_HKLocationInfo>();
                List<Dt_StationInfo> pk = new List<Dt_StationInfo>();
                if (wMSUpdateLocationArea==null)
                if (wMSUpdateLocationArea == null)
                {
                    return content.Error("请求参数不能为空");
                }
@@ -1155,7 +1155,8 @@
                            LoctionCode = item.LocationCode,
                            LocationStatus = item.LocationStatus,
                            EnableStatus = item.EnableStatus,
                            PalletCode = item.PalletCode
                            PalletCode = item.PalletCode,
                            AreaCode = item.WarehouseId
                        });
                    }
@@ -1175,7 +1176,8 @@
                            LoctionCode = item.LocationCode,
                            LocationStatus = item.LocationStatus,
                            EnableStatus = item.EnableStatus,
                            PalletCode = item.PalletCode
                            PalletCode = item.PalletCode,
                            AreaCode = item.WarehouseId
                        });
                    }
                    content.OK(data: list);
@@ -1209,7 +1211,8 @@
                            LoctionCode = item.LocationCode,
                            LocationStatus = item.LocationStatus,
                            EnableStatus = item.EnableStatus,
                            PalletCode = item.PalletCode
                            PalletCode = item.PalletCode,
                            AreaCode = item.WarehouseId
                        });
                    }
                    content.OK(data: list);
@@ -1247,7 +1250,9 @@
                            LoctionCode = item.StationCode,
                            LocationStatus = item.StationStatus,
                            EnableStatus = item.IsOccupied,
                            PalletCode = item.PalletCode
                            PalletCode = item.PalletCode,
                            AreaCode = item.StationRegion
                        });
                    }
                    content.OK(data: list);
@@ -1281,6 +1286,7 @@
        {
            throw new NotImplementedException();
        }
        public WebResponseContent InboundElevatorExit(string LocationCode, string containerCode)
        {
            WebResponseContent content = new WebResponseContent();
@@ -1400,6 +1406,7 @@
                {
                    stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
                    stationManger.Remark = "";
                    _stationMangerService.UpdateData(stationManger);
                    FOURBOToccupyStation fOURBOToccupyStation = new FOURBOToccupyStation()
                    {
                        stationCode = wMSContainerFlow.slotCode,
@@ -1408,7 +1415,6 @@
                    FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                    content.OK(data: fOURBOTReturn);
                    if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg);
                    _stationMangerService.UpdateData(stationManger);
                }
                return content.OK();
            }
@@ -1526,7 +1532,10 @@
            {
                // æŸ¥æ‰¾æ‰€æœ‰ä»»åŠ¡ä¸­åŒ…å«è¿™ä¸ªid的
                var take = BaseDal.QueryData(x => keys.Contains(x.TaskId));
                foreach (var item in take)
                {
                    item.Modifier = App.User.UserName;
                }
                // æ‰§è¡Œç§»å…¥åŽ†å²æ“ä½œï¼Œå¹¶æ£€æŸ¥ç»“æžœ
                bool moveResult = BaseDal.DeleteAndMoveIntoHty(take, OperateTypeEnum.人工删除);
@@ -1777,7 +1786,7 @@
                        var station = _stationInfo.Repository.QueryFirst(x => x.StationCode == locationCode);
                        if (station != null)
                        {
                            station.IsOccupied = upLocationStatusDTO.EnableStatus==0?0:1;
                            station.IsOccupied = upLocationStatusDTO.EnableStatus == 0 ? 0 : 1;
                            locationsToUpdate.Add(station);
                            resultList.Add(new
@@ -1860,5 +1869,36 @@
                return content.Error($"更新站台状态失败:{ex.Message}");
            }
        }
        /// <summary>
        /// PLC报警信息
        /// </summary>
        /// <param name="ErrorMsg"></param>
        /// <returns></returns>
        public WebResponseContent PLCAlarmtoWMS(string ErrorMsg)
        {
            PLCAlarmDTO PLCAlarmDTO = new PLCAlarmDTO();
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(PLCAlarmDTO)) ?? throw new Exception("未找到PLC报警信息接口配置信息!请检查接口配置");
                PLCAlarmDTO.errorMsg = ErrorMsg;
                string response = HttpHelper.Post(apiInfo.ApiAddress, PLCAlarmDTO.Serialize());
                content.OK(data: response);
                WMSReturn wMSReturn = response.DeserializeObject<WMSReturn>();
                if (wMSReturn == null) throw new Exception("WMS返回结果转换失败!");
                if (!wMSReturn.success) throw new Exception(wMSReturn.message);
               return content.OK();
            }
            catch (Exception ex)
            {
                return content.Error(ex.Message);
            }
            finally
            {
                _trackloginfoService.AddTrackLog(PLCAlarmDTO, content, "PLC报警信息上报WMS", "", "");
            }
        }
    }
}