优化导入逻辑

This commit is contained in:
wuweihua
2026-09-29 10:32:59 +08:00
parent 590a65475b
commit ff57be1116
3 changed files with 22 additions and 6 deletions
@@ -917,9 +917,22 @@ public class PrcPriceSetServiceImpl implements IPrcPriceSetService
{
continue;
}
detailMapper.updateDetailPrices(hit.getPsdId(), row.getFreightPrice(), row.getRegistrationFee());
hit.setFvValue(row.getFreightPrice());
hit.setFvRegistrationFee(row.getRegistrationFee());
// Empty import freight/registration: do not overwrite existing detail values.
BigDecimal freight = row.getFreightPrice();
BigDecimal registration = row.getRegistrationFee();
if (freight == null && registration == null)
{
continue;
}
detailMapper.updateDetailPrices(hit.getPsdId(), freight, registration);
if (freight != null)
{
hit.setFvValue(freight);
}
if (registration != null)
{
hit.setFvRegistrationFee(registration);
}
touched.add(hit.getPsdId());
updated++;
}