Commit 86318a22 by 陶光胜

门店查询支持多个门店控件id聚合

parent 13c9a261
......@@ -29,6 +29,12 @@ public class StoreSearchDTO implements Serializable {
private Integer completeStatus;
private List<Integer> storeResourceList;
private Integer erpStatus;
private String storeGroupIds;
private String regionIds;
private String storeTypes;
private String storeStatuss;
private String erpStatuss;
private String storeTags;
public Integer getStoreGroupId() {
return storeGroupId;
......@@ -232,4 +238,52 @@ public class StoreSearchDTO implements Serializable {
this.erpStatus = erpStatus;
return this;
}
public String getStoreGroupIds() {
return storeGroupIds;
}
public void setStoreGroupIds(String storeGroupIds) {
this.storeGroupIds = storeGroupIds;
}
public String getRegionIds() {
return regionIds;
}
public void setRegionIds(String regionIds) {
this.regionIds = regionIds;
}
public String getStoreTypes() {
return storeTypes;
}
public void setStoreTypes(String storeTypes) {
this.storeTypes = storeTypes;
}
public String getStoreStatuss() {
return storeStatuss;
}
public void setStoreStatuss(String storeStatuss) {
this.storeStatuss = storeStatuss;
}
public String getErpStatuss() {
return erpStatuss;
}
public void setErpStatuss(String erpStatuss) {
this.erpStatuss = erpStatuss;
}
public String getStoreTags() {
return storeTags;
}
public void setStoreTags(String storeTags) {
this.storeTags = storeTags;
}
}
......@@ -1531,6 +1531,39 @@ public class StoreApiServiceImpl implements StoreApiService {
json = QueryConditionAssemblyUtil.createSimpleQueryNode(StoreESFieldsEnum.LOCATION.getField(), OperateEnum.OPERATE_LOCATION, storeSearchDTO.getLatitude()+","+storeSearchDTO.getLongitude());
jsonObjectList.add(json);
}
if(StringUtils.isNotBlank(storeSearchDTO.getStoreGroupIds())){
json = QueryConditionAssemblyUtil.createSimpleQueryNode(StoreESFieldsEnum.STOREGROUPIDLIST.getField(), OperateEnum.OPERATE_ARR_CONTAIN, storeSearchDTO.getStoreGroupIds().replaceAll(",", " "));
jsonObjectList.add(json);
}
if(StringUtils.isNotBlank(storeSearchDTO.getRegionIds())){
json = QueryConditionAssemblyUtil.createSimpleQueryNode(StoreESFieldsEnum.REGIONID.getField(), OperateEnum.OPERATE_ARR_CONTAIN, storeSearchDTO.getRegionIds().replaceAll(",", " "));
jsonObjectList.add(json);
}
if(StringUtils.isNotBlank(storeSearchDTO.getStoreTypes())){
json = QueryConditionAssemblyUtil.createSimpleQueryNode(StoreESFieldsEnum.STORETYPE.getField(), OperateEnum.OPERATE_ARR_CONTAIN, storeSearchDTO.getStoreTypes().replaceAll(",", " "));
jsonObjectList.add(json);
}
if(StringUtils.isNotBlank(storeSearchDTO.getStoreStatuss())){
json = QueryConditionAssemblyUtil.createSimpleQueryNode(StoreESFieldsEnum.STATUS.getField(), OperateEnum.OPERATE_ARR_CONTAIN, storeSearchDTO.getStoreStatuss().replaceAll(",", " "));
jsonObjectList.add(json);
}
if(StringUtils.isNotBlank(storeSearchDTO.getErpStatuss())){
json = QueryConditionAssemblyUtil.createSimpleQueryNode(StoreESFieldsEnum.ERPSTATUS.getField(), OperateEnum.OPERATE_ARR_CONTAIN, storeSearchDTO.getErpStatuss().replaceAll(",", " "));
jsonObjectList.add(json);
}
if(StringUtils.isNotBlank(storeSearchDTO.getStoreTags())){
String[] arr = storeSearchDTO.getStoreTags().split(",");
List<TabStoreTag> storeTags = this.storeTagService.listByEnterprise(storeSearchDTO.getEnterpriseId());
storeTags.stream().filter(tag -> {
for (String s : arr) {
if (tag.getStoreTagId().intValue() == Integer.valueOf(s)) {
return true;
}
}
return false;
}).map(tag -> storeSearchDTO.getStoreResourceList().add(tag.getStoreTagId()));
}
String storeWidgetJSON = this.buildStoreWidgetJSON(storeSearchDTO.getStoreResource() == null ? null : storeSearchDTO.getStoreResource().intValue(), json, jsonObjectList);
/*****如果存在没有门店权限的门店控件id,直接返回*****/
if (StringUtils.isNotBlank(storeWidgetJSON)) {
......
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