if (StringUtils.isEmpty(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif)) {
return getErrorMessage("", "external company ID not specified");
}
ExternalCompany externalCompany;
try {
externalCompany = externalCompanyDAO
.findUniqueByNif(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif);
} catch (InstanceNotFoundException e1) {
return getErrorMessage(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif,
"external company not found");
}
if (!externalCompany.isSubcontractor()) {
return getErrorMessage(orderElementWithAdvanceMeasurementsListDTO.externalCompanyNif,
"external company is not registered as subcontractor");
}
List<OrderElementWithAdvanceMeasurementsOrEndDateDTO> orderElements = orderElementWithAdvanceMeasurementsListDTO.orderElements;