From 57c475ed168e905443eb2e34cc12a3d03fc355f6 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期四, 31 七月 2025 14:12:45 +0800
Subject: [PATCH] 增加九菱和凯贝的数据采集
---
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.exe | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs | 225 ++--
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.FileListAbsolute.txt | 18
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.pdb | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/Program.cs | 5
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.exe | 0
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache | 2
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferences.cache | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.FileListAbsolute.txt | 4
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe | 0
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe.manifest | 4
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.GenerateResource.cache | 0
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/app.publish/WFormSynchronizeData_SMR.exe | 0
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.pdb | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.Designer.cs | 331 +++++++
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.EquipmentCollectionForm_KB.resources | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.CoreCompileInputs.cache | 2
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.application | 2
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Config/SQLAPI.config | 11
WFormSynchronizeData_SMR/.vs/WFormSynchronizeData_SMR/v16/.suo | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.pdb | 0
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.application | 2
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe | 0
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.GenerateResource.cache | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_JiuLing.cs | 206 ++--
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.resx | 126 +++
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.pdb | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Vlog/2025-07-01.txt | 55 +
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe.manifest | 4
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cache | 0
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.csproj | 9
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.cs | 1479 +++++++++++++++++++++++++++++++++++
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs | 1
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.AssemblyReference.cache | 0
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.AssemblyReference.cache | 0
36 files changed, 2,275 insertions(+), 211 deletions(-)
diff --git a/WFormSynchronizeData_SMR/.vs/WFormSynchronizeData_SMR/v16/.suo b/WFormSynchronizeData_SMR/.vs/WFormSynchronizeData_SMR/v16/.suo
index c2dafa7..94cfa4c 100644
--- a/WFormSynchronizeData_SMR/.vs/WFormSynchronizeData_SMR/v16/.suo
+++ b/WFormSynchronizeData_SMR/.vs/WFormSynchronizeData_SMR/v16/.suo
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs
index 6a8d276..1b174bf 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs
@@ -40,10 +40,10 @@
this.txtHMaker.Text = "璇疯緭鍏ョ敤鎴风紪鐮�!";
bindCbox();
-
+
}
- private void btnBegin_Click(object sender, EventArgs e)
+ private void btnBegin_Click(object sender, EventArgs e)
{
if (this.txtHBathNo.Text == "" || this.txtHBathNo.ReadOnly == false)
//if (false)
@@ -119,7 +119,7 @@
",鏈夋棤铻虹墮妫�娴嬬粨鏋�:" + dt.Rows[i]["DetectionResult"].ToString() +
",鏃堕棿:" + dt.Rows[i]["HDate"].ToString());
}
-
+
}
}
}
@@ -175,7 +175,8 @@
for (int j = 0; j < 2; j++)
{
DateTime Now = DateTime.Parse(dt2.Rows[i][dt2.Columns[6]].ToString() + " " + dt2.Rows[i][dt2.Columns[7]].ToString());
- if (Now >= HBegin && Now <= HEnd) {
+ if (Now >= HBegin && Now <= HEnd)
+ {
DataRow dr = dt.NewRow();
dr["BottomHoleDiameter"] = dt2.Rows[i][dt2.Columns[j]].ToString();
dr["TestingData"] = dt2.Rows[i][dt2.Columns[j + 2]].ToString();
@@ -211,16 +212,18 @@
{
MessageBox.Show("璇疯緭鍏ュ埗鍗曚汉淇℃伅!");
}
- else {
+ else
+ {
Get_DisplayBard();
}
//this.txtHBathNo.ReadOnly = true;
-
+
}
}
//鏌ヨ鏉$爜鏁版嵁
- public void Get_DisplayBard() {
+ public void Get_DisplayBard()
+ {
string HBarCode = this.txtHBathNo.Text;
DataSet ds = oCN.RunProcReturn("select HBatchNo,m.HNumber,a.HMaterID from Gy_BarCodeBill a left join Gy_Material m on a.HMaterID = m.HItemID where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
@@ -228,7 +231,8 @@
{
MessageBox.Show("鏉$爜鏌ユ棤鏁版嵁!");
}
- else {
+ else
+ {
this.txtHBathNo.Text = ds.Tables[0].Rows[0]["HBatchNo"].ToString();
this.txtHMaterNumber.Text = ds.Tables[0].Rows[0]["HNumber"].ToString();
this.HMaterID.Text = ds.Tables[0].Rows[0]["HMaterID"].ToString();
@@ -262,7 +266,8 @@
{
DialogResult dr = MessageBox.Show("纭淇濆瓨?", "鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
- if (dr == DialogResult.Yes) {
+ if (dr == DialogResult.Yes)
+ {
string Url = DBHelper.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "Config/SQLAPI.config", "sUrl");
//閫氳繃鎺ュ彛 鑾峰彇token
@@ -287,12 +292,13 @@
}
//铻烘瘝鍏ㄦ淇濆瓨
- public async void SaveFullInspectionOfNuts(string token,string url) {
+ public async void SaveFullInspectionOfNuts(string token, string url)
+ {
try
{
-
+
//鑾峰彇鎵�鏈夎澶囨暟鎹�
- JsonEquipmentData jsonResult =await FindDeviceList(url, token);
+ JsonEquipmentData jsonResult = await FindDeviceList(url, token);
if (jsonResult.code != "0")
{
@@ -321,7 +327,8 @@
this.btnSave.Enabled = true;
MessageBox.Show("鏁伴噺鑾峰彇鎶ラ敊:" + jsonResult.message);
}
- else {
+ else
+ {
double HInSpectQty = 0;//妫�楠屾暟閲�
double HRightQty = 0;//鍚堟牸
double HUnRightQty = 0;//涓嶅悎鏍�
@@ -373,7 +380,8 @@
this.btnSave.Enabled = true;
MessageBox.Show("鐢熶骇璧勬簮鏌ユ棤鏁版嵁!");
}
- else {
+ else
+ {
HSourceID = int.Parse(dsSouce.Tables[0].Rows[0]["HItemID"].ToString());
@@ -413,7 +421,7 @@
//鍒嗘瀽鏂规硶 涓哄畾閲忓垎鏋�
if (HAnalysisMethod == "2")
{
- //鑾峰彇涓婇檺
+ //鑾峰彇涓婇檺
HUpLimit = decimal.Parse(dataSet.Tables[0].Rows[i]["HTargetVal"].ToString()) + decimal.Parse(dataSet.Tables[0].Rows[i]["HUpLimit"].ToString());
//鑾峰彇涓嬮檺
HDownLimit = decimal.Parse(dataSet.Tables[0].Rows[i]["HTargetVal"].ToString()) + decimal.Parse(dataSet.Tables[0].Rows[i]["HDownLimit"].ToString());
@@ -581,13 +589,13 @@
}
}
- /// <summary>
- /// 鑾峰彇璁惧鍒楄〃
- /// </summary>
- /// <param name="url"></param>
- /// <param name="postData"></param>
- /// <returns></returns>
- public async Task<JsonEquipmentData> EquipmentList(string url, StringContent postData,string Type)
+ /// <summary>
+ /// 鑾峰彇璁惧鍒楄〃
+ /// </summary>
+ /// <param name="url"></param>
+ /// <param name="postData"></param>
+ /// <returns></returns>
+ public async Task<JsonEquipmentData> EquipmentList(string url, StringContent postData, string Type)
{
// 鍒涘缓 HttpClient 瀹炰緥
@@ -606,8 +614,8 @@
// 鍙戣捣 get 璇锋眰
response = await client.GetAsync(url);
}
-
-
+
+
// 纭繚璇锋眰鎴愬姛
if (response.IsSuccessStatusCode)
{
@@ -617,7 +625,7 @@
}
else
{
- MessageBox.Show($"璇锋眰澶辫触锛�: {response.StatusCode}");
+ MessageBox.Show($"璇锋眰澶辫触锛歿response.StatusCode} - {url} - 褰撳墠鏃堕棿锛歿DateTime.Now:yyyy-MM-dd HH:mm:ss}");
}
}
@@ -659,7 +667,7 @@
}
else
{
- MessageBox.Show($"璇锋眰澶辫触锛�: {response.StatusCode}");
+ MessageBox.Show($"璇锋眰澶辫触锛歿response.StatusCode} - {url} - 褰撳墠鏃堕棿锛歿DateTime.Now:yyyy-MM-dd HH:mm:ss}");
}
}
@@ -688,7 +696,8 @@
}
//鑾峰彇璁惧鍒楄〃
- public async Task<JsonEquipmentData> FindDeviceList(string url,string token) {
+ public async Task<JsonEquipmentData> FindDeviceList(string url, string token)
+ {
//璁惧鍒楄〃鎺ュ彛
string urls = url + EquipmentType.Two;
// 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
@@ -698,7 +707,7 @@
}
//鑾峰彇鑹搧銆佷笉鑹搧鏄庣粏
- public async Task<JsonEquipmentData> FindAllDevicePropsDetailByTimeRange(string url, string token,string nos, string HBegin, string HEnd)
+ public async Task<JsonEquipmentData> FindAllDevicePropsDetailByTimeRange(string url, string token, string nos, string HBegin, string HEnd)
{
string basePropIds = DBHelper.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "Config/SQLAPI.config", "basePropIds");
basePropIds = "[" + basePropIds + "]";
@@ -707,7 +716,7 @@
//璁惧鍒楄〃鎺ュ彛
string urls = url + EquipmentType.Nine;
- CustomWriteLog("鑾峰彇宸ヨ壓鍙傛暟鎺ュ彛锛�'"+ urls + "'", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ CustomWriteLog("宸ヨ壓鍙傛暟鎺ュ彛锛�'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
// 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
@@ -716,11 +725,12 @@
}
//鑾峰彇涓嶈壇鏁帮紝鍚堟暟鏁帮紝鍙枒鏁� 鎬绘暟
- public async Task<JsonEquipmentData> FindDevicePropCalc(string url, string token,string nos,string HBegin,string HEnd)
+ public async Task<JsonEquipmentData> FindDevicePropCalc(string url, string token, string nos, string HBegin, string HEnd)
{
string stringJson = "{\"token\":\"" + token + "\",\"deviceNo\":\"" + nos + "\",\"propIds\":[606,173,469,470],\"beginTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType.Seven;
+ CustomWriteLog("鑾峰彇涓嶈壇鏁帮紝鍚堟暟鏁帮紝鍙枒鏁� 鎬绘暟锛�'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonEquipmentData jsonResult = await EquipmentList(urls, postData, "POST");
return jsonResult;
}
@@ -734,6 +744,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"nos\":[" + nos + "]}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType.Three;
+ CustomWriteLog("璁惧杩愯鐘舵�侊細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonEquipmentData jsonResult = await EquipmentList(urls, postData, "POST");
return jsonResult;
}
@@ -746,6 +757,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"nos\":[" + nos + "],\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType.Four;
+ CustomWriteLog("璁惧鏃堕棿娈典骇閲忥細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonEquipmentData jsonResult = await EquipmentList(urls, postData, "POST");
return jsonResult;
}
@@ -758,6 +770,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"no\":" + nos + ",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType.Five;
+ CustomWriteLog("璁惧杩愯鏃堕棿鎺ュ彛锛�'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonResult jsonResult = await EquipResultList(urls, postData, "POST");
return jsonResult;
}
@@ -770,6 +783,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"no\":" + nos + ",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType.Ten;
+ CustomWriteLog("娉ㄥ鏈虹殑 寮�鏈烘帴鍙o細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonResult jsonResult = await EquipResultList(urls, postData, "POST");
return jsonResult;
}
@@ -779,7 +793,7 @@
private void bindCbox()
{
IList<Info> infoList = new List<Info>();
- Info info1 = new Info() { Id = "CMR-QC-SE-001", Name = "铻烘瘝鍏ㄦ" };
+ Info info1 = new Info() { Id = "CMR-QC-SE-001", Name = "铻烘瘝鍏ㄦ" };
Info info2 = new Info() { Id = "CMR-ZZ-SE-001", Name = "铻烘瘝鍘嬭" };
Info info3 = new Info() { Id = "ZSJ07", Name = "娉ㄥ鏈�#07" };
//Info info3 = new Info() { Id = "3", Name = "鐜嬩簲" };
@@ -801,7 +815,7 @@
this.btnLj.Enabled = true;
this.timer.Enabled = false;
}
- else
+ else
{
this.btnLj.Enabled = false;
DialogResult dr = MessageBox.Show("鏄惁纭寮�濮嬮噰闆�?", "鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
@@ -849,7 +863,8 @@
}
//铻烘瘝鍘嬭閲囬泦鏁版嵁 淇濆瓨
- public async void SaveNutPressFit(string Url , string token, string time) {
+ public async void SaveNutPressFit(string Url, string token, string time)
+ {
if (TimeDate == "")
{
TimeDate = this.txtBegin.Text;
@@ -863,7 +878,7 @@
}
else
{
- string nos = "";
+ string nos = "";
//鑾峰彇鍘昏澶囩紪鐮�
for (int i = 0; i < jsonResult.data.Count; i++)
{
@@ -905,8 +920,8 @@
//鍚堟牸鏁�
if (jsonEquipment.data[i].propId == 469)
{
- JsonData += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鑹搧鏁癨",\"HResult\":\"OK\",\"HCount\":" + jsonEquipment.data[i].sum + ",\"HSourceCode\":\""+ nos + "\"},";
- }
+ JsonData += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鑹搧鏁癨",\"HResult\":\"OK\",\"HCount\":" + jsonEquipment.data[i].sum + ",\"HSourceCode\":\"" + nos + "\"},";
+ }
//涓嶈壇鏁�
else if (jsonEquipment.data[i].propId == 470)
{
@@ -925,25 +940,22 @@
}
//娉ㄥ鏈洪噰闆嗘暟鎹� 淇濆瓨
- public async void SaveInjectionMoldingMachine(string token, string Url, string time)
+ public async void SaveInjectionMoldingMachine(string token, string Url, string time)
{
ListData.Items.Clear();
if (TimeDate == "")
{
TimeDate = this.txtBegin.Text;
}
- //this.timer.Enabled = false;
-
- //TimeDate = "2025-02-10 13:10:50";
- //time = "2025-02-10 13:11:50";
-
+
//鑾峰彇鎵�鏈夎澶囨暟鎹�
JsonEquipmentData jsonResult = await FindDeviceList(Url, token);
if (jsonResult.code != "0")
{
MessageBox.Show("璁惧鍒楄〃鎶ラ敊:" + jsonResult.message);
}
- else {
+ else
+ {
string nos = "";
//鑾峰彇璁惧缂栫爜
@@ -962,26 +974,25 @@
nos = nos.Substring(0, nos.Length - 1);
//鑾峰彇鍙傛暟 鑾峰彇姣忎釜璁惧瀵瑰簲鐨勬墍鏈夊弬鏁�
JsonEquipmentData jsonEquipment = await FindAllDevicePropsDetailByTimeRange(Url, token, nos, TimeDate, time);
+ var JsonData = "{\"data\":[";
if (jsonEquipment == null)
{
- CustomWriteLog("jsonEquipment瀵硅薄涓虹┖", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ CustomWriteLog("jsonEquipment瀵硅薄涓虹┖", DateTime.Now.ToString("yyyy-MM-dd"));
}
if (jsonEquipment.data == null)
{
- CustomWriteLog("data灞炴�т负绌�",DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ CustomWriteLog("jsonEquipment.data灞炴�т负绌�", DateTime.Now.ToString("yyyy-MM-dd"));
}
-
- var JsonData = "{\"data\":[";
- CustomWriteLog("寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細锛�'" + jsonEquipment.data.Count + "'", DateTime.Now.ToString("yyyy-MM-dd"));
-
- try
+ else
{
+ CustomWriteLog("寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細锛�'" + jsonEquipment.data.Count + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+
//閫氳繃姣忎釜璁惧杩涜寰幆璧嬪��
for (int i = 0; i < jsonEquipment.data.Count; i++)
{
- CustomWriteLog("褰撳墠寰幆 绗� '"+i+"' 娆�", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ CustomWriteLog("褰撳墠寰幆 绗� '" + i + "' 娆�", DateTime.Now.ToString("yyyy-MM-dd"));
//鑾峰彇璁惧瀵瑰簲鐨勭紪鐮� 鍒ゆ柇缂栫爜鏄惁婊¤冻涓鸿灪姣嶅帇瑁呰澶�
if (jsonEquipment.data[i].deviceNo.Contains("CMR-ZZ-SE-"))
{
@@ -1037,27 +1048,26 @@
for (int k = 0; k < jsonEquipment.data[i].props[j].datas.Count; k++)
{
JsonData += "{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
- CustomWriteLog("宸ヨ壓鍙傛暟鍏蜂綋鍊硷細{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ //CustomWriteLog("宸ヨ壓鍙傛暟鍏蜂綋鍊硷細{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd"));
}
}
//鑾峰彇璁惧鏃堕棿娈典骇閲�
- JsonEquipmentData data = await FindProdByNosAndTime(Url, token, jsonEquipment.data[i].deviceNo, TimeDate, time);
+ JsonEquipmentData data = await FindProdByNosAndTime(Url, token, jsonEquipment.data[i].deviceNo, TimeDate, time);
for (int j = 0; j < data.data.Count; j++)
{
JsonData += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
- CustomWriteLog("璁惧浜ч噺鍊硷細{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ //CustomWriteLog("璁惧浜ч噺鍊硷細{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd"));
}
}
}
- }
- catch (Exception ex)
- {
- CustomWriteLog("EXCEPTION_CAUGHT", $"{DateTime.Now:yyyy-MM-dd HH:mm:ss} - 寮傚父淇℃伅锛歿ex.ToString()}");
- }
- CustomWriteLog("宸ヨ壓鍙傛暟涓庝骇閲忓惊鐜粨鏉�", DateTime.Now.ToString("yyyy-MM-dd"));
+ CustomWriteLog("宸ヨ壓鍙傛暟涓庝骇閲忓惊鐜粨鏉�", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+
+ CustomWriteLog("1", DateTime.Now.ToString("yyyy-MM-dd"));
+
//鑾峰彇璁惧杩愯鐘舵��
var EquipmentStaus = await FindDeviceStatusByNos(Url, token, nos);
@@ -1066,55 +1076,47 @@
{
//鍗风粫 娉ㄥ 娴告笉 缁勮 鐨勮澶囪繍琛� 寮�鍏冲仠鏈烘椂闂�
if (EquipmentStaus.data[i].no.Contains("CMR-JR-SD-") || EquipmentStaus.data[i].no.Contains("CMR-JZ-SD-") || EquipmentStaus.data[i].no.Contains("CMR-HX-SD-")
- || EquipmentStaus.data[i].no.Contains("CMR-ZD-SD")|| EquipmentStaus.data[i].no.Contains("CMR-ZS-SE-"))
+ || EquipmentStaus.data[i].no.Contains("CMR-ZD-SD") || EquipmentStaus.data[i].no.Contains("CMR-ZS-SE-"))
{
string HBegDate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
string HEndDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:00");
- if (DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd") != DateTime.Parse(HEndDate).ToString("yyyy-MM-dd")) {
- HEndDate= DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd HH:mm:00");
+ if (DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd") != DateTime.Parse(HEndDate).ToString("yyyy-MM-dd"))
+ {
+ HEndDate = DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd HH:mm:00");
}
JsonResult HEqDate = await FindDeviceStatusTimeByNo(Url, token, EquipmentStaus.data[i].no, HBegDate, HEndDate);
+ if (HEqDate != null && HEqDate.data != null)
+ {
- // 璁板綍寮�鏈烘椂闀�
- CustomWriteLog("璁惧寮�鏈烘椂闀�: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ // 璁板綍寮�鏈烘椂闀�
+ CustomWriteLog("璁惧寮�鏈烘椂闀�: 寮�鏈烘椂闀�" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
- // 璁板綍鍏虫満鏃堕暱
- CustomWriteLog("璁惧鍏虫満鏃堕暱: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ // 璁板綍鍏虫満鏃堕暱
+ CustomWriteLog("璁惧鍏虫満鏃堕暱: 鍏虫満鏃堕暱" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
- // 璁板綍鍋滄満鏃堕暱
- CustomWriteLog("璁惧鍋滄満鏃堕暱: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ // 璁板綍鍋滄満鏃堕暱
+ CustomWriteLog("璁惧鍋滄満鏃堕暱: 鍋滄満鏃堕暱" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
- // 璁板綍杩愯鏃堕暱
- CustomWriteLog("璁惧杩愯鏃堕暱: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ // 璁板綍杩愯鏃堕暱
+ CustomWriteLog("璁惧杩愯鏃堕暱: 杩愯鏃堕暱" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
- JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ }
+ else
+ {
+ // 璁板綍杩愯鏃堕暱
+ CustomWriteLog("璁惧寮�鍋滄満鏃堕暱涓虹┖ HEqDate锛�" + HEqDate + " , HEqDate.data " + HEqDate.data + "", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
}
- //鍗风粫 娉ㄥ 娴告笉 缁勮 鐨勮澶囪繍琛� 寮�鍏冲仠鏈烘椂闂�
- //if (EquipmentStaus.data[i].no.Contains("CMR-ZS-SE-"))
- //{
- // string HBegDate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
- // string HEndDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
-
- // JsonResult kj = await FindDeviceStatusTimeByNosAndOperationMode(Url, token, EquipmentStaus.data[i].no, HBegDate, HEndDate);
- // JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(kj.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
-
- // JsonResult HEqDate = await FindDeviceStatusTimeByNo(Url, token, EquipmentStaus.data[i].no, HBegDate, HEndDate);
-
- // JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- // JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- // JsonData += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- //}
-
-
string staus = "";
switch (EquipmentStaus.data[i].status)
{
@@ -1177,18 +1179,18 @@
}
//鏁版嵁淇濆瓨
- public void DataSave(string JsonData) {
- JsonEquipmentData data = JsonConvert.DeserializeObject<JsonEquipmentData>(JsonData);
+ public void DataSave(string JsonData)
+ {
+ JsonEquipmentData data = JsonConvert.DeserializeObject<JsonEquipmentData>(JsonData);
for (int i = 0; i < data.data.Count; i++)
{
oCN.RunProc(@"insert into Sb_EquipMentCollectionTechParam_Temp(HDate,HSourceCode,HTechParamID,HTechParamName,HCount
,HCreateTime,HResult,HProcNumber,HFlag)
-values(getdate(),'"+ data.data[i].HSourceCode + "',0,'" + data.data[i].HTechParamName + "'," + data.data[i].HCount
+values(getdate(),'" + data.data[i].HSourceCode + "',0,'" + data.data[i].HTechParamName + "'," + data.data[i].HCount
+ ",'" + data.data[i].HDate + "','" + data.data[i].HResult + "','" + data.data[i].HProcNumber + "',0)");
-
- ListData.Items.Add("鏃堕棿:" + data.data[i].HDate +",宸ヨ壓鍙傛暟:" + data.data[i].HTechParamName +",宸ヨ壓鍙傛暟鍊�:" + data.data[i].HResult);
}
+ ListData.Items.Add($"鏃堕棿: {DateTime.Now:yyyy-MM-dd HH:mm:ss}锛屽姞杞芥垚鍔�");
}
//瀹氭椂鐢熸垚浜ч噺姹囨姤鍗�
@@ -1233,10 +1235,10 @@
nos = nos.Substring(0, nos.Length - 1);
//this.Time_CLHB.Enabled = false;
-
+ CustomWriteLog("浜ч噺姹囨姤鍗曪紝璁惧缂栫爜锛�'" + nos + "'", DateTime.Now.ToString("yyyy-MM-dd"));
//鏌ヨ寮�宸ョ殑璁惧淇℃伅 浠ュ強 鏌ヨ褰撳ぉ璁惧瀵瑰簲鐨勫紑宸ユ椂闂� 鍜屽畬宸ユ椂闂�
DataSet ds = oCN.RunProcReturn("exec h_p_Sc_TimeICMOReporList '" + nos + "'", "h_p_Sc_TimeICMOReporList");
-
+
if (ds.Tables[0].Rows.Count > 0)
{
//鏍规嵁褰撳ぉ鍙紑宸ユ病鏈夊畬宸ュ搴旂殑浜ч噺鏁版嵁 鐢熸垚浜ч噺姹囨姤鍗�
@@ -1248,14 +1250,16 @@
string HBegDate = DateTime.Parse(dt.Rows[i]["鏃ユ湡"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
string HEndDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
jsonEquipment = await FindProdByNosAndTime(Url, token, nos, HBegDate, HEndDate);
- if (decimal.Parse(jsonEquipment.data[0].prod) > 0) {
+ if (decimal.Parse(jsonEquipment.data[0].prod) > 0)
+ {
//鐢熸垚浜ч噺姹囨姤鍗�
- oCN.RunProc("exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod+",'"+ HEndDate + "'");
+ oCN.RunProc("exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "'");
+ CustomWriteLog("鐢熸垚浜ч噺姹囨姤鍗�1锛�'exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "''", DateTime.Now.ToString("yyyy-MM-dd"));
}
}
}
if (ds.Tables[1].Rows.Count > 0)
- {
+ {
//鏍规嵁褰撳ぉ寮�宸ュ苟涓斿畬宸ュ搴旂殑浜ч噺鏁版嵁 鐢熸垚浜ч噺姹囨姤鍗�
DataTable dt = ds.Tables[1];
for (int i = 0; i < dt.Rows.Count; i++)
@@ -1269,6 +1273,7 @@
{
//鐢熸垚浜ч噺姹囨姤鍗�
oCN.RunProc("exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "'");
+ CustomWriteLog("鐢熸垚浜ч噺姹囨姤鍗�2锛�'exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "''", DateTime.Now.ToString("yyyy-MM-dd"));
}
}
}
@@ -1388,7 +1393,8 @@
}
- public class JsonResult {
+ public class JsonResult
+ {
public string code { get; set; }
public string message { get; set; }
public string expirationTime { get; set; }
@@ -1435,7 +1441,7 @@
public double sum { get; set; }
public string createTime { get; set; }
public string happenTime { get; set; }
- public string HDate{ get; set; }
+ public string HDate { get; set; }
public string HTechParamName { get; set; }
public string HResult { get; set; }
public string HCount { get; set; }
@@ -1443,7 +1449,8 @@
public string HProcNumber { get; set; }
}
- public class propsData {
+ public class propsData
+ {
public string propName { get; set; }
public List<JsonData> datas { get; set; }
public string basePropId { get; set; }
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.csproj b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.csproj
index 7b26cba..ca71abe 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.csproj
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.csproj
@@ -67,6 +67,12 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DBHelper.cs" />
+ <Compile Include="EquipmentCollectionForm_KB.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="EquipmentCollectionForm_KB.Designer.cs">
+ <DependentUpon>EquipmentCollectionForm_KB.cs</DependentUpon>
+ </Compile>
<Compile Include="EquipmentCollectionForm_JiuLing.cs">
<SubType>Form</SubType>
</Compile>
@@ -82,6 +88,9 @@
<Compile Include="json.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="EquipmentCollectionForm_KB.resx">
+ <DependentUpon>EquipmentCollectionForm_KB.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="EquipmentCollectionForm_JiuLing.resx">
<DependentUpon>EquipmentCollectionForm_JiuLing.cs</DependentUpon>
</EmbeddedResource>
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_JiuLing.cs b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_JiuLing.cs
index 0e48dd5..3283228 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_JiuLing.cs
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_JiuLing.cs
@@ -625,7 +625,7 @@
}
else
{
- MessageBox.Show($"璇锋眰澶辫触锛�: {response.StatusCode}");
+ MessageBox.Show($"璇锋眰澶辫触锛歿response.StatusCode} - {url} - 褰撳墠鏃堕棿锛歿DateTime.Now:yyyy-MM-dd HH:mm:ss}");
}
}
@@ -667,7 +667,7 @@
}
else
{
- MessageBox.Show($"璇锋眰澶辫触锛�: {response.StatusCode}");
+ MessageBox.Show($"璇锋眰澶辫触锛歿response.StatusCode} - {url} - 褰撳墠鏃堕棿锛歿DateTime.Now:yyyy-MM-dd HH:mm:ss}");
}
}
@@ -700,6 +700,7 @@
{
//璁惧鍒楄〃鎺ュ彛
string urls = url + EquipmentType_JL.Two;
+ CustomWriteLog("璁惧鍒楄〃鎺ュ彛锛�'" + urls + "'", DateTime.Now.ToString("yyyy-MM-dd"));
// 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
var postData = new StringContent("{\"token\":\"" + token + "\"}", System.Text.Encoding.UTF8, "application/json");
JsonEquipmentData_JL jsonResult = await EquipmentList(urls, postData, "POST");
@@ -712,10 +713,12 @@
string basePropIds = DBHelper.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "Config/SQLAPI.config", "basePropIds");
basePropIds = "[" + basePropIds + "]";
nos = nos.Replace(",", "\",\"");
- string stringJson = "{\"token\":\"" + token + "\",\"deviceNos\":[\"" + nos + "\"],\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\",\"basePropIds\":" + basePropIds + "}";
+ //20250723 鍙戠幇鏈夌殑瀹㈡埛鏁伴噰娌℃湁閲囬泦宸ヨ壓鍙傛暟 濡傛灉浼犲叆瀵瑰簲鐨� 璁惧缂栧彿 浼氬鑷� 璇锋眰澶辫触 浼犲叆鍙傛暟ID 涔熷彲浠ヨ幏鍙栧埌瀵瑰簲鐨勮澶� 杩欐牱涓嶄細 璇锋眰澶辫触
+ //string stringJson = "{\"token\":\"" + token + "\",\"deviceNos\":[\"" + nos + "\"],\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\",\"basePropIds\":" + basePropIds + "}";
+ string stringJson = "{\"token\":\"" + token + "\",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\",\"basePropIds\":" + basePropIds + "}";
//璁惧鍒楄〃鎺ュ彛
string urls = url + EquipmentType_JL.Nine;
- CustomWriteLog("鑾峰彇宸ヨ壓鍙傛暟鎺ュ彛锛�'" + urls + "'", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ CustomWriteLog("宸ヨ壓鍙傛暟鎺ュ彛锛�'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
// 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
JsonEquipmentData_JL jsonEquipment = await EquipmentList(urls, postData, "POST");
@@ -728,6 +731,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"deviceNo\":\"" + nos + "\",\"propIds\":[606,173,469,470],\"beginTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType_JL.Seven;
+ CustomWriteLog("鑾峰彇涓嶈壇鏁帮紝鍚堟暟鏁帮紝鍙枒鏁� 鎬绘暟锛�'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonEquipmentData_JL jsonResult = await EquipmentList(urls, postData, "POST");
return jsonResult;
}
@@ -741,6 +745,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"nos\":[" + nos + "]}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType_JL.Three;
+ CustomWriteLog("璁惧杩愯鐘舵�侊細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonEquipmentData_JL jsonResult = await EquipmentList(urls, postData, "POST");
return jsonResult;
}
@@ -753,6 +758,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"nos\":[" + nos + "],\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType_JL.Four;
+ CustomWriteLog("璁惧鏃堕棿娈典骇閲忥細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonEquipmentData_JL jsonResult = await EquipmentList(urls, postData, "POST");
return jsonResult;
}
@@ -765,6 +771,8 @@
string stringJson = "{\"token\":\"" + token + "\",\"no\":" + nos + ",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType_JL.Five;
+ // 璁板綍寮�鏈烘椂闀�
+ CustomWriteLog("璁惧杩愯鏃堕棿鎺ュ彛锛�'"+ urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonResult_JL jsonResult = await EquipResultList(urls, postData, "POST");
return jsonResult;
}
@@ -777,6 +785,7 @@
string stringJson = "{\"token\":\"" + token + "\",\"no\":" + nos + ",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
string urls = url + EquipmentType_JL.Ten;
+ CustomWriteLog("娉ㄥ鏈虹殑 寮�鏈烘帴鍙o細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
JsonResult_JL jsonResult = await EquipResultList(urls, postData, "POST");
return jsonResult;
}
@@ -968,40 +977,42 @@
//鑾峰彇鍙傛暟 鑾峰彇姣忎釜璁惧瀵瑰簲鐨勬墍鏈夊弬鏁�
JsonEquipmentData_JL jsonEquipment = await FindAllDevicePropsDetailByTimeRange(Url, token, nos, TimeDate, time);
+ var JsonData_JL = "{\"data\":[";
+
if (jsonEquipment == null)
{
- CustomWriteLog("jsonEquipment瀵硅薄涓虹┖", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ CustomWriteLog("jsonEquipment瀵硅薄涓虹┖", DateTime.Now.ToString("yyyy-MM-dd"));
}
-
if (jsonEquipment.data == null)
{
- CustomWriteLog("data灞炴�т负绌�", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ CustomWriteLog("data灞炴�т负绌�", DateTime.Now.ToString("yyyy-MM-dd"));
}
-
- var JsonData_JL = "{\"data\":[";
- CustomWriteLog("寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細锛�'" + jsonEquipment.data.Count + "'", DateTime.Now.ToString("yyyy-MM-dd"));
-
- //閫氳繃姣忎釜璁惧杩涜寰幆璧嬪��
- for (int i = 0; i < jsonEquipment.data.Count; i++)
+ else
{
- //寰幆 铻烘瘝鍘嬭璁惧瀵瑰簲鐨勬墍鏈夊伐鑹哄弬鏁�
- for (int j = 0; j < jsonEquipment.data[i].props.Count; j++)
+ CustomWriteLog("寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細'" + jsonEquipment.data.Count + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ //閫氳繃姣忎釜璁惧杩涜寰幆璧嬪��
+ for (int i = 0; i < jsonEquipment.data.Count; i++)
{
- //寰幆 姣忎釜鍙傛暟瀵瑰簲鐨勬墍鏈夋暟鎹�
- for (int k = 0; k < jsonEquipment.data[i].props[j].datas.Count; k++)
+ //寰幆 铻烘瘝鍘嬭璁惧瀵瑰簲鐨勬墍鏈夊伐鑹哄弬鏁�
+ for (int j = 0; j < jsonEquipment.data[i].props.Count; j++)
{
- JsonData_JL += "{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
- CustomWriteLog("宸ヨ壓鍙傛暟鍏蜂綋鍊硷細{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ //寰幆 姣忎釜鍙傛暟瀵瑰簲鐨勬墍鏈夋暟鎹�
+ for (int k = 0; k < jsonEquipment.data[i].props[j].datas.Count; k++)
+ {
+ JsonData_JL += "{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
+ //CustomWriteLog("宸ヨ壓鍙傛暟鍏蜂綋鍊硷細{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
}
- }
- //鑾峰彇璁惧鏃堕棿娈典骇閲�
- JsonEquipmentData_JL data = await FindProdByNosAndTime(Url, token, jsonEquipment.data[i].deviceNo, TimeDate, time);
- for (int j = 0; j < data.data.Count; j++)
- {
+ //鑾峰彇璁惧鏃堕棿娈典骇閲�
+ JsonEquipmentData_JL data = await FindProdByNosAndTime(Url, token, jsonEquipment.data[i].deviceNo, TimeDate, time);
+ for (int j = 0; j < data.data.Count; j++)
+ {
- JsonData_JL += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
- CustomWriteLog("{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd"));
+ JsonData_JL += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
+ //CustomWriteLog("{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
}
}
@@ -1009,75 +1020,96 @@
//鑾峰彇璁惧杩愯鐘舵��
var EquipmentStaus = await FindDeviceStatusByNos(Url, token, nos);
-
- for (int i = 0; i < EquipmentStaus.data.Count; i++)
+ if (EquipmentStaus == null)
{
- //鍗风粫 娉ㄥ 娴告笉 缁勮 鐨勮澶囪繍琛� 寮�鍏冲仠鏈烘椂闂�
- if (EquipmentStaus.data[i].no.Contains("JS_RX_") || EquipmentStaus.data[i].no.Contains("JS_HX_") || EquipmentStaus.data[i].no.Contains("JS_LS_")
- || EquipmentStaus.data[i].no.Contains("JS_YL_") || EquipmentStaus.data[i].no.Contains("JS_M2_") || EquipmentStaus.data[i].no.Contains("JS_ZS_"))
+ CustomWriteLog("EquipmentStaus瀵硅薄涓虹┖", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ if (EquipmentStaus.data == null)
+ {
+ CustomWriteLog("data灞炴�т负绌�", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ else
+ {
+ for (int i = 0; i < EquipmentStaus.data.Count; i++)
{
- string HBegDate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
- string HEndDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:00");
-
- if (DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd") != DateTime.Parse(HEndDate).ToString("yyyy-MM-dd"))
+ //鍗风粫 娉ㄥ 娴告笉 缁勮 鐨勮澶囪繍琛� 寮�鍏冲仠鏈烘椂闂�
+ if (EquipmentStaus.data[i].no.Contains("JS-MZ-") || EquipmentStaus.data[i].no.Contains("JS_LS_") || EquipmentStaus.data[i].no.Contains("JL_E_")
+ || EquipmentStaus.data[i].no.Contains("JL_") || EquipmentStaus.data[i].no.Contains("JL_A_") || EquipmentStaus.data[i].no.Contains("JL_B_")
+ || EquipmentStaus.data[i].no.Contains("JL_3_") || EquipmentStaus.data[i].no.Contains("JL_2_") || EquipmentStaus.data[i].no.Contains("JL_1_")
+ || EquipmentStaus.data[i].no.Contains("JS_RX_") || EquipmentStaus.data[i].no.Contains("JS_ZS_") || EquipmentStaus.data[i].no.Contains("JS_YL_")
+ || EquipmentStaus.data[i].no.Contains("JS_HX_") || EquipmentStaus.data[i].no.Contains("JS_LS_30_") || EquipmentStaus.data[i].no.Contains("JS_M2_"))
{
- HEndDate = DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd HH:mm:00");
+ string HBegDate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
+ string HEndDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:00");
+
+ if (DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd") != DateTime.Parse(HEndDate).ToString("yyyy-MM-dd"))
+ {
+ HEndDate = DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd HH:mm:00");
+ }
+
+ JsonResult_JL HEqDate = await FindDeviceStatusTimeByNo(Url, token, EquipmentStaus.data[i].no, HBegDate, HEndDate);
+
+ // 璁板綍寮�鏈烘椂闀�
+ CustomWriteLog("璁惧寮�鏈烘椂闀�: 寮�鏈烘椂闀�" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ // 璁板綍鍏虫満鏃堕暱
+ CustomWriteLog("璁惧鍏虫満鏃堕暱: 鍏虫満鏃堕暱" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ // 璁板綍鍋滄満鏃堕暱
+ CustomWriteLog("璁惧鍋滄満鏃堕暱: 鍋滄満鏃堕暱" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ // 璁板綍杩愯鏃堕暱
+ CustomWriteLog("璁惧杩愯鏃堕暱: 杩愯鏃堕暱" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
}
- JsonResult_JL HEqDate = await FindDeviceStatusTimeByNo(Url, token, EquipmentStaus.data[i].no, HBegDate, HEndDate);
- // 璁板綍寮�鏈烘椂闀�
- CustomWriteLog("璁惧寮�鏈烘椂闀�: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ string staus = "";
+ switch (EquipmentStaus.data[i].status)
+ {
+ //-1锛氭湭鐭ワ紝1锛氱绾匡紝2锛氬緟鏈猴紝3锛氭甯歌繍琛岋紝4锛氬憡璀�
+ case "-1":
+ staus = "鏈煡";
+ break;
+ case "1":
+ staus = "绂荤嚎";
+ break;
+ case "2":
+ staus = "寰呮満";
+ break;
+ case "3":
+ staus = "姝e父杩愯";
+ break;
+ case "4":
+ staus = "鍛婅";
+ break;
+ }
+ if (jsonEquipment == null || jsonEquipment.data == null)
+ {
+ // 褰� jsonEquipment 鎴� jsonEquipment.data 涓� null 鏃讹紝缁熶竴璧拌繖閲�
+ JsonData_JL += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":0,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ }
+ else if (jsonEquipment.data.Count > 0)
+ {
+ JsonData_JL += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ }
+ else
+ {
+ JsonData_JL += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":0,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ }
- // 璁板綍鍏虫満鏃堕暱
- CustomWriteLog("璁惧鍏虫満鏃堕暱: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
-
- // 璁板綍鍋滄満鏃堕暱
- CustomWriteLog("璁惧鍋滄満鏃堕暱: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
-
- // 璁板綍杩愯鏃堕暱
- CustomWriteLog("璁惧杩愯鏃堕暱: {\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"}",
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
-
- JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- JsonData_JL += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- }
-
-
- string staus = "";
- switch (EquipmentStaus.data[i].status)
- {
- //-1锛氭湭鐭ワ紝1锛氱绾匡紝2锛氬緟鏈猴紝3锛氭甯歌繍琛岋紝4锛氬憡璀�
- case "-1":
- staus = "鏈煡";
- break;
- case "1":
- staus = "绂荤嚎";
- break;
- case "2":
- staus = "寰呮満";
- break;
- case "3":
- staus = "姝e父杩愯";
- break;
- case "4":
- staus = "鍛婅";
- break;
- }
- if (jsonEquipment.data.Count > 0)
- {
- JsonData_JL += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
- }
- else
- {
- JsonData_JL += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":0,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
}
}
+
+ CustomWriteLog("03", DateTime.Now.ToString("yyyy-MM-dd"));
//鏌ヨ褰撳墠寮�宸ョ殑璁惧 鑾峰彇瀵瑰簲鐨勭墿鏂欎俊鎭�
DataSet datable = oCN.RunProcReturn(@"select m.HNumber,eq.HEquipFileNo from Sc_ICMOBillStatus_Tmp a
@@ -1096,7 +1128,7 @@
}
}
- CustomWriteLog("03", DateTime.Now.ToString("yyyy-MM-dd"));
+ CustomWriteLog("04", DateTime.Now.ToString("yyyy-MM-dd"));
JsonData_JL = JsonData_JL.Substring(0, JsonData_JL.Length - 1);
JsonData_JL += "]}";
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.Designer.cs b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.Designer.cs
new file mode 100644
index 0000000..b5625ce
--- /dev/null
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.Designer.cs
@@ -0,0 +1,331 @@
+锘�
+namespace EquipmentCollectionForm
+{
+ partial class EquipmentCollectionForm_KB
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.cmbEquipFile = new System.Windows.Forms.ComboBox();
+ this.txtEquipFile = new System.Windows.Forms.Label();
+ this.btnBegin = new System.Windows.Forms.Button();
+ this.txtBegin = new System.Windows.Forms.TextBox();
+ this.txtEnd = new System.Windows.Forms.TextBox();
+ this.btnEnd = new System.Windows.Forms.Button();
+ this.btnSave = new System.Windows.Forms.Button();
+ this.label4 = new System.Windows.Forms.Label();
+ this.txtLj = new System.Windows.Forms.TextBox();
+ this.btnLj = new System.Windows.Forms.Button();
+ this.txtHBathNo = new System.Windows.Forms.TextBox();
+ this.HBathNo = new System.Windows.Forms.Label();
+ this.btnRest = new System.Windows.Forms.Button();
+ this.ListData = new System.Windows.Forms.ListBox();
+ this.txtHMaterNumber = new System.Windows.Forms.TextBox();
+ this.HMaterID = new System.Windows.Forms.Label();
+ this.timer = new System.Windows.Forms.Timer(this.components);
+ this.Time_CLHB = new System.Windows.Forms.Timer(this.components);
+ this.labHMakerID = new System.Windows.Forms.Label();
+ this.txtHMakerNumber = new System.Windows.Forms.TextBox();
+ this.label5 = new System.Windows.Forms.Label();
+ this.txtHMaker = new System.Windows.Forms.TextBox();
+ this.label6 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // cmbEquipFile
+ //
+ this.cmbEquipFile.FormattingEnabled = true;
+ this.cmbEquipFile.Location = new System.Drawing.Point(108, 62);
+ this.cmbEquipFile.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.cmbEquipFile.Name = "cmbEquipFile";
+ this.cmbEquipFile.Size = new System.Drawing.Size(166, 23);
+ this.cmbEquipFile.TabIndex = 13;
+ this.cmbEquipFile.SelectedIndexChanged += new System.EventHandler(this.cmbEquipFile_SelectedIndexChanged);
+ //
+ // txtEquipFile
+ //
+ this.txtEquipFile.AutoSize = true;
+ this.txtEquipFile.Location = new System.Drawing.Point(55, 68);
+ this.txtEquipFile.Name = "txtEquipFile";
+ this.txtEquipFile.Size = new System.Drawing.Size(45, 15);
+ this.txtEquipFile.TabIndex = 14;
+ this.txtEquipFile.Text = "璁惧:";
+ //
+ // btnBegin
+ //
+ this.btnBegin.Location = new System.Drawing.Point(40, 105);
+ this.btnBegin.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.btnBegin.Name = "btnBegin";
+ this.btnBegin.Size = new System.Drawing.Size(62, 31);
+ this.btnBegin.TabIndex = 15;
+ this.btnBegin.Text = "寮�濮�";
+ this.btnBegin.UseVisualStyleBackColor = true;
+ this.btnBegin.Click += new System.EventHandler(this.btnBegin_Click);
+ //
+ // txtBegin
+ //
+ this.txtBegin.Location = new System.Drawing.Point(108, 110);
+ this.txtBegin.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtBegin.Name = "txtBegin";
+ this.txtBegin.Size = new System.Drawing.Size(166, 25);
+ this.txtBegin.TabIndex = 16;
+ //
+ // txtEnd
+ //
+ this.txtEnd.Location = new System.Drawing.Point(419, 112);
+ this.txtEnd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtEnd.Name = "txtEnd";
+ this.txtEnd.Size = new System.Drawing.Size(166, 25);
+ this.txtEnd.TabIndex = 18;
+ //
+ // btnEnd
+ //
+ this.btnEnd.Location = new System.Drawing.Point(351, 107);
+ this.btnEnd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.btnEnd.Name = "btnEnd";
+ this.btnEnd.Size = new System.Drawing.Size(62, 31);
+ this.btnEnd.TabIndex = 17;
+ this.btnEnd.Text = "缁撴潫";
+ this.btnEnd.UseVisualStyleBackColor = true;
+ this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
+ //
+ // btnSave
+ //
+ this.btnSave.Location = new System.Drawing.Point(655, 51);
+ this.btnSave.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(102, 31);
+ this.btnSave.TabIndex = 19;
+ this.btnSave.Text = "淇濆瓨";
+ this.btnSave.UseVisualStyleBackColor = true;
+ this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(29, 168);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(45, 15);
+ this.label4.TabIndex = 21;
+ this.label4.Text = "璺緞:";
+ //
+ // txtLj
+ //
+ this.txtLj.Location = new System.Drawing.Point(93, 166);
+ this.txtLj.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtLj.Name = "txtLj";
+ this.txtLj.Size = new System.Drawing.Size(541, 25);
+ this.txtLj.TabIndex = 20;
+ //
+ // btnLj
+ //
+ this.btnLj.Location = new System.Drawing.Point(647, 158);
+ this.btnLj.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.btnLj.Name = "btnLj";
+ this.btnLj.Size = new System.Drawing.Size(102, 35);
+ this.btnLj.TabIndex = 22;
+ this.btnLj.Text = "閫夋嫨璺緞";
+ this.btnLj.UseVisualStyleBackColor = true;
+ this.btnLj.Click += new System.EventHandler(this.btnLj_Click);
+ //
+ // txtHBathNo
+ //
+ this.txtHBathNo.Location = new System.Drawing.Point(419, 55);
+ this.txtHBathNo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtHBathNo.Name = "txtHBathNo";
+ this.txtHBathNo.Size = new System.Drawing.Size(166, 25);
+ this.txtHBathNo.TabIndex = 24;
+ this.txtHBathNo.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtHBathNo_KeyUp);
+ //
+ // HBathNo
+ //
+ this.HBathNo.AutoSize = true;
+ this.HBathNo.Location = new System.Drawing.Point(356, 59);
+ this.HBathNo.Name = "HBathNo";
+ this.HBathNo.Size = new System.Drawing.Size(52, 15);
+ this.HBathNo.TabIndex = 25;
+ this.HBathNo.Text = "鎵规鍙�";
+ //
+ // btnRest
+ //
+ this.btnRest.Location = new System.Drawing.Point(655, 102);
+ this.btnRest.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.btnRest.Name = "btnRest";
+ this.btnRest.Size = new System.Drawing.Size(102, 31);
+ this.btnRest.TabIndex = 26;
+ this.btnRest.Text = "閲嶇疆";
+ this.btnRest.UseVisualStyleBackColor = true;
+ this.btnRest.Click += new System.EventHandler(this.btnRest_Click);
+ //
+ // ListData
+ //
+ this.ListData.FormattingEnabled = true;
+ this.ListData.ItemHeight = 15;
+ this.ListData.Location = new System.Drawing.Point(-2, 199);
+ this.ListData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.ListData.Name = "ListData";
+ this.ListData.Size = new System.Drawing.Size(829, 394);
+ this.ListData.TabIndex = 27;
+ //
+ // txtHMaterNumber
+ //
+ this.txtHMaterNumber.Location = new System.Drawing.Point(419, 84);
+ this.txtHMaterNumber.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtHMaterNumber.Name = "txtHMaterNumber";
+ this.txtHMaterNumber.Size = new System.Drawing.Size(166, 25);
+ this.txtHMaterNumber.TabIndex = 28;
+ //
+ // HMaterID
+ //
+ this.HMaterID.AutoSize = true;
+ this.HMaterID.Location = new System.Drawing.Point(290, 62);
+ this.HMaterID.Name = "HMaterID";
+ this.HMaterID.Size = new System.Drawing.Size(71, 15);
+ this.HMaterID.TabIndex = 29;
+ this.HMaterID.Text = "HMaterID";
+ this.HMaterID.Visible = false;
+ //
+ // timer
+ //
+ this.timer.Interval = 60000;
+ this.timer.Tick += new System.EventHandler(this.timer_Tick);
+ //
+ // Time_CLHB
+ //
+ this.Time_CLHB.Interval = 600000;
+ this.Time_CLHB.Tick += new System.EventHandler(this.Time_CLHB_Tick);
+ //
+ // labHMakerID
+ //
+ this.labHMakerID.AutoSize = true;
+ this.labHMakerID.Location = new System.Drawing.Point(599, 17);
+ this.labHMakerID.Name = "labHMakerID";
+ this.labHMakerID.Size = new System.Drawing.Size(95, 15);
+ this.labHMakerID.TabIndex = 34;
+ this.labHMakerID.Text = "labHMakerID";
+ this.labHMakerID.Visible = false;
+ //
+ // txtHMakerNumber
+ //
+ this.txtHMakerNumber.Location = new System.Drawing.Point(419, 14);
+ this.txtHMakerNumber.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtHMakerNumber.Name = "txtHMakerNumber";
+ this.txtHMakerNumber.Size = new System.Drawing.Size(166, 25);
+ this.txtHMakerNumber.TabIndex = 33;
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(356, 18);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(45, 15);
+ this.label5.TabIndex = 32;
+ this.label5.Text = "缂栫爜:";
+ //
+ // txtHMaker
+ //
+ this.txtHMaker.Location = new System.Drawing.Point(111, 14);
+ this.txtHMaker.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtHMaker.Name = "txtHMaker";
+ this.txtHMaker.Size = new System.Drawing.Size(168, 25);
+ this.txtHMaker.TabIndex = 20;
+ this.txtHMaker.Enter += new System.EventHandler(this.txtHMaker_Enter);
+ this.txtHMaker.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHMaker_KeyDown);
+ this.txtHMaker.Leave += new System.EventHandler(this.txtHMaker_Leave);
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(42, 18);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(60, 15);
+ this.label6.TabIndex = 31;
+ this.label6.Text = "鍒跺崟浜�:";
+ //
+ // EquipmentCollectionForm_KB
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(837, 602);
+ this.Controls.Add(this.labHMakerID);
+ this.Controls.Add(this.txtHMakerNumber);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.txtHMaker);
+ this.Controls.Add(this.label6);
+ this.Controls.Add(this.HMaterID);
+ this.Controls.Add(this.txtHMaterNumber);
+ this.Controls.Add(this.ListData);
+ this.Controls.Add(this.btnRest);
+ this.Controls.Add(this.HBathNo);
+ this.Controls.Add(this.txtHBathNo);
+ this.Controls.Add(this.btnLj);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.txtLj);
+ this.Controls.Add(this.btnSave);
+ this.Controls.Add(this.txtEnd);
+ this.Controls.Add(this.btnEnd);
+ this.Controls.Add(this.txtBegin);
+ this.Controls.Add(this.btnBegin);
+ this.Controls.Add(this.txtEquipFile);
+ this.Controls.Add(this.cmbEquipFile);
+ this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.Name = "EquipmentCollectionForm_KB";
+ this.Text = "璁惧鏁版嵁閲囬泦";
+ this.Activated += new System.EventHandler(this.EquipmentCollectionForm_Activated);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.EquipmentCollectionForm_FormClosing);
+ this.Load += new System.EventHandler(this.EquipmentCollectionForm_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ComboBox cmbEquipFile;
+ private System.Windows.Forms.Label txtEquipFile;
+ private System.Windows.Forms.Button btnBegin;
+ private System.Windows.Forms.TextBox txtBegin;
+ private System.Windows.Forms.TextBox txtEnd;
+ private System.Windows.Forms.Button btnEnd;
+ private System.Windows.Forms.Button btnSave;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox txtLj;
+ private System.Windows.Forms.Button btnLj;
+ private System.Windows.Forms.TextBox txtHBathNo;
+ private System.Windows.Forms.Label HBathNo;
+ private System.Windows.Forms.Button btnRest;
+ private System.Windows.Forms.ListBox ListData;
+ private System.Windows.Forms.TextBox txtHMaterNumber;
+ private System.Windows.Forms.Label HMaterID;
+ private System.Windows.Forms.Timer Time_CLHB;
+ private System.Windows.Forms.Timer timer;
+ private System.Windows.Forms.Label labHMakerID;
+ private System.Windows.Forms.TextBox txtHMakerNumber;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.TextBox txtHMaker;
+ private System.Windows.Forms.Label label6;
+ }
+}
\ No newline at end of file
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.cs b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.cs
new file mode 100644
index 0000000..3f24cf9
--- /dev/null
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.cs
@@ -0,0 +1,1479 @@
+锘縰sing Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+using System.Web;
+using System.Windows.Forms;
+
+namespace EquipmentCollectionForm
+{
+ public partial class EquipmentCollectionForm_KB : Form
+ {
+ private json objJsonResult = new json();
+ DataTable dt = new DataTable();
+ public DBHelper oCN = new DBHelper();
+ public string TimeDate = "";
+ public EquipmentCollectionForm_KB()
+ {
+ InitializeComponent();
+ }
+
+ private void EquipmentCollectionForm_Load(object sender, EventArgs e)
+ {
+ this.txtBegin.ReadOnly = true;
+ this.txtEnd.ReadOnly = true;
+ this.txtLj.ReadOnly = true;
+ this.btnSave.Enabled = false;
+ this.txtHMaterNumber.ReadOnly = true;
+ //this.btnRest.Enabled = false;
+ //鍒跺崟缂栫爜鍙
+ this.txtHMakerNumber.ReadOnly = true;
+ //鍒跺崟浜烘彁绀�
+ this.txtHMaker.ForeColor = Color.LightGray;
+ this.txtHMaker.Text = "璇疯緭鍏ョ敤鎴风紪鐮�!";
+
+ bindCbox();
+
+ }
+
+ private void btnBegin_Click(object sender, EventArgs e)
+ {
+ if (this.txtHBathNo.Text == "" || this.txtHBathNo.ReadOnly == false)
+ //if (false)
+ {
+ MessageBox.Show("璇疯緭鍏ユ壒娆″彿杩涜纭!");
+ }
+ else
+ {
+ this.txtBegin.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ //this.txtBegin.Text = "2024-11-21 13:40:27";
+ this.btnBegin.Enabled = false;
+ if (cmbEquipFile.SelectedIndex == 1)
+ {
+ this.txtHBathNo.ReadOnly = true;
+ this.timer.Enabled = true;
+ }
+ }
+ }
+
+ private void btnEnd_Click(object sender, EventArgs e)
+ {
+ if (this.txtBegin.Text == "")
+ {
+ MessageBox.Show("璇风偣鍑诲紑濮嬫寜閽繘琛屽紑濮嬬‘璁�!");
+ }
+ else
+ {
+ this.txtEnd.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ //this.txtEnd.Text = "2024-09-24 09:52:39";
+ this.btnEnd.Enabled = false;
+
+ if (cmbEquipFile.SelectedIndex == 1)
+ {
+ this.btnSave.Enabled = true;
+ }
+ }
+ }
+
+ private void btnLj_Click(object sender, EventArgs e)
+ {
+ if (this.txtEnd.Text == "")
+ {
+ MessageBox.Show("璇风偣鍑荤粨鏉熸寜閽繘琛岀粨鏉熺‘璁�!");
+ }
+ else
+ {
+ //璺緞璧嬪�肩粰鏂囨湰
+ using (OpenFileDialog openFile = new OpenFileDialog())
+ {
+ openFile.Multiselect = true; // 鍏佽閫夋嫨澶氫釜鏂囦欢
+ DialogResult result = openFile.ShowDialog();
+ if (result == DialogResult.OK)
+ {
+ //淇濆瓨鎸夐挳鐏版帀
+ this.btnSave.Enabled = true;
+
+ string selectedFolderPath = openFile.FileName;
+ this.txtLj.Text = selectedFolderPath;
+
+ objJsonResult = Xt_CSVReadText(openFile.FileNames, 1);
+ dt = objJsonResult.dataTable;
+
+ if (objJsonResult.code == "0")
+ {
+ MessageBox.Show(objJsonResult.Message);
+ }
+ else
+ {
+ for (int i = 0; i < dt.Rows.Count; i++)
+ {
+ ListData.Items.Add("搴曞瓟鐩村緞:" + dt.Rows[i]["BottomHoleDiameter"].ToString() +
+ ",鏈夋棤铻虹墮妫�娴嬫暟鎹�:" + dt.Rows[i]["TestingData"].ToString() +
+ ",鏈夋棤铻虹墮妫�娴嬬粨鏋�:" + dt.Rows[i]["DetectionResult"].ToString() +
+ ",鏃堕棿:" + dt.Rows[i]["HDate"].ToString());
+ }
+
+ }
+ }
+ }
+ }
+ }
+
+ //璇诲彇CSV鏂囦欢鏁版嵁 鏍规嵁鏂囦欢璺緞鎵惧埌瀵瑰簲鏂囦欢 骞惰幏鍙栧搴旂殑鏁版嵁
+ public json Xt_CSVReadText(string[] FilePath, int num)
+ {
+ try
+ {
+ DataTable dt = new DataTable(num.ToString());
+ dt.Columns.Add("BottomHoleDiameter");
+ dt.Columns.Add("TestingData");
+ dt.Columns.Add("DetectionResult");
+ dt.Columns.Add("HDate");
+
+ DataTable dt2 = new DataTable();
+ for (int u = 0; u < FilePath.Length; u++)
+ {
+ using (StreamReader sr = new StreamReader(FilePath[u], Encoding.GetEncoding("gb2312")))
+ {
+ string[] headers = sr.ReadLine()?.Split(',');
+ if (headers != null && u == 0)
+ {
+ foreach (var header in headers)
+ {
+ dt2.Columns.Add(header.Trim());
+ }
+ }
+
+ string line;
+ while ((line = sr.ReadLine()) != null)
+ {
+ var values = line.Split(',');
+ DataRow row = dt2.NewRow();
+
+ for (int i = 0; i < values.Length; i++)
+ {
+ // 杩欓噷鍙兘闇�瑕佹坊鍔犵被鍨嬭浆鎹㈠拰閿欒澶勭悊
+ row[i] = values[i].Trim();
+ }
+
+ dt2.Rows.Add(row);
+ }
+ }
+ }
+ DateTime HBegin = DateTime.Parse(this.txtBegin.Text);
+ DateTime HEnd = DateTime.Parse(this.txtEnd.Text);
+
+ for (int i = 0; i < dt2.Rows.Count; i++)
+ {
+ for (int j = 0; j < 2; j++)
+ {
+ DateTime Now = DateTime.Parse(dt2.Rows[i][dt2.Columns[6]].ToString() + " " + dt2.Rows[i][dt2.Columns[7]].ToString());
+ if (Now >= HBegin && Now <= HEnd)
+ {
+ DataRow dr = dt.NewRow();
+ dr["BottomHoleDiameter"] = dt2.Rows[i][dt2.Columns[j]].ToString();
+ dr["TestingData"] = dt2.Rows[i][dt2.Columns[j + 2]].ToString();
+ dr["DetectionResult"] = dt2.Rows[i][dt2.Columns[j + 4]].ToString();
+ dr["HDate"] = DateTime.Parse(dt2.Rows[i][dt2.Columns[6]].ToString() + " " + dt2.Rows[i][dt2.Columns[7]].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
+ dt.Rows.Add(dr);
+ }
+ }
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.dataTable = dt;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.Message;
+ objJsonResult.dataTable = null;
+ return objJsonResult;
+ }
+ }
+
+
+ private void txtHBathNo_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Enter)
+ {
+ if (this.txtHMakerNumber.Text == "")
+ {
+ MessageBox.Show("璇疯緭鍏ュ埗鍗曚汉淇℃伅!");
+ }
+ else
+ {
+ Get_DisplayBard();
+ }
+ //this.txtHBathNo.ReadOnly = true;
+
+ }
+ }
+
+ //鏌ヨ鏉$爜鏁版嵁
+ public void Get_DisplayBard()
+ {
+ string HBarCode = this.txtHBathNo.Text;
+ DataSet ds = oCN.RunProcReturn("select HBatchNo,m.HNumber,a.HMaterID from Gy_BarCodeBill a left join Gy_Material m on a.HMaterID = m.HItemID where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ MessageBox.Show("鏉$爜鏌ユ棤鏁版嵁!");
+ }
+ else
+ {
+ this.txtHBathNo.Text = ds.Tables[0].Rows[0]["HBatchNo"].ToString();
+ this.txtHMaterNumber.Text = ds.Tables[0].Rows[0]["HNumber"].ToString();
+ this.HMaterID.Text = ds.Tables[0].Rows[0]["HMaterID"].ToString();
+ }
+
+ this.txtHBathNo.ReadOnly = true;
+ }
+
+ private void btnRest_Click(object sender, EventArgs e)
+ {
+ this.txtHBathNo.Text = "";
+ this.txtHMaterNumber.Text = "";
+ this.HMaterID.Text = "0";
+ this.txtHBathNo.ReadOnly = false;
+
+ this.btnBegin.Enabled = true;
+ this.txtBegin.Text = "";
+
+ this.btnEnd.Enabled = true;
+ this.txtEnd.Text = "";
+
+ this.btnSave.Enabled = false;
+
+ this.txtLj.Text = "";
+
+ this.ListData.Items.Clear();
+ this.timer.Enabled = false;
+ }
+
+ private async void btnSave_Click(object sender, EventArgs e)
+ {
+ DialogResult dr = MessageBox.Show("纭淇濆瓨?", "鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+
+ if (dr == DialogResult.Yes)
+ {
+
+ string Url = DBHelper.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "Config/SQLAPI.config", "sUrl");
+ //閫氳繃鎺ュ彛 鑾峰彇token
+ JsonResult_KB jsonResult = await FindAccessToken(Url);
+
+ string EquipFile = this.cmbEquipFile.Text;
+
+ switch (EquipFile)
+ {
+ case "铻烘瘝鍏ㄦ":
+ SaveFullInspectionOfNuts(jsonResult.data.token, Url);
+ break;
+ case "铻烘瘝鍘嬭":
+ SaveNutPressFit(jsonResult.data.token, Url, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ break;
+ case "娉ㄥ鏈�":
+ SaveInjectionMoldingMachine(jsonResult.data.token, Url, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ break;
+ }
+ this.btnSave.Enabled = false;
+ }
+ }
+
+ //铻烘瘝鍏ㄦ淇濆瓨
+ public async void SaveFullInspectionOfNuts(string token, string url)
+ {
+ try
+ {
+
+ //鑾峰彇鎵�鏈夎澶囨暟鎹�
+ JsonEquipmentData_KB jsonResult = await FindDeviceList(url, token);
+
+ if (jsonResult.code != "0")
+ {
+ this.btnSave.Enabled = true;
+ MessageBox.Show("璁惧鍒楄〃鎶ラ敊:" + jsonResult.message);
+ }
+ else
+ {
+ string nos = "";
+ //鑾峰彇璁惧缂栫爜
+ for (int i = 0; i < jsonResult.data.Count; i++)
+ {
+ if (jsonResult.data[i].no == this.cmbEquipFile.SelectedValue.ToString())
+ {
+ nos = jsonResult.data[i].no;
+ }
+ }
+ //寮�濮嬫椂闂�
+ string HBegin = this.txtBegin.Text;
+ //缁撴潫鏃堕棿
+ string HEnd = this.txtEnd.Text;
+ //鑾峰彇涓嶈壇鏁帮紝鍚堟暟鏁帮紝鍙枒鏁� 鎬绘暟
+ jsonResult = await FindDevicePropCalc(url, token, nos, HBegin, HEnd);
+ if (jsonResult.code != "0")
+ {
+ this.btnSave.Enabled = true;
+ MessageBox.Show("鏁伴噺鑾峰彇鎶ラ敊:" + jsonResult.message);
+ }
+ else
+ {
+ double HInSpectQty = 0;//妫�楠屾暟閲�
+ double HRightQty = 0;//鍚堟牸
+ double HUnRightQty = 0;//涓嶅悎鏍�
+ double HUnKnowQty = 0;//鍙枒
+
+ for (int i = 0; i < jsonResult.data.Count; i++)
+ {
+ if (jsonResult.data[i].propId == 173)
+ {
+ //HInSpectQty = jsonResult.data[i].sum;
+ }
+ else if (jsonResult.data[i].propId == 469)
+ {
+ HRightQty = jsonResult.data[i].sum;
+ }
+ else if (jsonResult.data[i].propId == 606)
+ {
+ HUnKnowQty = jsonResult.data[i].sum;
+ }
+ else if (jsonResult.data[i].propId == 470)
+ {
+ HUnRightQty = jsonResult.data[i].sum;
+ }
+ }
+ //閫氳繃鍙屾柟璁ㄨ 鏈�缁堥噰绾� 妫�楠屾暟閲�=鍚堟牸+涓嶅悎鏍�+鍙枒
+ HInSpectQty = HRightQty + HUnKnowQty + HUnRightQty;
+
+
+ string HNumber = "";
+ int HSourceID = 0;
+ string HSourceNumber = "";
+
+ switch (this.cmbEquipFile.Text)
+ {
+ case "铻烘瘝鍏ㄦ":
+ HNumber = "LMJC";
+ HSourceNumber = "1030";
+ break;
+ case "铻烘瘝鍘嬭":
+ HNumber = "LMYZ";
+ HSourceNumber = "1029";
+ break;
+ }
+
+ //鏌ヨ鐢熶骇璧勬簮
+ DataSet dsSouce = oCN.RunProcReturn("select * from Gy_Source with(nolock) where HNumber='" + HSourceNumber + "'", "Gy_Source");
+ if (dsSouce.Tables[0].Rows.Count == 0)
+ {
+ this.btnSave.Enabled = true;
+ MessageBox.Show("鐢熶骇璧勬簮鏌ユ棤鏁版嵁!");
+ }
+ else
+ {
+
+ HSourceID = int.Parse(dsSouce.Tables[0].Rows[0]["HItemID"].ToString());
+
+ //鏌ヨ妫�楠屾柟妗�
+ DataSet dataSet = oCN.RunProcReturn(@"select a.HInterID HQCSchemeID,b.HQCCheckItemID, ch.HNumber HQCCheckItemNumber,m.HNumber,HUpLimit,HDownLimit,HTargetVal,a.HProcID,b.HInspectInstruMentID
+,b.HAnalysisMethod
+from Gy_QCCheckProjectMain a with(nolock)
+inner join Gy_QCCheckProjectSub b with(nolock) on a.HInterID=b.HInterID
+left join Gy_Material m with(nolock) on a.HMaterID=m.HItemID
+left join Gy_QCCheckItem ch with(nolock) on b.HQCCheckItemID=ch.HItemID
+left join Gy_InspectInstruMent ment on b.HInspectInstruMentID=ment.HItemID
+where m.HNumber='" + this.txtHMaterNumber.Text + "' and ment.HNumber='" + HNumber + "'", "Gy_QCCheckProjectMain");
+
+ //淇濆瓨鏁版嵁
+ if (dataSet.Tables[0].Rows.Count > 0)
+ {
+ string sExeReturnInfo = "";
+ string BillType = "7519";
+ long HInterID = oCN.CreateBillID_Prod(BillType, ref sExeReturnInfo);
+ string HBillNo = oCN.CreateBillCode(BillType, ref sExeReturnInfo, true);
+ if (dataSet.Tables[0].Rows.Count <= dt.Columns.Count - 1)
+ {
+ oCN.BeginTran();
+
+ string HProcID = dataSet.Tables[0].Rows[0]["HProcID"].ToString();
+ string HMaterID = this.HMaterID.Text;
+ string HQCSchemeID = dataSet.Tables[0].Rows[0]["HQCSchemeID"].ToString();
+ string HBatchNo = this.txtHBathNo.Text;
+ int HLastResults = 1;
+ for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
+ {
+ int HLastResult = 1;
+ string HAnalysisMethod = dataSet.Tables[0].Rows[i]["HAnalysisMethod"].ToString();
+ decimal HUpLimit = 0;
+ decimal HDownLimit = 0;
+
+ //鍒嗘瀽鏂规硶 涓哄畾閲忓垎鏋�
+ if (HAnalysisMethod == "2")
+ {
+ //鑾峰彇涓婇檺
+ HUpLimit = decimal.Parse(dataSet.Tables[0].Rows[i]["HTargetVal"].ToString()) + decimal.Parse(dataSet.Tables[0].Rows[i]["HUpLimit"].ToString());
+ //鑾峰彇涓嬮檺
+ HDownLimit = decimal.Parse(dataSet.Tables[0].Rows[i]["HTargetVal"].ToString()) + decimal.Parse(dataSet.Tables[0].Rows[i]["HDownLimit"].ToString());
+ }
+
+
+ for (int j = 0; j < dt.Columns.Count - 1; j++)
+ {
+
+ string HQCCheckItemName = "";
+ switch (dt.Columns[j].ColumnName)
+ {
+ case "BottomHoleDiameter":
+ HQCCheckItemName = "DKZJ";
+ break;
+ case "TestingData":
+ HQCCheckItemName = "LYJCSJ";
+ break;
+ case "DetectionResult":
+ HQCCheckItemName = "LYJCJG";
+ break;
+ }
+ //SRM@101.2@VEN00005@CGDD000167@1.02.002.002@20231129@1000
+ //鍒ゆ柇妫�楠岄」鐩殑浠g爜 璺熷垪鍚嶆槸鍚︿竴鑷�
+ if (dataSet.Tables[0].Rows[i]["HQCCheckItemNumber"].ToString().Contains(HQCCheckItemName))
+ {
+ for (int k = 0; k < dt.Rows.Count; k++)
+ {
+ //鍙彇鏃堕棿鑼冨洿鍐呯殑鏁版嵁
+ if (DateTime.Parse(dt.Rows[k]["HDate"].ToString()) >= DateTime.Parse(HBegin) && DateTime.Parse(dt.Rows[k]["HDate"].ToString()) <= DateTime.Parse(HEnd))
+ {
+ //鑾峰彇妫�楠屽��
+ decimal HInSpectValue = decimal.Parse(dt.Rows[k][dt.Columns[j].ColumnName].ToString());
+ //榛樿鍊肩粨璁轰负鍚堟牸
+ int HInSpectResult = 1;
+ //瀹氶噺鍒嗘瀽 杩涜鍒ゆ柇鏄惁婊¤冻涓婁笅闄�
+ if (HAnalysisMethod == "2")
+ {
+ HInSpectResult = (HInSpectValue > HUpLimit || HDownLimit > HInSpectValue) ? 0 : 1;
+ }
+ else
+ {
+ HInSpectResult = int.Parse(HInSpectValue.ToString());
+ }
+
+ //濡傛灉褰撳墠缁撹涓哄悎鏍� 骞朵笖鍘嗗彶缁撹涔熸槸鍚堟牸 鍒欑户缁繚鎸佸悎鏍�
+ if (HInSpectResult == 1 && HLastResult != 0)
+ {
+ HLastResult = 1;
+ }
+ else
+ {
+ HLastResult = 0;
+ }
+
+ oCN.RunProc("Insert into QC_StockCheckBillSub_ValueGrid " +
+ " (HInterID,HEntryID,HSEQ" +
+ ",HInSpectResult,HInSpectValue,HInSpectValueB,HInSpectValueT)" +
+ "values(" + HInterID + "," + ((i + 1)) + "," + (k + 1) + "" +
+ "," + HInSpectResult + "," + dt.Rows[k][dt.Columns[j].ColumnName].ToString() + "," + dt.Rows[k][dt.Columns[j].ColumnName].ToString() + "," + dt.Rows[k][dt.Columns[j].ColumnName].ToString() + ") ");
+ }
+ }
+ break;
+ }
+ }
+
+ oCN.RunProc("Insert into QC_StockCheckBillSub " +
+ " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
+ ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
+ ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HQCCheckItemID,HQCStd,HUnit,HQCNote,HResult" +
+ ",HMax,HMin,HAvg,HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" +
+ ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" +
+ ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
+ ") values("
+ + HInterID + ",'" + HBillNo + "'," + (i + 1) + ",''" +
+ ",getdate(),0,'',0" +
+ ",0,'','',0,0" +
+ "," + dataSet.Tables[0].Rows[i]["HQCCheckItemID"].ToString() + ",'" + dataSet.Tables[0].Rows[i]["HTargetVal"].ToString() + "','','','" + HLastResult + "'" +
+ ",'" + dataSet.Tables[0].Rows[i]["HUpLimit"].ToString() + "','" + dataSet.Tables[0].Rows[i]["HDownLimit"].ToString() + "','',0,0,0,0" +
+ ",0,0,'',0,'','" + dataSet.Tables[0].Rows[i]["HTargetVal"].ToString() + "'" +
+ ",'" + dataSet.Tables[0].Rows[i]["HUpLimit"].ToString() + "','" + dataSet.Tables[0].Rows[i]["HDownLimit"].ToString() + "','','',0,'" + HAnalysisMethod + "'," + dataSet.Tables[0].Rows[i]["HInspectInstruMentID"].ToString() + ",'" + HLastResult + "'" +
+ ") ");
+ //濡傛灉褰撳墠缁撹涓哄悎鏍� 骞朵笖鍘嗗彶缁撹涔熸槸鍚堟牸 鍒欑户缁繚鎸佸悎鏍�
+ if (HLastResult == 1 && HLastResults != 0)
+ {
+ HLastResults = 1;
+ }
+ else
+ {
+ HLastResults = 0;
+ }
+ }
+
+ //涓昏〃
+ oCN.RunProc("Insert Into QC_StockCheckBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
+ ",HYear,HPeriod,HRemark" +
+ ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
+ ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment" +
+ ",HProcID,HBatchNo,HInSpectQty ,HRightQty ,HUnRightQty ,HUnKnowQty " +
+ ") " +
+ " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',1,getdate(),'" + this.txtHMaker.Text + "',getdate()" +
+ "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",''" +
+ "," + HSourceID + ",0,'',0,0,0" +
+ ",'',0," + HMaterID + ",'" + this.labHMakerID.Text + "', " + HLastResults +
+ ",0,0,'','',0," + HQCSchemeID + ",0,''" +
+ "," + HProcID + ",'" + HBatchNo + "'," + HInSpectQty + "," + HRightQty + ", " + HUnRightQty + ", " + HUnKnowQty + ") ");
+
+
+ oCN.Commit();
+ MessageBox.Show("淇濆瓨鎴愬姛!");
+ //this.btnRest.Enabled = true;
+
+ }
+ else
+ {
+ this.btnSave.Enabled = true;
+ MessageBox.Show("褰撳墠鐗╂枡鐨勬楠屾柟妗堜笌Excel鐨勫垪涓嶅尮閰�!");
+ }
+ }
+ else
+ {
+ this.btnSave.Enabled = true;
+ MessageBox.Show("褰撳墠鐗╂枡娌℃湁瀵瑰簲鐨勬楠屾柟妗�!");
+ }
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ this.btnSave.Enabled = true;
+ MessageBox.Show("淇濆瓨澶辫触!" + e.Message);
+ }
+ }
+
+
+ //鑾峰彇鐧诲綍鐨則oken
+ public async Task<JsonResult_KB> getUrl(string url, FormUrlEncodedContent formData)
+ {
+
+ // 鍒涘缓 HttpClient 瀹炰緥
+ using (var client = new HttpClient())
+ {
+ // 鍙戦�� POST 璇锋眰锛屽苟绛夊緟鍝嶅簲
+ HttpResponseMessage response = await client.PostAsync(url, formData);
+
+ Dictionary<object, object> dic = new Dictionary<object, object>();
+ JsonResult_KB jsonResult = new JsonResult_KB();
+ // 妫�鏌ュ搷搴旀槸鍚︽垚鍔�
+ if (response.IsSuccessStatusCode)
+ {
+ // 澶勭悊鎴愬姛鍝嶅簲鐨勯�昏緫
+ string responseBody = await response.Content.ReadAsStringAsync();
+ jsonResult = JsonConvert.DeserializeObject<JsonResult_KB>(responseBody);
+ }
+ else
+ {
+ // 澶勭悊澶辫触鍝嶅簲鐨勯�昏緫
+ MessageBox.Show("璇锋眰澶辫触锛岀姸鎬佺爜锛�" + response.StatusCode);
+ }
+ return jsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇璁惧鍒楄〃
+ /// </summary>
+ /// <param name="url"></param>
+ /// <param name="postData"></param>
+ /// <returns></returns>
+ public async Task<JsonEquipmentData_KB> EquipmentList(string url, StringContent postData, string Type)
+ {
+
+ // 鍒涘缓 HttpClient 瀹炰緥
+ using (HttpClient client = new HttpClient())
+ {
+ JsonEquipmentData_KB jsonResult = new JsonEquipmentData_KB();
+ try
+ {
+ HttpResponseMessage response;
+ if (Type == "POST")
+ { // 鍙戣捣 POST 璇锋眰
+ response = await client.PostAsync(url, postData);
+ }
+ else
+ {
+ // 鍙戣捣 get 璇锋眰
+ response = await client.GetAsync(url);
+ }
+
+
+ // 纭繚璇锋眰鎴愬姛
+ if (response.IsSuccessStatusCode)
+ {
+ // 璇诲彇鍝嶅簲鍐呭
+ string responseBody = await response.Content.ReadAsStringAsync();
+ jsonResult = JsonConvert.DeserializeObject<JsonEquipmentData_KB>(responseBody);
+ }
+ else
+ {
+ MessageBox.Show($"璇锋眰澶辫触锛歿response.StatusCode} - {url} - 褰撳墠鏃堕棿锛歿DateTime.Now:yyyy-MM-dd HH:mm:ss}");
+ }
+
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("璇锋眰鎶ラ敊:" + ex.Message);
+ }
+ return jsonResult;
+ }
+ }
+
+ public async Task<JsonResult_KB> EquipResultList(string url, StringContent postData, string Type)
+ {
+
+ // 鍒涘缓 HttpClient 瀹炰緥
+ using (HttpClient client = new HttpClient())
+ {
+ JsonResult_KB jsonResult = new JsonResult_KB();
+ try
+ {
+ HttpResponseMessage response;
+ if (Type == "POST")
+ { // 鍙戣捣 POST 璇锋眰
+ response = await client.PostAsync(url, postData);
+ }
+ else
+ {
+ // 鍙戣捣 get 璇锋眰
+ response = await client.GetAsync(url);
+ }
+
+
+ // 纭繚璇锋眰鎴愬姛
+ if (response.IsSuccessStatusCode)
+ {
+ // 璇诲彇鍝嶅簲鍐呭
+ string responseBody = await response.Content.ReadAsStringAsync();
+ jsonResult = JsonConvert.DeserializeObject<JsonResult_KB>(responseBody);
+ }
+ else
+ {
+ MessageBox.Show($"璇锋眰澶辫触锛�: {response.StatusCode}");
+ }
+
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("璇锋眰鎶ラ敊:" + ex.Message);
+ }
+ return jsonResult;
+ }
+ }
+
+
+ //鑾峰彇tockID
+ public async Task<JsonResult_KB> FindAccessToken(string url)
+ {
+ string urls = url + EquipmentType_KB.One;
+ // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
+ var formData = new FormUrlEncodedContent(new[]
+ {
+ new KeyValuePair<string, string>("userName", "admin"),
+ new KeyValuePair<string, string>("password", "admin")
+ // 娣诲姞鏇村閿�煎锛屾牴鎹偍鐨勯渶瑕�
+ });
+ JsonResult_KB jsonResult = await getUrl(urls, formData);
+ return jsonResult;
+ }
+
+ //鑾峰彇璁惧鍒楄〃
+ public async Task<JsonEquipmentData_KB> FindDeviceList(string url, string token)
+ {
+ //璁惧鍒楄〃鎺ュ彛
+ string urls = url + EquipmentType_KB.Two;
+ CustomWriteLog("璁惧鍒楄〃鎺ュ彛锛�'" + urls + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+ // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
+ var postData = new StringContent("{\"token\":\"" + token + "\"}", System.Text.Encoding.UTF8, "application/json");
+ JsonEquipmentData_KB jsonResult = await EquipmentList(urls, postData, "POST");
+ return jsonResult;
+ }
+
+ //鑾峰彇鑹搧銆佷笉鑹搧鏄庣粏銆佸伐鑹哄弬鏁�
+ public async Task<JsonEquipmentData_KB> FindAllDevicePropsDetailByTimeRange(string url, string token, string nos, string HBegin, string HEnd)
+ {
+ string basePropIds = DBHelper.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "Config/SQLAPI.config", "basePropIds");
+ basePropIds = "[" + basePropIds + "]";
+ nos = nos.Replace(",", "\",\"");
+ //20250723 鍙戠幇鏈夌殑瀹㈡埛鏁伴噰娌℃湁閲囬泦宸ヨ壓鍙傛暟 濡傛灉浼犲叆瀵瑰簲鐨� 璁惧缂栧彿 浼氬鑷� 璇锋眰澶辫触 浼犲叆鍙傛暟ID 涔熷彲浠ヨ幏鍙栧埌瀵瑰簲鐨勮澶� 杩欐牱涓嶄細 璇锋眰澶辫触
+ //string stringJson = "{\"token\":\"" + token + "\",\"deviceNos\":[\"" + nos + "\"],\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\",\"basePropIds\":" + basePropIds + "}";
+ string stringJson = "{\"token\":\"" + token + "\",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\",\"basePropIds\":" + basePropIds + "}";
+ //璁惧鍒楄〃鎺ュ彛
+ string urls = url + EquipmentType_KB.Nine;
+ CustomWriteLog("宸ヨ壓鍙傛暟鎺ュ彛锛�'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+ // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
+ var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
+ JsonEquipmentData_KB jsonEquipment = await EquipmentList(urls, postData, "POST");
+ return jsonEquipment;
+ }
+
+ //鑾峰彇涓嶈壇鏁帮紝鍚堟暟鏁帮紝鍙枒鏁� 鎬绘暟
+ public async Task<JsonEquipmentData_KB> FindDevicePropCalc(string url, string token, string nos, string HBegin, string HEnd)
+ {
+ string stringJson = "{\"token\":\"" + token + "\",\"deviceNo\":\"" + nos + "\",\"propIds\":[606,173,469,470],\"beginTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
+ var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
+ string urls = url + EquipmentType_KB.Seven;
+ CustomWriteLog("鑾峰彇涓嶈壇鏁帮紝鍚堟暟鏁帮紝鍙枒鏁� 鎬绘暟锛�'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+ JsonEquipmentData_KB jsonResult = await EquipmentList(urls, postData, "POST");
+ return jsonResult;
+ }
+
+
+ //鑾峰彇璁惧杩愯鐘舵��
+ public async Task<JsonEquipmentData_KB> FindDeviceStatusByNos(string url, string token, string nos)
+ {
+ nos = nos.Replace(",", "\",\"");
+ nos = "\"" + nos + "\"";
+ string stringJson = "{\"token\":\"" + token + "\",\"nos\":[" + nos + "]}";
+ var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
+ string urls = url + EquipmentType_KB.Three;
+ CustomWriteLog("璁惧杩愯鐘舵�侊細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+ JsonEquipmentData_KB jsonResult = await EquipmentList(urls, postData, "POST");
+ return jsonResult;
+ }
+
+ //鑾峰彇璁惧鏃堕棿娈典骇閲�
+ public async Task<JsonEquipmentData_KB> FindProdByNosAndTime(string url, string token, string nos, string HBegin, string HEnd)
+ {
+ nos = nos.Replace(",", "\",\"");
+ nos = "\"" + nos + "\"";
+ string stringJson = "{\"token\":\"" + token + "\",\"nos\":[" + nos + "],\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
+ var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
+ string urls = url + EquipmentType_KB.Four;
+ CustomWriteLog("璁惧鏃堕棿娈典骇閲忥細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+ JsonEquipmentData_KB jsonResult = await EquipmentList(urls, postData, "POST");
+ return jsonResult;
+ }
+
+ //鑾峰彇璁惧杩愯鏃堕棿 寮�鏈� 鍋滄満 寰呮満 鍏虫満
+ public async Task<JsonResult_KB> FindDeviceStatusTimeByNo(string url, string token, string nos, string HBegin, string HEnd)
+ {
+ nos = nos.Replace(",", "\",\"");
+ nos = "\"" + nos + "\"";
+ string stringJson = "{\"token\":\"" + token + "\",\"no\":" + nos + ",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
+ var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
+ string urls = url + EquipmentType_KB.Five;
+ // 璁板綍寮�鏈烘椂闀�
+ CustomWriteLog("璁惧杩愯鏃堕棿鎺ュ彛锛�'"+ urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+ JsonResult_KB jsonResult = await EquipResultList(urls, postData, "POST");
+ return jsonResult;
+ }
+
+ //鑾峰彇娉ㄥ鏈虹殑 寮�鏈�
+ public async Task<JsonResult_KB> FindDeviceStatusTimeByNosAndOperationMode(string url, string token, string nos, string HBegin, string HEnd)
+ {
+ nos = nos.Replace(",", "\",\"");
+ nos = "\"" + nos + "\"";
+ string stringJson = "{\"token\":\"" + token + "\",\"no\":" + nos + ",\"startTime\":\"" + HBegin + "\",\"endTime\":\"" + HEnd + "\"}";
+ var postData = new StringContent(stringJson, System.Text.Encoding.UTF8, "application/json");
+ string urls = url + EquipmentType_KB.Ten;
+ CustomWriteLog("娉ㄥ鏈虹殑 寮�鏈烘帴鍙o細'" + urls + "' 鍙傛暟鍊硷細 '" + stringJson + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+ JsonResult_KB jsonResult = await EquipResultList(urls, postData, "POST");
+ return jsonResult;
+ }
+
+
+ //涓嬫媺妗嗙粦瀹氭暟鎹�
+ private void bindCbox()
+ {
+ IList<Info_KB> infoList = new List<Info_KB>();
+ Info_KB info1 = new Info_KB() { Id = "CMR-QC-SE-001", Name = "铻烘瘝鍏ㄦ" };
+ Info_KB info2 = new Info_KB() { Id = "CMR-ZZ-SE-001", Name = "铻烘瘝鍘嬭" };
+ Info_KB info3 = new Info_KB() { Id = "ZSJ07", Name = "娉ㄥ鏈�#07" };
+ //Info_KB info3 = new Info_KB() { Id = "3", Name = "鐜嬩簲" };
+ infoList.Add(info1);
+ infoList.Add(info2);
+ infoList.Add(info3);
+ cmbEquipFile.DataSource = infoList;
+ cmbEquipFile.ValueMember = "Id";
+ cmbEquipFile.DisplayMember = "Name";
+ this.cmbEquipFile.SelectedIndex = 0;
+ this.cmbEquipFile.DropDownStyle = ComboBoxStyle.DropDownList;
+ }
+
+ //閫夋嫨涓嬫媺妗嗗�兼洿鏀逛簨浠�
+ private void cmbEquipFile_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (cmbEquipFile.SelectedIndex == 0)
+ {
+ this.btnLj.Enabled = true;
+ this.timer.Enabled = false;
+ }
+ else
+ {
+ this.btnLj.Enabled = false;
+ DialogResult dr = MessageBox.Show("鏄惁纭寮�濮嬮噰闆�?", "鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+
+ if (dr == DialogResult.Yes)
+ {
+ this.txtHBathNo.ReadOnly = true;
+ this.txtBegin.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:00");
+ //this.txtBegin.Text = "2024-11-21 13:40:27";
+ this.btnBegin.Enabled = false;
+ this.timer.Enabled = true;
+ this.Time_CLHB.Enabled = true;
+ }
+ }
+ }
+
+ //瀹氭椂鑾峰彇鏁版嵁
+ private async void timer_Tick(object sender, EventArgs e)
+ {
+ //娴嬭瘯鍏ㄦ
+ //this.timer.Enabled = false;
+
+ string Url = DBHelper.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "Config/SQLAPI.config", "sUrl");
+ string urls = Url + EquipmentType_KB.One;
+ // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
+ var formData = new FormUrlEncodedContent(new[]
+ {
+ new KeyValuePair<string, string>("userName", "admin"),
+ new KeyValuePair<string, string>("password", "Youngsunabc123..")
+ // 娣诲姞鏇村閿�煎锛屾牴鎹偍鐨勯渶瑕�
+ });
+ JsonResult_KB jsonResult = await getUrl(urls, formData);
+ string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:00");
+
+ if (cmbEquipFile.SelectedIndex == 1)
+ {
+ SaveNutPressFit(Url, jsonResult.data.token, time);
+ }
+ else if (cmbEquipFile.SelectedIndex == 2)
+ {
+ SaveInjectionMoldingMachine(jsonResult.data.token, Url, time);
+ }
+
+
+ }
+
+ //铻烘瘝鍘嬭閲囬泦鏁版嵁 淇濆瓨
+ public async void SaveNutPressFit(string Url, string token, string time)
+ {
+ if (TimeDate == "")
+ {
+ TimeDate = this.txtBegin.Text;
+ }
+ this.timer.Enabled = false;
+
+ JsonEquipmentData_KB jsonResult = await FindDeviceList(Url, token);
+ if (jsonResult.code != "0")
+ {
+ MessageBox.Show("璁惧鍒楄〃鎶ラ敊:" + jsonResult.message);
+ }
+ else
+ {
+ string nos = "";
+ //鑾峰彇鍘昏澶囩紪鐮�
+ for (int i = 0; i < jsonResult.data.Count; i++)
+ {
+ if (jsonResult.data[i].no.Contains("CMR-ZZ-SE-001"))
+ {
+ nos += jsonResult.data[i].no + ",";
+ }
+ }
+ nos = nos.Substring(0, nos.Length - 1);
+ //TimeDate = "2024-08-14 08:30:39";
+ //time = "2024-08-14 15:05:39";
+
+ JsonEquipmentData_KB jsonEquipment = await FindAllDevicePropsDetailByTimeRange(Url, token, nos, TimeDate, time);
+
+ var JsonData_KB = "{\"data\":[";
+
+ for (int i = 0; i < jsonEquipment.data[0].props.Count; i++)
+ {
+ for (int j = 0; j < jsonEquipment.data[0].props[i].datas.Count; j++)
+ {
+ valueData_KB value = JsonConvert.DeserializeObject<valueData_KB>(jsonEquipment.data[0].props[i].datas[j].value);
+ if (value.type == "鑹搧")
+ {
+ JsonData_KB += "{\"HDate\":\"" + jsonEquipment.data[0].props[i].datas[j].createTime + "\",\"HTechParamName\":\"铻烘瘝鏄惁鍑稿嚭\",\"HResult\":\"OK\",\"HCount\":1,\"HSourceCode\":\"" + nos + "\"},";
+ }
+ else
+ {
+ JsonData_KB += "{\"HDate\":\"" + jsonEquipment.data[0].props[i].datas[j].createTime + "\",\"HTechParamName\":\"铻烘瘝鏄惁鍑稿嚭\",\"HResult\":\"NG\",\"HCount\":1,\"HSourceCode\":\"" + nos + "\"},";
+ }
+ JsonData_KB += "{\"HDate\":\"" + jsonEquipment.data[0].props[i].datas[j].createTime + "\",\"HTechParamName\":\"鐢熶骇鍛ㄦ湡\",\"HResult\":\"" + value.beat + "\",\"HCount\":1,\"HSourceCode\":\"" + nos + "\"},";
+ }
+ }
+
+
+ jsonEquipment = await FindDevicePropCalc(Url, token, nos, TimeDate, time);
+
+ for (int i = 0; i < jsonEquipment.data.Count; i++)
+ {
+ //鍚堟牸鏁�
+ if (jsonEquipment.data[i].propId == 469)
+ {
+ JsonData_KB += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鑹搧鏁癨",\"HResult\":\"OK\",\"HCount\":" + jsonEquipment.data[i].sum + ",\"HSourceCode\":\"" + nos + "\"},";
+ }
+ //涓嶈壇鏁�
+ else if (jsonEquipment.data[i].propId == 470)
+ {
+ JsonData_KB += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"NG鏁伴噺\",\"HResult\":\"NG\",\"HCount\":" + jsonEquipment.data[i].sum + ",\"HSourceCode\":\"" + nos + "\"},";
+ }
+ }
+
+ JsonData_KB = JsonData_KB.Substring(0, JsonData_KB.Length - 1);
+ JsonData_KB += "]}";
+ DataSave(JsonData_KB);
+ if (TimeDate != "")
+ {
+ TimeDate = time;
+ }
+ }
+ }
+
+ //娉ㄥ鏈洪噰闆嗘暟鎹� 淇濆瓨
+ public async void SaveInjectionMoldingMachine(string token, string Url, string time)
+ {
+ ListData.Items.Clear();
+ if (TimeDate == "")
+ {
+ TimeDate = this.txtBegin.Text;
+ }
+ //this.timer.Enabled = false;
+
+ //TimeDate = "2025-02-10 13:10:50";
+ //time = "2025-02-10 13:11:50";
+
+ //鑾峰彇鎵�鏈夎澶囨暟鎹�
+ JsonEquipmentData_KB jsonResult = await FindDeviceList(Url, token);
+ if (jsonResult.code != "0")
+ {
+ MessageBox.Show("璁惧鍒楄〃鎶ラ敊:" + jsonResult.message);
+ }
+ else
+ {
+
+ string nos = "";
+ //鑾峰彇璁惧缂栫爜
+ for (int i = 0; i < jsonResult.data.Count; i++)
+ {
+ nos += jsonResult.data[i].no + ",";
+ //if (jsonResult.data[i].no.Contains("JS_ZS"))
+ //{
+ // nos += jsonResult.data[i].no + ",";
+ //}
+ }
+ nos = nos.Substring(0, nos.Length - 1);
+ //鑾峰彇鍙傛暟 鑾峰彇姣忎釜璁惧瀵瑰簲鐨勬墍鏈夊弬鏁� 20250723 鍑礉娌℃湁宸ヨ壓鍙傛暟閲囬泦
+ //JsonEquipmentData_KB jsonEquipment = await FindAllDevicePropsDetailByTimeRange(Url, token, nos, TimeDate, time);
+
+ JsonEquipmentData_KB jsonEquipment= null;
+
+ var JsonData_KB = "{\"data\":[";
+
+ if (jsonEquipment == null)
+ {
+ CustomWriteLog("jsonEquipment瀵硅薄涓虹┖", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ //20250723娉ㄩ噴
+ //if (jsonEquipment.data == null)
+ //{
+ // CustomWriteLog("jsonEquipment.data灞炴�т负绌�", DateTime.Now.ToString("yyyy-MM-dd"));
+ //}
+ else
+ {
+ CustomWriteLog("寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細'" + jsonEquipment.data.Count + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ //閫氳繃姣忎釜璁惧杩涜寰幆璧嬪��
+ for (int i = 0; i < jsonEquipment.data.Count; i++)
+ {
+ //寰幆 铻烘瘝鍘嬭璁惧瀵瑰簲鐨勬墍鏈夊伐鑹哄弬鏁�
+ for (int j = 0; j < jsonEquipment.data[i].props.Count; j++)
+ {
+ //寰幆 姣忎釜鍙傛暟瀵瑰簲鐨勬墍鏈夋暟鎹�
+ for (int k = 0; k < jsonEquipment.data[i].props[j].datas.Count; k++)
+ {
+ JsonData_KB += "{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
+ //CustomWriteLog("宸ヨ壓鍙傛暟鍏蜂綋鍊硷細{\"HDate\":\"" + jsonEquipment.data[i].props[j].datas[k].createTime + "\",\"HTechParamName\":\"" + jsonEquipment.data[i].props[j].propName + "\",\"HResult\":\"" + jsonEquipment.data[i].props[j].datas[k].value + "\",\"HCount\":1,\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ }
+
+ //鑾峰彇璁惧鏃堕棿娈典骇閲�
+ JsonEquipmentData_KB data = await FindProdByNosAndTime(Url, token, jsonEquipment.data[i].deviceNo, TimeDate, time);
+ for (int j = 0; j < data.data.Count; j++)
+ {
+
+ JsonData_KB += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"},";
+ //CustomWriteLog("{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonEquipment.data[i].deviceNo + "\"}", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ }
+ }
+
+ //鑾峰彇璁惧鏃堕棿娈典骇閲� 鍥犱负娌℃湁宸ヨ壓鍙傛暟閲囬泦 鎵�浠ラ渶瑕佸崟鐙媺鍑烘潵閲囬泦鏁伴噺
+ for (int i = 0; i < jsonResult.data.Count; i++)
+ {
+ JsonEquipmentData_KB data = await FindProdByNosAndTime(Url, token, jsonResult.data[i].no, TimeDate, time);
+ for (int j = 0; j < data.data.Count; j++)
+ {
+ JsonData_KB += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"鐢熶骇鏁伴噺\",\"HResult\":\"OK\",\"HCount\":" + data.data[j].prod + ",\"HSourceCode\":\"" + jsonResult.data[i].no + "\"},";
+ }
+ }
+
+ CustomWriteLog("02", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ //鑾峰彇璁惧杩愯鐘舵��
+ var EquipmentStaus = await FindDeviceStatusByNos(Url, token, nos);
+ if (EquipmentStaus == null)
+ {
+ CustomWriteLog("EquipmentStaus瀵硅薄涓虹┖", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ if (EquipmentStaus.data == null)
+ {
+ CustomWriteLog("EquipmentStaus.data灞炴�т负绌�", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ else
+ {
+ for (int i = 0; i < EquipmentStaus.data.Count; i++)
+ {
+ //鍗风粫 娉ㄥ 娴告笉 缁勮 鐨勮澶囪繍琛� 寮�鍏冲仠鏈烘椂闂�
+ if (EquipmentStaus.data[i].no.Contains("KB01ZD") || EquipmentStaus.data[i].no.Contains("KBCY"))
+ {
+ string HBegDate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
+ string HEndDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:00");
+
+ if (DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd") != DateTime.Parse(HEndDate).ToString("yyyy-MM-dd"))
+ {
+ HEndDate = DateTime.Parse(HEndDate).AddMinutes(1).ToString("yyyy-MM-dd HH:mm:00");
+ }
+
+ JsonResult_KB HEqDate = await FindDeviceStatusTimeByNo(Url, token, EquipmentStaus.data[i].no, HBegDate, HEndDate);
+
+ // 璁板綍寮�鏈烘椂闀�
+ CustomWriteLog("璁惧寮�鏈烘椂闀�: 寮�鏈烘椂闀�" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ // 璁板綍鍏虫満鏃堕暱
+ CustomWriteLog("璁惧鍏虫満鏃堕暱: 鍏虫満鏃堕暱" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ // 璁板綍鍋滄満鏃堕暱
+ CustomWriteLog("璁惧鍋滄満鏃堕暱: 鍋滄満鏃堕暱" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ // 璁板綍杩愯鏃堕暱
+ CustomWriteLog("璁惧杩愯鏃堕暱: 杩愯鏃堕暱" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + " " + EquipmentStaus.data[i].no + "",
+ DateTime.Now.ToString("yyyy-MM-dd"));
+
+ JsonData_KB += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"寮�鏈烘椂闀縗",\"HResult\":\"" + ((float)(HEqDate.data.onlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData_KB += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍏虫満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.offlineTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData_KB += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"鍋滄満鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.standbyTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ JsonData_KB += "{\"HDate\":\"" + HEndDate + "\",\"HTechParamName\":\"杩愯鏃堕暱\",\"HResult\":\"" + ((float)(HEqDate.data.runTime / 60 / 60)).ToString("0.00") + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ }
+
+
+ string staus = "";
+ switch (EquipmentStaus.data[i].status)
+ {
+ //-1锛氭湭鐭ワ紝1锛氱绾匡紝2锛氬緟鏈猴紝3锛氭甯歌繍琛岋紝4锛氬憡璀�
+ case "-1":
+ staus = "鏈煡";
+ break;
+ case "1":
+ staus = "绂荤嚎";
+ break;
+ case "2":
+ staus = "寰呮満";
+ break;
+ case "3":
+ staus = "姝e父杩愯";
+ break;
+ case "4":
+ staus = "鍛婅";
+ break;
+ }
+ if (jsonEquipment == null || jsonEquipment.data == null)
+ {
+ // 褰� jsonEquipment 鎴� jsonEquipment.data 涓� null 鏃讹紝缁熶竴璧拌繖閲�
+ JsonData_KB += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":0,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ CustomWriteLog("2.1", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ }
+ else if (jsonEquipment.data.Count > 0)
+ {
+ JsonData_KB += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":1,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ CustomWriteLog("2.2", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ }
+ else
+ {
+ JsonData_KB += "{\"HDate\":\"" + time + "\",\"HTechParamName\":\"寮�鍏虫満鐘舵�乗",\"HResult\":\"" + staus + "\",\"HCount\":0,\"HSourceCode\":\"" + EquipmentStaus.data[i].no + "\"},";
+ CustomWriteLog("2.3", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ }
+
+ }
+ }
+
+ CustomWriteLog("03", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ //鏌ヨ褰撳墠寮�宸ョ殑璁惧 鑾峰彇瀵瑰簲鐨勭墿鏂欎俊鎭�
+ DataSet datable = oCN.RunProcReturn(@"select m.HNumber,eq.HEquipFileNo from Sc_ICMOBillStatus_Tmp a
+ inner join Gy_EquipFileBillMain eq on a.HSourceID = eq.HSourceID
+ inner join Gy_Material m on a.HMaterID = m.HItemID
+ where a.HICMOStatus = '1' ", "Sc_ICMOBillStatus_Tmp");
+
+ if (datable.Tables[0].Rows.Count > 0)
+ {
+ for (int i = 0; i < datable.Tables[0].Rows.Count; i++)
+ {
+ string HSourceCode = datable.Tables[0].Rows[i]["HEquipFileNo"].ToString();
+ string HNumber = datable.Tables[0].Rows[i]["HNumber"].ToString();
+
+ JsonData_KB += "{\"HDate\":\"" + DateTime.Now.ToString() + "\",\"HTechParamName\":\"鐗╂枡浠g爜\",\"HResult\":\"" + HNumber + "\",\"HCount\":1,\"HSourceCode\":\"" + HSourceCode + "\"},";
+ }
+ }
+
+ CustomWriteLog("04", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ JsonData_KB = JsonData_KB.Substring(0, JsonData_KB.Length - 1);
+ JsonData_KB += "]}";
+
+ CustomWriteLog("缁撴潫鎵�鏈�", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ //淇濆瓨鏁版嵁
+ DataSave(JsonData_KB);
+ if (TimeDate != "")
+ {
+ TimeDate = time;
+ }
+ }
+ }
+
+ //鏁版嵁淇濆瓨
+ public void DataSave(string JsonData_KB)
+ {
+ JsonEquipmentData_KB data = JsonConvert.DeserializeObject<JsonEquipmentData_KB>(JsonData_KB);
+
+ for (int i = 0; i < data.data.Count; i++)
+ {
+ oCN.RunProc(@"insert into Sb_EquipMentCollectionTechParam_Temp(HDate,HSourceCode,HTechParamID,HTechParamName,HCount
+ ,HCreateTime,HResult,HProcNumber,HFlag)
+ values(getdate(),'" + data.data[i].HSourceCode + "',0,'" + data.data[i].HTechParamName + "'," + data.data[i].HCount
+ + ",'" + data.data[i].HDate + "','" + data.data[i].HResult + "','" + data.data[i].HProcNumber + "',0)");
+
+ }
+ ListData.Items.Add($"鏃堕棿: {DateTime.Now:yyyy-MM-dd HH:mm:ss}锛屽姞杞芥垚鍔�");
+ }
+
+ //瀹氭椂鐢熸垚浜ч噺姹囨姤鍗�
+ private async void Time_CLHB_Tick(object sender, EventArgs e)
+ {
+ //this.Time_CLHB.Enabled = false;
+ string Url = DBHelper.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "Config/SQLAPI.config", "sUrl");
+ string urls = Url + EquipmentType_KB.One;
+ // 鍑嗗瑕佸彂閫佺殑琛ㄥ崟鏁版嵁
+ var formData = new FormUrlEncodedContent(new[]
+ {
+ new KeyValuePair<string, string>("userName", "admin"),
+ new KeyValuePair<string, string>("password", "Youngsunabc123..")
+ // 娣诲姞鏇村閿�煎锛屾牴鎹偍鐨勯渶瑕�
+ });
+ JsonResult_KB jsonResult = await getUrl(urls, formData);
+ string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ string token = jsonResult.data.token;
+
+ //鑾峰彇鎵�鏈夌殑璁惧鏁版嵁
+ JsonEquipmentData_KB jsonEquipment = await FindDeviceList(Url, token);
+
+ if (jsonEquipment.code != "0")
+ {
+ MessageBox.Show("璁惧鍒楄〃鎶ラ敊:" + jsonEquipment.message);
+ }
+ else
+ {
+ string nos = "";
+ //鑾峰彇鍘昏澶囩紪鐮�
+ for (int i = 0; i < jsonEquipment.data.Count; i++)
+ {
+ nos += "''" + jsonEquipment.data[i].no + "'',";
+ //if (jsonEquipment.data[i].no.Contains("JS_ZS"))
+ //{
+ // nos += "''" + jsonEquipment.data[i].no + "'',";
+ //}
+ }
+ nos = nos.Substring(0, nos.Length - 1);
+
+ //this.Time_CLHB.Enabled = false;
+
+ CustomWriteLog("浜ч噺姹囨姤鍗曪紝璁惧缂栫爜锛�'"+ nos + "'", DateTime.Now.ToString("yyyy-MM-dd"));
+
+ //鏌ヨ寮�宸ョ殑璁惧淇℃伅 浠ュ強 鏌ヨ褰撳ぉ璁惧瀵瑰簲鐨勫紑宸ユ椂闂� 鍜屽畬宸ユ椂闂�
+ DataSet ds = oCN.RunProcReturn("exec h_p_Sc_TimeICMOReporList '" + nos + "'", "h_p_Sc_TimeICMOReporList");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ //鏍规嵁褰撳ぉ鍙紑宸ユ病鏈夊畬宸ュ搴旂殑浜ч噺鏁版嵁 鐢熸垚浜ч噺姹囨姤鍗�
+ DataTable dt = ds.Tables[0];
+ for (int i = 0; i < dt.Rows.Count; i++)
+ {
+ nos = dt.Rows[i]["璁惧缂栫爜"].ToString();
+ string HICMInterID = dt.Rows[i]["HInterID"].ToString();
+ string HBegDate = DateTime.Parse(dt.Rows[i]["鏃ユ湡"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
+ string HEndDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ jsonEquipment = await FindProdByNosAndTime(Url, token, nos, HBegDate, HEndDate);
+ if (decimal.Parse(jsonEquipment.data[0].prod) > 0)
+ {
+ //鐢熸垚浜ч噺姹囨姤鍗�
+ oCN.RunProc("exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "'");
+ CustomWriteLog("鐢熸垚浜ч噺姹囨姤鍗�1锛�'exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "''", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ }
+ }
+ if (ds.Tables[1].Rows.Count > 0)
+ {
+ //鏍规嵁褰撳ぉ寮�宸ュ苟涓斿畬宸ュ搴旂殑浜ч噺鏁版嵁 鐢熸垚浜ч噺姹囨姤鍗�
+ DataTable dt = ds.Tables[1];
+ for (int i = 0; i < dt.Rows.Count; i++)
+ {
+ nos = dt.Rows[i]["璁惧缂栫爜"].ToString();
+ string HICMInterID = dt.Rows[i]["HInterID"].ToString();
+ string HBegDate = DateTime.Parse(dt.Rows[i]["寮�濮嬫棩鏈�"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
+ string HEndDate = DateTime.Parse(dt.Rows[i]["缁撴潫鏃ユ湡"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
+ jsonEquipment = await FindProdByNosAndTime(Url, token, nos, HBegDate, HEndDate);
+ if (decimal.Parse(jsonEquipment.data[0].prod) > 0)
+ {
+ //鐢熸垚浜ч噺姹囨姤鍗�
+ oCN.RunProc("exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "'");
+ CustomWriteLog("鐢熸垚浜ч噺姹囨姤鍗�2锛�'exec h_p_Sc_AddTimeICMORepor " + HICMInterID + "," + jsonEquipment.data[0].prod + ",'" + HEndDate + "''", DateTime.Now.ToString("yyyy-MM-dd"));
+ }
+ }
+ }
+ }
+
+ }
+
+ private void EquipmentCollectionForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (MessageBox.Show("纭畾瑕佸叧闂悧锛�", "纭", MessageBoxButtons.YesNo) == DialogResult.No)
+ {
+ e.Cancel = true;
+ }
+ }
+
+ private void txtHMaker_Leave(object sender, EventArgs e)
+ {
+ if (string.IsNullOrWhiteSpace(txtHMaker.Text))
+ {
+ this.txtHMaker.ForeColor = Color.LightGray;
+ txtHMaker.Text = "璇疯緭鍏ョ敤鎴风紪鐮�!";
+ }
+ }
+
+ private void txtHMaker_Enter(object sender, EventArgs e)
+ {
+ if (txtHMaker.Text.Trim() == "璇疯緭鍏ョ敤鎴风紪鐮�!")
+ {
+ txtHMaker.Text = "";
+ this.txtHMaker.ForeColor = Color.Black;
+ }
+ }
+
+ private void txtHMaker_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Enter)
+ {
+ SelectHMaker(this.txtHMaker.Text);
+ }
+ }
+
+
+ //鏌ヨ鑱屽憳淇℃伅
+ public void SelectHMaker(string txtHMaker)
+ {
+ try
+ {
+ DataSet ds = oCN.RunProcReturn("select HItemID,HName,HNumber from Gy_Employee where HNumber='" + txtHMaker + "' or HName ='" + txtHMaker + "'", "Gy_Employee");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ string HName = ds.Tables[0].Rows[0]["HName"].ToString();
+ string HMakerID = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ string HNumber = ds.Tables[0].Rows[0]["HNumber"].ToString();
+ this.txtHMaker.Text = HName;
+ this.txtHMakerNumber.Text = HNumber;
+ this.labHMakerID.Text = HMakerID;
+ this.txtHMaker.ReadOnly = true;
+ }
+ else
+ {
+ MessageBox.Show(this, "缂栫爜:" + txtHMaker + ",鏌ユ棤鏁版嵁,鍙兘鏄緭鍏ョ紪鐮佹湁璇�!", "鎻愮ず");
+ }
+ }
+ catch (Exception e)
+ {
+ MessageBox.Show(this, e.Message, "鎻愮ず");
+ }
+ }
+
+ private void EquipmentCollectionForm_Activated(object sender, EventArgs e)
+ {
+ //鍏夋爣閫変腑鍒跺崟浜�
+ this.txtHMaker.Focus();
+ }
+
+ private static readonly object lockObj = new object();
+ //鍐欐棩蹇�
+ public static void CustomWriteLog(object obj, string FileName, string filePath = "Vlog", bool isAppend = true)
+ {
+ try
+ {
+ lock (lockObj)
+ {
+ filePath = $@"{filePath}\{FileName}.txt";
+
+ filePath = AppDomain.CurrentDomain.BaseDirectory + filePath;
+
+ if (!System.IO.Directory.Exists(Path.GetDirectoryName(filePath)))
+ {
+ System.IO.Directory.CreateDirectory(Path.GetDirectoryName(filePath));
+ }
+
+ bool fileExists = System.IO.File.Exists(filePath);
+ //涓嶅瓨鍦� 鍒欏垱寤鸿鏂囦欢
+ if (!fileExists)
+ {
+ System.IO.File.Create(filePath).Close();
+ }
+
+ using (StreamWriter writer = new StreamWriter(filePath, isAppend))
+ {
+ //瀛樺湪鐨勬椂鍊欐墠鍐欎竴琛�
+ if (fileExists && isAppend)
+ {
+ writer.WriteLine();
+ }
+
+ var content = obj is string ? obj : JsonConvert.SerializeObject(obj);
+ writer.WriteLine($"{DateTime.Now} {content}");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+ }
+
+
+ public class JsonResult_KB
+ {
+ public string code { get; set; }
+ public string message { get; set; }
+ public string expirationTime { get; set; }
+ public string token { get; set; }
+ public JsonData_KB data { get; set; }
+ }
+
+ public class JsonEquipmentData_KB
+ {
+ public string code { get; set; }
+ public string message { get; set; }
+ public string expirationTime { get; set; }
+ public string token { get; set; }
+ public string deviceNo { get; set; }
+ public string deviceName { get; set; }
+ public string deviceStatus { get; set; }
+ public List<JsonData_KB> data { get; set; }
+ }
+
+ public class JsonData_KB
+ {
+ public double onlineTime { get; set; }
+ public double offlineTime { get; set; }
+ public double standbyTime { get; set; }
+ public double runTime { get; set; }
+ public string expirationTime { get; set; }
+ public string token { get; set; }
+ public string deviceNo { get; set; }
+ public List<propsData_KB> props { get; set; }
+ public string area { get; set; }
+ public string no { get; set; }
+ public string name { get; set; }
+ public string status { get; set; }
+ public string prod { get; set; }
+ public string propName { get; set; }
+ public string basePropId { get; set; }
+ public string value { get; set; }
+ public string time { get; set; }
+ public int propId { get; set; }
+ public double count { get; set; }
+ public double min { get; set; }
+ public double max { get; set; }
+ public double avg { get; set; }
+ public double sum { get; set; }
+ public string createTime { get; set; }
+ public string happenTime { get; set; }
+ public string HDate { get; set; }
+ public string HTechParamName { get; set; }
+ public string HResult { get; set; }
+ public string HCount { get; set; }
+ public string HSourceCode { get; set; }
+ public string HProcNumber { get; set; }
+ }
+
+ public class propsData_KB
+ {
+ public string propName { get; set; }
+ public List<JsonData_KB> datas { get; set; }
+ public string basePropId { get; set; }
+ }
+
+ public class valueData_KB
+ {
+ public string beat { get; set; }
+ public string type { get; set; }
+ }
+
+ //璁惧鎺ュ彛
+ public static class EquipmentType_KB
+ {
+ //璁惧 鑾峰彇浠ょ墝
+ public static string One = "/api/third/findAccessToken";
+ //璁惧鍒楄〃
+ public static string Two = "/api/third/findDeviceList";
+ //璁惧鐘舵��
+ public static string Three = "/api/third/findDeviceStatusByNos";
+ //璁惧浜ч噺
+ public static string Four = "/api/third/findProdByNosAndTime";
+ //璁惧鏃堕暱
+ public static string Five = "/api/third/findDeviceStatusTimeByNo";
+ //灞炴�у垪琛�
+ public static string Six = "/api/third/findPropertyListByNos";
+ //浜ч噺锛屼笉鑹暟锛屽悎鏍兼暟锛屽彲鐤戞暟 鎬绘暟
+ public static string Seven = "/api/third/findDevicePropCalc";
+ //涓�娈垫椂闂村唴璁惧鐘舵�佺殑鑾峰彇
+ public static string Eight = "/api/third/dayDeviceStatusTimeline";
+ //鑹搧 涓嶈壇鍝� 鏄庣粏 娉ㄥ鏈烘暟鎹�
+ public static string Nine = "/api/third/findAllDevicePropsDetailByTimeRange";
+ //娉ㄥ鏈哄紑鏈烘椂闀� 鏍规嵁 鎿嶄綔妯″紡閲囬泦
+ public static string Ten = "/api/third/findDeviceStatusTimeByNosAndOperationMode";
+ //public static string Eleven = "Monday";
+ //public static string Twelve = "Monday";
+ }
+
+ public class Info_KB
+ {
+ public string Id { get; set; }
+ public string Name { get; set; }
+ }
+
+}
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.resx b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.resx
new file mode 100644
index 0000000..82acfdb
--- /dev/null
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm_KB.resx
@@ -0,0 +1,126 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="Time_CLHB.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>125, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/Program.cs b/WFormSynchronizeData_SMR/EquipmentCollectionForm/Program.cs
index 9033df8..8c447fb 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/Program.cs
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/Program.cs
@@ -16,8 +16,9 @@
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- //Application.Run(new EquipmentCollectionForm());//鏂帿灏�
- Application.Run(new EquipmentCollectionForm_JiuLing());//涔濊彵
+ Application.Run(new EquipmentCollectionForm());//鏂帿灏�
+ //Application.Run(new EquipmentCollectionForm_JiuLing());//涔濊彵
+ //Application.Run(new EquipmentCollectionForm_KB());//鍑礉
}
}
}
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Config/SQLAPI.config b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Config/SQLAPI.config
index 3eb36c3..945beea 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Config/SQLAPI.config
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Config/SQLAPI.config
@@ -17,7 +17,7 @@
<add key="sUser" value="HX_USER"></add>
<add key="sPassword" value="lc@841022"></add>-->
<!--涔濊彵-->
- <add key="sServer" value="192.168.2.10"></add>
+ <!--<add key="sServer" value="192.168.2.10"></add>
<add key="sDataBase" value="HX_LMESsys"></add>
<add key="sUser" value="HX_USER"></add>
<add key="sPassword" value="lc@841022"></add>
@@ -35,6 +35,13 @@
819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,
851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,
883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,289,295,909,287,292,291,
- 275,910,288,911,912,430,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934"></add>
+ 275,910,288,911,912,430,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934"></add>-->
+ <!--鍑礉-->
+ <add key="sServer" value="192.168.50.253"></add>
+ <add key="sDataBase" value="HX_LMESsys"></add>
+ <add key="sUser" value="HX_USER"></add>
+ <add key="sPassword" value="lc@841022"></add>
+ <add key="sUrl" value="http://192.168.120.172:8080/"></add>
+ <add key="basePropIds" value="174,175,505,506,507"></add>
</appSettings>
</configuration>
\ No newline at end of file
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.exe b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.exe
index 5b93a9a..ddcdafe 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.exe
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.exe
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.pdb b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.pdb
index 6c6f704..aab728c 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.pdb
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.pdb
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Vlog/2025-07-01.txt b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Vlog/2025-07-01.txt
new file mode 100644
index 0000000..4e8a73f
--- /dev/null
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/Vlog/2025-07-01.txt
@@ -0,0 +1,55 @@
+2025/7/1 8:33:25 寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細锛�'17'
+
+2025/7/1 8:35:24 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":61,"HSourceCode":"JS_YL_126"}
+
+2025/7/1 8:35:41 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":37,"HSourceCode":"JS_YL_127"}
+
+2025/7/1 8:35:43 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":55,"HSourceCode":"JS_YL_121"}
+
+2025/7/1 8:35:45 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":52,"HSourceCode":"JS_YL_119"}
+
+2025/7/1 8:35:59 寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細锛�'17'
+
+2025/7/1 8:36:01 寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細锛�'17'
+
+2025/7/1 8:36:03 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_22"}
+
+2025/7/1 8:36:04 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":181,"HSourceCode":"JS_YL_126"}
+
+2025/7/1 8:36:05 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":181,"HSourceCode":"JS_YL_126"}
+
+2025/7/1 8:36:06 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_32"}
+
+2025/7/1 8:36:07 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":111,"HSourceCode":"JS_YL_127"}
+
+2025/7/1 8:36:08 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":111,"HSourceCode":"JS_YL_127"}
+
+2025/7/1 8:36:09 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_36"}
+
+2025/7/1 8:36:10 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":137,"HSourceCode":"JS_YL_121"}
+
+2025/7/1 8:36:12 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":137,"HSourceCode":"JS_YL_121"}
+
+2025/7/1 8:36:13 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":16,"HSourceCode":"JS_HX_11"}
+
+2025/7/1 8:36:14 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":156,"HSourceCode":"JS_YL_119"}
+
+2025/7/1 8:37:04 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":156,"HSourceCode":"JS_YL_119"}
+
+2025/7/1 8:37:51 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_41"}
+
+2025/7/1 8:37:52 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_22"}
+
+2025/7/1 8:37:55 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_22"}
+
+2025/7/1 8:37:59 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":3,"HSourceCode":"JS_ZS_34"}
+
+2025/7/1 8:38:00 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_32"}
+
+2025/7/1 8:38:03 {"HDate":"2025-07-01 08:35:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_32"}
+
+2025/7/1 8:38:07 {"HDate":"2025-07-01 08:33:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":0,"HSourceCode":"JS_ZS_44"}
+
+2025/7/1 8:39:38 寮�濮嬪惊鐜伐鑹哄弬鏁版�绘暟涓猴細'18'
+
+2025/7/1 8:40:04 {"HDate":"2025-07-01 08:39:00","HTechParamName":"鐢熶骇鏁伴噺","HResult":"OK","HCount":39,"HSourceCode":"JS_YL_127"}
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index 2366082..92a29bb 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferences.cache
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 5c62993..89ee98d 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.EquipmentCollectionForm_KB.resources b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.EquipmentCollectionForm_KB.resources
new file mode 100644
index 0000000..6c05a97
--- /dev/null
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.EquipmentCollectionForm_KB.resources
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.AssemblyReference.cache b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.AssemblyReference.cache
index 2af9833..f5e894a 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.AssemblyReference.cache
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.AssemblyReference.cache
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.CoreCompileInputs.cache b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.CoreCompileInputs.cache
index 66b8506..f856623 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.CoreCompileInputs.cache
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-871a7c43056aeb42997e224162bd497a3a3ec561
+e15656fbfa8fb249f38cad7e43a31f7eac2ec3d1
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.FileListAbsolute.txt b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.FileListAbsolute.txt
index cb702ff..02b4bef 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.FileListAbsolute.txt
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.FileListAbsolute.txt
@@ -29,6 +29,8 @@
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\bin\Debug\EquipmentCollectionForm.pdb
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\bin\Debug\Newtonsoft.Json.dll
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\bin\Debug\Newtonsoft.Json.xml
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.EquipmentCollectionForm_KB.resources
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.EquipmentCollectionForm_JiuLing.resources
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.EquipmentCollectionForm.resources
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.Properties.Resources.resources
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.csproj.GenerateResource.cache
@@ -36,5 +38,3 @@
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.csproj.CopyComplete
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.exe
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.pdb
-D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.EquipmentCollectionForm_JiuLing.resources
-D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\EquipmentCollectionForm\obj\Debug\EquipmentCollectionForm.csproj.AssemblyReference.cache
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.GenerateResource.cache b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.GenerateResource.cache
index 898d0a5..d0d763b 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.GenerateResource.cache
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.csproj.GenerateResource.cache
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.exe b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.exe
index 5b93a9a..ddcdafe 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.exe
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.exe
Binary files differ
diff --git a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.pdb b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.pdb
index 6c6f704..aab728c 100644
--- a/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.pdb
+++ b/WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.pdb
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index ff57d5a..320fcdc 100644
--- a/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cache
+++ b/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.AssemblyReference.cache b/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.AssemblyReference.cache
index bbc3818..987d201 100644
--- a/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.AssemblyReference.cache
+++ b/WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.AssemblyReference.cache
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs
index ef473c4..b36209a 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs
@@ -717,7 +717,6 @@
string sql = "";
try
{
-
//鏌ヨ鍑虹珯鍗曠殑淇℃伅 鏂逛究鍙傛暟淇濆瓨
DataSet ds = oCN.RunProcReturn(@"select a.HProcExchInterID,a.HProcExchEntryID,a.HProcExchBillNo,a.HProcID,p.HNumber from Sc_StationOutBillMain a WITH(NOLOCK)
left join Gy_Process p WITH(NOLOCK) on a.HProcID=p.HItemID where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Sc_StationOutBillMain");
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.application b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.application
index 4c70611..f1e31ae 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.application
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.application
@@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>XmpBiwt1eZIvqKXjCIffhLl/VWIWnjOikOcUNFESV1M=</dsig:DigestValue>
+ <dsig:DigestValue>H5D2JPR/bF9+O7RagJ2/iBfGTLW4VBTjLlWnIk3yO5c=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe
index 68ba80e..f9b7be9 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe.manifest b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe.manifest
index 20aa39f..75ac6b0 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe.manifest
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.exe.manifest
@@ -54,14 +54,14 @@
</dependentAssembly>
</dependency>
<dependency>
- <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="72704">
+ <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="79360">
<assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>1YFOk8YtybXMEv1eO1KRN167fneXsT9CiZSGjddw0vM=</dsig:DigestValue>
+ <dsig:DigestValue>71Wd/mqmExQAbBeQq0s8CaqiLiCOH5ixug/DXewB5YA=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.pdb b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.pdb
index 7018bc4..9677935 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.pdb
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/WFormSynchronizeData_SMR.pdb
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/app.publish/WFormSynchronizeData_SMR.exe b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/app.publish/WFormSynchronizeData_SMR.exe
index 68ba80e..f9b7be9 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/app.publish/WFormSynchronizeData_SMR.exe
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/bin/Debug/app.publish/WFormSynchronizeData_SMR.exe
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.application b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.application
index 4c70611..f1e31ae 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.application
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.application
@@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>XmpBiwt1eZIvqKXjCIffhLl/VWIWnjOikOcUNFESV1M=</dsig:DigestValue>
+ <dsig:DigestValue>H5D2JPR/bF9+O7RagJ2/iBfGTLW4VBTjLlWnIk3yO5c=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache
index e69e379..4407684 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-0d7167dfce51cf79dfbc10e91d9c9104f5325c66
+26dae674e9b2dfc8dea3408f187efe2962792c50
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.FileListAbsolute.txt b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.FileListAbsolute.txt
index c23b1af..8a9da1e 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.FileListAbsolute.txt
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.FileListAbsolute.txt
@@ -49,3 +49,21 @@
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.CopyComplete
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.exe
D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.pdb
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.exe.config
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.exe.manifest
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.application
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.exe
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\WFormSynchronizeData_SMR.pdb
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\Newtonsoft.Json.dll
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\bin\Debug\Newtonsoft.Json.xml
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.AssemblyReference.cache
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.FormBack.resources
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.Form1.resources
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.Properties.Resources.resources
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.GenerateResource.cache
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.CoreCompileInputs.cache
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.exe.manifest
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.application
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.csproj.CopyComplete
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.exe
+D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒鍗曞搧杩囩珯鎻掍欢\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\obj\Debug\WFormSynchronizeData_SMR.pdb
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.GenerateResource.cache b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.GenerateResource.cache
index 84d43f8..15b065b 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.GenerateResource.cache
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.csproj.GenerateResource.cache
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe
index 68ba80e..f9b7be9 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe
Binary files differ
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe.manifest b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe.manifest
index 20aa39f..75ac6b0 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe.manifest
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.exe.manifest
@@ -54,14 +54,14 @@
</dependentAssembly>
</dependency>
<dependency>
- <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="72704">
+ <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WFormSynchronizeData_SMR.exe" size="79360">
<assemblyIdentity name="WFormSynchronizeData_SMR" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
- <dsig:DigestValue>1YFOk8YtybXMEv1eO1KRN167fneXsT9CiZSGjddw0vM=</dsig:DigestValue>
+ <dsig:DigestValue>71Wd/mqmExQAbBeQq0s8CaqiLiCOH5ixug/DXewB5YA=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
diff --git a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.pdb b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.pdb
index 7018bc4..9677935 100644
--- a/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.pdb
+++ b/WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/WFormSynchronizeData_SMR.pdb
Binary files differ
--
Gitblit v1.9.1