Explorar o código

modify:修改设备查询地址

runming56 hai 1 ano
pai
achega
bafa31e826

BIN=BIN
.vs/lqnet/FileContentIndex/7e8bcefc-f2d5-4561-9ef9-55f79cf00c95.vsidx


BIN=BIN
.vs/lqnet/FileContentIndex/9ed424c7-f4cb-42a0-9c22-4e37d24ee0d9.vsidx


BIN=BIN
.vs/lqnet/FileContentIndex/a2b9a506-6891-4a0d-ad4d-00b9f3b35366.vsidx


BIN=BIN
.vs/lqnet/FileContentIndex/a51183de-8f95-48f4-bf77-886e8c89b6ca.vsidx


BIN=BIN
.vs/lqnet/v17/.suo


+ 2 - 1
lqnet/Api/CallApi.cs

@@ -61,7 +61,8 @@ namespace lqnet.Api
         /// <returns></returns>
         public static R queryDeviceList(DeviceQueryDTO dto)
         {
-            return CommonApi.GetApi("equit/equitInstru/list", dto);
+            //后期改为/unAuthList路径
+            return CommonApi.GetApi("equit/equitInstru/unAuthList", dto);
         }
         /// <summary>
         /// 读取文件配置

+ 7 - 79
lqnet/Forms/DevicePopupForm.cs

@@ -34,12 +34,6 @@ namespace lqnet.Forms
         private System.Windows.Forms.TextBox deviceNoTb;
         private System.Windows.Forms.Button searchBtn;
         private DataGridView dataGridView1;
-        private DataGridViewTextBoxColumn Index;
-        private DataGridViewTextBoxColumn propertyCode;
-        private DataGridViewTextBoxColumn equitName;
-        private DataGridViewTextBoxColumn equitChildType;
-        private DataGridViewTextBoxColumn manageEquitCode;
-        private DataGridViewTextBoxColumn equitParameter;
         private DataGridViewTextBoxColumn indexDataGridViewTextBoxColumn;
         private DataGridViewTextBoxColumn equitChildTypeDataGridViewTextBoxColumn;
         private DataGridViewTextBoxColumn propertyCodeDataGridViewTextBoxColumn;
@@ -57,12 +51,6 @@ namespace lqnet.Forms
         {
             this.components = new System.ComponentModel.Container();
             this.dataGridView1 = new System.Windows.Forms.DataGridView();
-            this.Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.propertyCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.equitName = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.equitChildType = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.manageEquitCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.equitParameter = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.indexDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.equitChildTypeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.propertyCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -87,16 +75,10 @@ namespace lqnet.Forms
             this.dataGridView1.AutoGenerateColumns = false;
             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.Index,
-            this.propertyCode,
-            this.equitName,
-            this.equitChildType,
-            this.manageEquitCode,
-            this.equitParameter,
             this.indexDataGridViewTextBoxColumn,
-            this.equitChildTypeDataGridViewTextBoxColumn,
             this.propertyCodeDataGridViewTextBoxColumn,
             this.equitNameDataGridViewTextBoxColumn,
+            this.equitChildTypeDataGridViewTextBoxColumn,
             this.manageEquitCodeDataGridViewTextBoxColumn,
             this.equitParameterDataGridViewTextBoxColumn});
             this.dataGridView1.DataSource = this.deviceListBindingSource;
@@ -108,64 +90,10 @@ namespace lqnet.Forms
             this.dataGridView1.Size = new System.Drawing.Size(936, 278);
             this.dataGridView1.TabIndex = 0;
             // 
