过滤空值
This commit is contained in:
@@ -50,28 +50,6 @@ public class RabbitPublisher {
|
||||
sendMsg(RabbitConstants.Queue.ORDER_REFUND_QUEUE, refundMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后付费订单打印消息
|
||||
*
|
||||
* @param orderId 订单id
|
||||
* @param before 0后付费/1先付费
|
||||
* @param status 订单状态 0未完成/1完成
|
||||
* @param placeNum 第几次下单
|
||||
* @param printOrder 是否打印结算单
|
||||
*/
|
||||
public void sendOrderPrintMsg(Long orderId, Integer before, Integer status, Integer placeNum, boolean printOrder, String source) {
|
||||
log.info("订单打印消息, orderId:{},{},{},第:{}次下单,通知本地:{},source:{}",
|
||||
orderId, before == 0 ? "后付" : "先付", status == 0 ? "未完成" : "完成", placeNum, printOrder, source);
|
||||
String sendOrderId = orderId + "_" + before + "_" + status + "_" + placeNum;
|
||||
//本地打印机 消息通知
|
||||
if (printOrder) {
|
||||
sendMsg(RabbitConstants.Queue.ORDER_PRINT_QUEUE, sendOrderId);
|
||||
}
|
||||
//厨房单 printOrder 表示打不打结算单
|
||||
sendMsg(RabbitConstants.Queue.ORDER_MACHINE_PRINT_QUEUE, new JSONObject().fluentPut("orderId", sendOrderId).fluentPut("printOrder", printOrder).toString());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 商品信息变动消息
|
||||
*
|
||||
@@ -137,15 +115,12 @@ public class RabbitPublisher {
|
||||
)));
|
||||
}
|
||||
|
||||
private void sendMsg(String queue, String msg) {
|
||||
log.info("开始发送mq消息,exchange:{}, queue: {}, msg: {}", activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, msg);
|
||||
rabbitTemplate.convertAndSend(activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 其它类型 打印消息
|
||||
* STOCK 出入库
|
||||
* DAY_REPORT 经营日报
|
||||
* DAY_ORDER 日结单
|
||||
* PRODUCT_REPORT 商品报表
|
||||
* RECHARGE 储值单
|
||||
* STOCK_CHECK 库存盘点
|
||||
@@ -155,23 +130,73 @@ public class RabbitPublisher {
|
||||
* @param printType {@link com.czg.service.order.print.PrinterHandler.PrintTypeEnum}
|
||||
*/
|
||||
public void sendOtherPrintMsg(Long shopId, Object data, String printType) {
|
||||
String exchange = activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE;
|
||||
String queueName = activeProfile + "-" + RabbitConstants.Queue.OTHER_PRINT_QUEUE;
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("shopId", shopId);
|
||||
jsonObject.put("data", data);
|
||||
jsonObject.put("printTypeEnum", printType);
|
||||
rabbitTemplate.convertAndSend(exchange, queueName, jsonObject.toString());
|
||||
sendMsg(RabbitConstants.Queue.OTHER_PRINT_QUEUE, jsonObject.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 后付费订单打印消息
|
||||
*
|
||||
* @param orderId 订单id
|
||||
* @param before 0后付费/1先付费
|
||||
* @param status 订单状态 0未完成/1完成
|
||||
* @param placeNum 第几次下单
|
||||
*/
|
||||
public void sendOrderPrintMsg(Long orderId, Integer before, Integer status, Integer placeNum, String source) {
|
||||
log.info("订单打印消息, orderId:{},{},{},第:{}次下单,source:{}",
|
||||
orderId, before == 0 ? "后付" : "先付", status == 0 ? "未完成" : "完成", placeNum, source);
|
||||
String sendOrderId = orderId + "_" + before + "_" + status + "_" + placeNum;
|
||||
//厨房单
|
||||
sendMsg(RabbitConstants.Queue.ORDER_MACHINE_PRINT_QUEUE, new JSONObject().fluentPut("orderId", sendOrderId).toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地打印机 订单消息通知
|
||||
*
|
||||
* @param shopId 店铺Id
|
||||
* @param orderId
|
||||
* @param placeNum
|
||||
* @param printTypeEnum
|
||||
* @param data
|
||||
*/
|
||||
public void sendOrderPrintLocalMsg(Long shopId, Long orderId, Integer placeNum, String printTypeEnum, String data, String operator) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("shopId", shopId);
|
||||
jsonObject.put("orderId", orderId);
|
||||
jsonObject.put("placeNum", placeNum);
|
||||
jsonObject.put("printType", printTypeEnum);
|
||||
jsonObject.put("data", data);
|
||||
jsonObject.put("operator", operator);
|
||||
sendMsg(RabbitConstants.Queue.ORDER_PRINT_QUEUE, jsonObject.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 其它类型 打印消息
|
||||
* STOCK 出入库
|
||||
* DAY_REPORT 经营日报
|
||||
* DAY_ORDER 日结单
|
||||
* PRODUCT_REPORT 商品报表
|
||||
* RECHARGE 储值单
|
||||
* STOCK_CHECK 库存盘点
|
||||
* HANDOVER 交班单
|
||||
* CALL 排队取号
|
||||
*
|
||||
* @param printType {@link com.czg.service.order.print.PrinterHandler.PrintTypeEnum}
|
||||
*/
|
||||
public void sendOtherPrintLocalMsg(Long shopId, String printType, Long dataId) {
|
||||
String exchange = activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE;
|
||||
String queueName = activeProfile + "-" + RabbitConstants.Queue.OTHER_PRINT_LOCAL_QUEUE;
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("shopId", shopId);
|
||||
jsonObject.put("dataId", dataId);
|
||||
jsonObject.put("printType", printType);
|
||||
rabbitTemplate.convertAndSend(exchange, queueName, jsonObject.toString());
|
||||
sendMsg(RabbitConstants.Queue.OTHER_PRINT_LOCAL_QUEUE, jsonObject.toString());
|
||||
}
|
||||
|
||||
|
||||
private void sendMsg(String queue, String msg) {
|
||||
log.info("开始发送mq消息,exchange:{}, queue: {}, msg: {}", activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, msg);
|
||||
rabbitTemplate.convertAndSend(activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,6 +389,12 @@ public class ShopOrderStatistic implements Serializable {
|
||||
@ExcelProperty("净利润率(%)")
|
||||
private BigDecimal netProfitRate;
|
||||
|
||||
@ExcelIgnore
|
||||
private BigDecimal douyinGroup;
|
||||
|
||||
@ExcelIgnore
|
||||
private BigDecimal meituanGroup;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.czg.order.service;
|
||||
|
||||
import com.czg.order.dto.FinanceStsDTO;
|
||||
import com.czg.order.param.FinanceStsQueryParam;
|
||||
import com.czg.order.param.SaleSummaryCountParam;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
@@ -16,4 +17,9 @@ public interface FinanceStsService {
|
||||
FinanceStsDTO getFinanceSts(FinanceStsQueryParam param);
|
||||
|
||||
void exportFinanceSts(FinanceStsQueryParam param, HttpServletResponse response);
|
||||
|
||||
void printDayReport(SaleSummaryCountParam param);
|
||||
|
||||
void printDaySettle(SaleSummaryCountParam param);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.czg.print;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 订单详情 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-14
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderDetailPrintDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 商品类型:单规格商品 single 多规格商品 sku 套餐商品 package 称重商品 weigh 团购券 coupon
|
||||
*/
|
||||
private String productType;
|
||||
|
||||
private String skuName;
|
||||
|
||||
/**
|
||||
* 原价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 临时改价/临时菜价
|
||||
*/
|
||||
private BigDecimal discountSaleAmount;
|
||||
/**
|
||||
* 最终单价
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
/**
|
||||
* 是否赠送 0否 1是
|
||||
*/
|
||||
private Integer isGift;
|
||||
private boolean isUrgent;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal num;
|
||||
|
||||
/**
|
||||
* 退菜数量(不管价格)
|
||||
*/
|
||||
private BigDecimal returnNum;
|
||||
|
||||
/**
|
||||
* 当前下单次数
|
||||
*/
|
||||
private Integer placeNum;
|
||||
private BigDecimal returnAmount;
|
||||
/**
|
||||
* 是否等叫
|
||||
*/
|
||||
private Integer isWaitCall;
|
||||
|
||||
/**
|
||||
* 是否是临时菜品
|
||||
*/
|
||||
private Integer isTemporary;
|
||||
|
||||
/**
|
||||
* 套餐商品选择信息
|
||||
*/
|
||||
private String proGroupInfo;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 退款备注
|
||||
*/
|
||||
private String refundRemark;
|
||||
}
|
||||
Reference in New Issue
Block a user