zrg
2025-11-24 572702f6f763e47a26c807264e7dee573375b6de
优化斯莫尔 数采 接口循环调用失败
15个文件已修改
1个文件已添加
1个文件已删除
83 ■■■■ 已修改文件
WFormSynchronizeData_SMR/.vs/WFormSynchronizeData_SMR/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.exe 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.exe 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/Program.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/ZZ_GlueWeigh.cs 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/bin/Debug/WFormReadData_SMR.exe 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/bin/Debug/WFormReadData_SMR.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/bin/点胶称重Debug.zip 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.exe 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cache 补丁 | 查看 | 原始文档 | blame | 历史
WFormSynchronizeData_SMR/.vs/WFormSynchronizeData_SMR/v16/.suo
Binary files differ
WFormSynchronizeData_SMR/EquipmentCollectionForm/EquipmentCollectionForm.cs
@@ -1025,6 +1025,8 @@
                            JsonEquipmentData data = await FindDevicePropCalc(Url, token, jsonEquipment.data[i].deviceNo, TimeDate, time);
                            await Task.Delay(200);
                            for (int j = 0; j < data.data.Count; j++)
                            {
                                //合格数
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.exe
Binary files differ
WFormSynchronizeData_SMR/EquipmentCollectionForm/bin/Debug/EquipmentCollectionForm.pdb
Binary files differ
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.exe
Binary files differ
WFormSynchronizeData_SMR/EquipmentCollectionForm/obj/Debug/EquipmentCollectionForm.pdb
Binary files differ
WFormSynchronizeData_SMR/WFormReadData_SMR/Program.cs
@@ -17,8 +17,8 @@
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new ReadCoordinateExcelFrom());
            //Application.Run(new ZZ_GlueWeigh());//点胶称重
            Application.Run(new ReadCoordinateExcelFrom());//三坐标、轮廓仪
            Application.Run(new ZZ_GlueWeigh());//点胶称重
            //Application.Run(new ReadCoordinateExcelFrom());//三坐标、轮廓仪
        }
    }
}
WFormSynchronizeData_SMR/WFormReadData_SMR/ZZ_GlueWeigh.cs
@@ -1,8 +1,10 @@
using System;
using 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.Text;
using System.Threading.Tasks;
@@ -158,7 +160,16 @@
                        MessageBox.Show("设备错误!");
                        break;
                }
                var sql = @"select top 1 HTechParamName,HResult,HCreateTime from Sb_EquipMentCollectionTechParam_Temp
                where HSourceCode = '" + HNumber + @"' and HTechParamName = '顶部点胶重量' and HCreateTime in(
                select  max(HCreateTime) from  Sb_EquipMentCollectionTechParam_Temp
                where HSourceCode = '" + HNumber + @"' and HTechParamName = '顶部点胶重量')
                union
                select top 1 HTechParamName,HResult,HCreateTime from Sb_EquipMentCollectionTechParam_Temp
                where HSourceCode = '" + HNumber + @"' and HTechParamName = '底部点胶重量' and HCreateTime in(
                select  max(HCreateTime) from  Sb_EquipMentCollectionTechParam_Temp
                where HSourceCode = '" + HNumber + @"' and HTechParamName = '底部点胶重量')";
                CustomWriteLog("查询"+ sql, DateTime.Now.ToString("yyyy-MM-dd"));
                //查询 é¡¶éƒ¨ç‚¹èƒ¶é‡é‡ å’Œ  åº•部点胶重量 å½“前最大的数据
                DataSet ds = oCN.RunProcReturn(@"select top 1 HTechParamName,HResult,HCreateTime from Sb_EquipMentCollectionTechParam_Temp 
                where HSourceCode = '" + HNumber + @"' and HTechParamName = '顶部点胶重量' and HCreateTime in(
@@ -179,6 +190,8 @@
                if (ds.Tables[0].Rows.Count > 0)
                {
                    CustomWriteLog("查询到数据", DateTime.Now.ToString("yyyy-MM-dd"));
                    //查询 é¡¶éƒ¨ç‚¹èƒ¶é‡é‡ å’Œ  åº•部点胶重量 å½“前最大的数据
                    //获取  é¡¶éƒ¨ç‚¹èƒ¶é‡é‡ å’Œ åº•部点胶重量
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
@@ -189,7 +202,7 @@
                            {
                                string HResult = ds.Tables[0].Rows[i]["HResult"].ToString();
                                dataTable.Rows[j]["Actual"] = HResult;
                                CustomWriteLog("查询到数据1", DateTime.Now.ToString("yyyy-MM-dd"));
                                switch (HTechParamName)
                                {
                                    case "顶部点胶重量":
@@ -202,7 +215,7 @@
                                        MessageBox.Show("设备错误!");
                                        break;
                                }
                                 CustomWriteLog("查询到数据2" + this.BeforeWeigh.Text + this.AfterWeigh.Text, DateTime.Now.ToString("yyyy-MM-dd"));
                                //switch (HTechParamName)
                                //{
                                //    case "螺牙检测数据":
@@ -288,7 +301,15 @@
            dataTable.Columns.Add("HInspectInstruMentID");
            dataTable.Columns.Add("HQCCheckItemHName");
            var sql = @"select b.HInspectInstruMentID,a.HInterID HQCSchemeID,b.HQCCheckItemID, ch.HNumber HQCCheckItemNumber,ch.HName HQCCheckItemHName,m.HNumber,HUpLimit,HDownLimit,HTargetVal
from Sc_ProcessExchangeBillMain pr with(nolock)
inner join Gy_QCCheckProjectMain a with(nolock) on pr.HMaterID=a.HMaterID
inner join Gy_QCCheckProjectSub b with(nolock) on a.HInterID=b.HInterID
inner join Gy_InspectInstruMent men  with(nolock) on b.HInspectInstruMentID=men.HItemID   and men.HNumber='" + HNumber + @"'
left join Gy_Material m with(nolock) on a.HMaterID=m.HItemID
left join Gy_QCCheckItem ch with(nolock) on b.HQCCheckItemID=ch.HItemID
where pr.HBillNo='" + this.txtLzk.Text + "'";
            CustomWriteLog("查询"+ sql, DateTime.Now.ToString("yyyy-MM-dd"));
            //修改是在哪个设备上进行的数据采集 b.HInspectInstruMentID=1  ä¸‰åæ ‡1    è½®å»“仪2
            DataSet dataSet = oCN.RunProcReturn(@"select b.HInspectInstruMentID,a.HInterID HQCSchemeID,b.HQCCheckItemID, ch.HNumber HQCCheckItemNumber,ch.HName HQCCheckItemHName,m.HNumber,HUpLimit,HDownLimit,HTargetVal 
from Sc_ProcessExchangeBillMain pr with(nolock)
@@ -673,5 +694,48 @@
            //光标选中制单人
            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)
            {
            }
        }
    }
}
WFormSynchronizeData_SMR/WFormReadData_SMR/bin/Debug/WFormReadData_SMR.exe
Binary files differ
WFormSynchronizeData_SMR/WFormReadData_SMR/bin/Debug/WFormReadData_SMR.pdb
Binary files differ
WFormSynchronizeData_SMR/WFormReadData_SMR/bin/µã½º³ÆÖØDebug.zip
Binary files differ
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.AssemblyReference.cache
Binary files differ
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.csproj.FileListAbsolute.txt
@@ -117,4 +117,3 @@
D:\工作代码\智云迈思\单品过站插件\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.csproj.CopyComplete
D:\工作代码\智云迈思\单品过站插件\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.exe
D:\工作代码\智云迈思\单品过站插件\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.pdb
D:\工作代码\智云迈思\单品过站插件\WFormSynchronizeData_SMR\WFormSynchronizeData_SMR\WFormReadData_SMR\obj\Debug\WFormReadData_SMR.csproj.AssemblyReference.cache
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.exe
Binary files differ
WFormSynchronizeData_SMR/WFormReadData_SMR/obj/Debug/WFormReadData_SMR.pdb
Binary files differ
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/Form1.cs
@@ -1029,7 +1029,7 @@
                long HICMOEntryID = 0;
                string HICMOBillNo = "";
                CustomWriteLog("新增不良汇报1.3:"+ dic["HBarCode"].ToString()+  dic["HProcNumber"].ToString() , DateTime.Now.ToString("yyyy-MM-dd"));
                CustomWriteLog("新增不良汇报1.3:"+ dic["HBarCode"].ToString()   +       dic["HProcNumber"].ToString() , DateTime.Now.ToString("yyyy-MM-dd"));
                //根据 æ¡ç +工序 æŸ¥è¯¢æµè½¬å¡ä¿¡æ¯
                ds = oCN.RunProcReturn(@"select b.HProcID, HMaterID,HUnitID,a.HICMOInterID,a.HICMOEntryID,a.HICMOBillNo,HBillNo,a.HInterID,b.HEntryID,a.HBillNo from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
inner join Sc_ProcessExchangeBillSub b  WITH(NOLOCK) on a.HInterID=b.HInterID
WFormSynchronizeData_SMR/WFormSynchronizeData_SMR/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary files differ