Merge branch 'dev_lxw' of https://whyclxw1@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
| | |
| | |
|
| | | return b;
|
| | | }
|
| | | |
| | | /**
|
| | | * 允许跨域请求
|
| | | */
|
| | | public static void isAllowHeaders(){
|
| | | HttpServletResponse res = 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");
|
| | | }
|
| | | }
|
| | |
| | | result=tojson(model);
|
| | | return SUCCESS;
|
| | | }
|
| | | |
| | | //跨域访问查询电池组的单体数据
|
| | | public String serchByCondition_ky(){
|
| | | ActionUtil.isAllowHeaders();
|
| | | Batt_rtdata rtdata=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_rtdata.class);
|
| | | ServiceModel model=service.serchByCondition_ky(rtdata);
|
| | | result=ActionUtil.tojson(model);
|
| | | return SUCCESS;
|
| | | }
|
| | | |
| | | public String getResult() {
|
| | | return result;
|
| | | }
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import com.fgkj.dao.impl.Batt_rtstateDAOImpl;
|
| | | import com.fgkj.dto.BattInf;
|
| | | import com.fgkj.dto.Batt_Maint_Dealarm;
|
| | | import com.fgkj.dto.Batt_rtdata;
|
| | | import com.fgkj.dto.Batt_rtstate;
|
| | | import com.fgkj.dto.ServiceModel;
|
| | | import com.fgkj.dto.User_inf;
|
| | |
| | | result = ActionUtil.tojson(model);
|
| | | return SUCCESS;
|
| | | }
|
| | | |
| | | //实时监测中的查询实时组端信息 <!-- 跨域访问 --->
|
| | | public String serchByCondition_ky(){ |
| | | ActionUtil.isAllowHeaders(); //允许跨域访问
|
| | | //System.out.println("开始查询rtstate");
|
| | | rtstate = ActionUtil.getGson().fromJson(json, Batt_rtstate.class);
|
| | | model=service.serchByCondition_ky(rtstate);
|
| | | //System.out.println(model);
|
| | | result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
|
| | | return SUCCESS;
|
| | | }
|
| | |
|
| | | public ServiceModel getModel() {
|
| | | return model;
|