交班相关代码

This commit is contained in:
Tankaikai
2025-03-01 15:38:08 +08:00
parent dfb5fa9b70
commit 84556a1016
9 changed files with 87 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
package com.czg.service.account.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.czg.account.dto.HandoverRecordDTO;
import com.czg.account.entity.HandoverRecord;
import com.czg.account.service.HandoverRecordRpcService;
import com.czg.service.account.mapper.HandoverRecordMapper;
import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
/**
* 交班记录RPC服务实现
*
* @author tankaikai
* @since 2025-03-01 15:35
*/
@DubboService
public class HandoverRecordRpcServiceImpl implements HandoverRecordRpcService {
@Resource
private HandoverRecordMapper handoverRecordMapper;
@Override
public HandoverRecordDTO getHandoverRecordById(Long handoverRecordId) {
HandoverRecord record = handoverRecordMapper.selectOneById(handoverRecordId);
return BeanUtil.copyProperties(record, HandoverRecordDTO.class);
}
}

View File

@@ -12,6 +12,7 @@ import com.czg.account.service.HandoverRecordService;
import com.czg.account.vo.HandoverCategoryListVo;
import com.czg.account.vo.HandoverProductListVo;
import com.czg.account.vo.HandoverTotalVo;
import com.czg.enums.YesNoEnum;
import com.czg.order.service.OrderInfoRpcService;
import com.czg.sa.StpKit;
import com.czg.service.account.mapper.HandoverRecordMapper;
@@ -138,6 +139,13 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
return entity.getId();
}
@Override
public void printHandoverReceipt(Long handoverRecordId, Integer isPrint) {
if (isPrint == YesNoEnum.YES.value()) {
orderInfoRpcService.sendHandoverReceiptPrintMsgToMq(handoverRecordId);
}
}
private BigDecimal sumCashAmount(Long shopId, String loginTime, String handoverTime) {
return orderInfoRpcService.getHandoverCashAmount(shopId, loginTime, handoverTime);
}