交班
This commit is contained in:
@@ -119,4 +119,8 @@ public class HandoverTotalVo implements Serializable {
|
||||
* 售出商品列表
|
||||
*/
|
||||
private List<HandoverProductListVo> detailList;
|
||||
/**
|
||||
* 售出商品分类列表
|
||||
*/
|
||||
private List<HandoverCategoryListVo> categoryList;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
|
||||
String loginTimeStr = LocalDateTimeUtil.formatNormal(record.getLoginTime());
|
||||
String handoverTimeStr = LocalDateTimeUtil.formatNormal(handoverTime);
|
||||
data.setDetailList(orderInfoRpcService.getHandoverDetailList(shopId, loginTimeStr, handoverTimeStr));
|
||||
data.setCategoryList(orderInfoRpcService.getHandoverCategoryList(shopId, loginTimeStr, handoverTimeStr));
|
||||
HandoverRecord onlinePayTypeDate = orderInfoRpcService.getOnlinePayTypeDate(shopId, loginTimeStr, handoverTimeStr);
|
||||
// 合并结果
|
||||
CopyOptions copyOptions = CopyOptions.create().setIgnoreNullValue(true);
|
||||
@@ -96,7 +97,7 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
|
||||
data.setTurnover(onlinePayTypeDate.getOrderTurnover());
|
||||
}
|
||||
HandoverRecord handoverRecord = orderInfoRpcService.countShopUserFlow(shopId, loginTimeStr, handoverTimeStr);
|
||||
if(handoverRecord != null){
|
||||
if (handoverRecord != null) {
|
||||
data.setTurnover(NumberUtil.add(data.getTurnover(), handoverRecord.getRecharge()));
|
||||
data.setRefundAmount(NumberUtil.add(data.getRefundAmount(), handoverRecord.getRefundAmount()));
|
||||
}
|
||||
@@ -117,15 +118,9 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long handover() {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
HandoverTotalVo data = totalHandoverData();
|
||||
LocalDateTime loginTime = data.getLoginTime();
|
||||
LocalDateTime handoverTime = data.getHandoverTime();
|
||||
String loginTimeStr = LocalDateTimeUtil.formatNormal(loginTime);
|
||||
String handoverTimeStr = LocalDateTimeUtil.formatNormal(handoverTime);
|
||||
HandoverRecord entity = BeanUtil.copyProperties(data, HandoverRecord.class);
|
||||
List<HandoverCategoryListVo> categoryData = orderInfoRpcService.getHandoverCategoryList(shopId, loginTimeStr, handoverTimeStr);
|
||||
entity.setCategoryData(JSON.toJSONString(categoryData, JSONWriter.Feature.WriteMapNullValue));
|
||||
entity.setCategoryData(JSON.toJSONString(data.getCategoryList(), JSONWriter.Feature.WriteMapNullValue));
|
||||
List<HandoverProductListVo> productData = data.getDetailList();
|
||||
entity.setProductData(JSON.toJSONString(productData, JSONWriter.Feature.WriteMapNullValue));
|
||||
super.updateById(entity);
|
||||
|
||||
@@ -328,7 +328,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
log.info("后付费生成订单{},第{}", orderInfo.getId(), orderInfo.getPlaceNum());
|
||||
printerHandler.orderHandler(orderInfo.getId().toString(), PrinterHandler.PrintTypeEnum.GUEST_ORDER, orderInfo.getPlaceNum());
|
||||
//发送打票信息 后付费推送多次 需要处理
|
||||
//orderId_0_0 订单ID_先付后付(1先付0后付)_订单状态 0未完成 1完成
|
||||
//orderId_0_0 订单ID_先付后付(1先付0后付)_订单状态 0未完成 1完成_第几次下单
|
||||
//orderInfo.getId() + "_" + (!"after-pay".equals(orderInfo.getPayMode()) ? 1 : 0) + "_0"
|
||||
rabbitPublisher.sendKitchenOrderPrintMsg(orderInfo.getId() + "_0_0", false, "后付费打印");
|
||||
rabbitPublisher.sendOrderPrintMsg(orderInfo.getId() + "_0_0_" + orderInfo.getPlaceNum(), true, "后付费打印");
|
||||
|
||||
Reference in New Issue
Block a user