master:档口首页 客户销售数据调优,档口认证时新增默认现金客户;
parent
18da35d30c
commit
d362e8e2c9
|
|
@ -25,5 +25,7 @@ public class StoreIndexCusSaleTop10ResVO {
|
|||
private Integer saleNum;
|
||||
@ApiModelProperty(value = "累计退货量")
|
||||
private Integer refundNum;
|
||||
@ApiModelProperty(value = "退货率")
|
||||
private BigDecimal refundRate;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@ public class Constants
|
|||
public static final Integer FA_HUO_BAO_SN_PREFIX_LENGTH = 10;
|
||||
// 发货宝条码 公共部分 前缀长度
|
||||
public static final Integer FA_HUO_BAO_SN_COMMON_PREFIX_LENGTH = 8;
|
||||
|
||||
// 每个档口默认 现金客户
|
||||
public static final String STORE_CUS_CASH = "现金客户";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -30,7 +30,12 @@
|
|||
SUM(IFNULL( dsc.sale_amount, 0 )) AS saleAmount,
|
||||
SUM(IFNULL( dsc.refund_amount, 0 )) AS refundAmount,
|
||||
SUM(IFNULL( dsc.sale_num, 0 )) AS saleNum,
|
||||
SUM(IFNULL( dsc.refund_num, 0 )) AS refundNum
|
||||
SUM(IFNULL( dsc.refund_num, 0 )) AS refundNum,
|
||||
CASE
|
||||
WHEN SUM(IFNULL( dsc.sale_num, 0 )) = 0 THEN
|
||||
0 ELSE ROUND(
|
||||
SUM(IFNULL( dsc.refund_num, 0 )) * 1.0 / SUM(IFNULL( dsc.sale_num, 0 )) * 100, 2)
|
||||
END AS refundRate
|
||||
FROM
|
||||
daily_sale_customer dsc
|
||||
JOIN store_customer sc ON dsc.store_cus_id = sc.id
|
||||
|
|
|
|||
|
|
@ -23,5 +23,7 @@ public class StoreIndexCusSaleTop10ResDTO {
|
|||
private Integer saleNum;
|
||||
@ApiModelProperty(value = "累计退货量")
|
||||
private Integer refundNum;
|
||||
@ApiModelProperty(value = "退货率")
|
||||
private BigDecimal refundRate;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,7 @@ import com.ruoyi.common.exception.ServiceException;
|
|||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.xkt.domain.Store;
|
||||
import com.ruoyi.xkt.domain.StoreCertificate;
|
||||
import com.ruoyi.xkt.domain.SysFile;
|
||||
import com.ruoyi.xkt.domain.VoucherSequence;
|
||||
import com.ruoyi.xkt.domain.*;
|
||||
import com.ruoyi.xkt.dto.storeCertificate.StoreCertDTO;
|
||||
import com.ruoyi.xkt.dto.storeCertificate.StoreCertResDTO;
|
||||
import com.ruoyi.xkt.dto.storeCertificate.StoreCertStepResDTO;
|
||||
|
|
@ -57,6 +54,7 @@ public class StoreCertificateServiceImpl implements IStoreCertificateService {
|
|||
final DailySaleProductMapper dailySaleProdMapper;
|
||||
final ISysUserService userService;
|
||||
final VoucherSequenceMapper vsMapper;
|
||||
final StoreCustomerMapper storeCusMapper;
|
||||
|
||||
/**
|
||||
* 新增档口认证
|
||||
|
|
@ -85,6 +83,11 @@ public class StoreCertificateServiceImpl implements IStoreCertificateService {
|
|||
// 代发订单
|
||||
vsList.add(this.initVoucherSequence(store.getId(), Constants.VOUCHER_SEQ_STORE_ORDER_TYPE, Constants.VOUCHER_SEQ_STORE_ORDER_PREFIX));
|
||||
this.vsMapper.insert(vsList);
|
||||
// 新增档口 “现金客户”
|
||||
StoreCustomer storeCus = new StoreCustomer().setStoreId(store.getId()).setPhone(store.getContactPhone())
|
||||
// 默认创建现金客户
|
||||
.setCusName(Constants.STORE_CUS_CASH).setAddOverPrice(0);
|
||||
this.storeCusMapper.insert(storeCus);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue