3
0
Fork 0

## 未合单非在售商品;

This commit is contained in:
cabbage 2025-08-13 09:35:24 +08:00
parent 7fe6c4998e
commit 7c3517bfa8
26 changed files with 295 additions and 401 deletions

View File

@ -98,22 +98,10 @@ public class SaDeliverUnhandledController extends BaseController {
param.setSystemType(SecurityUtils.getSystemType());
// 未合单目前查询状态已付款
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
// 查询语句已经写死查询在售此处可以直接赋空
param.setPreSaleStatus(null);
Integer pkCountry = SecurityUtils.getPkCountry();
// 返回数据
List<DeliverUnhandledVO> resultList = new ArrayList<>();
if (StringUtils.isNotEmpty(param.getOriginalOrderCode())) {
// 原单号不为空则需要查询
LambdaQueryWrapper<SaOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SaOrder::getOrderCode, param.getOriginalOrderCode());
queryWrapper.eq(SaOrder::getPkCountry, pkCountry);
SaOrder querySaOrder = iSaOrderService.getOne(queryWrapper);
if (null == querySaOrder) {
return getDataTable(resultList);
}
param.setPkOriginalOrder(querySaOrder.getPkId());
}
// 获取管理员权限角色地区范围体系列表团队列表
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
@ -122,7 +110,7 @@ public class SaDeliverUnhandledController extends BaseController {
param.setTeamList(userAuthorityDTO.getUserTeamList());
startPage();
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
// 当查询有数据才进行处理
if (resultList.size() > 0) {
@ -153,23 +141,10 @@ public class SaDeliverUnhandledController extends BaseController {
param.setSystemType(SecurityUtils.getSystemType());
// 未合单目前查询状态已付款
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
// 查询语句已经写死查询在售此处可以直接赋空
param.setPreSaleStatus(null);
Integer pkCountry = SecurityUtils.getPkCountry();
// 返回数据
List<DeliverUnhandledVO> resultList = new ArrayList<>();
if (StringUtils.isNotEmpty(param.getOriginalOrderCode())) {
// 原单号不为空则需要查询
LambdaQueryWrapper<SaOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SaOrder::getOrderCode, param.getOriginalOrderCode());
queryWrapper.eq(SaOrder::getPkCountry, pkCountry);
SaOrder querySaOrder = iSaOrderService.getOne(queryWrapper);
if (null == querySaOrder) {
ExcelUtil<DeliverUnhandledVO> util = new ExcelUtil<>(DeliverUnhandledVO.class);
util.exportExcel(response, resultList, "发货清单未合单导出");
return;
}
param.setPkOriginalOrder(querySaOrder.getPkId());
}
// 获取管理员权限角色地区范围体系列表团队列表
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
@ -177,7 +152,7 @@ public class SaDeliverUnhandledController extends BaseController {
param.setVertexIdList(userAuthorityDTO.getVertexIdList());
param.setTeamList(userAuthorityDTO.getUserTeamList());
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
// 当查询有数据才进行处理
if (resultList.size() > 0) {

View File

@ -149,15 +149,6 @@ public class DeliverUnhandledParam extends BaseAuthorityEntity {
*/
private String specsName;
/**
* 原单号
*/
private String originalOrderCode;
/**
* 原单号ID
*/
private Long pkOriginalOrder;
/**
* 发货仓库
*/
@ -187,4 +178,9 @@ public class DeliverUnhandledParam extends BaseAuthorityEntity {
*/
private Long pkVertex;
/**
* 非售商品列表
*/
private List<Integer> pkWaresList;
}

View File

@ -236,12 +236,6 @@ public class DeliverUnhandledVO {
@Excel(name = "预售状态")
private String preSaleStatusVal;
/**
* 原单号
*/
@Excel(name = "原单号")
private String originalOrderCode;
/**
* 备注
*/

View File

@ -31,8 +31,6 @@ import com.hzs.sale.shopping.vo.ProductGroup;
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
import com.hzs.sale.shopping.vo.ShoppingCartVO;
import com.hzs.system.base.IAreaServiceApi;
import com.hzs.system.base.ICurrencyServiceApi;
import com.hzs.system.base.dto.CurrencyDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
@ -46,8 +44,6 @@ public abstract class ParentOrderController extends BaseController {
@DubboReference
IAreaServiceApi iAreaServiceApi;
@DubboReference
ICurrencyServiceApi currencyServiceApi;
private ISaOrderService orderService;
@ -402,8 +398,7 @@ public abstract class ParentOrderController extends BaseController {
* @return boolean
*/
protected Boolean checkRecMsgBoolean(OrderParam orderParam) {
if (orderParam.getDeliveryWay() != null && (EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay() ||
EDelivery.SHOP_PICKED_UP.getValue() == orderParam.getDeliveryWay())) {
if (orderParam.getDeliveryWay() != null && (EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay())) {
orderParam.setTransType(null);
return orderParam.getSpecialArea() != null
&& orderParam.getOrderItemsParams() != null
@ -551,12 +546,6 @@ public abstract class ParentOrderController extends BaseController {
// 获取行政区划map
Integer pkLoginCountry = orderParam.getPkLoginSettleCountry();
BigDecimal orderAmount = saOrder.getOrderAmount();
if (!Objects.equals(pkLoginCountry, saOrder.getPkCountry())) {
// 结算国当地币 转美金 美金登录当地币
CurrencyDTO loginCountryCurrency = currencyServiceApi.getCurrency(pkLoginCountry).getData();
CurrencyDTO settleCountryCurrency = currencyServiceApi.getCurrency(saOrder.getPkCountry()).getData();
orderAmount = ComputeUtil.computeMultiply(ComputeUtil.computeDivide(orderAmount, settleCountryCurrency.getInExchangeRate()), loginCountryCurrency.getInExchangeRate());
}
Map<Integer, String> areaMap = iAreaServiceApi.getAreaMap(orderParam.getPkSettleCountry()).getData();
OrderReturn orderReturn = OrderReturn.builder()
.orderCode(saOrder.getOrderCode())

View File

@ -189,9 +189,7 @@ public class SaOrderChargeLogController extends BaseController {
// 发货方式
orderChargeLogVo.setDeliveryWayStr(EDelivery.getLabelByValue(orderChargeLogExt.getDeliveryWay()));
//销售方式
if (orderChargeLogExt.getOperateScope() != null && ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()) != null) {
orderChargeLogVo.setOperateScopeStr(transactionMap.get(ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()).getKey()));
}
orderChargeLogVo.setOperateScopeStr(ESupplyWay.getLabelByVal(orderChargeLogExt.getOperateScope()));
// 运输方式
List<String> tranList = new ArrayList<>();
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
@ -203,13 +201,9 @@ public class SaOrderChargeLogController extends BaseController {
}
orderChargeLogVo.setTranTypeStr(StringUtils.join(tranList, ","));
// 预售状态
if (orderChargeLogExt.getPreSaleStatus() != null) {
orderChargeLogVo.setPreSaleStatusStr(transactionMap.get(EPresaleStatus.getEPresaleStatus(orderChargeLogExt.getPreSaleStatus()).getKey()));
}
orderChargeLogVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(orderChargeLogExt.getPreSaleStatus()));
// 支付方式
if (orderChargeLogExt.getPayType() != null && EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()) != null) {
orderChargeLogVo.setPayTypeStr(EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()).getLabel());
}
orderChargeLogVo.setPayTypeStr(EOrderPayType.getLabelByValue(orderChargeLogExt.getPayType()));
// 撤单人
orderChargeLogVo.setCreatorName(orderChargeLogExt.getCancelTheOrderName());
// 终审
@ -369,9 +363,7 @@ public class SaOrderChargeLogController extends BaseController {
// 发货方式
orderChargeLogVo.setDeliveryWayStr(EDelivery.getLabelByValue(orderChargeLogExt.getDeliveryWay()));
//销售方式
if (orderChargeLogExt.getOperateScope() != null && ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()) != null) {
orderChargeLogVo.setOperateScopeStr(transactionMap.get(ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()).getKey()));
}
orderChargeLogVo.setOperateScopeStr(ESupplyWay.getLabelByVal(orderChargeLogExt.getOperateScope()));
// 运输方式
List<String> tranList = new ArrayList<>();
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
@ -383,13 +375,9 @@ public class SaOrderChargeLogController extends BaseController {
}
orderChargeLogVo.setTranTypeStr(StringUtils.join(tranList, ","));
// 预售状态
if (orderChargeLogExt.getPreSaleStatus() != null) {
orderChargeLogVo.setPreSaleStatusStr(transactionMap.get(EPresaleStatus.getEPresaleStatus(orderChargeLogExt.getPreSaleStatus()).getKey()));
}
orderChargeLogVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(orderChargeLogExt.getPreSaleStatus()));
// 支付方式
if (orderChargeLogExt.getPayType() != null && EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()) != null) {
orderChargeLogVo.setPayTypeStr(EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()).getLabel());
}
orderChargeLogVo.setPayTypeStr(EOrderPayType.getLabelByValue(orderChargeLogExt.getPayType()));
// 撤单人
orderChargeLogVo.setCreatorName(orderChargeLogExt.getCancelTheOrderName());
// 终审

View File

@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hzs.common.core.annotation.AccessPermissions;
import com.hzs.common.core.annotation.Log;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.enums.*;
import com.hzs.common.core.utils.DateUtils;
import com.hzs.common.core.utils.StringUtils;
@ -15,7 +14,6 @@ import com.hzs.common.core.web.page.TableDataInfo;
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
import com.hzs.common.domain.sale.order.SaOrderRemarks;
import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.common.service.ITransactionCommonService;
import com.hzs.sale.order.controller.ParentOrderController;
import com.hzs.sale.order.dto.OrderBusinessTemplate;
import com.hzs.sale.order.param.*;
@ -47,8 +45,6 @@ import java.util.stream.Collectors;
@Slf4j
public class SaOrderController extends ParentOrderController {
@Autowired
private ITransactionCommonService iTransactionCommonService;
@Autowired
private ISaOrderService iSaOrderService;
@Autowired
@ -110,44 +106,18 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 订单类型
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 发货方式
if (null != waresOrderVo.getDeliveryWay()) {
EDelivery eDelivery = EDelivery.getDelivery(waresOrderVo.getDeliveryWay());
if (null != eDelivery) {
waresOrderVo.setDeliveryWayStr(eDelivery.getLabel());
}
}
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
// 运输方式
if (waresOrderVo.getTranType() != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
// 支付方式
if (waresOrderVo.getPayType() != null) {
EOrderPayType eOrderPayType = EOrderPayType.getEnumByValue(waresOrderVo.getPayType());
if (null != eOrderPayType) {
waresOrderVo.setPayTypeStr(eOrderPayType.getLabel());
}
}
// 订单类型
if (waresOrderVo.getOrderType() != null) {
EOrderType eOrderType = EOrderType.getEnumByValue(waresOrderVo.getOrderType());
if (null != eOrderType) {
waresOrderVo.setOrderTypeStr(eOrderType.getLabel());
}
}
// 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
ESupplyWay eSupplyWay = ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope()));
if (null != eSupplyWay) {
waresOrderVo.setOperateScope(eSupplyWay.getLabel());
}
}
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
}
return getDataTable(resultList);
}
@ -181,10 +151,7 @@ public class SaOrderController extends ParentOrderController {
waresOrderParam.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList());
waresOrderParam.setVertexIdList(userAuthorityDTO.getVertexIdList());
waresOrderParam.setTeamList(userAuthorityDTO.getUserTeamList());
// startPage();
List<WaresOrderVo> resultList = iSaOrderService.selectByOrderInfoList(waresOrderParam);
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ESupplyWay.values(), ETransportType.values(), EPresaleStatus.values(), EOrderType.values(), EOrderPayType.values(), ESaleType.values(), EShippingChannel.values());
for (WaresOrderVo waresOrderVo : resultList) {
//
if (waresOrderVo.getRecProvince() != null) {
@ -198,34 +165,18 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 订单类型
waresOrderVo.setOrderTypeVal(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getDelivery(waresOrderVo.getDeliveryWay()).getLabel());
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
// 运输方式
if (waresOrderVo.getTranType() != null && ETransportType.getETransportType(waresOrderVo.getTranType()) != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null && EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()) != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
// 支付方式
if (waresOrderVo.getPayType() != null) {
waresOrderVo.setPayTypeStr(EOrderPayType.getEnumByValue(waresOrderVo.getPayType()).getLabel());
}
// 订单类型
if (waresOrderVo.getOrderType() != null) {
waresOrderVo.setOrderTypeVal(transactionMap.get(EnumsPrefixConstants.ORDER_TYPE + waresOrderVo.getOrderType()));
}
// 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope()) && ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())) != null) {
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
}
// 发货类型
waresOrderVo.setShippingChannelVal(transactionMap.get(EnumsPrefixConstants.E_SHIPPING_CHANNEL + waresOrderVo.getShippingChannel()));
waresOrderVo.setLogisticsCode(waresOrderVo.getLogisticsCode());
waresOrderVo.setLogisticsCompany(waresOrderVo.getLogisticsCompany());
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
}
ExcelUtil<WaresOrderVo> util = new ExcelUtil<WaresOrderVo>(WaresOrderVo.class, iMenuColumnServiceApi.queryMenuColumn("Commodity", SecurityUtils.getUserId()).getData());
util.exportExcel(response, resultList, "商品订单导出");
@ -274,35 +225,21 @@ public class SaOrderController extends ParentOrderController {
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
// 运输方式
if (waresOrderVo.getTranType() != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
// 支付方式
if (waresOrderVo.getPayType() != null) {
waresOrderVo.setPayTypeStr(EOrderPayType.getEnumByValue(waresOrderVo.getPayType()).getLabel());
}
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
// 订单类型
if (waresOrderVo.getOrderType() != null) {
waresOrderVo.setOrderTypeStr(EOrderType.getEnumByValue(waresOrderVo.getOrderType()).getLabel());
}
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
}
// 计算汇率
if (null != waresOrderVo.getInExchangeRate()) {
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
}
// 发货类型
if (waresOrderVo.getShippingChannel() != null) {
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
}
waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
// 计算产品总计
waresOrderVo.setProductPriceTotal(waresOrderVo.getProductPrice().multiply(BigDecimal.valueOf(waresOrderVo.getQuantity())));
}
@ -354,48 +291,22 @@ public class SaOrderController extends ParentOrderController {
}
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
// 运输方式
if (waresOrderVo.getTranType() != null) {
ETransportType transportType = ETransportType.getETransportType(waresOrderVo.getTranType());
if (transportType != null) {
waresOrderVo.setTranTypeStr(transportType.getLabel());
}
}
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null) {
EPresaleStatus presaleStatus = EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus());
if (presaleStatus != null) {
waresOrderVo.setPreSaleStatusStr(presaleStatus.getLabel());
}
}
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
// 支付方式
if (waresOrderVo.getPayType() != null) {
EOrderPayType orderPayType = EOrderPayType.getEnumByValue(waresOrderVo.getPayType());
if (orderPayType != null) {
waresOrderVo.setPayTypeStr(orderPayType.getLabel());
}
}
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
// 订单类型
if (waresOrderVo.getOrderType() != null) {
EOrderType orderType = EOrderType.getEnumByValue(waresOrderVo.getOrderType());
if (orderType != null) {
waresOrderVo.setOrderTypeStr(orderType.getLabel());
}
}
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope()) && ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())) != null) {
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
}
// 计算汇率
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
// 发货类型
if (waresOrderVo.getShippingChannel() != null) {
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
}
waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
}
List<WaresOrderInfoVo> waresOrderInfoList = resultList.stream().map(a -> {
WaresOrderInfoVo waresOrderInfoVo = BeanUtil.copyProperties(a, WaresOrderInfoVo.class);

View File

@ -1,6 +1,7 @@
package com.hzs.sale.order.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzs.common.core.annotation.BigDecimalFormat;
import com.hzs.common.core.annotation.Excel;
import lombok.Data;
@ -8,14 +9,6 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @BelongsProject: hzs_cloud
* @BelongsPackage: com.hzs.sale.order.vo
* @Author: yh
* @CreateTime: 2023-08-02 16:32
* @Description: TODO
* @Version: 1.0
*/
@Data
public class WaresOrderInfoVo implements Serializable {
@ -45,6 +38,7 @@ public class WaresOrderInfoVo implements Serializable {
/**
* 重量
*/
@BigDecimalFormat
@Excel(name = "重量(KG)")
private BigDecimal weight;
/**

View File

@ -10,13 +10,6 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Description:
* @Author: yuhui
* @Time: 2023/1/31 14:09
* @Classname: WaresOrderVo
* @PackageName: com.hzs.sale.order.vo
*/
@Data
public class WaresOrderVo implements Serializable {
@ -312,10 +305,6 @@ public class WaresOrderVo implements Serializable {
* 重量
*/
private BigDecimal weight;
/**
* 展示汇率
*/
private BigDecimal inExchangeRate;
/**
* 产品订单明细列表
*/

View File

@ -17,6 +17,7 @@ import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.core.web.page.TableDataInfo;
import com.hzs.common.domain.sale.classify.BdSpecs;
import com.hzs.common.domain.sale.ext.BdWaresDetailExt;
import com.hzs.common.domain.sale.ext.BdWaresExt;
import com.hzs.common.domain.sale.ext.BdWaresSpecsRelationExt;
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
import com.hzs.common.domain.sale.product.BdAreaClassify;
@ -516,7 +517,8 @@ public class BdWaresController extends BaseController {
waresParams.setPkSpecialCurrency(waresExtend.getPkSpecialCurrency());
waresParams.setSortStatus(wares.getSortStatus());
waresParams.setSystemType(waresExtend.getSystemType());
waresParams.setAreaIncome(wares.getAreaIncome());
waresParams.
setAreaIncome(wares.getAreaIncome());
waresParams.setBoxNum(wares.getBoxNum());
BdAreaClassify parentAreaClassify = areaClassifyService.getAreaClassify(wares.getPkAreaClassify());
@ -962,4 +964,29 @@ public class BdWaresController extends BaseController {
return AjaxResult.success();
}
/**
* 非在售商品列表
*
* @param param
* @return
*/
@GetMapping("/list-no-sale")
public TableDataInfo listNoSale(WaresNoSaleParam param) {
List<WaresNoSaleVO> resultList = new ArrayList<>();
List<BdWaresExt> list = iBdWaresService.listWaresNoSale(param);
if (CollectionUtil.isNotEmpty(list)) {
for (BdWaresExt bdWaresExt : list) {
WaresNoSaleVO vo = BeanUtil.copyProperties(bdWaresExt, WaresNoSaleVO.class);
vo.setSpecialAreaVal(ESpecialArea.getLabelByValue(vo.getSpecialArea()));
vo.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(vo.getPreSaleStatus()));
resultList.add(vo);
}
}
TableDataInfo tableDataInfo = getDataTable(list);
tableDataInfo.setRows(resultList);
return tableDataInfo;
}
}

View File

@ -6,6 +6,7 @@ import com.hzs.common.domain.sale.wares.BdWares;
import com.hzs.common.domain.sale.wares.BdWaresDetail;
import com.hzs.common.domain.system.config.BdAgreement;
import com.hzs.retail.wares.param.RetailWaresParam;
import com.hzs.sale.wares.param.WaresNoSaleParam;
import com.hzs.sale.wares.param.WaresParams;
import com.hzs.sale.wares.vo.WaresAuthorityVo;
import com.hzs.sale.wares.vo.WaresVo;
@ -141,4 +142,12 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
@Param("pkProduct") Integer pkProduct,
@Param("specialArea") Integer specialArea);
/**
* 查询非在售商品
*
* @param param
* @return
*/
List<BdWaresExt> listWaresNoSale(@Param("param") WaresNoSaleParam param);
}

View File

@ -1,40 +0,0 @@
package com.hzs.sale.wares.param;/**
* @Description:
* @Author: yuhui
* @Time: 2023/5/22 14:22
* @Classname: ConfirmOrderWaresInfoParams
* @PackageName: com.hzs.sale.wares.param
*/
import lombok.Data;
/**
*@BelongsProject: hzs_cloud
*@BelongsPackage: com.hzs.sale.wares.param
*@Author: yh
*@CreateTime: 2023-05-22 14:22
*@Description: TODO
*@Version: 1.0
*/
@Data
public class ConfirmOrderWaresInfoList {
/**
* 商品外键
*/
private Long pkTWares;
/**
* 商品sku外键
*/
private Long pkTWaresSku;
/**
* 商品数量
*/
private Integer quantity;
/**
* 渠道
*/
private Integer source;
}

View File

@ -1,26 +0,0 @@
package com.hzs.sale.wares.param;/**
* @Description:
* @Author: yuhui
* @Time: 2023/5/23 15:21
* @Classname: ConfirmOrderWaresInfoParams
* @PackageName: com.hzs.sale.wares.param
*/
import lombok.Data;
import java.util.List;
/**
*@BelongsProject: hzs_cloud
*@BelongsPackage: com.hzs.sale.wares.param
*@Author: yh
*@CreateTime: 2023-05-23 15:21
*@Description: TODO
*@Version: 1.0
*/
@Data
public class ConfirmOrderWaresInfoParams {
private List<ConfirmOrderWaresInfoList> confirmOrderWaresInfoParamsList;
}

View File

@ -0,0 +1,24 @@
package com.hzs.sale.wares.param;
import lombok.Data;
/**
* 非在售商品查询
*/
@Data
public class WaresNoSaleParam {
/**
* 商品编号
*/
private String waresCode;
/**
* 商品名称
*/
private String waresName;
/**
* 商品状态
*/
private Integer preSaleStatus;
}

View File

@ -9,6 +9,7 @@ import com.hzs.common.domain.system.config.BdAgreement;
import com.hzs.common.domain.system.config.ext.BdRangeExt;
import com.hzs.retail.wares.param.RetailWaresParam;
import com.hzs.sale.wares.param.ComputeWaresPrice;
import com.hzs.sale.wares.param.WaresNoSaleParam;
import com.hzs.sale.wares.param.WaresParams;
import com.hzs.sale.wares.vo.WaresAuthorityVo;
import com.hzs.sale.wares.vo.WaresVo;
@ -205,4 +206,12 @@ public interface IBdWaresService extends IService<BdWares> {
*/
List<BdWaresDetail> listBoxProductAndWares(List<String> boxWaresList, Integer pkProduct, Integer specialArea);
/**
* 查询非在售商品
*
* @param param
* @return
*/
List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param);
}

View File

@ -1168,4 +1168,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.listBoxProduct(boxWaresList, pkProduct, specialArea);
}
@Override
public List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param) {
return baseMapper.listWaresNoSale(param);
}
}

