change -修改开始工单和开始批次计数参数类型

20260122
启龙 曹 2 months ago
parent f0c35f8f09
commit 7aa3c17413

@ -1743,7 +1743,7 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC";
public bool UpdateProWorkBatchInWork(string lineCode, string batchCode, string workorderCode, string productCode, string productName, string productdescen, string boxType, string packType, string umrez, string status, string productDate,int inum)
{
string sql = $@"update pro_workbatch_inwork set workorder_code='{workorderCode}',batch='{batchCode}',product_code='{productCode}',status='{status}',product_name='{productName}',product_name_en='{productdescen}',box_type='{boxType}',pack_type='{packType}',umrez='{umrez}',product_date='{productDate}',inum='{inum}' where line_code='{lineCode}' ";
string sql = $@"update pro_workbatch_inwork set workorder_code='{workorderCode}',batch='{batchCode}',product_code='{productCode}',status='{status}',product_name='{productName}',product_name_en='{productdescen}',box_type='{boxType}',pack_type='{packType}',umrez='{umrez}',product_date='{productDate}',inum={inum} where line_code='{lineCode}' ";
LogHelper.instance.log.Info($"sql:" + sql);
return Utils.netClientDBHelper.executeUpdate(sql) > 0;
}
@ -1795,9 +1795,9 @@ where machine_code = 'X1' and bind_status = '0' order by update_time DESC";
return Utils.netClientDBHelper.executeUpdate(sql) > 0;
}
public bool UpdateProWorkBatchInWorkBatchCode(string lineCode, string batchCode, string status, string productCode, string productName)
public bool UpdateProWorkBatchInWorkBatchCode(string lineCode, string batchCode, string status, string productCode, string productName,int inum)
{
string sql = $@"update pro_workbatch_inwork set batch='{batchCode}',product_code='{productCode}',product_name='{productName}',status='{status}' where line_code='{lineCode}' ";
string sql = $@"update pro_workbatch_inwork set batch='{batchCode}',product_code='{productCode}',product_name='{productName}',status='{status}',inum={inum} where line_code='{lineCode}' ";
return Utils.netClientDBHelper.executeUpdate(sql) > 0;
}

@ -803,12 +803,11 @@ namespace XGLFinishPro.Views
_dic.TryGetValue(deviceCode, out var boxType);
string umrez = dtBaseProduct.Rows[0]["umrez"].ToString();
string packType = dtBaseProductAtt.Rows[0]["pack_type"].ToString();
int inum = 1;
if (type == 0)
{
batchCode = "";
LogHelper.instance.log.Info($"开始工单:" + lineCode + "," + batchCode + "," + workorderCode + "," + productCode + "," + productName + "," + productdescen + "," + boxType + "," + packType + "," + umrez + "," + status + "," + LoginUser.WorkDate);
if (!formingMachineService.UpdateProWorkBatchInWork(lineCode, batchCode, workorderCode, productCode, productName, productdescen, boxType, packType, umrez, status, LoginUser.WorkDate, inum))
if (!formingMachineService.UpdateProWorkBatchInWork(lineCode, batchCode, workorderCode, productCode, productName, productdescen, boxType, packType, umrez, status, LoginUser.WorkDate, 1))
{
CustomMessageBox.Show("更新打印机表状态失败!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
LogHelper.instance.log.Info($"更新打印机表状态失败:" + CustomMessageBoxButton.OK +";"+ CustomMessageBoxIcon.Warning);
@ -817,7 +816,7 @@ namespace XGLFinishPro.Views
}
else if (type == 1)
{
if (!formingMachineService.UpdateProWorkBatchInWorkBatchCode(lineCode, batchCode, status, productCode, productName))
if (!formingMachineService.UpdateProWorkBatchInWorkBatchCode(lineCode, batchCode, status, productCode, productName,1))
{
CustomMessageBox.Show("更新打印机表状态失败!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
LogHelper.instance.log.Info($"更新打印机表状态失败:" + CustomMessageBoxButton.OK + ";" + CustomMessageBoxIcon.Warning);

Loading…
Cancel
Save