Compare commits

...

2 Commits

Author SHA1 Message Date
李鹏飞 535156e260 Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN 2025-03-14 10:38:42 +08:00
李鹏飞 2d3c508193 1 2025-03-14 10:38:37 +08:00
4 changed files with 101 additions and 12 deletions

Binary file not shown.

View File

@ -0,0 +1,79 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\\u6570\u636E\\\u8BFA\u5FC5\u8FBE\\\u4E94\u73AF\\CNCEC_SUBQHSE_WUHUAN\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 1,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedHeight": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
},
{
"$type": "Bookmark",
"Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:132:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:133:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:134:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:1:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}"
},
{
"$type": "Bookmark",
"Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}"
},
{
"$type": "Bookmark",
"Name": "ST:2:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}"
},
{
"$type": "Bookmark",
"Name": "ST:3:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}"
}
]
}
]
}
]
}

View File

@ -59,10 +59,6 @@
"$type": "Bookmark", "$type": "Bookmark",
"Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" "Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
}, },
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{ {
"$type": "Bookmark", "$type": "Bookmark",
"Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}" "Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}"
@ -70,6 +66,14 @@
{ {
"$type": "Bookmark", "$type": "Bookmark",
"Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}" "Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{e1b7d1f8-9b3c-49b1-8f4f-bfc63a88835d}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
} }
] ]
} }

View File

@ -4,6 +4,7 @@ using System.DirectoryServices;
using System.Linq; using System.Linq;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using Newtonsoft.Json; using Newtonsoft.Json;
//using Microsoft.SqlServer.Dts.Runtime; //using Microsoft.SqlServer.Dts.Runtime;
@ -16,9 +17,12 @@ namespace BLL
private static Timer inOutTimer1; private static Timer inOutTimer1;
public static void StartInOutSync() public static async Task StartInOutSync()
{ {
ErrLogInfo.WriteLog("启用出入定时器开始!"); ErrLogInfo.WriteLog("启用出入定时器开始!");
// 停止并释放之前的定时器(如果存在)
if (inOutTimer1 != null) if (inOutTimer1 != null)
{ {
inOutTimer1.Stop(); inOutTimer1.Stop();
@ -26,24 +30,26 @@ namespace BLL
inOutTimer1 = null; inOutTimer1 = null;
} }
// 创建新的定时器
inOutTimer1 = new Timer inOutTimer1 = new Timer
{ {
AutoReset = true AutoReset = true,
Interval = 1000 * 60 * 10 // 60分钟
}; };
inOutTimer1.Elapsed += new ElapsedEventHandler(InOutProcess1);
inOutTimer1.Interval = 1000 * 60 * 10;// 60分钟 60000 * adTimeJ; // 使用异步事件处理方法
inOutTimer1.Elapsed += async (sender, e) => await InOutProcess1Async(sender, e);
// 启动定时器
inOutTimer1.Start(); inOutTimer1.Start();
ErrLogInfo.WriteLog("启用出入定时器结束!"); ErrLogInfo.WriteLog("启用出入定时器结束!");
} }
public static void InOutProcess1(object sender, ElapsedEventArgs e) public static async Task InOutProcess1Async(object sender, ElapsedEventArgs e)
{ {
ErrLogInfo.WriteLog("氟化工出入同步开始"); ErrLogInfo.WriteLog("氟化工出入同步开始");
try try