try {
ReturnToSupplier retResp = coreManager.save(ReturnToSupplier.class, retSup);
retResp.setReturnId(ReturnUtil.constructReturnId(retResp.getReturnDate(), retResp.getSupplier().getId(), retResp.getId()));
retResp = coreManager.save(ReturnToSupplier.class, retResp);
DisplaySearchReturnToSupplier dret = mapper.map(retResp, DisplaySearchReturnToSupplier.class);
resp = dret;
} catch (Exception e) {
SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
resp1.addError("exception", e.getMessage());