浏览代码

添加检测升级的方法

章政 7 年之前
父节点
当前提交
938e2290f9
共有 1 个文件被更改,包括 17 次插入1 次删除
  1. 17 1
      UAS-MES/PublicMethod/LogicHandler.cs

+ 17 - 1
UAS-MES/PublicMethod/LogicHandler.cs

@@ -973,7 +973,7 @@ namespace UAS_MES.PublicMethod
                 }
                 else
                 {
-                    if (ifrework == "0")    
+                    if (ifrework == "0")
                         dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_status=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "' ");
                     else
                         dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_paststep = ms_paststep ||'," + StepCode + "',ms_reworkstatus=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
@@ -1334,6 +1334,22 @@ namespace UAS_MES.PublicMethod
         }
 
 
+        public static bool CheckUpdate()
+        {
+            string version = BaseUtil.GetCacheData("Version").ToString();
+            DataHelper dh = new DataHelper();
+            string LastVersion = dh.getFieldDataByCondition("configs", "code", "caller='CSUPDATE'").ToString();
+            if (version == LastVersion)
+            {
+                return false;
+            }
+            else
+            {
+                BaseUtil.SetCacheData("Version", LastVersion);
+                return true;
+            }
+        }
+
         /// <summary>
         /// 小箱装大箱的包装规则判断
         /// </summary>