use of com.qcadoo.mes.orders.controllers.dto.OperationalTaskHolder in project mes by qcadoo.
the class DashboardKanbanDataProvider method getOperationalTasksPendingForOrder.
public List<OperationalTaskHolder> getOperationalTasksPendingForOrder(final Long orderId) {
String additionalRestrictions = "AND operationaltaskdto.orderid = :orderId AND coalesce(operationaltaskdto.usedquantity, 0) = 0 ";
Map<String, Object> params = Maps.newHashMap();
params.put(L_STATES, Sets.newHashSet(OperationalTaskStateStringValues.FINISHED));
params.put(L_ORDER_ID, orderId);
return jdbcTemplate.query(getOperationalTasksQuery(additionalRestrictions, false), params, new BeanPropertyRowMapper(OperationalTaskHolder.class));
}
use of com.qcadoo.mes.orders.controllers.dto.OperationalTaskHolder in project mes by qcadoo.
the class DashboardKanbanDataProvider method getOperationalTasksInProgress.
public List<OperationalTaskHolder> getOperationalTasksInProgress() {
String additionalRestrictions = "AND (operationaltaskdto.plannedquantity > 0 AND operationaltaskdto.usedquantity * 100 / operationaltaskdto.plannedquantity > 0 AND operationaltaskdto.usedquantity * 100 / operationaltaskdto.plannedquantity < 100) ";
Map<String, Object> params = Maps.newHashMap();
params.put(L_STATES, Sets.newHashSet(OperationalTaskStateStringValues.STARTED));
return jdbcTemplate.query(getOperationalTasksQuery(additionalRestrictions, true), params, new BeanPropertyRowMapper(OperationalTaskHolder.class));
}
use of com.qcadoo.mes.orders.controllers.dto.OperationalTaskHolder in project mes by qcadoo.
the class DashboardKanbanDataProvider method getOperationalTasksPending.
public List<OperationalTaskHolder> getOperationalTasksPending() {
String additionalRestrictions = "AND coalesce(operationaltaskdto.usedquantity, 0) = 0 ";
Map<String, Object> params = Maps.newHashMap();
params.put(L_STATES, Sets.newHashSet(OperationalTaskStateStringValues.PENDING, OperationalTaskStateStringValues.STARTED));
return jdbcTemplate.query(getOperationalTasksQuery(additionalRestrictions, true), params, new BeanPropertyRowMapper(OperationalTaskHolder.class));
}
use of com.qcadoo.mes.orders.controllers.dto.OperationalTaskHolder in project mes by qcadoo.
the class DashboardKanbanDataProvider method getOperationalTasksCompleted.
public List<OperationalTaskHolder> getOperationalTasksCompleted() {
String additionalRestrictions = "AND ((operationaltaskdto.plannedquantity > 0 AND operationaltaskdto.usedquantity * 100 / operationaltaskdto.plannedquantity >= 100) OR operationaltaskdto.state = '03finished') ";
Map<String, Object> params = Maps.newHashMap();
params.put(L_STATES, Sets.newHashSet(OperationalTaskStateStringValues.STARTED, OperationalTaskStateStringValues.FINISHED));
return jdbcTemplate.query(getOperationalTasksQuery(additionalRestrictions, true), params, new BeanPropertyRowMapper(OperationalTaskHolder.class));
}
Aggregations