|
|
@@ -57,7 +57,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
OutputLog.TraceLog(LogPriority.Warning,
|
|
|
this.ToString(),
|
|
|
System.Reflection.MethodBase.GetCurrentMethod().Name,
|
|
|
- " userInfo is null " + userPassword + System.Environment.NewLine +
|
|
|
+ " userInfo is null " + userPassword + System.Environment.NewLine +
|
|
|
" accountCode:" + accountCode + " userCode:" + userCode + " procedureID:" + procedureID + " barcode:" + barcode,
|
|
|
LocalPath.LogExePath + "SmartDevice\\");
|
|
|
return;
|
|
|
@@ -98,7 +98,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
userPassword + System.Environment.NewLine +
|
|
|
" accountCode:" + accountCode + " userCode:" + userCode + " procedureID:" + procedureID + " barcode:" + barcode,
|
|
|
JsonHelper.ToJson(dt),
|
|
|
- LocalPath.LogExePath+ "SmartDevice\\");
|
|
|
+ LocalPath.LogExePath + "SmartDevice\\");
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -164,25 +164,28 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
ProcedureEntity procedureInfo = null;
|
|
|
DataTable dt = PMModuleLogicDAL.AddWorkPiece(procedureID, barcodeTable, sUserInfo, out procedureInfo);
|
|
|
|
|
|
- string out_msg = dt.Rows[0]["out_errMsg"].ToString();
|
|
|
- if (dt != null && dt.Rows.Count > 0 && !string.IsNullOrWhiteSpace(out_msg))
|
|
|
+ if (dt != null && dt.Rows.Count > 0)
|
|
|
{
|
|
|
- OutputLog.TraceLog(LogPriority.Warning,
|
|
|
- this.ToString(),
|
|
|
- System.Reflection.MethodBase.GetCurrentMethod().Name + System.Environment.NewLine +
|
|
|
- userPassword + System.Environment.NewLine +
|
|
|
- " accountCode:" + accountCode + " userCode:" + userCode + " procedureID:" + procedureID + " barcode:" + barcode,
|
|
|
- JsonHelper.ToJson(dt),
|
|
|
- LocalPath.LogExePath + "SmartDevice\\");
|
|
|
- if (out_msg.StartsWith("无效条码"))
|
|
|
- {
|
|
|
- return "EP-01";
|
|
|
- }
|
|
|
- if (out_msg.Contains("不能到达该工序"))
|
|
|
+ string out_msg = dt.Rows[0]["out_errMsg"].ToString();
|
|
|
+ if (!string.IsNullOrWhiteSpace(out_msg))
|
|
|
{
|
|
|
- return "EP-02";
|
|
|
+ OutputLog.TraceLog(LogPriority.Warning,
|
|
|
+ this.ToString(),
|
|
|
+ System.Reflection.MethodBase.GetCurrentMethod().Name + System.Environment.NewLine +
|
|
|
+ userPassword + System.Environment.NewLine +
|
|
|
+ " accountCode:" + accountCode + " userCode:" + userCode + " procedureID:" + procedureID + " barcode:" + barcode,
|
|
|
+ JsonHelper.ToJson(dt),
|
|
|
+ LocalPath.LogExePath + "SmartDevice\\");
|
|
|
+ if (out_msg.StartsWith("无效条码"))
|
|
|
+ {
|
|
|
+ return "EP-01";
|
|
|
+ }
|
|
|
+ if (out_msg.Contains("不能到达该工序"))
|
|
|
+ {
|
|
|
+ return "EP-02";
|
|
|
+ }
|
|
|
+ return "EP-00";
|
|
|
}
|
|
|
- return "EP-00";
|
|
|
}
|
|
|
return "OK";
|
|
|
}
|
|
|
@@ -206,7 +209,8 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
/// <param name="userCode"></param>
|
|
|
/// <param name="groutingData"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string SetGroutingLineDetail(string accountCode, string userCode, string groutingData)
|
|
|
+ public string SetGroutingLineDetail(string accountCode, string userCode,
|
|
|
+ string groutingData, string remarks)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
@@ -214,19 +218,18 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
DataTable dt = sre.Data.Tables[0];
|
|
|
return dt.Rows[0]["out_errMsg"].ToString();
|
|
|
}
|
|
|
- catch(Exception ex)
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
OutputLog.TraceLog(LogPriority.Error,
|
|
|
this.ToString(),
|
|
|
System.Reflection.MethodBase.GetCurrentMethod().Name + System.Environment.NewLine +
|
|
|
- " accountCode:" + accountCode + " userCode:" + userCode ,
|
|
|
+ " accountCode:" + accountCode + " userCode:" + userCode,
|
|
|
ex.ToString(),
|
|
|
LocalPath.LogExePath);
|
|
|
return "EE";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 登窑、入窑、出窑 接口 xuwei add 2019-11-19
|
|
|
/// </summary>
|
|
|
@@ -234,7 +237,8 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
/// <param name="userCode"></param>
|
|
|
/// <param name="groutingData"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string AddWorkPieceKiln(string accountCode, string userCode, int procedureID,string kilnCarCode, string barCodeAndPosition="")
|
|
|
+ public string AddWorkPieceKiln(string accountCode, string userCode, int procedureID,
|
|
|
+ string kilnCarCode, string barCodeAndPosition, string remarks)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
@@ -245,7 +249,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
OutputLog.TraceLog(LogPriority.Warning,
|
|
|
this.ToString(),
|
|
|
System.Reflection.MethodBase.GetCurrentMethod().Name,
|
|
|
- " accountCode:" + accountCode + " userCode:" + userCode + " procedureID:" + procedureID ,
|
|
|
+ $" accountCode:{accountCode} userCode:{userCode} procedureID:{procedureID} kilnCarCode:{kilnCarCode} barCodeAndPosition:{barCodeAndPosition}",
|
|
|
LocalPath.LogExePath + "SmartDevice\\");
|
|
|
return "EU-01";
|
|
|
}
|
|
|
@@ -258,6 +262,15 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
|
|
|
#region 按窑车号取窑车信息
|
|
|
DataTable carInfo = SmartDeviceLogic.getKilnCarByCode(kilnCarCode);
|
|
|
+ if (carInfo == null || carInfo.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ OutputLog.TraceLog(LogPriority.Warning,
|
|
|
+ this.ToString(),
|
|
|
+ System.Reflection.MethodBase.GetCurrentMethod().Name,
|
|
|
+ $" accountCode:{accountCode} userCode:{userCode} procedureID:{procedureID} kilnCarCode:{kilnCarCode} barCodeAndPosition:{barCodeAndPosition}",
|
|
|
+ LocalPath.LogExePath + "SmartDevice\\");
|
|
|
+ return "EP-01";
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 配置参数 barcodeTable
|
|
|
@@ -277,24 +290,35 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
DataTable barcodeTable = new DataTable();
|
|
|
|
|
|
//入窑 卸窑 配置参数 barcodeTable
|
|
|
- if (barCodeAndPosition == "")
|
|
|
+ if (string.IsNullOrWhiteSpace(barCodeAndPosition))
|
|
|
{
|
|
|
barcodeTable.TableName = "barcodeTable";
|
|
|
barcodeTable.Columns.Add("UserID");
|
|
|
barcodeTable.Columns.Add("UserCode");
|
|
|
barcodeTable.Columns.Add("UserName");
|
|
|
+ barcodeTable.Columns.Add("KilnID");
|
|
|
barcodeTable.Columns.Add("KilnCode");
|
|
|
+ barcodeTable.Columns.Add("KilnName");
|
|
|
+ barcodeTable.Columns.Add("KilnCarCode");
|
|
|
+ barcodeTable.Columns.Add("KilnCarID");
|
|
|
+ barcodeTable.Columns.Add("KilnCarName");
|
|
|
+ barcodeTable.Columns.Add("Remarks");
|
|
|
DataRow drCollectType = barcodeTable.NewRow();
|
|
|
drCollectType["UserID"] = userInfo.Rows[0]["UserID"].ToString();
|
|
|
drCollectType["UserCode"] = userInfo.Rows[0]["UserCode"].ToString();
|
|
|
drCollectType["UserName"] = userInfo.Rows[0]["UserName"].ToString();
|
|
|
+ drCollectType["KilnID"] = carInfo.Rows[0]["KilnID"].ToString();
|
|
|
drCollectType["KilnCode"] = carInfo.Rows[0]["KilnCode"].ToString();
|
|
|
+ drCollectType["KilnName"] = carInfo.Rows[0]["KilnName"].ToString();
|
|
|
+ drCollectType["KilnCarID"] = carInfo.Rows[0]["KilnCarID"].ToString();
|
|
|
+ drCollectType["KilnCarCode"] = carInfo.Rows[0]["KilnCarCode"].ToString();
|
|
|
+ drCollectType["KilnCarName"] = carInfo.Rows[0]["KilnCarName"].ToString();
|
|
|
+ drCollectType["Remarks"] = remarks;
|
|
|
barcodeTable.Rows.Add(drCollectType);
|
|
|
}
|
|
|
-
|
|
|
- //登窑 添加数据 配置参数 barcodeTable
|
|
|
- if (barCodeAndPosition != "")
|
|
|
+ else
|
|
|
{
|
|
|
+ //登窑 添加数据 配置参数 barcodeTable
|
|
|
barcodeTable.TableName = "barcodeTable";
|
|
|
barcodeTable.Columns.Add("UserID");
|
|
|
barcodeTable.Columns.Add("UserCode");
|
|
|
@@ -303,12 +327,13 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
barcodeTable.Columns.Add("KilnID");
|
|
|
barcodeTable.Columns.Add("KilnCode");
|
|
|
barcodeTable.Columns.Add("KilnName");
|
|
|
- barcodeTable.Columns.Add("KilnCarCode");
|
|
|
barcodeTable.Columns.Add("KilnCarID");
|
|
|
+ barcodeTable.Columns.Add("KilnCarCode");
|
|
|
barcodeTable.Columns.Add("KilnCarName");
|
|
|
barcodeTable.Columns.Add("KilnCarPosition");
|
|
|
+ barcodeTable.Columns.Add("Remarks");
|
|
|
JArray barCodeArray = JArray.Parse(barCodeAndPosition);
|
|
|
- for(int i=0;i< barCodeArray.Count;i++)
|
|
|
+ for (int i = 0; i < barCodeArray.Count; i++)
|
|
|
{
|
|
|
DataRow drCollectType = barcodeTable.NewRow();
|
|
|
drCollectType["BarCode"] = barCodeArray[i]["barCode"].ToString();
|
|
|
@@ -319,39 +344,41 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
drCollectType["KilnCode"] = carInfo.Rows[0]["KilnCode"].ToString();
|
|
|
drCollectType["KilnName"] = carInfo.Rows[0]["KilnName"].ToString();
|
|
|
drCollectType["KilnCarID"] = carInfo.Rows[0]["KilnCarID"].ToString();
|
|
|
+ drCollectType["KilnCarCode"] = carInfo.Rows[0]["KilnCarCode"].ToString();
|
|
|
drCollectType["KilnCarName"] = carInfo.Rows[0]["KilnCarName"].ToString();
|
|
|
drCollectType["KilnCarPosition"] = barCodeArray[i]["kilnCarPosition"].ToString();
|
|
|
+ drCollectType["Remarks"] = remarks;
|
|
|
barcodeTable.Rows.Add(drCollectType);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
#region 调用原始业务逻辑
|
|
|
- ProcedureEntity procedureInfo = null;
|
|
|
- ServiceResultEntity sre = SmartDeviceLogic.AddWorkPieceKiln(accountCode, userCode, procedureID, barcodeTable, out procedureInfo);
|
|
|
- DataTable dt = sre.Data.Tables[0];
|
|
|
+ DataTable dt = SmartDeviceLogic.AddWorkPieceKiln(procedureID, barcodeTable, sUserInfo);
|
|
|
#endregion
|
|
|
|
|
|
#region 输出结果
|
|
|
- string out_msg = dt.Rows[0]["out_errMsg"].ToString();
|
|
|
- if (dt != null && dt.Rows.Count > 0 && !string.IsNullOrWhiteSpace(out_msg))
|
|
|
+ if (dt != null && dt.Rows.Count > 0)
|
|
|
{
|
|
|
- OutputLog.TraceLog(LogPriority.Warning,
|
|
|
+ string out_msg = dt.Rows[0]["out_errMsg"].ToString();
|
|
|
+ if (!string.IsNullOrWhiteSpace(out_msg))
|
|
|
+ {
|
|
|
+ OutputLog.TraceLog(LogPriority.Warning,
|
|
|
this.ToString(),
|
|
|
System.Reflection.MethodBase.GetCurrentMethod().Name + System.Environment.NewLine +
|
|
|
- " accountCode:" + accountCode + " userCode:" + userCode + " procedureID:" + procedureID ,
|
|
|
+ $" accountCode:{accountCode} userCode:{userCode} procedureID:{procedureID} kilnCarCode:{kilnCarCode} barCodeAndPosition:{barCodeAndPosition}",
|
|
|
JsonHelper.ToJson(dt),
|
|
|
LocalPath.LogExePath + "SmartDevice\\");
|
|
|
- if (out_msg.StartsWith("无效条码"))
|
|
|
- {
|
|
|
- return "EP-01";
|
|
|
- }
|
|
|
- if (out_msg.Contains("不能到达该工序"))
|
|
|
- {
|
|
|
- return "EP-02";
|
|
|
+ //if (out_msg.StartsWith("无效条码"))
|
|
|
+ //{
|
|
|
+ // return "EP-01";
|
|
|
+ //}
|
|
|
+ if (out_msg.Contains("不能到达该工序"))
|
|
|
+ {
|
|
|
+ return "EP-02";
|
|
|
+ }
|
|
|
+ return "EP-00";
|
|
|
}
|
|
|
- return "EP-00";
|
|
|
}
|
|
|
return "OK";
|
|
|
#endregion
|
|
|
@@ -361,7 +388,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
OutputLog.TraceLog(LogPriority.Error,
|
|
|
this.ToString(),
|
|
|
System.Reflection.MethodBase.GetCurrentMethod().Name + System.Environment.NewLine +
|
|
|
- " accountCode:" + accountCode + " userCode:" + userCode + "procedureID:"+ procedureID ,
|
|
|
+ $" accountCode:{accountCode} userCode:{userCode} procedureID:{procedureID} kilnCarCode:{kilnCarCode} barCodeAndPosition:{barCodeAndPosition}",
|
|
|
ex.ToString(),
|
|
|
LocalPath.LogExePath);
|
|
|
return "EE";
|