打印
This commit is contained in:
parent
c68906e59e
commit
8eae72cefe
@ -1,5 +1,9 @@
|
|||||||
package com.zbkj.service.service.impl.printer;
|
package com.zbkj.service.service.impl.printer;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.zbkj.common.exception.CrmebException;
|
||||||
|
import com.zbkj.common.model.order.StoreOrder;
|
||||||
|
import com.zbkj.common.vo.StoreOrderInfoOldVo;
|
||||||
import com.zbkj.service.service.PrintService;
|
import com.zbkj.service.service.PrintService;
|
||||||
import com.zbkj.service.service.StoreOrderInfoService;
|
import com.zbkj.service.service.StoreOrderInfoService;
|
||||||
import com.zbkj.service.service.StoreOrderService;
|
import com.zbkj.service.service.StoreOrderService;
|
||||||
@ -11,6 +15,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 佳博打印机
|
* 佳博打印机
|
||||||
@ -34,8 +39,17 @@ public class JiabPrintServiceImpl implements PrintService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void print(String ordId) {
|
public void print(String orderId) {
|
||||||
System.out.println("1111");
|
System.out.println("1111");
|
||||||
|
StoreOrder exitOrder = storeOrderService.getByOderId(orderId);
|
||||||
|
if (ObjectUtil.isNull(exitOrder)) {
|
||||||
|
throw new CrmebException("佳博 打印时未找到 订单信息");
|
||||||
|
}
|
||||||
|
if (!exitOrder.getPaid()) {
|
||||||
|
throw new CrmebException("佳博 打印时出错, 订单未支付");
|
||||||
|
}
|
||||||
|
List<StoreOrderInfoOldVo> exitOrderInfo = storeOrderInfoService.getOrderListByOrderId(exitOrder.getId());
|
||||||
|
|
||||||
// System.setProperty("jna.encoding", "GBK");
|
// System.setProperty("jna.encoding", "GBK");
|
||||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyMMddHHmmss");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyMMddHHmmss");
|
||||||
//
|
//
|
||||||
|
@ -50,13 +50,6 @@ public class YlyPrintServiceImpl implements PrintService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void print(String orderId) {
|
public void print(String orderId) {
|
||||||
// if (ylyUtil.checkYlyPrintStatus()) {
|
|
||||||
// throw new CrmebException("易联云 未开启打印");
|
|
||||||
// }
|
|
||||||
// // 判断是否开启自动打印
|
|
||||||
// if (isAuto && ylyUtil.checkYlyPrintAfterPaySuccess()) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
StoreOrder exitOrder = storeOrderService.getByOderId(orderId);
|
StoreOrder exitOrder = storeOrderService.getByOderId(orderId);
|
||||||
if (ObjectUtil.isNull(exitOrder)) {
|
if (ObjectUtil.isNull(exitOrder)) {
|
||||||
throw new CrmebException("易联云 打印时未找到 订单信息");
|
throw new CrmebException("易联云 打印时未找到 订单信息");
|
||||||
@ -97,6 +90,4 @@ public class YlyPrintServiceImpl implements PrintService {
|
|||||||
logger.error("易联云打印小票失败 " + e.getMessage());
|
logger.error("易联云打印小票失败 " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user