分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-05-30 01a80700ea03a332785fb8cbd16aecaf7cce2ccb
添加人工下料和切换托盘日志
已修改1个文件
8 ■■■■■ 文件已修改
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_stationinfoService.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_stationinfoService.cs
@@ -112,13 +112,11 @@
            VOLContext context = new VOLContext();
            Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(context);
            IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(context);
            string json = string.Empty;
            foreach (var Key in saveModel.DelKeys)
            {
                try
                {
                    var station = repository.Find(x => x.id.ToString() == Key.ToString()).FirstOrDefault();
                    json = json + station.stationCode + ",";
                    if (!station.stationCode.Contains("X") && !station.stationCode.Contains("W01001004") && !station.stationCode.Contains("W01001005")) throw new Exception($"无{station.stationCode}使用权限!");
                    if (!station.enable) throw new Exception($"{station.stationCode}未启用!");
                    if (station.location_state == LocationStateEnum.Abnormal.ToString()) throw new Exception($"{station.stationCode}状态异常!");
@@ -217,7 +215,7 @@
            Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(context);
            IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(context);
            string completor = UserContext.Current.UserName;
            object json = null;
            //List<object> jsons = null;
            foreach (var Key in saveModel.DelKeys)
            {
                try
@@ -257,7 +255,7 @@
                        jobID = station.Number,
                        agv_TrayStatus = station.tray_status
                    };
                    json = agvtask;
                    //jsons.Add(agvtask);
                    agvtaskRepository.Add(agvtask, true);
                    station.location_state = LocationStateEnum.InBusy.ToString();
                    repository.Update(station, x => new { x.location_state }, true);
@@ -268,7 +266,7 @@
                    webResponse.Error(webResponse.Message += ex.Message);
                }
            }
            WriteDBLog.Write($"手动下料任务 ", new { ä¿¡æ¯ = webResponse.Message, æ•°æ® = json }, LogState.Sucess, "WMS", completor);
            WriteDBLog.Write($"手动下料任务 ", new { ä¿¡æ¯ = webResponse.Message }, LogState.Sucess, "WMS", completor);
            return webResponse;
        }