|
|
|
@ -664,13 +664,21 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
List<IoOrderDetailResultResponse> ioOrderDetailCodeResponses = orderDetailBizService.getfilterOrderList(orderDetailBizRequest);
|
|
|
|
|
List<IoOrderInvoiceEntity> orderInvoiceEntities = ioOrderInvoiceService.findByBillNo(orderDetailBizRequest.getOrderIdFk());
|
|
|
|
|
for (IoOrderDetailResultResponse orderDetailCodeEntity : ioOrderDetailCodeResponses) {
|
|
|
|
|
if (orderDetailCodeEntity.getReCount() != 0 && orderDetailCodeEntity.getPrice() != null) {
|
|
|
|
|
orderDetailCodeEntity.setAmount(new BigDecimal(orderDetailCodeEntity.getReCount()).multiply(orderDetailCodeEntity.getPrice()));
|
|
|
|
|
// if (orderDetailCodeEntity.getReCount() != 0 && orderDetailCodeEntity.getPrice() != null) {
|
|
|
|
|
// orderDetailCodeEntity.setAmount(new BigDecimal(orderDetailCodeEntity.getReCount()).multiply(orderDetailCodeEntity.getPrice()));
|
|
|
|
|
// }
|
|
|
|
|
if (orderDetailCodeEntity.getCount() != 0 && orderDetailCodeEntity.getPrice() != null) {
|
|
|
|
|
orderDetailCodeEntity.setAmount(new BigDecimal(orderDetailCodeEntity.getCount()).multiply(orderDetailCodeEntity.getPrice()));
|
|
|
|
|
}
|
|
|
|
|
String msg = "";
|
|
|
|
|
BigDecimal invoiceAmount = BigDecimal.ZERO;
|
|
|
|
|
for (IoOrderInvoiceEntity orderInvoiceEntity : orderInvoiceEntities) {
|
|
|
|
|
if (StrUtil.trimToEmpty(orderInvoiceEntity.getBatchNo()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBatchNo()))
|
|
|
|
|
&& StrUtil.trimToEmpty(orderInvoiceEntity.getBindRlFk()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBindRlFk() + ""))) {
|
|
|
|
|
if (StrUtil.isNotEmpty(orderInvoiceEntity.getPrice())){
|
|
|
|
|
BigDecimal price = new BigDecimal(orderInvoiceEntity.getPrice());
|
|
|
|
|
invoiceAmount = invoiceAmount.add(price);
|
|
|
|
|
}
|
|
|
|
|
orderDetailCodeEntity.setRegStatus(true);
|
|
|
|
|
if (StrUtil.isNotEmpty(orderInvoiceEntity.getInvoiceEncode())) {
|
|
|
|
|
msg += "," + orderInvoiceEntity.getInvoiceEncode();
|
|
|
|
@ -680,6 +688,7 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
if (msg.length() > 1) {
|
|
|
|
|
msg = msg.substring(1);
|
|
|
|
|
}
|
|
|
|
|
orderDetailCodeEntity.setInvoicePrice(invoiceAmount);
|
|
|
|
|
orderDetailCodeEntity.setInvoiceCodes(msg);
|
|
|
|
|
}
|
|
|
|
|
PageInfo<IoOrderDetailResultResponse> pageInfo = new PageInfo<>(ioOrderDetailCodeResponses);
|
|
|
|
|