|
|
@@ -399,7 +399,7 @@ public class OrderInvoiceService {
|
|
|
throw new ServiceException("仅失败或作废的发票可重新开票");
|
|
|
}
|
|
|
// 重置为未开,复用客户开票参数重开(运营身份 currentUserId 传 null 跳过归属校验)
|
|
|
- PosOrder order = posOrderMapper.selectOne(new LambdaQueryWrapper<PosOrder>().eq(PosOrder::getDdId,orderId.toString()));
|
|
|
+ PosOrder order = posOrderMapper.selectOne(new LambdaQueryWrapper<PosOrder>().eq(PosOrder::getDdId,row.getOrderNo()));
|
|
|
if (order == null) {
|
|
|
throw new ServiceException("订单不存在");
|
|
|
}
|
|
|
@@ -735,12 +735,15 @@ public class OrderInvoiceService {
|
|
|
} else {
|
|
|
// B2C:有载具 → PrintFlag=N 存载具;无载具 → PrintFlag=Y 个人纸本(零信息兜底,010 Phase 11)
|
|
|
if (StrUtil.isNotBlank(dto.getCarrierType())) {
|
|
|
- inv.put("CarrierType", dto.getCarrierType());
|
|
|
- inv.put("CarrierNum", dto.getCarrierNum());
|
|
|
- inv.put("PrintFlag", "N");
|
|
|
- // ezPay 会员载具(2)需邮箱;手机条码(0)/自然人凭证(1)票进载具,邮箱留空
|
|
|
- if ("2".equals(dto.getCarrierType()) && StrUtil.isNotBlank(dto.getBuyerEmail())) {
|
|
|
- inv.put("BuyerEmail", dto.getBuyerEmail());
|
|
|
+ if ("2".equals(dto.getCarrierType())) {
|
|
|
+ // 【临时测试】无载具云端发票:PrintFlag=N 但不传 CarrierType/CarrierNum/邮箱
|
|
|
+ // 验证 ezPay 是否接受 B2C 无载具+PrintFlag=N(成功→会员载具改走此路;失败→回落纸本)
|
|
|
+ inv.put("PrintFlag", "N");
|
|
|
+ } else {
|
|
|
+ inv.put("CarrierType", dto.getCarrierType());
|
|
|
+ inv.put("CarrierNum", dto.getCarrierNum());
|
|
|
+ inv.put("PrintFlag", "N");
|
|
|
+ // 手机条码(0)/自然人凭证(1)票进载具,邮箱留空
|
|
|
}
|
|
|
} else {
|
|
|
// 个人纸本:无载具无捐赠,法定 PrintFlag=Y;不传载具/邮箱
|