예제 #1
0
 /** 新增处罚告知 */
 public void addCfgz() {
   Map p = this.getParamsAsDmp();
   p.put("id", CodeUtil.getTimeSequence());
   UserInfo userInfo = getSessionContainer().getUserInfo();
   p.put("jdr", userInfo.getUsername());
   Dmp dmp = cfgzService.addCfgz(p);
   this.writeResponse(dmp.toJson());
 }
예제 #2
0
  @SuppressWarnings("unchecked")
  public void addOrUpdateFjgl(XzzfYwFjglYw xzzfYwFjglYw, ZxSysFilesandyw zxSysFilesandyw, Map p)
      throws Exception {
    String id = (String) (p.get("id") == null ? "" : p.get("id"));
    String deptid = (String) (p.get("_deptid") == null ? "" : p.get("_deptid"));
    String userid = (String) (p.get("_userid") == null ? "" : p.get("_userid"));
    String ajid = (String) (p.get("xzzfYwFjglYw.ajid") == null ? "" : p.get("xzzfYwFjglYw.ajid"));
    String context =
        (String) (p.get("xzzfYwFjglYw.context") == null ? "" : p.get("xzzfYwFjglYw.context"));
    String scr = (String) (p.get("scr") == null ? "" : p.get("scr"));
    String filename = (String) (p.get("filename") == null ? "" : p.get("filename"));
    String type = (String) (p.get("type") == null ? "" : p.get("type"));
    String filetype = (String) (p.get("filetype") == null ? "" : p.get("filetype"));
    String filesize = (String) (p.get("filesize") == null ? "" : p.get("filesize"));
    if (id != null && !"".equals(id)) {
      //	fjglDao.update("qlxx.updateQlxxdj", p);
      xzzfYwFjglYw.setId(id);
      xzzfYwFjglYw.setAjid(ajid);
      xzzfYwFjglYw.setContext(context);
      this.fjglDao.saveOrUpdate(xzzfYwFjglYw);
      String[] fileid = (String[]) p.get("fileId");
      if (fileid != null) {
        for (int i = 0; i < fileid.length; i++) {
          p.put("zjid", CodeUtil.getTimeSequence(20));
          p.put("fileid", fileid[i]);
          //	fjglDao.insert("qlxx.qlxxdjFilesandyw", p);
        }
      }

    } else {
      xzzfYwFjglYw = new XzzfYwFjglYw();
      id = CodeUtil.getTimeSequence(20);
      xzzfYwFjglYw.setId(id);
      xzzfYwFjglYw.setAjid(ajid);
      xzzfYwFjglYw.setContext(context);

      List<Map<String, String>> list =
          this.fjglDao.findAddMapBySql(
              "select username from zx_sys_user where id=?", new Object[] {userid});
      if (list.size() > 0) {
        scr = list.get(0).get("username");
      }

      xzzfYwFjglYw.setScr(scr);
      Date scsj = new Date();
      xzzfYwFjglYw.setScsj(scsj);
      xzzfYwFjglYw.setName(filename);
      xzzfYwFjglYw.setFiletype(filetype);
      xzzfYwFjglYw.setFilesize(filesize);
      xzzfYwFjglYw.setZzjgdm(deptid);
      this.fjglDao.saveOrUpdate(xzzfYwFjglYw);

      String[] fileid = (String[]) p.get("fileId");
      if (fileid != null) {
        for (int i = 0; i < fileid.length; i++) {
          zxSysFilesandyw = new ZxSysFilesandyw();
          String fjid = CodeUtil.getTimeSequence(20);
          String ywid = id;
          zxSysFilesandyw.setId(fjid);
          zxSysFilesandyw.setYwid(ywid);
          zxSysFilesandyw.setFileid(fileid[i]);
          zxSysFilesandyw.setType(type);
          this.fjglDao.saveOrUpdate(zxSysFilesandyw);
        }
      }
    }
  }