| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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){ |
| | |
| | | return resultList; |
| | | } |
| | | |
| | | private OrganizationServicesScopeVO treeStructure(int orgId){ |
| | | /*private OrganizationServicesScopeVO treeStructure(int orgId){ |
| | | OrganizationServicesScopeVO organizationServicesScopeVO = new OrganizationServicesScopeVO(); |
| | | Organization organization = organizationMapper.selectById(orgId); |
| | | organizationServicesScopeVO.setOrganization(organization); |
| | |
| | | } |
| | | //servicesScopeMapper.selectList() |
| | | return null; |
| | | } |
| | | }*/ |
| | | } |