|
|
@@ -31,19 +31,14 @@ import org.apache.commons.csv.CSVParser;
|
|
|
import org.apache.commons.csv.CSVRecord;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.LinkedCaseInsensitiveMap;
|
|
|
|
|
|
-import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
-import com.fasterxml.jackson.databind.DeserializationFeature;
|
|
|
-import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
-
|
|
|
import es.uv.saic.domain.IndicadorEnquestaTmp;
|
|
|
-import es.uv.saic.domain.Organ;
|
|
|
import es.uv.saic.domain.Usuari;
|
|
|
import es.uv.saic.dto.EmailDTO;
|
|
|
import es.uv.saic.dto.IndicadorEnquestaTmpDup;
|
|
|
+import es.uv.saic.dto.OrganDTOImp;
|
|
|
import es.uv.saic.feing.CoreClient;
|
|
|
import es.uv.saic.domain.Datasource;
|
|
|
|
|
|
@@ -141,13 +136,13 @@ public class DataService {
|
|
|
Integer centre;
|
|
|
Integer titulacio;
|
|
|
if(clau.equals("ruct") && ambit.equals("T") && ruct != null) {
|
|
|
- Organ o = findOrgByRuct(ruct);
|
|
|
+ OrganDTOImp o = findOrgByRuct(ruct);
|
|
|
if(o == null) {
|
|
|
errors.append("[WARNING] " + (locale.equals("es") ? "No se ha encontrado el RUCT "+ructStr+", se omiten los registros de esta entrada." : "No s'ha trobat el RUCT "+ructStr+", s'ometen els registres d'aquesta entrada.")).append("<br>").toString();
|
|
|
continue;
|
|
|
}
|
|
|
- titulacio = o.getId().getLugar();
|
|
|
- centre = o.getOrgan().getId().getLugar();
|
|
|
+ titulacio = Integer.parseInt(o.getLugar());
|
|
|
+ centre = Integer.parseInt(o.getLugar2());
|
|
|
}
|
|
|
else{
|
|
|
centre = ambit.equals("T") || ambit.equals("C") ? Integer.parseInt(c.replaceAll("\\D+","")) : null;
|
|
|
@@ -281,13 +276,13 @@ public class DataService {
|
|
|
else{
|
|
|
isValid = false;
|
|
|
}
|
|
|
- Organ o = findOrgByRuct(ruct);
|
|
|
+ OrganDTOImp o = findOrgByRuct(ruct);
|
|
|
if(o == null) {
|
|
|
errors.append("[WARNING] " + (locale.equals("es") ? "No se ha encontrado el RUCT "+ructStr+", se omiten los registros de esta entrada." : "No s'ha trobat el RUCT "+ructStr+", s'ometen els registres d'aquesta entrada.")).append("<br>").toString();
|
|
|
continue;
|
|
|
}
|
|
|
- titulacio = o.getId().getLugar();
|
|
|
- centre = o.getOrgan().getId().getLugar();
|
|
|
+ titulacio = Integer.parseInt(o.getLugar());
|
|
|
+ centre = Integer.parseInt(o.getLugar2());
|
|
|
}
|
|
|
else if(ambit.equals("C")) {
|
|
|
centre = ambit.equals("T") || ambit.equals("C") ? Integer.parseInt(c.replaceAll("\\D+","")) : null;
|
|
|
@@ -531,7 +526,7 @@ public class DataService {
|
|
|
return c;
|
|
|
}
|
|
|
|
|
|
- private Organ findOrgByRuct(Integer ruct) {
|
|
|
+ private OrganDTOImp findOrgByRuct(Integer ruct) {
|
|
|
return cc.getOrgByRuct(ruct);
|
|
|
}
|
|
|
|