mes接口调试审核
This commit is contained in:
@@ -515,7 +515,7 @@ namespace JinYuan.MES
|
||||
|
||||
JArray jaIdentiftyList = new JArray();//identiftyList
|
||||
JObject jo3 = new JObject();
|
||||
jo3.Add("identification", m.CSBYHCODEA); //卷心码
|
||||
jo3.Add("identification", m.BarCode); //卷心码
|
||||
jo3.Add("qualityStatus", m.Result);
|
||||
jo3.Add("qrCode", ""); //
|
||||
jo3.Add("ngMessage", m.Remark);
|
||||
@@ -554,7 +554,7 @@ namespace JinYuan.MES
|
||||
long outTime = sw.ElapsedMilliseconds;
|
||||
if (outTime > 1000)
|
||||
{
|
||||
LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.CSBYHCODEA}", "MESTime");
|
||||
LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.BarCode}", "MESTime");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(result))
|
||||
@@ -569,7 +569,7 @@ namespace JinYuan.MES
|
||||
if (res1.success)
|
||||
{
|
||||
res = true;
|
||||
GetOutMesResType(res1, m.CSBYHCODEA, ref mesage, ref mesResType);
|
||||
GetOutMesResType(res1, m.BarCode, ref mesage, ref mesResType);
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息\{nowDate.ToString("HH")}.txt", resJson);
|
||||
}
|
||||
@@ -625,7 +625,7 @@ namespace JinYuan.MES
|
||||
|
||||
JArray jaIdentiftyList = new JArray();//identiftyList
|
||||
JObject jo3 = new JObject();
|
||||
jo3.Add("identification", m.CSBYHCODEA); //卷心码
|
||||
jo3.Add("identification", m.BarCode); //卷心码
|
||||
jo3.Add("qualityStatus", m.Result);
|
||||
jo3.Add("qrCode", ""); //
|
||||
jo3.Add("ngMessage", m.Remark);
|
||||
@@ -664,7 +664,7 @@ namespace JinYuan.MES
|
||||
long outTime = sw.ElapsedMilliseconds;
|
||||
if (outTime > 1000)
|
||||
{
|
||||
LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.CSBYHCODEA}", "MESTime");
|
||||
LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.BarCode}", "MESTime");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(result))
|
||||
@@ -679,7 +679,7 @@ namespace JinYuan.MES
|
||||
if (res1.success)
|
||||
{
|
||||
res = true;
|
||||
GetOutMesResType(res1, m.CSBYHCODEA, ref mesage, ref mesResType);
|
||||
GetOutMesResType(res1, m.BarCode, ref mesage, ref mesResType);
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用进出站一体信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进出站一体信息(组装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
}
|
||||
@@ -705,7 +705,7 @@ namespace JinYuan.MES
|
||||
/// </summary>
|
||||
/// <param name="m"></param>
|
||||
/// <returns></returns>
|
||||
public bool OutboundInformations(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity listBar, ref string MesMessage, ref MesResType mesResType, List<string> NGcodeList)
|
||||
public bool OutboundInformations(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity listBar, ref string MesMessage, ref MesResType mesResType, List<string> NGcodeList, List<string> ngMessage)
|
||||
{
|
||||
|
||||
|
||||
@@ -725,7 +725,7 @@ namespace JinYuan.MES
|
||||
userName = userName,
|
||||
containerCode = "",
|
||||
materialCode = materialCode,
|
||||
productType = "OK",
|
||||
productType = "MB56",
|
||||
//completeQty = listBar.Count.ToString(),
|
||||
type = 1
|
||||
};
|
||||
@@ -737,39 +737,16 @@ namespace JinYuan.MES
|
||||
{
|
||||
new assembleLineList()
|
||||
{
|
||||
identification=listBar.CSBYHCODEA,
|
||||
identification=listBar.BarCode,
|
||||
qualityStatus = listBar.CSBYHOUTSTATIONJUDGMENTRESULT,
|
||||
qrCode = "",
|
||||
ngCode = NGcodeList,
|
||||
ngMessage = listBar.Remark,
|
||||
ngMessage = string.Join(",",ngMessage),
|
||||
materialLotList=new List<string>{},
|
||||
materialLotCode= "",
|
||||
}
|
||||
};
|
||||
//cc.identification = listBar[i].BarCode;
|
||||
//cc.materialLotList = GetListString(1, "");
|
||||
//cc.materialLotCode = "";
|
||||
//cc.materialLotCodeLocator = "";
|
||||
//cc.qualityStatus = listBar[i].Result.ToString();
|
||||
//cc.qrCode = "";
|
||||
//cc.ngCode = GetListString(1, "");
|
||||
//cc.
|
||||
|
||||
//model.containerCodeAndIdentificationList[i].identiftyList.Add(new IdentiftyListItems
|
||||
//{
|
||||
// identification = listBar[i].BarCode,
|
||||
// qualityStatus ="OK" ,
|
||||
// qrCode = "",
|
||||
// ngMessage = listBar[i].Remark,
|
||||
|
||||
//});
|
||||
//model.containerCodeAndIdentificationList[i].identiftyList[i].materialLotList = new List<MaterialLotListItems>();
|
||||
//model.containerCodeAndIdentificationList[i].identiftyList[i].materialLotList.Add(new MaterialLotListItems
|
||||
//{
|
||||
// materialLotCode = "",
|
||||
// materialLotCodeLocator = "",
|
||||
//});
|
||||
//model.containerCodeAndIdentificationList.Add(cc);
|
||||
}
|
||||
|
||||
|
||||
@@ -784,7 +761,7 @@ namespace JinYuan.MES
|
||||
long outTime = sw.ElapsedMilliseconds;
|
||||
if (outTime > 1000)
|
||||
{
|
||||
LoggerHelp.WriteLog($"外观检出站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar.CSBYHCODEA}", "MESTime");
|
||||
LoggerHelp.WriteLog($"外观检出站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar.BarCode}", "MESTime");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(result))
|
||||
@@ -799,13 +776,13 @@ namespace JinYuan.MES
|
||||
if (res1.success)
|
||||
{
|
||||
res = true;
|
||||
GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType);
|
||||
GetOutMesResType(res1, listBar.BarCode, ref MesMessage, ref mesResType);
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(包装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(包装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType);
|
||||
GetOutMesResType(res1, listBar.BarCode, ref MesMessage, ref mesResType);
|
||||
var resData = res1 == null ? "" : result;
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(包装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(包装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
@@ -1142,7 +1119,7 @@ namespace JinYuan.MES
|
||||
};
|
||||
payload1.identification = new IdentificationListItem
|
||||
{
|
||||
identification = m.CSBYHCODEA,
|
||||
identification = m.BarCode,
|
||||
qualityStatus = m.CSBYHOUTSTATIONJUDGMENTRESULT,
|
||||
};
|
||||
|
||||
@@ -1721,7 +1698,7 @@ namespace JinYuan.MES
|
||||
{
|
||||
for (int j = 0; j < res1.total; j++)
|
||||
{
|
||||
if (res1.rows[j].identification == list[i].CSBYHCODEA)
|
||||
if (res1.rows[j].identification == list[i].BarCode)
|
||||
{
|
||||
if (res1.rows[j].success)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user