Skip to content
Merged

Kaka #33

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 80 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,22 @@
>
><b>2. ORGANIZAÇÃO DO PROJETO</b>
>
>><b>2.1. Fluxograma</b>
>><b>2.1. <a href="#org_geral"> Visão Geral</b></a>
>>
>><b>2.2. <a href="#org_fluxograma"> Fluxograma</b></a>
>
><b>3. SOFTWARE</b>
>
>><b>3.1. GOOGLE CLOUD</b>
>><b>3.1. <a href="#soft_google"> GOOGLE CLOUD</b></a>
>>
>>><b>3.1.1. Google API</b>
>>>
>>>><b>3.1.1.1. Directions API</b>
>>>>>
>>>>><b>3.1.1.1.1. Visão Geral</b>
>>>>>
>>>>
>>>><b>3.1.1.2. Distance Matrix API</b>
>>>>
>>>>><b>3.1.1.2.1. Visão Geral</b>
>>>>
>>>><b>3.1.1.3. Compute Engine API</b>
>>>>>
>>>>><b>3.1.1.3.1. Visão Geral</b>
>>>
>>><b>3.1.2. Instâncias Virtuais</b>
>>>
Expand All @@ -42,9 +39,48 @@
>>>>
>>>><b>3.1.3.2 Instalação e Implementação</b>
>>>
>>
>><b>3.2. FRONTEND</b>
>>
>>><b>3.2.1. Componentes</b>
>>>>
>>>><b>3.2.1.1. Login</b>
>>>>>
>>>>><b>3.2.1.1.1. CanActivate
>>>>>
>>>>><b>3.2.1.1.2. HttpClient
>>>>
>>>><b>3.2.1.2. Home</b>
>>>>
>>>><b>3.2.1.3. Dashboard</b>
>>>>>
>>>>><b>3.2.1.3.1. Contador de Clientes e Visitantes</b>
>>>>>
>>>>><b>3.2.1.3.2. Registro de Pacotes</b>
>>>>>
>>>>><b>3.2.1.3.3. Bounce Rate</b>
>>>>
>>>><b>3.2.1.4. Users</b>
>>>>
>>>><b>3.2.1.5. Pacotes</b>
>>>>>
>>>>><b>3.2.1.5.1. Recent Quote
>>>>>
>>>>><b>3.2.1.5.2. Register Quote
>>>>>
>>>>><b>3.2.1.5.3. Tracking Package
>>>
>>><b>3.2.2. Services</b>
>>>>
>>>><b>3.2.2.1. Login Service</b>
>>>>
>>>><b>3.2.2.2. Quote Service</b>
>>>
>>><b>3.2.3. Segurança (A analisar)
>>>>
>>>><b>3.2.3.1. Dados do Login
>>>>
>>>><b>3.2.3.2. Encriptação dos Dados
>>
>><b>3.3. BACKEND</b>
>>>
>>><b>3.3.1. Spring Boot</b>
Expand Down Expand Up @@ -73,7 +109,7 @@

## 1 - RESUMO

<details open id="resume">
<details id="resume">
<summary> <b>1.1 - Da Licença, Disponibilidade e Finalidade </b> </summary>

#### &nbsp;&nbsp;&nbsp;&nbsp; Esse projeto foi desenvolvido pelo grupo Roxo da Turma Java Noturno de 2022, composto por <b>Bruno Roberto, Cristian Schauffert, Kalil Fakhouri e Mateus Felipe</b> com a mentoria do <b> professor Oliota</b>, visando apenas a demonstração dos conhecimentos técnicos adquiridos durante o curso e a apresentação da etapa final à empresas.
Expand All @@ -86,7 +122,7 @@

</details>

<details open id="stack">
<details id="stack">
<summary> <b>1.2 - Das Tecnologias Utilizadas</b> </summary>

#### &nbsp;&nbsp;&nbsp;&nbsp; Durante o curso foi utilizado diversas tecnologias, métodos ágeis e ferramentas de desenvolvimento tais como:
Expand All @@ -112,3 +148,36 @@
> #### Metodologia:
>> * ##### <img align=center alt=kaka-vscode height=25 width=40 src="https://raw.githubusercontent.com/devicons/devicon/1119b9f84c0290e0f0b38982099a2bd027a48bf1/icons/trello/trello-plain.svg" /> Trello - Kanban

</details>
<br/><br/>

# 2 - ORGANIZAÇÃO DO PROJETO

<details open id="org_geral">
<summary><b>2.1 - Visão Geral</b></summary>

#### &nbsp;&nbsp;&nbsp;&nbsp;

</details>

<details open id="org_fluxograma">
<summary><b>2.2 - Fluxograma</b></summary>



</details>

<br/><br/>

# 3 - SOFTWARE

<details open id="soft_google">
<summary><b>3.1 - GOOGLE CLOUD</b></summary>
<br>

>## <b>3.1.1 - Google API
>>### <b>3.1.1.1 - Directions API </b>
>>
>>#### &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Directions API

</summary>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

Expand All @@ -26,4 +28,11 @@ public List<Carriers> listCarriers(){

}

@PostMapping()
public Carriers postCarrier(@RequestBody Carriers carrier) {

return carriersRepository.save(carrier);

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.util.JSONPObject;

@RestController
Expand All @@ -26,28 +28,30 @@ public class ShipController {
final String GOOGLE = "https://maps.googleapis.com/maps/api/directions/json?origin=";

@GetMapping("/{cepOrigem}/{cepDestino}")
public JSONPObject getGoogleAPI(@PathVariable ("cepOrigem") int param1, @PathVariable ("cepDestino") int param2 ){
public JsonNode getGoogleAPI(@PathVariable ("cepOrigem") int param1, @PathVariable ("cepDestino") int param2 ){

try {

String APIUrl = GOOGLE+param1+"&destination="+param2+"&key=AIzaSyCKNjLUI0d01M0SfoDjIov4vZlR3DprotM";

URL url = new URL(APIUrl);
HttpsURLConnection get = (HttpsURLConnection) url.openConnection();

BufferedReader response = new BufferedReader(new InputStreamReader(get.getInputStream()));

String jsonEmString = converteJsonEmString(response);

JSONPObject obj = new JSONPObject(jsonEmString, null);

return obj;

}catch (Exception e) {

return null;

}

String APIUrl = GOOGLE+param1+"&destination="+param2+"&key=AIzaSyCKNjLUI0d01M0SfoDjIov4vZlR3DprotM";

URL url = new URL(APIUrl);
HttpsURLConnection get = (HttpsURLConnection) url.openConnection();

BufferedReader response = new BufferedReader(new InputStreamReader(get.getInputStream()));

String jsonEmString = converteJsonEmString(response);

ObjectMapper mapper = new ObjectMapper();
JsonNode node = mapper.readTree(jsonEmString);


return node;

}catch (Exception e) {

return null;

}

}

Expand Down