修改计费重去掉客户
This commit is contained in:
@@ -14,9 +14,6 @@ public class ChargeWeightImportRow implements Serializable
|
||||
@Excel(name = "订单号")
|
||||
private String orderNo;
|
||||
|
||||
@Excel(name = "客户")
|
||||
private String customer;
|
||||
|
||||
@Excel(name = "人工修改计费重")
|
||||
private BigDecimal chargeWeight;
|
||||
}
|
||||
|
||||
-23
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user