|
|
@ -1048,6 +1048,9 @@ namespace InjectionPC |
|
|
|
} |
|
|
|
|
|
|
|
string errMsg = string.Empty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool saveRst = SaveInfo(md, true, mould, false, 0, IsOne, IsSupply, ManufacturerName, filename214, ref errMsg);//PLC来信号,IsSame == "0"时插入
|
|
|
|
if (saveRst == false) |
|
|
|
{ |
|
|
@ -2248,7 +2251,19 @@ namespace InjectionPC |
|
|
|
{ |
|
|
|
|
|
|
|
inBoxBll.UpdateBoxCount(boxCode, 1, false); |
|
|
|
BoxBarCodeReAddAndPrint(dt.Rows[0]); |
|
|
|
|
|
|
|
DataRow dr = dt.Rows[0]; |
|
|
|
if (string.IsNullOrEmpty(dr["BatchNo"].ToString())) |
|
|
|
{ |
|
|
|
string[] boxArray = boxCode.Split('.'); |
|
|
|
if (boxArray.Length > 1 && boxArray[1].Length == 6) |
|
|
|
{ |
|
|
|
dr["BatchNo"] = boxArray[1]; |
|
|
|
} |
|
|
|
} |
|
|
|
BoxBarCodeReAddAndPrint(dr); |
|
|
|
|
|
|
|
|
|
|
|
InitPackageInfo(); |
|
|
|
//试试打印数量是否更新
|
|
|
|
int count3 = 0; |
|
|
@ -2299,7 +2314,7 @@ namespace InjectionPC |
|
|
|
md.OneBarCode = newOneCode; |
|
|
|
md.BarCode = newBarCode; |
|
|
|
md.BoxNo = barCodeRow["BoxNo"].ToString(); |
|
|
|
|
|
|
|
md.PlanID = planID; |
|
|
|
md.Des1 = barCodeRow["Des1"].ToString(); |
|
|
|
md.PrintType = 2; |
|
|
|
|
|
|
@ -3377,8 +3392,8 @@ namespace InjectionPC |
|
|
|
|
|
|
|
//打印箱码
|
|
|
|
PrintBoxCode(dt.Rows[0], realCount, mould, isHandPrint); |
|
|
|
// _lastBoxNo = lbPackageCodeL.Text;
|
|
|
|
lbPackageCodeL.Text = ""; |
|
|
|
// _lastBoxNo = lbPackageCodeL.Text;
|
|
|
|
lbPackageCode.Text = ""; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
@ -3656,8 +3671,51 @@ namespace InjectionPC |
|
|
|
int standCount = int.Parse(boxRow["StandardQty"].ToString()); |
|
|
|
if(boxCount>= standCount) |
|
|
|
{ |
|
|
|
lbPackageCode.Text = ""; |
|
|
|
CheckPackageCode(partCode, autoPrint, mould, partName, isHandPrint); |
|
|
|
if (!string.IsNullOrEmpty(pkgCode)) |
|
|
|
{ |
|
|
|
LocalDBService local = new LocalDBService(SqlHelper.GetConnSting()); |
|
|
|
try |
|
|
|
{ |
|
|
|
local.BeginTrans(); |
|
|
|
_wmsBll.SaveInterface(local, pkgCode, "", Program.station); |
|
|
|
local.Commit(); |
|
|
|
|
|
|
|
string realCountStr = packageTable.Rows[0]["BoxCount"].ToString(); |
|
|
|
int realCount = 0; |
|
|
|
int.TryParse(realCountStr, out realCount); |
|
|
|
|
|
|
|
PrintBoxCode(packageTable.Rows[0], realCount, mould, isHandPrint); |
|
|
|
lbPackageCode.Text = ""; |
|
|
|
CheckPackageCode(partCode, autoPrint, mould, partName, isHandPrint); |
|
|
|
return; |
|
|
|
} |
|
|
|
catch(Exception e) |
|
|
|
{ |
|
|
|
if (local != null) |
|
|
|
{ |
|
|
|
local.Rollback(); |
|
|
|
} |
|
|
|
|
|
|
|
LogHelper.WriteLog("CheckPackageCode方法检测到满箱,自动wms接口报工时出错,错误原因:"+e.Message); |
|
|
|
|
|
|
|
} |
|
|
|
finally |
|
|
|
{ |
|
|
|
if (local != null) |
|
|
|
{ |
|
|
|
local.EndTrans(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//会死循环
|
|
|
|
//CheckPackageCode(partCode, autoPrint, mould, partName, isHandPrint);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -4732,6 +4790,10 @@ namespace InjectionPC |
|
|
|
|
|
|
|
//发送前,检查当前箱码, 为空或者箱码数量等于标包,情况箱码,重新生成新的箱码 250420
|
|
|
|
CheckPackageCode(md.PartNo, isAutoPrint, mould, md.Des1, isHandPrint); |
|
|
|
if(string.IsNullOrEmpty( md.BatchNo)) |
|
|
|
{ |
|
|
|
md.BatchNo = GetBatch(true); |
|
|
|
} |
|
|
|
bool rst = SaveBarCode(md, Program.tableName, isAutoPrint, mould, isHandPrint, ref errMsg, handPrint); |
|
|
|
|
|
|
|
return rst; |
|
|
|