Commit 22197593 by 陶光胜

门店查询接口

parent 2c4ae401
......@@ -4,7 +4,7 @@ public enum StoreESFieldsEnum {
STOREID("storeId", "门店"),
STOREINFOID("storeInfoId", "门店资料"),
STORENAME("storeName", "门店名称"),
STORECODE("storeCode", "关联门店主键"),
STORECODE("storeCode", "门店代码"),
ENTERPRISEID("enterpriseId", "企业id"),
REGIONID("regionId", "门店域"),
REGIONNAME("regionName", "门店域名称"),
......@@ -15,8 +15,8 @@ public enum StoreESFieldsEnum {
CITYID("cityId", "城市"),
COUNTYID("countyId", "地区"),
PROVINCES("provinces", "门店地区"),
STOREBRANDIDLIST("storeBrandIdList", "门店品牌"),
STOREBRANDS("storeBrands", "门店品牌"),
STOREBRANDIDLIST("storeBrandIdList", "店招品牌"),
STOREBRANDS("storeBrands", "店招品牌"),
STATUS("status", "门店启用状态"),
COMPLETESTATUS("completeStatus", "资料完善状态"),
CREATETYPE("createType", "创建方式"),
......
......@@ -7,6 +7,7 @@ import com.gic.download.utils.log.LogUtils;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.enterprise.utils.UserDetailUtils;
import com.gic.store.constant.StoreESFieldsEnum;
import com.gic.store.dto.StoreDictDTO;
import com.gic.store.service.StoreDictApiService;
import com.gic.store.web.vo.StoreDictVO;
......@@ -18,6 +19,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.List;
@Controller
......@@ -151,9 +153,23 @@ public class StoreDictController {
@ResponseBody
public RestResponse listStoreFieldRelevance(){
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
List<StoreDictVO> systemField = new ArrayList<>();
systemField.add(new StoreDictVO(StoreESFieldsEnum.STORENAME.getDesc(), StoreESFieldsEnum.STORENAME.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.STORECODE.getDesc(), StoreESFieldsEnum.STORECODE.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.REGIONID.getDesc(), StoreESFieldsEnum.REGIONID.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.STOREGROUPID.getDesc(), StoreESFieldsEnum.STOREGROUPID.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.PROVINCES.getDesc(), StoreESFieldsEnum.PROVINCES.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.STOREBRANDS.getDesc(), StoreESFieldsEnum.STOREBRANDS.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.STATUS.getDesc(), StoreESFieldsEnum.STATUS.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.COMPLETESTATUS.getDesc(), StoreESFieldsEnum.COMPLETESTATUS.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.CREATETYPE.getDesc(), StoreESFieldsEnum.CREATETYPE.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.STORETYPE.getDesc(), StoreESFieldsEnum.STORETYPE.getField()));
systemField.add(new StoreDictVO(StoreESFieldsEnum.ERPSTATUS.getDesc(), StoreESFieldsEnum.ERPSTATUS.getField()));
ServiceResponse serviceResponse = this.storeDictApiService.listStoreField(enterpriseId);
if(serviceResponse.isSuccess()){
return RestResponse.success(EntityUtil.changeEntityListByJSON(StoreDictVO.class, serviceResponse.getResult()));
List<StoreDictVO> customFields = EntityUtil.changeEntityListByJSON(StoreDictVO.class, serviceResponse.getResult());
systemField.addAll(customFields);
return RestResponse.success(systemField);
}
return EnterpriseRestResponse.failure(serviceResponse);
}
......
......@@ -22,6 +22,18 @@ public class StoreDictVO implements Serializable {
private String ownTypeStr;
private List<StoreDictVO> storeDictList;
/**
* 是否系统字段 1是 0否
*/
private Integer isSystem = 0;
public StoreDictVO(String key, String value){
this.value = value;
this.key = key;
this.checked = 1;
this.isSystem = 1;
}
public String getValue() {
return value;
}
......
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