优化导入逻辑
This commit is contained in:
+16
-3
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user