|
|
@@ -10,12 +10,11 @@ using UAS_MES_NEW.PublicForm;
|
|
|
using Seagull.BarTender.Print;
|
|
|
using System.Threading;
|
|
|
using System.Text.RegularExpressions;
|
|
|
-using static HslCommunication.Profinet.Knx.KnxCode;
|
|
|
using System.IO.Ports;
|
|
|
using System.Runtime.InteropServices;
|
|
|
using System.IO;
|
|
|
using System.Text;
|
|
|
-using static System.Runtime.CompilerServices.RuntimeHelpers;
|
|
|
+using NPOI.SS.Formula.Functions;
|
|
|
|
|
|
namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
@@ -185,7 +184,7 @@ namespace UAS_MES_NEW.Make
|
|
|
if (sql != "")
|
|
|
{
|
|
|
Regex ConnoteA = new Regex("{\\w+}");
|
|
|
- foreach (Match mch in ConnoteA.Matches(sql))
|
|
|
+ foreach (System.Text.RegularExpressions.Match mch in ConnoteA.Matches(sql))
|
|
|
{
|
|
|
string x = mch.Value.Trim();
|
|
|
sql = sql.Replace(x, "'" + sn_code.Text + "'");
|
|
|
@@ -295,7 +294,7 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
double pr_miderror = double.Parse(dh.getFieldDataByCondition("product", "nvl(pr_miderror,0)", "pr_code='" + ma_prodcode.Text + "'").ToString());
|
|
|
double avgweight = double.Parse(dh.getFieldDataByCondition("makeserial", "sum(ms_midboxweight)/50", " ms_makecode='" + ma_code.Text + "'").ToString());
|
|
|
- dh.ExecuteSql("update product set PR_MIDBOXMINWEIGHT=(" + avgweight + "-" + pr_miderror + "), PR_MIDBOXMAXWEIGHT=(" + avgweight + "+" + pr_miderror + ") where pr_code='"+ ma_prodcode .Text+ "'", "update");
|
|
|
+ dh.ExecuteSql("update product set PR_MIDBOXMINWEIGHT=(" + avgweight + "-" + pr_miderror + "), PR_MIDBOXMAXWEIGHT=(" + avgweight + "+" + pr_miderror + ") where pr_code='" + ma_prodcode.Text + "'", "update");
|
|
|
}
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into labelchecklog(LCL_ID, LCL_SN, LCL_LABELTYPE, lcl_prefix,lcl_length, LCL_LABELVALUE, LCL_STEPCODE, LCL_SOURCECODE," +
|
|
|
@@ -399,6 +398,11 @@ namespace UAS_MES_NEW.Make
|
|
|
OperateResult.AppendText("<<序列号:" + code.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, code);
|
|
|
return;
|
|
|
}
|
|
|
+ if (!LogicHandler.CheckMaterial(sn_code.Text, out ErrorMessage))
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
|
|
|
+ return;
|
|
|
+ }
|
|
|
//将录入框的值给序列号
|
|
|
sn_code.Text = code.Text;
|
|
|
code.Str = "";
|
|
|
@@ -420,7 +424,7 @@ namespace UAS_MES_NEW.Make
|
|
|
ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
|
|
|
MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
|
|
|
MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
|
|
|
- pr_weight.Text = _minweight + "-"+ _maxweight;
|
|
|
+ pr_weight.Text = _minweight + "-" + _maxweight;
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
LockMakeCode.Checked = true;
|
|
|
//勾选了前一工单
|