|
|
@ -35,6 +35,8 @@ namespace PaintingPC |
|
|
|
private string _foreignPartCode = string.Empty; |
|
|
|
//颜色是否手动修改
|
|
|
|
private bool _colorHandChanged = false; |
|
|
|
private bool _isSingleStation = false; |
|
|
|
private string _isTest = "false"; |
|
|
|
|
|
|
|
public FrmQuality(bool isWmsQuality) |
|
|
|
{ |
|
|
@ -45,6 +47,12 @@ namespace PaintingPC |
|
|
|
_lineCode = ConfigurationManager.AppSettings["LineCode"].ToString(); |
|
|
|
_stationType = ConfigurationManager.AppSettings["Position"].ToString(); |
|
|
|
string disableButtons = ConfigurationManager.AppSettings["DisableButtons"].ToString(); |
|
|
|
string single = ConfigurationManager.AppSettings["SingleStation"].ToString(); |
|
|
|
string _isTest = ConfigurationManager.AppSettings["测试"].ToString(); |
|
|
|
if (single == "true") |
|
|
|
{ |
|
|
|
_isSingleStation = true; |
|
|
|
} |
|
|
|
if (!string.IsNullOrEmpty(disableButtons)) |
|
|
|
{ |
|
|
|
if (disableButtons.Contains("报废")) |
|
|
@ -75,7 +83,7 @@ namespace PaintingPC |
|
|
|
// if(_lineCode == "2")
|
|
|
|
// {
|
|
|
|
HidenColorSelect(true); |
|
|
|
if(_stationType == "下线一检") |
|
|
|
if(_stationType == "下线一检" || (_stationType == "下线二检" && _isSingleStation ==true)) |
|
|
|
{ |
|
|
|
btnAllowChangeColor.Visible = true; |
|
|
|
} |
|
|
@ -707,6 +715,9 @@ namespace PaintingPC |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
if (_isTest == "true") |
|
|
|
return true; |
|
|
|
|
|
|
|
WMSWebService webService = new WMSWebService(); |
|
|
|
webService.Url = ConfigurationManager.AppSettings["WMSWebServiceURL"].ToString(); |
|
|
|
//webService.Timeout = 1200000;
|
|
|
@ -1094,7 +1105,8 @@ namespace PaintingPC |
|
|
|
{ |
|
|
|
dLb[i].Font = new Font(dLb[i].Font.FontFamily, 36, FontStyle.Bold); |
|
|
|
dLb[i].Size = new Size(170, 60); |
|
|
|
dLb[i].ForeColor = Color.Blue; |
|
|
|
dLb[i].ForeColor = Color.Red; |
|
|
|
//dLb[i].BackColor = Color.Red;
|
|
|
|
} |
|
|
|
panel2.Controls.Add(dLb[i]); |
|
|
|
dLb[i].Click += new EventHandler(dLbRoom_Click); |
|
|
@ -1133,10 +1145,14 @@ namespace PaintingPC |
|
|
|
|
|
|
|
string strImageURL = Function.GetImgPath() + picture; |
|
|
|
|
|
|
|
if(_isTest != "true") |
|
|
|
{ |
|
|
|
System.Net.WebClient webClient = new System.Net.WebClient(); |
|
|
|
webClient.DownloadFile(strImageURL, Directory.GetCurrentDirectory() + @"\" + picture); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FileStream fs = new FileStream(Directory.GetCurrentDirectory() + "\\" + picture, FileMode.Open, |
|
|
|
FileAccess.Read);//获取图片文件流
|
|
|
@ -1216,27 +1232,7 @@ namespace PaintingPC |
|
|
|
reason= dtInspect.Rows[0]["reason"].ToString(); //原因
|
|
|
|
paintId = dtInspect.Rows[0]["remark3"].ToString(); //原因
|
|
|
|
|
|
|
|
#region 三检结果
|
|
|
|
|
|
|
|
//for (int i = 0; i < dtInspect.Rows.Count; i++)
|
|
|
|
//{
|
|
|
|
// string time = dtInspect.Rows[i]["InspectTimes"].ToString();
|
|
|
|
// string result = dtInspect.Rows[i]["inspectResult"].ToString() + dtInspect.Rows[i]["damnPosition"].ToString() + ":" + dtInspect.Rows[i]["reason"].ToString();
|
|
|
|
// switch (time)
|
|
|
|
// {
|
|
|
|
// case "1":
|
|
|
|
// labFirstCheck.Text = result;
|
|
|
|
// break;
|
|
|
|
// case "2":
|
|
|
|
// labSecondCheck.Text = result;
|
|
|
|
// break;
|
|
|
|
// case "3":
|
|
|
|
// labThirdCheck.Text = result;
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 选中缺陷位置及原因
|
|
|
|
|
|
|
@ -1269,9 +1265,10 @@ namespace PaintingPC |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
cboxAddColor.Enabled = true; |
|
|
|
#region 没有一检结果,查询老外数据库,取产品信息
|
|
|
|
if (_isWmsQuality == false) |
|
|
|
if (_isWmsQuality == false &&(_isSingleStation==true || _stationType=="下线一检")) |
|
|
|
{ |
|
|
|
string paintError = string.Empty; |
|
|
|
//喷涂线边质检,没有质检结果,查询老外数据库,取产品信息
|
|
|
@ -1333,14 +1330,18 @@ namespace PaintingPC |
|
|
|
LogHelper.WriteErrLogBase("整体项-" + ex.ToString(), MethodBase.GetCurrentMethod().Name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 一检 二检 点修补扫码是否允许验证
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="barcode"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
private bool ScanCodeValidVerify(string barcode) |
|
|
|
{ |
|
|
|
string position = _stationType; |
|
|
|
switch (position) |
|
|
|
{ |
|
|
|
case "下线一检": return First(barcode); |
|
|
|
case "下线二检": return Second(barcode);break; |
|
|
|
case "下线二检": return Second(barcode);; |
|
|
|
case "点修补": return Third(barcode); |
|
|
|
default:return true; |
|
|
|
|
|
|
@ -1362,11 +1363,14 @@ namespace PaintingPC |
|
|
|
private bool Second(string barcode) |
|
|
|
{ |
|
|
|
DataTable dt = Function.GetLastResult(barcode); |
|
|
|
if (_isSingleStation == false) |
|
|
|
{ |
|
|
|
if (dt.Rows.Count == 0) |
|
|
|
{ |
|
|
|
ShowHint("扫描条码[" + barcode + "]不存在[下线一检]记录,无法在[下线二检]工位进行扫码.", false); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
DataRow dr = dt.Rows[0]; |
|
|
|
if (dr["reason"].ToString().Contains("点修补") && dr["inspectResult"].ToString().Contains("其它")) |
|
|
|
{ |
|
|
@ -1378,6 +1382,9 @@ namespace PaintingPC |
|
|
|
ShowHint("上次质量判定为[报废],无法进行二检扫码.", false); |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|