71 changed files with 1650 additions and 303 deletions
@ -0,0 +1,51 @@ |
|||||
|
package cc.hiver.mall.bill.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.mall.bill.service.BillService; |
||||
|
import cc.hiver.mall.bill.vo.CustomerBillDataVo; |
||||
|
import cc.hiver.mall.bill.vo.CustomerBillQueryVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* 对账单 |
||||
|
* |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "盘点接口") |
||||
|
@RequestMapping("/hiver/app/bill/") |
||||
|
public class BillController { |
||||
|
|
||||
|
@Autowired |
||||
|
private BillService billService; |
||||
|
|
||||
|
/** |
||||
|
* 获取客户对账单 |
||||
|
* |
||||
|
* @param customerBillQueryVo |
||||
|
* @return Result |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@PostMapping("/getCustomerBill") |
||||
|
@ApiOperation("获取客户对账单") |
||||
|
public Result getCustomerBill(@RequestBody CustomerBillQueryVo customerBillQueryVo) { |
||||
|
try { |
||||
|
final CustomerBillDataVo customerBill = billService.getCustomerBill(customerBillQueryVo); |
||||
|
return new ResultUtil<>().setData(customerBill); |
||||
|
} catch (Exception e) { |
||||
|
log.error("获取客户对账单异常", e); |
||||
|
return ResultUtil.error("获取客户对账单异常"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package cc.hiver.mall.bill.service; |
||||
|
|
||||
|
import cc.hiver.mall.bill.vo.CustomerBillDataVo; |
||||
|
import cc.hiver.mall.bill.vo.CustomerBillQueryVo; |
||||
|
|
||||
|
public interface BillService { |
||||
|
|
||||
|
/** |
||||
|
* 获取客户对账单 |
||||
|
* |
||||
|
* @param customerBillQueryVo |
||||
|
* @return Result |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
CustomerBillDataVo getCustomerBill(CustomerBillQueryVo customerBillQueryVo); |
||||
|
} |
||||
@ -0,0 +1,210 @@ |
|||||
|
package cc.hiver.mall.bill.service.impl; |
||||
|
|
||||
|
import cc.hiver.mall.bill.service.BillService; |
||||
|
import cc.hiver.mall.bill.vo.*; |
||||
|
import cc.hiver.mall.entity.Customer; |
||||
|
import cc.hiver.mall.entity.ReturnDetail; |
||||
|
import cc.hiver.mall.entity.SaleDetail; |
||||
|
import cc.hiver.mall.service.mybatis.*; |
||||
|
import cc.hiver.mall.utils.DateUtil; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.*; |
||||
|
|
||||
|
@Service |
||||
|
public class BillServiceImpl implements BillService { |
||||
|
|
||||
|
@Autowired |
||||
|
private SaleService saleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerService customerService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SaleDetailService saleDetailService; |
||||
|
|
||||
|
@Autowired |
||||
|
private ReturnSaleService returnSaleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private ReturnDetailService returnDetailService; |
||||
|
|
||||
|
/** |
||||
|
* 获取客户对账单 |
||||
|
* |
||||
|
* @param customerBillQueryVo |
||||
|
* @return Result |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@Override |
||||
|
public CustomerBillDataVo getCustomerBill(CustomerBillQueryVo customerBillQueryVo) { |
||||
|
final CustomerBillDataVo customerBillDataVo = new CustomerBillDataVo(); |
||||
|
customerBillDataVo.setUserId(customerBillQueryVo.getCustomerId()); |
||||
|
// 获取客户信息
|
||||
|
final Customer customer = customerService.getById(customerBillQueryVo.getCustomerId()); |
||||
|
customerBillDataVo.setUserName(customer.getName()); |
||||
|
customerBillDataVo.setQueryDate(DateUtil.COMMON_FULL.getDateText(new Date())); |
||||
|
// 获取本期全部欠款及拿货总金额
|
||||
|
final ArrearsVo saleArrearsVo = saleService.getArrearsAndTotalSale(customerBillQueryVo); |
||||
|
if (saleArrearsVo != null) { |
||||
|
customerBillDataVo.setArrears(saleArrearsVo.getArrears()); |
||||
|
customerBillDataVo.setTotalSale(saleArrearsVo.getTotalSale()); |
||||
|
} |
||||
|
|
||||
|
// 获取退货总金额
|
||||
|
final ArrearsVo returnSaleArrearsVo = returnSaleService.getTotalReturn(customerBillQueryVo); |
||||
|
if (returnSaleArrearsVo != null) { |
||||
|
customerBillDataVo.setTotalReturn(returnSaleArrearsVo.getTotalReturn()); |
||||
|
} |
||||
|
// 获取退货总金额
|
||||
|
|
||||
|
// 根据客户id及日期范围分页查询订单
|
||||
|
final Page<CustomerBillSaleVo> salePage = saleService.getCustomerBill(customerBillQueryVo); |
||||
|
final List<CustomerBillSaleVo> records = salePage.getRecords(); |
||||
|
// 获取saleId,去查询销售单的商品明细,及退货单的商品明细
|
||||
|
final List<String> saleIdList = new ArrayList<>(); |
||||
|
for (int i = 0; i < records.size(); i++) { |
||||
|
saleIdList.add(records.get(i).getSaleId()); |
||||
|
// 根据时间升序查询的,这里获取第一个的初期欠款当做本次查询的初期欠款
|
||||
|
if (i == 0) { |
||||
|
final BigDecimal lastDebtAmount = records.get(0).getLastDebtAmount(); |
||||
|
customerBillDataVo.setInitialArrears(lastDebtAmount); |
||||
|
} |
||||
|
// 获取最后一个的剩余欠款当做本次查询的剩余欠款
|
||||
|
if (i == records.size() - 1) { |
||||
|
customerBillDataVo.setEndArrears(records.get(i).getBalanceDue()); |
||||
|
} |
||||
|
} |
||||
|
if (!saleIdList.isEmpty()) { |
||||
|
// 获取销售单明细
|
||||
|
final List<SaleDetail> saleDetailList = saleDetailService.getSaleDetails(saleIdList); |
||||
|
// 将销售明细封装到销售单对象中
|
||||
|
final Map<String, List<SaleDetail>> saleDetailMap = new HashMap<>(); |
||||
|
for (SaleDetail saleDetail : saleDetailList) { |
||||
|
final String saleId = saleDetail.getSaleId(); |
||||
|
if (saleDetailMap.containsKey(saleId)) { |
||||
|
final List<SaleDetail> saleDetailListOfMap = saleDetailMap.get(saleId); |
||||
|
saleDetailListOfMap.add(saleDetail); |
||||
|
} else { |
||||
|
final List<SaleDetail> saleDetailListOfMap = new ArrayList<>(); |
||||
|
saleDetailListOfMap.add(saleDetail); |
||||
|
saleDetailMap.put(saleId, saleDetailListOfMap); |
||||
|
} |
||||
|
} |
||||
|
// 获取退货单明细
|
||||
|
final List<ReturnDetail> returnDetails = returnDetailService.getReturnDetails(saleIdList); |
||||
|
final Map<String, List<ReturnDetail>> returnSaleDetailMap = new HashMap<>(); |
||||
|
for (ReturnDetail returnDetail : returnDetails) { |
||||
|
final String saleId = returnDetail.getSaleId(); |
||||
|
if (returnSaleDetailMap.containsKey(saleId)) { |
||||
|
final List<ReturnDetail> returnDetailListOfMap = returnSaleDetailMap.get(saleId); |
||||
|
returnDetailListOfMap.add(returnDetail); |
||||
|
} else { |
||||
|
final List<ReturnDetail> returnDetailListOfMap = new ArrayList<>(); |
||||
|
returnDetailListOfMap.add(returnDetail); |
||||
|
returnSaleDetailMap.put(saleId, returnDetailListOfMap); |
||||
|
} |
||||
|
} |
||||
|
// 开始封装数据
|
||||
|
for (CustomerBillSaleVo customerBillSaleVo : records) { |
||||
|
final String saleId = customerBillSaleVo.getSaleId(); |
||||
|
// 封装销售单信息
|
||||
|
final List<SaleDetail> saleDetails = saleDetailMap.get(saleId); |
||||
|
// 根据商品id分类
|
||||
|
final Map<String, List<SaleDetail>> saleDetailMapOfSale = new HashMap<>(); |
||||
|
if (saleDetails != null && !saleDetails.isEmpty()) { |
||||
|
for (SaleDetail saleDetail : saleDetails) { |
||||
|
final String productId = saleDetail.getProductId(); |
||||
|
if (saleDetailMapOfSale.containsKey(productId)) { |
||||
|
final List<SaleDetail> saleDetailListOfMap = saleDetailMapOfSale.get(productId); |
||||
|
saleDetailListOfMap.add(saleDetail); |
||||
|
} else { |
||||
|
final List<SaleDetail> saleDetailListOfMap = new ArrayList<>(); |
||||
|
saleDetailListOfMap.add(saleDetail); |
||||
|
saleDetailMapOfSale.put(productId, saleDetailListOfMap); |
||||
|
} |
||||
|
} |
||||
|
final List<BillProductDetailVo> billSaleDetailVos = new ArrayList<>(); |
||||
|
for (Map.Entry<String, List<SaleDetail>> stringListEntry : saleDetailMapOfSale.entrySet()) { |
||||
|
final List<SaleDetail> value = stringListEntry.getValue(); |
||||
|
final BillProductDetailVo billProductDetailVo = new BillProductDetailVo(); |
||||
|
// 同一款商品,不同规格,商品信息值几钱取第一个
|
||||
|
billProductDetailVo.setProductSn(value.get(0).getProductSn()); |
||||
|
billProductDetailVo.setProductName(value.get(0).getProductName()); |
||||
|
billProductDetailVo.setDiscountAmount(value.get(0).getDiscountAmount()); |
||||
|
int productCount = 0; |
||||
|
BigDecimal totalAmount = BigDecimal.ZERO; |
||||
|
final List<BillAttributeListVo> billAttributeListVos = new ArrayList<>(); |
||||
|
for (SaleDetail saleDetail : value) { |
||||
|
final BillAttributeListVo billAttributeListVo = new BillAttributeListVo(); |
||||
|
billAttributeListVo.setAttributeList(saleDetail.getAttributeList()); |
||||
|
billAttributeListVo.setProductCount(saleDetail.getProductCount()); |
||||
|
billAttributeListVos.add(billAttributeListVo); |
||||
|
// 计算数量
|
||||
|
productCount += saleDetail.getProductCount(); |
||||
|
// 计算总金额
|
||||
|
totalAmount = totalAmount.add(saleDetail.getDiscountAmount().multiply(BigDecimal.valueOf(saleDetail.getProductCount()))); |
||||
|
} |
||||
|
billProductDetailVo.setProductCount(productCount); |
||||
|
billProductDetailVo.setTotalAmount(totalAmount); |
||||
|
billProductDetailVo.setBillAttributeListVos(billAttributeListVos); |
||||
|
billSaleDetailVos.add(billProductDetailVo); |
||||
|
} |
||||
|
customerBillSaleVo.setBillSaleDetailVos(billSaleDetailVos); |
||||
|
} |
||||
|
|
||||
|
// 封装退货单信息
|
||||
|
final List<ReturnDetail> returnDetailsOfSale = returnSaleDetailMap.get(saleId); |
||||
|
if (returnDetailsOfSale != null && !returnDetailsOfSale.isEmpty()) { |
||||
|
// 根据商品id分类
|
||||
|
final Map<String, List<ReturnDetail>> returnSaleDetailMapOfSale = new HashMap<>(); |
||||
|
for (ReturnDetail returnDetail : returnDetailsOfSale) { |
||||
|
final String productId = returnDetail.getProductId(); |
||||
|
if (returnSaleDetailMapOfSale.containsKey(productId)) { |
||||
|
final List<ReturnDetail> returnSaleDetails = returnSaleDetailMapOfSale.get(productId); |
||||
|
returnSaleDetails.add(returnDetail); |
||||
|
} else { |
||||
|
final List<ReturnDetail> returnDetailListOfMap = new ArrayList<>(); |
||||
|
returnDetailListOfMap.add(returnDetail); |
||||
|
returnSaleDetailMapOfSale.put(productId, returnDetailListOfMap); |
||||
|
} |
||||
|
} |
||||
|
final List<BillProductDetailVo> billReturnSaleDetailVos = new ArrayList<>(); |
||||
|
for (Map.Entry<String, List<ReturnDetail>> stringListEntry : returnSaleDetailMapOfSale.entrySet()) { |
||||
|
final List<ReturnDetail> returnDetailList = stringListEntry.getValue(); |
||||
|
final BillProductDetailVo billProductDetailVo = new BillProductDetailVo(); |
||||
|
// 同一款商品,不同规格,商品信息值几钱取第一个
|
||||
|
billProductDetailVo.setProductSn(returnDetailList.get(0).getProductSn()); |
||||
|
billProductDetailVo.setProductName(returnDetailList.get(0).getProductName()); |
||||
|
billProductDetailVo.setDiscountAmount(returnDetailList.get(0).getDiscountAmount()); |
||||
|
int productCount = 0; |
||||
|
BigDecimal totalAmount = BigDecimal.ZERO; |
||||
|
final List<BillAttributeListVo> billAttributeListVos = new ArrayList<>(); |
||||
|
for (ReturnDetail saleDetail : returnDetailList) { |
||||
|
final BillAttributeListVo billAttributeListVo = new BillAttributeListVo(); |
||||
|
billAttributeListVo.setAttributeList(saleDetail.getAttributeList()); |
||||
|
billAttributeListVo.setProductCount(saleDetail.getProductCount()); |
||||
|
billAttributeListVos.add(billAttributeListVo); |
||||
|
// 计算数量
|
||||
|
productCount += saleDetail.getProductCount(); |
||||
|
// 计算总金额
|
||||
|
totalAmount = totalAmount.add(saleDetail.getDiscountAmount().multiply(BigDecimal.valueOf(saleDetail.getProductCount()))); |
||||
|
} |
||||
|
billProductDetailVo.setProductCount(productCount); |
||||
|
billProductDetailVo.setTotalAmount(totalAmount); |
||||
|
billProductDetailVo.setBillAttributeListVos(billAttributeListVos); |
||||
|
billReturnSaleDetailVos.add(billProductDetailVo); |
||||
|
} |
||||
|
customerBillSaleVo.setBillReturnSaleDetailVos(billReturnSaleDetailVos); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
customerBillDataVo.setCustomerBillSaleVos(records); |
||||
|
return customerBillDataVo; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
package cc.hiver.mall.bill.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
public class ArrearsVo { |
||||
|
@ApiModelProperty(value = "本期欠款金额") |
||||
|
private BigDecimal arrears; |
||||
|
|
||||
|
@ApiModelProperty(value = "拿货总金额") |
||||
|
private BigDecimal totalSale; |
||||
|
|
||||
|
@ApiModelProperty(value = "退货总金额") |
||||
|
private BigDecimal totalReturn; |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package cc.hiver.mall.bill.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 规格明细 |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BillAttributeListVo { |
||||
|
|
||||
|
@ApiModelProperty(value = "商品具体属性") |
||||
|
private String attributeList; |
||||
|
|
||||
|
@ApiModelProperty(value = "销售数量") |
||||
|
private Integer productCount; |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package cc.hiver.mall.bill.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 商品明细 |
||||
|
* |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BillProductDetailVo { |
||||
|
|
||||
|
@ApiModelProperty(value = "商品名称") |
||||
|
private String productName; |
||||
|
|
||||
|
@ApiModelProperty(value = "货号") |
||||
|
private String productSn; |
||||
|
|
||||
|
@ApiModelProperty(value = "销售数量") |
||||
|
private Integer productCount; |
||||
|
|
||||
|
@ApiModelProperty(value = "优惠金额") |
||||
|
private BigDecimal discountAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "总价") |
||||
|
private BigDecimal totalAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "同一件商品购买属性列表") |
||||
|
private List<BillAttributeListVo> billAttributeListVos; |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package cc.hiver.mall.bill.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 对账单信息 |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerBillDataVo { |
||||
|
|
||||
|
@ApiModelProperty(value = "客户id") |
||||
|
private String userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "客户名称") |
||||
|
private String userName; |
||||
|
|
||||
|
@ApiModelProperty(value = "对账单日期") |
||||
|
private String queryDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "初期欠款金额") |
||||
|
private BigDecimal initialArrears; |
||||
|
|
||||
|
@ApiModelProperty(value = "期末欠款金额") |
||||
|
private BigDecimal endArrears; |
||||
|
|
||||
|
@ApiModelProperty(value = "本期欠款金额") |
||||
|
private BigDecimal arrears; |
||||
|
|
||||
|
@ApiModelProperty(value = "拿货总金额") |
||||
|
private BigDecimal totalSale; |
||||
|
|
||||
|
@ApiModelProperty(value = "退货总金额") |
||||
|
private BigDecimal totalReturn; |
||||
|
|
||||
|
@ApiModelProperty(value = "销售单明细") |
||||
|
private List<CustomerBillSaleVo> customerBillSaleVos; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.mall.bill.vo; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBasePageQuery; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 对账单查询参数 |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerBillQueryVo extends HiverBasePageQuery { |
||||
|
|
||||
|
@ApiModelProperty(value = "客户id") |
||||
|
private String customerId; |
||||
|
|
||||
|
@ApiModelProperty(value = "开始时间") |
||||
|
private String startDate; |
||||
|
|
||||
|
@ApiModelProperty(value = "结束时间") |
||||
|
private String endDate; |
||||
|
} |
||||
@ -0,0 +1,64 @@ |
|||||
|
package cc.hiver.mall.bill.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 销售单明细 |
||||
|
* @author 王富康 |
||||
|
* @date 2024/6/26 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerBillSaleVo { |
||||
|
|
||||
|
@ApiModelProperty(value = "销售单号") |
||||
|
private String saleId; |
||||
|
|
||||
|
@ApiModelProperty(value = "操作人") |
||||
|
private String createByName; |
||||
|
|
||||
|
@ApiModelProperty(value = "日期") |
||||
|
private String createTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "订单金额(销售金额)") |
||||
|
private BigDecimal totalAmount; |
||||
|
|
||||
|
@ApiModelProperty(value="退款总金额") |
||||
|
private BigDecimal returnSaleTotalAmount; |
||||
|
|
||||
|
@ApiModelProperty(value="欠款抵扣金额") |
||||
|
private BigDecimal debtDeductionAmount; |
||||
|
|
||||
|
@ApiModelProperty(value="销售抵扣金额") |
||||
|
private BigDecimal saleDeductionAmount; |
||||
|
|
||||
|
@ApiModelProperty(value="余额抵扣金额") |
||||
|
private BigDecimal balanceDeductionAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "实收金额") |
||||
|
private BigDecimal realAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "已收") |
||||
|
private BigDecimal alreadyEarn; |
||||
|
|
||||
|
@ApiModelProperty(value = "上次欠款") |
||||
|
private BigDecimal lastDebtAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "本单欠款") |
||||
|
private BigDecimal amount; |
||||
|
|
||||
|
@ApiModelProperty(value = "剩余欠款-更新后欠款") |
||||
|
private BigDecimal balanceDue; |
||||
|
|
||||
|
@ApiModelProperty(value = "交易类型:0:开单;1:退货;2:回款") |
||||
|
private Integer dealingsType; |
||||
|
|
||||
|
@ApiModelProperty(value = "销售明细") |
||||
|
private List<BillProductDetailVo> billSaleDetailVos; |
||||
|
|
||||
|
@ApiModelProperty(value = "退货明细") |
||||
|
private List<BillProductDetailVo> billReturnSaleDetailVos; |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
package cc.hiver.mall.common.constant; |
||||
|
|
||||
|
/** |
||||
|
* 店铺常量 |
||||
|
* |
||||
|
* @author cc |
||||
|
*/ |
||||
|
public interface StockLogConstant { |
||||
|
|
||||
|
/** |
||||
|
* 出入库类型(0-入库;1-出库) |
||||
|
*/ |
||||
|
Integer[] CHANGE_TYPE = {0,1}; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,42 @@ |
|||||
|
/* |
||||
|
Copyright [2022] [https://hiver.cc]
|
||||
|
|
||||
|
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
|
you may not use this file except in compliance with the License. |
||||
|
You may obtain a copy of the License at |
||||
|
|
||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
|
||||
|
Unless required by applicable law or agreed to in writing, software |
||||
|
distributed under the License is distributed on an "AS IS" BASIS, |
||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
|
See the License for the specific language governing permissions and |
||||
|
limitations under the License. |
||||
|
*/ |
||||
|
package cc.hiver.mall.pojo.query; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBasePageQuery; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 分享页查询对象 |
||||
|
* |
||||
|
* @author 王富康 |
||||
|
* @date 2023/10/14 |
||||
|
*/ |
||||
|
@ApiModel("分享页查询对象") |
||||
|
@Data |
||||
|
public class ReturnSalePageQuery extends HiverBasePageQuery { |
||||
|
|
||||
|
@ApiModelProperty("商品ID") |
||||
|
private String productId; |
||||
|
|
||||
|
@ApiModelProperty("开始时间") |
||||
|
private String startDate; |
||||
|
|
||||
|
@ApiModelProperty("结束时间") |
||||
|
private String endDate; |
||||
|
|
||||
|
} |
||||
@ -1,11 +1,23 @@ |
|||||
package cc.hiver.mall.service.mybatis; |
package cc.hiver.mall.service.mybatis; |
||||
|
|
||||
|
import cc.hiver.mall.bill.vo.ArrearsVo; |
||||
|
import cc.hiver.mall.bill.vo.CustomerBillQueryVo; |
||||
import cc.hiver.mall.entity.ReturnSale; |
import cc.hiver.mall.entity.ReturnSale; |
||||
import cc.hiver.mall.entity.Sale; |
import cc.hiver.mall.pojo.dto.SaleReturnDTO; |
||||
|
import cc.hiver.mall.pojo.query.ReturnSalePageQuery; |
||||
|
import cc.hiver.mall.pojo.vo.ReturnSaleVo; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
public interface ReturnSaleService extends IService<ReturnSale> { |
public interface ReturnSaleService extends IService<ReturnSale> { |
||||
|
|
||||
|
|
||||
ReturnSale getBySaleId(String id); |
ReturnSale getBySaleId(String id); |
||||
|
|
||||
|
IPage<ReturnSaleVo> getReturnSaleList(ReturnSaleVo returnSaleVo); |
||||
|
|
||||
|
ArrearsVo getTotalReturn(CustomerBillQueryVo customerBillQueryVo); |
||||
|
|
||||
|
Page<SaleReturnDTO> getReturnSaleListByProductId(ReturnSalePageQuery returnSalePageQuery); |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue