From ad92b901b491d5921dbca2e91b0aafe8e2a0a017 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 27 九月 2024 13:30:53 +0800
Subject: [PATCH] 客户来源选择“政府采购”的才必选“机构代理”,除“政府采购”以外的客户来源,机构代码不用必填  “自联系”改为“上门送样”;“在线”改为“线上校对”  1)所有订单类型中的“印件名称”再增加几个字的长度,现在的格子有段短 (2)所有新增订单均把“客户单位”和“客户级别”这两行改到最前面,原来的“订单类型”这一行自动成为第3行 (3)“交货时间”现在默认的是第2天,全部改为默认第3天 在订单管理的列表中增加“封签”,列表中没打印显示“打印”,打印了就打“√”  “订单管理”中,现在的“开票申请”栏目删除 生产安排中,生产“合版施工单”的前提必须是“订单类型”要相同,修改为不必相同。

---
 CY_ECommercePlatform/CY.WebForm/Global.asax.cs |  205 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 194 insertions(+), 11 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Global.asax.cs b/CY_ECommercePlatform/CY.WebForm/Global.asax.cs
index 943e38a..e9532fb 100644
--- a/CY_ECommercePlatform/CY.WebForm/Global.asax.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Global.asax.cs
@@ -24,7 +24,7 @@
             log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(Server.MapPath("~/config/log4net.config")));
             // 鍦ㄥ簲鐢ㄧ▼搴忓惎鍔ㄦ椂杩愯鐨勪唬鐮� 
             TimeTaskHelper.Instance().ExecuteTask += new System.Timers.ElapsedEventHandler(Global_ExecuteTask);
-            TimeTaskHelper.Instance().Interval = 1000*10;//琛ㄧず闂撮殧 1涓皬鏃�
+            TimeTaskHelper.Instance().Interval = 1000*3000;//琛ㄧず闂撮殧 1涓皬鏃�
             TimeTaskHelper.Instance().Start();
         }
         void Global_ExecuteTask(object sender, System.Timers.ElapsedEventArgs e)
@@ -33,7 +33,11 @@
 
             //杩欓噷鎵ц瀹氭椂浠诲姟
             DateTime time = DateTime.Now;
-            if (time.ToString("ddd HH") == "鍛ㄤ竴 00")
+            #region 鏈畬缁撳鎴蜂緥琛岀疆浣�
+
+           
+            var data = time.ToString("ddd HH");
+            if (data == "鍛ㄤ竴 1")
             {
 
                 Database DC = new Database();
@@ -67,6 +71,11 @@
 
 
             }
+
+            #endregion
+            #region 宸插畬缁撳鎴风淮鎶ょ疆浣�
+
+
             string strtime = time.ToString("MM dd HH");
             if (strtime == "01 01 01" || strtime == "04 01 01" || strtime == "07 01 01" || strtime == "10 01 01")
             {
@@ -94,13 +103,17 @@
                         DC.Connection.Close();
                 }
             }
+            #endregion
+            #region 鑺傛棩鎻愰啋缃綅
+
+
             ///浠ヤ笅涓鸿妭鏃ユ彁閱�
-            time.AddDays(20);
+           var date20days= time.AddDays(20);
 
             ChineseLunisolarCalendar chineseLunisolarCalendar = new ChineseLunisolarCalendar();
-            int lyear = chineseLunisolarCalendar.GetYear(time);
-            int lmonth = chineseLunisolarCalendar.GetMonth(time);
-            int lday = chineseLunisolarCalendar.GetDayOfMonth(time);
+            int lyear = chineseLunisolarCalendar.GetYear(date20days);
+            int lmonth = chineseLunisolarCalendar.GetMonth(date20days);
+            int lday = chineseLunisolarCalendar.GetDayOfMonth(date20days);
             //鑾峰彇闂版湀锛屻��0銆�鍒欒〃绀烘病鏈夐棸鏈�
             int leapMonth = chineseLunisolarCalendar.GetLeapMonth(lyear);
          
