/** //通过(单位)对象 查询该单位的 其他涉密设备的统计情况 这里查询只返回的一条记录而已 */
  @Override
  public FashionTable getData(Parameter param) {

    FashionTable fashionTable = new FashionTable();
    // 获取传入organ参数
    Organ organ = (Organ) param.getVariable("organ");

    // 通过(单位)对象   查询该单位的   其他涉密设备的密级情况    这里查询只返回的一条记录而已
    List<ZongHeTongJiStatDto> objectList =
        secrecyOthersService.count_SecrecyOthers_Organ(null, organ, false);

    if (objectList != null) {
      Iterator<ZongHeTongJiStatDto> it = objectList.iterator();
      while (it.hasNext()) {
        ZongHeTongJiStatDto item = it.next();

        fashionTable.setStyleType("1");
        fashionTable.setOrganId(organ.getOrganId());
        fashionTable.setTitle("其他涉密设备统计");
        fashionTable.setImgUrl("/bmp/statfk/borderlayout/resource/img/others.gif");
        fashionTable.setListAction("/secrecysystem/secrecyothers/others_list.action");
        fashionTable.setSecrecyLevel1("绝 密");
        fashionTable.setSecrecyNum1(item.getOrganSecrecyLevel1());
        fashionTable.setSecrecyLevel2("机 密");
        fashionTable.setSecrecyNum2(item.getOrganSecrecyLevel2());
        fashionTable.setSecrecyLevel3("秘 密");
        fashionTable.setSecrecyNum3(item.getOrganSecrecyLevel3());
        fashionTable.setTotalText("合 计");
        fashionTable.setTotalNum(
            item.getOrganSecrecyLevel1()
                + item.getOrganSecrecyLevel2()
                + item.getOrganSecrecyLevel3());
      }
    }

    return fashionTable;
  }
 /** {@inheritDoc} */
 @Override
 public List<SecrecyStatisticsDto> getSecrecyStatisticsPageList(
     District district, Organ queryOrgan) {
   List<SecrecyStatisticsDto> list = new ArrayList<SecrecyStatisticsDto>();
   // 查询单位列表
   /*OrganHqlQuery qurey = OrganizationContext.getInstance().getOrganService().createQuery();
   List<Organ> organList = qurey.eqDistrict(district.getDistrictCode())
   	.coName(queryOrgan == null ? "" : queryOrgan.getOrganName())
   	.setPagination(psm)
   	.list();*/
   Map<String, Object> paramsOrg = new HashMap<String, Object>();
   StringBuffer hql =
       new StringBuffer(
           "SELECT o FROM Organ o WHERE o.district.districtCode = :districtCode and o.organType != 1 and o.logoutStatus = 1 and o.status = 1");
   paramsOrg.put("districtCode", district.getDistrictCode());
   if (queryOrgan != null
       && queryOrgan.getOrganName() != null
       && !"".equals(queryOrgan.getOrganName())) {
     hql.append("and o.organName like :organName ");
     paramsOrg.put("organName", "%" + queryOrgan.getOrganName() + "%");
   }
   List<Object> objectList =
       this.getPersistProxy().getOrmPersistence().findList(hql.toString(), paramsOrg);
   List<Organ> organList = new ArrayList<Organ>();
   if (objectList != null && objectList.size() > 0) {
     for (Object object : objectList) {
       Organ org = (Organ) object;
       organList.add(org);
     }
   }
   Integer num1 = 0;
   Integer num2 = 0;
   Integer num3 = 0;
   Integer num4 = 0;
   Integer num5 = 0;
   Integer num6 = 0;
   Integer num7 = 0;
   Integer num8 = 0;
   Integer num9 = 0;
   Integer num10 = 0;
   // 查询保密业务数据
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("districtCode", district.getDistrictCode());
   for (Organ organ : organList) {
     params.put("organId", organ.getOrganId());
     Map<String, Object> map =
         this.getPersistProxy().getJdbcPersistence().find(secrecyStatisticsSql, params);
     SecrecyStatisticsDto secrecyStatisticsDto = new SecrecyStatisticsDto();
     secrecyStatisticsDto.setOrganId(organ.getOrganId());
     secrecyStatisticsDto.setOrganName(organ.getOrganName());
     secrecyStatisticsDto.setNumGroupEntering(
         Integer.parseInt(map.get("num_secreyWorkOrgan_entering").toString()));
     secrecyStatisticsDto.setNumGroupReprot(
         Integer.parseInt(map.get("num_secreyWorkOrgan_report").toString()));
     secrecyStatisticsDto.setNumGroupMember(
         Integer.parseInt(map.get("num_personGroupMember").toString()));
     secrecyStatisticsDto.setNumSecrecyWorkOrganMember(
         Integer.parseInt(map.get("num_secrecyWorkOrganMember").toString()));
     secrecyStatisticsDto.setNumKeysectionEntering(
         Integer.parseInt(map.get("num_keysection_entering").toString()));
     secrecyStatisticsDto.setNumKeysectionReport(
         Integer.parseInt(map.get("num_keysection_report").toString()));
     secrecyStatisticsDto.setNumKeyPartEntering(
         Integer.parseInt(map.get("num_keyPart_entering").toString()));
     secrecyStatisticsDto.setNumKeyPartReport(
         Integer.parseInt(map.get("num_keyPart_reprot").toString()));
     secrecyStatisticsDto.setNumSecrecyPersonEntering(
         Integer.parseInt(map.get("num_secrecyPerson_entering").toString()));
     secrecyStatisticsDto.setNumSecrecyPersonReport(
         Integer.parseInt(map.get("num_secrecyPerson_report").toString()));
     list.add(secrecyStatisticsDto);
     num1 += secrecyStatisticsDto.getNumGroupEntering();
     num2 += secrecyStatisticsDto.getNumGroupReprot();
     num3 += secrecyStatisticsDto.getNumGroupMember();
     num4 += secrecyStatisticsDto.getNumSecrecyWorkOrganMember();
     num5 += secrecyStatisticsDto.getNumKeysectionEntering();
     num6 += secrecyStatisticsDto.getNumKeysectionReport();
     num7 += secrecyStatisticsDto.getNumKeyPartEntering();
     num8 += secrecyStatisticsDto.getNumKeyPartReport();
     num9 += secrecyStatisticsDto.getNumSecrecyPersonEntering();
     num10 += secrecyStatisticsDto.getNumSecrecyPersonReport();
   }
   SecrecyStatisticsDto lastRow = new SecrecyStatisticsDto();
   lastRow.setOrganName("统计结果:");
   lastRow.setNumGroupEntering(num1);
   lastRow.setNumGroupReprot(num2);
   lastRow.setNumGroupMember(num3);
   lastRow.setNumSecrecyWorkOrganMember(num4);
   lastRow.setNumKeysectionEntering(num5);
   lastRow.setNumKeysectionReport(num6);
   lastRow.setNumKeyPartEntering(num7);
   lastRow.setNumKeyPartReport(num8);
   lastRow.setNumSecrecyPersonEntering(num9);
   lastRow.setNumSecrecyPersonReport(num10);
   list.add(lastRow);
   return list;
 }