Commit do upload de documentos.

git-svn-id: https://svn.coded.pt/svn/SIPRP@2010 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Carlos Roque 11 years ago
parent fddc8906f9
commit 5473c5980c

@ -138,10 +138,11 @@
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/spring-bridge-2.2.0.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/slf4j-api-1.7.7.jar"/>
<classpathentry exported="true" kind="lib" path="WebContent/WEB-INF/lib/slf4j-simple-1.7.7.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.8.0-openjdk-1.8.0.5.x86_64">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="output" path="build"/>
</classpath>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v7.0"/>
<runtime name="Apache Tomcat v7.0 - Java 7"/>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="java"/>

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.wst.ws.service.policy.projectEnabled=false

@ -36,18 +36,23 @@
$scope.storeDocuments = new globals.dataService.store({
model: null,
serviceBase: window.evoapp.DOCPATH,
actions: {
//get: 'GetDisciplines',
//upsert: 'UpsertDiscipline',
//destroy: 'DeleteDiscipline'
get: 'documentosList',
upsert: 'documento',
destroy: 'removerDocumento'
}
});
$scope.list = function(){
//$scope.storeDocuments.get(function(response, status, headers, config, items){
$scope.storeDocuments.extraParams = {
trabalhadorID: $scope.selectedTrabalhador.trabalhador_id
};
$scope.storeDocuments.get( function(response, status, headers, config, items){
//});
});
};
$scope.add = function(){
@ -88,20 +93,25 @@
if(isValid)
{
//TODO: store upsert
$scope.uploadDocument();
$scope.list();
}
};
$scope.destroy = function(){
$scope.destroy = function(){
globals.message.confirm({
question: 'Tem a certeza que deseja continuar?',
answer: function(result){
if(result)
{
$scope.storeDocuments.extraParams = {
documentoID: $scope.editing.id
};
$scope.storeDocuments.destroy( function(response, status, headers, config, items){
$scope.list();
});
}
}
});
@ -109,31 +119,25 @@
$scope.cancel = function(){
//if($scope.isNewRecord)
//{
// $scope.isNewRecord = false;
// $scope.list();
//}
if($scope.isNewRecord)
{
$scope.isNewRecord = false;
$scope.list();
}
$scope.showList = true;
$scope.showEdit = false;
};
$scope.download = function(item){
globals.message.alert({
message: 'Abrir o documento: ' + item.nome,
callback: function(){
}
});
window.location.assign( window.evoapp.DOCPATH + "documentos/getDocumento?documentoID=" + encodeURIComponent( item.id ) );
};
$scope.uploadDocument = function(){
if($scope.fileInputDocument)
{
$scope.editing.trabalhador_id = $scope.selectedTrabalhador.trabalhador_id;
$scope.fileInputDocument.upload($scope.editing, function(result, textStatus, jqXHR){
var data = result.data[0];
@ -147,7 +151,5 @@
};
$scope.$on('afterrender', function(event, args){
$scope.storeDocuments.loadData(documentos);
});
});
});

@ -58,14 +58,12 @@
</div>
<div class="form-group">
<file-upload
item-id="fileInputDocument"
name="Picture"
url="/UploadDocument"
url="rs/documentos/documento"
form-data="editing">
</file-upload>
</file-upload>
</div>
<div class="form-group">
@ -80,4 +78,4 @@
</section>
</section>
</section>

@ -12,6 +12,14 @@
}
});
$scope.numDocumentos = new globals.dataService.store({
model: 0,
serviceBase: window.evoapp.DOCPATH,
actions: {
get: 'documentosCount'
}
});
$scope.storeFichasTrabalhador = new globals.dataService.store();
$scope.dadosTrabalhador = null;
@ -132,7 +140,17 @@
var fichas = response.data.fichas;
$scope.storeFichasTrabalhador.loadData(fichas);
}
});
});
$scope.numDocumentos.extraParams = {
trabalhadorID: selectedRecord.id
};
$scope.numDocumentos.get( function(response)
{
});
}
};
@ -149,7 +167,7 @@
$scope.openModalDocumentos = function(){
$scope.modalDocumentos.show({
selectedTrabalhador: $scope.dadosTrabalhador
});
$scope.modalDocumentos.viewController.list();
@ -162,8 +180,8 @@
$scope.openModalAcidentesTrabalho = function(){
$scope.modalAcidentesTrabalho.show({
$scope.modalAcidentesTrabalho.show({
selectedTrabalhador: $scope.dadosTrabalhador
});
$scope.modalAcidentesTrabalho.viewController.list();
@ -227,4 +245,4 @@
});
});
});
});