@@ -109,7 +122,7 @@
             {
 
                 Database DC = new Database();
-                string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [[JieJiaRiWiHu]] = 'true'";
+                string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'true'";
 
                 try
                 {
@@ -140,7 +153,7 @@
                 {
                     //涓鑺傛彁閱�
                     Database DC = new Database();
-                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [[JieJiaRiWiHu]] = 'true'";
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'true'";
 
                     try
                     {
@@ -168,7 +181,7 @@
                 {
                     //绔崍鑺�
                     Database DC = new Database();
-                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [[JieJiaRiWiHu]] = 'true'";
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'true'";
 
                     try
                     {
@@ -203,7 +216,7 @@
                 {
                     //涓鑺傛彁閱�
                     Database DC = new Database();
-                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [[JieJiaRiWiHu]] = 'true'";
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'true'";
 
                     try
                     {
@@ -234,7 +247,7 @@
                 {
                     //绔崍鑺�
                     Database DC = new Database();
-                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [[JieJiaRiWiHu]] = 'true'";
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'true'";
 
                     try
                     {
@@ -258,6 +271,176 @@
 
                 }
             }
+            #endregion
+            #region 鑺傛棩鎻愰啋杩囨湡缃綅鍙栨秷
+            ///浠ヤ笅涓鸿妭鏃ユ彁閱�
+           
+
+            ChineseLunisolarCalendar chineseLunisolarCalendar2 = new ChineseLunisolarCalendar();
+             lyear = chineseLunisolarCalendar2.GetYear(time);
+             lmonth = chineseLunisolarCalendar2.GetMonth(time);
+             lday = chineseLunisolarCalendar2.GetDayOfMonth(time);
+            //鑾峰彇闂版湀锛屻��0銆�鍒欒〃绀烘病鏈夐棸鏈�
+             leapMonth = chineseLunisolarCalendar.GetLeapMonth(lyear);
+
+
+            if (lmonth == 1 && lday == 1 && time.Hour == 1)
+            {
+
+                Database DC = new Database();
+                string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'false'";
+
+                try
+                {
+                    SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
+                    //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
+                    int a = myCmd.ExecuteNonQuery();
+                    //myDa.Dispose();                  
+
+
+                }
+                catch (Exception ee)
+                {
+                    new Log4NetAdapter().Log("鏄ヨ妭璁剧疆鎻愰啋閿欒 閿欒锛�" + ee.Message);
+
+                }
+                finally
+                {
+                    if (DC.Connection.State != System.Data.ConnectionState.Closed)
+                        DC.Connection.Close();
+                }
+
+                //鏄ヨ妭鎻愰啋
+            }
+
+            if (leapMonth == 0)
+            {
+                //娌℃湁闂版湀
+                if (lmonth == 8 && lday == 15 && time.Hour == 1)
+                {
+                    //涓鑺傛彁閱�
+                    Database DC = new Database();
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'false'";
+
+                    try
+                    {
+                        SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
+                        //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
+                        int a = myCmd.ExecuteNonQuery();
+                        //myDa.Dispose();                  
+
+
+                    }
+                    catch (Exception ee)
+                    {
+                        new Log4NetAdapter().Log("涓鑺傛彁閱掗敊璇� 閿欒锛�" + ee.Message);
+
+                    }
+                    finally
+                    {
+                        if (DC.Connection.State != System.Data.ConnectionState.Closed)
+                            DC.Connection.Close();
+                    }
+
+                }
+
+                if (lmonth == 5 && lday == 5 && time.Hour == 1)
+                {
+                    //绔崍鑺�
+                    Database DC = new Database();
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'false'";
+
+                    try
+                    {
+                        SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
+                        //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
+                        int a = myCmd.ExecuteNonQuery();
+                        //myDa.Dispose();                  
+
+
+                    }
+                    catch (Exception ee)
+                    {
+                        new Log4NetAdapter().Log("绔崍鑺傝缃彁閱掗敊璇� 閿欒锛�" + ee.Message);
+
+                    }
+                    finally
+                    {
+                        if (DC.Connection.State != System.Data.ConnectionState.Closed)
+                            DC.Connection.Close();
+                    }
+
+                }
+            }
+            else
+            {
+                //鏈夐棸鏈�
+               
+                int ms = 8;
+                if (leapMonth < 8)
+                    ms++;
+                if (lmonth == ms && lday == 15 && time.Hour == 1)
+                {
+                    //涓鑺傛彁閱�
+                    Database DC = new Database();
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'false'";
+
+                    try
+                    {
+                        SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
+                        //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
+                        int a = myCmd.ExecuteNonQuery();
+                        //myDa.Dispose();                  
+
+
+                    }
+                    catch (Exception ee)
+                    {
+                        new Log4NetAdapter().Log("涓鑺傝缃彁閱掗敊璇� 閿欒锛�" + ee.Message);
+
+                    }
+                    finally
+                    {
+                        if (DC.Connection.State != System.Data.ConnectionState.Closed)
+                            DC.Connection.Close();
+                    }
+
+                }
+
+                ms = 5;
+                if (leapMonth < 5)
+                    ms++;
+                if (lmonth == ms && lday == 5 && time.Hour == 1)
+                {
+                    //绔崍鑺�
+                    Database DC = new Database();
+                    string sqlStr = "USE [ECTEST]  UPDATE[dbo].[OA_CorporateClients] SET [JieJiaRiWiHu] = 'false'";
+
+                    try
+                    {
+                        SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
+                        //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
+                        int a = myCmd.ExecuteNonQuery();
+                        //myDa.Dispose();                  
+
+
+                    }
+                    catch (Exception ee)
+                    {
+                        new Log4NetAdapter().Log("绔崍鑺傝缃彁閱掗敊璇� 閿欒锛�" + ee.Message);
+
+                    }
+                    finally
+                    {
+                        if (DC.Connection.State != System.Data.ConnectionState.Closed)
+                            DC.Connection.Close();
+                    }
+
+                }
+            }
+
+
+            #endregion
 
         }
 

--
Gitblit v1.9.1