View File

@ -0,0 +1,49 @@
package com.hzs.sale.wares.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 非在售商品查询返回
*/
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class WaresNoSaleVO implements Serializable {
/**
* 商品ID
*/
private Integer pkId;
/**
* 商品图
*/
private String cover1;
/**
* 商品编号
*/
private String waresCode;
/**
* 商品名称
*/
private String waresName;
/**
* 商品专区
*/
private Integer specialArea;
private String specialAreaVal;
/**
* 商品状态
*/
private Integer preSaleStatus;
private String preSaleStatusVal;
}

View File

@ -71,14 +71,6 @@
so.remark,
soi.creation_time,
so.pay_time,
case
when so.PK_ORIGINAL_ORDER is not null then
(select sot.order_code
from sa_order sot
where sot.pk_id = so.PK_ORIGINAL_ORDER)
else
null
end original_order_code,
bs.name storehouse_name,
bu.name unit_name,
so.SYSTEM_TYPE,
@ -126,6 +118,15 @@
<if test="param.pkStorehouse != null ">
and bs.pk_id = #{param.pkStorehouse}
</if>
<!-- 在售 -->
and (bwe.pre_sale_status = 0
<if test="param.pkWaresList != null and param.pkWaresList.size > 0">
or soi.pk_wares in
<foreach collection="param.pkWaresList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
)
<!-- 地区权限处理 -->
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
and so.rec_province in
@ -143,10 +144,6 @@
<if test="param.pkVertex != null">
and cm.pk_vertex = #{param.pkVertex}
</if>
<if test="null != param.pkOriginalOrder">
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
</if>
</if>
</foreach>
order by creation_time desc, order_code desc
@ -183,14 +180,6 @@
so.remark,
soi.creation_time,
so.pay_time,
case
when so.PK_ORIGINAL_ORDER is not null then
(select sot.order_code
from sa_order sot
where sot.pk_id = so.PK_ORIGINAL_ORDER)
else
null
end original_order_code,
bs.name storehouse_name,
bu.name unit_name,
so.SYSTEM_TYPE,
@ -245,6 +234,15 @@
</foreach>
)
</if>
<!-- 在售 -->
and (bwe.pre_sale_status = 0
<if test="param.pkWaresList != null and param.pkWaresList.size > 0">
or soi.pk_wares in
<foreach collection="param.pkWaresList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
)
<!-- 地区权限处理 -->
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
and so.rec_province in
@ -262,9 +260,6 @@
<if test="param.pkVertex != null">
and cm.pk_vertex = #{param.pkVertex}
</if>
<if test="null != param.pkOriginalOrder">
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
</if>
order by soi.creation_time desc, so.order_code desc
</if>
</select>
@ -468,6 +463,15 @@
#{item}
</foreach>
</if>
<!-- 在售 -->
and (bwe.pre_sale_status = 0
<if test="param.pkWaresList != null and param.pkWaresList.size > 0">
or soi.pk_wares in
<foreach collection="param.pkWaresList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
)
<!-- 地区权限处理 -->
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
and so.rec_province in
@ -822,7 +826,6 @@
oi.SPECS_NAME specsName,
bp.WEIGHT weight,
bp.SHIPPING_CHANNEL shippingChannel,
bc.IN_EXCHANGE_RATE inExchangeRate,
oi.LOGISTICS_CODE logisticsCode,
oi.LOGISTICS_COMPANY logisticsCompany,
m.MEMBER_CODE buyMemberCode,
@ -836,7 +839,6 @@
so.SYSTEM_TYPE
from sa_order_items oi
left join sa_order so on oi.PK_ORDER = so.PK_ID
left join BD_CURRENCY bc on bc.PK_ID = so.PK_RATE
left join CU_MEMBER cm on cm.PK_ID = so.PK_MEMBER
left join BD_WARES_EXTEND we on we.PK_WARES = oi.PK_WARES
left join BD_WARES bw on bw.PK_ID = we.PK_WARES

