Compare commits

..

No commits in common. "3979aaffc22b2fddb38577039bacc79e0c77407d" and "9be9647f6d7b549b261de99e8bc3680985687863" have entirely different histories.

33 changed files with 562 additions and 503 deletions

View File

@ -4,16 +4,23 @@ 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.*;
@ -27,9 +34,13 @@ import java.util.Date;
public class ApiCuMemberBusinessLicenseController extends BaseController {
@Autowired
private ICuMemberBusinessLicenseService iCuMemberBusinessLicenseService;
private ICuMemberBusinessLicenseService cuMemberBusinessLicenseService;
@Autowired
private ICuMemberAuthenticationService iCuMemberAuthenticationService;
private ICuMemberService iCuMemberService;
@Autowired
private ICuMemberBaseService iCuMemberBaseService;
@Autowired
private ICuMemberAuthenticationService authenticationService;
/**
@ -46,7 +57,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
Long pkMember = SecurityUtils.getUserId();
Integer pkCountry = SecurityUtils.getPkCountry();
//查询是否已实名认证
CuMemberAuthenticationVO authenticationVO = iCuMemberAuthenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(pkMember).pkCountry(pkCountry).build());
CuMemberAuthenticationVO authenticationVO = authenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(pkMember).pkCountry(pkCountry).build());
//验证实名认证的真实姓名与法人的姓名是否一致
if (null != authenticationVO) {
String accountName = authenticationVO.getAccountName();
@ -61,10 +72,11 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
CuMemberBusinessLicense memberBusinessLicense = BeanUtil.copyProperties(businessLicense, CuMemberBusinessLicense.class);
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
memberBusinessLicense.setPkCreator(pkMember);
return toAjax(iCuMemberBusinessLicenseService.save(memberBusinessLicense));
return toAjax(cuMemberBusinessLicenseService.save(memberBusinessLicense));
} else {
return VerifyParameters(businessLicense);
}
}
@ -80,7 +92,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
//参数校验
if (VerifyParameters(businessLicense).equals(AjaxResult.success())) {
//查询是否已实名认证
CuMemberAuthenticationVO authenticationVO = iCuMemberAuthenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(SecurityUtils.getUserId()).pkCountry(SecurityUtils.getPkCountry()).build());
CuMemberAuthenticationVO authenticationVO = authenticationService.selectCuMemberAuthenticationByPkMember(CuMemberAuthenticationVO.builder().pkMember(SecurityUtils.getUserId()).pkCountry(SecurityUtils.getPkCountry()).build());
//验证实名认证的真实姓名与法人的姓名是否一致
if (null != authenticationVO) {
String accountName = authenticationVO.getAccountName();
@ -94,7 +106,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
memberBusinessLicense.setModifiedTime(new Date());
memberBusinessLicense.setPkModified(SecurityUtils.getUserId());
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
return toAjax(iCuMemberBusinessLicenseService.updateById(memberBusinessLicense));
return toAjax(cuMemberBusinessLicenseService.updateById(memberBusinessLicense));
} else {
return VerifyParameters(businessLicense);
}
@ -109,9 +121,37 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
*/
@GetMapping("/detail")
public AjaxResult showDetail() {
return AjaxResult.success(iCuMemberBusinessLicenseService.selectBusinessLicenseById(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
return AjaxResult.success(cuMemberBusinessLicenseService.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

@ -1,20 +1,15 @@
package com.hzs.retail.sale.controller.service.impl;
import cn.hutool.core.codec.Base64Encoder;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Validator;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hzs.common.core.config.BdConfig;
import com.hzs.common.core.constant.*;
import com.hzs.common.core.domain.R;
import com.hzs.common.core.enums.*;
import com.hzs.common.core.exception.ServiceException;
import com.hzs.common.core.service.RedisService;
import com.hzs.common.core.utils.*;
import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.domain.member.account.CuMemberAccount;
import com.hzs.common.domain.member.base.CuMember;
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
@ -22,7 +17,6 @@ import com.hzs.common.domain.sale.ext.BdWaresDetailExt;
import com.hzs.common.domain.sale.ext.SaOrderExt;
import com.hzs.common.domain.sale.ext.SaOrderWaresLimitExt;
import com.hzs.common.domain.sale.order.*;
import com.hzs.common.domain.sale.product.BdProduct;
import com.hzs.common.domain.sale.wares.BdWaresRange;
import com.hzs.common.domain.system.base.BdStorehouse;
import com.hzs.common.domain.system.config.BdAwards;
@ -40,7 +34,6 @@ import com.hzs.sale.order.param.OrderItemsParam;
import com.hzs.sale.order.param.WaresNumberParam;
import com.hzs.sale.order.service.*;
import com.hzs.sale.order.service.impl.SaOrderHandle;
import com.hzs.sale.product.service.IBdProductService;
import com.hzs.sale.wares.service.IBdWaresDetailService;
import com.hzs.sale.wares.service.IBdWaresExtendService;
import com.hzs.sale.wares.service.IBdWaresRangeService;
@ -91,8 +84,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
private ISaOrderTempService iSaOrderTempService;
@Autowired
private ISaOrderWaresLimitService iSaOrderWaresLimitService;
@Autowired
private IBdProductService iBdProductService;
@Autowired
private RedisService redisService;
@ -713,9 +704,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
*/
private void pushOrderMq(SaOrderExt saOrderExt) {
try {
// 同步全网产品库存
this.allProductSync(saOrderExt);
if (EOrderType.RETAIL_REGISTER.getValue() == saOrderExt.getOrderType()
|| EOrderType.RETAIL_UPGRADE.getValue() == saOrderExt.getOrderType()
|| EOrderType.RETAIL_REPURCHASE.getValue() == saOrderExt.getOrderType()
@ -735,6 +723,8 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
@Override
public String onlinePaymentCallBack(Long pkMember, String orderCode) {
String resultStr;
// 临时订单信息
SaOrderTemp saOrderTemp = null;
// 获取缓存订单
SaOrderExt saOrderExt = redisService.getCacheObject(CacheConstants.RETAIL_TEMP_ORDER + pkMember + orderCode);
@ -1055,53 +1045,4 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
}
}
/**
* 同步全网产品库存
*
* @param saOrderExt
*/
private void allProductSync(SaOrderExt saOrderExt) {
if (EYesNo.NO.getIntValue() == BdConfig.getProductSync()) {
return;
}
Map<Integer, BdProduct> productMap = iBdProductService.queryProductMap(saOrderExt.getOrderItemsList().stream().map(SaOrderItems::getPkProduct).collect(Collectors.toSet()), null);
// 开启线程调用全网产品库存
// 请求参数
Map<String, Object> bodyMap = new HashMap<>();
bodyMap.put("source", BdConfig.getSysName());
bodyMap.put("orderCode", saOrderExt.getOrderCode());
List<Map<String, Object>> bodyDetailList = new ArrayList<>();
for (SaOrderItems saOrderItems : saOrderExt.getOrderItemsList()) {
Map<String, Object> detailMap = new HashMap<>();
detailMap.put("wmsCode", productMap.get(saOrderItems.getPkProduct()).getWmsCode());
detailMap.put("changeNum", saOrderItems.getQuantity());
bodyDetailList.add(detailMap);
}
bodyMap.put("detailList", bodyDetailList);
// 请求头
String header = Base64Encoder.encode(BdConfig.getSysName() + "!" + saOrderExt.getOrderCode());
ThreadUtils.threadPoolExecutor.submit(() -> {
log.info("同步产品,header: {}", header);
log.info("同步产品,bodyMap: {}", bodyMap);
HttpRequest httpRequest = HttpUtil.createPost(BdConfig.getProductSyncUrl());
httpRequest.header("authorization", header);
httpRequest.body(JSONUtil.toJsonStr(bodyMap));
httpRequest.setReadTimeout(5000);
String resultStr;
try {
resultStr = httpRequest.execute().body();
AjaxResult ajaxResult = JSONUtil.toBean(resultStr, AjaxResult.class);
log.info("同步产品,resultStr: {}", resultStr);
if (!ajaxResult.isSuccess()) {
resultStr = httpRequest.execute().body();
log.info("同步产品失败重试,resultStr: {}", resultStr);
}
} catch (Exception e) {
log.error("同步产品库存失败", e);
resultStr = httpRequest.execute().body();
log.info("同步产品异常重试,resultStr: {}", resultStr);
}
});
}
}

View File

@ -50,7 +50,11 @@ 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")
@ -98,10 +102,22 @@ 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();
@ -110,7 +126,7 @@ public class SaDeliverUnhandledController extends BaseController {
param.setTeamList(userAuthorityDTO.getUserTeamList());
startPage();
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
// 当查询有数据才进行处理
if (resultList.size() > 0) {
@ -141,10 +157,23 @@ 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();
@ -152,7 +181,7 @@ public class SaDeliverUnhandledController extends BaseController {
param.setVertexIdList(userAuthorityDTO.getVertexIdList());
param.setTeamList(userAuthorityDTO.getUserTeamList());
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
// 当查询有数据才进行处理
if (resultList.size() > 0) {

View File

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

View File

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

View File

@ -31,6 +31,7 @@ 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;
@ -44,6 +45,8 @@ public abstract class ParentOrderController extends BaseController {
@DubboReference
IAreaServiceApi iAreaServiceApi;
@DubboReference
ICurrencyServiceApi currencyServiceApi;
private ISaOrderService orderService;
@ -402,7 +405,8 @@ public abstract class ParentOrderController extends BaseController {
* @return boolean
*/
protected Boolean checkRecMsgBoolean(OrderParam orderParam) {
if (orderParam.getDeliveryWay() != null && (EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay())) {
if (orderParam.getDeliveryWay() != null && (EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay() ||
EDelivery.SHOP_PICKED_UP.getValue() == orderParam.getDeliveryWay())) {
orderParam.setTransType(null);
return orderParam.getSpecialArea() != null
&& orderParam.getOrderItemsParams() != null

View File

@ -34,19 +34,27 @@ 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 iTransactionCommonService;
private ITransactionCommonService transactionCommonService;
@Autowired
private ISaOrderChargeLogService iSaOrderChargeLogService;
private ISaOrderChargeLogService orderChargeLogService;
@DubboReference
IVertexServiceApi iVertexServiceApi;
IVertexServiceApi vertexServiceApi;
@DubboReference
IAreaServiceApi iAreaServiceApi;
IAreaServiceApi areaServiceApi;
/**
* 撤单信息列表
@ -88,18 +96,18 @@ public class SaOrderChargeLogController extends BaseController {
}
startPage();
List<SaOrderChargeLogExt> list = iSaOrderChargeLogService.cancellationList(orderChargeLogParam);
List<SaOrderChargeLogExt> list = orderChargeLogService.cancellationList(orderChargeLogParam);
List<OrderChargeLogVo> resultList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(list)) {
// 地区
R<Map<Integer, String>> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
R<Map<Integer, String>> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
// 体系
R<List<VertexDTO>> vertexAll = iVertexServiceApi.findAll();
R<List<VertexDTO>> vertexAll = vertexServiceApi.findAll();
Map<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(),
EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
ESupplyWay.values(), EDelivery.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) {
@ -187,9 +195,13 @@ public class SaOrderChargeLogController extends BaseController {
// 发货时间
orderChargeLogVo.setDeliveryTime(orderChargeLogExt.getDeliveryTime());
// 发货方式
orderChargeLogVo.setDeliveryWayStr(EDelivery.getLabelByValue(orderChargeLogExt.getDeliveryWay()));
if (orderChargeLogExt.getDeliveryWay() != null) {
orderChargeLogVo.setDeliveryWayStr(transactionMap.get(EDelivery.getDelivery(orderChargeLogExt.getDeliveryWay()).getKey()));
}
//销售方式
orderChargeLogVo.setOperateScopeStr(ESupplyWay.getLabelByVal(orderChargeLogExt.getOperateScope()));
if (orderChargeLogExt.getOperateScope() != null && ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()) != null) {
orderChargeLogVo.setOperateScopeStr(transactionMap.get(ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()).getKey()));
}
// 运输方式
List<String> tranList = new ArrayList<>();
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
@ -201,9 +213,13 @@ public class SaOrderChargeLogController extends BaseController {
}
orderChargeLogVo.setTranTypeStr(StringUtils.join(tranList, ","));
// 预售状态
orderChargeLogVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(orderChargeLogExt.getPreSaleStatus()));
if (orderChargeLogExt.getPreSaleStatus() != null) {
orderChargeLogVo.setPreSaleStatusStr(transactionMap.get(EPresaleStatus.getEPresaleStatus(orderChargeLogExt.getPreSaleStatus()).getKey()));
}
// 支付方式
orderChargeLogVo.setPayTypeStr(EOrderPayType.getLabelByValue(orderChargeLogExt.getPayType()));
if (orderChargeLogExt.getPayType() != null && EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()) != null) {
orderChargeLogVo.setPayTypeStr(EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()).getLabel());
}
// 撤单人
orderChargeLogVo.setCreatorName(orderChargeLogExt.getCancelTheOrderName());
// 终审
@ -262,18 +278,18 @@ public class SaOrderChargeLogController extends BaseController {
orderChargeLogParam.setEndCancelOrderTime(DateUtils.getEndTime(orderChargeLogParam.getEndCancelOrderTime()));
}
List<SaOrderChargeLogExt> list = iSaOrderChargeLogService.cancellationList(orderChargeLogParam);
List<SaOrderChargeLogExt> list = orderChargeLogService.cancellationList(orderChargeLogParam);
List<OrderChargeLogVo> resultList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(list)) {
// 地区
R<Map<Integer, String>> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
R<Map<Integer, String>> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry());
// 体系
R<List<VertexDTO>> vertexAll = iVertexServiceApi.findAll();
R<List<VertexDTO>> vertexAll = vertexServiceApi.findAll();
Map<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(),
EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
ESupplyWay.values(), EDelivery.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) {
@ -361,9 +377,13 @@ public class SaOrderChargeLogController extends BaseController {
// 发货时间
orderChargeLogVo.setDeliveryTime(orderChargeLogExt.getDeliveryTime());
// 发货方式
orderChargeLogVo.setDeliveryWayStr(EDelivery.getLabelByValue(orderChargeLogExt.getDeliveryWay()));
if (orderChargeLogExt.getDeliveryWay() != null) {
orderChargeLogVo.setDeliveryWayStr(transactionMap.get(EDelivery.getDelivery(orderChargeLogExt.getDeliveryWay()).getKey()));
}
//销售方式
orderChargeLogVo.setOperateScopeStr(ESupplyWay.getLabelByVal(orderChargeLogExt.getOperateScope()));
if (orderChargeLogExt.getOperateScope() != null && ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()) != null) {
orderChargeLogVo.setOperateScopeStr(transactionMap.get(ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()).getKey()));
}
// 运输方式
List<String> tranList = new ArrayList<>();
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
@ -375,9 +395,13 @@ public class SaOrderChargeLogController extends BaseController {
}
orderChargeLogVo.setTranTypeStr(StringUtils.join(tranList, ","));
// 预售状态
orderChargeLogVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(orderChargeLogExt.getPreSaleStatus()));
if (orderChargeLogExt.getPreSaleStatus() != null) {
orderChargeLogVo.setPreSaleStatusStr(transactionMap.get(EPresaleStatus.getEPresaleStatus(orderChargeLogExt.getPreSaleStatus()).getKey()));
}
// 支付方式
orderChargeLogVo.setPayTypeStr(EOrderPayType.getLabelByValue(orderChargeLogExt.getPayType()));
if (orderChargeLogExt.getPayType() != null && EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()) != null) {
orderChargeLogVo.setPayTypeStr(EOrderPayType.getEnumByValue(orderChargeLogExt.getPayType()).getLabel());
}
// 撤单人
orderChargeLogVo.setCreatorName(orderChargeLogExt.getCancelTheOrderName());
// 终审

View File

@ -5,6 +5,7 @@ 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;
@ -14,6 +15,7 @@ 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.*;
@ -39,12 +41,20 @@ 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
@ -106,18 +116,49 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 订单类型
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
if (null != waresOrderVo.getDeliveryWay()) {
EDelivery eDelivery = EDelivery.getDelivery(waresOrderVo.getDeliveryWay());
if (null != eDelivery) {
waresOrderVo.setDeliveryWayStr(eDelivery.getLabel());
}
}
// 运输方式
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
if (waresOrderVo.getTranType() != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
if (waresOrderVo.getPreSaleStatus() != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatusEnum != null) {
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
}
}
// 支付方式
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
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());
}
}
}
return getDataTable(resultList);
}
@ -151,7 +192,10 @@ 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) {
@ -165,18 +209,39 @@ public class SaOrderController extends ParentOrderController {
if (waresOrderVo.getRecCountry() != null) {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 订单类型
waresOrderVo.setOrderTypeVal(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
waresOrderVo.setDeliveryWayStr(EDelivery.getDelivery(waresOrderVo.getDeliveryWay()).getLabel());
// 运输方式
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
if (waresOrderVo.getTranType() != null && ETransportType.getETransportType(waresOrderVo.getTranType()) != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
if (waresOrderVo.getPreSaleStatus() != null && EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()) != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatusEnum != null) {
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
}
}
// 支付方式
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
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());
}
ExcelUtil<WaresOrderVo> util = new ExcelUtil<WaresOrderVo>(WaresOrderVo.class, iMenuColumnServiceApi.queryMenuColumn("Commodity", SecurityUtils.getUserId()).getData());
util.exportExcel(response, resultList, "商品订单导出");
@ -208,6 +273,8 @@ 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) {
//
@ -223,23 +290,41 @@ public class SaOrderController extends ParentOrderController {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 发货方式
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
if (null != waresOrderVo.getDeliveryWay()) {
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
}
// 运输方式
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
if (waresOrderVo.getTranType() != null) {
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
}
// 预售状态
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
if (waresOrderVo.getPreSaleStatus() != null) {
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
}
// 订单状态
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
if (waresOrderVo.getOrderStatus() != null) {
waresOrderVo.setOrderStatusStr(EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus()).getLabel());
}
// 支付方式
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
if (waresOrderVo.getPayType() != null) {
waresOrderVo.setPayTypeStr(EOrderPayType.getEnumByValue(waresOrderVo.getPayType()).getLabel());
}
// 订单类型
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
if (waresOrderVo.getOrderType() != null) {
waresOrderVo.setOrderTypeStr(EOrderType.getEnumByValue(waresOrderVo.getOrderType()).getLabel());
}
// 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
}
// 计算汇率
if (null != waresOrderVo.getInExchangeRate()) {
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
}
// 发货类型
waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
if (waresOrderVo.getShippingChannel() != null) {
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
}
// 计算产品总计
waresOrderVo.setProductPriceTotal(waresOrderVo.getProductPrice().multiply(BigDecimal.valueOf(waresOrderVo.getQuantity())));
}
@ -275,6 +360,8 @@ 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) {
//
@ -290,23 +377,56 @@ public class SaOrderController extends ParentOrderController {
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
}
// 发货方式
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()));
// 订单类型
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
// 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
if (waresOrderVo.getDeliveryWay() != null) {
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
}
// 运输方式
if (waresOrderVo.getTranType() != null) {
ETransportType transportType = ETransportType.getETransportType(waresOrderVo.getTranType());
if (transportType != null) {
waresOrderVo.setTranTypeStr(transportType.getLabel());
}
}
// 预售状态
if (waresOrderVo.getPreSaleStatus() != null) {
EPresaleStatus presaleStatus = EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus());
if (presaleStatus != null) {
waresOrderVo.setPreSaleStatusStr(presaleStatus.getLabel());
}
}
// 订单状态
if (waresOrderVo.getOrderStatus() != null) {
EOrderStatus orderStatus = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
if (orderStatus != null) {
waresOrderVo.setOrderStatusStr(orderStatus.getLabel());
}
}
// 支付方式
if (waresOrderVo.getPayType() != null) {
EOrderPayType orderPayType = EOrderPayType.getEnumByValue(waresOrderVo.getPayType());
if (orderPayType != null) {
waresOrderVo.setPayTypeStr(orderPayType.getLabel());
}
}
// 订单类型
if (waresOrderVo.getOrderType() != null) {
EOrderType orderType = EOrderType.getEnumByValue(waresOrderVo.getOrderType());
if (orderType != null) {
waresOrderVo.setOrderTypeStr(orderType.getLabel());
}
}
// 供应方式
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope()) && ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())) != null) {
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
}
// 计算汇率
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
// 发货类型
waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
if (waresOrderVo.getShippingChannel() != null) {
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
}
}
List<WaresOrderInfoVo> waresOrderInfoList = resultList.stream().map(a -> {
WaresOrderInfoVo waresOrderInfoVo = BeanUtil.copyProperties(a, WaresOrderInfoVo.class);

View File

@ -1,7 +1,6 @@
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;
@ -9,6 +8,14 @@ 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 {
@ -38,7 +45,6 @@ public class WaresOrderInfoVo implements Serializable {
/**
* 重量
*/
@BigDecimalFormat
@Excel(name = "重量(KG)")
private BigDecimal weight;
/**

View File

@ -10,6 +10,13 @@ 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 {
@ -305,6 +312,10 @@ public class WaresOrderVo implements Serializable {
* 重量
*/
private BigDecimal weight;
/**
* 展示汇率
*/
private BigDecimal inExchangeRate;
/**
* 产品订单明细列表
*/

View File

@ -16,7 +16,6 @@ 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;
@ -56,8 +55,6 @@ public class BdWaresController extends BaseController {
@DubboReference
IRangeServiceApi iRangeServiceApi;
@Autowired
private IBdWaresService iBdWaresService;
@Autowired
private IBdWaresAuthorizeService iBdWaresAuthorizeService;
@Autowired
@ -75,6 +72,8 @@ public class BdWaresController extends BaseController {
@Autowired
private IBdWaresSpecsPackService iBdWaresSpecsPackService;
@Autowired
private IBdWaresService iBdWaresService;
@Autowired
private IBdWaresLabelService iBdWaresLabelService;
@Autowired
private IBdWaresExtendService iBdWaresExtendService;
@ -141,9 +140,9 @@ public class BdWaresController extends BaseController {
// 所属专区
waresVo.setSpecialAreaVal(ESpecialArea.getESpecialArea(waresVo.getSpecialArea()));
// 供应方式
waresVo.setOperateScopeVal(ESupplyWay.getLabelByVal(waresVo.getOperateScope()));
waresVo.setOperateScopeVal(ESupplyWay.getEnumLabelByValue(waresVo.getOperateScope()));
// 预售状态
waresVo.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(waresVo.getPreSaleStatus()));
waresVo.setPreSaleStatusVal(EPresaleStatus.getEnumLabelByValue(waresVo.getPreSaleStatus()));
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
if (waresAuthorityVo != null) {
@ -960,29 +959,4 @@ 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,7 +6,6 @@ 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;
@ -158,12 +157,4 @@ 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

@ -0,0 +1,40 @@
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

@ -0,0 +1,26 @@
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

@ -1,24 +0,0 @@
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,7 +9,6 @@ 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;
@ -230,12 +229,4 @@ public interface IBdWaresService extends IService<BdWares> {
*/
List<String> listWaresCodeByVertex(Long pkVertex);
/**
* 查询非在售商品
*
* @param param
* @return
*/
List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param);
}

View File

@ -1175,10 +1175,4 @@ 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

@ -1,49 +0,0 @@
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,6 +71,14 @@
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,
@ -118,15 +126,6 @@
<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
@ -144,6 +143,10 @@
<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
@ -180,6 +183,14 @@
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,
@ -234,15 +245,6 @@
</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
@ -260,6 +262,9 @@
<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>
@ -463,15 +468,6 @@
#{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
@ -826,6 +822,7 @@
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,
@ -839,6 +836,7 @@
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,31 +487,4 @@
(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,6 +251,11 @@ 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()));
@ -365,6 +370,14 @@ public class EnumsInitController {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 供应方式
*/
for (ESupplyWay value : ESupplyWay.values()) {
initList.add(this.createData(value.getKey(), value.getLabel()));
}
/**
* 订单状态
*/
@ -372,6 +385,20 @@ 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()));
}
/**
* 交易类型
*/
@ -485,6 +512,13 @@ 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

@ -10,11 +10,6 @@ import org.springframework.stereotype.Component;
@ConfigurationProperties(prefix = "bd")
public class BdConfig {
/**
* 系统名称ESysName
*/
private static String sysName;
/**
* 当前环境
*/
@ -39,23 +34,6 @@ public class BdConfig {
private static Integer enable;
/**
* 商品同步是否开启0=开启1=不开启
*/
private static Integer productSync;
/**
* 商品同步地址
*/
private static String productSyncUrl;
public static String getSysName() {
return sysName;
}
public void setSysName(String sysName) {
BdConfig.sysName = sysName;
}
public static String getEnv() {
return env;
}
@ -103,22 +81,4 @@ public class BdConfig {
public void setEnable(Integer enable) {
BdConfig.enable = enable;
}
public static Integer getProductSync() {
return productSync;
}
public void setProductSync(Integer productSync) {
BdConfig.productSync = productSync;
}
public static String getProductSyncUrl() {
return productSyncUrl;
}
public void setProductSyncUrl(String productSyncUrl) {
BdConfig.productSyncUrl = productSyncUrl;
}
}

View File

@ -1,5 +1,6 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -13,17 +14,27 @@ public enum EDelivery {
/**
*
*/
EMPTY(0, "未知", 1),
EMPTY(0, "未知", 1, EnumsPrefixConstants.DELIVERY + "0"),
/**
* 快递发货
*/
FAST_MAIL(1, "快递发货", 0),
FAST_MAIL(1, "快递发货", 0, EnumsPrefixConstants.DELIVERY + "1"),
/**
* 公司自提
*/
COMPANY_PICKED_UP(2, "公司自提", 0),
COMPANY_PICKED_UP(2, "公司自提", 0, EnumsPrefixConstants.DELIVERY + "2"),
/**
* 店铺自提
*/
SHOP_PICKED_UP(3, "店铺自提", 0, EnumsPrefixConstants.DELIVERY + "3"),
/**
* 店铺配送
*/
SHOP_DELIVERY(4, "店铺配送", 0, EnumsPrefixConstants.DELIVERY + "4"),
;
@ -39,6 +50,10 @@ 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()) {
@ -48,17 +63,4 @@ 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,10 +1,15 @@
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
@ -13,12 +18,12 @@ public enum EOrderPayType {
/**
* 钱包
*/
WALLET(0, "钱包", 0),
WALLET(0, "钱包", 0,EnumsPrefixConstants.ORDER_PAY_TYPE + "0"),
/**
* 在线
*/
ONLINE(1, "在线", 0),
ONLINE(1, "在线", 0,EnumsPrefixConstants.ORDER_PAY_TYPE + "1"),
;
@ -34,17 +39,24 @@ public enum EOrderPayType {
* 是否启用0=,1= -- 来源EYesNo
*/
private final int enable;
/**
* 国际化翻译key值
*/
private final String key;
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
/**
* 根据值获取枚举
*
* @param value
* @return
*/
public static EOrderPayType getEnumByValue(int value) {
for (EOrderPayType enums : EOrderPayType.values()) {
if (enums.value == value) {
return enums.getLabel();
if (enums.getValue() == value) {
return enums;
}
}
return "";
return null;
}
}

View File

@ -4,6 +4,9 @@ import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.ArrayList;
import java.util.List;
/**
* 订单状态
*/
@ -60,6 +63,27 @@ 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) {
@ -69,16 +93,4 @@ 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,5 +1,6 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -13,17 +14,17 @@ public enum EPresaleStatus {
/**
* 在售
*/
ON_SALE(0, "在售", 0),
ON_SALE(0, "在售", 0, EnumsPrefixConstants.PRESALE_STATUS + "0"),
/**
* 预售
*/
PRESALE(1, "预售", 0),
PRESALE(1, "预售", 0, EnumsPrefixConstants.PRESALE_STATUS + "1"),
/**
* 缺货
*/
OUT_STOCK(3, "缺货", 0),
OUT_STOCK(3, "缺货", 0, EnumsPrefixConstants.PRESALE_STATUS + "3"),
;
@ -39,6 +40,10 @@ 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()) {
@ -49,12 +54,12 @@ public enum EPresaleStatus {
return null;
}
public static String getLabelByValue(Integer value) {
public static String getEnumLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EPresaleStatus enums : EPresaleStatus.values()) {
if (enums.getValue() == value) {
if (enums.value == value) {
return enums.getLabel();
}
}

View File

@ -1,5 +1,6 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -10,9 +11,9 @@ import lombok.Getter;
@Getter
public enum EShippingChannel {
TOTAL_WAREHOUSE(1, "总仓发货", 0),
TOTAL_WAREHOUSE(1, "总仓发货", 0, EnumsPrefixConstants.E_SHIPPING_CHANNEL + "1"),
A_PIECE(2, "一件代发", 0),
A_PIECE(2, "一件代发", 0, EnumsPrefixConstants.E_SHIPPING_CHANNEL + "2"),
;
@ -22,6 +23,10 @@ public enum EShippingChannel {
* 是否启用0=,1= -- 来源EYesNo
*/
private final int enable;
/**
* 国际化翻译key值
*/
private final String key;
/**
* 根据值返回枚举
@ -37,18 +42,4 @@ 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,18 +99,6 @@ 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,5 +1,6 @@
package com.hzs.common.core.enums;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -13,12 +14,12 @@ public enum ESupplyWay {
/**
* 自营
*/
SELF(0, "自营", 0),
SELF(0, "自营", 0, EnumsPrefixConstants.SUPPLY_WAY + "0"),
/**
* 非自营
*/
NO_SELF(1, "非自营", 0),
NO_SELF(1, "非自营", 0, EnumsPrefixConstants.SUPPLY_WAY + "1"),
;
@ -34,6 +35,10 @@ 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()) {
@ -44,13 +49,13 @@ public enum ESupplyWay {
return null;
}
public static String getLabelByVal(Integer value) {
public static String getEnumLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
if (eSupplyWay.getValue() == value) {
return eSupplyWay.getLabel();
for (ESupplyWay enums : ESupplyWay.values()) {
if (enums.value == value) {
return enums.getLabel();
}
}
return "";

View File

@ -1,53 +0,0 @@
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,16 +44,12 @@ public enum ETransportType {
private final String key;
public static String getLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (ETransportType enums : ETransportType.values()) {
if (enums.value == value) {
return enums.getLabel();
public static ETransportType getETransportType(int value){
for (ETransportType eTransportType : ETransportType.values()) {
if (eTransportType.getValue() == value){
return eTransportType;
}
}
return "";
return null;
}
}

View File

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

View File

@ -13,6 +13,9 @@ import lombok.experimental.Accessors;
/**
* 订单缓存数据临时表
*
* @author hzs
* @since 2025-02-25
*/
@Builder
@AllArgsConstructor