APP订单列表显示未支付取消的订单

This commit is contained in:
wyn
2026-07-16 09:53:40 +08:00
parent b54476419b
commit 84cdf95978
4 changed files with 23 additions and 7 deletions

View File

@@ -576,7 +576,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
wrapper.eq(BuyOrder::getUserId,userOrderDto.getUserId()); wrapper.eq(BuyOrder::getUserId,userOrderDto.getUserId());
// wrapper.eq(BuyOrder::getOrderType,"order");//这里有点问题 // wrapper.eq(BuyOrder::getOrderType,"order");//这里有点问题
if(userOrderDto.getOrderStatus()==null){ if(userOrderDto.getOrderStatus()==null){
Integer[] sts = {0,1,2,3,6,7}; Integer[] sts = {0,1,2,3,6,7,5};
wrapper.in(BuyOrder::getOrderStatus,sts); wrapper.in(BuyOrder::getOrderStatus,sts);
}else{ }else{
wrapper.eq(BuyOrder::getOrderStatus,userOrderDto.getOrderStatus()); wrapper.eq(BuyOrder::getOrderStatus,userOrderDto.getOrderStatus());

View File

@@ -30,7 +30,7 @@ public class InvStockRecord {
/** 出库类型:淘宝 */ /** 出库类型:淘宝 */
public static final String OUTBOUND_TAOBAO = "taobao"; public static final String OUTBOUND_TAOBAO = "taobao";
/** 出库类型APP */ /** 出库类型APP */
public static final String OUTBOUND_APP = "app"; public static final String OUTBOUND_APP = "App";
/** 出库类型:套书采购绑定(内部组装,导出售出明细时排除) */ /** 出库类型:套书采购绑定(内部组装,导出售出明细时排除) */
public static final String OUTBOUND_BOOKS = "books"; public static final String OUTBOUND_BOOKS = "books";

View File

@@ -100,12 +100,13 @@ public class InventoryManagementController {
Integer bizType = parseBizType(params.get("bizType")); Integer bizType = parseBizType(params.get("bizType"));
XSSFWorkbook wb = new XSSFWorkbook(); XSSFWorkbook wb = new XSSFWorkbook();
String fileName; String fileName;
String merchantPrefix = merchantFilePrefix(params.get("merchantId"));
if (bizType != null && bizType == InvStockRecord.BIZ_TYPE_PURCHASE) { if (bizType != null && bizType == InvStockRecord.BIZ_TYPE_PURCHASE) {
writePurchaseExportSheet(wb, maps); writePurchaseExportSheet(wb, maps);
fileName = "入库明细.xlsx"; fileName = merchantPrefix + "入库明细.xlsx";
} else if (bizType != null && bizType == InvStockRecord.BIZ_TYPE_SALE) { } else if (bizType != null && bizType == InvStockRecord.BIZ_TYPE_SALE) {
writeSaleExportSheet(wb, maps); writeSaleExportSheet(wb, maps);
fileName = "售出明细.xlsx"; fileName = merchantPrefix + "售出明细.xlsx";
} else { } else {
List<Map<String, Object>> purchaseRows = maps.stream() List<Map<String, Object>> purchaseRows = maps.stream()
.filter(map -> "purchase".equals(cellStr(map.get("exportCategory")))) .filter(map -> "purchase".equals(cellStr(map.get("exportCategory"))))
@@ -115,7 +116,7 @@ public class InventoryManagementController {
.toList(); .toList();
writePurchaseExportSheet(wb, purchaseRows); writePurchaseExportSheet(wb, purchaseRows);
writeSaleExportSheet(wb, saleRows); writeSaleExportSheet(wb, saleRows);
fileName = "采购售出明细.xlsx"; fileName = merchantPrefix + "采购售出明细.xlsx";
} }
writeExcel(response, wb, fileName); writeExcel(response, wb, fileName);
} }
@@ -196,7 +197,22 @@ public class InventoryManagementController {
row.createCell(4).setCellValue(cellStr(map.get("remainRate"))); row.createCell(4).setCellValue(cellStr(map.get("remainRate")));
rowIndex++; rowIndex++;
} }
writeExcel(response, wb, "商品库存统计.xlsx"); writeExcel(response, wb, merchantFilePrefix(params.get("merchantId")) + "商品库存统计.xlsx");
}
/** merchantId=1 → 灵枢merchantId=2 → 众妙 */
private String merchantFilePrefix(Object merchantIdObj) {
if (merchantIdObj == null || merchantIdObj.toString().isBlank()) {
return "";
}
String merchantId = merchantIdObj.toString().trim();
if ("1".equals(merchantId)) {
return "灵枢";
}
if ("2".equals(merchantId)) {
return "众妙";
}
return "";
} }
private String cellStr(Object value) { private String cellStr(Object value) {

View File

@@ -93,7 +93,7 @@ public class OrderCancelConsumer {
inventoryManagementService.rollbackSaleByOrderId(buyOrder.getOrderId()); inventoryManagementService.rollbackSaleByOrderId(buyOrder.getOrderId());
buyOrderService.updateById(buyOrder); buyOrderService.updateById(buyOrder);
buyOrderService.removeById(buyOrder); //buyOrderService.removeById(buyOrder);
} }
private boolean isTesterOrder(BuyOrder buyOrder) { private boolean isTesterOrder(BuyOrder buyOrder) {