Search in sources :

Example 1 with QualityProcess

use of com.axelor.apps.quality.db.QualityProcess in project axelor-open-suite by axelor.

the class QualityControlController method preFillOperations.

/**
 * Copy control point model to control point of selected quality process.
 *
 * @param request
 * @param response
 * @throws AxelorException
 */
@SuppressWarnings("unchecked")
public void preFillOperations(ActionRequest request, ActionResponse response) throws AxelorException {
    LinkedHashMap<String, Object> qualityProcessMap = (LinkedHashMap<String, Object>) request.getContext().get("qualityProcess");
    LinkedHashMap<String, Object> qualityControlMap = (LinkedHashMap<String, Object>) request.getContext().get("_qualityControl");
    QualityProcess qualityProcess = Beans.get(QualityProcessRepository.class).find(((Integer) qualityProcessMap.get("id")).longValue());
    QualityControl qualityControl = Beans.get(QualityControlRepository.class).find(((Integer) qualityControlMap.get("id")).longValue());
    Beans.get(QualityControlService.class).preFillOperations(qualityControl, qualityProcess);
    response.setCanClose(true);
}
Also used : QualityProcessRepository(com.axelor.apps.quality.db.repo.QualityProcessRepository) QualityControl(com.axelor.apps.quality.db.QualityControl) QualityControlService(com.axelor.apps.quality.service.QualityControlService) QualityControlRepository(com.axelor.apps.quality.db.repo.QualityControlRepository) LinkedHashMap(java.util.LinkedHashMap) QualityProcess(com.axelor.apps.quality.db.QualityProcess)

Aggregations

QualityControl (com.axelor.apps.quality.db.QualityControl)1 QualityProcess (com.axelor.apps.quality.db.QualityProcess)1 QualityControlRepository (com.axelor.apps.quality.db.repo.QualityControlRepository)1 QualityProcessRepository (com.axelor.apps.quality.db.repo.QualityProcessRepository)1 QualityControlService (com.axelor.apps.quality.service.QualityControlService)1 LinkedHashMap (java.util.LinkedHashMap)1