public String saveSafeStock() { safeStock.setDate(new Date()); safeStock.setUser(loginUser); safeStockService.saveOrUpdate(safeStock); msg = "success"; return SUCCESS; }
public String destorySafeStock() { safeStock = safeStockService.getEntityById(safeStock.getId()); for (SafeStockDetail pd : safeStock.getSafeStockDetailList()) { safeStockDetailService.delete(pd); } safeStockService.delete(safeStock); return SUCCESS; }
public String listSafeStockDetail() { safeStock = safeStockService.getEntityById(safeStock.getId()); safeStockDetailList = safeStock.getSafeStockDetailList(); return SUCCESS; }