修改导入功能

This commit is contained in:
wuweihua
2026-09-30 11:51:07 +08:00
parent 998aac74c8
commit 90cde8da4a
2 changed files with 14 additions and 6 deletions
@@ -1586,10 +1586,17 @@ public class BmsProductServiceImpl implements IBmsProductService
{
return null;
}
s = s.trim();
// Excel NA markers: / 、- 、— 、N/A
if ("/".equals(s) || "-".equals(s) || "\u2014".equals(s) || "\uff0d".equals(s)
|| "N/A".equalsIgnoreCase(s) || "NA".equalsIgnoreCase(s))
{
return null;
}
// strip currency / unit suffixes: 56、56元、56 RMB
s = s.replace(",", "").replace("\uffe5", "").replace("\u5143", "")
.replace("RMB", "").replace("rmb", "").trim();
if (s.isEmpty())
if (s.isEmpty() || "/".equals(s))
{
return null;
}
@@ -1031,7 +1031,12 @@ public class PrcPriceSetServiceImpl implements IPrcPriceSetService
}
continue;
}
// New band: always insert weight/country row (fees may be null; editable later).
// New band: skip when Excel has no usable fee (blank / slash = no service).
if (freight == null && registration == null)
{
skippedFee++;
continue;
}
PrcPriceSetDetail created = buildDetailFromImportRow(
priceSetId, psvId, productCode, productName, row, freight, registration);
created.setPspId(pspId);
@@ -1041,10 +1046,6 @@ public class PrcPriceSetServiceImpl implements IPrcPriceSetService
{
touched.add(created.getPsdId());
}
if (freight == null && registration == null)
{
skippedFee++;
}
inserted++;
}
}