-            // Index
-            // 
-            this.Index.DataPropertyName = "Index";
-            this.Index.HeaderText = "序号";
-            this.Index.MinimumWidth = 8;
-            this.Index.Name = "Index";
-            this.Index.ReadOnly = true;
-            this.Index.Width = 120;
-            // 
-            // propertyCode
-            // 
-            this.propertyCode.DataPropertyName = "propertyCode";
-            this.propertyCode.HeaderText = "资产编号";
-            this.propertyCode.MinimumWidth = 8;
-            this.propertyCode.Name = "propertyCode";
-            this.propertyCode.ReadOnly = true;
-            this.propertyCode.Width = 150;
-            // 
-            // equitName
-            // 
-            this.equitName.DataPropertyName = "equitName";
-            this.equitName.HeaderText = "设备名称";
-            this.equitName.MinimumWidth = 8;
-            this.equitName.Name = "equitName";
-            this.equitName.ReadOnly = true;
-            this.equitName.Width = 150;
-            // 
-            // equitChildType
-            // 
-            this.equitChildType.DataPropertyName = "equitChildType";
-            this.equitChildType.HeaderText = "设备类型";
-            this.equitChildType.MinimumWidth = 8;
-            this.equitChildType.Name = "equitChildType";
-            this.equitChildType.ReadOnly = true;
-            this.equitChildType.Width = 150;
-            // 
-            // manageEquitCode
-            // 
-            this.manageEquitCode.DataPropertyName = "manageEquitCode";
-            this.manageEquitCode.HeaderText = "管理编号";
-            this.manageEquitCode.MinimumWidth = 8;
-            this.manageEquitCode.Name = "manageEquitCode";
-            this.manageEquitCode.ReadOnly = true;
-            this.manageEquitCode.Width = 150;
-            // 
-            // equitParameter
-            // 
-            this.equitParameter.DataPropertyName = "equitParameter";
-            this.equitParameter.HeaderText = "设备参数";
-            this.equitParameter.MinimumWidth = 8;
-            this.equitParameter.Name = "equitParameter";
-            this.equitParameter.ReadOnly = true;
-            this.equitParameter.Width = 150;
-            // 
             // indexDataGridViewTextBoxColumn
             // 
             this.indexDataGridViewTextBoxColumn.DataPropertyName = "Index";
-            this.indexDataGridViewTextBoxColumn.HeaderText = "Index";
+            this.indexDataGridViewTextBoxColumn.HeaderText = "序号";
             this.indexDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.indexDataGridViewTextBoxColumn.Name = "indexDataGridViewTextBoxColumn";
             this.indexDataGridViewTextBoxColumn.Width = 150;
@@ -173,7 +101,7 @@ namespace lqnet.Forms
             // equitChildTypeDataGridViewTextBoxColumn
             // 
             this.equitChildTypeDataGridViewTextBoxColumn.DataPropertyName = "equitChildType";
-            this.equitChildTypeDataGridViewTextBoxColumn.HeaderText = "equitChildType";
+            this.equitChildTypeDataGridViewTextBoxColumn.HeaderText = "设备类型";
             this.equitChildTypeDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.equitChildTypeDataGridViewTextBoxColumn.Name = "equitChildTypeDataGridViewTextBoxColumn";
             this.equitChildTypeDataGridViewTextBoxColumn.Width = 150;
@@ -181,7 +109,7 @@ namespace lqnet.Forms
             // propertyCodeDataGridViewTextBoxColumn
             // 
             this.propertyCodeDataGridViewTextBoxColumn.DataPropertyName = "propertyCode";
-            this.propertyCodeDataGridViewTextBoxColumn.HeaderText = "propertyCode";
+            this.propertyCodeDataGridViewTextBoxColumn.HeaderText = "资产编号";
             this.propertyCodeDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.propertyCodeDataGridViewTextBoxColumn.Name = "propertyCodeDataGridViewTextBoxColumn";
             this.propertyCodeDataGridViewTextBoxColumn.Width = 150;
@@ -189,7 +117,7 @@ namespace lqnet.Forms
             // equitNameDataGridViewTextBoxColumn
             // 
             this.equitNameDataGridViewTextBoxColumn.DataPropertyName = "equitName";
-            this.equitNameDataGridViewTextBoxColumn.HeaderText = "equitName";
+            this.equitNameDataGridViewTextBoxColumn.HeaderText = "设备名称";
             this.equitNameDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.equitNameDataGridViewTextBoxColumn.Name = "equitNameDataGridViewTextBoxColumn";
             this.equitNameDataGridViewTextBoxColumn.Width = 150;
@@ -197,7 +125,7 @@ namespace lqnet.Forms
             // manageEquitCodeDataGridViewTextBoxColumn
             // 
             this.manageEquitCodeDataGridViewTextBoxColumn.DataPropertyName = "manageEquitCode";
