<%@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("yemian");
|
if ("折弯页面".equals(yemian)) {
|
String caozuo = request.getParameter("caozuo");
|
String leixing = request.getParameter("leixing");
|
String pLine = request.getParameter("line");
|
DBSession sn = null;
|
boolean ok = false;
|
try {
|
sn = mes.getMesDBHelper().createSession(false);
|
String qSQL = "";
|
|
if ("获取列表".equals(caozuo)) {
|
qSQL = "select out_rank,edg_width,edg_height,thickness,gc_number,count(*) from gmms_galss_task_shelf "+
|
"where work_state='已完成' and work_procedure='中空上片' and gc_number=(select lk.parent_liuchengka from gmms_drop_frame_5 as dr5 "+
|
"left join gmms_shelf_rack_2 as sr on dr5.rank=sr.id "+
|
"left join gmms_liuchengka as lk on sr.processcard_id=lk.liuchengka "+
|
"left join gmms_liuchengka as lk2 on lk.parent_liuchengka=lk2.liuchengka "+
|
"where groups_=4 and drop_groups="+pLine+" and sr.id is not null and lk.liuchengka is not null and lk2.liuchengka is not null and "+
|
"lk2.current_status='正在工作' and lk2.current_work_position='中空' order by lk.liuchengka limit 0,1) group by out_rank "+
|
"order by finsh_time desc;";
|
}
|
sn.createSql(qSQL);
|
if ("查询".equals(leixing)) {
|
JSONArray a = sn.query().resultToJson(false);
|
if (a != null) {
|
out.print(a.toString());
|
} else {
|
out.print("[]");
|
}
|
}
|
|
} catch (Exception e) {
|
e.printStackTrace();
|
|
} finally {
|
if (sn != null)
|
sn.close();
|
}
|
}
|
|
|
|
%>
|