ruoxing.wang 1 week ago
parent
commit
8634a18aa6
  1. 10
      PaintingPC/FrmQuality.cs
  2. 6
      PaintingPC/Function.cs

10
PaintingPC/FrmQuality.cs

@ -1275,13 +1275,17 @@ namespace PaintingPC
string foreignVal = string.Empty; string foreignVal = string.Empty;
if(_lineCode == "2") if(_lineCode == "2")
{ {
foreignVal = Function.GetProductInfoFrWms(barcode, ref paintError); foreignVal = Function.GetProductInfoFrWms(barcode, "TM_BJBMPT_MES_DATA", ref paintError);
} }
else else if (_lineCode == "1")
{ {
foreignVal = Function.GetProductInfo2(barcode, ref paintError); foreignVal = Function.GetProductInfoFrWms(barcode, "TM_BJBMPT_MES_DATA_OLD", ref paintError);
} }
else
{
foreignVal = Function.GetProductInfo2(barcode, ref paintError);
}
if (!string.IsNullOrEmpty(paintError)) if (!string.IsNullOrEmpty(paintError))
{ {
lbForeig.Text = paintError; lbForeig.Text = paintError;

6
PaintingPC/Function.cs

@ -1997,7 +1997,7 @@ namespace PaintingPC
return false; return false;
} }
} }
public static string GetProductInfoFrWms(string barcode, ref string errorMsg) public static string GetProductInfoFrWms(string barcode,string tableName, ref string errorMsg)
{ {
string res = ""; string res = "";
//string colorNo = ""; //string colorNo = "";
@ -2018,8 +2018,8 @@ namespace PaintingPC
else else
{ {
#region 从老外系统获得颜色信息 #region 从WMS系统获得喷涂上件的颜色信息
string wmsSql = $"select TypeCode,WMSColor as paintcode from TM_BJBMPT_MES_DATA where ProductBarcode='{barcode}'"; string wmsSql = $"select TypeCode,WMSColor as paintcode from {tableName} where ProductBarcode='{barcode}'";
string wmsSqlConnString = ConfigurationManager.ConnectionStrings["WmsSqlConnString"].ToString(); string wmsSqlConnString = ConfigurationManager.ConnectionStrings["WmsSqlConnString"].ToString();
DataTable dtColor = SqlHelper.GetDataDateTable(wmsSqlConnString, CommandType.Text, wmsSql, null); DataTable dtColor = SqlHelper.GetDataDateTable(wmsSqlConnString, CommandType.Text, wmsSql, null);

Loading…
Cancel
Save