Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
a3105c27ba
|
@ -132,4 +132,14 @@ public interface CuMemberRetailRangeMapper extends BaseMapper<CuMemberRetailRang
|
|||
void mergeCuMemberRetailBackBoxBySpecial(@Param("rangeTableName") String rangeTableName,
|
||||
@Param("beforeTableName") String beforeTableName,
|
||||
@Param("period") Integer period);
|
||||
|
||||
/**
|
||||
* 更新会员激活状态
|
||||
*
|
||||
* @param rangeTableName
|
||||
* @param pkMemberList
|
||||
* @return
|
||||
*/
|
||||
int updateMemberEnable(@Param("rangeTableName") String rangeTableName, @Param("pkMemberList") List<Long> pkMemberList);
|
||||
|
||||
}
|
||||
|
|
|
@ -114,4 +114,14 @@ public interface ICuMemberRetailRangeService extends IService<CuMemberRetailRang
|
|||
* @param cuMemberTreeMap 树
|
||||
*/
|
||||
void updateCuMemberSecondRange(String secondTableName, Map<Long, CuMemberRetailRangeExt> cuMemberTreeMap);
|
||||
|
||||
/**
|
||||
* 更新会员激活状态
|
||||
*
|
||||
* @param rangeTableName
|
||||
* @param pkMemberList
|
||||
* @return
|
||||
*/
|
||||
int updateMemberEnable(String rangeTableName, List<Long> pkMemberList);
|
||||
|
||||
}
|
||||
|
|
|
@ -149,4 +149,10 @@ public class CuMemberRetailRangeServiceImpl extends ServiceImpl<CuMemberRetailRa
|
|||
cuMemberTreeMap.forEach((key, value) -> cuMemberTreeList.add(value));
|
||||
return cuMemberBonusSettle.handleCutList(cuMemberTreeList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateMemberEnable(String rangeTableName, List<Long> pkMemberList) {
|
||||
return baseMapper.updateMemberEnable(rangeTableName, pkMemberList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -111,7 +111,18 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
|||
}
|
||||
|
||||
// 当期的手动激活的记录列表
|
||||
Map<Long, Date> activateMap = this.getActivateMap(saOrderExt.getPayTime());
|
||||
List<CuMemberServiceLog> activateList = this.getActivateList(saOrderExt.getPayTime());
|
||||
Map<Long, Date> activateMap = new HashMap<>();
|
||||
if (CollectionUtil.isNotEmpty(activateList)) {
|
||||
activateMap = activateList.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
CuMemberServiceLog::getPkMember,
|
||||
Collectors.collectingAndThen(
|
||||
Collectors.minBy(Comparator.comparing(CuMemberServiceLog::getCreationTime)),
|
||||
optional -> optional.get().getCreationTime()
|
||||
)
|
||||
));
|
||||
}
|
||||
// 查询体系奖项配置
|
||||
Map<Long, List<Integer>> vertexBonusMap = iBdVertexBonusService.queryVertexBonus();
|
||||
|
||||
|
@ -469,6 +480,8 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
|||
iCuMemberAwardsService.calculateCuMemberRetailRangeAwardsInit(settleDate, period, rangeTableName);
|
||||
// 更新网体
|
||||
iCuMemberRetailRangeService.mergeMemberRetailRangeByYesterday(settleEndDate, rangeTableName, yesterdayRangeTableName, isSameMonth);
|
||||
// 更新会员手动升级
|
||||
iCuMemberGradeService.updateCuMemberManualGrade(rangeTableName, period);
|
||||
|
||||
// 回退历史注水
|
||||
iCuMemberRetailRangeService.mergeCuMemberRetailBackBoxBySpecial(rangeTableName, yesterdayRangeTableName, period);
|
||||
|
@ -476,7 +489,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
|||
iCuMemberRetailRangeService.mergeCuMemberRetailRangeBySpecial(rangeTableName, period);
|
||||
|
||||
// 当期的手动激活的记录列表
|
||||
Map<Long, Date> activateMap = this.getActivateMap(settleStartDate);
|
||||
List<CuMemberServiceLog> activateList = this.getActivateList(settleStartDate);
|
||||
|
||||
if (retailOrderList.size() > 0) {
|
||||
// 复购订单级差数据map(key:订单ID,value:订单明细+级差)
|
||||
|
@ -489,6 +502,18 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
|||
List<CuMemberLevel> memberLevelList = iCuMemberGradeService.calculateCuMemberRetailGradeInit(period, settleStartDate, settleEndDate, rangeTableName);
|
||||
memberLevelList.forEach(cuMemberLevel -> memberLevelMap.put(cuMemberLevel.getPkOrder(), cuMemberLevel));
|
||||
|
||||
Map<Long, Date> activateMap = new HashMap<>();
|
||||
if (CollectionUtil.isNotEmpty(activateList)) {
|
||||
activateMap = activateList.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
CuMemberServiceLog::getPkMember,
|
||||
Collectors.collectingAndThen(
|
||||
Collectors.minBy(Comparator.comparing(CuMemberServiceLog::getCreationTime)),
|
||||
optional -> optional.get().getCreationTime()
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
// 按照血缘,查询该会员所有伞上会员
|
||||
List<CuMemberRetailRangeExt> memberRetailRangeExtList = iCuMemberRetailRangeService.queryCuMemberRetailRangeParent(rangeTableName, retailOrderList);
|
||||
|
||||
|
@ -653,6 +678,12 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
|||
}
|
||||
// 更新网体
|
||||
iCuMemberRetailRangeService.updateCuMemberRetailRange(rangeTableName, memberRangeExtMap);
|
||||
} else {
|
||||
// 当日没有订单,也需要处理手动激活
|
||||
if (CollectionUtil.isNotEmpty(activateList)) {
|
||||
List<Long> pkMemberList = activateList.stream().map(CuMemberServiceLog::getPkMember).collect(Collectors.toList());
|
||||
iCuMemberRetailRangeService.updateMemberEnable(rangeTableName, pkMemberList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2102,17 +2133,9 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
|
|||
* @param settleStartDate
|
||||
* @return
|
||||
*/
|
||||
private Map<Long, Date> getActivateMap(Date settleStartDate) {
|
||||
private List<CuMemberServiceLog> getActivateList(Date settleStartDate) {
|
||||
// 当期的手动激活的记录列表
|
||||
List<CuMemberServiceLog> activateList = iCuMemberServiceLogServiceApi.listActivateLog(settleStartDate).getData();
|
||||
return activateList.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
CuMemberServiceLog::getPkMember,
|
||||
Collectors.collectingAndThen(
|
||||
Collectors.minBy(Comparator.comparing(CuMemberServiceLog::getCreationTime)),
|
||||
optional -> optional.get().getCreationTime()
|
||||
)
|
||||
));
|
||||
return iCuMemberServiceLogServiceApi.listActivateLog(settleStartDate).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,12 @@ import java.util.List;
|
|||
public interface ICuMemberGradeService extends IService<CuMemberGrade> {
|
||||
|
||||
/**
|
||||
* 回退极差奖衔,每日重新结算,先把奖衔回退到前一天
|
||||
* 更新会员手动升级
|
||||
*/
|
||||
void updateCuMemberManualGrade(String rangeTableName, Integer period);
|
||||
|
||||
/**
|
||||
* 回退等级,每日重新结算,先把等级回退到前一天
|
||||
*
|
||||
* @param period 结算期间
|
||||
* @param rangeTableName 结算表
|
||||
|
|
|
@ -17,11 +17,16 @@ import java.util.List;
|
|||
@Service
|
||||
public class CuMemberGradeServiceImpl extends ServiceImpl<CuMemberGradeMapper, CuMemberGrade> implements ICuMemberGradeService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuMemberLevel> calculateCuMemberRetailGradeInit(Integer period, Date startDate, Date endDate, String rangeTableName) {
|
||||
// 更新奖衔,回退等级
|
||||
public void updateCuMemberManualGrade(String rangeTableName, Integer period) {
|
||||
// 回退等级,更新手动升级
|
||||
baseMapper.deleteCuMemberGrade(period);
|
||||
baseMapper.updateCuMemberGrade(rangeTableName, period);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CuMemberLevel> calculateCuMemberRetailGradeInit(Integer period, Date startDate, Date endDate, String rangeTableName) {
|
||||
return baseMapper.queryCuMemberLevel(startDate, endDate);
|
||||
}
|
||||
|
||||
|
|
|
@ -816,4 +816,14 @@
|
|||
where pk_parent = #{pkParent}
|
||||
</select>
|
||||
|
||||
<!-- 更新会员激活状态 -->
|
||||
<update id="updateMemberEnable">
|
||||
update ${rangeTableName} cmr
|
||||
set cmr.enable_status = 0
|
||||
where cmr.pk_member in
|
||||
<foreach collection="pkMemberList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -1180,69 +1180,69 @@ public class MemberReportController extends BaseController {
|
|||
|
||||
return getDataTable(orderDistributionList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS_LIST, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/product-shipping-details-list")
|
||||
public TableDataInfo productShippingDetailsList(String productName, Integer pkClassify, Date startTime, Date endTime, Integer orderType) {
|
||||
startPage();
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
List<Integer> orderTypeList = EOrderBusiness.getOrderTypeList(orderType);
|
||||
if (endTime != null) {
|
||||
endTime = DateUtils.getEndTime(endTime);
|
||||
}
|
||||
List<ProductOrderInfoVo> memberReportList = memberReportService.getProductOrderInfo(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
for (ProductOrderInfoVo productOrderInfoVo : memberReportList) {
|
||||
if (productOrderInfoVo.getProductPrice() != null) {
|
||||
productOrderInfoVo.setProductTotalPrice(productOrderInfoVo.getProductPrice());
|
||||
} else {
|
||||
productOrderInfoVo.setProductTotalPrice(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
if (productOrderInfoVo.getOrderType() != null) {
|
||||
productOrderInfoVo.setOrderTypeStr(EOrderType.getEnumByValue(productOrderInfoVo.getOrderType()).getLabel());
|
||||
}
|
||||
}
|
||||
// 计算总计
|
||||
Integer count = memberReportService.sumQuantity(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
ProductOrderInfoVo productOrderInfoVo = new ProductOrderInfoVo();
|
||||
productOrderInfoVo.setProductCode("总计");
|
||||
productOrderInfoVo.setProductName("-");
|
||||
productOrderInfoVo.setQuantity(count);
|
||||
productOrderInfoVo.setProductTotalPrice(BigDecimal.ZERO);
|
||||
memberReportList.add(productOrderInfoVo);
|
||||
return getDataTable(memberReportList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出货明细汇总导出
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS_LIST, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/product-shipping-details-export")
|
||||
public void productShippingDetailsExport(String productName, Integer pkClassify, Date startTime, Date endTime, Integer orderType, HttpServletResponse response) {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
List<Integer> orderTypeList = EOrderBusiness.getOrderTypeList(orderType);
|
||||
if (endTime != null) {
|
||||
endTime = DateUtils.getEndTime(endTime);
|
||||
}
|
||||
List<ProductOrderInfoVo> memberReportList = memberReportService.getProductOrderInfo(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
for (ProductOrderInfoVo productOrderInfoVo : memberReportList) {
|
||||
if (productOrderInfoVo.getProductPrice() != null) {
|
||||
productOrderInfoVo.setProductTotalPrice(productOrderInfoVo.getProductPrice());
|
||||
} else {
|
||||
productOrderInfoVo.setProductTotalPrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (productOrderInfoVo.getOrderType() != null) {
|
||||
productOrderInfoVo.setOrderTypeStr(EOrderType.getEnumByValue(productOrderInfoVo.getOrderType()).getLabel());
|
||||
}
|
||||
}
|
||||
ExcelUtil<ProductOrderInfoVo> util = new ExcelUtil<>(ProductOrderInfoVo.class);
|
||||
util.exportExcel(response, memberReportList, "出货明细汇总导出");
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 出货明细汇总统计
|
||||
// */
|
||||
// @Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS_LIST, method = EOperationMethod.SELECT)
|
||||
// @GetMapping("/product-shipping-details-list")
|
||||
// public TableDataInfo productShippingDetailsList(String productName, Integer pkClassify, Date startTime, Date endTime, Integer orderType) {
|
||||
// startPage();
|
||||
// Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
// List<Integer> orderTypeList = EOrderBusiness.getOrderTypeList(orderType);
|
||||
// if (endTime != null) {
|
||||
// endTime = DateUtils.getEndTime(endTime);
|
||||
// }
|
||||
// List<ProductOrderInfoVo> memberReportList = memberReportService.getProductOrderInfo(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
// for (ProductOrderInfoVo productOrderInfoVo : memberReportList) {
|
||||
// if (productOrderInfoVo.getProductPrice() != null) {
|
||||
// productOrderInfoVo.setProductTotalPrice(productOrderInfoVo.getProductPrice());
|
||||
// } else {
|
||||
// productOrderInfoVo.setProductTotalPrice(BigDecimal.ZERO);
|
||||
// }
|
||||
//
|
||||
// if (productOrderInfoVo.getOrderType() != null) {
|
||||
// productOrderInfoVo.setOrderTypeStr(EOrderType.getEnumByValue(productOrderInfoVo.getOrderType()).getLabel());
|
||||
// }
|
||||
// }
|
||||
// // 计算总计
|
||||
// Integer count = memberReportService.sumQuantity(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
// ProductOrderInfoVo productOrderInfoVo = new ProductOrderInfoVo();
|
||||
// productOrderInfoVo.setProductCode("总计");
|
||||
// productOrderInfoVo.setProductName("-");
|
||||
// productOrderInfoVo.setQuantity(count);
|
||||
// productOrderInfoVo.setProductTotalPrice(BigDecimal.ZERO);
|
||||
// memberReportList.add(productOrderInfoVo);
|
||||
// return getDataTable(memberReportList);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 出货明细汇总导出
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS_LIST, method = EOperationMethod.EXPORT)
|
||||
// @PostMapping("/product-shipping-details-export")
|
||||
// public void productShippingDetailsExport(String productName, Integer pkClassify, Date startTime, Date endTime, Integer orderType, HttpServletResponse response) {
|
||||
// Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
// List<Integer> orderTypeList = EOrderBusiness.getOrderTypeList(orderType);
|
||||
// if (endTime != null) {
|
||||
// endTime = DateUtils.getEndTime(endTime);
|
||||
// }
|
||||
// List<ProductOrderInfoVo> memberReportList = memberReportService.getProductOrderInfo(productName, pkClassify, startTime, endTime, pkCountry, orderTypeList);
|
||||
// for (ProductOrderInfoVo productOrderInfoVo : memberReportList) {
|
||||
// if (productOrderInfoVo.getProductPrice() != null) {
|
||||
// productOrderInfoVo.setProductTotalPrice(productOrderInfoVo.getProductPrice());
|
||||
// } else {
|
||||
// productOrderInfoVo.setProductTotalPrice(BigDecimal.ZERO);
|
||||
// }
|
||||
// if (productOrderInfoVo.getOrderType() != null) {
|
||||
// productOrderInfoVo.setOrderTypeStr(EOrderType.getEnumByValue(productOrderInfoVo.getOrderType()).getLabel());
|
||||
// }
|
||||
// }
|
||||
// ExcelUtil<ProductOrderInfoVo> util = new ExcelUtil<>(ProductOrderInfoVo.class);
|
||||
// util.exportExcel(response, memberReportList, "出货明细汇总导出");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情
|
||||
|
@ -1544,4 +1544,60 @@ public class MemberReportController extends BaseController {
|
|||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 产品销售统计列表
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/product-shipping")
|
||||
public TableDataInfo productShipping(ProductShippingParam param) {
|
||||
startPage();
|
||||
List<ProductShippingVO> productShippingList = memberReportService.listProductShipping(param);
|
||||
return getDataTable(productShippingList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品销售统计导出
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/product-shipping-export")
|
||||
public void productShippingExport(HttpServletResponse response, ProductShippingParam param) {
|
||||
List<ProductShippingVO> productShippingList = memberReportService.listProductShipping(param);
|
||||
ExcelUtil<ProductShippingVO> util = new ExcelUtil<>(ProductShippingVO.class);
|
||||
util.exportExcel(response, productShippingList, "出货明细汇总导出");
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品销售统计详情
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS, method = EOperationMethod.SELECT)
|
||||
@GetMapping("/product-shipping-details")
|
||||
public TableDataInfo productShippingDetails(ProductShippingParam param) {
|
||||
startPage();
|
||||
List<ProductShippingDetailsVO> productOrderInfoVoList = memberReportService.listProductShippingDetail(param);
|
||||
if (CollectionUtil.isNotEmpty(productOrderInfoVoList)) {
|
||||
for (ProductShippingDetailsVO productShippingDetailsVO : productOrderInfoVoList) {
|
||||
productShippingDetailsVO.setSpecialAreaVal(ESpecialArea.getLabelByValue(productShippingDetailsVO.getSpecialArea()));
|
||||
productShippingDetailsVO.setIsMakerGiftVal(EWaresType.getEnumLabelByValue(productShippingDetailsVO.getIsMakerGift()));
|
||||
}
|
||||
}
|
||||
return getDataTable(productOrderInfoVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品销售统计详情导出
|
||||
*/
|
||||
@Log(module = EOperationModule.STATISTIC_ANALYSIS, business = EOperationBusiness.PRODUCT_SHIPPING_DETAILS, method = EOperationMethod.EXPORT)
|
||||
@PostMapping("/product-shipping-details-export")
|
||||
public void productShippingDetailsExport(HttpServletResponse response, ProductShippingParam param) {
|
||||
List<ProductShippingDetailsVO> productOrderInfoVoList = memberReportService.listProductShippingDetail(param);
|
||||
if (CollectionUtil.isNotEmpty(productOrderInfoVoList)) {
|
||||
for (ProductShippingDetailsVO productShippingDetailsVO : productOrderInfoVoList) {
|
||||
productShippingDetailsVO.setSpecialAreaVal(ESpecialArea.getLabelByValue(productShippingDetailsVO.getSpecialArea()));
|
||||
productShippingDetailsVO.setIsMakerGiftVal(EWaresType.getEnumLabelByValue(productShippingDetailsVO.getIsMakerGift()));
|
||||
}
|
||||
}
|
||||
ExcelUtil<ProductShippingDetailsVO> util = new ExcelUtil<>(ProductShippingDetailsVO.class);
|
||||
util.exportExcel(response, productOrderInfoVoList, "出货明细汇总统计详情");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.hzs.report.member.mapper;
|
||||
|
||||
import com.hzs.report.member.param.ProductDetailQueryParam;
|
||||
import com.hzs.report.member.param.ProductShippingParam;
|
||||
import com.hzs.report.member.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -298,4 +299,13 @@ public interface MemberReportMapper {
|
|||
**/
|
||||
List<DirectPushNewVo> querDirectPushDetails(DirectPushNewVo directPushNewVo);
|
||||
|
||||
/**
|
||||
* 产品销售统计列表
|
||||
*/
|
||||
List<ProductShippingVO> listProductShipping(@Param("param") ProductShippingParam param);
|
||||
|
||||
/**
|
||||
* 出货明细汇总统计详情
|
||||
*/
|
||||
List<ProductShippingDetailsVO> listProductShippingDetail(@Param("param") ProductShippingParam param);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package com.hzs.report.member.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 产品销售统计入参
|
||||
*/
|
||||
@Data
|
||||
public class ProductShippingParam {
|
||||
|
||||
/**
|
||||
* 仓储编号
|
||||
*/
|
||||
private String wmsCode;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package com.hzs.report.member.service;
|
||||
|
||||
import com.hzs.report.member.param.ProductDetailQueryParam;
|
||||
import com.hzs.report.member.param.ProductShippingParam;
|
||||
import com.hzs.report.member.vo.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -231,4 +232,14 @@ public interface MemberReportService {
|
|||
* 创建表
|
||||
**/
|
||||
void createCuMemberAmountBoxTable(String tabeName);
|
||||
/**
|
||||
* 产品销售统计列表
|
||||
*/
|
||||
List<ProductShippingVO> listProductShipping(ProductShippingParam param);
|
||||
|
||||
/**
|
||||
* 产品销售统计详情列表
|
||||
*/
|
||||
List<ProductShippingDetailsVO> listProductShippingDetail(ProductShippingParam param);
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.hzs.common.domain.system.config.BdAccount;
|
|||
import com.hzs.common.service.ITransactionCommonService;
|
||||
import com.hzs.report.member.mapper.MemberReportMapper;
|
||||
import com.hzs.report.member.param.ProductDetailQueryParam;
|
||||
import com.hzs.report.member.param.ProductShippingParam;
|
||||
import com.hzs.report.member.service.MemberReportService;
|
||||
import com.hzs.report.member.vo.*;
|
||||
import com.hzs.report.report.service.ICuMemberSettlePeriodService;
|
||||
|
@ -575,5 +576,14 @@ public class MemberReportServiceImpl implements MemberReportService {
|
|||
memberReportMapper.createCuMemberAmountBoxTable(tabeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductShippingVO> listProductShipping(ProductShippingParam param) {
|
||||
return memberReportMapper.listProductShipping(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductShippingDetailsVO> listProductShippingDetail(ProductShippingParam param) {
|
||||
return memberReportMapper.listProductShippingDetail(param);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ProductShippingDetailsVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 仓储编号
|
||||
*/
|
||||
@Excel(name = "仓储编号")
|
||||
private String wmsCode;
|
||||
|
||||
/**
|
||||
* 所属专区
|
||||
*/
|
||||
private Integer specialArea;
|
||||
@Excel(name = "所属专区")
|
||||
private String specialAreaVal;
|
||||
|
||||
/**
|
||||
* 商品类型
|
||||
*/
|
||||
private Integer isMakerGift;
|
||||
@Excel(name = "商品类型")
|
||||
private String isMakerGiftVal;
|
||||
|
||||
/**
|
||||
* 销量
|
||||
*/
|
||||
@Excel(name = "销量")
|
||||
private Integer quantity;
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.hzs.report.member.vo;
|
||||
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ProductShippingVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 仓储编号
|
||||
*/
|
||||
@Excel(name = "仓储编号")
|
||||
private String wmsCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@Excel(name = "产品编号")
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 销量
|
||||
*/
|
||||
@Excel(name = "销量")
|
||||
private Integer quantity;
|
||||
|
||||
}
|
|
@ -1827,4 +1827,79 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 产品销售统计列表 -->
|
||||
<select id="listProductShipping" resultType="com.hzs.report.member.vo.ProductShippingVO">
|
||||
select bp.wms_code,
|
||||
nvl(sum(tmp.quantity), 0) quantity,
|
||||
to_char(wm_concat(bp.product_name)) product_name,
|
||||
to_char(wm_concat(bp.product_code)) product_code
|
||||
from bd_product bp
|
||||
left join (
|
||||
select soi.pk_product, sum(soi.quantity) quantity
|
||||
from sa_order so
|
||||
left join sa_order_items soi
|
||||
on soi.pk_order = so.pk_id
|
||||
and soi.del_flag = 0
|
||||
where so.del_flag = 0
|
||||
and so.order_status = 1
|
||||
<if test="param.startTime != null">
|
||||
and so.pay_time >= to_date(#{param.startTime}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
and to_date(#{param.endTime} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') >= so.pay_time
|
||||
</if>
|
||||
group by soi.pk_product
|
||||
) tmp
|
||||
on tmp.pk_product = bp.pk_id
|
||||
where bp.del_flag = 0
|
||||
<if test="param.wmsCode != null and param.wmsCode !=''">
|
||||
and bp.wms_code = #{param.wmsCode}
|
||||
</if>
|
||||
<if test="param.productCode != null and param.productCode !=''">
|
||||
and bp.product_code = #{param.productCode}
|
||||
</if>
|
||||
<if test="param.productName != null and param.productName !=''">
|
||||
and bp.product_name like '%' || #{param.productName} ||'%'
|
||||
</if>
|
||||
group by bp.wms_code
|
||||
order by quantity desc
|
||||
</select>
|
||||
|
||||
<!-- 产品销售统计明细列表 -->
|
||||
<select id="listProductShippingDetail" resultType="com.hzs.report.member.vo.ProductShippingDetailsVO">
|
||||
select #{param.wmsCode} wmsCode,
|
||||
soi.pk_product,
|
||||
so.order_type specialArea,
|
||||
soi.is_maker_gift,
|
||||
sum(soi.quantity) quantity
|
||||
from sa_order so
|
||||
left join sa_order_items soi
|
||||
on soi.pk_order = so.pk_id
|
||||
and soi.del_flag = 0
|
||||
where so.del_flag = 0
|
||||
and so.order_status = 1
|
||||
<if test="param.startTime != null">
|
||||
and so.pay_time >= to_date(#{param.startTime}, 'yyyy-mm-dd')
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
and to_date(#{param.endTime} || ' 23:59:59', 'yyyy-mm-dd hh24:mi:ss') >= so.pay_time
|
||||
</if>
|
||||
and soi.pk_product in
|
||||
(select bp.pk_id
|
||||
from bd_product bp
|
||||
where bp.del_flag = 0
|
||||
<if test="param.wmsCode != null and param.wmsCode !=''">
|
||||
and bp.wms_code = #{param.wmsCode}
|
||||
</if>
|
||||
<if test="param.productCode != null and param.productCode !=''">
|
||||
and bp.product_code = #{param.productCode}
|
||||
</if>
|
||||
<if test="param.productName != null and param.productName !=''">
|
||||
and bp.product_name like '%' || #{param.productName} ||'%'
|
||||
</if>
|
||||
)
|
||||
group by soi.pk_product, so.order_type, soi.IS_MAKER_GIFT
|
||||
order by so.order_type, soi.IS_MAKER_GIFT
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -333,7 +333,19 @@ public class EnumsController extends BaseController {
|
|||
return AjaxResult.success(enumEntityList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出货相关订单类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/order-shipment")
|
||||
public AjaxResult orderShipment() {
|
||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||
for (EOrderShipment value : EOrderShipment.values()) {
|
||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel(), EnumsPrefixConstants.ORDER_SHIPMENT));
|
||||
}
|
||||
return AjaxResult.success(enumEntityList);
|
||||
}
|
||||
/**
|
||||
* 单个批量枚举
|
||||
*
|
||||
|
|
|
@ -331,6 +331,11 @@ public class EnumsPrefixConstants {
|
|||
*/
|
||||
public static final String ORDER_UP_BUSINESS = "ENU_ORDER_UP_BUSINESS_";
|
||||
|
||||
/**
|
||||
* 出货相关订单类型
|
||||
*/
|
||||
public static final String ORDER_SHIPMENT = "ENU_ORDER_SHIPMENT_";
|
||||
|
||||
/**
|
||||
* 支付业务类型
|
||||
*/
|
||||
|
|
|
@ -402,6 +402,10 @@ public enum EOperationBusiness {
|
|||
MONTHLY_JOB_LEVEL("月度职级名单查询"),
|
||||
MEMBER_RISK_CONTROL("K值风控设置"),
|
||||
MEMBER_RETAIL_STAT("收益区域数据"),
|
||||
|
||||
PRODUCT_SHIPPING("产品销售统计"),
|
||||
|
||||
PRODUCT_SHIPPING_DETAILS("产品销售统计详情"),
|
||||
;
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,168 @@
|
|||
package com.hzs.common.core.enums;
|
||||
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出货相关订单类型枚举
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum EOrderShipment {
|
||||
|
||||
/**
|
||||
* 全部 注册 + 升级+ 复购
|
||||
*/
|
||||
WHOLE(1, "全部", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 1),
|
||||
|
||||
/**
|
||||
* 首购 注册 + 升级
|
||||
*/
|
||||
FIRST_PURCHASE(2, "首购", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 2),
|
||||
|
||||
/**
|
||||
* 复购
|
||||
*/
|
||||
REPURCHASE(3, "复购", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 3),
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
REGISTER_ORDER(5, "注册专区", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 5),
|
||||
|
||||
/**
|
||||
* 升级
|
||||
*/
|
||||
UPGRADE_ORDER(6, "升级专区", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 6),
|
||||
|
||||
/**
|
||||
* 复购专区
|
||||
*/
|
||||
REPURCHASE_ORDER(7, "复购专区", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 7),
|
||||
|
||||
// /**
|
||||
// * 福利
|
||||
// */
|
||||
// WELFARE_ORDER(9, "福利专区", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 9),
|
||||
// /**
|
||||
// * 虚拟订单
|
||||
// */
|
||||
// FICTITIOUS_ORDER(12, "虚拟订单", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 12),
|
||||
/**
|
||||
* 重销订单
|
||||
*/
|
||||
CONSUME_ORDER(17, "重销订单", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 17),
|
||||
/**
|
||||
* 提货订单
|
||||
*/
|
||||
PICK_ORDER(18, "提货订单", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 18),
|
||||
// /**
|
||||
// * 积分订单
|
||||
// */
|
||||
// EXCHANGE_ORDER(20, "积分订单", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 20),
|
||||
// /**
|
||||
// * 专供专区
|
||||
// */
|
||||
// WHOLESALE_AREA(21, "专供专区", 0, EnumsPrefixConstants.ORDER_SHIPMENT + 21),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* 实际值
|
||||
*/
|
||||
private final int value;
|
||||
/**
|
||||
* 显示标签
|
||||
*/
|
||||
private final String label;
|
||||
/**
|
||||
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||
*/
|
||||
private final int enable;
|
||||
/**
|
||||
* 国际化翻译key值
|
||||
*/
|
||||
private final String key;
|
||||
|
||||
/**
|
||||
* 根据值,返回枚举
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static EOrderShipment getEnumByValue(int value) {
|
||||
for (EOrderShipment eOrderType : EOrderShipment.values()) {
|
||||
if (eOrderType.getValue() == value) {
|
||||
return eOrderType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据值,返回订单类型集合
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static List<Integer> getOrderTypeList(Integer value) {
|
||||
List<Integer> orderTypeList = new ArrayList<>();
|
||||
if (null == value || EOrderShipment.WHOLE.getValue() == value) {
|
||||
//首购 1,2,24,25,20
|
||||
orderTypeList.add(EOrderType.REGISTER_ORDER.getValue());
|
||||
orderTypeList.add(EOrderType.UPGRADE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_REGISTER_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_UPGRADE_ORDER.getValue());
|
||||
|
||||
//复购 3,26,22,14,12,18,19,7,28,13,31,10
|
||||
orderTypeList.add(EOrderType.CONSUME_ORDER.getValue());
|
||||
orderTypeList.add(EOrderType.REPURCHASE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_REPURCHASE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.PICK_ORDER.getValue());
|
||||
orderTypeList.add(EOrderType.CONSUME_ORDER.getValue());
|
||||
} else if (EOrderShipment.FIRST_PURCHASE.getValue() == value) {
|
||||
//首购
|
||||
orderTypeList.add(EOrderType.REGISTER_ORDER.getValue());
|
||||
orderTypeList.add(EOrderType.UPGRADE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_REGISTER_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_UPGRADE_ORDER.getValue());
|
||||
} else if (EOrderShipment.REPURCHASE.getValue() == value) {
|
||||
//复购
|
||||
orderTypeList.add(EOrderType.REPURCHASE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_REPURCHASE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.PICK_ORDER.getValue());
|
||||
orderTypeList.add(EOrderType.CONSUME_ORDER.getValue());
|
||||
} else if (EOrderShipment.REGISTER_ORDER.getValue() == value) {
|
||||
//注册专区
|
||||
orderTypeList.add(EOrderType.REGISTER_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_REGISTER_ORDER.getValue());
|
||||
} else if (EOrderShipment.UPGRADE_ORDER.getValue() == value) {
|
||||
//升级专区
|
||||
orderTypeList.add(EOrderType.UPGRADE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_UPGRADE_ORDER.getValue());
|
||||
} else if (EOrderShipment.REPURCHASE_ORDER.getValue() == value) {
|
||||
//复购专区 3,26,22,14,12,18,19,28,13
|
||||
orderTypeList.add(EOrderType.REPURCHASE_ORDER.getValue());
|
||||
// orderTypeList.add(EOrderType.SPECIAL_REPURCHASE_ORDER.getValue());
|
||||
orderTypeList.add(EOrderType.CONSUME_ORDER.getValue());
|
||||
} else if (EOrderShipment.CONSUME_ORDER.getValue() == value) {
|
||||
//重销订单
|
||||
orderTypeList.add(EOrderType.CONSUME_ORDER.getValue());
|
||||
} else if (EOrderShipment.PICK_ORDER.getValue() == value) {
|
||||
//提货订单
|
||||
// orderTypeList.add(EOrderType.PICK_ORDER.getValue());
|
||||
}
|
||||
return orderTypeList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 会员前端列表
|
||||
*/
|
||||
private static List<EOrderShipment> apiList;
|
||||
|
||||
}
|
|
@ -14,11 +14,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @Description: 在线支付配置
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/3/23 16:15
|
||||
* @Classname: OnlinePayConfigController
|
||||
* @PackageName: com.hzs.third.pay.controller.manage
|
||||
* 在线支付配置
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/online-config")
|
||||
|
@ -40,6 +36,16 @@ public class OnlinePayConfigController {
|
|||
OnlinePayConfigVO payConfigVO = new OnlinePayConfigVO();
|
||||
|
||||
// 各支付方式: true=显示,false=隐藏
|
||||
// 京东收银台(H5)
|
||||
String pay5 = String.format(PayConfigConstants.PAY_CONFIG_5, pkCountry);
|
||||
if (redisTemplate.hasKey(pay5)) {
|
||||
payConfigVO.setPay5((Boolean) redisTemplate.opsForValue().get(pay5));
|
||||
}
|
||||
// 京东收银台(PC)
|
||||
String pay6 = String.format(PayConfigConstants.PAY_CONFIG_6, pkCountry);
|
||||
if (redisTemplate.hasKey(pay6)) {
|
||||
payConfigVO.setPay6((Boolean) redisTemplate.opsForValue().get(pay6));
|
||||
}
|
||||
|
||||
// 新汇付PC微信扫码支付
|
||||
String pay81 = String.format(PayConfigConstants.PAY_CONFIG_81, pkCountry);
|
||||
|
|
Loading…
Reference in New Issue