@ -65,7 +65,28 @@ public class CRMService {
return ResponseEntity . status ( response . getStatusCode ( ) ) . body ( response . getBody ( ) ) ;
return ResponseEntity . status ( response . getStatusCode ( ) ) . body ( response . getBody ( ) ) ;
}
}
public Object approveCRM ( ApproveCRMRequestDTO approveCRMRequestDTO , String token ) {
public Object approveIndividualCRM ( ApproveCRMRequestDTO approveCRMRequestDTO , String token ) {
String porOrgacode = approveCRMRequestDTO . getPorOrgacode ( ) ;
String url = crmURI + "/crm" + "/mongodb/formdata" ;
HttpHeaders headers = new HttpHeaders ( ) ;
headers . set ( "Authorization" , token ) ;
headers . set ( "POR_ORGACODE" , approveCRMRequestDTO . getPorOrgacode ( ) ) ;
headers . set ( "SUS_USERCODE" , approveCRMRequestDTO . getSusUserCode ( ) ) ;
headers . setContentType ( MediaType . APPLICATION_JSON ) ;
HttpEntity < ApproveCRMRequestDTO > entity = new HttpEntity < > ( approveCRMRequestDTO , headers ) ;
ResponseEntity < Map > response = restTemplate . exchange (
url ,
HttpMethod . PATCH ,
entity ,
Map . class
) ;
return ResponseEntity . status ( response . getStatusCode ( ) ) . body ( response . getBody ( ) ) ;
}
public Object approveBusinessCRM ( ApproveCRMRequestDTO approveCRMRequestDTO , String token ) {
String porOrgacode = approveCRMRequestDTO . getPorOrgacode ( ) ;
String porOrgacode = approveCRMRequestDTO . getPorOrgacode ( ) ;
String url = crmURI + "/crm" + "/mongodb/formdata" ;
String url = crmURI + "/crm" + "/mongodb/formdata" ;
HttpHeaders headers = new HttpHeaders ( ) ;
HttpHeaders headers = new HttpHeaders ( ) ;