From ed4d2a10702e49c669f8a64e5508223dc5d4ab77 Mon Sep 17 00:00:00 2001 From: 杨张扬 <634643841@qq.com> Date: 星期四, 05 六月 2025 17:39:45 +0800 Subject: [PATCH] 修改还剩几天过期字段为字符串 --- wms/LocationHelper.cs | 2 +- core/Monitor.cs | 8 ++++---- models/TN_InventoryM.cs | 2 +- api/ApiModel.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/ApiModel.cs b/api/ApiModel.cs index 9c49c92..e05c371 100644 --- a/api/ApiModel.cs +++ b/api/ApiModel.cs @@ -460,7 +460,7 @@ { public string startLoc { get; set; }//璧风偣 public string endLoc { get; set; }//缁堢偣 - public int priority { get; set; }//浼樺厛绾�+ public int priority { get; set; } = 3;//浼樺厛绾� public string staff { get; set; } = "None";//鎿嶄綔浜� public string shift { get; set; } = "None";//鐝 } diff --git a/core/Monitor.cs b/core/Monitor.cs index af58528..43287a4 100644 --- a/core/Monitor.cs +++ b/core/Monitor.cs @@ -534,7 +534,7 @@ if (targetInM != null)//妫�祴鍑哄凡杩囨湡鐨勮揣鍝� { targetInM.ITEMSTATE = "杩囨湡"; - targetInM.EXPIRATION_DAY = 0; + targetInM.EXPIRATION_DAY = "0"; db.Updateable<TN_InventoryM>(targetInM).UpdateColumns(it => new { it.ITEMSTATE }).ExecuteCommand(); var cginfo = db.Queryable<TN_CG_Detail>().First(a => a.S_ID == targetInM.S_ID); @@ -548,14 +548,14 @@ if (targetInM != null)//妫�祴鍑哄揩杩囨湡鐨勮揣鍝� { - targetInM.EXPIRATION_DAY = SpecHelper.CalculateDaysDifference(System.DateTime.Now,targetInM.EXPIRATION); + targetInM.EXPIRATION_DAY = SpecHelper.CalculateDaysDifference(System.DateTime.Now,targetInM.EXPIRATION).ToString(); db.Updateable<TN_InventoryM>(targetInM).UpdateColumns(it => new { it.EXPIRATION_DAY }).ExecuteCommand(); } - targetInM = db.Queryable<TN_InventoryM>().First(a => a.EXPIRATION_DAY > 0 && a.ITEMSTATE == "杩囨湡");//宸茶繃鏈熺殑璐у搧锛屽墿浣欏ぉ鏁版敼涓� + targetInM = db.Queryable<TN_InventoryM>().First(a => Convert.ToInt32(a.EXPIRATION_DAY) > 0 && a.ITEMSTATE == "杩囨湡");//宸茶繃鏈熺殑璐у搧锛屽墿浣欏ぉ鏁版敼涓� if (targetInM != null) { - targetInM.EXPIRATION_DAY = 0; + targetInM.EXPIRATION_DAY = "0"; db.Updateable<TN_InventoryM>(targetInM).UpdateColumns(it => new { it.EXPIRATION_DAY }).ExecuteCommand(); } diff --git a/models/TN_InventoryM.cs b/models/TN_InventoryM.cs index 09b8f25..96f339f 100644 --- a/models/TN_InventoryM.cs +++ b/models/TN_InventoryM.cs @@ -57,6 +57,6 @@ /// <summary> /// 璺濈杩囨湡杩樻湁鍑犲ぉ /// </summary> - public int EXPIRATION_DAY { get; set; } = 0; + public string EXPIRATION_DAY { get; set; } = "0"; } } diff --git a/wms/LocationHelper.cs b/wms/LocationHelper.cs index d408404..2c22fba 100644 --- a/wms/LocationHelper.cs +++ b/wms/LocationHelper.cs @@ -605,7 +605,7 @@ public string rfId { get; set; }//瀹瑰櫒鍙� /// <summary> - /// 0鍚堟牸1寰呮2涓嶅悎鏍硷紝涓嬬嚎鍗冲緟妫�紝3杩囨湡锛�鎶�湳鍚堟牸锛�娣峰悎锛�涓�骇鏂欍�7浜岀骇鏂�+ /// 0鍚堟牸1寰呮2涓嶅悎鏍硷紝3杩囨湡锛�鎶�湳鍚堟牸锛�娣峰悎锛�涓�骇鏂欍�7浜岀骇鏂� /// </summary> public int cgState { get; set; }//鐗╂枡鐘舵� -- Gitblit v1.9.1