APP订单列表显示未支付取消的订单
This commit is contained in:
@@ -576,7 +576,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
wrapper.eq(BuyOrder::getUserId,userOrderDto.getUserId());
|
||||
// wrapper.eq(BuyOrder::getOrderType,"order");//这里有点问题
|
||||
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);
|
||||
}else{
|
||||
wrapper.eq(BuyOrder::getOrderStatus,userOrderDto.getOrderStatus());
|
||||
|
||||
@@ -30,7 +30,7 @@ public class InvStockRecord {
|
||||
/** 出库类型:淘宝 */
|
||||
public static final String OUTBOUND_TAOBAO = "taobao";
|
||||
/** 出库类型:APP */
|
||||
public static final String OUTBOUND_APP = "app";
|
||||
public static final String OUTBOUND_APP = "App";
|
||||
/** 出库类型:套书采购绑定(内部组装,导出售出明细时排除) */
|
||||
public static final String OUTBOUND_BOOKS = "books";
|
||||
|
||||
|
||||
@@ -100,12 +100,13 @@ public class InventoryManagementController {
|
||||
Integer bizType = parseBizType(params.get("bizType"));
|
||||
XSSFWorkbook wb = new XSSFWorkbook();
|
||||
String fileName;
|
||||
String merchantPrefix = merchantFilePrefix(params.get("merchantId"));
|
||||
if (bizType != null && bizType == InvStockRecord.BIZ_TYPE_PURCHASE) {
|
||||
writePurchaseExportSheet(wb, maps);
|
||||
fileName = "入库明细.xlsx";
|
||||
fileName = merchantPrefix + "入库明细.xlsx";
|
||||
} else if (bizType != null && bizType == InvStockRecord.BIZ_TYPE_SALE) {
|
||||
writeSaleExportSheet(wb, maps);
|
||||
fileName = "售出明细.xlsx";
|
||||
fileName = merchantPrefix + "售出明细.xlsx";
|
||||
} else {
|
||||
List<Map<String, Object>> purchaseRows = maps.stream()
|
||||
.filter(map -> "purchase".equals(cellStr(map.get("exportCategory"))))
|
||||
@@ -115,7 +116,7 @@ public class InventoryManagementController {
|
||||
.toList();
|
||||
writePurchaseExportSheet(wb, purchaseRows);
|
||||
writeSaleExportSheet(wb, saleRows);
|
||||
fileName = "采购售出明细.xlsx";
|
||||
fileName = merchantPrefix + "采购售出明细.xlsx";
|
||||
}
|
||||
writeExcel(response, wb, fileName);
|
||||
}
|
||||
@@ -196,7 +197,22 @@ public class InventoryManagementController {
|
||||
row.createCell(4).setCellValue(cellStr(map.get("remainRate")));
|
||||
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) {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class OrderCancelConsumer {
|
||||
inventoryManagementService.rollbackSaleByOrderId(buyOrder.getOrderId());
|
||||
|
||||
buyOrderService.updateById(buyOrder);
|
||||
buyOrderService.removeById(buyOrder);
|
||||
//buyOrderService.removeById(buyOrder);
|
||||
}
|
||||
|
||||
private boolean isTesterOrder(BuyOrder buyOrder) {
|
||||
|
||||
Reference in New Issue
Block a user