## 未合单添加非在售商品处理;

This commit is contained in:
cabbage 2025-08-12 14:45:24 +08:00
parent cfaf62cadd
commit 0c81b997bc
30 changed files with 404 additions and 559 deletions

View File

@ -4,23 +4,16 @@ import cn.hutool.core.bean.BeanUtil;
import com.hzs.common.core.annotation.RepeatSubmitSimple;
import com.hzs.common.core.constant.msg.FinanceMsgConstants;
import com.hzs.common.core.enums.EApproveStatus;
import com.hzs.common.core.enums.EVerificationModule;
import com.hzs.common.core.enums.EYesNo;
import com.hzs.common.core.utils.StringUtils;
import com.hzs.common.core.web.controller.BaseController;
import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.domain.member.account.CuMemberBusinessLicense;
import com.hzs.common.domain.member.base.CuMember;
import com.hzs.common.domain.system.config.BdTradeConfig;
import com.hzs.common.domain.system.config.BdTradeWhiteConfig;
import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.common.util.TransactionUtils;
import com.hzs.member.account.service.ICuMemberAuthenticationService;
import com.hzs.member.account.service.ICuMemberBaseService;
import com.hzs.member.account.service.ICuMemberBusinessLicenseService;
import com.hzs.member.account.vo.CuMemberAuthenticationVO;
import com.hzs.member.account.vo.CuMemberBusinessLicenseVO;
import com.hzs.member.base.service.ICuMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -34,13 +27,9 @@ import java.util.Date;
public class ApiCuMemberBusinessLicenseController extends BaseController {
@Autowired
private ICuMemberBusinessLicenseService cuMemberBusinessLicenseService;
private ICuMemberBusinessLicenseService iCuMemberBusinessLicenseService;
@Autowired
private ICuMemberService iCuMemberService;
@Autowired
private ICuMemberBaseService iCuMemberBaseService;
@Autowired
private ICuMemberAuthenticationService authenticationService;
private ICuMemberAuthenticationService iCuMemberAuthenticationService;
/**
@ -57,7 +46,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
Long pkMember = SecurityUtils.getUserId();
Integer pkCountry = SecurityUtils.getPkCountry();
//查询是否已实名认证
CuMemberAuthenticationVO authenticationVO = authenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(pkMember).pkCountry(pkCountry).build());
CuMemberAuthenticationVO authenticationVO = iCuMemberAuthenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(pkMember).pkCountry(pkCountry).build());
//验证实名认证的真实姓名与法人的姓名是否一致
if (null != authenticationVO) {
String accountName = authenticationVO.getAccountName();
@ -72,11 +61,10 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
CuMemberBusinessLicense memberBusinessLicense = BeanUtil.copyProperties(businessLicense, CuMemberBusinessLicense.class);
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
memberBusinessLicense.setPkCreator(pkMember);
return toAjax(cuMemberBusinessLicenseService.save(memberBusinessLicense));
return toAjax(iCuMemberBusinessLicenseService.save(memberBusinessLicense));
} else {
return VerifyParameters(businessLicense);
}
}
@ -92,7 +80,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
//参数校验
if (VerifyParameters(businessLicense).equals(AjaxResult.success())) {
//查询是否已实名认证
CuMemberAuthenticationVO authenticationVO = authenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(SecurityUtils.getUserId()).pkCountry(SecurityUtils.getPkCountry()).build());
CuMemberAuthenticationVO authenticationVO = iCuMemberAuthenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(SecurityUtils.getUserId()).pkCountry(SecurityUtils.getPkCountry()).build());
//验证实名认证的真实姓名与法人的姓名是否一致
if (null != authenticationVO) {
String accountName = authenticationVO.getAccountName();
@ -106,7 +94,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
memberBusinessLicense.setModifiedTime(new Date());
memberBusinessLicense.setPkModified(SecurityUtils.getUserId());
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
return toAjax(cuMemberBusinessLicenseService.updateById(memberBusinessLicense));
return toAjax(iCuMemberBusinessLicenseService.updateById(memberBusinessLicense));
} else {
return VerifyParameters(businessLicense);
}
@ -121,37 +109,9 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
*/
@GetMapping("/detail")
public AjaxResult showDetail() {
return AjaxResult.success(cuMemberBusinessLicenseService.selectBusinessLicenseById(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
return AjaxResult.success(iCuMemberBusinessLicenseService.selectBusinessLicenseById(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
}
/**
* 是否上传营业执照
*
* @param businessModule 1:提现 2:转账 (来源枚举EBusinessModule)
* @return AjaxResult
*/
@GetMapping("/is-exist")
public AjaxResult isExistBusinessLicence(Integer businessModule) {
String flag = EYesNo.YES.getValue();
Long pkMember = SecurityUtils.getUserId();
Integer pkCountry = SecurityUtils.getPkCountry();
//查询配置白名单
BdTradeWhiteConfig bdTradeWhiteConfig = iCuMemberBaseService.selectConfigWhite(pkMember, pkCountry, businessModule);
if (null == bdTradeWhiteConfig) {
//查询是否配置营业执照
BdTradeConfig bdTradeConfig = iCuMemberBaseService.selectConfigTrade(pkMember, pkCountry, businessModule, EVerificationModule.BUSINESS_LICENSE);
//配置后才进行验证
if (null != bdTradeConfig) {
//查询是否完成经销商认证
CuMember cuMember = iCuMemberService.queryMember(pkMember);
flag = null != cuMember && cuMember.getIsDealer().equals(EYesNo.YES.getIntValue()) ? EYesNo.YES.getValue() : EYesNo.NO.getValue();
}
}
return AjaxResult.success().put("flag", flag);
}
/**
* 校验参数
*

View File

@ -50,11 +50,7 @@ import java.util.*;
import java.util.stream.Collectors;
/**
* @Description: 发货清单未合单控制器
* @Author: jiang chao
* @Time: 2022/10/28 11:24
* @Classname: SaDeliverOrderController
* @PackageName: com.hzs.sale.deliver.controller.manage
* 发货清单未合单控制器
*/
@RestController
@RequestMapping("/manage/deliver-unhandled")
@ -102,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();
@ -126,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) {
@ -157,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();
@ -181,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,7 +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 lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
@ -45,8 +44,6 @@ public abstract class ParentOrderController extends BaseController {
@DubboReference
IAreaServiceApi iAreaServiceApi;
@DubboReference
ICurrencyServiceApi currencyServiceApi;
private ISaOrderService orderService;
@ -405,8 +402,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

View File

@ -34,27 +34,19 @@ import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* @BelongsProject: hzs_cloud
* @BelongsPackage: com.hzs.sale.order.controller.manage
* @Author: yh
* @CreateTime: 2023-04-11 10:22
* @Description:
* @Version: 1.0
*/
@RestController
@RequestMapping("/manage/order-charge-log")
public class SaOrderChargeLogController extends BaseController {
@Autowired
private ITransactionCommonService transactionCommonService;
private ITransactionCommonService iTransactionCommonService;
@Autowired
private ISaOrderChargeLogService orderChargeLogService;
private ISaOrderChargeLogService iSaOrderChargeLogService;
@DubboReference
IVertexServiceApi vertexServiceApi;
IVertexServiceApi iVertexServiceApi;
@DubboReference
IAreaServiceApi areaServiceApi;
IAreaServiceApi iAreaServiceApi;
/**
* 撤单信息列表
@ -96,18 +88,18 @@ public class SaOrderChargeLogController extends BaseController {
}
startPage();
List<SaOrderChargeLogExt> list = orderChargeLogService.cancellationList(orderChargeLogParam);
List<SaOrderChargeLogExt> list = iSaOrderChargeLogService.cancellationList(orderChargeLogParam);
List<OrderChargeLogVo> resultList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(list)) {
// 地区
R<Map<Integer, String>> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
R<Map<Integer, String>> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
// 体系
R<List<VertexDTO>> vertexAll = vertexServiceApi.findAll();
R<List<VertexDTO>> vertexAll = iVertexServiceApi.findAll();
Map<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
ESupplyWay.values(), EDelivery.values(), EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(),
EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
EOrderType.values(), ETransportType.values(), EYesNo.values(), EShippingChannel.values(), EUnit.values(), ESignSource.values(), EOrderSource.values());
for (SaOrderChargeLogExt orderChargeLogExt : list) {
@ -195,13 +187,9 @@ public class SaOrderChargeLogController extends BaseController {
// 发货时间
orderChargeLogVo.setDeliveryTime(orderChargeLogExt.getDeliveryTime());
// 发货方式
if (orderChargeLogExt.getDeliveryWay() != null) {
orderChargeLogVo.setDeliveryWayStr(transactionMap.get(EDelivery.getDelivery(orderChargeLogExt.getDeliveryWay()).getKey()));
}
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)) {
@ -213,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());
// 终审
@ -278,18 +262,18 @@ public class SaOrderChargeLogController extends BaseController {
orderChargeLogParam.setEndCancelOrderTime(DateUtils.getEndTime(orderChargeLogParam.getEndCancelOrderTime()));
}
List<SaOrderChargeLogExt> list = orderChargeLogService.cancellationList(orderChargeLogParam);
List<SaOrderChargeLogExt> list = iSaOrderChargeLogService.cancellationList(orderChargeLogParam);
List<OrderChargeLogVo> resultList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(list)) {
// 地区
R<Map<Integer, String>> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
R<Map<Integer, String>> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
// 体系
R<List<VertexDTO>> vertexAll = vertexServiceApi.findAll();
R<List<VertexDTO>> vertexAll = iVertexServiceApi.findAll();
Map<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
ESupplyWay.values(), EDelivery.values(), EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(),
EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
EOrderType.values(), ETransportType.values(), EYesNo.values(), EShippingChannel.values(), EUnit.values(), ESignSource.values(), EOrderSource.values());
for (SaOrderChargeLogExt orderChargeLogExt : list) {
@ -377,13 +361,9 @@ public class SaOrderChargeLogController extends BaseController {
// 发货时间
orderChargeLogVo.setDeliveryTime(orderChargeLogExt.getDeliveryTime());
// 发货方式
if (orderChargeLogExt.getDeliveryWay() != null) {
orderChargeLogVo.setDeliveryWayStr(transactionMap.get(EDelivery.getDelivery(orderChargeLogExt.getDeliveryWay()).getKey()));
}
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)) {
@ -395,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.*;
@ -41,20 +39,12 @@ import java.util.stream.Collectors;
/**
* 订单控制类
*
* @author: sui q
* @time: 2022/8/27 16:20
* @description:
* @classname: OrderController
* @package_name: com.hzs.sale.order.controller
*/
@RestController
@RequestMapping("/manage/order")
@Slf4j
public class SaOrderController extends ParentOrderController {
@Autowired
private ITransactionCommonService iTransactionCommonService;
@Autowired
private ISaOrderService orderService;
@Autowired
@ -116,49 +106,18 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 发货方式
if (null != waresOrderVo.getDeliveryWay()) {
EDelivery eDelivery = EDelivery.getDelivery(waresOrderVo.getDeliveryWay());
if (null != eDelivery) {
waresOrderVo.setDeliveryWayStr(eDelivery.getLabel());
}
}
// 运输方式
if (waresOrderVo.getTranType() != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatusEnum != null) {
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
}
}
// 支付方式
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.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
// 运输方式
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
// 预售状态
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
// 支付方式
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
}
return getDataTable(resultList);
}
@ -192,10 +151,7 @@ public class SaOrderController extends ParentOrderController {
waresOrderParam.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList());
waresOrderParam.setVertexIdList(userAuthorityDTO.getVertexIdList());
waresOrderParam.setTeamList(userAuthorityDTO.getUserTeamList());
// startPage();
List<WaresOrderVo> resultList = orderService.selectByOrderInfoList(waresOrderParam);
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values(), ETransportType.values(), EPresaleStatus.values(), EOrderType.values(), EOrderStatus.values(), EOrderPayType.values(), ESaleType.values(), EShippingChannel.values());
for (WaresOrderVo waresOrderVo : resultList) {
//
if (waresOrderVo.getRecProvince() != null) {
@ -209,39 +165,18 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getDelivery(waresOrderVo.getDeliveryWay()).getLabel());
// 运输方式
if (waresOrderVo.getTranType() != null && ETransportType.getETransportType(waresOrderVo.getTranType()) != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null && EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()) != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatusEnum != null) {
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
}
}
// 支付方式
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.setOrderTypeVal(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
// 运输方式
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
// 预售状态
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
// 支付方式
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
}
ExcelUtil<WaresOrderVo> util = new ExcelUtil<WaresOrderVo>(WaresOrderVo.class, iMenuColumnServiceApi.queryMenuColumn("Commodity", SecurityUtils.getUserId()).getData());
util.exportExcel(response, resultList, "商品订单导出");
@ -273,8 +208,6 @@ public class SaOrderController extends ParentOrderController {
startPage();
List<WaresOrderVo> resultList = orderItemsService.selectByInvestmentList(waresOrderParam);
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values());
Map<Integer, String> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
for (WaresOrderVo waresOrderVo : resultList) {
//
@ -290,41 +223,23 @@ public class SaOrderController extends ParentOrderController {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 发货方式
if (null != waresOrderVo.getDeliveryWay()) {
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
}
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()));
// 订单状态
if (waresOrderVo.getOrderStatus() != null) {
waresOrderVo.setOrderStatusStr(EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus()).getLabel());
}
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())));
}
@ -360,8 +275,6 @@ public class SaOrderController extends ParentOrderController {
List<WaresOrderVo> resultList = orderItemsService.selectByInvestmentList(waresOrderParam);
Map<Integer, String> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
// 获取需要翻译的枚举翻译
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values());
for (WaresOrderVo waresOrderVo : resultList) {
//
@ -377,56 +290,23 @@ public class SaOrderController extends ParentOrderController {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 发货方式
if (waresOrderVo.getDeliveryWay() != null) {
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
}
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()));
// 订单状态
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatus = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatus != null) {
waresOrderVo.setOrderStatusStr(orderStatus.getLabel());
}
}
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

