|
|
@ -519,7 +519,7 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public DateTime ETD { get; set; }
|
|
|
|
public DateTime? ETD { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 海运托书
|
|
|
|
/// 海运托书
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -620,15 +620,18 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
{ //将识别数据与现有数据合并
|
|
|
|
{ //将识别数据与现有数据合并
|
|
|
|
//如识别数据有内容 则用其代替现有字段内容
|
|
|
|
//如识别数据有内容 则用其代替现有字段内容
|
|
|
|
|
|
|
|
|
|
|
|
var _result = data.commitResult;
|
|
|
|
if (data != null && data.commitResult != null)
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(_result.发货人))
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//headdata.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//发货人 SHIPPER
|
|
|
|
var _result = data.commitResult;
|
|
|
|
PropNameList = new Dictionary<string, string>
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(_result.发货人))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//headdata.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//发货人 SHIPPER
|
|
|
|
|
|
|
|
PropNameList = new Dictionary<string, string>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -671,42 +674,43 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
{ "HSCODE", "HSCODE" }
|
|
|
|
{ "HSCODE", "HSCODE" }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in PropNameList)
|
|
|
|
foreach (var item in PropNameList)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//var value = _result.GetType().GetProperty("发货人").GetValue(_result, null);
|
|
|
|
//var value = _result.GetType().GetProperty("发货人").GetValue(_result, null);
|
|
|
|
|
|
|
|
|
|
|
|
//headdata.SetPropertyValue("")
|
|
|
|
//headdata.SetPropertyValue("")
|
|
|
|
var value = _result.GetType().GetProperty(item.Key).GetValue(_result, null);
|
|
|
|
var value = _result.GetType().GetProperty(item.Key).GetValue(_result, null);
|
|
|
|
|
|
|
|
|
|
|
|
if (value != null && !string.IsNullOrWhiteSpace(value.ToString()))
|
|
|
|
if (value != null && !string.IsNullOrWhiteSpace(value.ToString()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
headdata.SetPropertyValue(item.Value, value.ToString());
|
|
|
|
headdata.SetPropertyValue(item.Value, value.ToString());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//不规则的数据
|
|
|
|
//不规则的数据
|
|
|
|
|
|
|
|
|
|
|
|
var cdc = new CommonDataContext();
|
|
|
|
var cdc = new CommonDataContext();
|
|
|
|
|
|
|
|
|
|
|
|
headdata.CNTRTOTAL = _result.GetCntrtotal();
|
|
|
|
headdata.CNTRTOTAL = _result.GetCntrtotal();
|
|
|
|
|
|
|
|
|
|
|
|
var _customername = headdata.CUSTOMERNAME;
|
|
|
|
var _customername = headdata.CUSTOMERNAME;
|
|
|
|
|
|
|
|
|
|
|
|
//如果CUSTOMERNAME在info_client.SHORTNAME当中不存在 则尝试用info_client.FULLNAME对应后修改之
|
|
|
|
//如果CUSTOMERNAME在info_client.SHORTNAME当中不存在 则尝试用info_client.FULLNAME对应后修改之
|
|
|
|
|
|
|
|
|
|
|
|
var _infoclient = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == _customername);
|
|
|
|
var _infoclient = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == _customername);
|
|
|
|
|
|
|
|
|
|
|
|
if (_infoclient == null || string.IsNullOrWhiteSpace(_infoclient.SHORTNAME))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var _tempinfoclient = cdc.info_client.FirstOrDefault(x => x.EnFullName == _customername || x.DESCRIPTION == _customername);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_tempinfoclient == null || string.IsNullOrWhiteSpace(_tempinfoclient.SHORTNAME))
|
|
|
|
if (_infoclient == null || string.IsNullOrWhiteSpace(_infoclient.SHORTNAME))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
headdata.CUSTOMERNAME = _tempinfoclient.SHORTNAME;
|
|
|
|
var _tempinfoclient = cdc.info_client.FirstOrDefault(x => x.EnFullName == _customername || x.DESCRIPTION == _customername);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_tempinfoclient == null || string.IsNullOrWhiteSpace(_tempinfoclient.SHORTNAME))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
headdata.CUSTOMERNAME = _tempinfoclient.SHORTNAME;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Dictionary<string, string> PropNameList { get; set; } = new Dictionary<string, string>();
|
|
|
|
private Dictionary<string, string> PropNameList { get; set; } = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|