bug修改
parent
846a168d79
commit
a41d653cf0
|
|
@ -101,7 +101,7 @@ public class OrderTempService extends BaseService {
|
||||||
Integer product_id,
|
Integer product_id,
|
||||||
Boolean invoice_code_is_null
|
Boolean invoice_code_is_null
|
||||||
) {
|
) {
|
||||||
String selectsql = "select t.* ,t.sn as old_sn,t.ticket_code as old_ticket_code" +
|
String selectsql = "select t.* ,t.sn as old_sn,t.ticket_code as old_ticket_code,ot.ticket_code as new_ticket_code,ot.sn as new_sn" +
|
||||||
", p.in_time, p.out_time, p.in_which, p.out_which, p.in_mode, p.out_mode \n" +
|
", p.in_time, p.out_time, p.in_which, p.out_which, p.in_mode, p.out_mode \n" +
|
||||||
", p.first_weight, p.second_weight, p.first_weigh_mode, p.second_weight_mode \n" +
|
", p.first_weight, p.second_weight, p.first_weigh_mode, p.second_weight_mode \n" +
|
||||||
", p.first_pic, p.first_weight_which, p.second_weight_which, p.second_pic \n" +
|
", p.first_pic, p.first_weight_which, p.second_weight_which, p.second_pic \n" +
|
||||||
|
|
@ -116,7 +116,7 @@ public class OrderTempService extends BaseService {
|
||||||
List<Object> paraList = new ArrayList<>();
|
List<Object> paraList = new ArrayList<>();
|
||||||
|
|
||||||
if (supermarket_type != null && supermarket_type == 3) {
|
if (supermarket_type != null && supermarket_type == 3) {
|
||||||
selectsql = "select t.* " +
|
selectsql = "select t.*,t.ticket_code as new_ticket_code,t.sn as new_sn " +
|
||||||
", p.in_time, p.out_time, p.in_which, p.out_which, p.in_mode, p.out_mode \n" +
|
", p.in_time, p.out_time, p.in_which, p.out_which, p.in_mode, p.out_mode \n" +
|
||||||
", p.first_weight, p.second_weight, p.first_weigh_mode, p.second_weight_mode \n" +
|
", p.first_weight, p.second_weight, p.first_weigh_mode, p.second_weight_mode \n" +
|
||||||
", p.first_pic, p.first_weight_which, p.second_weight_which, p.second_pic \n" +
|
", p.first_pic, p.first_weight_which, p.second_weight_which, p.second_pic \n" +
|
||||||
|
|
|
||||||
|
|
@ -45,14 +45,14 @@ public class InvoiceUseService {
|
||||||
) {
|
) {
|
||||||
String logsql = "select \n" +
|
String logsql = "select \n" +
|
||||||
" t.id rowkey, t.invoice_number, t.`code` invoice_code, t.state invoice_state, t.settlement_user_name, t.settlement_time, t.create_time, t.invalid_time, t.invalid_memo, t.invoice_type, t.invalid_user_name\n" +
|
" t.id rowkey, t.invoice_number, t.`code` invoice_code, t.state invoice_state, t.settlement_user_name, t.settlement_time, t.create_time, t.invalid_time, t.invalid_memo, t.invoice_type, t.invalid_user_name\n" +
|
||||||
" , r.receive_user_name, r.create_time receive_time, r.supermarket_id\n" +
|
// " , r.receive_user_name, r.create_time receive_time, r.supermarket_id\n" +
|
||||||
" , o.sn order_sn, o.weight, o.total_price, o.unit_price, o.truck_license, o.customer_id, o.customer_texpayer_name, o.customer_texpayer_num, o.isprepaid, o.state order_state, o.ticket_code,o.product_id,o.product_name\n" +
|
" , o.sn order_sn, o.weight, o.total_price, o.unit_price, o.truck_license, o.customer_id, o.customer_texpayer_name, o.customer_texpayer_num, o.isprepaid, o.state order_state, o.ticket_code,o.product_id,o.product_name\n" +
|
||||||
" , s.name supermarket_name " +
|
" , s.name supermarket_name " +
|
||||||
" from invoice_log t\n" +
|
" from invoice_log t\n" +
|
||||||
" left join invoice_receive r on t.invoice_receive_id = r.id\n" +
|
// " left join invoice_receive r on t.invoice_receive_id = r.id\n" +
|
||||||
" left join order_temp o on o.sn = t.order_sn \n" +
|
" left join order_temp o on o.sn = t.order_sn \n" +
|
||||||
" left join supermarket s on s.id = r.supermarket_id \n" +
|
" left join supermarket s on s.id = o.supermarket_id \n" +
|
||||||
" where t.state = 9 \n";
|
" where t.state = 9 and o.sale_type != 2 \n";
|
||||||
|
|
||||||
String ordsql = "select\n" +
|
String ordsql = "select\n" +
|
||||||
" t.uuid rowkey, t.invoice_number, t.invoice_code, l.state invoice_state, t.settlement_user_name, l.settlement_time, t.create_time, l.invalid_time, l.invalid_memo, t.invoice_type, l.invalid_user_name\n" +
|
" t.uuid rowkey, t.invoice_number, t.invoice_code, l.state invoice_state, t.settlement_user_name, l.settlement_time, t.create_time, l.invalid_time, l.invalid_memo, t.invoice_type, l.invalid_user_name\n" +
|
||||||
|
|
@ -63,7 +63,7 @@ public class InvoiceUseService {
|
||||||
" left join invoice_log l on l.invoice_number = t.invoice_number and l.code = t.invoice_code and l.order_sn = t.sn \n" +
|
" left join invoice_log l on l.invoice_number = t.invoice_number and l.code = t.invoice_code and l.order_sn = t.sn \n" +
|
||||||
" left join supermarket s on s.id = t.supermarket_id\n" +
|
" left join supermarket s on s.id = t.supermarket_id\n" +
|
||||||
" left join invoice_receive r on l.invoice_receive_id = r.id\n" +
|
" left join invoice_receive r on l.invoice_receive_id = r.id\n" +
|
||||||
" where 1=1 \n";
|
" where 1=1 and t.invoice_code is not null and t.sale_type != 2 \n";
|
||||||
|
|
||||||
List<Object> paramlog = new ArrayList<>();
|
List<Object> paramlog = new ArrayList<>();
|
||||||
List<Object> paramord = new ArrayList<>();
|
List<Object> paramord = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -121,9 +121,9 @@ public class OrderTempSyncService {
|
||||||
receive.setSurplus(receive.getSurplus() - 1);
|
receive.setSurplus(receive.getSurplus() - 1);
|
||||||
receive.setCurrentCode(invoice_code);
|
receive.setCurrentCode(invoice_code);
|
||||||
|
|
||||||
order.setInvoiceCode(invoice_code);
|
// order.setInvoiceCode(invoice_code);
|
||||||
order.setInvoiceNumber(invoice_number);
|
// order.setInvoiceNumber(invoice_number);
|
||||||
order.setInvoiceType(1);
|
// order.setInvoiceType(1);
|
||||||
} else {
|
} else {
|
||||||
// 不开发票的,必须使用结算单
|
// 不开发票的,必须使用结算单
|
||||||
ticketReceive = TicketReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), ticket_code);
|
ticketReceive = TicketReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), ticket_code);
|
||||||
|
|
@ -140,7 +140,7 @@ public class OrderTempSyncService {
|
||||||
ticketReceive.setCurrentCode(ticket_code);
|
ticketReceive.setCurrentCode(ticket_code);
|
||||||
|
|
||||||
order.setTicketCode(ticket_code);
|
order.setTicketCode(ticket_code);
|
||||||
order.setInvoiceType(2);
|
// order.setInvoiceType(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
order.setTransportId(transport.getId());
|
order.setTransportId(transport.getId());
|
||||||
|
|
@ -383,24 +383,24 @@ public class OrderTempSyncService {
|
||||||
|
|
||||||
// 零散客户需要开具发票的,需要检查是否有有效的领用记录
|
// 零散客户需要开具发票的,需要检查是否有有效的领用记录
|
||||||
if (ordercluster.getReqReceipt() == 1) {
|
if (ordercluster.getReqReceipt() == 1) {
|
||||||
receive = InvoiceReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), invoice_number, invoice_code);
|
// receive = InvoiceReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), invoice_number, invoice_code);
|
||||||
|
//
|
||||||
if (receive == null) {
|
// if (receive == null) {
|
||||||
return Result.failed("没有有效的发票领用记录,或者发票已经被使用");
|
// return Result.failed("没有有效的发票领用记录,或者发票已经被使用");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code);
|
// InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code);
|
||||||
if (invoiceLog != null) {
|
// if (invoiceLog != null) {
|
||||||
return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code);
|
// return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
order.setInvoiceCode(invoice_code);
|
// order.setInvoiceCode(invoice_code);
|
||||||
order.setInvoiceNumber(invoice_number);
|
// order.setInvoiceNumber(invoice_number);
|
||||||
|
//
|
||||||
receive.setSurplus(receive.getSurplus() - 1);
|
// receive.setSurplus(receive.getSurplus() - 1);
|
||||||
receive.setCurrentCode(invoice_code);
|
// receive.setCurrentCode(invoice_code);
|
||||||
|
//
|
||||||
order.setInvoiceType(1); // 需要开发票的,都是冠名发票
|
// order.setInvoiceType(1); // 需要开发票的,都是冠名发票
|
||||||
} else {
|
} else {
|
||||||
// 不开发票的,必须使用结算单
|
// 不开发票的,必须使用结算单
|
||||||
ticketReceive = TicketReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), ticket_code);
|
ticketReceive = TicketReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), ticket_code);
|
||||||
|
|
@ -416,7 +416,7 @@ public class OrderTempSyncService {
|
||||||
ticketReceive.setSurplus(ticketReceive.getSurplus() - 1);
|
ticketReceive.setSurplus(ticketReceive.getSurplus() - 1);
|
||||||
ticketReceive.setCurrentCode(ticket_code);
|
ticketReceive.setCurrentCode(ticket_code);
|
||||||
order.setTicketCode(ticket_code);
|
order.setTicketCode(ticket_code);
|
||||||
order.setInvoiceType(2); // 不需要开发票的,都是要专票的
|
// order.setInvoiceType(2); // 不需要开发票的,都是要专票的
|
||||||
}
|
}
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
|
|
@ -762,25 +762,25 @@ public class OrderTempSyncService {
|
||||||
// 2020-09-29 需要开具专票的,先开具结算单,不打发票
|
// 2020-09-29 需要开具专票的,先开具结算单,不打发票
|
||||||
// 2020-10-12 所有砂站都可以开结算单
|
// 2020-10-12 所有砂站都可以开结算单
|
||||||
if (customer.getInvoiceType() == 1) {
|
if (customer.getInvoiceType() == 1) {
|
||||||
receive = InvoiceReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), invoice_number, invoice_code);
|
// receive = InvoiceReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), invoice_number, invoice_code);
|
||||||
if (receive == null) {
|
// if (receive == null) {
|
||||||
return Result.failed("没有有效的发票领用记录,或者发票已经被使用");
|
// return Result.failed("没有有效的发票领用记录,或者发票已经被使用");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code);
|
// InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code);
|
||||||
if (invoiceLog != null) {
|
// if (invoiceLog != null) {
|
||||||
return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code);
|
// return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
receive.setSurplus(receive.getSurplus() - 1);
|
// receive.setSurplus(receive.getSurplus() - 1);
|
||||||
receive.setCurrentCode(invoice_code);
|
// receive.setCurrentCode(invoice_code);
|
||||||
|
|
||||||
// 不满足开专票的条件的,就必须开具冠名发票
|
// 不满足开专票的条件的,就必须开具冠名发票
|
||||||
// if (req_receipt == 1) { // 需要同时开具发票
|
// if (req_receipt == 1) { // 需要同时开具发票
|
||||||
order.setInvoiceCode(invoice_code);
|
// order.setInvoiceCode(invoice_code);
|
||||||
order.setInvoiceNumber(invoice_number);
|
// order.setInvoiceNumber(invoice_number);
|
||||||
order.setInvoiceType(1);
|
// order.setInvoiceType(1);
|
||||||
order.setInvoiceSite(1); // 在砂站开具冠名发票
|
// order.setInvoiceSite(1); // 在砂站开具冠名发票
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
// 需要专票的,在结算开了专票之后,再修改 invoice_site 字段
|
// 需要专票的,在结算开了专票之后,再修改 invoice_site 字段
|
||||||
|
|
@ -798,7 +798,7 @@ public class OrderTempSyncService {
|
||||||
ticketReceive.setSurplus(ticketReceive.getSurplus() - 1);
|
ticketReceive.setSurplus(ticketReceive.getSurplus() - 1);
|
||||||
ticketReceive.setCurrentCode(ticket_code);
|
ticketReceive.setCurrentCode(ticket_code);
|
||||||
order.setTicketCode(ticket_code);
|
order.setTicketCode(ticket_code);
|
||||||
order.setInvoiceType(2); // 不需要开发票的,都是要专票的
|
// order.setInvoiceType(2); // 不需要开发票的,都是要专票的
|
||||||
}
|
}
|
||||||
|
|
||||||
Product product = Product.dao.findById(ordercluster.getProductId());
|
Product product = Product.dao.findById(ordercluster.getProductId());
|
||||||
|
|
@ -1165,25 +1165,25 @@ public class OrderTempSyncService {
|
||||||
// 2020-09-29 需要开具专票的,先开具结算单,不打发票
|
// 2020-09-29 需要开具专票的,先开具结算单,不打发票
|
||||||
// 2020-10-12 所有砂站都可以开结算单
|
// 2020-10-12 所有砂站都可以开结算单
|
||||||
if (customer.getInvoiceType() == 1) {
|
if (customer.getInvoiceType() == 1) {
|
||||||
receive = InvoiceReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), invoice_number, invoice_code);
|
// receive = InvoiceReceiveService.me.checkSurplusReceive(transport.getSupermarketId(), invoice_number, invoice_code);
|
||||||
if (receive == null) {
|
// if (receive == null) {
|
||||||
return Result.failed("没有有效的发票领用记录,或者发票已经被使用");
|
// return Result.failed("没有有效的发票领用记录,或者发票已经被使用");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code);
|
// InvoiceLog invoiceLog = InvoiceLogService.me.checkUseInvoiceLog(invoice_number, invoice_code);
|
||||||
if (invoiceLog != null) {
|
// if (invoiceLog != null) {
|
||||||
return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code);
|
// return Result.failedstr("发票 %s|%s 已使用!重新打开结算界面,获取新的发票信息。", invoice_number, invoice_code);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
receive.setSurplus(receive.getSurplus() - 1);
|
// receive.setSurplus(receive.getSurplus() - 1);
|
||||||
receive.setCurrentCode(invoice_code);
|
// receive.setCurrentCode(invoice_code);
|
||||||
|
|
||||||
// 不满足开专票的条件的,就必须开具冠名发票
|
// 不满足开专票的条件的,就必须开具冠名发票
|
||||||
// if (req_receipt == 1) { // 需要同时开具发票
|
// if (req_receipt == 1) { // 需要同时开具发票
|
||||||
order.setInvoiceCode(invoice_code);
|
// order.setInvoiceCode(invoice_code);
|
||||||
order.setInvoiceNumber(invoice_number);
|
// order.setInvoiceNumber(invoice_number);
|
||||||
order.setInvoiceType(1);
|
// order.setInvoiceType(1);
|
||||||
order.setInvoiceSite(1); // 在砂站开具冠名发票
|
// order.setInvoiceSite(1); // 在砂站开具冠名发票
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
// 需要专票的,在结算开了专票之后,再修改 invoice_site 字段
|
// 需要专票的,在结算开了专票之后,再修改 invoice_site 字段
|
||||||
|
|
@ -1201,7 +1201,7 @@ public class OrderTempSyncService {
|
||||||
ticketReceive.setSurplus(ticketReceive.getSurplus() - 1);
|
ticketReceive.setSurplus(ticketReceive.getSurplus() - 1);
|
||||||
ticketReceive.setCurrentCode(ticket_code);
|
ticketReceive.setCurrentCode(ticket_code);
|
||||||
order.setTicketCode(ticket_code);
|
order.setTicketCode(ticket_code);
|
||||||
order.setInvoiceType(2); // 不需要开发票的,都是要专票的
|
// order.setInvoiceType(2); // 不需要开发票的,都是要专票的
|
||||||
}
|
}
|
||||||
|
|
||||||
Product product = Product.dao.findById(ordercluster.getProductId());
|
Product product = Product.dao.findById(ordercluster.getProductId());
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,14 @@ public class OrderTransferSyncService {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Truck truck = Truck.dao.findById(transport.getTruckLicense());
|
Truck truck = Truck.dao.findById(transport.getTruckLicense());
|
||||||
|
if(truck == null){
|
||||||
|
// return Result.failedstr("不是物流公司车辆【%s】", transport.getTruckLicense());
|
||||||
|
}
|
||||||
TransportCompany tc = null;
|
TransportCompany tc = null;
|
||||||
if (truck != null) {
|
if (truck != null) {
|
||||||
// return Result.failedstr("不是物流公司车辆【%s】", transport.getTruckLicense());
|
|
||||||
tc = TransportCompany.dao.findById(truck.getTransCoId());
|
tc = TransportCompany.dao.findById(truck.getTransCoId());
|
||||||
if (tc == null) {
|
if (tc == null) {
|
||||||
return Result.failedstr("车辆【%s】关联物流公司信息错误", transport.getTruckLicense());
|
// return Result.failedstr("车辆【%s】关联物流公司信息错误", transport.getTruckLicense());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -188,19 +188,20 @@ public class TransportQueryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// transobj.set("next_invoice_code", InvoiceReceiveService.me.nextInvoiceCode(transport.getSupermarketId())); // 2020-09-21 加了发票代码
|
// transobj.set("next_invoice_code", InvoiceReceiveService.me.nextInvoiceCode(transport.getSupermarketId())); // 2020-09-21 加了发票代码
|
||||||
if (ordercluster.getReqReceipt() == 1) { // 需要打印发票的,才去插领票记录
|
transobj.set("ticket_numbers", TicketReceiveService.me.nextTicketCodes(transport.getSupermarketId()));//2025-03-16 砂站只可以开结算单
|
||||||
// 开专票的需要用结算单
|
// if (ordercluster.getReqReceipt() == 1) { // 需要打印发票的,才去插领票记录
|
||||||
if (prepayinfo != null && prepayinfo.get("prepay_customer_invoice_type") != null && prepayinfo.getInt("prepay_customer_invoice_type") == 2) {
|
// // 开专票的需要用结算单
|
||||||
transobj.set("invoice_numbers", new ArrayList<>());
|
// if (prepayinfo != null && prepayinfo.get("prepay_customer_invoice_type") != null && prepayinfo.getInt("prepay_customer_invoice_type") == 2) {
|
||||||
transobj.set("ticket_numbers", TicketReceiveService.me.nextTicketCodes(transport.getSupermarketId()));
|
// transobj.set("invoice_numbers", new ArrayList<>());
|
||||||
} else {
|
// transobj.set("ticket_numbers", TicketReceiveService.me.nextTicketCodes(transport.getSupermarketId()));
|
||||||
transobj.set("invoice_numbers", InvoiceReceiveService.me.nextInvoiceCodes(transport.getSupermarketId()));
|
// } else {
|
||||||
transobj.set("ticket_numbers", new ArrayList<>());
|
// transobj.set("invoice_numbers", InvoiceReceiveService.me.nextInvoiceCodes(transport.getSupermarketId()));
|
||||||
}
|
// transobj.set("ticket_numbers", new ArrayList<>());
|
||||||
} else {
|
// }
|
||||||
transobj.set("invoice_numbers", new ArrayList<>());
|
// } else {
|
||||||
transobj.set("ticket_numbers", TicketReceiveService.me.nextTicketCodes(transport.getSupermarketId()));
|
// transobj.set("invoice_numbers", new ArrayList<>());
|
||||||
}
|
// transobj.set("ticket_numbers", TicketReceiveService.me.nextTicketCodes(transport.getSupermarketId()));
|
||||||
|
// }
|
||||||
transobj.set("req_receipt", ordercluster.getReqReceipt()); // TODO 2020-10-12 如果放开购买,连零散购砂都不做配额了,这里需要修改
|
transobj.set("req_receipt", ordercluster.getReqReceipt()); // TODO 2020-10-12 如果放开购买,连零散购砂都不做配额了,这里需要修改
|
||||||
|
|
||||||
return Result.success(transobj);
|
return Result.success(transobj);
|
||||||
|
|
|
||||||
|
|
@ -52,14 +52,14 @@ public class InvoiceLogSyncService extends BaseSyncService {
|
||||||
" and t.sn in(" + StrKit.join(question, ", ") + ")", ordersnlist.toArray());
|
" and t.sn in(" + StrKit.join(question, ", ") + ")", ordersnlist.toArray());
|
||||||
|
|
||||||
|
|
||||||
List<TicketLog> ticketLogs = TicketLog.dao.find("select * from ticket_log t \n" +
|
// List<TicketLog> ticketLogs = TicketLog.dao.find("select * from ticket_log t \n" +
|
||||||
" where t.invoice_code is null \n" +
|
// " where t.invoice_code is null \n" +
|
||||||
" and t.state = " + OrderStateEnum.RECEIVED.getStateid() +
|
// " and t.state = " + OrderStateEnum.RECEIVED.getStateid() +
|
||||||
" and t.order_sn in(" + StrKit.join(question, ", ") + ")", ordersnlist.toArray());
|
// " and t.order_sn in(" + StrKit.join(question, ", ") + ")", ordersnlist.toArray());
|
||||||
|
//
|
||||||
if (list.size() != snarr.length || list.size() != ticketLogs.size()) {
|
// if (list.size() != snarr.length || list.size() != ticketLogs.size()) {
|
||||||
return Result.failed("部分订单号未找到,或者已开票");
|
// return Result.failed("部分订单号未找到,或者已开票");
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<InvoiceLog> logs = new ArrayList<>();
|
List<InvoiceLog> logs = new ArrayList<>();
|
||||||
Map<Integer, SyncTask> map = new HashMap<>();
|
Map<Integer, SyncTask> map = new HashMap<>();
|
||||||
|
|
@ -87,12 +87,12 @@ public class InvoiceLogSyncService extends BaseSyncService {
|
||||||
o.setInvoiceNumber(invoice_number);
|
o.setInvoiceNumber(invoice_number);
|
||||||
o.setInvoiceCode(invoice_code);
|
o.setInvoiceCode(invoice_code);
|
||||||
|
|
||||||
TicketLog ticketLog = ticketLogs.get(i);
|
// TicketLog ticketLog = ticketLogs.get(i);
|
||||||
ticketLog.setInvoiceNumber(invoice_number);
|
// ticketLog.setInvoiceNumber(invoice_number);
|
||||||
ticketLog.setInvoiceCode(invoice_code);
|
// ticketLog.setInvoiceCode(invoice_code);
|
||||||
ticketLog.setInvoiceUserId(sysuser.getId());
|
// ticketLog.setInvoiceUserId(sysuser.getId());
|
||||||
ticketLog.setInvoiceUserName(sysuser.getName());
|
// ticketLog.setInvoiceUserName(sysuser.getName());
|
||||||
ticketLog.setInvoiceTime(new Date());
|
// ticketLog.setInvoiceTime(new Date());
|
||||||
|
|
||||||
int supermarket_id = o.getSupermarketId();
|
int supermarket_id = o.getSupermarketId();
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ public class InvoiceLogSyncService extends BaseSyncService {
|
||||||
|
|
||||||
map.get(supermarket_id).addUpdateData(o);
|
map.get(supermarket_id).addUpdateData(o);
|
||||||
map.get(supermarket_id).addSaveData(invoiceLog);
|
map.get(supermarket_id).addSaveData(invoiceLog);
|
||||||
map.get(supermarket_id).addUpdateData(ticketLog);
|
// map.get(supermarket_id).addUpdateData(ticketLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean ret = Db.tx(new IAtom() {
|
boolean ret = Db.tx(new IAtom() {
|
||||||
|
|
@ -127,14 +127,14 @@ public class InvoiceLogSyncService extends BaseSyncService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] editlogsret = Db.batchUpdate(ticketLogs, 500);
|
// int[] editlogsret = Db.batchUpdate(ticketLogs, 500);
|
||||||
|
//
|
||||||
for (int i : editlogsret) {
|
// for (int i : editlogsret) {
|
||||||
// 必须是每条 sql 修改一条记录
|
// // 必须是每条 sql 修改一条记录
|
||||||
if (i != 1) {
|
// if (i != 1) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// 将订单同步到不同的砂站
|
// 将订单同步到不同的砂站
|
||||||
|
|
@ -325,6 +325,7 @@ public class InvoiceLogSyncService extends BaseSyncService {
|
||||||
order.set("invoice_code", null);
|
order.set("invoice_code", null);
|
||||||
order.set("invoice_number", null);
|
order.set("invoice_number", null);
|
||||||
order.set("invoice_site", null);
|
order.set("invoice_site", null);
|
||||||
|
order.set("invoice_type", null);
|
||||||
boolean ret = order.update();
|
boolean ret = order.update();
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
|
@ -421,6 +422,7 @@ public class InvoiceLogSyncService extends BaseSyncService {
|
||||||
o.setInvoiceCode(null);
|
o.setInvoiceCode(null);
|
||||||
o.setInvoiceNumber(null);
|
o.setInvoiceNumber(null);
|
||||||
o.setInvoiceSite(null);
|
o.setInvoiceSite(null);
|
||||||
|
o.setInvoiceType(null);
|
||||||
|
|
||||||
int supermarket_id = o.getSupermarketId();
|
int supermarket_id = o.getSupermarketId();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue