From 75e3bca44b111c167b9389e4e51b2ce577a9f9e0 Mon Sep 17 00:00:00 2001 From: 647556386 <647556386@qq.com> Date: 星期日, 10 八月 2025 10:35:50 +0800 Subject: [PATCH] 优化更新 --- WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/IBaseHistoryEntity.cs | 37 ++++ 吉安PDA/common/config.js | 2 WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs | 2 WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs | 6 WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs | 80 ++------- WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs | 5 WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 109 ++++++------- 吉安PDA/pages/stash/raworderboxing.vue | 2 WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs | 3 WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs | 4 吉安PDA/pages/home/home.vue | 102 ++++++++---- WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs | 91 ++-------- 12 files changed, 217 insertions(+), 226 deletions(-) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs index 146eccc..334a785 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs @@ -62,5 +62,10 @@ /// </summary> [Description("鍘熷鏁版嵁")] BD, + /// <summary> + /// 閮ㄤ欢鍙� + /// </summary> + [Description("浜よ揣鍗曞彿")] + DN, } } diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/IBaseHistoryEntity.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/IBaseHistoryEntity.cs new file mode 100644 index 0000000..a5b560f --- /dev/null +++ b/WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/IBaseHistoryEntity.cs @@ -0,0 +1,37 @@ +锘縰sing Magicodes.ExporterAndImporter.Core; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_Core.DB.Models +{ + public interface IBaseHistoryEntity + { + /// <summary> + /// 鍘熻〃涓婚敭 + /// </summary> + [ImporterHeader(Name = "鍘熻〃涓婚敭")] + [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")] + [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")] + public int SourceId { get; set; } + + /// <summary> + /// 鎿嶄綔绫诲瀷 + /// </summary> + [ImporterHeader(Name = "鎿嶄綔绫诲瀷")] + [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")] + public string OperateType { get; set; } + + /// <summary> + /// 绉诲叆鍘嗗彶鏃堕棿 + /// </summary> + [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")] + [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")] + [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")] + public DateTime InsertTime { get; set; } + } +} diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs b/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs index fb52b51..eaf9444 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs @@ -51,6 +51,12 @@ public decimal Quantity { get; set; } /// <summary> + /// 閫佽揣鍗曞彿 + /// </summary> + [AnalysisItemRule(AnalysisFormatTypeEnum.DN), PropertyValidate("閫佽揣鍗曞彿", NotNullAndEmpty = true)] + public string DeliveryNote { get; set; } + + /// <summary> /// 鍘熷鏁版嵁 /// </summary> [AnalysisItemRule(AnalysisFormatTypeEnum.BD), PropertyValidate("鍘熷鏁版嵁", NotNullAndEmpty = true)] diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs index 3e0832a..da8a5a3 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs @@ -140,7 +140,7 @@ StockStatus = (int)StockStatusEmun.缁勭洏鏆傚瓨, Creater = "WMS", CreateDate = DateTime.Now, - MaterialType = (int)InventoryMaterialType.鎴愬搧, + MaterialType = (int)InventoryMaterialType.鍘熸潗鏂�, Materialweight = 0, Wlstatus = (int)InventoryMaterialStatus.鍚堟牸, Mgeneratetime = DateTime.Now, @@ -208,6 +208,7 @@ Creater = "WMS", CreateDate = DateTime.Now, Id = inboundOrderDet.LinId.ObjToInt(), + DeliveryNote = model.DeliveryNote }; if (stockInfo.Id > 0) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs index 52dbafe..194a47c 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs @@ -69,6 +69,10 @@ [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "瀹炵洏鏁伴噺", DefaultValue = "0")] public decimal FinishQty { get; set; } + [ExporterHeader(DisplayName = "閫佽揣鍗曞彿")] + [SugarColumn(IsNullable = true, ColumnDescription = "閫佽揣鍗曞彿")] + public string DeliveryNote { get; set; } + [ExporterHeader(IsIgnore = true)] [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))] public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; } diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs index e844a75..82096fc 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs @@ -9,81 +9,34 @@ namespace WIDESEA_Model.Models { - [SugarTable(nameof(Dt_StockInfoDetail_Hty), "搴撳瓨淇℃伅鏄庣粏")] - public class Dt_StockInfoDetail_Hty + /// <summary> + /// 搴撳瓨淇℃伅鏄庣粏鍘嗗彶 + /// </summary> + [SugarTable(nameof(Dt_StockInfoDetail_Hty), "搴撳瓨淇℃伅鏄庣粏鍘嗗彶")] + public class Dt_StockInfoDetail_Hty : Dt_StockInfoDetail, IBaseHistoryEntity { - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] - public int Id { get; set; } - - [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨淇℃伅涓婚敭")] - public int StockId { get; set; } - - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")] - public string MaterielCode { get; set; } - - [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")] - public string MaterielName { get; set; } - - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")] - public string OrderNo { get; set; } - - [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鎵规鍙�")] - public string BatchNo { get; set; } - - [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "搴忓垪鍙�")] - public string SerialNumber { get; set; } - - [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "搴撳瓨鏁伴噺")] - public decimal StockQuantity { get; set; } - - [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "鍑哄簱鏁伴噺", DefaultValue = "0")] - public decimal OutboundQuantity { get; set; } - - [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鏄庣粏鐘舵��")] - public int Status { get; set; } - - [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")] - public string Remark { get; set; } - - [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))] - public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; } - - - [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")] + /// <summary> + /// 鍘熻〃涓婚敭 + /// </summary> + [ImporterHeader(Name = "鍘熻〃涓婚敭")] + [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")] + [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")] public int SourceId { get; set; } - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")] + /// <summary> + /// 鎿嶄綔绫诲瀷 + /// </summary> + [ImporterHeader(Name = "鎿嶄綔绫诲瀷")] + [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")] public string OperateType { get; set; } - /// <summary> - /// 鍒涘缓浜� - /// </summary> - [ImporterHeader(Name = "鍒涘缓浜�")] - [ExporterHeader(DisplayName = "鍒涘缓浜�")] - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")] - public string Creater { get; set; } /// <summary> - /// 鍒涘缓鏃堕棿 + /// 绉诲叆鍘嗗彶鏃堕棿 /// </summary> - [ImporterHeader(Name = "鍒涘缓鏃堕棿")] - [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")] - [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")] - public DateTime CreateDate { get; set; } = DateTime.Now; - - /// <summary> - /// 鏇存柊鑰� - /// </summary> - [ImporterHeader(Name = "淇敼浜�")] - [ExporterHeader(DisplayName = "淇敼浜�")] - [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")] - public string Modifier { get; set; } - - /// <summary> - /// 淇敼鏃ユ湡 - /// </summary> - [ImporterHeader(Name = "淇敼鏃ユ湡")] - [ExporterHeader(DisplayName = "淇敼鏃ユ湡")] - [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")] - public DateTime? ModifyDate { get; set; } + [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")] + [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")] + [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")] + public DateTime InsertTime { get; set; } } } diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs index 8c85639..00a0f08 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs @@ -9,72 +9,34 @@ namespace WIDESEA_Model.Models { + /// <summary> + /// 搴撳瓨淇℃伅鍘嗗彶 + /// </summary> [SugarTable(nameof(Dt_StockInfo_Hty), "搴撳瓨淇℃伅")] - public class Dt_StockInfo_Hty + public class Dt_StockInfo_Hty : Dt_StockInfo, IBaseHistoryEntity { - [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] - public int Id { get; set; } - - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏缂栧彿")] - public string PalletCode { get; set; } - - [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "璐т綅缂栧彿")] - public string LocationCode { get; set; } - - [SugarColumn(IsNullable = false, ColumnDescription = "鏄惁婊$洏", DefaultValue = "0")] - public bool IsFull { get; set; } - - [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鐘舵��")] - public int StockStatus { get; set; } - - [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")] - public string Remark { get; set; } - - [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")] + /// <summary> + /// 鍘熻〃涓婚敭 + /// </summary> + [ImporterHeader(Name = "鍘熻〃涓婚敭")] + [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")] + [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")] public int SourceId { get; set; } - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")] + /// <summary> + /// 鎿嶄綔绫诲瀷 + /// </summary> + [ImporterHeader(Name = "鎿嶄綔绫诲瀷")] + [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")] public string OperateType { get; set; } - /// <summary> - /// 鍒涘缓浜� - /// </summary> - [ImporterHeader(Name = "鍒涘缓浜�")] - [ExporterHeader(DisplayName = "鍒涘缓浜�")] - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")] - public string Creater { get; set; } /// <summary> - /// 鍒涘缓鏃堕棿 + /// 绉诲叆鍘嗗彶鏃堕棿 /// </summary> - [ImporterHeader(Name = "鍒涘缓鏃堕棿")] - [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")] - [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")] - public DateTime CreateDate { get; set; } = DateTime.Now; - - /// <summary> - /// 鏇存柊鑰� - /// </summary> - [ImporterHeader(Name = "淇敼浜�")] - [ExporterHeader(DisplayName = "淇敼浜�")] - [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")] - public string Modifier { get; set; } - - /// <summary> - /// 淇敼鏃ユ湡 - /// </summary> - [ImporterHeader(Name = "淇敼鏃ユ湡")] - [ExporterHeader(DisplayName = "淇敼鏃ユ湡")] - [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")] - public DateTime? ModifyDate { get; set; } - [SugarColumn(IsNullable = false, ColumnDescription = "绫诲瀷")] - public int MaterialType { get; set; } - [SugarColumn(IsNullable = false, ColumnDescription = "鐗╂枡鐘舵��")] - public int Wlstatus { get; set; } - - [SugarColumn(IsNullable = false, ColumnDescription = "閲嶉噺")] - public decimal Materialweight { get; set; } - - [SugarColumn(IsNullable = true, ColumnDescription = "鐢熶骇鏃堕棿")] - public DateTime Mgeneratetime { get; set; } + [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")] + [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")] + [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")] + public DateTime InsertTime { get; set; } } } diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs index 3310331..f264e11 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs @@ -462,7 +462,8 @@ { // 鏇存柊鍏ュ簱鍗曟槑缁嗙姸鎬� UpdateInboundOrderDetails(stockInfo, inboundOrder, ref inboundOrderDetail); - + ///鏇存柊搴撳瓨鐘舵�� + stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(); // 鏇存柊搴撳瓨鏄庣粏鐘舵�� stockInfo.Details.ForEach(x => x.Status = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()); @@ -840,17 +841,15 @@ int lastStatus = locationInfo.LocationStatus; locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); - - Dt_OutboundOrderDetail outboundOrderDetails = _outboundService.OutboundOrderService.Db.Queryable<Dt_OutboundOrderDetail>() .Where(x => x.BatchNo == stockInfo.Details.FirstOrDefault().BatchNo) .First(); if (outboundOrderDetails == null) return WebResponseContent.Instance.Error("鏈壘鍒板嚭搴撳崟淇℃伅"); Dt_OutboundOrder inboundOrder = _outboundService.OutboundOrderService.Db.Queryable<Dt_OutboundOrder>() - .Where(x => x.Id == outboundOrderDetails.OrderId) - .Includes(x => x.Details) - .First(); + .Where(x => x.Id == outboundOrderDetails.OrderId) + .Includes(x => x.Details) + .First(); if (inboundOrder == null) return WebResponseContent.Instance.Error("鏈壘鍒板嚭搴撳崟淇℃伅"); // 2. 澶勭悊鍑哄簱璁㈠崟璇︽儏 @@ -859,7 +858,7 @@ UpdateOutboundOrderDetails(stockInfo, inboundOrder, ref outboundOrderDetails); // 3. 鎵ц鏍稿績鍑哄簱閫昏緫 - return ExecuteOutboundLogic(task, stockInfo, locationInfo, outboundOrderDetails); + return ExecuteOutboundLogic(task, stockInfo, locationInfo, outboundOrderDetails, inboundOrder); } catch (Exception ex) { @@ -917,18 +916,18 @@ //} private WebResponseContent ExecuteOutboundLogic(Dt_Task task, Dt_StockInfo stockInfo, - Dt_LocationInfo locationInfo, Dt_OutboundOrderDetail outboundOrderDetails) + Dt_LocationInfo locationInfo, Dt_OutboundOrderDetail outboundOrderDetails,Dt_OutboundOrder inboundOrder) { try { _unitOfWorkManage.BeginTran(); - - + ///鏇存柊鍑哄簱鍗� + _outboundService.OutboundOrderService.Repository.UpdateData(inboundOrder); // 鏇存柊鍑哄簱璁㈠崟璇︽儏 _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails); // 鏇存柊搴撳瓨鐘舵�� - UpdateStockStatus(stockInfo, locationInfo); + DeleteAndMoveIntoHtStockStatus(stockInfo); // 鏇存柊璐т綅鐘舵�� UpdateLocationStatus(locationInfo); @@ -971,8 +970,7 @@ throw; } } - private void UpdateOutboundOrderDetails(Dt_StockInfo stockInfo, Dt_OutboundOrder inboundOrder, - ref Dt_OutboundOrderDetail inboundOrderDetail) + private void UpdateOutboundOrderDetails(Dt_StockInfo stockInfo, Dt_OutboundOrder inboundOrder,ref Dt_OutboundOrderDetail inboundOrderDetail) { int overCount = inboundOrder.Details.Count(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()); inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == stockInfo.Details.FirstOrDefault()?.BatchNo); @@ -1000,16 +998,10 @@ } } - private void UpdateStockStatus(Dt_StockInfo stockInfo, Dt_LocationInfo locationInfo) + private void DeleteAndMoveIntoHtStockStatus(Dt_StockInfo stockInfo) { - stockInfo.LocationCode = ""; - stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(); - stockInfo.Details.ForEach(x => - { - x.Status = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(); - }); - _stockRepository.StockInfoRepository.UpdateData(stockInfo); - _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details); + _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateType.鑷姩瀹屾垚 : OperateType.浜哄伐瀹屾垚); + _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateType.鑷姩瀹屾垚 : OperateType.浜哄伐瀹屾垚); } private void UpdateLocationStatus(Dt_LocationInfo locationInfo) @@ -1021,6 +1013,7 @@ private void CompleteTask(Dt_Task task) { + task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt(); BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.鑷姩瀹屾垚 : OperateType.浜哄伐瀹屾垚); } @@ -1129,48 +1122,46 @@ private void SendNormalOutboundToWMS(Dt_Task task, Dt_OutboundOrder outboundOrder, Dt_StockInfoDetail stockInfoDetail, Dt_OutboundOrderDetail outDetail) - { - - - //List<Dt_StockInfo> StockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == task.WarehouseId).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BatchNo == outDetail.BatchNo)).ToList(); - List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.OrderNo == outboundOrder.OrderNo); - - - if (outStockLockInfos.Count == 0) throw new Exception("鏈壘鍒板簱瀛樹俊鎭�"); - - // 鏋勫缓鍥炰紶鏁版嵁锛屽皢鎵�鏈夊尮閰嶇殑搴撳瓨鏄庣粏鍔犲叆 DetailList - var passBack = new HouseoutboundPassBack { - ApiType = "InventoryAllocateController", - Method = "AsrsFinishedStockCount", - Parameters = new List<HouseoutboundPassBack.datas> - { - new HouseoutboundPassBack.datas - { - Value = new List<HouseoutboundPassBack.datas.data1> - { - new HouseoutboundPassBack.datas.data1 + + //List<Dt_StockInfo> StockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == task.WarehouseId).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BatchNo == outDetail.BatchNo)).ToList(); + List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.OrderNo == outboundOrder.OrderNo); + + if (outStockLockInfos.Count == 0) throw new Exception("鏈壘鍒板簱瀛樹俊鎭�"); + + // 鏋勫缓鍥炰紶鏁版嵁锛屽皢鎵�鏈夊尮閰嶇殑搴撳瓨鏄庣粏鍔犲叆 DetailList + var passBack = new HouseoutboundPassBack { - No = outboundOrder.OrderNo, - OutWareHouse = task.Roadway, - TransactionCode = outboundOrder.TransactionCode, - InoutType = outboundOrder.OrderType, - OrderType = outboundOrder.InoutType, - DetailList = outStockLockInfos.Select(d => new HouseoutboundPassBack.datas.data1.Inbound - { - LinId = d.LinId?? "", - LPN_No = d.PalletCode, - MaterielCode = d.MaterielCode?? "", - OrderQuantity = d.OrderQuantity, - BatchNo = d.BatchNo, - FinishQty = d.OrderQuantity, - LocationName = d.LocationCode - }) - .ToList() + ApiType = "InventoryAllocateController", + Method = "AsrsFinishedStockCount", + Parameters = new List<HouseoutboundPassBack.datas> + { + new HouseoutboundPassBack.datas + { + Value = new List<HouseoutboundPassBack.datas.data1> + { + new HouseoutboundPassBack.datas.data1 + { + No = outboundOrder.OrderNo, + OutWareHouse = task.Roadway, + TransactionCode = outboundOrder.TransactionCode, + InoutType = outboundOrder.OrderType, + OrderType = outboundOrder.InoutType, + DetailList = outStockLockInfos.Select(d => new HouseoutboundPassBack.datas.data1.Inbound + { + LinId = d.LinId?? "", + LPN_No = d.PalletCode, + MaterielCode = d.MaterielCode?? "", + OrderQuantity = d.OrderQuantity, + BatchNo = d.BatchNo, + FinishQty = d.OrderQuantity, + LocationName = d.LocationCode + }) + .ToList() + } } } - } } }; diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs index ae85f35..a06366c 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs @@ -29,6 +29,8 @@ /// <returns></returns> [HttpPost, HttpGet, Route("CodeAnalysis")] public WebResponseContent CodeAnalysis(string serNum) + + { try { diff --git "a/\345\220\211\345\256\211PDA/common/config.js" "b/\345\220\211\345\256\211PDA/common/config.js" index 688cd1a..110cf2a 100644 --- "a/\345\220\211\345\256\211PDA/common/config.js" +++ "b/\345\220\211\345\256\211PDA/common/config.js" @@ -1,6 +1,6 @@ let config = { baseUrl: 'http://127.0.0.1:9290', - // baseUrl: 'http://10.168.1.226:9290', + //baseUrl: 'http://10.168.1.226:9290', urls: [ 'http://10.30.4.92:9283', 'http://10.30.4.92:9283' diff --git "a/\345\220\211\345\256\211PDA/pages/home/home.vue" "b/\345\220\211\345\256\211PDA/pages/home/home.vue" index 1c36adb..2f88570 100644 --- "a/\345\220\211\345\256\211PDA/pages/home/home.vue" +++ "b/\345\220\211\345\256\211PDA/pages/home/home.vue" @@ -7,42 +7,24 @@ <view class="card"> <view class="top"> <view class="userImage"> - <!-- <open-data type="userAvatarUrl"></open-data> --> <u-avatar :src="src" size="146"></u-avatar> </view> </view> <view class="bottom" @tap.native="Login"> <view class="left"> <view class="user-text"> - <!-- <open-data type="userNickName"></open-data> --> <text style="text-align: center;">{{userNickName}}</text> </view> - <!-- <view class="user-phone"> 171****4133 </view> --> </view> <view class="right flex-center"> <u-icon class="icon" name="arrow-right"></u-icon> </view> </view> - <!-- <view class="settings" @click="settings"> - <view class="left"> - <view class="settings-text"> - <open-data type="userNickName"></open-data> - <text style="text-align: center;">璁剧疆</text> - </view> - <view class="user-phone"> 171****4133 </view> - </view> - <view class="right flex-center"> - <u-icon class="icon" name="arrow-right"></u-icon> - </view> - </view> --> </view> </view> <view class="list-card"> </view> <view class="quit flex-center"> - <!-- <view class="btn flex-center" @click="LastLogin"> - 鏇存柊绋嬪簭 - </view> --> <view class="btn flex-center" @click="LastLogin"> 閫�鍑虹櫥褰� </view> @@ -225,35 +207,73 @@ </style> <script> - //import { } from "@/common/api/{$}.js"; import httpInterceptor from '@/common/http.interceptor.js' export default { data() { return { src: "", userNickName: '璇风櫥褰�', + // 杩囨湡鏃堕棿妫�鏌ュ畾鏃跺櫒 + checkExpirationTimer: null }; }, - //鐩戝惉椤甸潰鍒濆鍖栵紝鍏跺弬鏁板悓 onLoad 鍙傛暟锛屼负涓婁釜椤甸潰浼犻�掔殑鏁版嵁锛屽弬鏁扮被鍨嬩负 Object锛堢敤浜庨〉闈紶鍙傦級锛岃Е鍙戞椂鏈烘棭浜� onLoad - onInit() {}, - //鐩戝惉椤甸潰鍔犺浇锛屽叾鍙傛暟涓轰笂涓〉闈紶閫掔殑鏁版嵁锛屽弬鏁扮被鍨嬩负 Object锛堢敤浜庨〉闈紶鍙傦級 onLoad() { - let isLogin = this.hasLogin(); - if (isLogin) { - let haslogin = uni.getStorageSync('jo_user') - this.userNickName = haslogin.userName; - this.src = httpInterceptor.baseUrl + "/" + haslogin.img; + // 妫�鏌ョ櫥褰曠姸鎬佸拰鏄惁杩囨湡 + this.checkLoginStatus(); + + // 璁剧疆瀹氭椂妫�鏌ワ紝姣�30鍒嗛挓妫�鏌ヤ竴娆� + this.checkExpirationTimer = setInterval(() => { + this.checkLoginExpiration(); + }, 30 * 60 * 1000); + }, + onUnload() { + // 椤甸潰鍗歌浇鏃舵竻闄ゅ畾鏃跺櫒 + if (this.checkExpirationTimer) { + clearInterval(this.checkExpirationTimer); } }, - //鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚銆傛敞鎰忓鏋滄覆鏌撻�熷害蹇紝浼氬湪椤甸潰杩涘叆鍔ㄧ敾瀹屾垚鍓嶈Е鍙� - onReady() {}, - //鐩戝惉椤甸潰鏄剧ず銆傞〉闈㈡瘡娆″嚭鐜板湪灞忓箷涓婇兘瑙﹀彂锛屽寘鎷粠涓嬬骇椤甸潰鐐硅繑鍥為湶鍑哄綋鍓嶉〉闈� - beforeDestroy() {}, - //椤甸潰婊氬姩鍒板簳閮ㄧ殑浜嬩欢锛堜笉鏄痵croll-view婊氬埌搴曪級锛屽父鐢ㄤ簬涓嬫媺涓嬩竴椤垫暟鎹�� - onReachBottom() {}, - onShareAppMessage(res) {}, - created() {}, + onShow() { + // 椤甸潰鏄剧ず鏃跺啀娆℃鏌� + this.checkLoginStatus(); + }, methods: { + // 妫�鏌ョ櫥褰曠姸鎬� + checkLoginStatus() { + let isLogin = this.hasLogin(); + if (isLogin) { + // 妫�鏌ユ槸鍚﹁繃鏈� + if (this.checkLoginExpiration()) { + let haslogin = uni.getStorageSync('jo_user') + this.userNickName = haslogin.userName; + this.src = httpInterceptor.baseUrl + "/" + haslogin.img; + } + } + }, + + // 妫�鏌ョ櫥褰曟槸鍚﹁繃鏈� + checkLoginExpiration() { + const expirationTime = uni.getStorageSync('jo_expiration_time'); + const currentTime = new Date().getTime(); + + // 濡傛灉娌℃湁璁剧疆杩囨湡鏃堕棿锛岃涓烘湭鐧诲綍 + if (!expirationTime) { + this.logout(); + return false; + } + + // 妫�鏌ユ槸鍚﹁繃鏈� + if (currentTime > expirationTime) { + uni.showToast({ + title: '鐧诲綍宸茶繃鏈燂紝璇烽噸鏂扮櫥褰�', + icon: 'none', + duration: 2000 + }); + this.logout(); + return false; + } + return true; + }, + hasLogin() { let haslogin = uni.getStorageSync('jo_user') if (haslogin == null || haslogin == "") { @@ -263,11 +283,19 @@ } }, + // 閫�鍑虹櫥褰� LastLogin() { - //uni.clearStorage(); + this.logout(); + }, + + // 缁熶竴鐨勯��鍑虹櫥褰曞鐞� + logout() { uni.removeStorageSync('jo_id_token'); uni.removeStorageSync('jo_user'); uni.removeStorageSync('jo_userImg'); + uni.removeStorageSync('jo_expiration_time'); // 娓呴櫎杩囨湡鏃堕棿 + this.userNickName = '璇风櫥褰�'; + this.src = ""; this.$u.route('/pages/login/login'); }, @@ -279,4 +307,4 @@ } }, }; -</script> \ No newline at end of file +</script> diff --git "a/\345\220\211\345\256\211PDA/pages/stash/raworderboxing.vue" "b/\345\220\211\345\256\211PDA/pages/stash/raworderboxing.vue" index 649ec54..5e9afbe 100644 --- "a/\345\220\211\345\256\211PDA/pages/stash/raworderboxing.vue" +++ "b/\345\220\211\345\256\211PDA/pages/stash/raworderboxing.vue" @@ -57,6 +57,7 @@ <view class="uni-note">鏁伴噺锛歿{item.quantity}}</view> <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view> <view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view> + <view class="uni-note">浜よ揣鍗曞彿锛歿{item.deliveryNote}}</view> </view> </view> </template> @@ -134,6 +135,7 @@ <view class="uni-note">鏁伴噺锛歿{item.quantity}}</view> <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view> <view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view> + <view class="uni-note">浜よ揣鍗曞彿锛歿{item.deliveryNote}}</view> </view> </view> </template> -- Gitblit v1.9.3