kaiyu
2022-03-24 a827480e5e74cb6550c5f7b842bccac3023c5bdc
screen-api/src/main/java/com/moral/api/service/impl/ServicesScopeServiceImpl.java
@@ -5,13 +5,11 @@
import com.moral.api.entity.ServicesScope;
import com.moral.api.mapper.OrganizationMapper;
import com.moral.api.mapper.ServicesScopeMapper;
import com.moral.api.pojo.vo.organization.OrganizationServicesScopeVO;
import com.moral.api.service.OrganizationService;
import com.moral.api.service.ServicesScopeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.moral.constant.Constants;
import com.moral.util.RegionCodeUtils;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
@@ -73,7 +71,8 @@
            if (ObjectUtils.isEmpty(organization)){
                continue;
            }
            resultMap.put("organization",organization);
            resultMap.put("id",organization.getId());
            resultMap.put("name",organization.getName());
            QueryWrapper<ServicesScope> servicesScopeQueryWrapper = new QueryWrapper<>();
            servicesScopeQueryWrapper.eq("is_delete",Constants.NOT_DELETE);
            servicesScopeQueryWrapper.eq("organization_id",organizationId);
@@ -85,7 +84,17 @@
            if (servicesScopes.size()<1){
                continue;
            }
            resultMap.put("servicesScopes",servicesScopes);
            List<Map<String,Object>> servicesScopeList= new ArrayList<>();
            for (ServicesScope servicesScope:servicesScopes) {
                Map<String,Object> servicesScopeMap = new HashMap<>();
                servicesScopeMap.put("id",servicesScope.getId());
                servicesScopeMap.put("name",servicesScope.getName());
                servicesScopeMap.put("organizationId",servicesScope.getOrganizationId());
                servicesScopeMap.put("centerLongitude",servicesScope.getCenterLongitude());
                servicesScopeMap.put("centerLatitude",servicesScope.getCenterLatitude());
                servicesScopeList.add(servicesScopeMap);
            }
            resultMap.put("servicesScopes",servicesScopeList);
            resultList.add(resultMap);
        }
        if (resultList.size()<1){
@@ -94,7 +103,7 @@
        return resultList;
    }
    private OrganizationServicesScopeVO treeStructure(int orgId){
    /*private OrganizationServicesScopeVO treeStructure(int orgId){
        OrganizationServicesScopeVO organizationServicesScopeVO = new OrganizationServicesScopeVO();
        Organization organization = organizationMapper.selectById(orgId);
        organizationServicesScopeVO.setOrganization(organization);
@@ -115,5 +124,5 @@
        }
        //servicesScopeMapper.selectList()
        return null;
    }
    }*/
}