店铺管理-店铺配置:打印机设置相关接口
This commit is contained in:
parent
ba8bbfcbb7
commit
252961c441
|
|
@ -2,6 +2,7 @@ package com.chaozhanggui.system.cashierservice.rabbit;
|
|||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
|
|
@ -628,7 +629,7 @@ public class PrintMechineConsumer {
|
|||
printType = "退款单";
|
||||
}
|
||||
|
||||
|
||||
log.info("打印数据2>>>>>>>>>>>>>>>>>>>>>>>>: {}", JSON.toJSONString(detailPO));
|
||||
FeieyunPrintUtil.getCashPrintData(detailPO, tbPrintMachineWithBLOBs.getAddress(), printType, printType);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.chaozhanggui.system.cashierservice.rabbit.print;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbProductMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbProductSkuMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopUserMapper;
|
||||
|
|
@ -69,6 +70,7 @@ public class FeiPrinter extends PrinterHandler {
|
|||
(ObjectUtil.isEmpty(orderInfo.getPayType()) || ObjectUtil.isNull(orderInfo.getPayType()) ? "" : orderInfo.getPayType()),
|
||||
"0", detailList, orderInfo.getRemark(), orderInfo.getDiscountAmount() == null ? null : orderInfo.getDiscountAmount().toPlainString(), orderInfo.getDiscountRatio() == null ? null : orderInfo.getDiscountRatio().toPlainString());
|
||||
String printType = "退款单";
|
||||
log.info("打印数据3>>>>>>>>>>>>>>>>>>>>>>>>: {}", JSON.toJSONString(detailPO));
|
||||
String[] resp = FeieyunPrintUtil.getCashPrintData(detailPO, machine.getAddress(), printType, printType);
|
||||
shopPrintLogService.save(machine, "退款单", resp[0], resp[1]);
|
||||
}
|
||||
|
|
@ -83,6 +85,7 @@ public class FeiPrinter extends PrinterHandler {
|
|||
(ObjectUtil.isEmpty(orderInfo.getPayType()) || ObjectUtil.isNull(orderInfo.getPayType()) ? "" : orderInfo.getPayType()),
|
||||
"0", detailList, orderInfo.getRemark(), orderInfo.getDiscountAmount() == null ? null : orderInfo.getDiscountAmount().toPlainString(), orderInfo.getDiscountRatio() == null ? null : orderInfo.getDiscountRatio().toPlainString());
|
||||
String printType = "结算单";
|
||||
log.info("打印数据1>>>>>>>>>>>>>>>>>>>>>>>>: {}", JSON.toJSONString(detailPO));
|
||||
String[] resp = FeieyunPrintUtil.getCashPrintData(detailPO, machine.getAddress(), printType, printType);
|
||||
shopPrintLogService.save(machine, "结算单", resp[0], resp[1]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.chaozhanggui.system.cashierservice.service;
|
|||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
|
|
@ -482,7 +483,7 @@ public class CloudPrinterService {
|
|||
printType = "退款单";
|
||||
}
|
||||
|
||||
|
||||
log.info("打印数据4>>>>>>>>>>>>>>>>>>>>>>>>: {}", JSON.toJSONString(detailPO));
|
||||
FeieyunPrintUtil.getCashPrintData(detailPO, tbPrintMachineWithBLOBs.getAddress(), printType, printType);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import cn.hutool.http.HttpUtil;
|
|||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.chaozhanggui.system.cashierservice.model.OrderDetailPO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.NameValuePair;
|
||||
|
|
@ -25,6 +26,7 @@ import java.io.IOException;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
public class FeieyunPrintUtil {
|
||||
|
||||
public static final String URL = "http://api.feieyun.cn/Api/Open/";//不需要修改
|
||||
|
|
@ -224,6 +226,7 @@ public class FeieyunPrintUtil {
|
|||
}
|
||||
data.append("规格:" + detail.getSpec() + "<BR>");
|
||||
}
|
||||
log.info("打印数据>>>>>>>>>>>>>>>>>>>>>:{}{}", detailPO.getDiscountAmount(), detailPO.getDiscountAdio());
|
||||
if (ObjectUtil.isNotNull(detailPO.getDiscountAmount()) && ObjectUtil.isNotNull(detailPO.getDiscountAdio())) {
|
||||
data.append("--------------------------------<BR>");
|
||||
data.append(StrUtil.format("原价:{}<BR>", detailPO.getReceiptsAmount()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue