public String topJson() {
    this.jsonResult = JsonResult.getFailure();
    if (publicationName != null) {
      Publication publication = publicationService.queryByPublicationName(publicationName);
      if (publication != null) {
        publicationId = publication.getId();
      }
    }
    if (this.publicationId == null || this.publicationId <= 0) {
      log.error(
          "no parameter publicationid,and we can not get the publicationid from db,DmDeviceAnalysisAction.topJson");
    } else {
      Map<String, Object> map = new HashMap<String, Object>();
      map.put("pid", getSessionPublisherId());
      map.put("publicationid", publicationId);
      map.put("device", device);
      map.put("startDate", startDate);
      map.put("endDate", endDate);

      this.jsonResult.put("insertSum", dmInstalledTimesService.deviceInsertedSum(map));
      this.jsonResult.put("deviceStartSum", dmStartTimesService.deviceStartSum(map));
      map.put("startDate", null);
      map.put("endDate", null);
      this.jsonResult.put("newUser", dmInstalledTimesService.deviceNewUser(map));
      this.jsonResult.put("totalDeviceStartSum", dmStartTimesService.deviceStartSum(map));

      this.jsonResult.setCode(JsonResult.CODE.SUCCESS);
      this.jsonResult.setMessage(JsonResult.MESSAGE.SUCCESS);
    }
    return JSON;
  }
  public String analysisJson() {
    this.jsonResult = JsonResult.getFailure();
    if (publicationName != null) {
      Publication publication = publicationService.queryByPublicationName(publicationName);
      if (publication != null) {
        publicationId = publication.getId();
      }
    }
    if (this.publicationId == null || this.publicationId <= 0) {
      log.error(
          "no parameter publicationid,and we can not get the publicationid from db,DmDeviceAnalysisAction.analysisJson");
      jsonResult.setMessage("杂志不存在");
    } else {
      Map<String, Object> map = new HashMap<String, Object>();
      map.put("pid", getSessionPublisherId());
      map.put("publicationid", publicationId);
      map.put("device", device);
      map.put("startDate", startDate);
      map.put("endDate", endDate);

      List<DmVisitDevicePvUv> list = dmVisitDevicePvUvService.queryDeviceAnalysisUser(map);
      if (list != null) {
        this.jsonResult.setCode(JsonResult.CODE.SUCCESS);
        this.jsonResult.setMessage(JsonResult.MESSAGE.SUCCESS);
        this.jsonResult.put("deviceAnalysis", list);
      }
    }

    return JSON;
  }
  public String doPojoJson() {
    this.jsonResult = new JsonResult();
    this.jsonResult.setCode(JsonResult.CODE.FAILURE);
    this.jsonResult.setMessage(JsonResult.MESSAGE.FAILURE);
    // 如果是出版商检验其权利 begin
    Publisher pu = this.getSessionPublisher();
    boolean checkUser = false;
    if (pu != null) { // 出版商用户
      List<Publication> tpList = publicationService.queryAuditByPublisherId(pu.getId());
      if (tpList != null) {
        for (Publication puc : tpList) {
          String tempS = puc.getId() + "";
          if (tempS.equals(publicationId + "")) {
            checkUser = true;
          }
        }
      }

      if (!checkUser) {
        this.jsonResult.setMessage("没有权限");
        return JSON;
      }
    }

    // 如果是出版商检验其权利 end
    this.publication = publicationService.queryById(publicationId);
    pcRel = publicationCategoryRelService.getList(publicationId);
    //		this.generateJsonResult(JsonResult.CODE.SUCCESS,
    //                JsonResult.MESSAGE.SUCCESS, "publication", this.publication);

    this.jsonResult.setCode(JsonResult.CODE.SUCCESS);
    this.jsonResult.setMessage(JsonResult.MESSAGE.SUCCESS);
    Map<String, Object> objMap = new HashMap<String, Object>();
    objMap.put("publication", this.publication);
    objMap.put("pcRel", pcRel);
    this.jsonResult.setData(objMap);
    return JSON;
  }