View File

@ -462,4 +462,31 @@
order by bw.wares_code
</select>
<!-- 查询非在售商品 -->
<select id="listWaresNoSale" resultType="com.hzs.common.domain.sale.ext.BdWaresExt">
select bw.pk_id,
bw.cover1,
bw.wares_name,
bw.wares_code,
bw.special_area,
bwe.pre_sale_status
from bd_wares bw
inner join bd_wares_extend bwe
on bwe.pk_wares = bw.pk_id
where bw.del_flag = 0
and bwe.del_flag = 0
and bwe.is_put_on = 0
and bwe.pre_sale_status in (1, 3)
<if test="param.waresCode != null and param.waresCode != ''">
and bw.wares_code like '%' || #{param.waresCode} || '%'
</if>
<if test="param.waresName != null and param.waresName != ''">
and bw.wares_name like '%' || #{param.waresName} || '%'
</if>
<if test="param.preSaleStatus != null">
and bwe.pre_sale_status = #{param.preSaleStatus}
</if>
order by bw.wares_name
</select>
</mapper>

View File

@ -364,28 +364,6 @@ public class EnumsInitController {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 供应方式
*/
for (ESupplyWay value : ESupplyWay.values()) {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 预售状态
*/
for (EPresaleStatus value : EPresaleStatus.values()) {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 订单支付方式
*/
for (EOrderPayType value : EOrderPayType.values()) {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 交易类型
*/
@ -499,13 +477,6 @@ public class EnumsInitController {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 产品发货渠道
*/
for (EShippingChannel value : EShippingChannel.values()) {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 支付业务类型
*/

View File

@ -25,16 +25,6 @@ public enum EDelivery {
*/
COMPANY_PICKED_UP(2, "公司自提", 0),
/**
* 店铺自提
*/
SHOP_PICKED_UP(3, "店铺自提", 0),
/**
* 店铺配送
*/
SHOP_DELIVERY(4, "店铺配送", 0),
/**
* 提货中心
*/

View File

@ -5,11 +5,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @Description: 订单支付方式
* @Author: jiang chao
* @Time: 2022/11/4 14:11
* @Classname: EOrderPayType
* @PackageName: com.hzs.common.core.enums
* 订单支付方式
*/
@AllArgsConstructor
@Getter
@ -18,12 +14,12 @@ public enum EOrderPayType {
/**
* 钱包
*/
WALLET(0, "钱包", 0,EnumsPrefixConstants.ORDER_PAY_TYPE + "0"),
WALLET(0, "钱包", 0),
/**
* 在线
*/
ONLINE(1, "在线", 0,EnumsPrefixConstants.ORDER_PAY_TYPE + "1"),
ONLINE(1, "在线", 0),
;
@ -39,24 +35,16 @@ public enum EOrderPayType {
* 是否启用0=,1= -- 来源EYesNo
*/
private final int enable;
/**
* 国际化翻译key值
*/
private final String key;
/**
* 根据值获取枚举
*
* @param value
* @return
*/
public static EOrderPayType getEnumByValue(int value) {
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EOrderPayType enums : EOrderPayType.values()) {
if (enums.getValue() == value) {
return enums;
if (enums.value == value) {
return enums.getLabel();
}
}
return null;
return "";
}
}

View File

@ -1,15 +1,10 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @Description: 预售状态
* @Author: jiang chao
* @Time: 2022/11/4 14:05
* @Classname: EPresaleStatus
* @PackageName: com.hzs.common.core.enums
* 预售状态
*/
@AllArgsConstructor
@Getter
@ -18,12 +13,12 @@ public enum EPresaleStatus {
/**
* 在售
*/
ON_SALE(0, "在售", 0, EnumsPrefixConstants.PRESALE_STATUS + "0"),
ON_SALE(0, "在售", 0),
/**
* 预售
*/
PRESALE(1, "预售", 0, EnumsPrefixConstants.PRESALE_STATUS + "1"),
PRESALE(1, "预售", 0),
/**
* 已售罄 2.0删除该项 已对接过设计
@ -33,7 +28,7 @@ public enum EPresaleStatus {
/**
* 缺货
*/
OUT_STOCK(3, "缺货", 0, EnumsPrefixConstants.PRESALE_STATUS + "3"),
OUT_STOCK(3, "缺货", 0),
;
@ -49,10 +44,6 @@ public enum EPresaleStatus {
* 是否启用0=,1= -- 来源EYesNo
*/
private final int enable;
/**
* 国际化翻译key值
*/
private final String key;
public static EPresaleStatus getEPresaleStatus(int value ){
for (EPresaleStatus ePresaleStatus : EPresaleStatus.values()) {
@ -63,4 +54,16 @@ public enum EPresaleStatus {
return null;
}
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EPresaleStatus enums : EPresaleStatus.values()) {
if (enums.getValue() == value) {
return enums.getLabel();
}
}
return "";
}
}

View File

@ -1,6 +1,5 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -11,9 +10,9 @@ import lombok.Getter;
@Getter
public enum EShippingChannel {
TOTAL_WAREHOUSE(1, "总仓发货", 0, EnumsPrefixConstants.E_SHIPPING_CHANNEL + "1"),
TOTAL_WAREHOUSE(1, "总仓发货", 0),
A_PIECE(2, "一件代发", 0, EnumsPrefixConstants.E_SHIPPING_CHANNEL + "2"),
A_PIECE(2, "一件代发", 0),
;
@ -23,10 +22,6 @@ public enum EShippingChannel {
* 是否启用0=,1= -- 来源EYesNo
*/
private final int enable;
/**
* 国际化翻译key值
*/
private final String key;
/**
* 根据值返回枚举
@ -42,4 +37,17 @@ public enum EShippingChannel {
}
return TOTAL_WAREHOUSE;
}
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EShippingChannel enums : EShippingChannel.values()) {
if (enums.value.equals(value)) {
return enums.getLabel();
}
}
return "";
}
}

View File

@ -89,19 +89,22 @@ public enum ESpecialArea {
*/
private final int menuDetailValue;
public static String getESpecialArea(int value) {
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
if (eSpecialArea.getValue() == value) {
return eSpecialArea.getLabel();
}
}
return null;
return "";
}
public static ESpecialArea getESpecialAreaEnum(int value) {
public static String getESpecialArea(int value) {
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
if (eSpecialArea.getValue() == value) {
return eSpecialArea;
return eSpecialArea.getLabel();
}
}
return null;

View File

@ -1,6 +1,5 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -14,12 +13,12 @@ public enum ESupplyWay {
/**
* 自营
*/
SELF(0, "自营", 0, EnumsPrefixConstants.SUPPLY_WAY + "0"),
SELF(0, "自营", 0),
/**
* 非自营
*/
NO_SELF(1, "非自营", 0, EnumsPrefixConstants.SUPPLY_WAY + "1"),
NO_SELF(1, "非自营", 0),
;
@ -35,10 +34,6 @@ public enum ESupplyWay {
* 是否启用0=,1= -- 来源EYesNo
*/
private final int enable;
/**
* 国际化翻译key值
*/
private final String key;
public static ESupplyWay getESupplyWay(int value) {
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
@ -49,4 +44,16 @@ public enum ESupplyWay {
return null;
}
public static String getLabelByVal(Integer value) {
if (null == value) {
return "";
}
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
if (eSupplyWay.getValue() == value) {
return eSupplyWay.getLabel();
}
}
return "";
}
}

View File

@ -43,13 +43,15 @@ public enum ETransportType {
*/
private final String key;
public static ETransportType getETransportType(int value){
for (ETransportType eTransportType : ETransportType.values()) {
if (eTransportType.getValue() == value){
return eTransportType;
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (ETransportType enums : ETransportType.values()) {
if (enums.value == value) {
return enums.getLabel();
}
}
return null;
return "";
}
}