// @Override
  public String queryCondition(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();
    SgPersonLibraryVO vo = new SgPersonLibraryVO();
    String domresult = null;
    try {
      domresult = sgPersonLibraryDao.queryCondition(json);
      LogManager.writeUserLog(
          null,
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_SUCCESS,
          user.getName() + "施工人员信息-数据查询成功",
          user,
          "",
          "");

    } catch (DaoException e) {
      logger.error("表单信息{}", e.getMessage());
      LogManager.writeUserLog(
          null,
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_FAILURE,
          user.getName() + "施工人员信息-数据查询失败",
          user,
          "",
          "");
      SystemException.handleMessageException("施工人员信息-数据查询失败,请联系相关人员处理");
    } finally {
    }
    return domresult;
  }
  // @Override
  public String queryCondition(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

    String domresult = "";
    try {

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

      LogManager.writeUserLog(
          null,
          ywlx,
          Globals.OPERATION_TYPE_QUERY,
          LogManager.RESULT_SUCCESS,
          user.getName() + "查询<排水许可证申请>",
          user,
          "",
          "");

    } catch (DaoException e) {
      logger.error("排水许可证申请{}", e.getMessage());
      LogManager.writeUserLog(
          null,
          ywlx,
          Globals.OPERATION_TYPE_QUERY,
          LogManager.RESULT_FAILURE,
          user.getName() + "排水许可证申请查询失败",
          user,
          "",
          "");
      SystemException.handleMessageException("排水许可证申请查询失败,请联系相关人员处理");
    } finally {
    }
    return domresult;
  }
  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;
  }
  public String updateStatusOne(String u_id, String js) throws Exception {

    User user = ActionContext.getCurrentUserInThread();
    SgPersonLibraryVO vo = new SgPersonLibraryVO();
    String domresult = null;
    try {
      domresult = sgPersonLibraryDao.updatePass(u_id, js);
      LogManager.writeUserLog(
          vo.getSg_person_library_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_SUCCESS,
          user.getName() + "施工人员信息-入库-数据更改成功",
          user,
          "",
          "");

    } catch (DaoException e) {
      logger.error("表单信息{}", e.getMessage());
      LogManager.writeUserLog(
          vo.getSg_person_library_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_FAILURE,
          user.getName() + "施工人员信息-入库-数据更改成功",
          user,
          "",
          "");
      SystemException.handleMessageException("施工人员信息-入库-数据更改成功,请联系相关人员处理");
    } finally {
    }
    return domresult;
  }
  public String delete(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();
    BuSpywJsgcsgxkzsqMxVO vo = new BuSpywJsgcsgxkzsqMxVO();
    String domresult = null;
    try {
      domresult = null;
      LogManager.writeUserLog(
          vo.getSgxkzsqmx_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_SUCCESS,
          user.getName() + "建设工程施工许可证申请-子表—数据删除成功",
          user,
          "",
          "");

    } catch (DaoException e) {
      logger.error("表单信息{}", e.getMessage());
      LogManager.writeUserLog(
          vo.getSgxkzsqmx_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_FAILURE,
          user.getName() + "建设工程施工许可证申请-子表—数据删除失败",
          user,
          "",
          "");
      SystemException.handleMessageException("建设工程施工许可证申请-子表—数据删除失败,请联系相关人员处理");
    } finally {
    }
    return domresult;
  }
  public String insert(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

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

    try {
      JSONArray list = vo.doInitJson(json);
      vo.setValueFromJson((JSONObject) list.get(0));
      // 设置主键
      // vo.setId(new RandomGUID().toString()); // 主键
      vo.setCspsxkzsq_uid(DBUtil.getSequenceValue("CSPSXKZSQ_UID"));

      vo.setCreated_uid(user.getUserSN());
      vo.setCreated_name(user.getName());

      vo.setEvent_uid(new RandomGUID().toString());

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

      LogManager.writeUserLog(
          vo.getEvent_uid(),
          ywlx,
          Globals.OPERATION_TYPE_INSERT,
          LogManager.RESULT_SUCCESS,
          user.getName() + "排水许可证申请新增成功",
          user,
          "",
          "");

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

    } catch (DaoException e) {
      logger.error("排水许可证申请{}", e.getMessage());
      LogManager.writeUserLog(
          vo.getEvent_uid(),
          ywlx,
          Globals.OPERATION_TYPE_INSERT,
          LogManager.RESULT_FAILURE,
          user.getName() + "排水许可证申请新增失败",
          user,
          "",
          "");
      SystemException.handleMessageException("排水许可证申请新增失败,请联系相关人员处理");
    } finally {
    }
    return resultVO;
  }
  public String update(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

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

    try {
      JSONArray list = vo.doInitJson(json);
      vo.setValueFromJson((JSONObject) list.get(0));
      // 设置主键
      /*
       * vo.setId(new RandomGUID().toString()); // 主键
       */
      /* vo.setId("20FC7EF9-696D-6398-15C8-A77F2C4DFC02"); */

      vo.setEvent_uid(new RandomGUID().toString());

      vo.setCreated_uid(user.getUserSN());
      vo.setCreated_name(user.getName());

      // 修改
      buSpywCspsxkzsqDao.update(vo);
      resultVO = vo.getRowJson();

      LogManager.writeUserLog(
          vo.getEvent_uid(),
          ywlx,
          Globals.OPERATION_TYPE_UPDATE,
          LogManager.RESULT_SUCCESS,
          user.getName() + "排水许可证申请修改成功",
          user,
          "",
          "");

    } catch (DaoException e) {
      logger.error("排水许可证申请{}", e.getMessage());
      LogManager.writeUserLog(
          vo.getEvent_uid(),
          ywlx,
          Globals.OPERATION_TYPE_UPDATE,
          LogManager.RESULT_FAILURE,
          user.getName() + "排水许可证申请修改失败",
          user,
          "",
          "");
      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 delete(String json) throws Exception {

    User user = ActionContext.getCurrentUserInThread();

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

      vo.setValueFromJson(jsonObj);

      vo.setEvent_uid(new RandomGUID().toString());

      // 删除   根据据主键
      buSpywCspsxkzsqDao.delete(BuSpywCspsxkzsqVO.class, vo.getCspsxkzsq_uid());

      resultVo = vo.getRowJson();

      LogManager.writeUserLog(
          vo.getEvent_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_SUCCESS,
          user.getName() + "排水许可证申请删除成功",
          user,
          "",
          "");

    } catch (DaoException e) {
      logger.error("排水许可证申请{}", e.getMessage());
      LogManager.writeUserLog(
          vo.getEvent_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_FAILURE,
          user.getName() + "排水许可证申请删除失败",
          user,
          "",
          "");
      SystemException.handleMessageException("排水许可证申请删除失败,请联系相关人员处理");
    } finally {
    }
    return resultVo;
  }
Ejemplo n.º 10
0
  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;
  }
