use of com.qcadoo.mes.productionLines.controller.dataProvider.ProductionLineDto in project mes by qcadoo.
the class DataProviderForTechnology method getTechnologyProductionLine.
public ProductionLineDto getTechnologyProductionLine(Long technologyId) {
Entity technology = dataDefinitionService.get(TechnologiesConstants.PLUGIN_IDENTIFIER, TechnologiesConstants.MODEL_TECHNOLOGY).get(technologyId);
if (technology.getStringField("range").equals("01oneDivision")) {
Entity productionLine = technology.getBelongsToField("productionLine");
if (Objects.nonNull(productionLine)) {
ProductionLineDto pl = new ProductionLineDto();
pl.setId(productionLine.getId());
pl.setName(productionLine.getStringField(ProductionLineFields.NAME));
pl.setNumber(productionLine.getStringField(ProductionLineFields.NUMBER));
return pl;
}
}
return new ProductionLineDto();
}
Aggregations