Browse Source

修改日志

master
ruoxing.wang 1 day ago
parent
commit
9e68d899b5
  1. 17
      PunchingMistake/Function2.cs

17
PunchingMistake/Function2.cs

@ -428,10 +428,10 @@ namespace PunchingMistake
public static int SavePartAndProduct_New(string barcode, string partNo1, string partNo2, string ZcID, string OrderNo, string WorkClass, string planID, string SerialNo, string barCode1, string barCode2, string barCode3, string barCode4, string barCode5, string barCode6, string stationId, string description,string carMoedelCode) public static int SavePartAndProduct_New(string barcode, string partNo1, string partNo2, string ZcID, string OrderNo, string WorkClass, string planID, string SerialNo, string barCode1, string barCode2, string barCode3, string barCode4, string barCode5, string barCode6, string stationId, string description,string carMoedelCode)
{ {
int res = 0; int res = 0; string sql = string.Empty;
try try
{ {
string sql = @" sql = @"
INSERT INTO [dbo].[tb_Punch_Code_Record] INSERT INTO [dbo].[tb_Punch_Code_Record]
([barcode] ([barcode]
,[BcpID] ,[BcpID]
@ -458,7 +458,8 @@ namespace PunchingMistake
catch (Exception ex) catch (Exception ex)
{ {
//LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name); //LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
return res; LogHelper.WriteLog("向表tb_Punch_Code_Record保存数据异常,语句:" + sql + "异常原因:" + ex.Message);
return res;
} }
} }
@ -501,10 +502,10 @@ namespace PunchingMistake
} }
public static int AddCompleteCount(string ID,string state) public static int AddCompleteCount(string ID,string state)
{ {
int res = 0; int res = 0; string sql = string.Empty;
try try
{ {
string sql = string.Empty;
if(state == "合格") if(state == "合格")
{ {
sql = " update tb_ZP_MK_Plan set OKCount = OKCount + 1 where ID = '" + ID + "' "; sql = " update tb_ZP_MK_Plan set OKCount = OKCount + 1 where ID = '" + ID + "' ";
@ -524,15 +525,16 @@ namespace PunchingMistake
catch (Exception ex) catch (Exception ex)
{ {
//LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name); //LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
LogHelper.WriteLog("更新tb_ZP_MK_Plan表完成数量异常,语句:" + sql + "异常原因:" + ex.Message);
return res; return res;
} }
} }
public static int UpdateRecordFlag(string ID, string state) public static int UpdateRecordFlag(string ID, string state)
{ {
int res = 0; int res = 0; string sql = string.Empty;
try try
{ {
string sql = string.Empty;
sql = $" update tb_Punch_Code_Record set Flag = {state} where ID = '" + ID + "' "; sql = $" update tb_Punch_Code_Record set Flag = {state} where ID = '" + ID + "' ";
res = SqlHelper.ExecuteNonQuery(SqlHelper.SqlConnString, CommandType.Text, sql, null); res = SqlHelper.ExecuteNonQuery(SqlHelper.SqlConnString, CommandType.Text, sql, null);
@ -540,6 +542,7 @@ namespace PunchingMistake
} }
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.WriteLog("更新tb_Punch_Code_Record表Flag状态异常,语句:" + sql + "异常原因:" + ex.Message);
//LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name); //LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
return res; return res;
} }

Loading…
Cancel
Save