@ -152,7 +152,7 @@
<button ng-click="openModalDocumentos()" ng-show="dadosTrabalhador != null" class="btn btn-primary btn-xs" type="button">
<span class="glyphicon glyphicon-folder-open m-r-5"></span>
<span>Documentos</span>
<span class="badge documents-badge">6</span>
<span class="badge documents-badge" data-ng-bind="numDocumentos.items"></span>
</button>
<button ng-click="openModalAcidentesTrabalho()" ng-show="dadosTrabalhador != null" class="btn btn-primary btn-xs" type="button">

@ -18,6 +18,11 @@
args = arguments[0];
angular.copy(args, me);
if( me.serviceBase === undefined || me.serviceBase === null )
{
me.serviceBase = serviceBase;
}
this.items = [];
this.start = (this.start == null || this.start == undefined) ? 0 : this.start;
@ -64,7 +69,7 @@
$http({
method: 'GET',
url: (serviceBase + me.actions.get),
url: ( me.serviceBase + me.actions.get),
params: params,
$$broadcastEvents: me.broadcastEvents,
timeout: 15000 // 15 seconds timeout
@ -118,7 +123,7 @@
$http({
method: 'POST',
url: (serviceBase + me.actions.upsert),
url: (me.serviceBase + me.actions.upsert),
data: editing,
$$broadcastEvents: me.broadcastEvents
}).
@ -169,7 +174,7 @@
$http({
method: 'POST',
url: (serviceBase + me.actions.destroy),
url: (me.serviceBase + me.actions.destroy),
data: editing,
$$broadcastEvents: me.broadcastEvents
}).

@ -138,6 +138,7 @@
<script>
window.evoapp.CTXPATH = "<%=request.getContextPath()%>/rs/fichasclinicas/";
window.evoapp.DOCPATH = "<%=request.getContextPath()%>/rs/documentos/";
</script>
</body>

@ -0,0 +1,158 @@
package shst.medicina.fichasclinicas.beans;
import java.io.InputStream;
import com.google.common.base.Objects;
public class DocumentoUploadBean
{
private String desc;
private String nome;
private Long size;
private String mimeType;
private InputStream inputStream;
private Integer trabalhadorId;
public DocumentoUploadBean( String desc, String nome, Long size, String mimeType, InputStream inputStream, Integer trabalhadorId )
{
this.desc = desc;
this.nome = nome;
this.size = size;
this.mimeType = mimeType;
this.inputStream = inputStream;
this.trabalhadorId = trabalhadorId;
}
public String getDesc()
{
return desc;
}
public void setDesc( String desc )
{
this.desc = desc;
}
public String getNome()
{
return nome;
}
public void setNome( String nome )
{
this.nome = nome;
}
public Long getSize()
{
return size;
}
public void setSize( Long size )
{
this.size = size;
}
public String getMimeType()
{
return mimeType;
}
public void setMimeType( String mimeType )
{
this.mimeType = mimeType;
}
public InputStream getInputStream()
{
return inputStream;
}
public void setInputStream( InputStream inputStream )
{
this.inputStream = inputStream;
}
public Integer getTrabalhadorId()
{
return trabalhadorId;
}
public void setTrabalhadorId( Integer trabalhadorId )
{
this.trabalhadorId = trabalhadorId;
}
@Override
public boolean equals( Object o )
{
if( this == o )
{
return true;
}
if( o == null || getClass() != o.getClass() )
{
return false;
}
DocumentoUploadBean that = ( DocumentoUploadBean ) o;
if( desc != null ? !desc.equals( that.desc ) : that.desc != null )
{
return false;
}
if( inputStream != null ? !inputStream.equals( that.inputStream ) : that.inputStream != null )
{
return false;
}
if( mimeType != null ? !mimeType.equals( that.mimeType ) : that.mimeType != null )
{
return false;
}
if( nome != null ? !nome.equals( that.nome ) : that.nome != null )
{
return false;
}
if( size != null ? !size.equals( that.size ) : that.size != null )
{
return false;
}
if( trabalhadorId != null ? !trabalhadorId.equals( that.trabalhadorId ) : that.trabalhadorId != null )
{
return false;
}
return true;
}
@Override
public int hashCode()
{
int result = desc != null ? desc.hashCode() : 0;
result = 31 * result + ( nome != null ? nome.hashCode() : 0 );
result = 31 * result + ( size != null ? size.hashCode() : 0 );
result = 31 * result + ( mimeType != null ? mimeType.hashCode() : 0 );
result = 31 * result + ( inputStream != null ? inputStream.hashCode() : 0 );
result = 31 * result + ( trabalhadorId != null ? trabalhadorId.hashCode() : 0 );
return result;
}
@Override
public String toString()
{
return Objects.toStringHelper( this )
.add( "desc", desc )
.add( "nome", nome )
.add( "size", size )
.add( "mimeType", mimeType )
.add( "inputStream", inputStream )
.add( "trabalhadorId", trabalhadorId )
.toString();
}
}

@ -1,5 +1,6 @@
package shst.medicina.fichasclinicas.logic;
import java.sql.Timestamp;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
@ -9,6 +10,7 @@ import javax.ws.rs.core.Response;
import org.springframework.beans.factory.annotation.Autowired;
import shst.medicina.fichasclinicas.beans.DocumentoBean;
import shst.medicina.fichasclinicas.beans.DocumentoUploadBean;
import shst.medicina.fichasclinicas.beans.EvoMessageBean;
import shst.medicina.fichasclinicas.beans.EvoMessageTypeBean;
import shst.medicina.fichasclinicas.beans.EvoResponseBean;
@ -19,10 +21,9 @@ import shst.medicina.fichasclinicas.provider.DocumentosDataProvider;
import com.evolute.module.utilizadores.data.EvoUsrUserData;
import com.evolute.utils.error.ErrorLogger;
public class DocumentosLogic
{
@Autowired(required = true)
DocumentosDataProvider documentosProvider;
@ -52,7 +53,7 @@ public class DocumentosLogic
result.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType(EvoMessageTypeBean.SESSIONTIMEOUT);
msg.setMessageData("Utilizador asssociado à sessão inválido/inexistente!");
msg.setMessageData("Utilizador asssociado \u00e0 sess\u00e3o inv\u00e1lido/inexistente!");
result.addMessage(msg);
}
return result;
@ -83,7 +84,7 @@ public class DocumentosLogic
out.setCategoria(in.toCategoria_id().getDescricao());
}
}
result.setSuccess(true);
result.setData(outSet);
}
@ -102,7 +103,7 @@ public class DocumentosLogic
result.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType(EvoMessageTypeBean.SESSIONTIMEOUT);
msg.setMessageData("Utilizador asssociado à sessão inválido/inexistente!");
msg.setMessageData("Utilizador asssociado \u00e0 sess\u00e3o inv\u00e1lido/inexistente!");
result.addMessage(msg);
}
return result;
@ -110,13 +111,13 @@ public class DocumentosLogic
public Response getDocumentoAsResponse(EvoUsrUserData user, Integer documentoID)
{
Response response = null;
Response response;
if(user != null)
{
try
{
FilFileData doc = documentosProvider.getDocumento(documentoID);
if(doc != null)
{
response = Response.ok(doc.getFile_data(),doc.getMime_type()).header("Content-Disposition", "inline; filename=\""+doc.getName()+"\"").build();
@ -138,7 +139,104 @@ public class DocumentosLogic
}
return response;
}
public EvoResponseBean<Boolean> saveDocumento( EvoUsrUserData user, DocumentoUploadBean documentoUploadBean )
{
EvoResponseBean<Boolean> result = new EvoResponseBean<Boolean>();
if( user != null )
{
try
{
if( documentosProvider.trabalhadorExists( documentoUploadBean.getTrabalhadorId() ) )
{
documentosProvider.saveDocumento( documentoUploadBean );
result.setData( true );
result.setSuccess(true);
EvoMessageBean msg = new EvoMessageBean();
msg.setType( EvoMessageTypeBean.INFO );
msg.setMessageData( "Upload bem sucedido" );
result.addMessage( msg );
}
else
{
result.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType( EvoMessageTypeBean.ERROR );
msg.setMessageData( "Erro ao realizar a opera\u00e7\u00e3o!" );
result.addMessage( msg );
}
}
catch( Exception ex )
{
result.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType(EvoMessageTypeBean.ERROR);
msg.setMessageData("Erro ao comunicar com a Base de dados da SIPRP!");
result.addMessage(msg);
ErrorLogger.logException(ex, Level.SEVERE);
}
}
else
{
result.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType(EvoMessageTypeBean.SESSIONTIMEOUT);
msg.setMessageData("Utilizador asssociado \u00e0 sess\u00e3o inv\u00e1lido/inexistente!");
result.addMessage(msg);
}
return result;
}
public EvoResponseBean< Boolean > removerDocumento( EvoUsrUserData user, Integer documentoID )
{
EvoResponseBean<Boolean> responseBean = new EvoResponseBean<Boolean>();
if( user != null )
{
try
{
FilFileData documento = documentosProvider.getDocumento( documentoID );
if( documento != null )
{
documento.setDeleted_stamp( new Timestamp( System.currentTimeMillis() ) );
documento.save();
responseBean.setData( true );
responseBean.setSuccess(true);
EvoMessageBean msg = new EvoMessageBean();
msg.setType( EvoMessageTypeBean.INFO );
msg.setMessageData( "Remo\u00e7\u00e3o do documento bem sucedida" );
responseBean.addMessage( msg );
}
else
{
responseBean.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType(EvoMessageTypeBean.ERROR);
msg.setMessageData("O documento dado n\u00e3o \u00e9 v\u00e0lido.");
responseBean.addMessage(msg);
}
}
catch( Exception ex )
{
responseBean.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType(EvoMessageTypeBean.ERROR);
msg.setMessageData("Erro ao comunicar com a Base de dados da SIPRP!");
responseBean.addMessage(msg);
ErrorLogger.logException(ex, Level.SEVERE);
}
}
else
{
responseBean.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType(EvoMessageTypeBean.SESSIONTIMEOUT);
msg.setMessageData("Utilizador asssociado \u00e0 sess\u00e3o inv\u00e1lido/inexistente!");
responseBean.addMessage(msg);
}
return responseBean;
}
}

@ -1,27 +1,30 @@
package shst.medicina.fichasclinicas.provider;
import java.io.ByteArrayOutputStream;
import java.sql.Timestamp;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import pt.evolute.data.ProviderSpringBean;
import shst.medicina.fichasclinicas.beans.DocumentoUploadBean;
import shst.medicina.fichasclinicas.data.shst.FilFileData;
import shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData;
import shst.medicina.fichasclinicas.data.shst.TrabalhadoresData;
import com.evolute.utils.arrays.Virtual2DArray;
import com.evolute.utils.sql.Expression;
import com.evolute.utils.sql.Field;
import com.evolute.utils.sql.Select;
import com.evolute.utils.sql.Select2;
public class DocumentosDataProvider
{
@Autowired(required = true)
@Qualifier("siprpDocsProvider")
ProviderSpringBean siprpProvidersBean;
public Long getDocumentosCount(Integer trabalhadorID) throws Exception
{
@ -53,7 +56,7 @@ public class DocumentosDataProvider
public List<FilFileTrabalhadorData> getDocumentosList(Integer trabalhadorID) throws Exception
{
Select2 excludDeleted = new Select2(FilFileData.TABLENAME,new Field(FilFileData.DELETED_STAMP).isEqual(null), FilFileData.ID);
return siprpProvidersBean.getENTITY_PROVIDER().listLoad(FilFileTrabalhadorData.class,
new Field(FilFileTrabalhadorData.TRABALHADOR_ID).isEqual(trabalhadorID)
.and(new Field(FilFileTrabalhadorData.ONLINE).isEqual(true))
@ -64,14 +67,38 @@ public class DocumentosDataProvider
public FilFileData getDocumento(Integer documentoID) throws Exception
{
return siprpProvidersBean.getENTITY_PROVIDER().load(FilFileData.class, new Object[]{documentoID,null},new String[]{FilFileData.ID,FilFileData.DELETED_STAMP});
return siprpProvidersBean.getENTITY_PROVIDER().load(FilFileData.class, new Object[]{documentoID,null},new String[]{FilFileData.ID,FilFileData.DELETED_STAMP}, null);
}
public boolean trabalhadorExists( Integer trabalhadorID ) throws Exception
{
Select sel = new Select2( TrabalhadoresData.TABLENAME, new Field( TrabalhadoresData.ID_FULL ).isEqual( trabalhadorID ), "count(*)" );
Virtual2DArray array = siprpProvidersBean.getDBMANAGER().getSharedExecuter( this ).executeQuery( sel );
return array.rowCount() > 0 && array.get( 0, 0 ).equals( 1 );
}
public void saveDocumento( DocumentoUploadBean documentoUploadBean ) throws Exception
{
FilFileData fileData = new FilFileData();
fileData.setProvider( siprpProvidersBean.getENTITY_PROVIDER() );
fileData.setDetails( documentoUploadBean.getDesc() );
fileData.setInserted_stamp( new Timestamp( System.currentTimeMillis() ) );
fileData.setMime_type( documentoUploadBean.getMimeType() );
fileData.setName( documentoUploadBean.getNome() );
ByteArrayOutputStream baos = new ByteArrayOutputStream( );
IOUtils.copy( documentoUploadBean.getInputStream(), baos );
fileData.setFile_data( baos.toByteArray() );
fileData.save();
fileData.refresh();
FilFileTrabalhadorData fileTrabalhadorData = new FilFileTrabalhadorData();
fileTrabalhadorData.setFile_id( fileData.getId() );
fileTrabalhadorData.setOnline( true );
fileTrabalhadorData.setTrabalhador_id( documentoUploadBean.getTrabalhadorId() );
fileTrabalhadorData.save();
}
}

@ -1,9 +1,9 @@
package shst.medicina.fichasclinicas.webservices.jaxrs;
import java.io.InputStream;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Part;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
@ -14,9 +14,14 @@ import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.springframework.beans.factory.annotation.Autowired;
import shst.medicina.fichasclinicas.beans.DocumentoBean;
import shst.medicina.fichasclinicas.beans.DocumentoUploadBean;
import shst.medicina.fichasclinicas.beans.EvoMessageBean;
import shst.medicina.fichasclinicas.beans.EvoMessageTypeBean;
import shst.medicina.fichasclinicas.beans.EvoResponseBean;
import shst.medicina.fichasclinicas.logic.DocumentosLogic;
import shst.medicina.fichasclinicas.webservices.WebServicesConst;
@ -30,62 +35,75 @@ public class DocumentosImpl {
@Autowired(required = true)
DocumentosLogic documentosLogic;
@GET
@Path("/getDocumentosCount")
@Path("/documentosCount")
@Produces(MediaType.APPLICATION_JSON)
public EvoResponseBean<Long> getDocumentosCount(@Context HttpServletRequest req, @QueryParam("trabalhadorID") Integer trabalhadorID)
public EvoResponseBean<Long> getDocumentosCount(@Context HttpServletRequest req, @QueryParam("trabalhadorID") Integer trabalhadorID)
{
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
return documentosLogic.getDocumentosCount(user, trabalhadorID);
}
@GET
@Path("/getDocumentosList")
@Path("/documentosList")
@Produces(MediaType.APPLICATION_JSON)
public EvoResponseBean<List<DocumentoBean>> getDocumentosList(@Context HttpServletRequest req, @QueryParam("trabalhadorID") Integer trabalhadorID)
{
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
return documentosLogic.getDocumentosList(user, trabalhadorID);
}
@GET
@Path("/getDocumento")
@Path("/documento")
@Produces(MediaType.WILDCARD)
public Response getDocumento(@Context HttpServletRequest req, @QueryParam("documentoID") Integer documentoID)
{
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
return documentosLogic.getDocumentoAsResponse(user,documentoID);
}
@POST
@Path("/saveDocumento")
@Path("/documento")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public EvoResponseBean<Boolean> saveDocumento(@Context HttpServletRequest req, @QueryParam("trabalhadorID") Integer trabalhadorID)
@Produces( { MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN } )
public EvoResponseBean<Boolean> saveDocumento(@Context HttpServletRequest req, FormDataMultiPart multiPart )
{
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
try
{
for(Part p : req.getParts())
{
}
FormDataBodyPart documento = multiPart.getField( "Picture" );
String desc = multiPart.getField( "nome" ).getValue();
String nome = documento.getContentDisposition().getFileName();
Long size = documento.getContentDisposition().getSize();
String mime = documento.getContentDisposition().getType();
InputStream inputStream = documento.getValueAs( InputStream.class );
Integer trabalhadorID = Integer.parseInt( multiPart.getField( "trabalhador_id" ).getValue() );
return documentosLogic.saveDocumento( user, new DocumentoUploadBean( desc, nome, size, mime, inputStream, trabalhadorID ) );
}
catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
EvoResponseBean<Boolean> result = new EvoResponseBean<Boolean>();
result.setSuccess(false);
EvoMessageBean msg = new EvoMessageBean();
msg.setType( EvoMessageTypeBean.ERROR );
msg.setMessageData( "Erro ao realizar a opera\u00e7\u00e3o!" );
result.addMessage( msg );
return result;
}
return null;
}
@POST
@Path( "/removerDocumento" )
public EvoResponseBean<Boolean> removerDocumento(@Context HttpServletRequest req, @QueryParam("documentoID") Integer documentoID)
{
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
return documentosLogic.removerDocumento( user, documentoID );
}
}

@ -44,7 +44,6 @@ import shst.medicina.fichasclinicas.webservices.WebServicesConst;
import com.evolute.module.utilizadores.data.EvoUsrUserData;
import com.evolute.module.utilizadores.users.provider.UsersDataProvider;
import com.evolute.utils.db.SQLExecuter;
import com.evolute.utils.error.ErrorLogger;
import com.evolute.utils.sql.Field;
import com.googlecode.htmlcompressor.compressor.HtmlCompressor;
@ -390,8 +389,7 @@ public class FichasClinicasImpl {
}

@ -2,6 +2,7 @@ package shst.medicina.fichasclinicas.webservices.jaxrs;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.server.spring.scope.RequestContextFilter;
@ -16,6 +17,7 @@ public class RestAppConfig extends ResourceConfig
register(FichasClinicasImpl.class);
register(DocumentosImpl.class);
register(RequestContextFilter.class);
register(JacksonFeature.class);
register(JacksonFeature.class);
register(MultiPartFeature.class);
}
}

Loading…
Cancel
Save