@ -16,6 +16,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;
@ -55,6 +56,8 @@ public class BdWaresController extends BaseController {
@DubboReference
IRangeServiceApi iRangeServiceApi;
@Autowired
private IBdWaresService iBdWaresService;
@Autowired
private IBdWaresAuthorizeService iBdWaresAuthorizeService;
@Autowired
@ -72,8 +75,6 @@ public class BdWaresController extends BaseController {
@Autowired
private IBdWaresSpecsPackService iBdWaresSpecsPackService;
@Autowired
private IBdWaresService iBdWaresService;
@Autowired
private IBdWaresLabelService iBdWaresLabelService;
@Autowired
private IBdWaresExtendService iBdWaresExtendService;
@ -140,9 +141,9 @@ public class BdWaresController extends BaseController {
// 所属专区
waresVo.setSpecialAreaVal(ESpecialArea.getESpecialArea(waresVo.getSpecialArea()));
// 供应方式
waresVo.setOperateScopeVal(ESupplyWay.getEnumLabelByValue(waresVo.getOperateScope()));
waresVo.setOperateScopeVal(ESupplyWay.getLabelByVal(waresVo.getOperateScope()));
// 预售状态
waresVo.setPreSaleStatusVal(EPresaleStatus.getEnumLabelByValue(waresVo.getPreSaleStatus()));
waresVo.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(waresVo.getPreSaleStatus()));
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
if (waresAuthorityVo != null) {
@ -959,4 +960,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;
@ -157,4 +158,12 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
*/
List<String> listWaresCodeByVertex(@Param("pkVertex") Long pkVertex);
/**
* 查询非在售商品
*
* @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;
@ -229,4 +230,12 @@ public interface IBdWaresService extends IService<BdWares> {
*/
List<String> listWaresCodeByVertex(Long pkVertex);
/**
* 查询非在售商品
*
* @param param
* @return
*/
List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param);
}

View File

@ -1175,4 +1175,10 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
public List<String> listWaresCodeByVertex(Long pkVertex) {
return baseMapper.listWaresCodeByVertex(pkVertex);
}
@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

@ -487,4 +487,31 @@
(select pk_member from bd_vertex bv where bv.pk_id = #{pkVertex})
</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

@ -251,11 +251,6 @@ public class EnumsInitController {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
//发货方式
for (EDelivery value : EDelivery.values()) {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
//发货状态
for (EDeliveryStatus value : EDeliveryStatus.values()) {
initList.add(this.createData(value.getKey(), value.getLabel()));
@ -370,14 +365,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()));
}
/**
* 订单状态
*/
@ -385,20 +372,6 @@ public class EnumsInitController {
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()));
}
/**
* 交易类型
*/
@ -512,13 +485,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

