Compare commits
No commits in common. "3979aaffc22b2fddb38577039bacc79e0c77407d" and "9be9647f6d7b549b261de99e8bc3680985687863" have entirely different histories.
3979aaffc2
...
9be9647f6d
|
|
@ -4,16 +4,23 @@ import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.hzs.common.core.annotation.RepeatSubmitSimple;
|
import com.hzs.common.core.annotation.RepeatSubmitSimple;
|
||||||
import com.hzs.common.core.constant.msg.FinanceMsgConstants;
|
import com.hzs.common.core.constant.msg.FinanceMsgConstants;
|
||||||
import com.hzs.common.core.enums.EApproveStatus;
|
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.utils.StringUtils;
|
||||||
import com.hzs.common.core.web.controller.BaseController;
|
import com.hzs.common.core.web.controller.BaseController;
|
||||||
import com.hzs.common.core.web.domain.AjaxResult;
|
import com.hzs.common.core.web.domain.AjaxResult;
|
||||||
import com.hzs.common.domain.member.account.CuMemberBusinessLicense;
|
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.security.utils.SecurityUtils;
|
||||||
import com.hzs.common.util.TransactionUtils;
|
import com.hzs.common.util.TransactionUtils;
|
||||||
import com.hzs.member.account.service.ICuMemberAuthenticationService;
|
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.service.ICuMemberBusinessLicenseService;
|
||||||
import com.hzs.member.account.vo.CuMemberAuthenticationVO;
|
import com.hzs.member.account.vo.CuMemberAuthenticationVO;
|
||||||
import com.hzs.member.account.vo.CuMemberBusinessLicenseVO;
|
import com.hzs.member.account.vo.CuMemberBusinessLicenseVO;
|
||||||
|
import com.hzs.member.base.service.ICuMemberService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
@ -27,9 +34,13 @@ import java.util.Date;
|
||||||
public class ApiCuMemberBusinessLicenseController extends BaseController {
|
public class ApiCuMemberBusinessLicenseController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberBusinessLicenseService iCuMemberBusinessLicenseService;
|
private ICuMemberBusinessLicenseService cuMemberBusinessLicenseService;
|
||||||
@Autowired
|
@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();
|
Long pkMember = SecurityUtils.getUserId();
|
||||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
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) {
|
if (null != authenticationVO) {
|
||||||
String accountName = authenticationVO.getAccountName();
|
String accountName = authenticationVO.getAccountName();
|
||||||
|
|
@ -61,10 +72,11 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
|
||||||
CuMemberBusinessLicense memberBusinessLicense = BeanUtil.copyProperties(businessLicense, CuMemberBusinessLicense.class);
|
CuMemberBusinessLicense memberBusinessLicense = BeanUtil.copyProperties(businessLicense, CuMemberBusinessLicense.class);
|
||||||
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
|
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
|
||||||
memberBusinessLicense.setPkCreator(pkMember);
|
memberBusinessLicense.setPkCreator(pkMember);
|
||||||
return toAjax(iCuMemberBusinessLicenseService.save(memberBusinessLicense));
|
return toAjax(cuMemberBusinessLicenseService.save(memberBusinessLicense));
|
||||||
} else {
|
} else {
|
||||||
return VerifyParameters(businessLicense);
|
return VerifyParameters(businessLicense);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -80,7 +92,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
|
||||||
//参数校验
|
//参数校验
|
||||||
if (VerifyParameters(businessLicense).equals(AjaxResult.success())) {
|
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) {
|
if (null != authenticationVO) {
|
||||||
String accountName = authenticationVO.getAccountName();
|
String accountName = authenticationVO.getAccountName();
|
||||||
|
|
@ -94,7 +106,7 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
|
||||||
memberBusinessLicense.setModifiedTime(new Date());
|
memberBusinessLicense.setModifiedTime(new Date());
|
||||||
memberBusinessLicense.setPkModified(SecurityUtils.getUserId());
|
memberBusinessLicense.setPkModified(SecurityUtils.getUserId());
|
||||||
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
|
memberBusinessLicense.setApproveStatus(EApproveStatus.ALREADY_SUBMIT.getValue());
|
||||||
return toAjax(iCuMemberBusinessLicenseService.updateById(memberBusinessLicense));
|
return toAjax(cuMemberBusinessLicenseService.updateById(memberBusinessLicense));
|
||||||
} else {
|
} else {
|
||||||
return VerifyParameters(businessLicense);
|
return VerifyParameters(businessLicense);
|
||||||
}
|
}
|
||||||
|
|
@ -109,9 +121,37 @@ public class ApiCuMemberBusinessLicenseController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public AjaxResult showDetail() {
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验参数
|
* 校验参数
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,15 @@
|
||||||
package com.hzs.retail.sale.controller.service.impl;
|
package com.hzs.retail.sale.controller.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.codec.Base64Encoder;
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.lang.Validator;
|
import cn.hutool.core.lang.Validator;
|
||||||
import cn.hutool.http.HttpRequest;
|
|
||||||
import cn.hutool.http.HttpUtil;
|
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
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.constant.*;
|
||||||
import com.hzs.common.core.domain.R;
|
import com.hzs.common.core.domain.R;
|
||||||
import com.hzs.common.core.enums.*;
|
import com.hzs.common.core.enums.*;
|
||||||
import com.hzs.common.core.exception.ServiceException;
|
import com.hzs.common.core.exception.ServiceException;
|
||||||
import com.hzs.common.core.service.RedisService;
|
import com.hzs.common.core.service.RedisService;
|
||||||
import com.hzs.common.core.utils.*;
|
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.account.CuMemberAccount;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
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.SaOrderExt;
|
||||||
import com.hzs.common.domain.sale.ext.SaOrderWaresLimitExt;
|
import com.hzs.common.domain.sale.ext.SaOrderWaresLimitExt;
|
||||||
import com.hzs.common.domain.sale.order.*;
|
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.sale.wares.BdWaresRange;
|
||||||
import com.hzs.common.domain.system.base.BdStorehouse;
|
import com.hzs.common.domain.system.base.BdStorehouse;
|
||||||
import com.hzs.common.domain.system.config.BdAwards;
|
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.param.WaresNumberParam;
|
||||||
import com.hzs.sale.order.service.*;
|
import com.hzs.sale.order.service.*;
|
||||||
import com.hzs.sale.order.service.impl.SaOrderHandle;
|
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.IBdWaresDetailService;
|
||||||
import com.hzs.sale.wares.service.IBdWaresExtendService;
|
import com.hzs.sale.wares.service.IBdWaresExtendService;
|
||||||
import com.hzs.sale.wares.service.IBdWaresRangeService;
|
import com.hzs.sale.wares.service.IBdWaresRangeService;
|
||||||
|
|
@ -91,8 +84,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
private ISaOrderTempService iSaOrderTempService;
|
private ISaOrderTempService iSaOrderTempService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISaOrderWaresLimitService iSaOrderWaresLimitService;
|
private ISaOrderWaresLimitService iSaOrderWaresLimitService;
|
||||||
@Autowired
|
|
||||||
private IBdProductService iBdProductService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|
@ -713,9 +704,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
*/
|
*/
|
||||||
private void pushOrderMq(SaOrderExt saOrderExt) {
|
private void pushOrderMq(SaOrderExt saOrderExt) {
|
||||||
try {
|
try {
|
||||||
// 同步全网产品库存
|
|
||||||
this.allProductSync(saOrderExt);
|
|
||||||
|
|
||||||
if (EOrderType.RETAIL_REGISTER.getValue() == saOrderExt.getOrderType()
|
if (EOrderType.RETAIL_REGISTER.getValue() == saOrderExt.getOrderType()
|
||||||
|| EOrderType.RETAIL_UPGRADE.getValue() == saOrderExt.getOrderType()
|
|| EOrderType.RETAIL_UPGRADE.getValue() == saOrderExt.getOrderType()
|
||||||
|| EOrderType.RETAIL_REPURCHASE.getValue() == saOrderExt.getOrderType()
|
|| EOrderType.RETAIL_REPURCHASE.getValue() == saOrderExt.getOrderType()
|
||||||
|
|
@ -735,6 +723,8 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
@Override
|
@Override
|
||||||
public String onlinePaymentCallBack(Long pkMember, String orderCode) {
|
public String onlinePaymentCallBack(Long pkMember, String orderCode) {
|
||||||
String resultStr;
|
String resultStr;
|
||||||
|
// 临时订单信息
|
||||||
|
SaOrderTemp saOrderTemp = null;
|
||||||
|
|
||||||
// 获取缓存订单
|
// 获取缓存订单
|
||||||
SaOrderExt saOrderExt = redisService.getCacheObject(CacheConstants.RETAIL_TEMP_ORDER + pkMember + orderCode);
|
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,11 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
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
|
@RestController
|
||||||
@RequestMapping("/manage/deliver-unhandled")
|
@RequestMapping("/manage/deliver-unhandled")
|
||||||
|
|
@ -98,10 +102,22 @@ public class SaDeliverUnhandledController extends BaseController {
|
||||||
param.setSystemType(SecurityUtils.getSystemType());
|
param.setSystemType(SecurityUtils.getSystemType());
|
||||||
// 未合单目前查询状态(已付款)
|
// 未合单目前查询状态(已付款)
|
||||||
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
|
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
|
||||||
// 查询语句已经写死查询【在售】,此处可以直接赋空
|
|
||||||
param.setPreSaleStatus(null);
|
|
||||||
|
|
||||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
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();
|
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||||
|
|
@ -110,7 +126,7 @@ public class SaDeliverUnhandledController extends BaseController {
|
||||||
param.setTeamList(userAuthorityDTO.getUserTeamList());
|
param.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
||||||
|
|
||||||
// 当查询有数据才进行处理
|
// 当查询有数据才进行处理
|
||||||
if (resultList.size() > 0) {
|
if (resultList.size() > 0) {
|
||||||
|
|
@ -141,10 +157,23 @@ public class SaDeliverUnhandledController extends BaseController {
|
||||||
param.setSystemType(SecurityUtils.getSystemType());
|
param.setSystemType(SecurityUtils.getSystemType());
|
||||||
// 未合单目前查询状态(已付款)
|
// 未合单目前查询状态(已付款)
|
||||||
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
|
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
|
||||||
// 查询语句已经写死查询【在售】,此处可以直接赋空
|
|
||||||
param.setPreSaleStatus(null);
|
|
||||||
|
|
||||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
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();
|
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||||
|
|
@ -152,7 +181,7 @@ public class SaDeliverUnhandledController extends BaseController {
|
||||||
param.setVertexIdList(userAuthorityDTO.getVertexIdList());
|
param.setVertexIdList(userAuthorityDTO.getVertexIdList());
|
||||||
param.setTeamList(userAuthorityDTO.getUserTeamList());
|
param.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||||
|
|
||||||
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
||||||
|
|
||||||
// 当查询有数据才进行处理
|
// 当查询有数据才进行处理
|
||||||
if (resultList.size() > 0) {
|
if (resultList.size() > 0) {
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,15 @@ public class DeliverUnhandledParam extends BaseAuthorityEntity {
|
||||||
*/
|
*/
|
||||||
private String specsName;
|
private String specsName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原单号
|
||||||
|
*/
|
||||||
|
private String originalOrderCode;
|
||||||
|
/**
|
||||||
|
* 原单号ID
|
||||||
|
*/
|
||||||
|
private Long pkOriginalOrder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发货仓库
|
* 发货仓库
|
||||||
*/
|
*/
|
||||||
|
|
@ -178,9 +187,4 @@ public class DeliverUnhandledParam extends BaseAuthorityEntity {
|
||||||
*/
|
*/
|
||||||
private Long pkVertex;
|
private Long pkVertex;
|
||||||
|
|
||||||
/**
|
|
||||||
* 非售商品列表
|
|
||||||
*/
|
|
||||||
private List<Integer> pkWaresList;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,12 @@ public class DeliverUnhandledVO {
|
||||||
@Excel(name = "预售状态")
|
@Excel(name = "预售状态")
|
||||||
private String preSaleStatusVal;
|
private String preSaleStatusVal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原单号
|
||||||
|
*/
|
||||||
|
@Excel(name = "原单号")
|
||||||
|
private String originalOrderCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ import com.hzs.sale.shopping.vo.ProductGroup;
|
||||||
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
|
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
|
||||||
import com.hzs.sale.shopping.vo.ShoppingCartVO;
|
import com.hzs.sale.shopping.vo.ShoppingCartVO;
|
||||||
import com.hzs.system.base.IAreaServiceApi;
|
import com.hzs.system.base.IAreaServiceApi;
|
||||||
|
import com.hzs.system.base.ICurrencyServiceApi;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -44,6 +45,8 @@ public abstract class ParentOrderController extends BaseController {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IAreaServiceApi iAreaServiceApi;
|
IAreaServiceApi iAreaServiceApi;
|
||||||
|
@DubboReference
|
||||||
|
ICurrencyServiceApi currencyServiceApi;
|
||||||
|
|
||||||
private ISaOrderService orderService;
|
private ISaOrderService orderService;
|
||||||
|
|
||||||
|
|
@ -402,7 +405,8 @@ public abstract class ParentOrderController extends BaseController {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
protected Boolean checkRecMsgBoolean(OrderParam orderParam) {
|
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);
|
orderParam.setTransType(null);
|
||||||
return orderParam.getSpecialArea() != null
|
return orderParam.getSpecialArea() != null
|
||||||
&& orderParam.getOrderItemsParams() != null
|
&& orderParam.getOrderItemsParams() != null
|
||||||
|
|
|
||||||
|
|
@ -34,19 +34,27 @@ import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
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
|
@RestController
|
||||||
@RequestMapping("/manage/order-charge-log")
|
@RequestMapping("/manage/order-charge-log")
|
||||||
public class SaOrderChargeLogController extends BaseController {
|
public class SaOrderChargeLogController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITransactionCommonService iTransactionCommonService;
|
private ITransactionCommonService transactionCommonService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISaOrderChargeLogService iSaOrderChargeLogService;
|
private ISaOrderChargeLogService orderChargeLogService;
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IVertexServiceApi iVertexServiceApi;
|
IVertexServiceApi vertexServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IAreaServiceApi iAreaServiceApi;
|
IAreaServiceApi areaServiceApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 撤单信息列表
|
* 撤单信息列表
|
||||||
|
|
@ -88,18 +96,18 @@ public class SaOrderChargeLogController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SaOrderChargeLogExt> list = iSaOrderChargeLogService.cancellationList(orderChargeLogParam);
|
List<SaOrderChargeLogExt> list = orderChargeLogService.cancellationList(orderChargeLogParam);
|
||||||
List<OrderChargeLogVo> resultList = new ArrayList<>();
|
List<OrderChargeLogVo> resultList = new ArrayList<>();
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(list)) {
|
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<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
|
||||||
|
|
||||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(),
|
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
|
||||||
EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.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());
|
EOrderType.values(), ETransportType.values(), EYesNo.values(), EShippingChannel.values(), EUnit.values(), ESignSource.values(), EOrderSource.values());
|
||||||
|
|
||||||
for (SaOrderChargeLogExt orderChargeLogExt : list) {
|
for (SaOrderChargeLogExt orderChargeLogExt : list) {
|
||||||
|
|
@ -187,9 +195,13 @@ public class SaOrderChargeLogController extends BaseController {
|
||||||
// 发货时间
|
// 发货时间
|
||||||
orderChargeLogVo.setDeliveryTime(orderChargeLogExt.getDeliveryTime());
|
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<>();
|
List<String> tranList = new ArrayList<>();
|
||||||
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
|
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
|
||||||
|
|
@ -201,9 +213,13 @@ public class SaOrderChargeLogController extends BaseController {
|
||||||
}
|
}
|
||||||
orderChargeLogVo.setTranTypeStr(StringUtils.join(tranList, ","));
|
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());
|
orderChargeLogVo.setCreatorName(orderChargeLogExt.getCancelTheOrderName());
|
||||||
// 终审
|
// 终审
|
||||||
|
|
@ -262,18 +278,18 @@ public class SaOrderChargeLogController extends BaseController {
|
||||||
orderChargeLogParam.setEndCancelOrderTime(DateUtils.getEndTime(orderChargeLogParam.getEndCancelOrderTime()));
|
orderChargeLogParam.setEndCancelOrderTime(DateUtils.getEndTime(orderChargeLogParam.getEndCancelOrderTime()));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SaOrderChargeLogExt> list = iSaOrderChargeLogService.cancellationList(orderChargeLogParam);
|
List<SaOrderChargeLogExt> list = orderChargeLogService.cancellationList(orderChargeLogParam);
|
||||||
List<OrderChargeLogVo> resultList = new ArrayList<>();
|
List<OrderChargeLogVo> resultList = new ArrayList<>();
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(list)) {
|
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<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
|
||||||
|
|
||||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(),
|
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
|
||||||
EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.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());
|
EOrderType.values(), ETransportType.values(), EYesNo.values(), EShippingChannel.values(), EUnit.values(), ESignSource.values(), EOrderSource.values());
|
||||||
|
|
||||||
for (SaOrderChargeLogExt orderChargeLogExt : list) {
|
for (SaOrderChargeLogExt orderChargeLogExt : list) {
|
||||||
|
|
@ -361,9 +377,13 @@ public class SaOrderChargeLogController extends BaseController {
|
||||||
// 发货时间
|
// 发货时间
|
||||||
orderChargeLogVo.setDeliveryTime(orderChargeLogExt.getDeliveryTime());
|
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<>();
|
List<String> tranList = new ArrayList<>();
|
||||||
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
|
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
|
||||||
|
|
@ -375,9 +395,13 @@ public class SaOrderChargeLogController extends BaseController {
|
||||||
}
|
}
|
||||||
orderChargeLogVo.setTranTypeStr(StringUtils.join(tranList, ","));
|
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());
|
orderChargeLogVo.setCreatorName(orderChargeLogExt.getCancelTheOrderName());
|
||||||
// 终审
|
// 终审
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.hzs.common.core.annotation.AccessPermissions;
|
import com.hzs.common.core.annotation.AccessPermissions;
|
||||||
import com.hzs.common.core.annotation.Log;
|
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.enums.*;
|
||||||
import com.hzs.common.core.utils.DateUtils;
|
import com.hzs.common.core.utils.DateUtils;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
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.ext.SaOrderItemsExt;
|
||||||
import com.hzs.common.domain.sale.order.SaOrderRemarks;
|
import com.hzs.common.domain.sale.order.SaOrderRemarks;
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
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.controller.ParentOrderController;
|
||||||
import com.hzs.sale.order.dto.OrderBusinessTemplate;
|
import com.hzs.sale.order.dto.OrderBusinessTemplate;
|
||||||
import com.hzs.sale.order.param.*;
|
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
|
@RestController
|
||||||
@RequestMapping("/manage/order")
|
@RequestMapping("/manage/order")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SaOrderController extends ParentOrderController {
|
public class SaOrderController extends ParentOrderController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITransactionCommonService iTransactionCommonService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISaOrderService orderService;
|
private ISaOrderService orderService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -106,18 +116,49 @@ public class SaOrderController extends ParentOrderController {
|
||||||
if (waresOrderVo.getRecCountry() != null) {
|
if (waresOrderVo.getRecCountry() != null) {
|
||||||
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
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);
|
return getDataTable(resultList);
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +192,10 @@ public class SaOrderController extends ParentOrderController {
|
||||||
waresOrderParam.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList());
|
waresOrderParam.setAreaScopeList(userAuthorityDTO.getRoleAreaScopeList());
|
||||||
waresOrderParam.setVertexIdList(userAuthorityDTO.getVertexIdList());
|
waresOrderParam.setVertexIdList(userAuthorityDTO.getVertexIdList());
|
||||||
waresOrderParam.setTeamList(userAuthorityDTO.getUserTeamList());
|
waresOrderParam.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||||
|
// startPage();
|
||||||
List<WaresOrderVo> resultList = orderService.selectByOrderInfoList(waresOrderParam);
|
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) {
|
for (WaresOrderVo waresOrderVo : resultList) {
|
||||||
// 省
|
// 省
|
||||||
if (waresOrderVo.getRecProvince() != null) {
|
if (waresOrderVo.getRecProvince() != null) {
|
||||||
|
|
@ -165,18 +209,39 @@ public class SaOrderController extends ParentOrderController {
|
||||||
if (waresOrderVo.getRecCountry() != null) {
|
if (waresOrderVo.getRecCountry() != null) {
|
||||||
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
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());
|
ExcelUtil<WaresOrderVo> util = new ExcelUtil<WaresOrderVo>(WaresOrderVo.class, iMenuColumnServiceApi.queryMenuColumn("Commodity", SecurityUtils.getUserId()).getData());
|
||||||
util.exportExcel(response, resultList, "商品订单导出");
|
util.exportExcel(response, resultList, "商品订单导出");
|
||||||
|
|
@ -208,6 +273,8 @@ public class SaOrderController extends ParentOrderController {
|
||||||
startPage();
|
startPage();
|
||||||
List<WaresOrderVo> resultList = orderItemsService.selectByInvestmentList(waresOrderParam);
|
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();
|
Map<Integer, String> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
|
||||||
for (WaresOrderVo waresOrderVo : resultList) {
|
for (WaresOrderVo waresOrderVo : resultList) {
|
||||||
// 省
|
// 省
|
||||||
|
|
@ -223,23 +290,41 @@ public class SaOrderController extends ParentOrderController {
|
||||||
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
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())) {
|
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())));
|
waresOrderVo.setProductPriceTotal(waresOrderVo.getProductPrice().multiply(BigDecimal.valueOf(waresOrderVo.getQuantity())));
|
||||||
}
|
}
|
||||||
|
|
@ -275,6 +360,8 @@ public class SaOrderController extends ParentOrderController {
|
||||||
List<WaresOrderVo> resultList = orderItemsService.selectByInvestmentList(waresOrderParam);
|
List<WaresOrderVo> resultList = orderItemsService.selectByInvestmentList(waresOrderParam);
|
||||||
|
|
||||||
Map<Integer, String> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
|
Map<Integer, String> areaMap = areaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
|
||||||
|
// 获取需要翻译的枚举翻译
|
||||||
|
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values());
|
||||||
|
|
||||||
for (WaresOrderVo waresOrderVo : resultList) {
|
for (WaresOrderVo waresOrderVo : resultList) {
|
||||||
// 省
|
// 省
|
||||||
|
|
@ -290,23 +377,56 @@ public class SaOrderController extends ParentOrderController {
|
||||||
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
||||||
}
|
}
|
||||||
// 发货方式
|
// 发货方式
|
||||||
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
|
if (waresOrderVo.getDeliveryWay() != null) {
|
||||||
// 运输方式
|
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + 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.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 -> {
|
List<WaresOrderInfoVo> waresOrderInfoList = resultList.stream().map(a -> {
|
||||||
WaresOrderInfoVo waresOrderInfoVo = BeanUtil.copyProperties(a, WaresOrderInfoVo.class);
|
WaresOrderInfoVo waresOrderInfoVo = BeanUtil.copyProperties(a, WaresOrderInfoVo.class);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.hzs.sale.order.vo;
|
package com.hzs.sale.order.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.hzs.common.core.annotation.BigDecimalFormat;
|
|
||||||
import com.hzs.common.core.annotation.Excel;
|
import com.hzs.common.core.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -9,6 +8,14 @@ import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
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
|
@Data
|
||||||
public class WaresOrderInfoVo implements Serializable {
|
public class WaresOrderInfoVo implements Serializable {
|
||||||
|
|
||||||
|
|
@ -38,7 +45,6 @@ public class WaresOrderInfoVo implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 重量
|
* 重量
|
||||||
*/
|
*/
|
||||||
@BigDecimalFormat
|
|
||||||
@Excel(name = "重量(KG)")
|
@Excel(name = "重量(KG)")
|
||||||
private BigDecimal weight;
|
private BigDecimal weight;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,13 @@ import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: yuhui
|
||||||
|
* @Time: 2023/1/31 14:09
|
||||||
|
* @Classname: WaresOrderVo
|
||||||
|
* @PackageName: com.hzs.sale.order.vo
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WaresOrderVo implements Serializable {
|
public class WaresOrderVo implements Serializable {
|
||||||
|
|
||||||
|
|
@ -305,6 +312,10 @@ public class WaresOrderVo implements Serializable {
|
||||||
* 重量
|
* 重量
|
||||||
*/
|
*/
|
||||||
private BigDecimal weight;
|
private BigDecimal weight;
|
||||||
|
/**
|
||||||
|
* 展示汇率
|
||||||
|
*/
|
||||||
|
private BigDecimal inExchangeRate;
|
||||||
/**
|
/**
|
||||||
* 产品订单明细列表
|
* 产品订单明细列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import com.hzs.common.core.web.domain.AjaxResult;
|
||||||
import com.hzs.common.core.web.page.TableDataInfo;
|
import com.hzs.common.core.web.page.TableDataInfo;
|
||||||
import com.hzs.common.domain.sale.classify.BdSpecs;
|
import com.hzs.common.domain.sale.classify.BdSpecs;
|
||||||
import com.hzs.common.domain.sale.ext.BdWaresDetailExt;
|
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.BdWaresSpecsRelationExt;
|
||||||
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
|
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
|
||||||
import com.hzs.common.domain.sale.product.BdAreaClassify;
|
import com.hzs.common.domain.sale.product.BdAreaClassify;
|
||||||
|
|
@ -56,8 +55,6 @@ public class BdWaresController extends BaseController {
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IRangeServiceApi iRangeServiceApi;
|
IRangeServiceApi iRangeServiceApi;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IBdWaresService iBdWaresService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresAuthorizeService iBdWaresAuthorizeService;
|
private IBdWaresAuthorizeService iBdWaresAuthorizeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -75,6 +72,8 @@ public class BdWaresController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresSpecsPackService iBdWaresSpecsPackService;
|
private IBdWaresSpecsPackService iBdWaresSpecsPackService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private IBdWaresService iBdWaresService;
|
||||||
|
@Autowired
|
||||||
private IBdWaresLabelService iBdWaresLabelService;
|
private IBdWaresLabelService iBdWaresLabelService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresExtendService iBdWaresExtendService;
|
private IBdWaresExtendService iBdWaresExtendService;
|
||||||
|
|
@ -141,9 +140,9 @@ public class BdWaresController extends BaseController {
|
||||||
// 所属专区
|
// 所属专区
|
||||||
waresVo.setSpecialAreaVal(ESpecialArea.getESpecialArea(waresVo.getSpecialArea()));
|
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());
|
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||||
if (waresAuthorityVo != null) {
|
if (waresAuthorityVo != null) {
|
||||||
|
|
@ -960,29 +959,4 @@ public class BdWaresController extends BaseController {
|
||||||
return AjaxResult.success();
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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.sale.wares.BdWaresDetail;
|
||||||
import com.hzs.common.domain.system.config.BdAgreement;
|
import com.hzs.common.domain.system.config.BdAgreement;
|
||||||
import com.hzs.retail.wares.param.RetailWaresParam;
|
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.param.WaresParams;
|
||||||
import com.hzs.sale.wares.vo.WaresAuthorityVo;
|
import com.hzs.sale.wares.vo.WaresAuthorityVo;
|
||||||
import com.hzs.sale.wares.vo.WaresVo;
|
import com.hzs.sale.wares.vo.WaresVo;
|
||||||
|
|
@ -158,12 +157,4 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
|
||||||
*/
|
*/
|
||||||
List<String> listWaresCodeByVertex(@Param("pkVertex") Long pkVertex);
|
List<String> listWaresCodeByVertex(@Param("pkVertex") Long pkVertex);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询非在售商品
|
|
||||||
*
|
|
||||||
* @param param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<BdWaresExt> listWaresNoSale(@Param("param") WaresNoSaleParam param);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -9,7 +9,6 @@ import com.hzs.common.domain.system.config.BdAgreement;
|
||||||
import com.hzs.common.domain.system.config.ext.BdRangeExt;
|
import com.hzs.common.domain.system.config.ext.BdRangeExt;
|
||||||
import com.hzs.retail.wares.param.RetailWaresParam;
|
import com.hzs.retail.wares.param.RetailWaresParam;
|
||||||
import com.hzs.sale.wares.param.ComputeWaresPrice;
|
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.param.WaresParams;
|
||||||
import com.hzs.sale.wares.vo.WaresAuthorityVo;
|
import com.hzs.sale.wares.vo.WaresAuthorityVo;
|
||||||
import com.hzs.sale.wares.vo.WaresVo;
|
import com.hzs.sale.wares.vo.WaresVo;
|
||||||
|
|
@ -230,12 +229,4 @@ public interface IBdWaresService extends IService<BdWares> {
|
||||||
*/
|
*/
|
||||||
List<String> listWaresCodeByVertex(Long pkVertex);
|
List<String> listWaresCodeByVertex(Long pkVertex);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询非在售商品
|
|
||||||
*
|
|
||||||
* @param param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1175,10 +1175,4 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
public List<String> listWaresCodeByVertex(Long pkVertex) {
|
public List<String> listWaresCodeByVertex(Long pkVertex) {
|
||||||
return baseMapper.listWaresCodeByVertex(pkVertex);
|
return baseMapper.listWaresCodeByVertex(pkVertex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param) {
|
|
||||||
return baseMapper.listWaresNoSale(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -71,6 +71,14 @@
|
||||||
so.remark,
|
so.remark,
|
||||||
soi.creation_time,
|
soi.creation_time,
|
||||||
so.pay_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,
|
bs.name storehouse_name,
|
||||||
bu.name unit_name,
|
bu.name unit_name,
|
||||||
so.SYSTEM_TYPE,
|
so.SYSTEM_TYPE,
|
||||||
|
|
@ -118,15 +126,6 @@
|
||||||
<if test="param.pkStorehouse != null ">
|
<if test="param.pkStorehouse != null ">
|
||||||
and bs.pk_id = #{param.pkStorehouse}
|
and bs.pk_id = #{param.pkStorehouse}
|
||||||
</if>
|
</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">
|
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
|
||||||
and so.rec_province in
|
and so.rec_province in
|
||||||
|
|
@ -144,6 +143,10 @@
|
||||||
<if test="param.pkVertex != null">
|
<if test="param.pkVertex != null">
|
||||||
and cm.pk_vertex = #{param.pkVertex}
|
and cm.pk_vertex = #{param.pkVertex}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != param.pkOriginalOrder">
|
||||||
|
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
|
||||||
|
</if>
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
order by creation_time desc, order_code desc
|
order by creation_time desc, order_code desc
|
||||||
|
|
@ -180,6 +183,14 @@
|
||||||
so.remark,
|
so.remark,
|
||||||
soi.creation_time,
|
soi.creation_time,
|
||||||
so.pay_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,
|
bs.name storehouse_name,
|
||||||
bu.name unit_name,
|
bu.name unit_name,
|
||||||
so.SYSTEM_TYPE,
|
so.SYSTEM_TYPE,
|
||||||
|
|
@ -234,15 +245,6 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</if>
|
</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">
|
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
|
||||||
and so.rec_province in
|
and so.rec_province in
|
||||||
|
|
@ -260,6 +262,9 @@
|
||||||
<if test="param.pkVertex != null">
|
<if test="param.pkVertex != null">
|
||||||
and cm.pk_vertex = #{param.pkVertex}
|
and cm.pk_vertex = #{param.pkVertex}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != param.pkOriginalOrder">
|
||||||
|
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
|
||||||
|
</if>
|
||||||
order by soi.creation_time desc, so.order_code desc
|
order by soi.creation_time desc, so.order_code desc
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -463,15 +468,6 @@
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</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">
|
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
|
||||||
and so.rec_province in
|
and so.rec_province in
|
||||||
|
|
@ -826,6 +822,7 @@
|
||||||
oi.SPECS_NAME specsName,
|
oi.SPECS_NAME specsName,
|
||||||
bp.WEIGHT weight,
|
bp.WEIGHT weight,
|
||||||
bp.SHIPPING_CHANNEL shippingChannel,
|
bp.SHIPPING_CHANNEL shippingChannel,
|
||||||
|
bc.IN_EXCHANGE_RATE inExchangeRate,
|
||||||
oi.LOGISTICS_CODE logisticsCode,
|
oi.LOGISTICS_CODE logisticsCode,
|
||||||
oi.LOGISTICS_COMPANY logisticsCompany,
|
oi.LOGISTICS_COMPANY logisticsCompany,
|
||||||
m.MEMBER_CODE buyMemberCode,
|
m.MEMBER_CODE buyMemberCode,
|
||||||
|
|
@ -839,6 +836,7 @@
|
||||||
so.SYSTEM_TYPE
|
so.SYSTEM_TYPE
|
||||||
from sa_order_items oi
|
from sa_order_items oi
|
||||||
left join sa_order so on oi.PK_ORDER = so.PK_ID
|
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 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_EXTEND we on we.PK_WARES = oi.PK_WARES
|
||||||
left join BD_WARES bw on bw.PK_ID = we.PK_WARES
|
left join BD_WARES bw on bw.PK_ID = we.PK_WARES
|
||||||
|
|
|
||||||
|
|
@ -487,31 +487,4 @@
|
||||||
(select pk_member from bd_vertex bv where bv.pk_id = #{pkVertex})
|
(select pk_member from bd_vertex bv where bv.pk_id = #{pkVertex})
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -251,6 +251,11 @@ public class EnumsInitController {
|
||||||
initList.add(this.createData(value.getKey(), value.getLabel()));
|
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()) {
|
for (EDeliveryStatus value : EDeliveryStatus.values()) {
|
||||||
initList.add(this.createData(value.getKey(), value.getLabel()));
|
initList.add(this.createData(value.getKey(), value.getLabel()));
|
||||||
|
|
@ -365,6 +370,14 @@ public class EnumsInitController {
|
||||||
initList.add(this.createData(value.getKey(), value.getLabel()));
|
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()));
|
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()));
|
initList.add(this.createData(value.getKey(), value.getLabel()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品发货渠道
|
||||||
|
*/
|
||||||
|
for (EShippingChannel value : EShippingChannel.values()) {
|
||||||
|
initList.add(this.createData(value.getKey(), value.getLabel()));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付业务类型
|
* 支付业务类型
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,6 @@ import org.springframework.stereotype.Component;
|
||||||
@ConfigurationProperties(prefix = "bd")
|
@ConfigurationProperties(prefix = "bd")
|
||||||
public class BdConfig {
|
public class BdConfig {
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统名称(ESysName)
|
|
||||||
*/
|
|
||||||
private static String sysName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前环境
|
* 当前环境
|
||||||
*/
|
*/
|
||||||
|
|
@ -39,23 +34,6 @@ public class BdConfig {
|
||||||
|
|
||||||
private static Integer enable;
|
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() {
|
public static String getEnv() {
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
|
|
@ -103,22 +81,4 @@ public class BdConfig {
|
||||||
public void setEnable(Integer enable) {
|
public void setEnable(Integer enable) {
|
||||||
BdConfig.enable = 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzs.common.core.enums;
|
package com.hzs.common.core.enums;
|
||||||
|
|
||||||
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
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
|
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||||
*/
|
*/
|
||||||
private final int enable;
|
private final int enable;
|
||||||
|
/**
|
||||||
|
* 国际化翻译key值
|
||||||
|
*/
|
||||||
|
private final String key;
|
||||||
|
|
||||||
public static EDelivery getDelivery(int value) {
|
public static EDelivery getDelivery(int value) {
|
||||||
for (EDelivery eDelivery : EDelivery.values()) {
|
for (EDelivery eDelivery : EDelivery.values()) {
|
||||||
|
|
@ -48,17 +63,4 @@ public enum EDelivery {
|
||||||
}
|
}
|
||||||
return EDelivery.EMPTY;
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
package com.hzs.common.core.enums;
|
package com.hzs.common.core.enums;
|
||||||
|
|
||||||
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单支付方式
|
* @Description: 订单支付方式
|
||||||
|
* @Author: jiang chao
|
||||||
|
* @Time: 2022/11/4 14:11
|
||||||
|
* @Classname: EOrderPayType
|
||||||
|
* @PackageName: com.hzs.common.core.enums
|
||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@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
|
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||||
*/
|
*/
|
||||||
private final int enable;
|
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()) {
|
for (EOrderPayType enums : EOrderPayType.values()) {
|
||||||
if (enums.value == value) {
|
if (enums.getValue() == value) {
|
||||||
return enums.getLabel();
|
return enums;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单状态
|
* 订单状态
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,6 +63,27 @@ public enum EOrderStatus {
|
||||||
*/
|
*/
|
||||||
private final String key;
|
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) {
|
public static EOrderStatus getEOrderStatus(int value) {
|
||||||
for (EOrderStatus eOrderStatus : EOrderStatus.values()) {
|
for (EOrderStatus eOrderStatus : EOrderStatus.values()) {
|
||||||
if (eOrderStatus.value == value) {
|
if (eOrderStatus.value == value) {
|
||||||
|
|
@ -69,16 +93,4 @@ public enum EOrderStatus {
|
||||||
return null;
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzs.common.core.enums;
|
package com.hzs.common.core.enums;
|
||||||
|
|
||||||
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
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
|
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||||
*/
|
*/
|
||||||
private final int enable;
|
private final int enable;
|
||||||
|
/**
|
||||||
|
* 国际化翻译key值
|
||||||
|
*/
|
||||||
|
private final String key;
|
||||||
|
|
||||||
public static EPresaleStatus getEPresaleStatus(int value) {
|
public static EPresaleStatus getEPresaleStatus(int value) {
|
||||||
for (EPresaleStatus ePresaleStatus : EPresaleStatus.values()) {
|
for (EPresaleStatus ePresaleStatus : EPresaleStatus.values()) {
|
||||||
|
|
@ -49,12 +54,12 @@ public enum EPresaleStatus {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLabelByValue(Integer value) {
|
public static String getEnumLabelByValue(Integer value) {
|
||||||
if (null == value) {
|
if (null == value) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
for (EPresaleStatus enums : EPresaleStatus.values()) {
|
for (EPresaleStatus enums : EPresaleStatus.values()) {
|
||||||
if (enums.getValue() == value) {
|
if (enums.value == value) {
|
||||||
return enums.getLabel();
|
return enums.getLabel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzs.common.core.enums;
|
package com.hzs.common.core.enums;
|
||||||
|
|
||||||
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
@ -10,9 +11,9 @@ import lombok.Getter;
|
||||||
@Getter
|
@Getter
|
||||||
public enum EShippingChannel {
|
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
|
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||||
*/
|
*/
|
||||||
private final int enable;
|
private final int enable;
|
||||||
|
/**
|
||||||
|
* 国际化翻译key值
|
||||||
|
*/
|
||||||
|
private final String key;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据值,返回枚举
|
* 根据值,返回枚举
|
||||||
|
|
@ -37,18 +42,4 @@ public enum EShippingChannel {
|
||||||
}
|
}
|
||||||
return TOTAL_WAREHOUSE;
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,18 +99,6 @@ public enum ESpecialArea {
|
||||||
*/
|
*/
|
||||||
private final int menuDetailValue;
|
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) {
|
public static String getESpecialArea(Integer value) {
|
||||||
if (null == value) {
|
if (null == value) {
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzs.common.core.enums;
|
package com.hzs.common.core.enums;
|
||||||
|
|
||||||
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
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
|
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||||
*/
|
*/
|
||||||
private final int enable;
|
private final int enable;
|
||||||
|
/**
|
||||||
|
* 国际化翻译key值
|
||||||
|
*/
|
||||||
|
private final String key;
|
||||||
|
|
||||||
public static ESupplyWay getESupplyWay(int value) {
|
public static ESupplyWay getESupplyWay(int value) {
|
||||||
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
|
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
|
||||||
|
|
@ -44,13 +49,13 @@ public enum ESupplyWay {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getLabelByVal(Integer value) {
|
public static String getEnumLabelByValue(Integer value) {
|
||||||
if (null == value) {
|
if (null == value) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
|
for (ESupplyWay enums : ESupplyWay.values()) {
|
||||||
if (eSupplyWay.getValue() == value) {
|
if (enums.value == value) {
|
||||||
return eSupplyWay.getLabel();
|
return enums.getLabel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
|
|
@ -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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -44,16 +44,12 @@ public enum ETransportType {
|
||||||
private final String key;
|
private final String key;
|
||||||
|
|
||||||
|
|
||||||
public static String getLabelByValue(Integer value) {
|
public static ETransportType getETransportType(int value){
|
||||||
if (null == value) {
|
for (ETransportType eTransportType : ETransportType.values()) {
|
||||||
return "";
|
if (eTransportType.getValue() == value){
|
||||||
}
|
return eTransportType;
|
||||||
for (ETransportType enums : ETransportType.values()) {
|
|
||||||
if (enums.value == value) {
|
|
||||||
return enums.getLabel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,11 @@ import java.util.concurrent.*;
|
||||||
@Component
|
@Component
|
||||||
public class ThreadUtils {
|
public class ThreadUtils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化创建4个长度的固定线程池
|
||||||
|
*/
|
||||||
|
public static ExecutorService executorService = Executors.newFixedThreadPool(4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建线程池
|
* 创建线程池
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单缓存数据临时表
|
* 订单缓存数据临时表
|
||||||
|
*
|
||||||
|
* @author hzs
|
||||||
|
* @since 2025-02-25
|
||||||
*/
|
*/
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue