交班相关代码

This commit is contained in:
Tankaikai
2025-02-28 11:39:41 +08:00
parent 5416d9b556
commit f23517c6c1
5 changed files with 239 additions and 201 deletions

View File

@@ -11,7 +11,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.order.service.OrderInfoService;
import com.czg.order.service.OrderInfoRpcService;
import com.czg.sa.StpKit;
import com.czg.service.account.mapper.HandoverRecordMapper;
import com.czg.utils.PageUtil;
@@ -35,7 +35,7 @@ import java.util.List;
public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper, HandoverRecord> implements HandoverRecordService {
@DubboReference
private OrderInfoService orderInfoService;
private OrderInfoRpcService orderInfoRpcService;
private QueryWrapper buildQueryWrapper(HandoverRecordDTO param) {
QueryWrapper queryWrapper = PageUtil.buildSortQueryWrapper();
@@ -95,13 +95,13 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
String loginTimeStr = LocalDateTimeUtil.formatNormal(loginTime);
String handoverTimeStr = LocalDateTimeUtil.formatNormal(handoverTime);
HandoverRecord entity = BeanUtil.copyProperties(data, HandoverRecord.class);
entity.setWechatAmount(orderInfoService.getHandoverWechatAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setAlipayAmount(orderInfoService.getHandoverAlipayAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setVipPay(orderInfoService.getHandoverVipPayAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setVipRecharge(orderInfoService.getHandoverVipChargeAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setQuickInAmount(orderInfoService.getHandoverQuickPayAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setCreditAmount(orderInfoService.getHandoverCreditAmount(shopId, loginTimeStr, handoverTimeStr));
List<HandoverCategoryListVo> categoryData = orderInfoService.getHandoverCategoryList(shopId, loginTimeStr, handoverTimeStr);
entity.setWechatAmount(orderInfoRpcService.getHandoverWechatAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setAlipayAmount(orderInfoRpcService.getHandoverAlipayAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setVipPay(orderInfoRpcService.getHandoverVipPayAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setVipRecharge(orderInfoRpcService.getHandoverVipChargeAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setQuickInAmount(orderInfoRpcService.getHandoverQuickPayAmount(shopId, loginTimeStr, handoverTimeStr));
entity.setCreditAmount(orderInfoRpcService.getHandoverCreditAmount(shopId, loginTimeStr, handoverTimeStr));
List<HandoverCategoryListVo> categoryData = orderInfoRpcService.getHandoverCategoryList(shopId, loginTimeStr, handoverTimeStr);
entity.setCategoryData(JSON.toJSONString(categoryData, JSONWriter.Feature.WriteMapNullValue));
List<HandoverProductListVo> productData = data.getDetailList();
entity.setProductData(JSON.toJSONString(productData, JSONWriter.Feature.WriteMapNullValue));
@@ -110,22 +110,22 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
}
private BigDecimal sumCashAmount(Long shopId, String loginTime, String handoverTime) {
return orderInfoService.getHandoverCashAmount(shopId, loginTime, handoverTime);
return orderInfoRpcService.getHandoverCashAmount(shopId, loginTime, handoverTime);
}
private BigDecimal sumRefundAmount(Long shopId, String loginTime, String handoverTime) {
return orderInfoService.getHandoverRefundAmount(shopId, loginTime, handoverTime);
return orderInfoRpcService.getHandoverRefundAmount(shopId, loginTime, handoverTime);
}
private BigDecimal sumHandAmount(Long shopId, String loginTime, String handoverTime) {
return orderInfoService.getHandoverTotalAmount(shopId, loginTime, handoverTime);
return orderInfoRpcService.getHandoverTotalAmount(shopId, loginTime, handoverTime);
}
private int countOrderNum(Long shopId, String loginTime, String handoverTime) {
return orderInfoService.getHandoverOrderNum(shopId, loginTime, handoverTime);
return orderInfoRpcService.getHandoverOrderNum(shopId, loginTime, handoverTime);
}
private List<HandoverProductListVo> getDetailList(Long shopId, String loginTime, String handoverTime) {
return orderInfoService.getHandoverDetailList(shopId, loginTime, handoverTime);
return orderInfoRpcService.getHandoverDetailList(shopId, loginTime, handoverTime);
}
}