修改海领截单HS CODE

master
jianghaiqing 5 months ago
parent be9a16c19c
commit adc195867d

@ -11738,7 +11738,7 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(order.HSCODE))
{
//如果录的HS CODE符合海领要求直接用HS CODE
if (Regex.IsMatch(order.HSCODE, "[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}") && order.HSCODE.Length == 12)
if (Regex.IsMatch(order.HSCODE, "[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}") && order.HSCODE.Length == 13)
{
voltaModel.HSCode = order.HSCODE;
}
@ -11768,7 +11768,7 @@ namespace Myshipping.Application
{
s4 = voltaModel.HSCode.Substring(8, 2);
}
//0000.00.00.00
voltaModel.HSCode = $"{s1}.{(s2.Length == 2 ? s2 : "00")}.{(s3.Length == 2 ? s3 : "00")}.{(s4.Length == 2 ? s4 : "00")}";
}
else

Loading…
Cancel
Save