杨张扬
2025-06-05 ed4d2a10702e49c669f8a64e5508223dc5d4ab77
修改还剩几天过期字段为字符串
4个文件已修改
14 ■■■■ 已修改文件
api/ApiModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
core/Monitor.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/TN_InventoryM.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wms/LocationHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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";//班次
        }
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 == "过期");//已过期的货品,剩余天数改为0
                targetInM = db.Queryable<TN_InventoryM>().First(a => Convert.ToInt32(a.EXPIRATION_DAY) > 0 && a.ITEMSTATE == "过期");//已过期的货品,剩余天数改为0
                if (targetInM != null)
                {
                    targetInM.EXPIRATION_DAY = 0;
                    targetInM.EXPIRATION_DAY = "0";
                    db.Updateable<TN_InventoryM>(targetInM).UpdateColumns(it => new { it.EXPIRATION_DAY }).ExecuteCommand();
                }
models/TN_InventoryM.cs
@@ -57,6 +57,6 @@
        /// <summary>
        /// 距离过期还有几天
        /// </summary>
        public int EXPIRATION_DAY { get; set; } = 0;
        public string EXPIRATION_DAY { get; set; } = "0";
    }
}
wms/LocationHelper.cs
@@ -605,7 +605,7 @@
        public string rfId { get; set; }//容器号
        /// <summary>
        /// 0合格1待检2不合格,下线即待检,3过期,4技术合格,5混合,6一级料、7二级料
        /// 0合格1待检2不合格,3过期,4技术合格,5混合,6一级料、7二级料
        /// </summary>
        public int cgState { get; set; }//物料状态