35 changed files with 2176 additions and 5 deletions
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.yythmall.api.customerstore; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.UUID; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/21 15:06 |
||||
|
*/ |
||||
|
@ApiModel(value = "礼包包含商品信息", description = "礼包包含商品信息") |
||||
|
@TableName("customer_store") |
||||
|
@Data |
||||
|
public class CustomerStore { |
||||
|
private String id; |
||||
|
private String sid = UUID.randomUUID().toString(); |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date createTime; |
||||
|
private String remarks; |
||||
|
private String isEnable; |
||||
|
private String customerSid; |
||||
|
private String storeSid; |
||||
|
// private String isGrounding;
|
||||
|
private String phone; |
||||
|
private String name; |
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.yythmall.api.customerstore; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/21 15:13 |
||||
|
*/ |
||||
|
@ApiModel(value = "礼包包含商品信息 数据传输对象", description = "礼包包含商品信息 数据传输对象") |
||||
|
@Data |
||||
|
public class CustomerStoreDto implements Dto { |
||||
|
private String id; |
||||
|
private String sid ; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date createTime; |
||||
|
private String remarks; |
||||
|
private String isEnable; |
||||
|
private String customerSid; |
||||
|
private String storeSid; |
||||
|
// private String isGrounding;
|
||||
|
private String phone; |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.yxt.yythmall.api.customerstore; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/21 15:31 |
||||
|
*/ |
||||
|
@ApiModel(value = "礼包包含商品信息 查询条件", description = "礼包包含商品信息 查询条件") |
||||
|
@Data |
||||
|
public class CustomerStoreQuery implements Query { |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.yythmall.api.customerstore; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/21 15:12 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "礼包包含商品信息 视图数据对象", description = "礼包包含商品信息 视图数据对象") |
||||
|
@NoArgsConstructor |
||||
|
public class CustomerStoreVo implements Vo { |
||||
|
private String id; |
||||
|
private String sid ; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date createTime; |
||||
|
private String remarks; |
||||
|
private String isEnable; |
||||
|
private String customerSid; |
||||
|
private String storeSid; |
||||
|
private String storeName;//提货点名称
|
||||
|
private String businessHours;//营业时间
|
||||
|
private String address;//地址
|
||||
|
// private String isGrounding;
|
||||
|
private String phone;//电话
|
||||
|
private String name;//姓名
|
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreservedetails; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.UUID; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:29 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class VegeCellarReserveDetails { |
||||
|
private String id; |
||||
|
private String sid= UUID.randomUUID().toString(); |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
||||
|
private Date createTime; |
||||
|
private String remarks; |
||||
|
private String cardSid; |
||||
|
private String goodsSid; |
||||
|
private double goodsNumber=0; |
||||
|
private String num; |
||||
|
private String orderSid; |
||||
|
private String goodsName; |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreservedetails; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:29 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class VegeCellarReserveDetailsDto { |
||||
|
private String cardSid; |
||||
|
private String goodsSid; |
||||
|
private String goodsNumber; |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreservedetails; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:30 |
||||
|
*/ |
||||
|
public class VegeCellarReserveDetailsQuery { |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.yxt.common.core.utils.ExportEntityMap; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 14:34 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class Goods { |
||||
|
private double goodsNumber;//数量
|
||||
|
private String goodsSid;//商品sid
|
||||
|
@ExportEntityMap(CnName = "商品明细", EnName = "goodsInfo") |
||||
|
private String goodsInfo; |
||||
|
|
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.yxt.common.base.utils.StringUtils; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2023/11/27 16:53 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LpkReserveOrderCardVo implements Vo { |
||||
|
private String code; //卡号
|
||||
|
private String sid; |
||||
|
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") |
||||
|
private Date reserveDate; //预约时间
|
||||
|
private String store; //提货门店
|
||||
|
private String storeSid; //提货门店
|
||||
|
private String bagName; //礼包
|
||||
|
private String cardSid; // 提货卡sid
|
||||
|
private String orderSid; //预约订单sid
|
||||
|
private String userName; |
||||
|
private String userPhone; |
||||
|
private String state;//提货状态
|
||||
|
private List<GoodsVo> goodsVos; |
||||
|
private String goods; |
||||
|
private String serialNumber; |
||||
|
private String type; |
||||
|
|
||||
|
public String getBagName() { |
||||
|
if(StringUtils.isBlank(bagName)){ |
||||
|
bagName="福礼卡"; |
||||
|
} |
||||
|
return bagName; |
||||
|
} |
||||
|
|
||||
|
public String getState() { |
||||
|
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); |
||||
|
int c= DateUtil.parse(sdf.format(reserveDate)).compareTo(DateUtil.parse(sdf.format(new Date()))); |
||||
|
if(String.valueOf(c).equals("-1")){ |
||||
|
this.state="已提货"; |
||||
|
}else{ |
||||
|
this.state="未提货"; |
||||
|
} |
||||
|
return state; |
||||
|
} |
||||
|
} |
@ -0,0 +1,92 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.alibaba.excel.metadata.Head; |
||||
|
import com.alibaba.excel.write.merge.AbstractMergeStrategy; |
||||
|
import org.apache.commons.collections.map.HashedMap; |
||||
|
import org.apache.poi.ss.usermodel.Cell; |
||||
|
import org.apache.poi.ss.usermodel.Sheet; |
||||
|
import org.apache.poi.ss.util.CellRangeAddress; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.HashSet; |
||||
|
import java.util.Map; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/12/15 13:43 |
||||
|
*/ |
||||
|
public class MergeStrategy extends AbstractMergeStrategy { |
||||
|
|
||||
|
// 合并的列编号,从0开始,指定的index或自己按字段顺序数
|
||||
|
private Set<Integer> mergeCellIndex = new HashSet<>(); |
||||
|
|
||||
|
// 数据集大小,用于区别结束行位置
|
||||
|
private Integer maxRow = 0; |
||||
|
|
||||
|
// 禁止无参声明
|
||||
|
private MergeStrategy() { |
||||
|
} |
||||
|
|
||||
|
public MergeStrategy(Integer maxRow, int... mergeCellIndex) { |
||||
|
Arrays.stream(mergeCellIndex).forEach(item -> { |
||||
|
this.mergeCellIndex.add(item); |
||||
|
}); |
||||
|
this.maxRow = maxRow; |
||||
|
} |
||||
|
|
||||
|
// 记录上一次合并的信息
|
||||
|
private Map<Integer, MergeRange> lastRow = new HashedMap(); |
||||
|
|
||||
|
// 每行每列都会进入,绝对不要在这写循环
|
||||
|
@Override |
||||
|
protected void merge(Sheet sheet, Cell cell, Head head, Integer relativeRowIndex) { |
||||
|
int currentCellIndex = cell.getColumnIndex(); |
||||
|
// 判断该行是否需要合并
|
||||
|
if (mergeCellIndex.contains(currentCellIndex)) { |
||||
|
String currentCellValue = cell.getStringCellValue(); |
||||
|
int currentRowIndex = cell.getRowIndex(); |
||||
|
if (!lastRow.containsKey(currentCellIndex)) { |
||||
|
// 记录首行起始位置
|
||||
|
lastRow.put(currentCellIndex, new MergeRange(currentCellValue, currentRowIndex, currentRowIndex, currentCellIndex, currentCellIndex)); |
||||
|
return; |
||||
|
} |
||||
|
//有上行这列的值了,拿来对比.
|
||||
|
MergeRange mergeRange = lastRow.get(currentCellIndex); |
||||
|
if (!(mergeRange.lastValue != null && mergeRange.lastValue.equals(currentCellValue))) { |
||||
|
// 结束的位置触发下合并.
|
||||
|
// 同行同列不能合并,会抛异常
|
||||
|
if (mergeRange.startRow != mergeRange.endRow || mergeRange.startCell != mergeRange.endCell) { |
||||
|
sheet.addMergedRegionUnsafe(new CellRangeAddress(mergeRange.startRow, mergeRange.endRow, mergeRange.startCell, mergeRange.endCell)); |
||||
|
} |
||||
|
// 更新当前列起始位置
|
||||
|
lastRow.put(currentCellIndex, new MergeRange(currentCellValue, currentRowIndex, currentRowIndex, currentCellIndex, currentCellIndex)); |
||||
|
} |
||||
|
// 合并行 + 1
|
||||
|
mergeRange.endRow += 1; |
||||
|
// 结束的位置触发下最后一次没完成的合并
|
||||
|
if (relativeRowIndex.equals(maxRow - 1)) { |
||||
|
MergeRange lastMergeRange = lastRow.get(currentCellIndex); |
||||
|
// 同行同列不能合并,会抛异常
|
||||
|
if (lastMergeRange.startRow != lastMergeRange.endRow || lastMergeRange.startCell != lastMergeRange.endCell) { |
||||
|
sheet.addMergedRegionUnsafe(new CellRangeAddress(lastMergeRange.startRow, lastMergeRange.endRow, lastMergeRange.startCell, lastMergeRange.endCell)); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
class MergeRange { |
||||
|
public int startRow; |
||||
|
public int endRow; |
||||
|
public int startCell; |
||||
|
public int endCell; |
||||
|
public String lastValue; |
||||
|
|
||||
|
public MergeRange(String lastValue, int startRow, int endRow, int startCell, int endCell) { |
||||
|
this.startRow = startRow; |
||||
|
this.endRow = endRow; |
||||
|
this.startCell = startCell; |
||||
|
this.endCell = endCell; |
||||
|
this.lastValue = lastValue; |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2023/11/28 10:11 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OrderGoodsVo implements Vo { |
||||
|
private int num; |
||||
|
private String goodName; |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelIgnore; |
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2023/11/28 10:26 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@EqualsAndHashCode |
||||
|
public class ReserveOrderExport { |
||||
|
|
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "预约时间",index = 0) |
||||
|
private String reserveDate; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "支行",index = 1) |
||||
|
private String bankName; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "提货门店",index = 2) |
||||
|
private String store; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "礼包名称",index = 3) |
||||
|
private String bagName; |
||||
|
|
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "提货卡序列号",index = 4) |
||||
|
private String serialNumber; |
||||
|
|
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "姓名",index = 5) |
||||
|
private String userName; |
||||
|
|
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "联系方式",index = 6) |
||||
|
private String userPhone; |
||||
|
|
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品名称",index = 7) |
||||
|
private String goodsName; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品数量(份)",index = 8) |
||||
|
private String goodsNumber; |
||||
|
@ExcelIgnore |
||||
|
private String sid; |
||||
|
@ExcelIgnore |
||||
|
private String goodsSid; |
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelIgnore; |
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/12/11 13:58 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@EqualsAndHashCode |
||||
|
public class ReserveOrderExportByBank { |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "预约时间",index = 0) |
||||
|
private String reserveDate; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "支行",index = 1) |
||||
|
private String bankName; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "卡类型",index = 2) |
||||
|
private String cardType; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品名称",index = 3) |
||||
|
private String goodsName; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品数量(份)",index = 4) |
||||
|
private String goodsNumber; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "联系人",index = 5) |
||||
|
private String linker; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "联系电话",index = 6) |
||||
|
private String linkPhone; |
||||
|
@ColumnWidth(50) |
||||
|
@ExcelProperty(value = "地址",index = 7) |
||||
|
private String address; |
||||
|
|
||||
|
@ExcelIgnore |
||||
|
private String storeSid; |
||||
|
@ExcelIgnore |
||||
|
private String goodsSid; |
||||
|
|
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelIgnore; |
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/12/11 13:58 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@EqualsAndHashCode |
||||
|
public class ReserveOrderExportByStore { |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "预约时间",index = 0) |
||||
|
private String reserveDate; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "支行",index = 1) |
||||
|
private String bankName; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "提货门店",index = 2) |
||||
|
private String store; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "卡类型",index = 3) |
||||
|
private String cardType; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品名称",index = 4) |
||||
|
private String goodsName; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品数量(份)",index = 5) |
||||
|
private String goodsNumber; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "联系人",index = 6) |
||||
|
private String linker; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "联系电话",index = 7) |
||||
|
private String linkPhone; |
||||
|
@ColumnWidth(50) |
||||
|
@ExcelProperty(value = "地址",index = 8) |
||||
|
private String address; |
||||
|
|
||||
|
@ExcelIgnore |
||||
|
private String storeSid; |
||||
|
@ExcelIgnore |
||||
|
private String goodsSid; |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelIgnore; |
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/12/11 13:58 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@EqualsAndHashCode |
||||
|
public class ReserveOrderExportByZ { |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "预约时间",index = 0) |
||||
|
private String reserveDate; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "卡类型",index = 1) |
||||
|
private String cardType; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品名称",index = 2) |
||||
|
private String goodsName; |
||||
|
@ColumnWidth(20) |
||||
|
@ExcelProperty(value = "商品数量(份)",index = 3) |
||||
|
private String goodsNumber; |
||||
|
|
||||
|
@ExcelIgnore |
||||
|
private String storeSid; |
||||
|
@ExcelIgnore |
||||
|
private String goodsSid; |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.UUID; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:29 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class VegeCellarReserveOrder { |
||||
|
private String id; |
||||
|
private String sid= UUID.randomUUID().toString(); |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
||||
|
private Date createTime; |
||||
|
private String remarks; |
||||
|
private String isEnable; |
||||
|
|
||||
|
private String customerSid; |
||||
|
private String reserveDate; |
||||
|
private String storeSid; |
||||
|
private String userName; |
||||
|
private String userPhone; |
||||
|
private String userAddress; |
||||
|
|
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:29 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class VegeCellarReserveOrderDto implements Dto { |
||||
|
private String customerSid; |
||||
|
private String reserveDate; |
||||
|
private String storeSid; |
||||
|
private String userName; |
||||
|
private String userPhone; |
||||
|
private String userAddress; |
||||
|
private List<GoodsVo> goodsVos; |
||||
|
private String orderSid; |
||||
|
private String addressName; |
||||
|
private String cardType;//提货类型,1=提货卡;2=福利卡
|
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:30 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class VegeCellarReserveOrderQuery implements Query { |
||||
|
private String userName; //用户名
|
||||
|
private String store; // 门店
|
||||
|
private String startDate; //预约开始日期
|
||||
|
private String endDate; // 预约结束日期
|
||||
|
private String userSid; |
||||
|
private String storeSid; |
||||
|
private String bankSid; |
||||
|
private String bankName; |
||||
|
private String serialNumber; |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.yxt.yythmall.api.vegecallerreserveorder; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2023/11/27 15:11 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class VegeCellarReserveOrderVo implements Vo { |
||||
|
private String sid; //预约订单sid
|
||||
|
private String userName; //用户名
|
||||
|
private String userPhone; //用户电话
|
||||
|
private String store; //门店
|
||||
|
private String storeSid; //门店
|
||||
|
@JsonFormat(pattern = "yyyy-MM-dd ",timezone="GMT+8") |
||||
|
private Date reserveDate; //预约时间
|
||||
|
private String bagName; //礼包
|
||||
|
private String code; //卡号
|
||||
|
private String goodsInfo; |
||||
|
private List<OrderGoodsVo> goodsVo = new ArrayList<>(); |
||||
|
private List<String> goods=new ArrayList<>(); |
||||
|
private String bankName; |
||||
|
private String goodsSid; |
||||
|
private String goodsName; |
||||
|
private String goodsNumber; |
||||
|
private String serialNumber; |
||||
|
private String linker; |
||||
|
private String linkPhone; |
||||
|
private String address; |
||||
|
private String cardType; |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.yxt.yythmall.biz.customerstore; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.yythmall.api.customerstore.CustomerStore; |
||||
|
import com.yxt.yythmall.api.customerstore.CustomerStoreVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/21 15:03 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface CustomerStoreMapper extends BaseMapper<CustomerStore> { |
||||
|
CustomerStoreVo getStoreBySid(@Param("customerSid") String customerSid); |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.yythmall.biz.customerstore.CustomerStoreMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
|
||||
|
<select id="getStoreBySid" resultType="com.yxt.yythmall.api.customerstore.CustomerStoreVo"> |
||||
|
select s.storeSid, s.name ,s.phone,t.name as storeName,t.address ,t.businessHours from customer_store s left join lpk_store t on s.storeSid=t.sid |
||||
|
where customerSid=#{customerSid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,30 @@ |
|||||
|
package com.yxt.yythmall.biz.customerstore; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/21 15:03 |
||||
|
*/ |
||||
|
|
||||
|
@Api(tags = "客户网点关联") |
||||
|
@RestController |
||||
|
@RequestMapping("customerstore") |
||||
|
public class CustomerStoreRest { |
||||
|
|
||||
|
@Autowired |
||||
|
CustomerStoreService customerStoreService; |
||||
|
|
||||
|
@ApiOperation("我的默认提货地点") |
||||
|
@GetMapping("/getStoreBySid/{sid}") |
||||
|
public ResultBean getStoreBySid(@PathVariable String sid) { |
||||
|
return customerStoreService.getStoreBySid(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.yxt.yythmall.biz.customerstore; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.yythmall.api.customerstore.CustomerStore; |
||||
|
import com.yxt.yythmall.api.customerstore.CustomerStoreDto; |
||||
|
import com.yxt.yythmall.api.customerstore.CustomerStoreVo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/21 15:03 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class CustomerStoreService extends MybatisBaseService<CustomerStoreMapper, CustomerStore> { |
||||
|
|
||||
|
public ResultBean<CustomerStoreVo> getStoreBySid(String customerSid) { |
||||
|
ResultBean rb=new ResultBean().fail(); |
||||
|
CustomerStoreVo vo=baseMapper.getStoreBySid(customerSid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
public ResultBean saveStore(CustomerStoreDto dto){ |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
baseMapper.delete(new QueryWrapper<CustomerStore>().eq("customerSid",dto.getCustomerSid())); |
||||
|
CustomerStore customerStore=new CustomerStore(); |
||||
|
BeanUtil.copyProperties(dto, customerStore, "id", "sid"); |
||||
|
baseMapper.insert(customerStore); |
||||
|
return rb.success().setMsg("成功"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.yythmall.biz.vegecallerreservedetail; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.yythmall.api.vegecallerreservedetails.VegeCellarReserveDetails; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.apache.ibatis.annotations.Select; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:36 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface VegeCellarReserveDetailsMapper extends BaseMapper<VegeCellarReserveDetails> { |
||||
|
@Select("select sum(goodsNumber) as goodsNumber , goodsSid as goodsSid from lpk_reserve_order_goods where cardSid=#{cardSid} and goodsSid=#{goodsSid}") |
||||
|
VegeCellarReserveDetails getReserveByCardSid(@Param("cardSid") String cardSid, @Param("goodsSid") String goodsSid); |
||||
|
|
||||
|
VegeCellarReserveDetails selByOrderSidAndGoodSid(@Param("orderSid") String orderSid, @Param("goodsSid") String goodsSid); |
||||
|
|
||||
|
@Select("select * from lpk_reserve_order_goods where orderSid=#{orderSid}") |
||||
|
List<VegeCellarReserveDetails> selByOrderSid(String orderSid); |
||||
|
|
||||
|
List<VegeCellarReserveDetails> selInOrderSid(@Param("orderSids") List<String> orderSids); |
||||
|
@Select("select *,goodsNumber as num from lpk_reserve_order_goods where orderSid=#{orderSid}") |
||||
|
List<VegeCellarReserveDetails> selByOrderSids(String orderSid); |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.yythmall.biz.vegecallerreservedetail.VegeCellarReserveDetailsMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
|
||||
|
<select id="storeListPage" resultType="com.yxt.yythmall.api.lpkstore.LpkStoreVo"> |
||||
|
select |
||||
|
sid, |
||||
|
date_format(createTime, '%Y-%m-%d') as createTime, |
||||
|
code, |
||||
|
`name`, |
||||
|
address, |
||||
|
phone, |
||||
|
businessHours |
||||
|
from lpk_store |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="selByOrderSidAndGoodSid" |
||||
|
resultType="com.yxt.yythmall.api.lpkreserveordergoods.LpkReserveOrderGoods"> |
||||
|
select * |
||||
|
from lpk_reserve_order_goods |
||||
|
where orderSid = #{orderSid} |
||||
|
and goodsSid = #{goodsSid} |
||||
|
</select> |
||||
|
<select id="selInOrderSid" resultType="com.yxt.yythmall.api.lpkreserveordergoods.LpkReserveOrderGoods"> |
||||
|
select s.sid,s.createTime,s.remarks,s.cardSid,s.goodsSid,s.orderSid,sum(s.goodsNumber) as goodsNumber |
||||
|
from lpk_reserve_order_goods s |
||||
|
where orderSid in |
||||
|
<foreach collection="orderSids" item="item" index="index" open="(" close=")" separator=","> |
||||
|
#{item} |
||||
|
</foreach> |
||||
|
GROUP BY s.goodsSid |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.yythmall.biz.vegecallerreservedetail; |
||||
|
|
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:35 |
||||
|
*/ |
||||
|
@Api(tags = "预约订单信息") |
||||
|
@RestController |
||||
|
@RequestMapping("lpksreservoordersss") |
||||
|
public class VegeCellarReserveDetailsRest { |
||||
|
@Autowired |
||||
|
VegeCellarReserveDetailsService vegeCellarReserveOrderService; |
||||
|
|
||||
|
|
||||
|
// @ApiOperation("预约提交")
|
||||
|
// @PostMapping("/submissionDetail")
|
||||
|
// public ResultBean submissionDetail(VegeCellarReserveOrderDto dto){
|
||||
|
// return VegeCellarReserveOrderService.submissionDetail(dto);
|
||||
|
// }
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.yxt.yythmall.biz.vegecallerreservedetail; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.date.DateTime; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.yythmall.api.empcardgiftgoods.EmpCardGiftGoodsVo; |
||||
|
import com.yxt.yythmall.api.lpkgiftcard.AppletVo; |
||||
|
import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; |
||||
|
import com.yxt.yythmall.api.vegecallerreservedetails.VegeCellarReserveDetails; |
||||
|
import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderDto; |
||||
|
import com.yxt.yythmall.biz.empcardgiftgoods.EmpCardGiftGoodsService; |
||||
|
import com.yxt.yythmall.biz.lpkgiftcard.LpkGiftCardService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:36 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class VegeCellarReserveDetailsService extends MybatisBaseService<VegeCellarReserveDetailsMapper, VegeCellarReserveDetails> { |
||||
|
@Autowired |
||||
|
LpkGiftCardService lpkGiftCardService; |
||||
|
@Autowired |
||||
|
EmpCardGiftGoodsService empCardGiftGoodsService; |
||||
|
|
||||
|
|
||||
|
public ResultBean<VegeCellarReserveDetails> getReserveByCardSid(String carSid, String goodsSid) { |
||||
|
ResultBean rb = new ResultBean(); |
||||
|
VegeCellarReserveDetails goods = baseMapper.getReserveByCardSid(carSid, goodsSid); |
||||
|
return rb.success().setData(goods); |
||||
|
} |
||||
|
|
||||
|
public ResultBean submissionDetail(VegeCellarReserveOrderDto dto) { |
||||
|
ResultBean rb = new ResultBean(); |
||||
|
VegeCellarReserveDetails goods = new VegeCellarReserveDetails(); |
||||
|
BeanUtil.copyProperties(dto, goods, "id", "sid"); |
||||
|
// goods.setCardSid(dto.getSid());
|
||||
|
for (GoodsVo goods1 : dto.getGoodsVos()) { |
||||
|
if (goods1.getSelect() != 0) { |
||||
|
// goods.setCardSid(dto.getSid());
|
||||
|
goods.setGoodsSid(goods1.getGoodsSid()); |
||||
|
goods.setGoodsNumber(goods1.getSelect()); |
||||
|
goods.setCreateTime(new DateTime()); |
||||
|
baseMapper.insert(goods); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return rb.success().setData("预约成功"); |
||||
|
} |
||||
|
|
||||
|
public VegeCellarReserveDetails selByOrderSidAndGoodSid(String orderSid, String goodsSid) { |
||||
|
return baseMapper.selByOrderSidAndGoodSid(orderSid,goodsSid); |
||||
|
} |
||||
|
public List<VegeCellarReserveDetails> selByOrderSid(String orderSid) { |
||||
|
return baseMapper.selByOrderSid(orderSid); |
||||
|
} |
||||
|
public List<VegeCellarReserveDetails> selInOrderSid(List<String> orderSids) { |
||||
|
return baseMapper.selInOrderSid(orderSids); |
||||
|
} |
||||
|
public List<VegeCellarReserveDetails> selByOrderSids(String orderSid) { |
||||
|
return baseMapper.selByOrderSids(orderSid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.yxt.yythmall.biz.vegecallerreserveorder; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
|
||||
|
import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrder; |
||||
|
import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.apache.ibatis.annotations.Select; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:36 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface VegeCellarReserveOrderMapper extends BaseMapper<VegeCellarReserveOrder> { |
||||
|
// IPage<VegeCellarReserveOrderVo> orderList(IPage<VegeCellarReserveOrder> page, @Param("qw") VegeCellarReserveOrderQuery qw);
|
||||
|
// IPage<VegeCellarReserveOrderVo> orderListByStore(IPage<VegeCellarReserveOrder> page, @Param(Constants.WRAPPER) QueryWrapper<VegeCellarReserveOrder> qw);
|
||||
|
// IPage<VegeCellarReserveOrderVo> orderListByBank(IPage<VegeCellarReserveOrder> page, @Param(Constants.WRAPPER) QueryWrapper<VegeCellarReserveOrder> qw);
|
||||
|
// IPage<VegeCellarReserveOrderVo> orderListByZ(IPage<VegeCellarReserveOrder> page, @Param(Constants.WRAPPER) QueryWrapper<VegeCellarReserveOrder> qw);
|
||||
|
//// List<VegeCellarReserveOrderCardVo> orderByCardSid(String sid);
|
||||
|
//
|
||||
|
//// IPage<VegeCellarReserveOrderCardVo> orderListByUserSid(IPage<VegeCellarReserveOrder> page, @Param(Constants.WRAPPER) QueryWrapper<VegeCellarReserveOrder> qw);
|
||||
|
// IPage<VegeCellarReserveOrderCardVo> orderListByUserSid(IPage<VegeCellarReserveOrder> page, @Param("userSid")String userSid);
|
||||
|
//
|
||||
|
// List<ReserveOrderExport> exportExcel(@Param("qw") VegeCellarReserveOrderQuery qw);
|
||||
|
// List<ReserveOrderExportByStore> exportExcelByStore(@Param(Constants.WRAPPER) QueryWrapper<VegeCellarReserveOrderQuery> qw);
|
||||
|
// List<ReserveOrderExportByBank> exportExcelByBank(@Param(Constants.WRAPPER) QueryWrapper<VegeCellarReserveOrderQuery> qw);
|
||||
|
// List<ReserveOrderExportByZ> exportExcelByZ(@Param(Constants.WRAPPER) QueryWrapper<VegeCellarReserveOrderQuery> qw);
|
||||
|
// @Select("select sid from lpk_reserve_order where storeSid=#{storeSid} and reserveDate =#{reserveDate}")
|
||||
|
// List<String> getOrderByStore(@Param("storeSid")String storeSid,@Param("reserveDate")String reserveDate);
|
||||
|
// @Select("select * from lpk_reserve_order where customerSid =#{sid} order by createTime desc limit 1")
|
||||
|
// VegeCellarReserveOrderVo getStoreByCustomerSid(@Param("sid") String sid);
|
||||
|
// @Select("select * from lpk_reserve_order where cardSid =#{sid} order by reserveDate desc limit 1")
|
||||
|
// VegeCellarReserveOrderVo selByCardSid(@Param("sid") String sid);
|
||||
|
// @Select("SELECT o.*,st.`name` AS store FROM lpk_reserve_order o LEFT JOIN lpk_store st ON o.storeSid = st.sid where o.cardSid =#{sid} ORDER BY o.reserveDate desc")
|
||||
|
// List<VegeCellarReserveOrderCardVo> selOrderByCardSid(@Param("sid") String sid);
|
||||
|
|
||||
|
} |
@ -0,0 +1,488 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.yythmall.biz.vegecallerreserveorder.VegeCellarReserveOrderMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
|
||||
|
<select id="storeListPage" resultType="com.yxt.yythmall.api.lpkstore.LpkStoreVo"> |
||||
|
select |
||||
|
sid, |
||||
|
date_format(createTime, '%Y-%m-%d') as createTime, |
||||
|
code, |
||||
|
`name`, |
||||
|
address, |
||||
|
phone, |
||||
|
businessHours |
||||
|
from lpk_store |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="orderList" resultType="com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderVo"> |
||||
|
SELECT |
||||
|
o.sid, |
||||
|
date_format( o.reserveDate, '%Y-%m-%d' ) AS reserveDate, |
||||
|
o.userName, |
||||
|
o.userPhone, |
||||
|
s.`name` AS store, |
||||
|
b.`name` AS bagName, |
||||
|
d.NAME AS bankName, |
||||
|
c.`code`, |
||||
|
d.sid as dsid, |
||||
|
s.sid as ssid, |
||||
|
c.serialNumber, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
end cardType |
||||
|
FROM |
||||
|
lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
LEFT JOIN lpk_bank AS d ON d.sid = s.bankSid |
||||
|
<where> |
||||
|
o.cardType='1' |
||||
|
<if test="qw.bankSid !='' and qw.bankSid!=null"> |
||||
|
and s.bankSid=#{qw.bankSid} |
||||
|
</if> |
||||
|
<if test="qw.store !='' and qw.store!=null"> |
||||
|
and s.name=#{qw.store} |
||||
|
</if> |
||||
|
<if test="qw.startDate !='' and qw.startDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
<if test="qw.endDate !='' and qw.endDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d') <= date_format(#{qw.endDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
</where> |
||||
|
union |
||||
|
SELECT |
||||
|
o.sid, |
||||
|
date_format( o.reserveDate, '%Y-%m-%d' ) AS reserveDate, |
||||
|
o.userName, |
||||
|
o.userPhone, |
||||
|
s.`name` AS store, |
||||
|
b.`name` AS bagName, |
||||
|
d.NAME AS bankName, |
||||
|
c.`code`, |
||||
|
d.sid as dsid, |
||||
|
s.sid as ssid, |
||||
|
c.serialNumber, |
||||
|
case o.cardType |
||||
|
when 2 then '亲情卡' |
||||
|
end cardType |
||||
|
FROM |
||||
|
lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN emp_card_gift AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.sid = b.sid |
||||
|
LEFT JOIN lpk_bank AS d ON d.sid = s.bankSid |
||||
|
<where> |
||||
|
o.cardType='2' |
||||
|
<if test="qw.bankSid !='' and qw.bankSid!=null"> |
||||
|
and s.bankSid=#{qw.bankSid} |
||||
|
</if> |
||||
|
<if test="qw.store !='' and qw.store!=null"> |
||||
|
and s.name=#{qw.store} |
||||
|
</if> |
||||
|
<if test="qw.startDate !='' and qw.startDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
<if test="qw.endDate !='' and qw.endDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d') <= date_format(#{qw.endDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
</where> |
||||
|
union |
||||
|
SELECT |
||||
|
o.sid, |
||||
|
date_format( o.reserveDate, '%Y-%m-%d' ) AS reserveDate, |
||||
|
o.userName, |
||||
|
o.userPhone, |
||||
|
s.`name` AS store, |
||||
|
b.`name` AS bagName, |
||||
|
d.NAME AS bankName, |
||||
|
c.`code`, |
||||
|
d.sid as dsid, |
||||
|
s.sid as ssid, |
||||
|
c.serialNumber, |
||||
|
case o.cardType |
||||
|
when 3 then '企业卡' |
||||
|
end cardType |
||||
|
FROM |
||||
|
lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN emp_card AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
LEFT JOIN lpk_bank AS d ON d.sid = s.bankSid |
||||
|
WHERE o.cardType='3' |
||||
|
order by reserveDate asc,dsid desc,ssid desc,serialNumber asc |
||||
|
</select> |
||||
|
<select id="orderListByStore" resultType="com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderVo"> |
||||
|
select |
||||
|
o.sid, |
||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
s.`name` as store, |
||||
|
s.sid as storeSid, |
||||
|
d.name as bankName, |
||||
|
t.goodsSid as goodsSid, |
||||
|
sum(t.goodsNumber) as goodsNumber, |
||||
|
d.linker, |
||||
|
d.linkPhone, |
||||
|
d.address, |
||||
|
e.`name` as goodsName, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
when 2 then '亲情卡' |
||||
|
when 3 then '企业卡' |
||||
|
end cardType |
||||
|
from lpk_reserve_order as o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
left join lpk_store as s on o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
left join lpk_bank as d on d.sid =s.bankSid |
||||
|
left join lpk_goods e on e.sid= t.goodsSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="orderListByBank" resultType="com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderVo"> |
||||
|
select |
||||
|
o.sid, |
||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
s.`name` as store, |
||||
|
s.sid as storeSid, |
||||
|
d.name as bankName, |
||||
|
t.goodsSid as goodsSid, |
||||
|
sum(t.goodsNumber) as goodsNumber, |
||||
|
s.linker, |
||||
|
s.phone as linkPhone, |
||||
|
s.address, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
when 2 then '亲情卡' |
||||
|
when 3 then '企业卡' |
||||
|
end cardType, |
||||
|
e.`name` as goodsName |
||||
|
from lpk_reserve_order as o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
left join lpk_store as s on o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
left join lpk_bank as d on d.sid =s.bankSid |
||||
|
left join lpk_goods e on e.sid= t.goodsSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="orderListByZ" resultType="com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderVo"> |
||||
|
SELECT |
||||
|
o.sid, |
||||
|
date_format( o.reserveDate, '%Y-%m-%d' ) AS reserveDate, |
||||
|
s.`name` AS store, |
||||
|
s.sid AS storeSid, |
||||
|
d.NAME AS bankName , |
||||
|
t.goodsSid as goodsSid, |
||||
|
sum(t.goodsNumber) as goodsNumber, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
when 2 then '亲情卡' |
||||
|
when 3 then '企业卡' |
||||
|
end cardType, |
||||
|
e.`name` as goodsName |
||||
|
FROM |
||||
|
lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
LEFT JOIN lpk_bank AS d ON d.sid = s.bankSid |
||||
|
LEFT JOIN lpk_goods e on e.sid =t.goodsSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="orderByCardSid" resultType="com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderCardVo"> |
||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
c.`code`, |
||||
|
s.`name` as store, |
||||
|
b.`name` as bagName, |
||||
|
o.sid as orderSid |
||||
|
FROM lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
WHERE o.cardSid = #{sid} |
||||
|
</select> |
||||
|
<!-- <select id="orderListByUserSid" resultType="com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderCardVo">--> |
||||
|
<!-- SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,--> |
||||
|
<!-- c.`code`,--> |
||||
|
<!-- case--> |
||||
|
<!-- when o.reserveDate IS NOT NULL then 1--> |
||||
|
<!-- end as type,--> |
||||
|
<!-- s.`name` as store,--> |
||||
|
<!-- b.`name` as bagName,--> |
||||
|
<!-- o.cardSid as cardSid,--> |
||||
|
<!-- o.sid as orderSid,--> |
||||
|
<!-- o.userName,--> |
||||
|
<!-- o.userPhone,c.serialNumber as serialNumber,--> |
||||
|
<!-- o.sid--> |
||||
|
<!-- FROM lpk_reserve_order AS o--> |
||||
|
<!-- LEFT JOIN lpk_store AS s ON o.storeSid = s.sid--> |
||||
|
<!-- LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid--> |
||||
|
<!-- LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid--> |
||||
|
<!-- <where>--> |
||||
|
<!-- ${ew.sqlSegment}--> |
||||
|
<!-- </where>--> |
||||
|
<!-- ORDER BY reserveDate DESC--> |
||||
|
<!-- </select>--> |
||||
|
<select id="orderListByUserSid" resultType="com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderCardVo"> |
||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
c.`code`, |
||||
|
o.cardType as type, |
||||
|
s.`name` as store, |
||||
|
case |
||||
|
when o.sid is not null then '家庭菜窖' |
||||
|
end as bagName, |
||||
|
o.cardSid as cardSid, |
||||
|
o.sid as orderSid, |
||||
|
o.userName, |
||||
|
o.userPhone,c.serialNumber as serialNumber, |
||||
|
o.sid |
||||
|
FROM lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
<where> |
||||
|
o.customerSid=#{userSid} and o.cardType='1' |
||||
|
</where> |
||||
|
union |
||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
c.`code`, |
||||
|
o.cardType as type, |
||||
|
s.`name` as store, |
||||
|
case |
||||
|
when o.sid is not null then '亲情菜窖' |
||||
|
end as bagName, |
||||
|
o.cardSid as cardSid, |
||||
|
o.sid as orderSid, |
||||
|
o.userName, |
||||
|
o.userPhone,c.serialNumber as serialNumber, |
||||
|
o.sid |
||||
|
FROM lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN emp_card_gift AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.sid = b.sid |
||||
|
<where> |
||||
|
o.customerSid=#{userSid} and o.cardType='2' |
||||
|
</where> |
||||
|
union |
||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
c.`code`, |
||||
|
o.cardType as type, |
||||
|
s.`name` as store, |
||||
|
case |
||||
|
when o.sid is not null then '企业菜窖' |
||||
|
end as bagName, |
||||
|
o.cardSid as cardSid, |
||||
|
o.sid as orderSid, |
||||
|
o.userName, |
||||
|
o.userPhone,c.serialNumber as serialNumber, |
||||
|
o.sid |
||||
|
FROM lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN emp_card AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
<where> |
||||
|
o.customerSid=#{userSid} and o.cardType='3' |
||||
|
</where> |
||||
|
ORDER BY reserveDate DESC |
||||
|
</select> |
||||
|
<select id="exportExcel" resultType="com.yxt.yythmall.api.lpkreserveorder.ReserveOrderExport"> |
||||
|
select |
||||
|
o.sid, |
||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
o.userName, |
||||
|
o.userPhone, |
||||
|
d.sid as dsid, |
||||
|
s.sid as ssid, |
||||
|
s.`name` as store, |
||||
|
b.`name` as bagName, |
||||
|
d.name as bankName, |
||||
|
c.`code`,c.serialNumber, |
||||
|
t.goodsSid as goodsSid, |
||||
|
t.goodsNumber as goodsNumber, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
end cardType |
||||
|
from lpk_reserve_order as o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
left join lpk_store as s on o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
left join lpk_bank as d on d.sid =s.bankSid |
||||
|
<where> |
||||
|
o.cardType='1' |
||||
|
<if test="qw.bankSid !='' and qw.bankSid!=null"> |
||||
|
and s.bankSid=#{qw.bankSid} |
||||
|
</if> |
||||
|
<if test="qw.store !='' and qw.store!=null"> |
||||
|
and s.name=#{qw.store} |
||||
|
</if> |
||||
|
<if test="qw.startDate !='' and qw.startDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
<if test="qw.endDate !='' and qw.endDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d') <= date_format(#{qw.endDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
</where> |
||||
|
union |
||||
|
select |
||||
|
o.sid, |
||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
o.userName, |
||||
|
o.userPhone, |
||||
|
d.sid as dsid, |
||||
|
s.sid as ssid, |
||||
|
s.`name` as store, |
||||
|
b.`name` as bagName, |
||||
|
d.name as bankName, |
||||
|
c.`code`,c.serialNumber, |
||||
|
t.goodsSid as goodsSid, |
||||
|
t.goodsNumber as goodsNumber, |
||||
|
case o.cardType |
||||
|
when 2 then '亲情卡' |
||||
|
end cardType |
||||
|
from lpk_reserve_order as o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
left join lpk_store as s on o.storeSid = s.sid |
||||
|
LEFT JOIN emp_card_gift AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.sid = b.sid |
||||
|
left join lpk_bank as d on d.sid =s.bankSid |
||||
|
<where> |
||||
|
o.cardType='2' |
||||
|
<if test="qw.bankSid !='' and qw.bankSid!=null"> |
||||
|
and s.bankSid=#{qw.bankSid} |
||||
|
</if> |
||||
|
<if test="qw.store !='' and qw.store!=null"> |
||||
|
and s.name=#{qw.store} |
||||
|
</if> |
||||
|
<if test="qw.startDate !='' and qw.startDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d')>=date_format(#{qw.startDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
<if test="qw.endDate !='' and qw.endDate!=null"> |
||||
|
and date_format(o.reserveDate,'%Y-%m-%d') <= date_format(#{qw.endDate},'%Y-%m-%d') |
||||
|
</if> |
||||
|
</where> |
||||
|
union |
||||
|
SELECT |
||||
|
o.sid, |
||||
|
date_format( o.reserveDate, '%Y-%m-%d' ) AS reserveDate, |
||||
|
o.userName, |
||||
|
o.userPhone, |
||||
|
s.`name` AS store, |
||||
|
b.`name` AS bagName, |
||||
|
d.NAME AS bankName, |
||||
|
c.`code`, |
||||
|
d.sid as dsid, |
||||
|
s.sid as ssid, |
||||
|
c.serialNumber, |
||||
|
case o.cardType |
||||
|
when 3 then '企业卡' |
||||
|
end cardType |
||||
|
FROM |
||||
|
lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN emp_card AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
LEFT JOIN lpk_bank AS d ON d.sid = s.bankSid |
||||
|
WHERE o.cardType='3' |
||||
|
order by reserveDate asc,dsid desc,ssid desc,serialNumber asc |
||||
|
</select> |
||||
|
<select id="exportExcelByStore" resultType="com.yxt.yythmall.api.lpkreserveorder.ReserveOrderExportByStore"> |
||||
|
select |
||||
|
o.sid, |
||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
s.`name` as store, |
||||
|
s.sid as storeSid, |
||||
|
d.name as bankName, |
||||
|
t.goodsSid as goodsSid, |
||||
|
sum(t.goodsNumber) as goodsNumber, |
||||
|
d.linker, |
||||
|
d.linkPhone, |
||||
|
d.address, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
when 2 then '亲情卡' |
||||
|
when 3 then '企业卡' |
||||
|
end cardType, |
||||
|
e.name as goodsName |
||||
|
from lpk_reserve_order as o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
left join lpk_store as s on o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
left join lpk_bank as d on d.sid =s.bankSid |
||||
|
left join lpk_goods e on e.sid= t.goodsSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="exportExcelByBank" resultType="com.yxt.yythmall.api.lpkreserveorder.ReserveOrderExportByBank"> |
||||
|
select |
||||
|
o.sid, |
||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate, |
||||
|
s.`name` as store, |
||||
|
s.sid as storeSid, |
||||
|
d.name as bankName, |
||||
|
t.goodsSid as goodsSid, |
||||
|
sum(t.goodsNumber) as goodsNumber, |
||||
|
s.linker, |
||||
|
s.phone as linkPhone, |
||||
|
s.address, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
when 2 then '亲情卡' |
||||
|
when 3 then '企业卡' |
||||
|
end cardType, |
||||
|
e.name as goodsName |
||||
|
from lpk_reserve_order as o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
left join lpk_store as s on o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
left join lpk_bank as d on d.sid =s.bankSid |
||||
|
left join lpk_goods e on e.sid= t.goodsSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="exportExcelByZ" resultType="com.yxt.yythmall.api.lpkreserveorder.ReserveOrderExportByZ"> |
||||
|
SELECT |
||||
|
o.sid, |
||||
|
date_format( o.reserveDate, '%Y-%m-%d' ) AS reserveDate, |
||||
|
s.`name` AS store, |
||||
|
s.sid AS storeSid, |
||||
|
d.NAME AS bankName , |
||||
|
t.goodsSid as goodsSid, |
||||
|
sum(t.goodsNumber) as goodsNumber, |
||||
|
case o.cardType |
||||
|
when 1 then '家庭卡' |
||||
|
when 2 then '亲情卡' |
||||
|
when 3 then '企业卡' |
||||
|
end cardType, |
||||
|
e.name as goodsName |
||||
|
FROM |
||||
|
lpk_reserve_order AS o |
||||
|
LEFT JOIN lpk_reserve_order_goods AS t ON t.orderSid = o.sid |
||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid |
||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid |
||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid |
||||
|
LEFT JOIN lpk_bank AS d ON d.sid = s.bankSid |
||||
|
left join lpk_goods e on e.sid= t.goodsSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,90 @@ |
|||||
|
package com.yxt.yythmall.biz.vegecallerreserveorder; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderDto; |
||||
|
import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderQuery; |
||||
|
import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:35 |
||||
|
*/ |
||||
|
@Api(tags = "预约订单信息") |
||||
|
@RestController |
||||
|
@RequestMapping("/lpksreservoorders") |
||||
|
public class VegeCellarReserveOrderRest { |
||||
|
@Autowired |
||||
|
VegeCellarReserveOrderService vegeCellarReserveOrderService; |
||||
|
//
|
||||
|
//
|
||||
|
@ApiOperation("预约提交") |
||||
|
@PostMapping("/submission") |
||||
|
public ResultBean submission(@RequestBody VegeCellarReserveOrderDto dto) { |
||||
|
return vegeCellarReserveOrderService.submission(dto); |
||||
|
} |
||||
|
//
|
||||
|
// @ApiOperation("订单列表")
|
||||
|
// @PostMapping("/orderList")
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderList(@RequestBody PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// return vegeCellarReserveOrderService.orderList(pq);
|
||||
|
// }
|
||||
|
// @ApiOperation("订单门店汇总列表")
|
||||
|
// @PostMapping("/orderListByStore")
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderListByStore(@RequestBody PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// return vegeCellarReserveOrderService.orderListByStore(pq);
|
||||
|
// }
|
||||
|
// @ApiOperation("订单门店支行汇总列表")
|
||||
|
// @PostMapping("/orderListByBank")
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderListByBank(@RequestBody PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// return vegeCellarReserveOrderService.orderListByBank(pq);
|
||||
|
// }
|
||||
|
// @ApiOperation("订单总汇总列表")
|
||||
|
// @PostMapping("/orderListByZ")
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderListByZ(@RequestBody PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// return vegeCellarReserveOrderService.orderListByZ(pq);
|
||||
|
// }
|
||||
|
// @ApiOperation("根据提货卡查询预约记录")
|
||||
|
// @GetMapping("/orderByCardSid/{sid}")
|
||||
|
// public ResultBean orderByCardSid(@PathVariable("sid") String sid) {
|
||||
|
// return vegeCellarReserveOrderService.orderByCardSid(sid);
|
||||
|
// }
|
||||
|
//
|
||||
|
// @ApiOperation("移动端预约订单列表")
|
||||
|
// @PostMapping("/orderListByUserSid")
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderListByUserSid(@RequestBody PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// return vegeCellarReserveOrderService.orderListByUserSid(pq);
|
||||
|
// }
|
||||
|
//
|
||||
|
// @ApiOperation("预约记录详情")
|
||||
|
// @GetMapping("/orderDetails/{orderSid}")
|
||||
|
// public ResultBean orderDetails(@PathVariable("orderSid") String orderSid) {
|
||||
|
// return vegeCellarReserveOrderService.orderDetails(orderSid);
|
||||
|
// }
|
||||
|
//
|
||||
|
// @ApiOperation(value = "预约订单信息列表导出")
|
||||
|
// @PostMapping("/exportExcel")
|
||||
|
// public void exportExcel(@RequestBody VegeCellarReserveOrderQuery query) {
|
||||
|
// vegeCellarReserveOrderService.exportExcel(query);
|
||||
|
// }
|
||||
|
// @ApiOperation(value = "预约订单门店汇总导出")
|
||||
|
// @PostMapping("/exportExcelByStore")
|
||||
|
// public void exportExcelByStore(@RequestBody VegeCellarReserveOrderQuery query) {
|
||||
|
// vegeCellarReserveOrderService.exportExcelByStore(query);
|
||||
|
// }
|
||||
|
// @ApiOperation(value = "预约订单支行汇总导出")
|
||||
|
// @PostMapping("/exportExcelByBank")
|
||||
|
// public void exportExcelByBank(@RequestBody VegeCellarReserveOrderQuery query) {
|
||||
|
// vegeCellarReserveOrderService.exportExcelByBank(query);
|
||||
|
// }
|
||||
|
// @ApiOperation(value = "预约订单总汇总导出")
|
||||
|
// @PostMapping("/exportExcelByZ")
|
||||
|
// public void exportExcelByZ(@RequestBody VegeCellarReserveOrderQuery query) {
|
||||
|
// vegeCellarReserveOrderService.exportExcelByZ(query);
|
||||
|
// }
|
||||
|
} |
@ -0,0 +1,666 @@ |
|||||
|
package com.yxt.yythmall.biz.vegecallerreserveorder; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.date.DateTime; |
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
||||
|
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.common.base.config.component.FileUploadComponent; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.base.utils.StringUtils; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.yythmall.api.lpkgiftbaggoods.LpkGiftBagGoodsVo; |
||||
|
import com.yxt.yythmall.api.lpkgiftcard.AppletVo; |
||||
|
import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; |
||||
|
import com.yxt.yythmall.api.lpkgoods.LpkGoods; |
||||
|
import com.yxt.yythmall.api.lpkstore.LpkStore; |
||||
|
import com.yxt.yythmall.api.lpkstore.StoreSelect; |
||||
|
import com.yxt.yythmall.api.vegecallerreserveorder.*; |
||||
|
import com.yxt.yythmall.biz.lpkgiftbaggoods.LpkGiftBagGoodsService; |
||||
|
import com.yxt.yythmall.biz.lpkgiftcard.LpkGiftCardMapper; |
||||
|
import com.yxt.yythmall.biz.lpkgoods.LpkGoodsService; |
||||
|
import com.yxt.yythmall.biz.lpkstore.LpkStoreService; |
||||
|
import com.yxt.yythmall.biz.vegecallerreservedetail.VegeCellarReserveDetailsService; |
||||
|
import com.yxt.yythmall.utils.StyleUtils; |
||||
|
import org.apache.poi.ss.usermodel.HorizontalAlignment; |
||||
|
import org.junit.Test; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.servlet.ServletOutputStream; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.BufferedOutputStream; |
||||
|
import java.io.IOException; |
||||
|
import java.text.ParseException; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/11/23 10:36 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class VegeCellarReserveOrderService extends MybatisBaseService<VegeCellarReserveOrderMapper, VegeCellarReserveOrder> { |
||||
|
@Autowired |
||||
|
VegeCellarReserveDetailsService vegeCellarReserveDetailsService; |
||||
|
// @Autowired
|
||||
|
// LpkGiftCardMapper lpkGiftCardMapper;
|
||||
|
// @Autowired
|
||||
|
// LpkGiftBagGoodsService lpkGiftBagGoodsService;
|
||||
|
// @Autowired
|
||||
|
// LpkStoreService lpkStoreService;
|
||||
|
// @Autowired
|
||||
|
// private FileUploadComponent fileUploadComponent;
|
||||
|
// @Autowired
|
||||
|
// private LpkGoodsService lpkGoodsService;
|
||||
|
// @Autowired
|
||||
|
// private HttpServletResponse response;
|
||||
|
//
|
||||
|
public ResultBean submission(VegeCellarReserveOrderDto dto) { |
||||
|
ResultBean rb = new ResultBean().fail(); |
||||
|
boolean b=isSatAndSun(dto.getReserveDate()); |
||||
|
if(!b){ |
||||
|
return rb.setMsg("周六、周日不能预约提货"); |
||||
|
} |
||||
|
VegeCellarReserveOrder order = new VegeCellarReserveOrder(); |
||||
|
BeanUtil.copyProperties(dto, order, "id", "sid"); |
||||
|
order.setStoreSid(dto.getStoreSid()); |
||||
|
// order.setCardSid(dto.getSid());
|
||||
|
order.setCreateTime(new DateTime()); |
||||
|
baseMapper.insert(order); |
||||
|
dto.setOrderSid(order.getSid()); |
||||
|
vegeCellarReserveDetailsService.submissionDetail(dto); |
||||
|
return rb.success().setData("预约成功"); |
||||
|
} |
||||
|
public boolean isSatAndSun(String date){ |
||||
|
DateTime dateTime = DateUtil.parse(date);; // 获取当前时间
|
||||
|
int dayOfWeek = dateTime.dayOfWeekEnum().getValue();// 获取星期几(1-7)
|
||||
|
System.out.println(dayOfWeek); |
||||
|
if (dayOfWeek == 1 || dayOfWeek == 7) { |
||||
|
return false; |
||||
|
} else { |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
// @Test
|
||||
|
// public void isSatAndSun(){
|
||||
|
// String date="2023-12-11";
|
||||
|
// DateTime dateTime = DateUtil.parse(date);; // 获取当前时间
|
||||
|
// int dayOfWeek = dateTime.dayOfWeekEnum().getValue();// 获取星期几(1-7)
|
||||
|
//
|
||||
|
// System.out.println(dayOfWeek);
|
||||
|
// if (dayOfWeek == 1 || dayOfWeek == 7) {
|
||||
|
// System.out.println(dayOfWeek);
|
||||
|
// } else {
|
||||
|
// System.out.println(11111);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderList(PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// ResultBean rb = ResultBean.fireFail();
|
||||
|
// VegeCellarReserveOrderQuery query = pq.getParams();
|
||||
|
// IPage<VegeCellarReserveOrder> page = PagerUtil.queryToPage(pq);
|
||||
|
// IPage<VegeCellarReserveOrderVo> pagging = baseMapper.orderList(page, query);
|
||||
|
// List<VegeCellarReserveOrderVo> records = pagging.getRecords();
|
||||
|
// if (!records.isEmpty()) {
|
||||
|
// records.forEach(s -> {
|
||||
|
// List<VegeCellarReserveOrderGoods> orderGoods = VegeCellarReserveOrderGoodsService.selByOrderSid(s.getSid());
|
||||
|
// List<OrderGoodsVo> goodsVoList = new ArrayList<>();
|
||||
|
// if (!orderGoods.isEmpty()) {
|
||||
|
// for (VegeCellarReserveOrderGoods orderGood : orderGoods) {
|
||||
|
// OrderGoodsVo goodsVo = new OrderGoodsVo();
|
||||
|
// if (StringUtils.isNotBlank(orderGood.getGoodsSid())) {
|
||||
|
// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(orderGood.getGoodsSid());
|
||||
|
// if (null != lpkGoods) {
|
||||
|
// goodsVo.setGoodName(lpkGoods.getName());
|
||||
|
// }
|
||||
|
// }
|
||||
|
// if (orderGood.getGoodsNumber() != 0) {
|
||||
|
// goodsVo.setNum((int) orderGood.getGoodsNumber());
|
||||
|
// }
|
||||
|
// goodsVoList.add(goodsVo);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// s.setGoodsVo(goodsVoList);
|
||||
|
// });
|
||||
|
// }
|
||||
|
// PagerVo<VegeCellarReserveOrderVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
// return rb.success().setData(p);
|
||||
|
// }
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderListByStore(PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// ResultBean rb = ResultBean.fireFail();
|
||||
|
// VegeCellarReserveOrderQuery query = pq.getParams();
|
||||
|
// QueryWrapper<VegeCellarReserveOrder> qw = new QueryWrapper<>();
|
||||
|
// qw.eq("1", "1");
|
||||
|
// if (StringUtils.isNotBlank(query.getStore())) {
|
||||
|
// qw.like("s.name", query.getStore());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankName())) {
|
||||
|
// qw.like("d.name", query.getBankName());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankSid())) {
|
||||
|
// qw.eq("s.bankSid", query.getBankSid());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getStartDate())) {
|
||||
|
//
|
||||
|
// String startDate = query.getStartDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(startDate), "date_format (o.reserveDate,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getEndDate())) {
|
||||
|
// String endDate = query.getEndDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(endDate), "date_format (o.reserveDate,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
//
|
||||
|
// qw.orderByAsc("o.reserveDate");
|
||||
|
// qw.orderByDesc("d.sid");
|
||||
|
// qw.orderByDesc("s.sid");
|
||||
|
// qw.groupBy("o.cardType");
|
||||
|
// qw.groupBy("o.reserveDate");
|
||||
|
// qw.groupBy("t.goodsSid");
|
||||
|
// qw.groupBy("s.name");
|
||||
|
// IPage<VegeCellarReserveOrder> page = PagerUtil.queryToPage(pq);
|
||||
|
// IPage<VegeCellarReserveOrderVo> pagging = baseMapper.orderListByStore(page, qw);
|
||||
|
//// List<VegeCellarReserveOrderVo> records = pagging.getRecords();
|
||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
//// if (!records.isEmpty()) {
|
||||
|
//// records.forEach(s -> {
|
||||
|
//// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid());
|
||||
|
//// s.setGoodsName(lpkGoods.getName());
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
// PagerVo<VegeCellarReserveOrderVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
// return rb.success().setData(p);
|
||||
|
// }
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderListByBank(PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// ResultBean rb = ResultBean.fireFail();
|
||||
|
// VegeCellarReserveOrderQuery query = pq.getParams();
|
||||
|
// QueryWrapper<VegeCellarReserveOrder> qw = new QueryWrapper<>();
|
||||
|
// qw.eq("1", "1");
|
||||
|
//
|
||||
|
// if (StringUtils.isNotBlank(query.getStartDate())) {
|
||||
|
//
|
||||
|
// String startDate = query.getStartDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(startDate), "date_format (o.reserveDate,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getEndDate())) {
|
||||
|
// String endDate = query.getEndDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(endDate), "date_format (o.reserveDate,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankSid())) {
|
||||
|
// qw.eq("s.bankSid", query.getBankSid());
|
||||
|
// }
|
||||
|
//
|
||||
|
// qw.groupBy("d.sid");
|
||||
|
// qw.groupBy("t.goodsSid");
|
||||
|
// qw.groupBy("o.reserveDate");
|
||||
|
// qw.groupBy("o.cardType");
|
||||
|
// qw.orderByAsc("o.reserveDate");
|
||||
|
// qw.orderByDesc("d.sid");
|
||||
|
// qw.orderByDesc("s.sid");
|
||||
|
//// qw.groupBy("s.name");
|
||||
|
// IPage<VegeCellarReserveOrder> page = PagerUtil.queryToPage(pq);
|
||||
|
// IPage<VegeCellarReserveOrderVo> pagging = baseMapper.orderListByBank(page, qw);
|
||||
|
// List<VegeCellarReserveOrderVo> records = pagging.getRecords();
|
||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
//
|
||||
|
//// if (!records.isEmpty()) {
|
||||
|
//// records.forEach(s -> {
|
||||
|
//// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid());
|
||||
|
//// s.setGoodsName(lpkGoods.getName());
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
// PagerVo<VegeCellarReserveOrderVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
// return rb.success().setData(p);
|
||||
|
// }
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderVo>> orderListByZ(PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// ResultBean rb = ResultBean.fireFail();
|
||||
|
// VegeCellarReserveOrderQuery query = pq.getParams();
|
||||
|
// QueryWrapper<VegeCellarReserveOrder> qw = new QueryWrapper<>();
|
||||
|
// qw.eq("1", "1");
|
||||
|
// if (StringUtils.isNotBlank(query.getStore())) {
|
||||
|
// qw.like("s.name", query.getStore());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getUserName())) {
|
||||
|
// qw.like("o.userName", query.getUserName());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getUserSid())) {
|
||||
|
// qw.like("o.customerSid", query.getUserSid());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getStartDate())) {
|
||||
|
//
|
||||
|
// String startDate = query.getStartDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(startDate), "date_format (o.reserveDate,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getEndDate())) {
|
||||
|
// String endDate = query.getEndDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(endDate), "date_format (o.reserveDate,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankSid())) {
|
||||
|
// qw.eq("s.bankSid", query.getBankSid());
|
||||
|
// }
|
||||
|
// qw.orderByAsc("o.reserveDate");
|
||||
|
// qw.groupBy("t.goodsSid");
|
||||
|
// qw.groupBy("o.reserveDate");
|
||||
|
// qw.groupBy("o.cardType");
|
||||
|
//// qw.groupBy("s.name");
|
||||
|
// IPage<VegeCellarReserveOrder> page = PagerUtil.queryToPage(pq);
|
||||
|
// IPage<VegeCellarReserveOrderVo> pagging = baseMapper.orderListByZ(page, qw);
|
||||
|
// List<VegeCellarReserveOrderVo> records = pagging.getRecords();
|
||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
//// if (!records.isEmpty()) {
|
||||
|
//// records.forEach(s -> {
|
||||
|
//// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid());
|
||||
|
//// s.setGoodsName(lpkGoods.getName());
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
// PagerVo<VegeCellarReserveOrderVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
// return rb.success().setData(p);
|
||||
|
// }
|
||||
|
// public ResultBean orderByCardSid(String sid) {
|
||||
|
// ResultBean rb = ResultBean.fireFail();
|
||||
|
// List<VegeCellarReserveOrderCardVo> list = baseMapper.orderByCardSid(sid);
|
||||
|
// return rb.success().setData(list);
|
||||
|
// }
|
||||
|
//
|
||||
|
// public ResultBean<PagerVo<VegeCellarReserveOrderCardVo>> orderListByUserSid(PagerQuery<VegeCellarReserveOrderQuery> pq) {
|
||||
|
// ResultBean rb = ResultBean.fireFail();
|
||||
|
// VegeCellarReserveOrderQuery query = pq.getParams();
|
||||
|
// QueryWrapper<VegeCellarReserveOrder> qw = new QueryWrapper<>();
|
||||
|
// if(StringUtils.isBlank(query.getUserSid())){
|
||||
|
// return rb.setMsg("参数不全");
|
||||
|
// }
|
||||
|
// qw.eq("o.customerSid", query.getUserSid());
|
||||
|
// qw.eq("o.cardType","1");
|
||||
|
//// qw.orderByDesc("reserveDate");
|
||||
|
// IPage<VegeCellarReserveOrder> page = PagerUtil.queryToPage(pq);
|
||||
|
// IPage<VegeCellarReserveOrderCardVo> pagging = baseMapper.orderListByUserSid(page, query.getUserSid());
|
||||
|
// for(VegeCellarReserveOrderCardVo vo:pagging.getRecords()){
|
||||
|
// List<VegeCellarReserveOrderGoods> goods =VegeCellarReserveOrderGoodsService.selByOrderSids(vo.getSid());
|
||||
|
// for(VegeCellarReserveOrderGoods goods1:goods){
|
||||
|
// LpkGoods lpkGoods=lpkGoodsService.getOne(new QueryWrapper<LpkGoods>().eq("sid",goods1.getGoodsSid()));
|
||||
|
// if(StringUtils.isBlank(vo.getGoods())){
|
||||
|
// vo.setGoods(lpkGoods.getName()+":"+goods1.getNum()+lpkGoods.getUnitName());
|
||||
|
// }else{
|
||||
|
// vo.setGoods(vo.getGoods()+" "+lpkGoods.getName()+":"+goods1.getNum()+lpkGoods.getUnitName());
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// PagerVo<VegeCellarReserveOrderCardVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
// return rb.success().setData(p);
|
||||
|
// }
|
||||
|
//
|
||||
|
// public ResultBean orderDetails(String orderSid) {
|
||||
|
// ResultBean rb = new ResultBean().fail();
|
||||
|
// VegeCellarReserveOrder VegeCellarReserveOrder = fetchBySid(orderSid);
|
||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
// if (null != VegeCellarReserveOrder) {
|
||||
|
// AppletVo vo = lpkGiftCardMapper.getGifCardBySid(VegeCellarReserveOrder.getCardSid());
|
||||
|
// if (StringUtils.isNotBlank(VegeCellarReserveOrder.getStoreSid())) {
|
||||
|
// LpkStore lpkStore = lpkStoreService.fetchBySid(VegeCellarReserveOrder.getStoreSid());
|
||||
|
// if (null != lpkStore) {
|
||||
|
// if (StringUtils.isNotBlank(lpkStore.getName())) {
|
||||
|
// vo.setStore(lpkStore.getName());
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(VegeCellarReserveOrder.getReserveDate())) {
|
||||
|
// try {
|
||||
|
// Date parse = sdf.parse(VegeCellarReserveOrder.getReserveDate());
|
||||
|
// vo.setReserveDate(sdf.format(parse));
|
||||
|
// } catch (ParseException e) {
|
||||
|
// e.printStackTrace();
|
||||
|
// }
|
||||
|
// }
|
||||
|
// List<LpkGiftBagGoodsVo> list = lpkGiftBagGoodsService.getGoodsByBagSid(vo.getGiftbagSid());
|
||||
|
// List<StoreSelect> l = lpkStoreService.getAllStore().getData();
|
||||
|
// List<GoodsVo> goodsVos = new ArrayList<>();
|
||||
|
// list.forEach(s -> {
|
||||
|
// VegeCellarReserveOrderGoods goods = VegeCellarReserveOrderGoodsService.getReserveByCardSid(vo.getSid(), s.getGoodsSid()).getData();
|
||||
|
// VegeCellarReserveOrderGoods orderGoods = VegeCellarReserveOrderGoodsService.selByOrderSidAndGoodSid(orderSid, s.getGoodsSid());
|
||||
|
// GoodsVo goodsVo = new GoodsVo();
|
||||
|
// goodsVo.setGoods(s.getGoodsName());
|
||||
|
// goodsVo.setNum(s.getGoodsNumber());
|
||||
|
// goodsVo.setGoodsSid(s.getGoodsSid());
|
||||
|
// goodsVo.setPic(fileUploadComponent.getUrlPrefix() + s.getPicUrl());
|
||||
|
// if (null != goods) {
|
||||
|
// if (goods.getGoodsNumber() != s.getGoodsNumber()) {
|
||||
|
// goodsVo.setLNum(s.getGoodsNumber() - goods.getGoodsNumber());
|
||||
|
// goodsVo.setSelect(s.getGoodsNumber() - goods.getGoodsNumber());
|
||||
|
// if (null != orderGoods) {
|
||||
|
// goodsVo.setOrderNum(orderGoods.getGoodsNumber());
|
||||
|
// }
|
||||
|
// goodsVos.add(goodsVo);
|
||||
|
// }
|
||||
|
// } else {
|
||||
|
// goodsVo.setLNum(s.getGoodsNumber());
|
||||
|
// goodsVo.setSelect(s.getGoodsNumber());
|
||||
|
// goodsVos.add(goodsVo);
|
||||
|
// }
|
||||
|
// });
|
||||
|
// vo.setGoodsVos(goodsVos);
|
||||
|
// vo.setSelect(l);
|
||||
|
// return rb.success().setData(vo);
|
||||
|
// }
|
||||
|
// return rb.success();
|
||||
|
// }
|
||||
|
//
|
||||
|
// public void exportExcel(VegeCellarReserveOrderQuery query) {
|
||||
|
// //得到所有要导出的数据
|
||||
|
// List<ReserveOrderExport> exportList = baseMapper.exportExcel(query);
|
||||
|
// List<ReserveOrderExport> exportList1 = new ArrayList<>();
|
||||
|
// if (!exportList.isEmpty()) {
|
||||
|
// exportList.forEach(s -> {
|
||||
|
// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid());
|
||||
|
// s.setGoodsName(lpkGoods.getName());
|
||||
|
//// if (StringUtils.isNotBlank(s.getUserPhone())) {
|
||||
|
////// String phone = s.getUserPhone().substring(0, 3) + "****" + s.getUserPhone().substring(7);
|
||||
|
//// String phone = s.getUserPhone();
|
||||
|
//// s.setUserPhone(phone);
|
||||
|
//// }
|
||||
|
//// List<VegeCellarReserveOrderGoods> orderGoods = VegeCellarReserveOrderGoodsService.selByOrderSid(s.getSid());
|
||||
|
//// if (!orderGoods.isEmpty()) {
|
||||
|
//// int i=0;
|
||||
|
//// for (VegeCellarReserveOrderGoods orderGood : orderGoods) {
|
||||
|
//// String num = "";
|
||||
|
//// String goodsName = "";
|
||||
|
//// String finWord = "";
|
||||
|
//// String unitName = "";
|
||||
|
//// if (StringUtils.isNotBlank(orderGood.getGoodsSid())) {
|
||||
|
//// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(orderGood.getGoodsSid());
|
||||
|
//// if (null != lpkGoods) {
|
||||
|
//// goodsName = lpkGoods.getName();
|
||||
|
//// if (StringUtils.isNotBlank(lpkGoods.getUnitName())) {
|
||||
|
//// unitName = lpkGoods.getUnitName();
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// if (orderGood.getGoodsNumber() != 0) {
|
||||
|
//// num = String.valueOf((int) orderGood.getGoodsNumber());
|
||||
|
//// }
|
||||
|
//// finWord = goodsName+num + unitName ;
|
||||
|
//// i++;
|
||||
|
//// if(i>1){
|
||||
|
//// ReserveOrderExport en=new ReserveOrderExport();
|
||||
|
//// BeanUtil.copyProperties(s,en , "id");
|
||||
|
//// en.setGoodsInfo(finWord);
|
||||
|
//// exportList1.add(en);
|
||||
|
//// }else{
|
||||
|
//// s.setGoodsInfo(finWord);
|
||||
|
//// exportList1.add(s);
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
// });
|
||||
|
// }
|
||||
|
// //定义导出的excel名字
|
||||
|
// //定义导出的excel名字
|
||||
|
// String excelName = "订单明细.xlsx";
|
||||
|
// String fileNameURL = "1";
|
||||
|
// response.setContentType( "application/vnd.ms-excel");
|
||||
|
// response.setCharacterEncoding("utf8");
|
||||
|
// response.setHeader("Content-disposition","attachment;filename="+ excelName );
|
||||
|
// ServletOutputStream outputStream = null;
|
||||
|
// try {
|
||||
|
// WriteCellStyle headWriteCellStyle = new WriteCellStyle();
|
||||
|
//
|
||||
|
// //设置头居中
|
||||
|
// headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
//
|
||||
|
// //内容策略
|
||||
|
// WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
|
||||
|
// //设置 水平居中
|
||||
|
// contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
//// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle,contentWriteCellStyle);
|
||||
|
// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(StyleUtils.getHeadStyle(), StyleUtils.getContentStyle());
|
||||
|
//
|
||||
|
// EasyExcel//将数据映射到DownloadDTO实体类并响应到浏览器
|
||||
|
// .write(new BufferedOutputStream(response.getOutputStream()), ReserveOrderExport.class)
|
||||
|
// //是否自动关闭输入流
|
||||
|
// .autoCloseStream(Boolean.TRUE)
|
||||
|
//// .registerWriteHandler(new MergeStrategy(exportList.size(),1,5))
|
||||
|
// .registerWriteHandler(horizontalCellStyleStrategy)
|
||||
|
// .sheet().doWrite(exportList);
|
||||
|
// } catch (IOException e) {
|
||||
|
// throw new RuntimeException(e);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// public void exportExcelByStore(VegeCellarReserveOrderQuery query) {
|
||||
|
// QueryWrapper<VegeCellarReserveOrderQuery> qw = new QueryWrapper<>();
|
||||
|
// qw.eq("1", "1");
|
||||
|
// if (StringUtils.isNotBlank(query.getStartDate())) {
|
||||
|
// String startDate = query.getStartDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(startDate), "date_format (o.reserveDate,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getEndDate())) {
|
||||
|
// String endDate = query.getEndDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(endDate), "date_format (o.reserveDate,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getStore())) {
|
||||
|
// qw.like("s.name", query.getStore());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankSid())) {
|
||||
|
// qw.eq("s.bankSid", query.getBankSid());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankName())) {
|
||||
|
// qw.like("s.name", query.getBankName());
|
||||
|
// }
|
||||
|
// qw.orderByAsc("o.reserveDate");
|
||||
|
// qw.orderByDesc("d.sid");
|
||||
|
// qw.orderByDesc("s.sid");
|
||||
|
// qw.groupBy("o.reserveDate");
|
||||
|
// qw.groupBy("t.goodsSid");
|
||||
|
// qw.groupBy("s.name");
|
||||
|
//// qw.orderByDesc("o.reserveDate");
|
||||
|
//// qw.groupBy("s.name");
|
||||
|
// //得到所有要导出的数据
|
||||
|
// List<ReserveOrderExportByStore> exportList = baseMapper.exportExcelByStore(qw);
|
||||
|
// List<ReserveOrderExportByStore> exportList1 = new ArrayList<>();
|
||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
//// if (!exportList.isEmpty()) {
|
||||
|
//// exportList.forEach(s -> {
|
||||
|
//// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid());
|
||||
|
//// s.setGoodsName(lpkGoods.getName());
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
// //定义导出的excel名字
|
||||
|
// String excelName = "配货信息.xlsx";
|
||||
|
// String fileNameURL = "1";
|
||||
|
// response.setContentType( "application/vnd.ms-excel");
|
||||
|
// response.setCharacterEncoding("utf8");
|
||||
|
// response.setHeader("Content-disposition","attachment;filename="+ excelName );
|
||||
|
// ServletOutputStream outputStream = null;
|
||||
|
// try {
|
||||
|
// WriteCellStyle headWriteCellStyle = new WriteCellStyle();
|
||||
|
//
|
||||
|
// //设置头居中
|
||||
|
// headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
//
|
||||
|
// //内容策略
|
||||
|
// WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
|
||||
|
// //设置 水平居中
|
||||
|
// contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
//// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle,contentWriteCellStyle);
|
||||
|
// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(StyleUtils.getHeadStyle(), StyleUtils.getContentStyle());
|
||||
|
//
|
||||
|
// EasyExcel//将数据映射到DownloadDTO实体类并响应到浏览器
|
||||
|
// .write(new BufferedOutputStream(response.getOutputStream()), ReserveOrderExportByStore.class)
|
||||
|
// //是否自动关闭输入流
|
||||
|
// .autoCloseStream(Boolean.TRUE)
|
||||
|
//// .registerWriteHandler(new MergeStrategy(exportList.size(),1,1))
|
||||
|
// .registerWriteHandler(horizontalCellStyleStrategy)
|
||||
|
// .sheet().doWrite(exportList);
|
||||
|
// } catch (IOException e) {
|
||||
|
// throw new RuntimeException(e);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// public void exportExcelByBank(VegeCellarReserveOrderQuery query) {
|
||||
|
// QueryWrapper<VegeCellarReserveOrderQuery> qw = new QueryWrapper<>();
|
||||
|
// qw.eq("1", "1");
|
||||
|
// if (StringUtils.isNotBlank(query.getStartDate())) {
|
||||
|
// String startDate = query.getStartDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(startDate), "date_format (o.reserveDate,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getEndDate())) {
|
||||
|
// String endDate = query.getEndDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(endDate), "date_format (o.reserveDate,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getStore())) {
|
||||
|
// qw.like("s.name", query.getStore());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankSid())) {
|
||||
|
// qw.eq("s.bankSid", query.getBankSid());
|
||||
|
// }
|
||||
|
// qw.orderByDesc("o.reserveDate");
|
||||
|
// qw.groupBy("d.sid");
|
||||
|
// qw.groupBy("t.goodsSid");
|
||||
|
// qw.groupBy("o.reserveDate");
|
||||
|
//// qw.groupBy("s.name");
|
||||
|
// //得到所有要导出的数据
|
||||
|
// List<ReserveOrderExportByBank> exportList = baseMapper.exportExcelByBank(qw);
|
||||
|
// List<ReserveOrderExportByBank> exportList1 = new ArrayList<>();
|
||||
|
//// if (!exportList.isEmpty()) {
|
||||
|
//// exportList.forEach(s -> {
|
||||
|
//// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid());
|
||||
|
//// s.setGoodsName(lpkGoods.getName());
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
// //定义导出的excel名字
|
||||
|
// String excelName = "支行汇总信息.xlsx";
|
||||
|
// String fileNameURL = "1";
|
||||
|
// response.setContentType( "application/vnd.ms-excel");
|
||||
|
// response.setCharacterEncoding("utf8");
|
||||
|
// response.setHeader("Content-disposition","attachment;filename="+ excelName );
|
||||
|
// ServletOutputStream outputStream = null;
|
||||
|
// try {
|
||||
|
// WriteCellStyle headWriteCellStyle = new WriteCellStyle();
|
||||
|
// //设置头居中
|
||||
|
// headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
// //内容策略
|
||||
|
// WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
|
||||
|
// //设置 水平居中
|
||||
|
// contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
//// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle,contentWriteCellStyle);
|
||||
|
// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(StyleUtils.getHeadStyle(), StyleUtils.getContentStyle());
|
||||
|
//
|
||||
|
// EasyExcel//将数据映射到DownloadDTO实体类并响应到浏览器
|
||||
|
// .write(new BufferedOutputStream(response.getOutputStream()), ReserveOrderExportByBank.class)
|
||||
|
// //是否自动关闭输入流
|
||||
|
// .autoCloseStream(Boolean.TRUE)
|
||||
|
//// .registerWriteHandler(new MergeStrategy(exportList.size(),1,5))
|
||||
|
// .registerWriteHandler(horizontalCellStyleStrategy)
|
||||
|
// .sheet().doWrite(exportList);
|
||||
|
// } catch (IOException e) {
|
||||
|
// throw new RuntimeException(e);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// public void exportExcelByZ(VegeCellarReserveOrderQuery query) {
|
||||
|
// QueryWrapper<VegeCellarReserveOrderQuery> qw = new QueryWrapper<>();
|
||||
|
// qw.eq("1", "1");
|
||||
|
// if (StringUtils.isNotBlank(query.getStartDate())) {
|
||||
|
// String startDate = query.getStartDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(startDate), "date_format (o.reserveDate,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getEndDate())) {
|
||||
|
// String endDate = query.getEndDate();
|
||||
|
// qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(endDate), "date_format (o.reserveDate,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')");
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getStore())) {
|
||||
|
// qw.like("s.name", query.getStore());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(query.getBankSid())) {
|
||||
|
// qw.eq("s.bankSid", query.getBankSid());
|
||||
|
// }
|
||||
|
// qw.orderByAsc("o.reserveDate");
|
||||
|
// qw.groupBy("t.goodsSid");
|
||||
|
// qw.groupBy("o.reserveDate");
|
||||
|
//// qw.groupBy("s.name");
|
||||
|
// //得到所有要导出的数据
|
||||
|
// List<ReserveOrderExportByZ> exportList = baseMapper.exportExcelByZ(qw);
|
||||
|
// List<ReserveOrderExportByZ> exportList1 = new ArrayList<>();
|
||||
|
//// if (!exportList.isEmpty()) {
|
||||
|
//// exportList.forEach(s -> {
|
||||
|
//// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(s.getGoodsSid());
|
||||
|
//// s.setGoodsName(lpkGoods.getName());
|
||||
|
////// List<String> list=baseMapper.getOrderByStore(s.getStoreSid(),s.getReserveDate());
|
||||
|
////// List<VegeCellarReserveOrderGoods> orderGoods = VegeCellarReserveOrderGoodsService.selInOrderSid(list);
|
||||
|
////// if (!orderGoods.isEmpty()) {
|
||||
|
////// int i=0;
|
||||
|
////// for (VegeCellarReserveOrderGoods orderGood : orderGoods) {
|
||||
|
////// String num = "";
|
||||
|
////// String goodsName = "";
|
||||
|
////// String finWord = "";
|
||||
|
////// String unitName = "";
|
||||
|
////// if (StringUtils.isNotBlank(orderGood.getGoodsSid())) {
|
||||
|
////// LpkGoods lpkGoods = lpkGoodsService.fetchBySid(orderGood.getGoodsSid());
|
||||
|
////// if (null != lpkGoods) {
|
||||
|
////// goodsName = lpkGoods.getName();
|
||||
|
////// if (StringUtils.isNotBlank(lpkGoods.getUnitName())) {
|
||||
|
////// unitName = lpkGoods.getUnitName();
|
||||
|
////// }
|
||||
|
////// }
|
||||
|
////// }
|
||||
|
////// if (orderGood.getGoodsNumber() != 0) {
|
||||
|
////// num = String.valueOf((int) orderGood.getGoodsNumber());
|
||||
|
////// }
|
||||
|
////// finWord = goodsName+ num + unitName;
|
||||
|
////// i++;
|
||||
|
////// if(i>1){
|
||||
|
////// ReserveOrderExportByBank en=new ReserveOrderExportByBank();
|
||||
|
////// BeanUtil.copyProperties(s,en , "id");
|
||||
|
////// en.setGoodsInfo(finWord);
|
||||
|
////// exportList1.add(en);
|
||||
|
////// }else{
|
||||
|
////// s.setGoodsInfo(finWord);
|
||||
|
////// exportList1.add(s);
|
||||
|
////// }
|
||||
|
////// }
|
||||
|
////// }
|
||||
|
//// });
|
||||
|
//// }
|
||||
|
// //定义导出的excel名字
|
||||
|
// String excelName = "支行汇总信息.xlsx";
|
||||
|
// String fileNameURL = "1";
|
||||
|
// response.setContentType( "application/vnd.ms-excel");
|
||||
|
// response.setCharacterEncoding("utf8");
|
||||
|
// response.setHeader("Content-disposition","attachment;filename="+ excelName );
|
||||
|
// ServletOutputStream outputStream = null;
|
||||
|
// try {
|
||||
|
// WriteCellStyle headWriteCellStyle = new WriteCellStyle();
|
||||
|
// //设置头居中
|
||||
|
// headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
// //内容策略
|
||||
|
// WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
|
||||
|
// //设置 水平居中
|
||||
|
// contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
//// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle,contentWriteCellStyle);
|
||||
|
// HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(StyleUtils.getHeadStyle(), StyleUtils.getContentStyle());
|
||||
|
//
|
||||
|
// EasyExcel//将数据映射到DownloadDTO实体类并响应到浏览器
|
||||
|
// .write(new BufferedOutputStream(response.getOutputStream()), ReserveOrderExportByZ.class)
|
||||
|
// //是否自动关闭输入流
|
||||
|
// .autoCloseStream(Boolean.TRUE)
|
||||
|
//// .registerWriteHandler(new MergeStrategy(exportList.size(),1,5))
|
||||
|
// .registerWriteHandler(horizontalCellStyleStrategy)
|
||||
|
// .sheet().doWrite(exportList);
|
||||
|
// } catch (IOException e) {
|
||||
|
// throw new RuntimeException(e);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// public ResultBean<VegeCellarReserveOrderVo> getStoreByCustomerSid(String sid) {
|
||||
|
// return new ResultBean().success().setData(baseMapper.getStoreByCustomerSid(sid));
|
||||
|
// }
|
||||
|
// public ResultBean<VegeCellarReserveOrderVo> selByCardSid(String sid) {
|
||||
|
// return new ResultBean().success().setData(baseMapper.selByCardSid(sid));
|
||||
|
// }
|
||||
|
// public ResultBean<List<VegeCellarReserveOrderCardVo>> selOrderByCardSid(String sid) {
|
||||
|
// return new ResultBean().success().setData(baseMapper.selOrderByCardSid(sid));
|
||||
|
// }
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue