|
|
|
@ -395,8 +395,10 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
|
{
|
|
|
|
|
fileName = template.NamingRule;
|
|
|
|
|
var id = sugarParams.Where(x => x.ParameterName.ToLower() == "@id").FirstOrDefault().Value;
|
|
|
|
|
if (id != null) {
|
|
|
|
|
|
|
|
|
|
if (template.ModuleCode == "sea_freight_f_export")//主单
|
|
|
|
|
{
|
|
|
|
|
if (id != null)
|
|
|
|
|
{
|
|
|
|
|
var info = tenantDb.Queryable<dynamic>().AS("op_sea_export").Where("id=@id", new { id = id }).First();
|
|
|
|
|
if (fileName.Contains("[委托编号]"))
|
|
|
|
|
{
|
|
|
|
@ -407,6 +409,30 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
|
fileName = fileName.Replace("[提单号]", info.MBLNO);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (template.ModuleCode == "sea_freight_c_export") //分单
|
|
|
|
|
{
|
|
|
|
|
if (id != null)
|
|
|
|
|
{
|
|
|
|
|
var info = tenantDb.Queryable<dynamic>().AS("op_sea_export_billmanage").Where("id=@id", new { id = id }).First();
|
|
|
|
|
if (fileName.Contains("[委托编号]"))
|
|
|
|
|
{
|
|
|
|
|
fileName = fileName.Replace("[委托编号]", info.CustomerNo);
|
|
|
|
|
}
|
|
|
|
|
if (fileName.Contains("[提单号]"))
|
|
|
|
|
{
|
|
|
|
|
fileName = fileName.Replace("[提单号]", info.MBLNO);
|
|
|
|
|
}
|
|
|
|
|
if (fileName.Contains("[分提单号]"))
|
|
|
|
|
{
|
|
|
|
|
fileName = fileName.Replace("[分提单号]", info.HBLNO);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(fileName))
|
|
|
|
|
fileName = DateTime.Now.Ticks + "-" + NumUtil.GetRandomString(3);
|
|
|
|
|