From cb62fe00ff0c80bce983b0aa7a2b320fdc26f85f Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期一, 20 五月 2024 08:51:03 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/SuZhouGuanHong/TaiYuanTaiZhong --- 代码管理/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs | 40 +++++++++++++++++++++++++++++++++++++--- 1 files changed, 37 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs" index 98f323b..f6c14a3 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs" @@ -3,10 +3,13 @@ using WIDESEA_Comm; using WIDESEA_Comm.LogInfo; using WIDESEA_Common; +using WIDESEA_Core.EFDbContext; using WIDESEA_Core.ManageUser; using WIDESEA_Core.Utilities; using WIDESEA_Entity.DomainModels; using WIDESEA_Entity.DomainModels.Mes; +using WIDESEA_WMS.IRepositories; +using WIDESEA_WMS.Repositories; namespace WIDESEA_WMS { @@ -49,7 +52,7 @@ { station2.quantity = station1.quantity; station2.bindSN = station1.bindSN; - station2.location_state = station1.location_state; + station2.location_state = LocationStateEnum.Stroge.ToString(); station2.tray_status = station1.tray_status; freeDB.Update(station2); @@ -64,14 +67,45 @@ throw new Exception("璧峰鎴栫洰鐨勫湴鍧�锛屽凡瀛樺湪浠诲姟锛�"); } content.OK(); - WriteDBLog.Success($"鎵嬪姩绉诲簱", new { 鏁版嵁 = requestTemp }, "WMS", UserContext.Current.UserTrueName); + WriteDBLog.Success($"鎵嬪姩绉诲簱", new { 鏁版嵁 = requestTemp }, "WMS", UserContext.Current.UserName + UserContext.Current.UserTrueName); } catch (Exception ex) { - WriteDBLog.Error($"鎵嬪姩绉诲簱", new { 鏁版嵁 = requestTemp, 寮傚父淇℃伅 = ex.Message }, "WMS", UserContext.Current.UserTrueName); + WriteDBLog.Error($"鎵嬪姩绉诲簱", new { 鏁版嵁 = requestTemp, 寮傚父淇℃伅 = ex.Message }, "WMS", UserContext.Current.UserName + UserContext.Current.UserTrueName); content.Error(ex.Message); } return content; } + + /// <summary> + /// 澶栧崗璐т綅鎵爜纭鐗╂枡宸茶鍙栬蛋 + /// </summary> + /// <param name="saveModel"></param> + /// <returns></returns> + public WebResponseContent Confirmedcut(SaveModel saveModel) + { + WebResponseContent content = new WebResponseContent(); + try + { + VOLContext context = new VOLContext(); + Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context); + string sn = saveModel.MainData["from_address"].ToString(); + var station = stationinfoRepository.Find(x => x.bindSN.Contains(sn) && (x.stationCode.Contains("W01001001") || x.stationCode.Contains("W01001002") || x.stationCode.Contains("W01001003"))).FirstOrDefault(); + if (station == null) throw new Exception($"鏈壘鍒拌溅杞甋N鍙�:{sn}鐨勫鍗忚揣浣嶄俊鎭紒"); + station.Number = string.Empty; + station.billetID = string.Empty; + station.heatNumber = string.Empty; + station.stationType = string.Empty; + station.tray_status = "EmptyTray"; + station.lastUpdateTime = DateTime.Now; + stationinfoRepository.Update(station, true); + content.OK(); + } + catch (Exception ex) + { + content.Message = ex.Message; + } + return content; + } } } -- Gitblit v1.9.3