Ejemplo n.º 11
0
  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;
  }
  /** 材料核发调用获取MAP数据 */
  public String ywlzclhf(String json) throws Exception {
    User user = ActionContext.getCurrentUserInThread();

    String resultVO = null;
    BuSpLzhfVO vo = new BuSpLzhfVO();
    //        obj.YWLZ_UID = data.YWLZ_UID;
    //		obj.YWCL_UID = data.YWCL_UID;
    //		obj.PIJIAN_CODE = codeid;
    //		obj.PIJIAN_NAME = nameid;
    //		obj.LINGJIAN_REN =ljr;
    //		obj.LINGJIAN_PHONE=ljrdh;
    try {
      JSONArray list = vo.doInitJson(json);
      JSONObject object = (JSONObject) list.get(0);
      String YWLZ_UID = (String) object.get("YWLZ_UID");

      // 通过业务流转UID查询企业填报的数据,map类型
      String id = buSpywCspsxkzsqDao.getIdByYwlzuid(YWLZ_UID);
      BuSpywCspsxkzsqVO mapFtl = new BuSpywCspsxkzsqVO();
      if (StringUtil.isNotBlankStr(id)) {
        mapFtl = this.findById(id);
      }

      //
      //        	//复选框的判断
      //        	String Wszx_gyws=mapFtl.getWszx_gyws();
      //        	String Wsxz_shws=mapFtl.getWsxz_shws();
      //        	String Sfclml=mapFtl.getSfclml();
      //        	if(StringUtils.isBlank(Wszx_gyws)){
      //        		mapFtl.put("WSZX_GYWS", "");
      //        	}
      //        	if(StringUtils.isBlank(Wsxz_shws)){
      //        		mapFtl.put("WSXZ_SHWS", "");
      //        	}
      //        	if(StringUtils.isBlank(Sfclml)){
      //        		mapFtl.put("SFCLML", "");
      //        	}
      //

      // 组装业务流转核发数据
      Map mapVo = new HashMap();
      mapVo.put("YWLZ_UID", YWLZ_UID);
      mapVo.put("YWCL_UID", object.get("YWCL_UID"));
      mapVo.put("PIJIAN_CODE", object.get("PIJIAN_CODE"));
      mapVo.put("PIJIAN_NAME", object.get("PIJIAN_NAME"));
      mapVo.put("LINGJIAN_PHONE", object.get("LINGJIAN_PHONE"));
      mapVo.put("LINGJIAN_REN", object.get("LINGJIAN_REN"));
      mapVo.put("CLK_UID", object.getString("CLK_UID"));
      mapVo.put("FZ_DATE", object.getString("FZ_DATE"));
      mapVo.put("YXQ_DATE", object.getString("YXQ_DATE"));

      if (mapFtl != null) {
        buSpLzhfService.saveBuSpLzhfVO(mapFtl, mapVo);
      }

      resultVO = vo.getRowJson();
    } catch (DaoException e) {
      logger.error("审批业务材料核发{}", e);
      SystemException.handleMessageException("审批业务材料核发调用失败,请联系相关人员处理");
    } finally {
    }
    return resultVO;
  }
  public String updateShenhe(String json, Map fils, String u_id, String status, String t_id)
      throws Exception {

    User user = ActionContext.getCurrentUserInThread();
    SgPersonLibraryVO vo = new SgPersonLibraryVO();
    String domresult = null;
    try {
      JSONArray list = vo.doInitJson(json);
      JSONObject object = (JSONObject) list.get(0);
      String companyname = object.getString("COMPANY_NAME");
      String companycode = object.getString("COMPANY_DENGLU_CODE");
      String companyuid = object.getString("SG_COMPANY_UID");
      String personUid = object.getString("SG_PERSON_LIBRARY_UID");
      String personName = object.getString("PERSON_NAME");
      domresult = sgPersonLibraryDao.updateShenhe(json, fils, u_id, status, t_id);

      if ("10".equals(status)) { // 人员审核通过
        // ****************************消息添加

        Map messageMap = new HashMap();
        messageMap.put("TITLE", "施工人员审核");
        messageMap.put(
            "CONTENT",
            "人员<a&nbsp;href='javascript:void(0)'&nbsp;onclick=\"zxdtView('"
                + personUid
                + "','sgrysh')\">"
                + personName
                + "</a>信息<span&nbsp;style='color:blue;'>审核通过</span>");
        messageMap.put("USERTO", companycode); // 企业的登录Code
        messageMap.put("USERTONAME", companyname); // 企业的名称
        messageMap.put("SYSTEM_TYPE", "SG"); // 系统类型
        messageMap.put("COMPANY_UID", companyuid); // 对应的施工企业编号
        messageMap.put("MSG_TYPE", Constants.FS_MESSAGE_INFO_MSG_TYPE_SGQYRY); // 消息类型
        messageMap.put("QUANXIAN_UID", Constants.QUANXIAN_SG_RYGL); // 涉及的权限点

        fsMessageInfoService.insertVo(messageMap);
      } else if ("20".equals(status)) { // 人员审核未通过
        // ****************************消息添加

        Map messageMap = new HashMap();
        messageMap.put("TITLE", "施工人员审核");
        messageMap.put(
            "CONTENT",
            "人员<a&nbsp;href='javascript:void(0)'&nbsp;onclick=\"zxdtView('"
                + personUid
                + "','sgrysh')\">"
                + personName
                + "</a>信息<span&nbsp;style='color:red;'>审核未通过</span>");
        messageMap.put("USERTO", companycode); // 人员的登录Code
        messageMap.put("USERTONAME", companyname); // 企业的名称
        messageMap.put("SYSTEM_TYPE", "SG"); // 系统类型
        messageMap.put("COMPANY_UID", companyuid); // 对应的施工企业编号
        messageMap.put("MSG_TYPE", Constants.FS_MESSAGE_INFO_MSG_TYPE_SGQYRY); // 消息类型
        messageMap.put("QUANXIAN_UID", Constants.QUANXIAN_SG_RYGL); // 涉及的权限点

        fsMessageInfoService.insertVo(messageMap);
      }
      LogManager.writeUserLog(
          vo.getSg_person_library_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_SUCCESS,
          user.getName() + "施工人员信息-提交-数据更改成功",
          user,
          "",
          "");

    } catch (DaoException e) {
      logger.error("表单信息{}", e.getMessage());
      LogManager.writeUserLog(
          vo.getSg_person_library_uid(),
          ywlx,
          Globals.OPERATION_TYPE_DELETE,
          LogManager.RESULT_FAILURE,
          user.getName() + "施工人员信息-提交-数据更改成功",
          user,
          "",
          "");
      SystemException.handleMessageException("施工人员信息-提交-数据更改成功,请联系相关人员处理");
    } finally {
    }
    return domresult;
  }