Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master'

shim 8 years ago
parent
commit
3afc3a6794

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -68,7 +68,7 @@ namespace UAS_MES.Make
                     {
                         //获取工单的其他信息
                         sql.Clear();
-                        sql.Append("select ma_code,nvl(mcd_okqty,0),ma_prodcode as pr_code ,pr_detail,");
+                        sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_detail,");
                         sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
                         sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");

+ 1 - 5
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.Designer.cs

@@ -143,7 +143,7 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(346, 26);
+            this.pr_code_label.Location = new System.Drawing.Point(346, 29);
             this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(110, 31);
@@ -203,11 +203,9 @@
             // ma_prodcode
             // 
             this.ma_prodcode.AutoSize = true;
-            this.ma_prodcode.CutLength = null;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_prodcode.Location = new System.Drawing.Point(456, 32);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Size = new System.Drawing.Size(0, 31);
             this.ma_prodcode.TabIndex = 175;
@@ -216,11 +214,9 @@
             // pr_detail
             // 
             this.pr_detail.AutoSize = true;
-            this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_detail.Location = new System.Drawing.Point(793, 32);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(200, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 31);
             this.pr_detail.TabIndex = 174;

+ 9 - 27
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -17,28 +17,13 @@ namespace UAS_MES.Make
         DataTable dt;
         LogStringBuilder sql = new LogStringBuilder();
         AutoSizeFormClass asc = new AutoSizeFormClass();
-        System.DateTime[] indate;
         //保存StepProduct查询出来的数据
         //        DataTable ListA = new DataTable();
         //保存make left join makecraftdetail left join product的数据
         // DataTable ListB;
         DataTable mapB;
-        //保存ProductLabel数据
-        DataTable ListC;
-        //工序编号
-        //        string stepcode;
-        //下一工序编号
-        //        string nextstepcode;
-        //工艺路线编号
-        //        string craftcode;
-        //制造单号
-        //        string make_code;
-        //当前工单的序列号
-        //        tring sn_code;
-        //当前提示的索引
-        //        int RemainIndex = 0;
 
-        //        string Step = "Loading";
+        System.DateTime[] indate;
 
         ApplicationClass lbl;
 
@@ -81,7 +66,7 @@ namespace UAS_MES.Make
                         {
                             //获取工单的其他信息
                             sql.Clear();
-                            sql.Append("select ma_code,ma_prodcode,pr_detail,");
+                            sql.Append("select ma_code,nvl(mcd_okqty,0),ma_prodcode,pr_detail,");
                             sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
                             sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                             mapB = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -108,16 +93,15 @@ namespace UAS_MES.Make
                             //按照打印张数打印
                             Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text),indate[PrintLabel.SelectedIndex]);
                             //提示用户打印成功
-                            OperateResult.AppendText(">>序列号"+sncode.Text+"打印成功\n", Color.Green);
+                            OperateResult.AppendText(">>打印成功\n", Color.Green);
                             //更新打印的数据
-                            LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "机身标打印", User.UserSourceCode, User.UserCode, "机身标打印成功", out oErrorMessage);
+                            LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "机身标打印", User.UserSourceCode, User.UserName, "机身标打印成功", out oErrorMessage);
                             //清空输入框的值,聚焦
                             sncode.Text = "";
                             sncode.Focus();
                             //刷新打印数量和剩余数量
-                            mcd_okqty.Text = int.Parse(mcd_okqty.Text) +1+ "";
-                            dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
-                            BaseUtil.SetFormValue(Controls, dt);
+                            mcd_remainqty.Text = int.Parse(mcd_remainqty.Text) - 1 + "";
+                            mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
 
                             //IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
                             if (int.Parse(mcd_remainqty.Text) == 0)
@@ -135,7 +119,7 @@ namespace UAS_MES.Make
                         //标签为空
                         else
                         {
-                            OperateResult.AppendText(">>产品编号:"+ ma_prodcode .Text+ "未维护机身标签\n", Color.Red);
+                            OperateResult.AppendText(">>无可用标签\n", Color.Red);
                             sncode.Text = "";
                         }
                     }
@@ -153,19 +137,17 @@ namespace UAS_MES.Make
         }
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
-            dt = (DataTable)dh.ExecuteSql("select pl_labelname,pl_labelcode,pl_indate,pl_labelurl from productlabel where pl_prodcode='" + ma_prodcode.Text + "'and PL_LABELTYPE='机身标' order by pl_isdefault desc", "select");
+            dt = (DataTable)dh.ExecuteSql("select pl_labelname,pl_labelcode,to_char(nvl(pl_indate,sysdate),'YYYY-MM-DD HH24:Mi:SS') pl_indate,pl_labelurl from productlabel where pl_prodcode='" + ma_prodcode.Text + "'and PL_LABELTYPE='机身标' order by pl_isdefault desc", "select");
             if (dt.Rows.Count == 0)
             {
-                OperateResult.AppendText(">>产品编号:"+ma_prodcode.Text+"未维护机身标标签模板\n", Color.Red);
+                OperateResult.AppendText(">>该序列号对应的产品未维护机身标标签模板\n", Color.Red);
             }
             PrintLabel.DataSource = dt;
             PrintLabel.DisplayMember = "pl_labelname";
             PrintLabel.ValueMember = "pl_labelcode";
             ftpOperater ftp = new ftpOperater();
