Commit 8799b565 by 徐高华

门店分组

parent d82ab25e
......@@ -96,7 +96,6 @@ public class GicDepartmentController extends WebBaseController{
if(idList.contains(item.getStoreGroupId())) {
HaobanStoreGroupVO vo = EntityUtil.changeEntityByOrika(HaobanStoreGroupVO.class, item) ;
vo.setHasRight(true);
this.addSubGroup(enterpriseId, vo.getStoreGroupId(), retList);
retList.add(vo) ;
String chain = item.getStoreGroupChain() ;
String[] arr = chain.split("_") ;
......@@ -108,6 +107,9 @@ public class GicDepartmentController extends WebBaseController{
}
}
}
if(CollectionUtils.isNotEmpty(idList)) {
this.addSubGroup(enterpriseId, idList, retList);
}
logger.info("有权限的列表={}",otherList);
for(PowerStoreGroupDTO item : departmentList) {
String groupId = item.getStoreGroupId() ;
......@@ -131,8 +133,12 @@ public class GicDepartmentController extends WebBaseController{
}
private void addSubGroup(String enterpriseId ,String parentGroupId , List<HaobanStoreGroupVO> retList) {
List<StoreGroupDTO> list = this.storeGroupService.getStoreGroupList(enterpriseId, null, parentGroupId) ;
private void addSubGroup(String enterpriseId , List<String> idList , List<HaobanStoreGroupVO> retList) {
String[] arr = new String[idList.size()] ;
for(int i=0;i<idList.size();i++) {
arr[i] = idList.get(i) ;
}
List<StoreGroupDTO> list = this.storeGroupService.listStoreGroupAndChildren(arr,enterpriseId) ;
if(CollectionUtils.isNotEmpty(list)) {
List<HaobanStoreGroupVO> voList = EntityUtil.changeEntityListByOrika(HaobanStoreGroupVO.class, list) ;
voList.forEach(dto->{
......
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