严智鑫
2025-05-27 80f64d025e25cdba8a33a1badf2109c80d0bafe7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<%@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();
        }
    }
 
 
    
%>