예제 #1
0
 /**
  * 添加实体属性
  *
  * @return
  * @throws Exception
  */
 public String addEntityItem() throws Exception {
   entityItemService.saveEntityItem(entityItem);
   DroolsUtil.removeRuleMap();
   Result result = new Result();
   result.setMessage("添加成功");
   result.setCallbackType("closeCurrent");
   result.setForwardUrl("entity/listEntityItem");
   result.setNavTabId(rel);
   JsonUtil.toJson(result);
   return null;
 }
예제 #2
0
  /**
   * 修改实体属性
   *
   * @return
   * @throws Exception
   */
  public String updateEntityItem() throws Exception {

    entityItemService.updateEntityItem(entityItem);
    DroolsUtil.removeRuleMap();
    Result result = new Result();
    result.setMessage("更新成功");
    result.setForwardUrl("entity/listEntityItem");
    result.setNavTabId(rel);
    JsonUtil.toJson(result);
    return null;
  }
예제 #3
0
 /**
  * 删除实体属性
  *
  * @return
  * @throws Exception
  */
 public String deleteEntityItem() throws Exception {
   Integer id = entityItem.getId();
   entityItemService.deleteEntityItem(id);
   DroolsUtil.removeRuleMap();
   Result result = new Result();
   result.setCallbackType("");
   result.setMessage("删除成功");
   result.setForwardUrl("entity/listEntityItem");
   result.setNavTabId(rel);
   Map<String, String> r = new HashMap<String, String>();
   r.put("message", "删除成功");
   r.put("statusCode", "200");
   // r.put("navTabId", rel);
   r.put("callbackType", "forward");
   r.put("forwardUrl", "entity/listEntityItem");
   JsonUtil.toJson(r);
   return null;
 }