-            this.manageEquitCodeDataGridViewTextBoxColumn.HeaderText = "manageEquitCode";
+            this.manageEquitCodeDataGridViewTextBoxColumn.HeaderText = "管理编号";
             this.manageEquitCodeDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.manageEquitCodeDataGridViewTextBoxColumn.Name = "manageEquitCodeDataGridViewTextBoxColumn";
             this.manageEquitCodeDataGridViewTextBoxColumn.Width = 150;
@@ -205,7 +133,7 @@ namespace lqnet.Forms
             // equitParameterDataGridViewTextBoxColumn
             // 
             this.equitParameterDataGridViewTextBoxColumn.DataPropertyName = "equitParameter";
-            this.equitParameterDataGridViewTextBoxColumn.HeaderText = "equitParameter";
+            this.equitParameterDataGridViewTextBoxColumn.HeaderText = "设备参数";
             this.equitParameterDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.equitParameterDataGridViewTextBoxColumn.Name = "equitParameterDataGridViewTextBoxColumn";
             this.equitParameterDataGridViewTextBoxColumn.Width = 150;

+ 35 - 11
lqnet/Forms/MainForm.cs

@@ -56,6 +56,14 @@ namespace lqnet.Forms
         /// 指标上下文
         /// </summary>
         public List<ItemIndx> indexList;
+        /// <summary>
+        /// 记录开始坐标的旧值
+        /// </summary>
+        private string oldStartIndxTextboxValue = string.Empty;
+        /// <summary>
+        /// 记录合并行的旧值
+        /// </summary>
+        private int oldmergeCountTextboxValue = 0;
 
         public MainForm(Form parentForm, DeviceInfo device)
         {
@@ -114,23 +122,23 @@ namespace lqnet.Forms
         private void StartIdxText_Changed(object sender, EventArgs e)
         {
             TextBox textBox = (TextBox)sender;
-            string oldValue = textBox.Tag?.ToString(); // 获取之前的值
             string newValue = textBox.Text; // 获取当前的值
-            if(!string.IsNullOrEmpty(oldValue) && !newValue.Equals(oldValue))
+            if(!string.IsNullOrEmpty(oldStartIndxTextboxValue) && !newValue.Equals(oldStartIndxTextboxValue))
             {
                 dataGridView2IsChange = true;
             }
+            oldStartIndxTextboxValue = newValue;
         }
 
         private void MergeCountTextbox_Changed(object sender, EventArgs e)
         {
             NumericUpDown textBox = (NumericUpDown)sender;
-            string oldValue = textBox.Tag?.ToString(); // 获取之前的值
-            string newValue = textBox.Text; // 获取当前的值
-            if (!string.IsNullOrEmpty(oldValue) && !newValue.Equals(oldValue))
+            decimal newValue = textBox.Value; // 获取当前的值
+            if (oldmergeCountTextboxValue>0 && newValue!=oldmergeCountTextboxValue)
             {
                 dataGridView2IsChange = true;
             }
+            oldmergeCountTextboxValue = int.Parse(textBox.Text);
         }
 
         /// <summary>
@@ -569,7 +577,8 @@ namespace lqnet.Forms
                 });
                 if (r.Code == MyConstants.CODE_SUCCESS_200)
                 {
-                    Func_My_CheckItemComboBox_ClearAndInit();
+                    clearParams();
+                    this.CheckItemComboBox.SelectedIndex = 0;
                     MessageBox.Show("数据上传成功,可至终端查看,信息:" + r.Msg, "提示", MessageBoxButtons.OK);
                 }
                 else if (r.Code == MyConstants.CODE_FAIL_500)
@@ -652,8 +661,14 @@ namespace lqnet.Forms
                 this.Invoke((EventHandler)(delegate
                 {
                     this.currentFilePath.Text = dialog.FileName;
+                    if (dataGridView2IsChange)
+                    {
+                        if (DialogResult.Yes == MessageBox.Show("检测到开始坐标或合并行数发生变动,是否重新加载配置进行手动配置处理?", "提示", MessageBoxButtons.YesNo))
+                        {
+                            loadReportColView();
+                        }
+                    }
                 }));