@ -1,6 +1,5 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -14,27 +13,17 @@ public enum EDelivery {
/**
*
*/
EMPTY(0, "未知", 1, EnumsPrefixConstants.DELIVERY + "0"),
EMPTY(0, "未知", 1),
/**
* 快递发货
*/
FAST_MAIL(1, "快递发货", 0, EnumsPrefixConstants.DELIVERY + "1"),
FAST_MAIL(1, "快递发货", 0),
/**
* 公司自提
*/
COMPANY_PICKED_UP(2, "公司自提", 0, EnumsPrefixConstants.DELIVERY + "2"),
/**
* 店铺自提
*/
SHOP_PICKED_UP(3, "店铺自提", 0, EnumsPrefixConstants.DELIVERY + "3"),
/**
* 店铺配送
*/
SHOP_DELIVERY(4, "店铺配送", 0, EnumsPrefixConstants.DELIVERY + "4"),
COMPANY_PICKED_UP(2, "公司自提", 0),
;
@ -50,10 +39,6 @@ public enum EDelivery {
* 是否启用0=,1= -- 来源EYesNo
*/
private final int enable;
/**
* 国际化翻译key值
*/
private final String key;
public static EDelivery getDelivery(int value) {
for (EDelivery eDelivery : EDelivery.values()) {
@ -63,4 +48,17 @@ public enum EDelivery {
}
return EDelivery.EMPTY;
}
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EDelivery enums : EDelivery.values()) {
if (enums.getValue() == value) {
return enums.getLabel();
}
}
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:11
* @Classname: EOrderPayType
* @PackageName: com.hzs.common.core.enums
* 订单支付方式
*/
@AllArgsConstructor
@Getter
@ -18,12 +13,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 +34,17 @@ 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

@ -4,9 +4,6 @@ import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.ArrayList;
import java.util.List;
/**
* 订单状态
*/
@ -63,27 +60,6 @@ public enum EOrderStatus {
*/
private final String key;
/**
* 会员前端列表
*/
private static List<EOrderStatus> apiList;
/**
* 获取会员前端列表
*
* @return
*/
public static List<EOrderStatus> getApiList() {
if (null == apiList) {
apiList = new ArrayList<>();
apiList.add(WAIT_PAY);
apiList.add(PAY);
apiList.add(DELIVERED);
apiList.add(RECEIVED);
}
return apiList;
}
public static EOrderStatus getEOrderStatus(int value) {
for (EOrderStatus eOrderStatus : EOrderStatus.values()) {
if (eOrderStatus.value == value) {
@ -93,4 +69,16 @@ public enum EOrderStatus {
return null;
}
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EOrderStatus enums : EOrderStatus.values()) {
if (enums.value == 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;
@ -14,17 +13,17 @@ 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),
/**
* 缺货
*/
OUT_STOCK(3, "缺货", 0, EnumsPrefixConstants.PRESALE_STATUS + "3"),
OUT_STOCK(3, "缺货", 0),
;
@ -40,10 +39,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()) {
@ -54,12 +49,12 @@ public enum EPresaleStatus {
return null;
}
public static String getEnumLabelByValue(Integer value) {
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EPresaleStatus enums : EPresaleStatus.values()) {
if (enums.value == value) {
if (enums.getValue() == value) {
return enums.getLabel();
}
}

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,18 @@ public enum EShippingChannel {
}
return TOTAL_WAREHOUSE;
}
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EShippingChannel enums : EShippingChannel.values()) {
if (enums.value == value) {
return enums.getLabel();
}
}
return "";
}
}

View File

@ -99,6 +99,18 @@ public enum ESpecialArea {
*/
private final int menuDetailValue;
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
if (eSpecialArea.getValue() == value) {
return eSpecialArea.getLabel();
}
}
return "";
}
public static String getESpecialArea(Integer value) {
if (null == value) {
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;
@ -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,13 +44,13 @@ public enum ESupplyWay {
return null;
}
public static String getEnumLabelByValue(Integer value) {
public static String getLabelByVal(Integer value) {
if (null == value) {
return "";
}
for (ESupplyWay enums : ESupplyWay.values()) {
if (enums.value == value) {
return enums.getLabel();
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
if (eSupplyWay.getValue() == value) {
return eSupplyWay.getLabel();
}
}
return "";

View File

@ -0,0 +1,53 @@
package com.hzs.common.core.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 系统名称
*/
@AllArgsConstructor
@Getter
public enum ESysName {
MANAGE("manage", "后台管理"),
/**
* 新零售
*/
BF("bf", "新零售BF"),
/**
* 新零售店铺
*/
BL("bl", "新零售店铺BL"),
;
/**
* 实际值
*/
private final String value;
/**
* 显示标签
*/
private final String label;
public static ESysName getEnumByValue(String value) {
for (ESysName enums : ESysName.values()) {
if (enums.getValue().equals(value)) {
return enums;
}
}
return null;
}
public static String getLabelByValue(String value) {
for (ESysName enums : ESysName.values()) {
if (enums.getValue().equals(value)) {
return enums.getLabel();
}
}
return "";
}
}

View File

@ -44,12 +44,16 @@ 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 "";
}
}

View File

@ -12,11 +12,6 @@ import java.util.concurrent.*;
@Component
public class ThreadUtils {
/**
* 初始化创建4个长度的固定线程池
*/
public static ExecutorService executorService = Executors.newFixedThreadPool(4);
/**
* 创建线程池
*/