-            indate = new System.DateTime[dt.Rows.Count];
             for (int i = 0; i < dt.Rows.Count; i++)
             {
-                //ftp.Download(dt.Rows[i]["pl_labelname"].ToString());
                 BaseUtil.GetPrintLabel(dt.Rows[i]["pl_labelname"].ToString(), dt.Rows[i]["pl_labelurl"].ToString(), dt.Rows[i]["pl_indate"].ToString());
                 indate[i] = Convert.ToDateTime(dt.Rows[i]["pl_indate"].ToString());
             }

+ 7 - 0
UAS-MES/Main.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Configuration;
+using System.Diagnostics;
 using System.Drawing;
 using System.IO;
 using System.Runtime.InteropServices;
@@ -78,6 +79,12 @@ namespace UAS_MES
         //窗体加载的时候将headBar的事件委托给指定的函数
         private void Main_Load(object sender, EventArgs e)
         {
+            //杀死全部未关闭的打印进程
+            Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
+            for (int i = 0; i < processes.Length; i++)
+            {
+                processes[i].Kill();
+            }
             thread = new Thread(DeleteLog);
             thread.Start();
             this.Tag = "ShowDialogWindow";

+ 10 - 2
UAS_KanBan/Process.cs

@@ -15,9 +15,17 @@ namespace UAS_KanBan
 
         AutoSizeFormClass asc = new AutoSizeFormClass();
 
-        public Process()
+        DataHelper dh = new DataHelper();
+
+        string Linecode;
+
+        string Wccode;
+
+        public Process(string LineCode,string WcCode)
         {
             InitializeComponent();
+            Linecode = LineCode;
+            Wccode = WcCode;
         }
 
         private void Process_Load(object sender, EventArgs e)
@@ -30,7 +38,7 @@ namespace UAS_KanBan
 
         private void Refresh_Tick(object sender, EventArgs e)
         {
-
+            dh.ExecuteSql("select KBI_LINE_ZTL('"+Linecode+"','"+Wccode+"') from dual", "select");
         }
 
         private void Process_SizeChanged(object sender, EventArgs e)

+ 123 - 0
UAS_KanBan/Process.resx

@@ -0,0 +1,123 @@
+<?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="Refresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 1 - 1
UAS_KanBan/Setting.cs

@@ -46,7 +46,7 @@ namespace UAS_KanBan
                 return;
             }
             Hide();
-            Process pr = new Process();
+            Process pr = new Process(Line.SelectedValue.ToString(),WorkCenter.SelectedValue.ToString());
             pr.ShowDialog();
             Close();
         }

BIN
UAS_KanBan/tool/CSkin.dll


BIN
UAS_KanBan/tool/Oracle.ManagedDataAccess.dll


+ 13 - 1
UAS_WinForm.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+VisualStudioVersion = 14.0.24720.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UAS-MES接口", "MES接口\UAS-MES接口.csproj", "{A52EFE9C-838E-4E8C-BAAA-B1C226E57A81}"
 EndProject
@@ -13,6 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject", "TestProject\
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UAS-特殊解析规则", "UAS-特殊解析规则\UAS-特殊解析规则.csproj", "{7D199649-095F-4280-BD82-9481BCAB85B4}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UAS_XmlAnalysor", "UAS_XmlAnalysor\UAS_XmlAnalysor.csproj", "{7767BBB5-6E7E-4687-A9D6-6C6E9B6F4EA3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UAS_KanBan", "UAS_KanBan\UAS_KanBan.csproj", "{13FB3DAF-E684-4B04-9F35-710F925A64C3}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -39,6 +43,14 @@ Global
 		{7D199649-095F-4280-BD82-9481BCAB85B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{7D199649-095F-4280-BD82-9481BCAB85B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{7D199649-095F-4280-BD82-9481BCAB85B4}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7767BBB5-6E7E-4687-A9D6-6C6E9B6F4EA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7767BBB5-6E7E-4687-A9D6-6C6E9B6F4EA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7767BBB5-6E7E-4687-A9D6-6C6E9B6F4EA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7767BBB5-6E7E-4687-A9D6-6C6E9B6F4EA3}.Release|Any CPU.Build.0 = Release|Any CPU
+		{13FB3DAF-E684-4B04-9F35-710F925A64C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{13FB3DAF-E684-4B04-9F35-710F925A64C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{13FB3DAF-E684-4B04-9F35-710F925A64C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{13FB3DAF-E684-4B04-9F35-710F925A64C3}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

BIN
UAS_XmlAnalysor/tool/Oracle.ManagedDataAccess.dll