-
             }
             this.OnlyOneSelect = false;
         }
@@ -665,11 +680,12 @@ namespace lqnet.Forms
         private void CheckItemComboBox_SelectionChangeCommitted(object sender, EventArgs e)
         {
             CheckItem item = (CheckItem)this.CheckItemComboBox.SelectedItem;
-
+            clearParams();
             if (!MyConstants.NON_NULL_CHECK_CODE.Equals(item.CheckCode))
             {
                 //this.currentCheckItem.Text = item.CheckName;
                 //Ele_Changed(sender, e);
+                
                 tryToLoadConfig();
             }
 
@@ -710,6 +726,12 @@ namespace lqnet.Forms
                 CheckName = "请选择检验项"
             });
             this.CheckItemComboBox.SelectedIndex = 0;
+            clearParams();
+            
+        }
+
+        private void clearParams()
+        {
             this.reportColListBindingSource.Clear();
             //this.currentCheckItem.Text = null;
             this.currentFilePath.Text = string.Empty;
@@ -717,6 +739,8 @@ namespace lqnet.Forms
             this.mergeCountTextbox.Value = 1;
             this.indexList = null;
             this.dataGridView2IsChange = false;
+            this.oldStartIndxTextboxValue = string.Empty;
+            this.oldmergeCountTextboxValue = 0;
         }
 
         /// <summary>
@@ -847,10 +871,10 @@ namespace lqnet.Forms
             if (this.reportColListBindingSource.List != null && this.reportColListBindingSource.List.Count > 0)
             {
                 DeviceConfigContext context = null;
-                if (dataGridView2IsChange //发生变更
+                if ((context = getCurDeviceConfigContext()) == null //当前检验项配置为空
+                    || dataGridView2IsChange //发生变更
                     || _configContexts == null
-                || _configContexts.Count == 0 //无配置
-                || (context = getCurDeviceConfigContext()) == null)//当前检验项配置为空
+                    || _configContexts.Count == 0)//无配置
                 {
                     if (context == null)
                     {

BIN=BIN
lqnet/bin/Debug/app.publish/lqnet.exe


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
lqnet/bin/Debug/configs/10001.json


+ 1 - 1
lqnet/bin/Debug/lqnet.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>A2MFHt0lruWSHn53fnyIo+vcXKd4MeeOeKe2v+bcVYY=</dsig:DigestValue>
+        <dsig:DigestValue>MNNS+IVBllj65BPHhtWX52ZUz/4tDD8vJRe2R/XQUFY=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN=BIN
lqnet/bin/Debug/lqnet.exe


+ 2 - 2
lqnet/bin/Debug/lqnet.exe.manifest

@@ -78,14 +78,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="683008">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="682496">
       <assemblyIdentity name="lqnet" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
       <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>U1uePo38FWYTb5VyWUx1BElYoYy2GoCzxkt0FnD++24=</dsig:DigestValue>
+        <dsig:DigestValue>OUS+7mENSoL9sDZKpKIi/Kro8ZJHKBu3TS1QU7nZQjE=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN=BIN
lqnet/bin/Debug/lqnet.pdb


BIN=BIN
lqnet/obj/Debug/DesignTimeResolveAssemblyReferences.cache


+ 1 - 1
lqnet/obj/Debug/lqnet.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>A2MFHt0lruWSHn53fnyIo+vcXKd4MeeOeKe2v+bcVYY=</dsig:DigestValue>
+        <dsig:DigestValue>MNNS+IVBllj65BPHhtWX52ZUz/4tDD8vJRe2R/XQUFY=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN=BIN
lqnet/obj/Debug/lqnet.exe


+ 2 - 2
lqnet/obj/Debug/lqnet.exe.manifest

@@ -78,14 +78,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="683008">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="682496">
       <assemblyIdentity name="lqnet" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
       <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>U1uePo38FWYTb5VyWUx1BElYoYy2GoCzxkt0FnD++24=</dsig:DigestValue>
+        <dsig:DigestValue>OUS+7mENSoL9sDZKpKIi/Kro8ZJHKBu3TS1QU7nZQjE=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN=BIN
lqnet/obj/Debug/lqnet.pdb