From c6740b17f1dd8c8187c7eb93597aa14e72a9e82f Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期四, 27 十一月 2025 09:56:14 +0800
Subject: [PATCH] fqc和待检增加不合格原因字段
---
DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
index b3d3f5a..3ad5f43 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
@@ -8,7 +8,9 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Data;
+using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -37,6 +39,7 @@
this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
+ toolBarMenu1.btnOutClick += ToolBarMenu1_btnOutClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
@@ -770,5 +773,61 @@
}
}
+ private void ToolBarMenu1_btnOutClick(object sender, EventArgs e)
+ {
+ using (FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog())
+ {
+ folderBrowserDialog.Description = "閫夋嫨瀵煎嚭鏂囦欢鐨勪繚瀛樿矾寰�";
+ DialogResult dialogResult = folderBrowserDialog.ShowDialog();
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and a.ReceiveOrgId in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
+ if (strType == QcSeason.鍏跺畠鍏ュ簱妫�.ToString())
+ {
+ _sbSqlWhere.Append(" and isnull(qtrk.qt028,0)=1 and isnull(qtrk.qt032,0)=1 and isnull(qtrk.qt015,0)=1 ");
+ }
+ if (strType == QcSeason.鍙楁墭鍏ュ簱.ToString())
+ {
+ _sbSqlWhere.Append(" and isnull(st.isCheck,0)=1 and isnull(st.qt032,0)=1");
+ }
+ if (dialogResult == DialogResult.OK)
+ {
+ string _folder = folderBrowserDialog.SelectedPath;
+ var _params = new
+ {
+ inSortName = "",
+ inSortOrder = "",
+ inQueryWhere = _sbSqlWhere.ToString()
+ };
+ var _obj = new Gs.DevApp.Entity.XlsOutModel("xlsOut_rkqcdetect01lst", "", "", "", _params);
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", "XlsInOut/XlsOutView_NEW", JsonConvert.SerializeObject(_obj));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ string _file = _rtn.rtnData.fileUrl.ToString();
+ string _folderName = _folder + "\\" + _file.Replace("down/", "");
+ string _url = ConfigurationManager.AppSettings["WebApiUrl"].ToString() + _file;
+ using (WebClient client = new WebClient())
+ {
+ client.DownloadFile(_url, _folderName);
+ }
+ ToolBox.MsgHelper.ShowInformation("瀵煎嚭鎴愬姛锛�");
+ }
+ else
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+ }
+ }
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3