Commit 02fc0b23 by guojuxing

包装类型相等判断修改

parent af27d0b2
......@@ -72,14 +72,14 @@ public class BaseSalesController {
qo.setChannel(newChannel);
}
/***********如果是线下的第一层级或者门店导购层级,需要展示切换层级按钮*************/
boolean isFirstLevel = (qo.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue() && qo.getLevel().intValue() == levelVo.getLevel())
boolean isFirstLevel = (StoreChannelEnum.OFFLINE.getChannel().equals(qo.getChannel()) && qo.getLevel().intValue() == levelVo.getLevel())
|| (qo.getLevel() == 7 || qo.getLevel() == 8);
if(isFirstLevel){
vo.setChangeLevel(1);
}
if(qo.getChannel() == null){
vo.setLevelName("所有渠道");
} else if(qo.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue()){
} else if(StoreChannelEnum.OFFLINE.getChannel().equals(qo.getChannel())){
vo.setLevelName(LevelUtil.getLevelName(qo.getLevel()));
} else {
vo.setLevelName("店铺层级");
......@@ -94,7 +94,7 @@ public class BaseSalesController {
dto.setCountType(2);
Integer wgs = storeSearchUtils.isWgs(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJson());
/**所有渠道或者线下渠道第一层级 合计算上无归属数据**/
boolean isContainNoOwnership = (qo.getChannel() == null || (qo.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue() && qo.getLevel().intValue() == levelVo.getLevel())) && wgs == 1;
boolean isContainNoOwnership = (qo.getChannel() == null || (StoreChannelEnum.OFFLINE.getChannel().equals(qo.getChannel()) && qo.getLevel().intValue() == levelVo.getLevel())) && wgs == 1;
if(isContainNoOwnership){
dto.getStoreInfoIdList().add(-1);
dto.getOnLine().add("-1");
......
......@@ -109,14 +109,14 @@ public class GoDownComponent {
params.setChannel(newChannel);
}
/***********如果是线下的第一层级,需要展示切换层级按钮*************/
boolean isFirstLevel = params.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue() && params.getLevel().intValue() == levelVo.getLevel()
boolean isFirstLevel = StoreChannelEnum.OFFLINE.getChannel().equals(params.getChannel()) && params.getLevel().intValue() == levelVo.getLevel()
|| (params.getLevel() == 7 || params.getLevel() == 8);
if(isFirstLevel){
vo.setChangeLevel(1);
}
if(params.getChannel() == null){
vo.setLevelName("所有渠道");
} else if(params.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue()){
} else if(StoreChannelEnum.OFFLINE.getChannel().equals(params.getChannel())){
vo.setLevelName(LevelUtil.getLevelName(params.getLevel()));
} else {
vo.setLevelName("店铺层级");
......@@ -128,7 +128,7 @@ public class GoDownComponent {
public void setValueTotal(AbstractCommonQo params, LevelVo levelVo){
Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson());
/**所有渠道或者线下渠道第一层级 合计算上无归属数据**/
boolean isContainNoOwnership = (params.getChannel() == null || (params.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue() && params.getLevel().intValue() == levelVo.getLevel())) && wgs == 1;
boolean isContainNoOwnership = (params.getChannel() == null || (StoreChannelEnum.OFFLINE.getChannel().equals(params.getChannel()) && params.getLevel().intValue() == levelVo.getLevel())) && wgs == 1;
if(isContainNoOwnership){
if (CollectionUtils.isEmpty(params.getStoreInfoIdList())) {
params.setStoreInfoIdList(new ArrayList<>());
......@@ -198,10 +198,10 @@ public class GoDownComponent {
//全渠道
allChannel(page, level);
}
if(channel == StoreChannelEnum.GICMALL.getChannel().intValue()){
if(StoreChannelEnum.GICMALL.getChannel().equals(channel)){
gicMall(page, channel, enterpriseId, level);
}
if(channel == StoreChannelEnum.WMMALL.getChannel().intValue()){
if(StoreChannelEnum.WMMALL.getChannel().equals(channel)){
List<WmStoreDTO> result1 = wmStoreApiService.listWmStore(enterpriseId, null).getResult();
if(CollectionUtils.isNotEmpty(result1)){
page.getResult().stream().forEach(b -> {
......@@ -223,7 +223,7 @@ public class GoDownComponent {
});
}
}
if(channel == StoreChannelEnum.OFFLINE.getChannel().intValue()){
if(StoreChannelEnum.OFFLINE.getChannel().equals(channel)){
List<ClerkDTO> clerkDtoS = new ArrayList<>();
if(level.intValue() == clerkLevel){
......@@ -260,25 +260,25 @@ public class GoDownComponent {
page.getResult().stream().forEach(b -> {
BaseDTO baseSalesDTO = (BaseDTO) b;
baseSalesDTO.setLevel(level - 1);
if(StoreChannelEnum.OFFLINE.getChannel().intValue() == (baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
if(StoreChannelEnum.OFFLINE.getChannel().equals(baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
baseSalesDTO.setAreaName(StoreChannelEnum.OFFLINE.getMessage());
baseSalesDTO.setName(StoreChannelEnum.OFFLINE.getMessage());
baseSalesDTO.setChannel(StoreChannelEnum.OFFLINE.getChannel());
baseSalesDTO.setHasChildren(1);
}
if(StoreChannelEnum.GICMALL.getChannel().intValue() == (baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
if(StoreChannelEnum.GICMALL.getChannel().equals(baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
baseSalesDTO.setName(StoreChannelEnum.GICMALL.getMessage());
baseSalesDTO.setAreaName(StoreChannelEnum.GICMALL.getMessage());
baseSalesDTO.setChannel(StoreChannelEnum.GICMALL.getChannel());
baseSalesDTO.setHasChildren(1);
}
if(StoreChannelEnum.WMMALL.getChannel().intValue() == (baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
if(StoreChannelEnum.WMMALL.getChannel().equals(baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
baseSalesDTO.setName(StoreChannelEnum.WMMALL.getMessage());
baseSalesDTO.setAreaName(StoreChannelEnum.WMMALL.getMessage());
baseSalesDTO.setChannel(StoreChannelEnum.WMMALL.getChannel());
baseSalesDTO.setHasChildren(1);
}
if(StoreChannelEnum.TIANMAO.getChannel().intValue() == (baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
if(StoreChannelEnum.TIANMAO.getChannel().equals(baseSalesDTO instanceof BaseSalesDTO ? Integer.valueOf(baseSalesDTO.getId()) : Integer.valueOf(baseSalesDTO.getAreaId()))){
baseSalesDTO.setName(StoreChannelEnum.TIANMAO.getMessage());
baseSalesDTO.setAreaName(StoreChannelEnum.TIANMAO.getMessage());
baseSalesDTO.setChannel(StoreChannelEnum.TIANMAO.getChannel());
......
......@@ -355,7 +355,7 @@ public class StoreWidgetController {
List<StoreSearchVo> list = new ArrayList<>();
List<OnLineStore> onlineStoreList = onlineStore.getList();
for(OnLineStore onLineStore : onlineStoreList){
if(onLineStore.getChannel() == StoreChannelEnum.GICMALL.getChannel().intValue()){
if(StoreChannelEnum.GICMALL.getChannel().equals(onLineStore.getChannel())){
List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, search, ShopTypeEnum.MALL_SHOP.getCode()).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(ShopDTO dto : result){
......@@ -372,7 +372,7 @@ public class StoreWidgetController {
}
}
}
if(onLineStore.getChannel() == StoreChannelEnum.WMMALL.getChannel().intValue()){
if(StoreChannelEnum.WMMALL.getChannel().equals(onLineStore.getChannel())){
List<WmStoreDTO> result1 = wmStoreApiService.listWmStore(enterpriseId, search).getResult();
if(CollectionUtils.isNotEmpty(result1)){
for(WmStoreDTO wmStoreDTO : result1){
......@@ -430,7 +430,7 @@ public class StoreWidgetController {
private List<OnLineStoreVo> listOnLineStore(List<String> storeIdList, Integer type, Integer enterpriseId){
List<OnLineStoreVo> list = new ArrayList<>();
if(type == StoreChannelEnum.GICMALL.getChannel().intValue()){
if(StoreChannelEnum.GICMALL.getChannel().equals(type)){
List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, null, ShopTypeEnum.MALL_SHOP.getCode()).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(ShopDTO dto : result){
......@@ -445,7 +445,7 @@ public class StoreWidgetController {
}
}
}
}else if(type == StoreChannelEnum.WMMALL.getChannel().intValue()){
}else if(StoreChannelEnum.WMMALL.getChannel().equals(type)){
List<WmStoreDTO> result = wmStoreApiService.listWmStore(enterpriseId).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(WmStoreDTO wmStoreDTO : result){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment