Search in sources :

Example 1 with MovedPalletDto

use of com.qcadoo.mes.materialFlowResources.dto.MovedPalletDto in project mes by qcadoo.

the class PalletStorageStateHooks method createHelperEntities.

public List<Entity> createHelperEntities(final Set<Long> palletIds) {
    StringBuilder sql = new StringBuilder();
    sql.append("SELECT palletNumber, storageLocationNumber, locationNumber, typeOfPallet ");
    sql.append("FROM materialflowresources_palletstoragestatedto ");
    sql.append("WHERE id IN (:ids)");
    Map<String, Object> params = Maps.newHashMap();
    params.put("ids", palletIds);
    List<MovedPalletDto> result = jdbcTemplate.query(sql.toString(), params, new BeanPropertyRowMapper(MovedPalletDto.class));
    return result.stream().map(this::mapDtoToEntity).collect(Collectors.toList());
}
Also used : BeanPropertyRowMapper(org.springframework.jdbc.core.BeanPropertyRowMapper) MovedPalletDto(com.qcadoo.mes.materialFlowResources.dto.MovedPalletDto) JSONObject(org.json.JSONObject)

Aggregations

MovedPalletDto (com.qcadoo.mes.materialFlowResources.dto.MovedPalletDto)1 JSONObject (org.json.JSONObject)1 BeanPropertyRowMapper (org.springframework.jdbc.core.BeanPropertyRowMapper)1