修改计费重去掉客户

This commit is contained in:
wuweihua
2026-10-20 18:48:46 +08:00
parent 66d95a0da9
commit 2d5a2c4bab
3 changed files with 4 additions and 31 deletions
@@ -2167,20 +2167,11 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
{
throw new ServiceException("人工修改计费重必须大于 0");
}
String customer = row.getCustomer() == null ? "" : row.getCustomer().trim();
if (customer.isEmpty())
{
throw new ServiceException("客户不能为空");
}
PrcOrderBill bill = billByOrderNo.get(orderNo);
if (bill == null)
{
throw new ServiceException("订单不存在");
}
if (!customerMatches(bill, customer))
{
throw new ServiceException("客户与订单不匹配");
}
if (BillRefundStatus.REFUNDED.getCode().equalsIgnoreCase(bill.getRefundStatus()))
{
throw new ServiceException("订单已退费");
@@ -2294,9 +2285,6 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
}
ChargeWeightImportRow row = new ChargeWeightImportRow();
row.setOrderNo(bill.getOrderNo());
String customer = StringUtils.isNotEmpty(bill.getCustomerCode()) ? bill.getCustomerCode()
: bill.getCustomerName();
row.setCustomer(customer);
row.setChargeWeight(null);
rows.add(row);
}
@@ -2353,17 +2341,6 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
return resultChargeWeight;
}
private static boolean customerMatches(PrcOrderBill bill, String customer)
{
if (bill == null || StringUtils.isEmpty(customer))
{
return false;
}
String code = bill.getCustomerCode() == null ? "" : bill.getCustomerCode().trim();
String name = bill.getCustomerName() == null ? "" : bill.getCustomerName().trim();
return customer.equalsIgnoreCase(code) || customer.equals(name);
}
private TmsPriceBillRequest buildBillRequestFromBill(PrcOrderBill bill)
{
TmsPriceBillRequest req = new TmsPriceBillRequest();