|
@ -115,12 +115,10 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
var jsonString = noPoAsn.JsonString; |
|
|
var jsonString = noPoAsn.JsonString; |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
var a = 0; |
|
|
|
|
|
var ss = 8 / a; |
|
|
|
|
|
var result = await _postService.PostAsync(baseUrl, apiUrl, jsonString, username, password); |
|
|
var result = await _postService.PostAsync(baseUrl, apiUrl, jsonString, username, password); |
|
|
if (result == null) |
|
|
if (result == null) |
|
|
{ |
|
|
{ |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.None, "Boomi没有返回值"); |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.None, "Boomi没有返回值","Boomi接口执行失败"); |
|
|
} |
|
|
} |
|
|
if (result?.Status == "SUCCESS") |
|
|
if (result?.Status == "SUCCESS") |
|
|
{ |
|
|
{ |
|
@ -128,18 +126,18 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
} |
|
|
} |
|
|
else if (result?.Status == "EXCEPTION") |
|
|
else if (result?.Status == "EXCEPTION") |
|
|
{ |
|
|
{ |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.Exception, "EXCEPTION" + result?.ErrorMessage); |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.Exception, "EXCEPTION" + result?.ErrorMessage, "Boomi接口执行失败"); |
|
|
} |
|
|
} |
|
|
else if (result?.Status == "FAIL") |
|
|
else if (result?.Status == "FAIL") |
|
|
{ |
|
|
{ |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.FAIL, "FAIL" + result?.ErrorMessage); |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.FAIL, "FAIL" + result?.ErrorMessage, "Boomi接口执行失败"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
catch (Exception e) |
|
|
catch (Exception e) |
|
|
{ |
|
|
{ |
|
|
Logger.LogException(e); |
|
|
Logger.LogException(e); |
|
|
e = e.GetBaseException(); |
|
|
e = e.GetBaseException(); |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.Exception, "接口程序异常"+e.Message); |
|
|
noPoAsn.SetError("Boomi", EnumExchangeDataErrorCode.Exception, "接口程序异常"+e.Message, "Boomi接口执行失败"); |
|
|
} |
|
|
} |
|
|
finally |
|
|
finally |
|
|
{ |
|
|
{ |
|
@ -187,7 +185,6 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
vendorCode = asn.VendId, |
|
|
vendorCode = asn.VendId, |
|
|
contacts = asn.ReceiveUser, |
|
|
contacts = asn.ReceiveUser, |
|
|
phone = "", |
|
|
phone = "", |
|
|
status = null, |
|
|
|
|
|
truckNbr = asn.PlateNumber, |
|
|
truckNbr = asn.PlateNumber, |
|
|
whse = "", |
|
|
whse = "", |
|
|
dock = asn.Dock, |
|
|
dock = asn.Dock, |
|
@ -195,10 +192,11 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
dueDate = asn.ReceiveTime, |
|
|
dueDate = asn.ReceiveTime, |
|
|
timeWindow = asn.ReceivedPort, |
|
|
timeWindow = asn.ReceivedPort, |
|
|
remark = asn.Remark, |
|
|
remark = asn.Remark, |
|
|
|
|
|
subsite=asn.WebSubSite |
|
|
}; |
|
|
}; |
|
|
if (string.IsNullOrEmpty(asnMstr.TimeWindow)) |
|
|
if (string.IsNullOrEmpty(asnMstr.timeWindow)) |
|
|
{ |
|
|
{ |
|
|
asnMstr.TimeWindow = "00:00-00:00"; |
|
|
asnMstr.timeWindow = "00:00-00:00"; |
|
|
} |
|
|
} |
|
|
foreach (var barcode in barcodes) |
|
|
foreach (var barcode in barcodes) |
|
|
{ |
|
|
{ |
|
@ -291,7 +289,14 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
{ |
|
|
{ |
|
|
exist.JsonString = x12Asn.JsonString; |
|
|
exist.JsonString = x12Asn.JsonString; |
|
|
exist.EdiString = x12Asn.EdiString; |
|
|
exist.EdiString = x12Asn.EdiString; |
|
|
exist.Reset(); |
|
|
if(x12Asn.Status== EnumExchangeDataStatus.Finish) |
|
|
|
|
|
{ |
|
|
|
|
|
exist.SetSuccess(x12Asn.Reader); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
exist.SetError(x12Asn.Reader, (EnumExchangeDataErrorCode) x12Asn.ErrorCode, x12Asn.ErrorMessage, x12Asn.Remark); |
|
|
|
|
|
} |
|
|
await x12AsnRepository.UpdateAsync(exist); |
|
|
await x12AsnRepository.UpdateAsync(exist); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|