ruoxing.wang 2 weeks ago
parent
commit
d12d8245c9
  1. 586
      InjectionPC/FrmMain2408.Designer.cs
  2. 20
      PaintingPC/FrmQuality.cs
  3. 2
      PaintingPC/Function.cs
  4. 4
      PaintingPC/Model/InspectModel.cs
  5. 42
      WebService/Function.cs

586
InjectionPC/FrmMain2408.Designer.cs

File diff suppressed because it is too large

20
PaintingPC/FrmQuality.cs

@ -70,15 +70,11 @@ namespace PaintingPC
btnAbt.Visible = false;
}
if(_lineCode == "2")
{
// groupBox1.Visible = false;
// if(_lineCode == "2")
// {
HidenColorSelect(true);
//label1.Visible = false;
//cboxAddColor.Visible = false;
btnAllowChangeColor.Visible = true;
}
// }
}
void HidenColorSelect(bool isHidden)
{
@ -621,6 +617,12 @@ namespace PaintingPC
{
}
if(reason.Contains("点修补") && state!="其它")
{
MessageBox.Show("选择[点修补],只能判定为[其它]状态,不能判定为"+ state);
return;
}
string bcode = txtBarCode.Text.Trim();
//保存
string id = SaveInspect(state, colorName, partName, userName);
@ -823,6 +825,10 @@ namespace PaintingPC
model1.inspectResult =inspectResult;
model1.damnPosition = position;
model1.reason = reason;
if (reason.Contains("点修补"))
{
model1.IsNeedThirdCheck = 1;
}
model1.remark3 = paintId;
model1.ForeignPartCode = _foreignPartCode;
model1.IsHandChangeColor = _colorHandChanged == true ? 1 : 0;

2
PaintingPC/Function.cs

@ -1775,6 +1775,7 @@ namespace PaintingPC
,[AddMan]
,[ForeignPartCode]
,[IsHandChangeColor]
,[IsNeedThirdCheck]
)
VALUES
('" + model.barcode + @"'
@ -1796,6 +1797,7 @@ namespace PaintingPC
,'" + model.AddMan + @"'
,'" + model.ForeignPartCode + @"'
,'" + model.IsHandChangeColor + @"'
,'" + model.IsNeedThirdCheck + @"'
);select @@Identity ";
//res = SqlHelper.ExecuteNonQuery(SqlHelper.SqlConnString, CommandType.Text, sql, null);
DataTable dt= SqlHelper.GetDataDateTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);

4
PaintingPC/Model/InspectModel.cs

@ -87,5 +87,9 @@ namespace PaintingPC.Model
/// 是否手动修改了颜色
/// </summary>
public int IsHandChangeColor { get; set; } = 0;
/// <summary>
/// 是否需要点修补
/// </summary>
public int IsNeedThirdCheck { get; set; } = 0;
}
}

42
WebService/Function.cs

@ -1106,7 +1106,7 @@ namespace Webservice
/// </summary>
/// <param name="sjBarCode"></param>
/// <returns></returns>
static bool GetWmsCompleteState(string sjBarCode)
static bool GetWmsCompleteState(string sjBarCode,ref string wmsMsg)
{
string jsonParam = " [{\"ServiceType\":\"GetMesData\",\"BarCode\":\""+sjBarCode+"\"}]";
WebService.WebReference.JsonService webService = GetWebService();
@ -1116,6 +1116,7 @@ namespace Webservice
{
return true;
}
wmsMsg = rst;
return false;
}
/// <summary>
@ -1247,10 +1248,19 @@ namespace Webservice
//上次合格,这次转报废,需要wms给true
if (lastState.Contains("合格"))
{
bool wmsAllow = GetWmsCompleteState(oneBarCode);
string wmsMsg = string.Empty;
bool wmsAllow = GetWmsCompleteState(oneBarCode, ref wmsMsg);
if (wmsAllow == false)
{
errorMssg = $"条码[{oneBarCode}]在Wms已处理,不允许重新判定为[报废].";
if (string.IsNullOrEmpty(wmsMsg))
{
errorMssg = $"条码[{oneBarCode}]在Wms已处理,不允许重新判定为[报废].";
}
else
{
errorMssg = wmsMsg;
}
return false;
}
else
@ -1279,10 +1289,19 @@ namespace Webservice
//上次合格,这次转其它,需要wms给true
if (lastState.Contains("合格"))
{
bool wmsAllow = GetWmsCompleteState(oneBarCode);
string wmsMsg = string.Empty;
bool wmsAllow = GetWmsCompleteState(oneBarCode,ref wmsMsg);
if (wmsAllow == false)
{
errorMssg = $"条码[{oneBarCode}]在Wms已处理,不允许重新判定为[其它].";
if (string.IsNullOrEmpty(wmsMsg))
{
errorMssg = $"条码[{oneBarCode}]在Wms已处理,不允许重新判定为[其它].";
}
else
{
errorMssg = wmsMsg;
}
return false;
}
else
@ -1312,10 +1331,19 @@ namespace Webservice
//上次合格,这次转报废,需要wms给true
if (lastState.Contains("合格"))
{
bool wmsAllow = GetWmsCompleteState(oneBarCode);
string wmsMsg = string.Empty;
bool wmsAllow = GetWmsCompleteState(oneBarCode,ref wmsMsg);
if (wmsAllow == false)
{
errorMssg = $"条码[{oneBarCode}]在Wms已处理,不允许重新判定为[返喷].";
if (string.IsNullOrEmpty(wmsMsg))
{
errorMssg = $"条码[{oneBarCode}]在Wms已处理,不允许重新判定为[返喷].";
}
else
{
errorMssg = wmsMsg;
}
return false;
}
else

Loading…
Cancel
Save