修改导入功能
This commit is contained in:
+8
-1
@@ -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;
|
||||
}
|
||||
|
||||
+6
-5
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user