hdw
2018-11-15 7d174fc58bcc9c136548c789fbdf350a3c6fe52b
gx_tieta/src/com/fgkj/actions/BattInfAction.java
@@ -2,6 +2,8 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.fgkj.dao.impl.BattInfImpl;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Batt_Maint_Dealarm;
@@ -290,7 +292,23 @@
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //查询管理的机房(左侧导航第三层,查所有的机房,num中存放uid)
   //查询管理的县/区(左侧导航第三层,查所有的县/区)
   public String serchStationName5(){
      User_inf u = (User_inf)getUser();
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      binf.setNum(u.getUId());
      ServiceModel model = service.serchStationName5(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //查询管理的县/区(左侧导航第三层,查所有的县/区)
   public String serchStationName5_all(){
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      ServiceModel model = service.serchStationName5_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);
@@ -299,14 +317,14 @@
      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;
   }
   //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组,num中存放uid)
   //根据机房id查询机房下的电池组信息(左侧导航第五层,根据机房查询下面的电池组,num中存放uid)
   public String serchBattByStation(){
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      User_inf u = (User_inf)getUser();
@@ -316,7 +334,7 @@
      result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
      return SUCCESS;
   }
   //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组)
   //根据机房id查询机房下的电池组信息(左侧导航第五层,根据机房查询下面的电池组)
   public String serchBattByStation_all(){
      BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
      //System.out.println(binf);
@@ -351,6 +369,29 @@
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //首页上根据stationid查询电池组的机历卡
   public String serchBattAllInfoByStationId(){
      BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
      ServiceModel model = service.serchBattAllInfoByStationId(binf);
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   //跨域访问获取所有电池组的信息<-------跨域----------->
   public String searchInform_ky(){
      isAllowHeaders();                     //允许跨域访问
      //System.out.println(key+"@@@@@@@@@@@@@@@@@@@@@@");
      ServiceModel model = new ServiceModel();
      if(key != null && CROSS_DOMAIN_KEY.equals(key)){
         model = service.searchInform_ky();
      }else{
         model.setCode(0);
         model.setMsg("识别码错误");
      }
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   public BattInf getBif() {
      return bif;
   }