lg
2025-11-24 dfd02ad42c5b4f8ee7190fe51730c21cf75d37a5
Merge branch 'master' of http://git.gs-mes.com:8080/r/~tjx/GsMesClient
已修改5个文件
215 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Rpt/WOTraceCodes.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Rpt/WomShjh.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Gs.DevApp.csproj 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
@@ -7,8 +7,10 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlTypes;
using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -33,6 +35,7 @@
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnBaoGaoClick += ToolBarMenu1_btnBaoGaoClick;
            toolBarMenu1.btnOutClick += ToolBarMenu1_btnOutClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1, tips);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
@@ -1086,5 +1089,53 @@
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        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 daa.erp_sczz in");
                _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
                _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
                if (dialogResult == DialogResult.OK)
                {
                    string _folder = folderBrowserDialog.SelectedPath;
                    var _params = new
                    {
                        inSortName = "",
                        inSortOrder = "",
                        inQueryWhere = _sbSqlWhere.ToString()
                    };
                    var _obj = new Gs.DevApp.Entity.XlsOutModel("xlsOut_fqclst", "", "", "", _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);
                    }
                }
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -46,6 +46,7 @@
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnOutClick += ToolBarMenu1_btnOutClick;
            toolBarMenu1.btnOutClick += ToolBarMenu1_btnOutClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1, tips);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
@@ -431,6 +432,39 @@
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnOutClick(object sender, EventArgs e)
        {
            var frm = new SelOutType();
            var type = 0;
            //赋值给明细表
            frm.UpdateParent += (ss, ee) =>
            {
                var lst = new List<string>();
                lst = ee.StringList;
                if (!string.IsNullOrEmpty(lst[0]))
                {
                    if (lst[0] == "列表导出")
                    {
                        type = 1;
                    }
                    else if (lst[0] == "明细导出")
                    {
                        type = 2;
                    }
                }
            };
            frm.ShowDialog();
            if (type == 1)
            {
                LstOutput();
            }
            if (type == 2)
            {
                MxOutput();
            }
        }
        private void MxOutput()
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_releaseNo, gridView1, "releaseNo");
@@ -481,6 +515,55 @@
            }
        }
        private void LstOutput()
        {
            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 (dialogResult == DialogResult.OK)
                {
                    string _folder = folderBrowserDialog.SelectedPath;
                    var _params = new
                    {
                        inSortName = "",
                        inSortOrder = "",
                        inQueryWhere = _sbSqlWhere.ToString()
                    };
                    var _obj = new Gs.DevApp.Entity.XlsOutModel("xlsOut_iqcdetect01lst", "", "", "", _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);
                    }
                }
            }
        }
        /// <summary>
        /// 刷新事件
        /// </summary>
DevApp/Gs.DevApp/DevFrm/Rpt/WOTraceCodes.cs
@@ -4,7 +4,9 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -20,6 +22,7 @@
            InitializeComponent();
            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnOutClick += ToolBarMenu1_btnOutClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", (value) =>
            {
@@ -128,5 +131,50 @@
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        private void ToolBarMenu1_btnOutClick(object sender, EventArgs e)
        {
            using (FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog())
            {
                folderBrowserDialog.Description = "选择导出文件的保存路径";
                DialogResult dialogResult = folderBrowserDialog.ShowDialog();
                var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
                if (dialogResult == DialogResult.OK)
                {
                    string _folder = folderBrowserDialog.SelectedPath;
                    var _params = new
                    {
                        inSortName = "",
                        inSortOrder = "",
                        inQueryWhere = _sbSqlWhere.ToString()
                    };
                    var _obj = new Gs.DevApp.Entity.XlsOutModel("xlsout_WOTraceCodes", "", "", "", _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);
                    }
                }
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/Rpt/WomShjh.cs
@@ -1,4 +1,5 @@
using DevExpress.Utils;
using DevExpress.Pdf.Native.BouncyCastle.Asn1.X509;
using DevExpress.Utils;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
@@ -163,7 +164,7 @@
                        beginDate = dateEdit1.EditValue.ToString(),
                        endDate = dateEdit2.EditValue.ToString()
                    };
                    var _obj = new Gs.DevApp.Entity.XlsOutModel("xlsOut_shjh","","","", _params);
                    var _obj = new Gs.DevApp.Entity.XlsOutModel("xlsOut_shjh", "", "", "", _params);
                    try
                    {
                        string strJson = UtilityHelper.HttpPost("", "XlsInOut/XlsOutView_NEW", JsonConvert.SerializeObject(_obj));
@@ -191,5 +192,24 @@
                }
            }
        }
        private void btnBOMQuery_Click(object sender, EventArgs e)
        {
            try
            {
                var strJson = UtilityHelper.HttpPost("", _webServiceName + "GetErpBOM", "");
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    MsgHelper.ShowInformation("BOM数据更新成功");
                }
                else
                    MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -723,6 +723,12 @@
    <Compile Include="DevFrm\QC\Models\MesQmCheckitemDt.cs" />
    <Compile Include="DevFrm\QC\Models\MesSysLookups.cs" />
    <Compile Include="DevFrm\QC\Models\MesSysLookupTypes.cs" />
    <Compile Include="DevFrm\QC\SelOutType.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="DevFrm\QC\SelOutType.Designer.cs">
      <DependentUpon>SelOutType.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\QC\Xls.cs">
      <SubType>Form</SubType>
    </Compile>
@@ -1985,6 +1991,9 @@
    <EmbeddedResource Include="DevFrm\QC\MesQcExceptional.resx">
      <DependentUpon>MesQcExceptional.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\QC\SelOutType.resx">
      <DependentUpon>SelOutType.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\QC\Xls.resx">
      <DependentUpon>Xls.cs</DependentUpon>
    </EmbeddedResource>