<%@page import="com.northglass.Globel.mes"%>
|
<%@page import="com.northglass.SqlHelper.*"%>
|
<%@page import="org.json.*"%>
|
<%@ page contentType="text/json;charset=UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<%
|
//String yemian = request.getParameter("gongyi");
|
String lineName = request.getParameter("lineName");
|
String caozuo = request.getParameter("caozuo");
|
String startDate = request.getParameter("sDate");
|
String endDate = request.getParameter("eDate");
|
DBSession sn = null;
|
boolean ok = false;
|
//System.out.println("操作类型:" + caozuo + ";工艺:" + lineName+";开始日期:"+startDate+";结束日期:"+endDate);
|
try {
|
|
|
String strSQL = "";
|
if ("电量".equals(caozuo)) {
|
sn = mes.getMesDBHelper().createErpSession(false,"gmms_data");
|
strSQL = "Select 日期,"+lineName+" from v_daily_dianliang where 日期>='"+startDate+"' and 日期 <= '"+endDate+"'";
|
// System.out.println("信息查询:" + strSQL);
|
|
sn.createSql(strSQL);
|
JSONArray a = sn.query().resultToJson(false);
|
if (a != null) {
|
out.print(a.toString());
|
} else {
|
out.print("[]");
|
}
|
if(sn!=null){
|
sn.close();
|
}
|
}
|
|
if ("产量".equals(caozuo)) {
|
|
sn = mes.getMesDBHelper().createErpSession(false,"sappp");
|
strSQL = "call dapingchanliangchaxun('"+lineName+"','"+startDate+"','"+endDate+"') ";
|
System.out.println("信息查询1:" + strSQL);
|
|
sn.createSql(strSQL);
|
JSONArray a = sn.query().resultToJson(false);
|
if (a != null) {
|
out.print(a.toString());
|
} else {
|
out.print("[]");
|
}
|
}
|
|
|
if("产量2".equals(caozuo)){
|
|
sn = mes.getMesDBHelper().createErpSession(false,"sappp");
|
strSQL = "call proc_dapingDataByDateSelect('"+lineName+"','"+startDate+"','"+endDate+"') ";
|
System.out.println("信息查询2:" + strSQL);
|
|
sn.createSql(strSQL);
|
JSONArray a = sn.query().resultToJson(false);
|
if (a != null) {
|
out.print(a.toString());
|
} else {
|
out.print("[]");
|
}
|
}
|
|
|
if("班组".equals(lineName)){
|
|
|
|
}
|
|
} catch (Exception e) {
|
e.printStackTrace();
|
|
} finally {
|
if (sn != null)
|
sn.close();
|
}
|
|
|
|
%>
|