## 同步发货未合单查询处理;全网产品库存同步;
This commit is contained in:
parent
f67f38a089
commit
fec3bc2530
|
@ -7,7 +7,6 @@ import com.hzs.common.core.annotation.Log;
|
|||
import com.hzs.common.core.annotation.RepeatSubmitSimple;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.constant.msg.CommonMsgConstants;
|
||||
import com.hzs.common.core.constant.msg.SaOrderMsgConstants;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
|
@ -19,7 +18,6 @@ import com.hzs.common.core.web.domain.AjaxResult;
|
|||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
|
||||
import com.hzs.common.domain.sale.order.SaOrder;
|
||||
import com.hzs.common.domain.sale.order.SaOrderItems;
|
||||
import com.hzs.common.domain.sale.order.SaOrderSelfLog;
|
||||
import com.hzs.common.security.service.UserTokenService;
|
||||
|
@ -50,11 +48,7 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 发货清单未合单控制器
|
||||
* @Author: jiang chao
|
||||
* @Time: 2022/10/28 11:24
|
||||
* @Classname: SaDeliverOrderController
|
||||
* @PackageName: com.hzs.sale.deliver.controller.manage
|
||||
* 发货清单未合单控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/deliver-unhandled")
|
||||
|
@ -102,23 +96,10 @@ public class SaDeliverUnhandledController extends BaseController {
|
|||
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
|
||||
// 返回数据
|
||||
List<DeliverUnhandledVO> resultList = new ArrayList<>();
|
||||
|
||||
// 未合单目前查询状态(已付款)
|
||||
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
|
||||
|
||||
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());
|
||||
}
|
||||
// 查询语句已经写死查询【在售】,此处可以直接赋空
|
||||
param.setPreSaleStatus(null);
|
||||
|
||||
// 获取管理员权限(角色地区范围、体系列表、团队列表)
|
||||
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||
|
@ -127,7 +108,7 @@ public class SaDeliverUnhandledController extends BaseController {
|
|||
param.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||
|
||||
startPage();
|
||||
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
||||
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
||||
|
||||
// 当查询有数据才进行处理
|
||||
if (resultList.size() > 0) {
|
||||
|
@ -157,25 +138,10 @@ public class SaDeliverUnhandledController extends BaseController {
|
|||
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
|
||||
// 返回数据
|
||||
List<DeliverUnhandledVO> resultList = new ArrayList<>();
|
||||
|
||||
// 未合单目前查询状态(已付款)
|
||||
param.setOrderStatusList(Collections.singletonList(EOrderStatus.PAY.getValue()));
|
||||
|
||||
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());
|
||||
}
|
||||
// 查询语句已经写死查询【在售】,此处可以直接赋空
|
||||
param.setPreSaleStatus(null);
|
||||
|
||||
// 获取管理员权限(角色地区范围、体系列表、团队列表)
|
||||
UserAuthorityDTO userAuthorityDTO = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||
|
@ -183,7 +149,7 @@ public class SaDeliverUnhandledController extends BaseController {
|
|||
param.setVertexIdList(userAuthorityDTO.getVertexIdList());
|
||||
param.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||
|
||||
resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
||||
List<DeliverUnhandledVO> resultList = iSaOrderItemsService.queryDeliverUnhandledList(param, pkCountry);
|
||||
|
||||
// 当查询有数据才进行处理
|
||||
if (resultList.size() > 0) {
|
||||
|
|
|
@ -8,11 +8,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 未合单列表查询入参
|
||||
* @Author: jiang chao
|
||||
* @Time: 2022/10/21 17:26
|
||||
* @Classname: DeliverOrderItemParam
|
||||
* @PackageName: com.hzs.sale.deliver.param
|
||||
* 未合单列表查询入参
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
@ -153,15 +149,6 @@ public class DeliverUnhandledParam extends BaseAuthorityEntity {
|
|||
*/
|
||||
private String specsName;
|
||||
|
||||
/**
|
||||
* 原单号
|
||||
*/
|
||||
private String originalOrderCode;
|
||||
/**
|
||||
* 原单号ID
|
||||
*/
|
||||
private Long pkOriginalOrder;
|
||||
|
||||
/**
|
||||
* 发货仓库
|
||||
*/
|
||||
|
@ -181,4 +168,9 @@ public class DeliverUnhandledParam extends BaseAuthorityEntity {
|
|||
*/
|
||||
private Integer systemType;
|
||||
|
||||
/**
|
||||
* 非售商品列表
|
||||
*/
|
||||
private List<Integer> pkWaresList;
|
||||
|
||||
}
|
||||
|
|
|
@ -11,11 +11,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 发货单未合并列表VO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2022/11/4 11:29
|
||||
* @Classname: DeliverUnhandledVO
|
||||
* @PackageName: com.hzs.sale.deliver.vo
|
||||
* 发货单未合并列表VO
|
||||
*/
|
||||
@Data
|
||||
public class DeliverUnhandledVO {
|
||||
|
@ -240,12 +236,6 @@ public class DeliverUnhandledVO {
|
|||
@Excel(name = "预售状态")
|
||||
private String preSaleStatusVal;
|
||||
|
||||
/**
|
||||
* 原单号
|
||||
*/
|
||||
@Excel(name = "原单号")
|
||||
private String originalOrderCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
|
|
@ -407,8 +407,7 @@ public abstract class ParentOrderController extends BaseController {
|
|||
* @return boolean
|
||||
*/
|
||||
protected Boolean checkRecMsgBoolean(OrderParam orderParam) {
|
||||
if (orderParam.getDeliveryWay() != null && (EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay() ||
|
||||
EDelivery.SHOP_PICKED_UP.getValue() == orderParam.getDeliveryWay())) {
|
||||
if (orderParam.getDeliveryWay() != null && (EDelivery.COMPANY_PICKED_UP.getValue() == orderParam.getDeliveryWay())) {
|
||||
orderParam.setTransType(null);
|
||||
return orderParam.getSpecialArea() != null
|
||||
&& orderParam.getOrderItemsParams() != null
|
||||
|
|
|
@ -39,14 +39,6 @@ import java.util.*;
|
|||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @BelongsProject: hzs_cloud
|
||||
* @BelongsPackage: com.hzs.sale.order.controller.manage
|
||||
* @Author: yh
|
||||
* @CreateTime: 2023-04-11 10:22
|
||||
* @Description:
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/order-charge-log")
|
||||
public class SaOrderChargeLogController extends BaseController {
|
||||
|
@ -137,7 +129,7 @@ public class SaOrderChargeLogController extends BaseController {
|
|||
Map<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
|
||||
|
||||
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
|
||||
ESupplyWay.values(), EDelivery.values(), EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
|
||||
EDelivery.values(), EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
|
||||
EOrderType.values(), ETransportType.values(), EYesNo.values(), EShippingChannel.values(), EUnit.values(), ESignSource.values(), EOrderSource.values());
|
||||
|
||||
for (SaOrderChargeLogExt orderChargeLogExt : list) {
|
||||
|
@ -246,9 +238,7 @@ public class SaOrderChargeLogController extends BaseController {
|
|||
orderChargeLogVo.setDeliveryWayStr(transactionMap.get(EDelivery.getDelivery(orderChargeLogExt.getDeliveryWay()).getKey()));
|
||||
}
|
||||
//销售方式
|
||||
if (orderChargeLogExt.getOperateScope() != null && ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()) != null) {
|
||||
orderChargeLogVo.setOperateScopeStr(transactionMap.get(ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()).getKey()));
|
||||
}
|
||||
orderChargeLogVo.setOperateScopeStr(ESupplyWay.getLabelByVal(orderChargeLogExt.getOperateScope()));
|
||||
// 运输方式
|
||||
List<String> tranList = new ArrayList<>();
|
||||
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
|
||||
|
@ -357,7 +347,7 @@ public class SaOrderChargeLogController extends BaseController {
|
|||
Map<Long, VertexDTO> vertexMap = vertexAll.getData().stream().collect(Collectors.toMap(VertexDTO::getPkId, Function.identity()));
|
||||
|
||||
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EApproveRechargeStatus.values(), EPresaleStatus.values(),
|
||||
ESupplyWay.values(), EDelivery.values(), EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
|
||||
EDelivery.values(), EOrderStatus.values(), EPlaceDept.values(), ECustomerType.values(), EApprovalBusiness.values(),
|
||||
EOrderType.values(), ETransportType.values(), EYesNo.values(), EShippingChannel.values(), EUnit.values(), ESignSource.values(), EOrderSource.values());
|
||||
|
||||
for (SaOrderChargeLogExt orderChargeLogExt : list) {
|
||||
|
@ -468,9 +458,7 @@ public class SaOrderChargeLogController extends BaseController {
|
|||
orderChargeLogVo.setDeliveryWayStr(transactionMap.get(EDelivery.getDelivery(orderChargeLogExt.getDeliveryWay()).getKey()));
|
||||
}
|
||||
//销售方式
|
||||
if (orderChargeLogExt.getOperateScope() != null && ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()) != null) {
|
||||
orderChargeLogVo.setOperateScopeStr(transactionMap.get(ESupplyWay.getESupplyWay(orderChargeLogExt.getOperateScope()).getKey()));
|
||||
}
|
||||
orderChargeLogVo.setOperateScopeStr(ESupplyWay.getLabelByVal(orderChargeLogExt.getOperateScope()));
|
||||
// 运输方式
|
||||
List<String> tranList = new ArrayList<>();
|
||||
if (orderChargeLogExt.getIsLandTrans() != null && orderChargeLogExt.getIsLandTrans().equals(0)) {
|
||||
|
|
|
@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.hzs.common.core.annotation.AccessPermissions;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
|
@ -15,7 +14,6 @@ import com.hzs.common.core.web.page.TableDataInfo;
|
|||
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
|
||||
import com.hzs.common.domain.sale.order.SaOrderRemarks;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.service.ITransactionCommonService;
|
||||
import com.hzs.sale.order.controller.ParentOrderController;
|
||||
import com.hzs.sale.order.dto.OrderBusinessTemplate;
|
||||
import com.hzs.sale.order.param.*;
|
||||
|
@ -47,8 +45,6 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
public class SaOrderController extends ParentOrderController {
|
||||
|
||||
@Autowired
|
||||
private ITransactionCommonService iTransactionCommonService;
|
||||
@Autowired
|
||||
private ISaOrderService iSaOrderService;
|
||||
@Autowired
|
||||
|
@ -116,43 +112,18 @@ public class SaOrderController extends ParentOrderController {
|
|||
waresOrderVo.setDeliveryWayStr(eDelivery.getLabel());
|
||||
}
|
||||
}
|
||||
// 运输方式
|
||||
if (waresOrderVo.getTranType() != null) {
|
||||
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
|
||||
}
|
||||
// 预售状态
|
||||
if (waresOrderVo.getPreSaleStatus() != null) {
|
||||
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
|
||||
}
|
||||
// 订单状态
|
||||
if (waresOrderVo.getOrderStatus() != null) {
|
||||
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
|
||||
if (orderStatusEnum != null) {
|
||||
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
|
||||
}
|
||||
}
|
||||
// 支付方式
|
||||
if (waresOrderVo.getPayType() != null) {
|
||||
EOrderPayType eOrderPayType = EOrderPayType.getEnumByValue(waresOrderVo.getPayType());
|
||||
if (null != eOrderPayType) {
|
||||
waresOrderVo.setPayTypeStr(eOrderPayType.getLabel());
|
||||
}
|
||||
}
|
||||
// 订单类型
|
||||
if (waresOrderVo.getOrderType() != null) {
|
||||
EOrderType eOrderType = EOrderType.getEnumByValue(waresOrderVo.getOrderType());
|
||||
if (null != eOrderType) {
|
||||
waresOrderVo.setOrderTypeStr(eOrderType.getLabel());
|
||||
}
|
||||
}
|
||||
// 供应方式
|
||||
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
|
||||
ESupplyWay eSupplyWay = ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope()));
|
||||
if (null != eSupplyWay) {
|
||||
waresOrderVo.setOperateScope(eSupplyWay.getLabel());
|
||||
}
|
||||
}
|
||||
|
||||
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
|
||||
// 发货方式
|
||||
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
|
||||
// 运输方式
|
||||
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
|
||||
// 预售状态
|
||||
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
|
||||
// 订单状态
|
||||
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
|
||||
// 支付方式
|
||||
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
|
||||
}
|
||||
return getDataTable(resultList);
|
||||
}
|
||||
|
@ -187,8 +158,6 @@ public class SaOrderController extends ParentOrderController {
|
|||
waresOrderParam.setTeamList(userAuthorityDTO.getUserTeamList());
|
||||
|
||||
List<WaresOrderVo> resultList = iSaOrderService.selectByOrderInfoList(waresOrderParam);
|
||||
// 获取需要翻译的枚举翻译
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EOrderType.values(), EShippingChannel.values());
|
||||
for (WaresOrderVo waresOrderVo : resultList) {
|
||||
// 省
|
||||
if (waresOrderVo.getRecProvince() != null) {
|
||||
|
@ -202,39 +171,18 @@ public class SaOrderController extends ParentOrderController {
|
|||
if (waresOrderVo.getRecCountry() != null) {
|
||||
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
||||
}
|
||||
// 发货方式
|
||||
waresOrderVo.setDeliveryWayStr(EDelivery.getDelivery(waresOrderVo.getDeliveryWay()).getLabel());
|
||||
// 运输方式
|
||||
if (waresOrderVo.getTranType() != null && ETransportType.getETransportType(waresOrderVo.getTranType()) != null) {
|
||||
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
|
||||
}
|
||||
// 预售状态
|
||||
if (waresOrderVo.getPreSaleStatus() != null && EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()) != null) {
|
||||
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
|
||||
}
|
||||
// 订单状态
|
||||
if (waresOrderVo.getOrderStatus() != null) {
|
||||
EOrderStatus orderStatusEnum = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
|
||||
if (orderStatusEnum != null) {
|
||||
waresOrderVo.setOrderStatusStr(orderStatusEnum.getLabel());
|
||||
}
|
||||
}
|
||||
// 支付方式
|
||||
if (waresOrderVo.getPayType() != null) {
|
||||
waresOrderVo.setPayTypeStr(EOrderPayType.getEnumByValue(waresOrderVo.getPayType()).getLabel());
|
||||
}
|
||||
// 订单类型
|
||||
if (waresOrderVo.getOrderType() != null) {
|
||||
waresOrderVo.setOrderTypeVal(transactionMap.get(EnumsPrefixConstants.ORDER_TYPE + waresOrderVo.getOrderType()));
|
||||
}
|
||||
// 供应方式
|
||||
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope()) && ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())) != null) {
|
||||
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
|
||||
}
|
||||
// 发货类型
|
||||
waresOrderVo.setShippingChannelVal(transactionMap.get(EnumsPrefixConstants.E_SHIPPING_CHANNEL + waresOrderVo.getShippingChannel()));
|
||||
waresOrderVo.setLogisticsCode(waresOrderVo.getLogisticsCode());
|
||||
waresOrderVo.setLogisticsCompany(waresOrderVo.getLogisticsCompany());
|
||||
waresOrderVo.setOrderTypeVal(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
|
||||
// 发货方式
|
||||
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
|
||||
// 运输方式
|
||||
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
|
||||
// 预售状态
|
||||
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
|
||||
// 订单状态
|
||||
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
|
||||
// 支付方式
|
||||
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
|
||||
}
|
||||
ExcelUtil<WaresOrderVo> util = new ExcelUtil<>(WaresOrderVo.class, iMenuColumnServiceApi.queryMenuColumn("Commodity", SecurityUtils.getUserId()).getData());
|
||||
util.exportExcel(response, resultList, "商品订单导出");
|
||||
|
@ -261,8 +209,6 @@ public class SaOrderController extends ParentOrderController {
|
|||
waresOrderParam.setEndCreateDate(DateUtils.getEndTime(waresOrderParam.getEndCreateDate()));
|
||||
}
|
||||
|
||||
// 获取需要翻译的枚举翻译
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values());
|
||||
Map<Integer, String> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
|
||||
|
||||
startPage();
|
||||
|
@ -281,42 +227,23 @@ public class SaOrderController extends ParentOrderController {
|
|||
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
||||
}
|
||||
// 发货方式
|
||||
if (null != waresOrderVo.getDeliveryWay()) {
|
||||
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
|
||||
}
|
||||
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
|
||||
// 运输方式
|
||||
if (waresOrderVo.getTranType() != null) {
|
||||
waresOrderVo.setTranTypeStr(ETransportType.getETransportType(waresOrderVo.getTranType()).getLabel());
|
||||
}
|
||||
|
||||
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
|
||||
// 预售状态
|
||||
if (waresOrderVo.getPreSaleStatus() != null) {
|
||||
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus()).getLabel());
|
||||
}
|
||||
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
|
||||
// 订单状态
|
||||
if (waresOrderVo.getOrderStatus() != null) {
|
||||
waresOrderVo.setOrderStatusStr(EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus()).getLabel());
|
||||
}
|
||||
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
|
||||
// 支付方式
|
||||
if (waresOrderVo.getPayType() != null) {
|
||||
waresOrderVo.setPayTypeStr(EOrderPayType.getEnumByValue(waresOrderVo.getPayType()).getLabel());
|
||||
}
|
||||
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
|
||||
// 订单类型
|
||||
if (waresOrderVo.getOrderType() != null) {
|
||||
waresOrderVo.setOrderTypeStr(EOrderType.getEnumByValue(waresOrderVo.getOrderType()).getLabel());
|
||||
}
|
||||
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
|
||||
// 供应方式
|
||||
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
|
||||
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
|
||||
}
|
||||
// 计算汇率
|
||||
if (null != waresOrderVo.getInExchangeRate()) {
|
||||
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
|
||||
waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
|
||||
}
|
||||
// 发货类型
|
||||
if (waresOrderVo.getShippingChannel() != null) {
|
||||
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
|
||||
}
|
||||
waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
|
||||
// 计算产品总计
|
||||
waresOrderVo.setProductPriceTotal(waresOrderVo.getProductPrice().multiply(BigDecimal.valueOf(waresOrderVo.getQuantity())));
|
||||
}
|
||||
|
@ -348,8 +275,6 @@ public class SaOrderController extends ParentOrderController {
|
|||
}
|
||||
|
||||
Map<Integer, String> areaMap = iAreaServiceApi.getAreaMap(SecurityUtils.getPkCountry()).getData();
|
||||
// 获取需要翻译的枚举翻译
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(EDelivery.values(), ESupplyWay.values());
|
||||
|
||||
List<WaresOrderVo> resultList = iSaOrderItemsService.selectByInvestmentList(waresOrderParam);
|
||||
for (WaresOrderVo waresOrderVo : resultList) {
|
||||
|
@ -366,56 +291,23 @@ public class SaOrderController extends ParentOrderController {
|
|||
waresOrderVo.setRecCountryName(areaMap.get(waresOrderVo.getRecCountry()));
|
||||
}
|
||||
// 发货方式
|
||||
if (waresOrderVo.getDeliveryWay() != null) {
|
||||
waresOrderVo.setDeliveryWayStr(transactionMap.get(EnumsPrefixConstants.DELIVERY + waresOrderVo.getDeliveryWay()));
|
||||
}
|
||||
|
||||
waresOrderVo.setDeliveryWayStr(EDelivery.getLabelByValue(waresOrderVo.getDeliveryWay()));
|
||||
// 运输方式
|
||||
if (waresOrderVo.getTranType() != null) {
|
||||
ETransportType transportType = ETransportType.getETransportType(waresOrderVo.getTranType());
|
||||
if (transportType != null) {
|
||||
waresOrderVo.setTranTypeStr(transportType.getLabel());
|
||||
}
|
||||
}
|
||||
|
||||
waresOrderVo.setTranTypeStr(ETransportType.getLabelByValue(waresOrderVo.getTranType()));
|
||||
// 预售状态
|
||||
if (waresOrderVo.getPreSaleStatus() != null) {
|
||||
EPresaleStatus presaleStatus = EPresaleStatus.getEPresaleStatus(waresOrderVo.getPreSaleStatus());
|
||||
if (presaleStatus != null) {
|
||||
waresOrderVo.setPreSaleStatusStr(presaleStatus.getLabel());
|
||||
}
|
||||
}
|
||||
waresOrderVo.setPreSaleStatusStr(EPresaleStatus.getLabelByValue(waresOrderVo.getPreSaleStatus()));
|
||||
// 订单状态
|
||||
if (waresOrderVo.getOrderStatus() != null) {
|
||||
EOrderStatus orderStatus = EOrderStatus.getEOrderStatus(waresOrderVo.getOrderStatus());
|
||||
if (orderStatus != null) {
|
||||
waresOrderVo.setOrderStatusStr(orderStatus.getLabel());
|
||||
}
|
||||
}
|
||||
waresOrderVo.setOrderStatusStr(EOrderStatus.getLabelByValue(waresOrderVo.getOrderStatus()));
|
||||
// 支付方式
|
||||
if (waresOrderVo.getPayType() != null) {
|
||||
EOrderPayType orderPayType = EOrderPayType.getEnumByValue(waresOrderVo.getPayType());
|
||||
if (orderPayType != null) {
|
||||
waresOrderVo.setPayTypeStr(orderPayType.getLabel());
|
||||
}
|
||||
}
|
||||
waresOrderVo.setPayTypeStr(EOrderPayType.getLabelByValue(waresOrderVo.getPayType()));
|
||||
// 订单类型
|
||||
if (waresOrderVo.getOrderType() != null) {
|
||||
EOrderType orderType = EOrderType.getEnumByValue(waresOrderVo.getOrderType());
|
||||
if (orderType != null) {
|
||||
waresOrderVo.setOrderTypeStr(orderType.getLabel());
|
||||
}
|
||||
}
|
||||
waresOrderVo.setOrderTypeStr(EOrderType.getLabelByValue(waresOrderVo.getOrderType()));
|
||||
// 供应方式
|
||||
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope()) && ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())) != null) {
|
||||
waresOrderVo.setOperateScope(ESupplyWay.getESupplyWay(Integer.parseInt(waresOrderVo.getOperateScope())).getLabel());
|
||||
if (StringUtils.isNotBlank(waresOrderVo.getOperateScope())) {
|
||||
waresOrderVo.setOperateScope(ESupplyWay.getLabelByVal(Integer.parseInt(waresOrderVo.getOperateScope())));
|
||||
}
|
||||
// 计算汇率
|
||||
waresOrderVo.setOrderAchieve(waresOrderVo.getInExchangeRate().multiply(waresOrderVo.getOrderAchieve()));
|
||||
// 发货类型
|
||||
if (waresOrderVo.getShippingChannel() != null) {
|
||||
waresOrderVo.setShippingChannelStr(EShippingChannel.getEnumByValue(waresOrderVo.getShippingChannel()).getLabel());
|
||||
}
|
||||
waresOrderVo.setShippingChannelStr(EShippingChannel.getLabelByValue(waresOrderVo.getShippingChannel()));
|
||||
}
|
||||
List<WaresOrderInfoVo> waresOrderInfoList = resultList.stream().map(a -> {
|
||||
WaresOrderInfoVo waresOrderInfoVo = BeanUtil.copyProperties(a, WaresOrderInfoVo.class);
|
||||
|
@ -627,7 +519,6 @@ public class SaOrderController extends ParentOrderController {
|
|||
*/
|
||||
@PostMapping("/single-item-stat-export")
|
||||
public void singleItemStatExport(SingleItemStatParam singleItemStatParam, HttpServletResponse response) {
|
||||
|
||||
if (StringUtils.isBlank(singleItemStatParam.getSkuCode())
|
||||
&& StringUtils.isBlank(singleItemStatParam.getProductName())
|
||||
&& singleItemStatParam.getOrderType() == null
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
package com.hzs.sale.order.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.codec.Base64Encoder;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
@ -11,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.activity.pick.param.AcPickQueryParam;
|
||||
import com.hzs.activity.pick.service.IAcPickService;
|
||||
import com.hzs.common.core.config.BdConfig;
|
||||
import com.hzs.common.core.constant.*;
|
||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
||||
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
||||
|
@ -20,6 +24,7 @@ import com.hzs.common.core.exception.ServiceException;
|
|||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.*;
|
||||
import com.hzs.common.core.utils.reflect.ReflectUtils;
|
||||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
import com.hzs.common.domain.activity.pick.ext.AcPickExt;
|
||||
import com.hzs.common.domain.member.account.CuMemberAccount;
|
||||
import com.hzs.common.domain.member.base.CuMember;
|
||||
|
@ -33,6 +38,7 @@ import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
|||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||
import com.hzs.common.domain.sale.ext.*;
|
||||
import com.hzs.common.domain.sale.order.*;
|
||||
import com.hzs.common.domain.sale.product.BdProduct;
|
||||
import com.hzs.common.domain.sale.wares.BdWares;
|
||||
import com.hzs.common.domain.system.base.BdCountry;
|
||||
import com.hzs.common.domain.system.base.ext.BdProductStorehouseExt;
|
||||
|
@ -887,6 +893,9 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
|||
}
|
||||
|
||||
try {
|
||||
// 同步全网产品库存
|
||||
this.allProductSync(saOrderExt);
|
||||
|
||||
log.info("生产活动消息,activity.exchange:{}", JSONUtil.toJsonStr(saOrderExt));
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.ACTIVITY_EXCHANGE, RabbitMqConstants.ACTIVITY_KEY, saOrderExt);
|
||||
// //计算奖金,通过mq分发消息,异步处理
|
||||
|
@ -1015,6 +1024,9 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
|||
throw new RuntimeException("保存会员失败!!!");
|
||||
}
|
||||
try {
|
||||
// 同步全网产品库存
|
||||
this.allProductSync(saOrderExt);
|
||||
|
||||
// rabbitTemplate.convertAndSend(RabbitMqConstants.ORDER_SECOND_EXCHANGE, RabbitMqConstants.ORDER_SECOND_KEY, saOrderExt);
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.ACTIVITY_EXCHANGE, RabbitMqConstants.ACTIVITY_KEY, saOrderExt);
|
||||
|
||||
|
@ -1111,6 +1123,9 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
|||
}
|
||||
|
||||
try {
|
||||
// 同步全网产品库存
|
||||
this.allProductSync(saOrderExt);
|
||||
|
||||
if (EOrderType.RENEWAL_ORDER.getValue() == saOrderExt.getOrderType()) {
|
||||
// 续约专区推送MQ
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.MEMBER_CONTINUE_EXCHANGE, RabbitMqConstants.MEMBER_CONTINUE_KEY,
|
||||
|
@ -2616,4 +2631,54 @@ public class SaOrderServiceImpl extends ServiceImpl<SaOrderMapper, SaOrder> impl
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步全网产品库存
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public class WaresOrderInfoVo implements Serializable {
|
|||
/**
|
||||
* 重量
|
||||
*/
|
||||
@BigDecimalFormat
|
||||
@Excel(name = "重量(KG)")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
|
@ -157,7 +158,7 @@ public class WaresOrderInfoVo implements Serializable {
|
|||
/**
|
||||
* 省名称
|
||||
*/
|
||||
@Excel(name = "省名称")
|
||||
@Excel(name = "省")
|
||||
private String recProvinceName;
|
||||
/**
|
||||
* 市外键
|
||||
|
@ -167,7 +168,7 @@ public class WaresOrderInfoVo implements Serializable {
|
|||
/**
|
||||
* 市名称
|
||||
*/
|
||||
@Excel(name = "市名称")
|
||||
@Excel(name = "市")
|
||||
private String recCityName;
|
||||
|
||||
/**
|
||||
|
@ -178,7 +179,7 @@ public class WaresOrderInfoVo implements Serializable {
|
|||
/**
|
||||
* 县名称
|
||||
*/
|
||||
@Excel(name = "县名称")
|
||||
@Excel(name = "县")
|
||||
private String recCountryName;
|
||||
/**
|
||||
* 详细地址
|
||||
|
|
|
@ -303,10 +303,6 @@ public class WaresOrderVo implements Serializable {
|
|||
* 重量
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 展示汇率
|
||||
*/
|
||||
private BigDecimal inExchangeRate;
|
||||
/**
|
||||
* 产品订单明细列表
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.hzs.common.core.annotation.AccessPermissions;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.CreateNormsCodeUtils;
|
||||
|
@ -17,6 +16,7 @@ import com.hzs.common.core.web.domain.AjaxResult;
|
|||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.sale.classify.BdSpecs;
|
||||
import com.hzs.common.domain.sale.ext.BdWaresDetailExt;
|
||||
import com.hzs.common.domain.sale.ext.BdWaresExt;
|
||||
import com.hzs.common.domain.sale.ext.BdWaresSpecsRelationExt;
|
||||
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
|
||||
import com.hzs.common.domain.sale.product.BdAreaClassify;
|
||||
|
@ -63,6 +63,8 @@ public class BdWaresController extends BaseController {
|
|||
@DubboReference
|
||||
IRangeServiceApi iRangeServiceApi;
|
||||
|
||||
@Autowired
|
||||
private IBdWaresService iBdWaresService;
|
||||
@Autowired
|
||||
private IBdWaresAuthorizeService waresAuthorizeService;
|
||||
@Autowired
|
||||
|
@ -82,8 +84,6 @@ public class BdWaresController extends BaseController {
|
|||
@Autowired
|
||||
private IBdWaresSpecsPackService waresSpecsPackService;
|
||||
@Autowired
|
||||
private IBdWaresService waresService;
|
||||
@Autowired
|
||||
private IBdWaresLabelService waresLabelService;
|
||||
@Autowired
|
||||
private IBdWaresExtendService waresExtendService;
|
||||
|
@ -98,9 +98,9 @@ public class BdWaresController extends BaseController {
|
|||
@Autowired
|
||||
private IBdWaresAuthorityService waresAuthorityService;
|
||||
@Autowired
|
||||
private UserTokenService userTokenService;
|
||||
@Autowired
|
||||
private IBdAreaClassifyService areaClassifyService;
|
||||
@Autowired
|
||||
private UserTokenService userTokenService;
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
|
@ -113,10 +113,10 @@ public class BdWaresController extends BaseController {
|
|||
public TableDataInfo list(WaresParams waresParams) {
|
||||
startPage();
|
||||
waresParams.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams);
|
||||
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||
resultList.parallelStream().forEach(waresVo -> {
|
||||
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||
if (waresAuthorityVo != null) {
|
||||
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
|
||||
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
|
||||
|
@ -138,21 +138,18 @@ public class BdWaresController extends BaseController {
|
|||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.EXPORT)
|
||||
public void export(WaresParams waresParams, HttpServletResponse response) {
|
||||
waresParams.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams);
|
||||
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||
// 获取需要翻译的枚举翻译
|
||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ESpecialArea.values(), EYesNo.values(), ESupplyWay.values(), EPresaleStatus.values());
|
||||
|
||||
resultList.parallelStream().forEach(waresVo -> {
|
||||
// 所属专区
|
||||
waresVo.setSpecialAreaVal(transactionMap.get(EnumsPrefixConstants.SPECIAL_AREA + waresVo.getSpecialArea()));
|
||||
waresVo.setSpecialAreaVal(ESpecialArea.getLabelByValue(waresVo.getSpecialArea()));
|
||||
// 供应方式
|
||||
waresVo.setOperateScopeVal(transactionMap.get(EnumsPrefixConstants.SUPPLY_WAY + waresVo.getOperateScope()));
|
||||
waresVo.setOperateScopeVal(ESupplyWay.getLabelByVal(waresVo.getOperateScope()));
|
||||
// 预售状态
|
||||
waresVo.setPreSaleStatusVal(transactionMap.get(EnumsPrefixConstants.PRESALE_STATUS + waresVo.getPreSaleStatus()));
|
||||
waresVo.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(waresVo.getPreSaleStatus()));
|
||||
|
||||
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||
if (waresAuthorityVo != null) {
|
||||
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
|
||||
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
|
||||
|
@ -179,256 +176,6 @@ public class BdWaresController extends BaseController {
|
|||
}
|
||||
ExcelUtil<WaresVo> util = new ExcelUtil<>(WaresVo.class);
|
||||
util.exportExcel(response, resultList, "商品信息导出");
|
||||
//导出
|
||||
// Workbook workbook = new HSSFWorkbook();
|
||||
// Sheet sheet = workbook.createSheet("Sheet1");
|
||||
// // sheet.setColumnWidth(0,25 * 256);
|
||||
//
|
||||
// CellStyle style = workbook.createCellStyle();
|
||||
// style.setAlignment(HorizontalAlignment.CENTER);
|
||||
// style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
// createRowTitle(sheet, style);
|
||||
//
|
||||
// Integer num = 1;
|
||||
// Map<String, Integer> countMap = new HashMap<>();
|
||||
//
|
||||
// for (int i = 0; i < resultList.size(); i++) {
|
||||
// if (resultList.get(i).getWaresDetailList() != null) {
|
||||
// // 加入判断 单个单元格无法合并
|
||||
// if (num != num+resultList.get(i).getWaresDetailList().size()){
|
||||
// if (resultList.get(i).getWaresDetailList().size() > 1){
|
||||
// CellRangeAddress region0 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 0, 0);
|
||||
// sheet.addMergedRegion(region0);
|
||||
// CellRangeAddress region1 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 1, 1);
|
||||
// sheet.addMergedRegion(region1);
|
||||
// CellRangeAddress region2 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 2, 2);
|
||||
// sheet.addMergedRegion(region2);
|
||||
// CellRangeAddress region3 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 3, 3);
|
||||
// sheet.addMergedRegion(region3);
|
||||
// CellRangeAddress region4 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 4, 4);
|
||||
// sheet.addMergedRegion(region4);
|
||||
// CellRangeAddress region5 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 5, 5);
|
||||
// sheet.addMergedRegion(region5);
|
||||
// CellRangeAddress region6 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 6, 6);
|
||||
// sheet.addMergedRegion(region6);
|
||||
//
|
||||
// CellRangeAddress region10 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 10, 10);
|
||||
// sheet.addMergedRegion(region10);
|
||||
// CellRangeAddress region11 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 11, 11);
|
||||
// sheet.addMergedRegion(region11);
|
||||
//
|
||||
// CellRangeAddress region12 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 12, 12);
|
||||
// sheet.addMergedRegion(region12);
|
||||
// CellRangeAddress region13 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 13, 13);
|
||||
// sheet.addMergedRegion(region13);
|
||||
// CellRangeAddress region14 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 14, 14);
|
||||
// sheet.addMergedRegion(region14);
|
||||
// CellRangeAddress region15 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 15, 15);
|
||||
// sheet.addMergedRegion(region15);
|
||||
// CellRangeAddress region16 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 16, 16);
|
||||
// sheet.addMergedRegion(region16);
|
||||
// CellRangeAddress region17 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 17, 17);
|
||||
// sheet.addMergedRegion(region17);
|
||||
// CellRangeAddress region18 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 18, 18);
|
||||
// sheet.addMergedRegion(region18);
|
||||
// CellRangeAddress region19 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 19, 19);
|
||||
// sheet.addMergedRegion(region19);
|
||||
// CellRangeAddress region20 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 20, 20);
|
||||
// sheet.addMergedRegion(region20);
|
||||
// CellRangeAddress region21 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 21, 21);
|
||||
// sheet.addMergedRegion(region21);
|
||||
// CellRangeAddress region22 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 22, 22);
|
||||
// sheet.addMergedRegion(region22);
|
||||
// CellRangeAddress region23 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 23, 23);
|
||||
// sheet.addMergedRegion(region23);
|
||||
// CellRangeAddress region24 = new CellRangeAddress(num, num + resultList.get(i).getWaresDetailList().size(), 24, 24);
|
||||
// sheet.addMergedRegion(region24);
|
||||
//
|
||||
// num += resultList.get(i).getWaresDetailList().size();
|
||||
// }
|
||||
// }
|
||||
// for (WaresProductDetailVo waresProductDetailVo : resultList.get(i).getWaresDetailList()) {
|
||||
// WaresVo waresVo = resultList.get(i);
|
||||
// Row dataRow = sheet.createRow(num + 1);
|
||||
// Cell cell0 = dataRow.createCell(0);
|
||||
// cell0.setCellValue(waresVo.getWaresName());
|
||||
// cell0.setCellStyle(style);
|
||||
//
|
||||
// Cell cell1 = dataRow.createCell(1);
|
||||
// cell1.setCellValue(waresVo.getWaresCode());
|
||||
// cell1.setCellStyle(style);
|
||||
// Cell cell2 = dataRow.createCell(2);
|
||||
// cell2.setCellValue(waresVo.getWaresPrice().toString());
|
||||
// cell2.setCellStyle(style);
|
||||
// Cell cell3 = dataRow.createCell(3);
|
||||
// cell3.setCellValue(waresVo.getWaresAchieve().toString());
|
||||
// cell3.setCellStyle(style);
|
||||
// Cell cell4 = dataRow.createCell(4);
|
||||
// cell4.setCellValue(waresVo.getAuthorityTypeVal());
|
||||
// cell4.setCellStyle(style);
|
||||
// Cell cell5 = dataRow.createCell(5);
|
||||
// cell5.setCellValue(waresVo.getMemberCode());
|
||||
// cell5.setCellStyle(style);
|
||||
// Cell cell6 = dataRow.createCell(6);
|
||||
// cell6.setCellValue(waresVo.getMemberName());
|
||||
// cell6.setCellStyle(style);
|
||||
// Cell cell7 = dataRow.createCell(7);
|
||||
// cell7.setCellValue(waresProductDetailVo.getProductName());
|
||||
// cell7.setCellStyle(style);
|
||||
// Cell cell8 = dataRow.createCell(8);
|
||||
// cell8.setCellValue(waresProductDetailVo.getProductCode());
|
||||
// cell8.setCellStyle(style);
|
||||
//
|
||||
// Cell cell9 = dataRow.createCell(9);
|
||||
// cell9.setCellValue(waresProductDetailVo.getProductQuantity());
|
||||
// cell9.setCellStyle(style);
|
||||
//
|
||||
// Cell cell10 = dataRow.createCell(10);
|
||||
// cell10.setCellValue(waresVo.getSpecialAreaVal());
|
||||
// cell10.setCellStyle(style);
|
||||
//
|
||||
// if (waresVo.getIsSingle() != null) {
|
||||
// if (waresVo.getIsSingle().equals(EYesNo.YES.getIntValue())) {
|
||||
// Cell cell11 = dataRow.createCell(11);
|
||||
// cell11.setCellValue("套装");
|
||||
// cell11.setCellStyle(style);
|
||||
// } else {
|
||||
// Cell cell11 = dataRow.createCell(11);
|
||||
// cell11.setCellValue("单品");
|
||||
// cell11.setCellStyle(style);
|
||||
// }
|
||||
// }
|
||||
// if (waresVo.getIsFreeMail() != null) {
|
||||
// if (waresVo.getIsFreeMail().equals(EYesNo.YES.getIntValue())) {
|
||||
// Cell cell12 = dataRow.createCell(12);
|
||||
// cell12.setCellValue("包邮");
|
||||
// cell12.setCellStyle(style);
|
||||
// } else {
|
||||
// Cell cell12 = dataRow.createCell(12);
|
||||
// cell12.setCellValue("不包邮");
|
||||
// cell12.setCellStyle(style);
|
||||
// }
|
||||
// }
|
||||
// Cell cell13 = dataRow.createCell(13);
|
||||
// cell13.setCellValue(waresVo.getClassifyName());
|
||||
// cell13.setCellStyle(style);
|
||||
//
|
||||
// if (waresVo.getIsRecommend() != null) {
|
||||
// if (waresVo.getIsRecommend().equals(EYesNo.YES.getIntValue())) {
|
||||
// Cell cell14 = dataRow.createCell(14);
|
||||
// cell14.setCellValue("推荐");
|
||||
// cell14.setCellStyle(style);
|
||||
// } else {
|
||||
// Cell cell14 = dataRow.createCell(14);
|
||||
// cell14.setCellValue("不推荐");
|
||||
// cell14.setCellStyle(style);
|
||||
// }
|
||||
// } else {
|
||||
// Cell cell14 = dataRow.createCell(14);
|
||||
// cell14.setCellValue("不推荐");
|
||||
// cell14.setCellStyle(style);
|
||||
// }
|
||||
//
|
||||
// Cell cell15 = dataRow.createCell(15);
|
||||
// cell15.setCellValue("供应方式");
|
||||
// cell15.setCellStyle(style);
|
||||
//
|
||||
// if (waresVo.getIsSale() != null) {
|
||||
// if (waresVo.getIsSale().equals(EYesNo.YES.getIntValue())) {
|
||||
// Cell cell16 = dataRow.createCell(16);
|
||||
// cell16.setCellValue("允许销售");
|
||||
// cell16.setCellStyle(style);
|
||||
// } else {
|
||||
// Cell cell16 = dataRow.createCell(16);
|
||||
// cell16.setCellValue("禁止销售");
|
||||
// cell16.setCellStyle(style);
|
||||
// }
|
||||
// }
|
||||
// if (waresVo.getIsPutOn() != null) {
|
||||
// if (waresVo.getIsPutOn().equals(EYesNo.YES.getIntValue())) {
|
||||
// Cell cell17 = dataRow.createCell(17);
|
||||
// cell17.setCellValue("上架");
|
||||
// cell17.setCellStyle(style);
|
||||
// } else {
|
||||
// Cell cell17 = dataRow.createCell(17);
|
||||
// cell17.setCellValue("下架");
|
||||
// cell17.setCellStyle(style);
|
||||
// }
|
||||
// }
|
||||
// Cell cell18 = dataRow.createCell(18);
|
||||
// cell18.setCellValue(waresVo.getPreSaleStatusVal());
|
||||
// cell18.setCellStyle(style);
|
||||
//
|
||||
// Cell cell19 = dataRow.createCell(19);
|
||||
// cell19.setCellValue(waresVo.getSales());
|
||||
// cell19.setCellStyle(style);
|
||||
//
|
||||
// Cell cell20 = dataRow.createCell(20);
|
||||
// cell20.setCellValue(waresVo.getActualSales());
|
||||
// cell20.setCellStyle(style);
|
||||
//
|
||||
// if (waresVo.getArrivalTime() != null) {
|
||||
// Cell cell21 = dataRow.createCell(21);
|
||||
// cell21.setCellValue(waresVo.getArrivalTime());
|
||||
// cell21.setCellStyle(style);
|
||||
// }
|
||||
// if (waresVo.getPutOnTime() != null) {
|
||||
// Cell cell22 = dataRow.createCell(22);
|
||||
// cell22.setCellValue(DateUtil.format(waresVo.getPutOnTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
// cell22.setCellStyle(style);
|
||||
// }
|
||||
// if (waresVo.getPutOffTime() != null) {
|
||||
// Cell cell23 = dataRow.createCell(23);
|
||||
// cell23.setCellValue(DateUtil.format(waresVo.getPutOffTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
// cell23.setCellStyle(style);
|
||||
// }
|
||||
//
|
||||
// if (waresVo.getCreationTime() != null) {
|
||||
// Cell cell24 = dataRow.createCell(24);
|
||||
// cell24.setCellValue(DateUtil.format(waresVo.getCreationTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
// cell24.setCellStyle(style);
|
||||
// }
|
||||
//
|
||||
// if (waresVo.getListingTime() != null) {
|
||||
// Cell cell25 = dataRow.createCell(25);
|
||||
// cell25.setCellValue(DateUtil.format(waresVo.getListingTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
// cell25.setCellStyle(style);
|
||||
// }
|
||||
// if (waresVo.getRemovalTime() != null) {
|
||||
// Cell cell26 = dataRow.createCell(26);
|
||||
// cell26.setCellValue(DateUtil.format(waresVo.getRemovalTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
// cell26.setCellStyle(style);
|
||||
// }
|
||||
// num += 1;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// File file = new File("商品导出.xls");
|
||||
//
|
||||
// FileOutputStream fos = new FileOutputStream(file);
|
||||
// workbook.write(fos);
|
||||
// fos.close();
|
||||
// String fileName = file.getName();
|
||||
//
|
||||
// response.setContentType("application/octet-stream");
|
||||
// response.setHeader("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"");
|
||||
//
|
||||
// FileInputStream fis = new FileInputStream(file);
|
||||
// OutputStream out = response.getOutputStream();
|
||||
// byte[] buffer = new byte[4096];
|
||||
// int bytesRead = -1;
|
||||
// while ((bytesRead = fis.read(buffer)) != -1) {
|
||||
// out.write(buffer, 0, bytesRead);
|
||||
// }
|
||||
// fis.close();
|
||||
// out.close();
|
||||
//
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -560,7 +307,7 @@ public class BdWaresController extends BaseController {
|
|||
LambdaQueryWrapper<BdWares> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdWares::getWaresCode, wares.getWaresCode());
|
||||
queryWrapper.eq(BdWares::getSpecialArea, wares.getSpecialArea());
|
||||
if (waresService.count(queryWrapper) > 0) {
|
||||
if (iBdWaresService.count(queryWrapper) > 0) {
|
||||
return AjaxResult.error("商品编号重复");
|
||||
}
|
||||
}
|
||||
|
@ -660,8 +407,7 @@ public class BdWaresController extends BaseController {
|
|||
if (!isPutOn) {
|
||||
return AjaxResult.error("产品规格至少有一个上架");
|
||||
}
|
||||
// wares.setSort(0);
|
||||
waresService.saveWares(wares, userTokenService.getLoginUser());
|
||||
iBdWaresService.saveWares(wares, userTokenService.getLoginUser());
|
||||
return AjaxResult.success(wares.getWaresCode());
|
||||
}
|
||||
|
||||
|
@ -688,7 +434,7 @@ public class BdWaresController extends BaseController {
|
|||
queryWrapper.eq(BdWares::getWaresCode, waresParams.getWaresCode());
|
||||
queryWrapper.eq(BdWares::getSpecialArea, waresParams.getSpecialArea());
|
||||
queryWrapper.notIn(BdWares::getPkId, waresParams.getWaresId());
|
||||
if (waresService.count(queryWrapper) > 0) {
|
||||
if (iBdWaresService.count(queryWrapper) > 0) {
|
||||
return AjaxResult.error("商品编号重复");
|
||||
}
|
||||
}
|
||||
|
@ -704,17 +450,6 @@ public class BdWaresController extends BaseController {
|
|||
if (waresParams.getCover1() == null) {
|
||||
return AjaxResult.error("商品图片必传");
|
||||
}
|
||||
// if (waresParams.getPkPrefixLabel() == null || waresParams.getPkCoolLabel() == null || waresParams.getPkGuaranteeLabel() == null || waresParams.getPkSellingPoint() == null){
|
||||
// return AjaxResult.error(WaresMsgConstants.WARES_LABEL_DUPLICATE);
|
||||
// }
|
||||
// 检测排序重复
|
||||
// QueryWrapper<BdWares> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq("SORT", waresParams.getSort());
|
||||
// queryWrapper.eq("PK_COUNTRY",SecurityUtils.getPkCountry());
|
||||
// queryWrapper.notIn("PK_ID", waresParams.getWaresId());
|
||||
// if (waresService.count(queryWrapper) > 0) {
|
||||
// return AjaxResult.error(TransactionUtils.getContent(ConfigMsgConstants.HO_SORT_NOT_REPEAT));
|
||||
// }
|
||||
|
||||
// 是否陆运
|
||||
int isLandTrans = 1;
|
||||
|
@ -800,10 +535,7 @@ public class BdWaresController extends BaseController {
|
|||
return AjaxResult.error("规格图片必传");
|
||||
}
|
||||
}
|
||||
|
||||
// waresParams.setSort(0);
|
||||
waresService.updateWares(waresParams, userTokenService.getLoginUser());
|
||||
// waresService.saveWaresModifyRecord(waresParams, userTokenService.getLoginUser(),EModifyRecordType.WARES_UPDATE.getValue());
|
||||
iBdWaresService.updateWares(waresParams, userTokenService.getLoginUser());
|
||||
return AjaxResult.success(waresParams.getWaresCode());
|
||||
}
|
||||
|
||||
|
@ -816,7 +548,7 @@ public class BdWaresController extends BaseController {
|
|||
@DeleteMapping("/{pkId}")
|
||||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.DELETE)
|
||||
public AjaxResult remove(@PathVariable Integer pkId) {
|
||||
waresService.removeWares(pkId, userTokenService.getLoginUser());
|
||||
iBdWaresService.removeWares(pkId, userTokenService.getLoginUser());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
@ -832,7 +564,7 @@ public class BdWaresController extends BaseController {
|
|||
List<BdRangeExt> rsList = rangeDto.getData();
|
||||
Map<Integer, BdRangeExt> rangeMap = rsList.stream().collect(Collectors.toMap(BdRangeExt::getPkId, Function.identity()));
|
||||
|
||||
BdWares wares = waresService.getById(pkId);
|
||||
BdWares wares = iBdWaresService.getById(pkId);
|
||||
LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdWaresExtend::getPkWares, pkId);
|
||||
BdWaresExtend waresExtend = waresExtendService.getOne(queryWrapper);
|
||||
|
@ -1008,15 +740,6 @@ public class BdWaresController extends BaseController {
|
|||
LambdaQueryWrapper<BdWaresRange> waresRangeWrapper = new LambdaQueryWrapper<>();
|
||||
waresRangeWrapper.eq(BdWaresRange::getPkWares, pkId);
|
||||
int waresRangeCount = waresRangeService.count(waresRangeWrapper);
|
||||
// 查询不存在的极差等级 (部分极差等级可能是后期添加导致商品和极差关联表不存在该极差信息)
|
||||
// List<Integer> rangeArrayList = new ArrayList<>();
|
||||
// Map<Integer, BdWaresRange> wrMap = rangeList.stream().collect(Collectors.toMap(BdWaresRange::getPkRange, Function.identity()));
|
||||
// for (BdRangeExt bdRangeExt : rsList) {
|
||||
// BdWaresRange bdWaresRange = wrMap.get(bdRangeExt.getPkId());
|
||||
// if (bdWaresRange == null){
|
||||
// rangeArrayList.add(bdWaresRange.getPkRange());
|
||||
// }
|
||||
// }
|
||||
List<Integer> rgList = new ArrayList<>();
|
||||
for (BdWaresRange bdWaresRange : rangeList) {
|
||||
if (bdWaresRange.getPkId() != null) {
|
||||
|
@ -1136,7 +859,7 @@ public class BdWaresController extends BaseController {
|
|||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.UP_MOVE)
|
||||
public AjaxResult move(Integer waresId, Integer waresMoveType, Integer specialArea) {
|
||||
LoginUser loginUser = userTokenService.getLoginUser();
|
||||
waresService.waresMove(waresId, waresMoveType, loginUser, specialArea);
|
||||
iBdWaresService.waresMove(waresId, waresMoveType, loginUser, specialArea);
|
||||
return AjaxResult.success();
|
||||
|
||||
}
|
||||
|
@ -1151,7 +874,7 @@ public class BdWaresController extends BaseController {
|
|||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.TOP)
|
||||
public AjaxResult floatingRoof(Integer waresId) {
|
||||
LoginUser loginUser = userTokenService.getLoginUser();
|
||||
waresService.floatingRoof(waresId, loginUser);
|
||||
iBdWaresService.floatingRoof(waresId, loginUser);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
@ -1163,7 +886,7 @@ public class BdWaresController extends BaseController {
|
|||
@GetMapping("botton-up")
|
||||
public AjaxResult bottomUp(Integer waresId) {
|
||||
LoginUser loginUser = userTokenService.getLoginUser();
|
||||
waresService.bottomUp(waresId, loginUser);
|
||||
iBdWaresService.bottomUp(waresId, loginUser);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
@ -1174,13 +897,13 @@ public class BdWaresController extends BaseController {
|
|||
*/
|
||||
@GetMapping("create-wares-code")
|
||||
public AjaxResult createWaresCode() {
|
||||
String waresCode = CreateNormsCodeUtils.createWaresCode(waresService.getLastWaresCode());
|
||||
String waresCode = CreateNormsCodeUtils.createWaresCode(iBdWaresService.getLastWaresCode());
|
||||
return AjaxResult.success(waresCode);
|
||||
}
|
||||
|
||||
@GetMapping("/getMaxSortNum")
|
||||
public AjaxResult getMaxSortNum() {
|
||||
return AjaxResult.success("请求成功!", waresService.getMaxSortNum());
|
||||
return AjaxResult.success("请求成功!", iBdWaresService.getMaxSortNum());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1191,7 +914,7 @@ public class BdWaresController extends BaseController {
|
|||
@GetMapping("create-wares-sort")
|
||||
public AjaxResult createWaresSort() {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
Integer maxSort = waresService.getMaxSort(pkCountry);
|
||||
Integer maxSort = iBdWaresService.getMaxSort(pkCountry);
|
||||
if (maxSort == null) {
|
||||
maxSort = 0;
|
||||
}
|
||||
|
@ -1209,7 +932,7 @@ public class BdWaresController extends BaseController {
|
|||
queryWrapper.eq(BdWares::getWaresName, waresName);
|
||||
}
|
||||
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
|
||||
List<BdWares> list = waresService.list(queryWrapper);
|
||||
List<BdWares> list = iBdWaresService.list(queryWrapper);
|
||||
List<WaresEntnyOrderVo> resultList = new ArrayList<>();
|
||||
for (BdWares bdWares : list) {
|
||||
WaresEntnyOrderVo waresEntnyOrderVo = new WaresEntnyOrderVo();
|
||||
|
@ -1310,7 +1033,7 @@ public class BdWaresController extends BaseController {
|
|||
queryWrapper.like(BdWares::getWaresName, waresParams.getQueryName()).or().like(BdWares::getWaresCode, waresParams.getQueryName());
|
||||
}
|
||||
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
|
||||
List<BdWares> list = waresService.list(queryWrapper);
|
||||
List<BdWares> list = iBdWaresService.list(queryWrapper);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
@ -1322,7 +1045,7 @@ public class BdWaresController extends BaseController {
|
|||
for (ComputeWaresPrice computeWaresPrice : computhParams.getComputeWaresPriceList()) {
|
||||
computeWaresPrice.setPkWares(computhParams.getPkWares());
|
||||
}
|
||||
return AjaxResult.success(waresService.computeWaresPrice(computhParams.getComputeWaresPriceList()));
|
||||
return AjaxResult.success(iBdWaresService.computeWaresPrice(computhParams.getComputeWaresPriceList()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1334,7 +1057,7 @@ public class BdWaresController extends BaseController {
|
|||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.APPROVAL, remark = "商品新増审批")
|
||||
@PostMapping("/wares-approve")
|
||||
public AjaxResult waresApprove(@Valid @RequestBody WaresApproveParam param) {
|
||||
waresService.update(Wrappers.<BdWares>lambdaUpdate()
|
||||
iBdWaresService.update(Wrappers.<BdWares>lambdaUpdate()
|
||||
.eq(BdWares::getPkId, param.getPkWares())
|
||||
.eq(BdWares::getWaresStatus, EApproveStatus.ALREADY_SUBMIT.getValue())
|
||||
.set(BdWares::getWaresStatus, EApproveStatus.FINISH.getValue())
|
||||
|
@ -1343,4 +1066,30 @@ public class BdWaresController extends BaseController {
|
|||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 非在售商品列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list-no-sale")
|
||||
public TableDataInfo listNoSale(WaresNoSaleParam param) {
|
||||
List<WaresNoSaleVO> resultList = new ArrayList<>();
|
||||
|
||||
List<BdWaresExt> list = iBdWaresService.listWaresNoSale(param);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
for (BdWaresExt bdWaresExt : list) {
|
||||
WaresNoSaleVO vo = BeanUtil.copyProperties(bdWaresExt, WaresNoSaleVO.class);
|
||||
vo.setSpecialAreaVal(ESpecialArea.getLabelByValue(vo.getSpecialArea()));
|
||||
vo.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(vo.getPreSaleStatus()));
|
||||
resultList.add(vo);
|
||||
}
|
||||
}
|
||||
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
tableDataInfo.setRows(resultList);
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.hzs.common.domain.sale.ext.BdWaresExt;
|
|||
import com.hzs.common.domain.sale.wares.BdWares;
|
||||
import com.hzs.common.domain.system.config.BdAgreement;
|
||||
import com.hzs.sale.index.controller.param.IndexWaresParam;
|
||||
import com.hzs.sale.wares.param.WaresNoSaleParam;
|
||||
import com.hzs.sale.wares.param.WaresParams;
|
||||
import com.hzs.sale.wares.vo.WaresAuthorityVo;
|
||||
import com.hzs.sale.wares.vo.WaresVo;
|
||||
|
@ -157,4 +158,12 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
|
|||
*/
|
||||
List<BdWaresExt> listWaresNew(@Param("param") IndexWaresParam param);
|
||||
|
||||
/**
|
||||
* 查询非在售商品
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<BdWaresExt> listWaresNoSale(@Param("param") WaresNoSaleParam param);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
package com.hzs.sale.wares.param;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/5/22 14:22
|
||||
* @Classname: ConfirmOrderWaresInfoParams
|
||||
* @PackageName: com.hzs.sale.wares.param
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.sale.wares.param
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-05-22 14:22
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ConfirmOrderWaresInfoList {
|
||||
|
||||
|
||||
/**
|
||||
* 商品外键
|
||||
*/
|
||||
private Long pkTWares;
|
||||
/**
|
||||
* 商品sku外键
|
||||
*/
|
||||
private Long pkTWaresSku;
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 渠道
|
||||
*/
|
||||
private Integer source;
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package com.hzs.sale.wares.param;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/5/23 15:21
|
||||
* @Classname: ConfirmOrderWaresInfoParams
|
||||
* @PackageName: com.hzs.sale.wares.param
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.sale.wares.param
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-05-23 15:21
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ConfirmOrderWaresInfoParams {
|
||||
|
||||
|
||||
private List<ConfirmOrderWaresInfoList> confirmOrderWaresInfoParamsList;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.hzs.sale.wares.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 非在售商品查询
|
||||
*/
|
||||
@Data
|
||||
public class WaresNoSaleParam {
|
||||
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
private String waresCode;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String waresName;
|
||||
/**
|
||||
* 商品状态
|
||||
*/
|
||||
private Integer preSaleStatus;
|
||||
|
||||
}
|
|
@ -8,6 +8,7 @@ import com.hzs.common.domain.system.config.BdAgreement;
|
|||
import com.hzs.common.domain.system.config.ext.BdRangeExt;
|
||||
import com.hzs.sale.index.controller.param.IndexWaresParam;
|
||||
import com.hzs.sale.wares.param.ComputeWaresPrice;
|
||||
import com.hzs.sale.wares.param.WaresNoSaleParam;
|
||||
import com.hzs.sale.wares.param.WaresParams;
|
||||
import com.hzs.sale.wares.vo.RecommendWaresInfoVo;
|
||||
import com.hzs.sale.wares.vo.WaresAuthorityVo;
|
||||
|
@ -224,4 +225,12 @@ public interface IBdWaresService extends IService<BdWares> {
|
|||
*/
|
||||
List<BdWaresExt> listWares(IndexWaresParam param);
|
||||
|
||||
/**
|
||||
* 查询非在售商品
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param);
|
||||
|
||||
}
|
||||
|
|
|
@ -1633,7 +1633,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
|||
@Override
|
||||
public List<BdWaresExt> listWares(IndexWaresParam param) {
|
||||
return baseMapper.listWaresNew(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BdWaresExt> listWaresNoSale(WaresNoSaleParam param) {
|
||||
return baseMapper.listWaresNoSale(param);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package com.hzs.sale.wares.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 非在售商品查询返回
|
||||
*/
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class WaresNoSaleVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Integer pkId;
|
||||
|
||||
/**
|
||||
* 商品图
|
||||
*/
|
||||
private String cover1;
|
||||
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
private String waresCode;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String waresName;
|
||||
/**
|
||||
* 商品专区
|
||||
*/
|
||||
private Integer specialArea;
|
||||
private String specialAreaVal;
|
||||
/**
|
||||
* 商品状态
|
||||
*/
|
||||
private Integer preSaleStatus;
|
||||
private String preSaleStatusVal;
|
||||
|
||||
|
||||
}
|
|
@ -71,14 +71,6 @@
|
|||
so.remark,
|
||||
soi.creation_time,
|
||||
so.pay_time,
|
||||
case
|
||||
when so.PK_ORIGINAL_ORDER is not null then
|
||||
(select sot.order_code
|
||||
from sa_order sot
|
||||
where sot.pk_id = so.PK_ORIGINAL_ORDER)
|
||||
else
|
||||
null
|
||||
end original_order_code,
|
||||
bs.name storehouse_name,
|
||||
bu.name unit_name
|
||||
from SA_ORDER so
|
||||
|
@ -117,6 +109,15 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 在售 -->
|
||||
and (bwe.pre_sale_status = 0
|
||||
<if test="param.pkWaresList != null and param.pkWaresList.size > 0">
|
||||
or soi.pk_wares in
|
||||
<foreach collection="param.pkWaresList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
<!-- 地区权限处理 -->
|
||||
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
|
||||
and so.rec_province in
|
||||
|
@ -131,9 +132,6 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="null != param.pkOriginalOrder">
|
||||
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
|
||||
</if>
|
||||
</if>
|
||||
</foreach>
|
||||
order by creation_time desc, order_code desc
|
||||
|
@ -171,14 +169,6 @@
|
|||
so.remark,
|
||||
soi.creation_time,
|
||||
so.pay_time,
|
||||
case
|
||||
when so.PK_ORIGINAL_ORDER is not null then
|
||||
(select sot.order_code
|
||||
from sa_order sot
|
||||
where sot.pk_id = so.PK_ORIGINAL_ORDER)
|
||||
else
|
||||
null
|
||||
end original_order_code,
|
||||
bs.name storehouse_name,
|
||||
bu.name unit_name,
|
||||
so.SYSTEM_TYPE
|
||||
|
@ -221,6 +211,15 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 在售 -->
|
||||
and (bwe.pre_sale_status = 0
|
||||
<if test="param.pkWaresList != null and param.pkWaresList.size > 0">
|
||||
or soi.pk_wares in
|
||||
<foreach collection="param.pkWaresList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
<!-- 地区权限处理 -->
|
||||
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
|
||||
and so.rec_province in
|
||||
|
@ -235,9 +234,6 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="null != param.pkOriginalOrder">
|
||||
and so.PK_ORIGINAL_ORDER = #{param.pkOriginalOrder}
|
||||
</if>
|
||||
order by soi.creation_time desc, so.order_code desc
|
||||
</if>
|
||||
</select>
|
||||
|
@ -443,6 +439,15 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 在售 -->
|
||||
and (bwe.pre_sale_status = 0
|
||||
<if test="param.pkWaresList != null and param.pkWaresList.size > 0">
|
||||
or soi.pk_wares in
|
||||
<foreach collection="param.pkWaresList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
<!-- 地区权限处理 -->
|
||||
<if test="param.areaScopeList != null and param.areaScopeList.size > 0">
|
||||
and so.rec_province in
|
||||
|
@ -772,7 +777,6 @@
|
|||
oi.SPECS_NAME specsName,
|
||||
bp.WEIGHT weight,
|
||||
bp.SHIPPING_CHANNEL shippingChannel,
|
||||
bc.IN_EXCHANGE_RATE inExchangeRate,
|
||||
oi.LOGISTICS_CODE logisticsCode,
|
||||
oi.LOGISTICS_COMPANY logisticsCompany,
|
||||
m.MEMBER_CODE buyMemberCode,
|
||||
|
@ -786,7 +790,6 @@
|
|||
ver.VERTEX_NAME vertexName
|
||||
from sa_order_items oi
|
||||
left join sa_order so on oi.PK_ORDER = so.PK_ID
|
||||
left join BD_CURRENCY bc on bc.PK_ID = so.PK_RATE
|
||||
left join CU_MEMBER cm on cm.PK_ID = so.PK_MEMBER
|
||||
left join BD_WARES_EXTEND we on we.PK_WARES = oi.PK_WARES
|
||||
left join BD_WARES bw on bw.PK_ID = we.PK_WARES
|
||||
|
|
|
@ -426,4 +426,31 @@
|
|||
order by bd.sort desc, bd.wares_price
|
||||
</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>
|
||||
|
|
|
@ -359,14 +359,6 @@ public class EnumsInitController {
|
|||
initList.add(this.createData(value.getKey(), value.getLabel()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 供应方式
|
||||
*/
|
||||
for (ESupplyWay value : ESupplyWay.values()) {
|
||||
initList.add(this.createData(value.getKey(), value.getLabel()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
|
|
|
@ -5,8 +5,6 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
/**
|
||||
* 读取项目相关配置
|
||||
*
|
||||
* @author hzs
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "bd")
|
||||
|
@ -39,6 +37,15 @@ public class BdConfig {
|
|||
*/
|
||||
private static String android;
|
||||
|
||||
/**
|
||||
* 商品同步是否开启(0=开启,1=不开启)
|
||||
*/
|
||||
private static Integer productSync;
|
||||
/**
|
||||
* 商品同步地址
|
||||
*/
|
||||
private static String productSyncUrl;
|
||||
|
||||
public static String getSysName() {
|
||||
return sysName;
|
||||
}
|
||||
|
@ -87,4 +94,20 @@ public class BdConfig {
|
|||
BdConfig.android = android;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,16 +21,6 @@ public enum EDelivery {
|
|||
*/
|
||||
COMPANY_PICKED_UP(2, "公司自提", 0, EnumsPrefixConstants.DELIVERY + "2"),
|
||||
|
||||
/**
|
||||
* 店铺自提
|
||||
*/
|
||||
SHOP_PICKED_UP(3, "店铺自提", 0, EnumsPrefixConstants.DELIVERY + "3"),
|
||||
|
||||
/**
|
||||
* 店铺配送
|
||||
*/
|
||||
SHOP_DELIVERY(4, "店铺配送", 0, EnumsPrefixConstants.DELIVERY + "4"),
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
|
@ -58,4 +48,18 @@ public enum EDelivery {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EDelivery enums : EDelivery.values()) {
|
||||
if (enums.getValue() == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,19 +40,15 @@ public enum EOrderPayType {
|
|||
*/
|
||||
private final String key;
|
||||
|
||||
|
||||
/**
|
||||
* 根据值获取枚举
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static EOrderPayType getEnumByValue(int value) {
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EOrderPayType enums : EOrderPayType.values()) {
|
||||
if (enums.getValue() == value) {
|
||||
return enums;
|
||||
if (enums.value == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.hzs.common.core.constant.EnumsPrefixConstants;
|
|||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -68,22 +67,6 @@ public enum EOrderStatus {
|
|||
*/
|
||||
private static List<EOrderStatus> apiList;
|
||||
|
||||
/**
|
||||
* 获取会员前端列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static List<EOrderStatus> getApiList() {
|
||||
if (null == apiList) {
|
||||
apiList = new ArrayList<>();
|
||||
apiList.add(WAIT_PAY);
|
||||
apiList.add(PAY);
|
||||
apiList.add(DELIVERED);
|
||||
apiList.add(RECEIVED);
|
||||
}
|
||||
return apiList;
|
||||
}
|
||||
|
||||
public static EOrderStatus getEOrderStatus(int value) {
|
||||
for (EOrderStatus eOrderStatus : EOrderStatus.values()) {
|
||||
if (eOrderStatus.value == value) {
|
||||
|
@ -93,4 +76,16 @@ public enum EOrderStatus {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EOrderStatus enums : EOrderStatus.values()) {
|
||||
if (enums.value == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,4 +54,16 @@ public enum EPresaleStatus {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EPresaleStatus enums : EPresaleStatus.values()) {
|
||||
if (enums.getValue() == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description: 产品发货渠道
|
||||
* 产品发货渠道
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
@ -44,4 +44,18 @@ public enum EShippingChannel {
|
|||
}
|
||||
return TOTAL_WAREHOUSE;
|
||||
}
|
||||
|
||||
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EShippingChannel enums : EShippingChannel.values()) {
|
||||
if (enums.value == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
package com.hzs.common.core.enums;
|
||||
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description: 供应方式
|
||||
* @Author: jiang chao
|
||||
* @Time: 2022/11/4 11:58
|
||||
* @Classname: ESupplyWay
|
||||
* @PackageName: com.hzs.common.core.enums
|
||||
* 供应方式
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
@ -18,12 +13,12 @@ public enum ESupplyWay {
|
|||
/**
|
||||
* 自营
|
||||
*/
|
||||
SELF(0, "自营", 0, EnumsPrefixConstants.SUPPLY_WAY + "0"),
|
||||
SELF(0, "自营", 0),
|
||||
|
||||
/**
|
||||
* 非自营
|
||||
*/
|
||||
NO_SELF(1, "非自营", 0, EnumsPrefixConstants.SUPPLY_WAY + "1"),
|
||||
NO_SELF(1, "非自营", 0),
|
||||
|
||||
;
|
||||
|
||||
|
@ -39,18 +34,26 @@ public enum ESupplyWay {
|
|||
* 是否启用(0=是,1=否) -- 来源EYesNo
|
||||
*/
|
||||
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()) {
|
||||
if (eSupplyWay.value == value){
|
||||
if (eSupplyWay.value == value) {
|
||||
return eSupplyWay;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getLabelByVal(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
|
||||
if (eSupplyWay.getValue() == value) {
|
||||
return eSupplyWay.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,15 +10,24 @@ import lombok.Getter;
|
|||
@Getter
|
||||
public enum ESysName {
|
||||
|
||||
MANAGE("manage", "后台管理"),
|
||||
|
||||
/**
|
||||
* 乐学
|
||||
*/
|
||||
LX("lx", "乐学"),
|
||||
|
||||
LX("lx", "乐学CN"),
|
||||
/**
|
||||
* 北大
|
||||
*/
|
||||
BD("bd", "北大"),
|
||||
BD("bd", "北大BD"),
|
||||
/**
|
||||
* 新零售
|
||||
*/
|
||||
BF("bf", "新零售BF"),
|
||||
/**
|
||||
* 新零售店铺
|
||||
*/
|
||||
BL("bl", "新零售店铺BL"),
|
||||
|
||||
;
|
||||
|
||||
|
@ -31,4 +40,23 @@ public enum ESysName {
|
|||
*/
|
||||
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 "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,13 +43,16 @@ public enum ETransportType {
|
|||
*/
|
||||
private final String key;
|
||||
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (ETransportType enums : ETransportType.values()) {
|
||||
if (enums.value == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static ETransportType getETransportType(int value) {
|
||||
for (ETransportType eTransportType : ETransportType.values()) {
|
||||
if (eTransportType.getValue() == value) {
|
||||
return eTransportType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,21 +6,12 @@ import org.springframework.stereotype.Component;
|
|||
import java.util.concurrent.*;
|
||||
|
||||
/**
|
||||
* Description: 线程工具类
|
||||
* Author: jiang chao
|
||||
* Time: 2022/8/30 10:10
|
||||
* Classname: ThreadUtil
|
||||
* PackageName: com.hzs.common.core.utils
|
||||
* 线程工具类
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ThreadUtils {
|
||||
|
||||
/**
|
||||
* 初始化创建4个长度的固定线程池
|
||||
*/
|
||||
public static ExecutorService executorService = Executors.newFixedThreadPool(4);
|
||||
|
||||
/**
|
||||
* 创建线程池
|
||||
*/
|
||||
|
|
|
@ -151,15 +151,6 @@ security:
|
|||
- /member/manage/handle-business/online-petition-confirm
|
||||
- /member/manage/member-empty/submit
|
||||
- /member/manager/zeroRevoke/petition
|
||||
- /activity/manage/gift-benefits/save-petition
|
||||
- /activity/manage/gift-benefits/up-petition
|
||||
- /activity/manage/gift-benefits/del-petition
|
||||
- /activity/manage/new-people/save-petition
|
||||
- /activity/manage/new-people/up-petition
|
||||
- /activity/manage/new-people/del-petition
|
||||
- /activity/manage/ac-bean-rule-config/save-petition
|
||||
- /activity/manage/ac-bean-rule-config/up-petition
|
||||
- /activity/manage/ac-bean-rule-config/del-petition
|
||||
- /activity/manage/tourism/online-petition
|
||||
- /activity/manage/wares-rule-config/save-activity
|
||||
- /activity/manage/wares-rule-config/update
|
||||
|
|
Loading…
Reference in New Issue