public String update(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

    String resultVO = null;
    WxyWjGcVO vo = new WxyWjGcVO();

    try {
      JSONArray list = vo.doInitJson(json);
      vo.setValueFromJson((JSONObject) list.get(0));
      // 设置主键
      /*
       * vo.setId(new RandomGUID().toString()); // 主键
       */
      /* vo.setId("20FC7EF9-696D-6398-15C8-A77F2C4DFC02"); */
      JSONObject obj = (JSONObject) list.get(0);
      String ywid = obj.getString("ywid");
      if (ywid != null && !"".equals(ywid)) {
        FileUploadOldService.updateFjztOrYwidByYwid(
            ywid, vo.getWxy_wj_gc_uid(), Constants.FS_FILEUPLOAD_FJLB_WXY_WJGC);
      }
      // 修改
      wxyWjGcDao.update(vo);
      resultVO = vo.getRowJson();

    } catch (DaoException e) {
      logger.error("危险源网架构过程管理{}", e.getMessage());
      SystemException.handleMessageException("危险源网架构过程管理修改失败,请联系相关人员处理");
    } finally {
    }
    return resultVO;
  }
  // @Override
  public String queryCondition(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

    String domresult = "";
    try {

      domresult = wxyWjGcDao.queryCondition(json, null, null);

    } catch (DaoException e) {
      logger.error("危险源网架构过程管理{}", e.getMessage());
      SystemException.handleMessageException("危险源网架构过程管理查询失败,请联系相关人员处理");
    } finally {
    }
    return domresult;
  }
  public String insert(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

    String resultVO = null;
    WxyWjGcVO vo = new WxyWjGcVO();

    try {
      JSONArray list = vo.doInitJson(json);
      vo.setValueFromJson((JSONObject) list.get(0));
      // 设置主键
      // vo.setId(new RandomGUID().toString()); // 主键
      vo.setWxy_wj_gc_uid(DBUtil.getSequenceValue("WXY_WJ_GC_UID"));
      // 设置主键
      // vo.setId(new RandomGUID().toString()); // 主键
      JSONObject obj = (JSONObject) list.get(0);
      String ywid = obj.getString("ywid");
      if (ywid != null && !"".equals(ywid)) {
        FileUploadOldService.updateFjztOrYwidByYwid(
            ywid, vo.getWxy_wj_gc_uid(), Constants.FS_FILEUPLOAD_FJLB_WXY_WJGC);
      }

      // 插入
      wxyWjGcDao.save(vo);
      resultVO = vo.getRowJson();

      // String jsona="{querycondition: {conditions:
      // [{\"value\":\""+vo.getId()+"\",\"fieldname\":\"t.id\",\"operation\":\"=\",\"logic\":\"and\"} ]}}";
      // return queryCondition(jsona, user);

    } catch (DaoException e) {
      logger.error("危险源网架构过程管理{}", e.getMessage());
      SystemException.handleMessageException("危险源网架构过程管理新增失败,请联系相关人员处理");
    } finally {
    }
    return resultVO;
  }
  public String delete(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

    String resultVo = null;
    WxyWjGcVO vo = new WxyWjGcVO();
    try {
      JSONArray list = vo.doInitJson(json);
      JSONObject jsonObj = (JSONObject) list.get(0);

      vo.setValueFromJson(jsonObj);

      // 删除   根据据主键
      wxyWjGcDao.delete(WxyWjGcVO.class, vo.getWxy_wj_gc_uid());

      resultVo = vo.getRowJson();

    } catch (DaoException e) {
      logger.error("危险源网架构过程管理{}", e.getMessage());
      SystemException.handleMessageException("危险源网架构过程管理删除失败,请联系相关人员处理");
    } finally {
    }
    return resultVo;
  }