export customer ID 2
This commit is contained in:
parent
5c843c837c
commit
071055a74b
@ -488,7 +488,7 @@ public class CustomerServiceSupport
|
||||
|
||||
try {
|
||||
log.info("Export Customer [{}].", c);
|
||||
printer.printRecord(c.getId(),
|
||||
printer.printRecord(c.getId2(),
|
||||
c.getName(),
|
||||
c.getSumYtdSales(),
|
||||
joinYtdSales(c.getYears(), c.getYtdSales()),
|
||||
|
@ -90,6 +90,12 @@ public class CustomerYearToDateSaleServiceSupport
|
||||
*/
|
||||
@Override
|
||||
public void read(final CSVRecord record) {
|
||||
val customerId2 = StringUtils.trim(record.get(0));
|
||||
if (StringUtils.isBlank(customerId2)) {
|
||||
log.info("Blank customer id found, ignore.");
|
||||
return;
|
||||
}
|
||||
|
||||
val customerName = StringUtils.trim(record.get(1));
|
||||
if (StringUtils.isBlank(customerName)) {
|
||||
log.warn("Record [{}] blank customer name found, ignore.", record);
|
||||
@ -97,7 +103,9 @@ public class CustomerYearToDateSaleServiceSupport
|
||||
}
|
||||
|
||||
val customer = customerMapper.find(
|
||||
new Search(Customer.NAME, customerName));
|
||||
new Search(Customer.ID2, customerId2)
|
||||
.eq(Customer.NAME, customerName));
|
||||
|
||||
if (customer == null) {
|
||||
log.warn("No customer [{}] found, ignore.", customerName);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user