81041
2018-11-14 99285fcc7d30e62f1e84e1c96d29d0ffcd9ccdbc
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;
@@ -367,6 +369,26 @@
      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(){
      HttpServletResponse res = ActionUtil.getResponse();
      res.setHeader("Access-Control-Allow-Origin", "*");            //允许跨域访问
      res.setHeader("Access-Control-Allow-Headers", "X-Requested-With,content-type,token");
      res.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH");
      ServiceModel model;
      model = service.searchInform_ky();
      result = ActionUtil.tojson(model);
      return SUCCESS;
   }
   public BattInf getBif() {
      return bif;
   }