预结算单 原价
打印单上的二维码
This commit is contained in:
@@ -131,7 +131,7 @@ public class FeiPrinter extends PrinterHandler implements PrinterImpl {
|
|||||||
if (StrUtil.isNotBlank(machine.getPrintQty())) {
|
if (StrUtil.isNotBlank(machine.getPrintQty())) {
|
||||||
printerNum = machine.getPrintQty().split("\\^")[1];
|
printerNum = machine.getPrintQty().split("\\^")[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintInfoDTO printInfoDTO = new PrintInfoDTO().setShopName(shopInfo.getShopName())
|
PrintInfoDTO printInfoDTO = new PrintInfoDTO().setShopName(shopInfo.getShopName())
|
||||||
.setCount(count)
|
.setCount(count)
|
||||||
.setPrintType("普通打印").setPickupNum(getPickupNum(orderInfo))
|
.setPrintType("普通打印").setPickupNum(getPickupNum(orderInfo))
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import java.math.BigDecimal;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打印机具体打印方法接口,提供打印元数据获取,具体打印机实现对应方法即可
|
* 打印机具体打印方法接口,提供打印元数据获取,具体打印机实现对应方法即可
|
||||||
@@ -353,11 +352,11 @@ public interface PrinterImpl {
|
|||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
// data.append(StrUtil.format("<L><BOLD>备注:{}</BOLD></L><BR>", printInfoDTO.getRemark()));
|
// data.append(StrUtil.format("<L><BOLD>备注:{}</BOLD></L><BR>", printInfoDTO.getRemark()));
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(printInfoDTO.getOutNumber())) {
|
// if (Objects.nonNull(printInfoDTO.getOutNumber())) {
|
||||||
data.append(getFormatLabel(printInfoDTO.getOutNumber(), signLabelInfo.center, signLabelInfo.qr))
|
// data.append(getFormatLabel(printInfoDTO.getOutNumber(), signLabelInfo.center, signLabelInfo.qr))
|
||||||
.append(signLabelInfo.br);
|
// .append(signLabelInfo.br);
|
||||||
// data.append("<QR>".concat(printInfoDTO.getOutNumber()).concat("</QR><BR>"));
|
//// data.append("<QR>".concat(printInfoDTO.getOutNumber()).concat("</QR><BR>"));
|
||||||
}
|
// }
|
||||||
data.append(getFormatLabel(StrUtil.format("打印时间:{}", DateUtil.date().toString()), signLabelInfo.s))
|
data.append(getFormatLabel(StrUtil.format("打印时间:{}", DateUtil.date().toString()), signLabelInfo.s))
|
||||||
.append(signLabelInfo.br)
|
.append(signLabelInfo.br)
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
@@ -442,8 +441,8 @@ public interface PrinterImpl {
|
|||||||
builder.append(getFormatLabel("【加急】", signLabelInfo.center, signLabelInfo.bold))
|
builder.append(getFormatLabel("【加急】", signLabelInfo.center, signLabelInfo.bold))
|
||||||
.append(signLabelInfo.br);
|
.append(signLabelInfo.br);
|
||||||
}
|
}
|
||||||
builder.append(getFormatLabel("UP_ORDER_DETAIL:" + orderDetailId, signLabelInfo.center, signLabelInfo.qr))
|
// builder.append(getFormatLabel("UP_ORDER_DETAIL:" + orderDetailId, signLabelInfo.center, signLabelInfo.qr))
|
||||||
.append(signLabelInfo.br);
|
// .append(signLabelInfo.br);
|
||||||
builder.append(signLabelInfo.br)
|
builder.append(signLabelInfo.br)
|
||||||
.append(signLabelInfo.getOut(150))
|
.append(signLabelInfo.getOut(150))
|
||||||
.append(signLabelInfo.cut);
|
.append(signLabelInfo.cut);
|
||||||
@@ -548,7 +547,7 @@ public interface PrinterImpl {
|
|||||||
* @return 添加间距的字符串
|
* @return 添加间距的字符串
|
||||||
*/
|
*/
|
||||||
default String titleAddSpace(String str, int b1) {
|
default String titleAddSpace(String str, int b1) {
|
||||||
int k = 0;
|
int k;
|
||||||
try {
|
try {
|
||||||
k = str.getBytes("GBK").length;
|
k = str.getBytes("GBK").length;
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.crypto.SecureUtil;
|
import cn.hutool.crypto.SecureUtil;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.czg.account.dto.HandoverRecordDTO;
|
import com.czg.account.dto.HandoverRecordDTO;
|
||||||
import com.czg.account.entity.PrintMachine;
|
import com.czg.account.entity.PrintMachine;
|
||||||
import com.czg.account.entity.ShopInfo;
|
import com.czg.account.entity.ShopInfo;
|
||||||
@@ -174,15 +173,13 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
|
|||||||
|
|
||||||
printInfoDTO.setOriginalAmount((orderInfo.getOriginAmount().add(orderInfo.getSeatAmount()).add(orderInfo.getPackFee())).toPlainString());
|
printInfoDTO.setOriginalAmount((orderInfo.getOriginAmount().add(orderInfo.getSeatAmount()).add(orderInfo.getPackFee())).toPlainString());
|
||||||
if (isPre) {
|
if (isPre) {
|
||||||
if (orderInfo.getPlaceNum() == 1) {
|
BigDecimal originalAmount = BigDecimal.ZERO;
|
||||||
BigDecimal refundAmount = BigDecimal.ZERO;
|
for (OrderDetail orderDetail : detailList) {
|
||||||
for (OrderDetail orderDetail : detailList) {
|
originalAmount = originalAmount.add((orderDetail.getNum().subtract(orderDetail.getReturnNum()).subtract(orderDetail.getRefundNum())).multiply(orderDetail.getPrice()));
|
||||||
refundAmount = refundAmount.add(orderDetail.getReturnAmount());
|
|
||||||
}
|
|
||||||
printInfoDTO.setOriginalAmount((orderInfo.getOriginAmount().add(orderInfo.getSeatAmount()).add(orderInfo.getPackFee()).subtract(refundAmount)).toPlainString());
|
|
||||||
}
|
}
|
||||||
printInfoDTO.setPayAmount(printInfoDTO.getOriginalAmount());
|
printInfoDTO.setOriginalAmount(originalAmount.add(orderInfo.getSeatAmount()).add(orderInfo.getPackFee()).toPlainString());
|
||||||
}
|
}
|
||||||
|
printInfoDTO.setPayAmount(printInfoDTO.getOriginalAmount());
|
||||||
printInfoDTO.setPrintTitle(printInfoDTO.getPrintTitle());
|
printInfoDTO.setPrintTitle(printInfoDTO.getPrintTitle());
|
||||||
if (orderInfo.getSeatNum() != null && orderInfo.getSeatAmount().compareTo(BigDecimal.ZERO) > 0) {
|
if (orderInfo.getSeatNum() != null && orderInfo.getSeatAmount().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
printInfoDTO.setSeatNum(orderInfo.getSeatNum().toString());
|
printInfoDTO.setSeatNum(orderInfo.getSeatNum().toString());
|
||||||
|
|||||||
@@ -415,6 +415,7 @@ public class OrderPayServiceImpl implements OrderPayService {
|
|||||||
} else {
|
} else {
|
||||||
orderDetail.setStatus(OrderStatusEnums.PART_REFUND.getCode());
|
orderDetail.setStatus(OrderStatusEnums.PART_REFUND.getCode());
|
||||||
}
|
}
|
||||||
|
orderDetail.setReturnAmount(orderDetail.getReturnAmount().add(refundDetail.getReturnAmount()));
|
||||||
} else {
|
} else {
|
||||||
orderDetail.setReturnNum(orderDetail.getReturnNum().add(refNum));
|
orderDetail.setReturnNum(orderDetail.getReturnNum().add(refNum));
|
||||||
if (orderDetail.getPackNumber().compareTo(BigDecimal.ZERO) > 0 && orderDetail.getPackNumber().compareTo(orderDetail.getNum().subtract(orderDetail.getReturnNum())) > 0) {
|
if (orderDetail.getPackNumber().compareTo(BigDecimal.ZERO) > 0 && orderDetail.getPackNumber().compareTo(orderDetail.getNum().subtract(orderDetail.getReturnNum())) > 0) {
|
||||||
@@ -423,12 +424,9 @@ public class OrderPayServiceImpl implements OrderPayService {
|
|||||||
}
|
}
|
||||||
orderDetail.setRefundNo(refPayOrderNo);
|
orderDetail.setRefundNo(refPayOrderNo);
|
||||||
orderDetail.setRefundRemark(orderDetail.getRefundRemark() + param.getRefundReason());
|
orderDetail.setRefundRemark(orderDetail.getRefundRemark() + param.getRefundReason());
|
||||||
// if (isPay) {
|
|
||||||
orderDetail.setReturnAmount(orderDetail.getReturnAmount().add(refundDetail.getReturnAmount()));
|
|
||||||
if (orderDetail.getReturnAmount().compareTo(orderDetail.getPayAmount()) > 0) {
|
if (orderDetail.getReturnAmount().compareTo(orderDetail.getPayAmount()) > 0) {
|
||||||
orderDetail.setReturnAmount(orderDetail.getPayAmount());
|
orderDetail.setReturnAmount(orderDetail.getPayAmount());
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
orderDetailService.updateById(orderDetail);
|
orderDetailService.updateById(orderDetail);
|
||||||
if (orderDetail.getProductId() != null && orderDetail.getProductId() > 0) {
|
if (orderDetail.getProductId() != null && orderDetail.getProductId() > 0) {
|
||||||
returnProMap.put(Convert.toStr(orderDetail.getProductId()), refundDetail.getNum());
|
returnProMap.put(Convert.toStr(orderDetail.getProductId()), refundDetail.getNum());
|
||||||
|
|||||||
Reference in New Issue
Block a user