81041
2018-10-29 f620196f9a441ef0e0e8f1ca6b38b356dabdafc4
gx_tieta/src/com/fgkj/actions/BattInfAction.java
@@ -71,6 +71,13 @@
      result = tojson(model);
      return SUCCESS;
   }
   //根据维护区和机房名称查询电池组信息
   public String searchInform1() {
      Batt_Maint_Dealarm bmd = getGson().fromJson(json, Batt_Maint_Dealarm.class);
      ServiceModel model = service.searchInform1(bmd);
      result = tojson(model);
      return SUCCESS;
   }
   public String serchByCondition() {
      model = service.serchByCondition(bif);
      result = ActionUtil.tojson(model);
@@ -242,9 +249,6 @@
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //搜索机房或电池组
   public String serchStationOrBattgroup(){
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
@@ -261,6 +265,15 @@
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //查询所有的省份(左侧导航第一层,查所有的省份)
   public String serchAllStation_all(){
      User_inf u = (User_inf)getUser();
      BattInf binf=new BattInf();
      binf.setNum(u.getUId());
      ServiceModel model = service.serchAllStation_all(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //查询管理的市(左侧导航第二层,查所有的市,num中存放uid)
   public String serchStationName2(){
      User_inf u = (User_inf)getUser();
@@ -270,12 +283,26 @@
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //查询管理的市(左侧导航第二层,查所有的市)
   public String serchStationName2_all(){
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      ServiceModel model = service.serchStationName2_all(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
   public String serchStationName3(){
      User_inf u = (User_inf)getUser();
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      binf.setNum(u.getUId());
      ServiceModel model = service.serchStationName3(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //查询管理的机房(左侧导航第三层,查所有的机房)
   public String serchStationName3_all(){
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      ServiceModel model = service.serchStationName3_all(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
@@ -289,6 +316,14 @@
      result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
      return SUCCESS;
   }
   //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组)
   public String serchBattByStation_all(){
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      //System.out.println(binf);
      ServiceModel model = service.serchBattByStation_all(binf);
      result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
      return SUCCESS;
   }
   
   //查询所有的电池组数
   public String serchAllBatt(){
@@ -298,6 +333,24 @@
      return SUCCESS;
   }
   
   //电池配组管理(重要)
   public String serchMakeGroup(){
      BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
      User_inf uinf=(User_inf) getUser();
      binf.setNum(uinf.getUId());
      ServiceModel model = service.serchMakeGroup(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //电池配组管理(重要)
   public String serchGroupByInfor(){
      BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
      User_inf uinf=(User_inf) getUser();
      binf.setNum(uinf.getUId());
      ServiceModel model = service.serchGroupByInfor(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   public BattInf getBif() {
      return bif;
   }
@@ -331,12 +384,6 @@
      this.btdif = btdif;
   }
   
//   public ServiceModel getModel() {
//      return model;
//   }
    
   public void setJson(String json) {
      this.json = json;