try {
PurchasingOrder poResp = coreManager.save(PurchasingOrder.class, po);
poResp.setPoId(PoUtil.constructPoId(poResp.getPoDate(), poResp.getSupplier().getId(), poResp.getId()));
poResp = coreManager.save(PurchasingOrder.class, poResp);
DisplaySearchPurchasingOrder dpo = mapper.map(poResp, DisplaySearchPurchasingOrder.class);
resp = dpo;
} catch (Exception e) {
SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
resp1.addError("exception", e.getMessage());