严智鑫
2024-05-13 cedce4883f0d204f5bf7bf87c0bf4858dabb0c23
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<%@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 st.id,gs.id as gsid,st.processcard_id,gs.galss_id,gs.edg_width,gs.edg_height,thickness from gmms_slicecage_tempering as st LEFT JOIN gmms_galss_task_shelf as gs on st.processcard_id=gs.processcard_id where st.id=gs.slicecage_rank  UNION"
                      +" select id,'','','','','','' from gmms_slicecage_tempering  where processcard_id is null order by id";
            }
            if ("吸片模式切换".equals(caozuo)) {
                String zt = request.getParameter("xiPian");
                qSQL = "update gmms_machine set remarks = " + zt + " where work_id = " + pLine
                        + " and machine_name like '%中空机器手%'";
            }
            
            //System.out.println(qSQL);
            sn.createSql(qSQL);
            //System.out.print(qSQL);
            if ("修改".equals(leixing)) {
                String Id = request.getParameter("Id");
                if ("清空信息".equals(caozuo)) {
                    qSQL = "update gmms_drop_frame_5 as dr left join gmms_drop_frame_5 as dr2 on dr.rank=dr2.rank"
                            +" set dr.rank=null,dr.sign=0,dr2.sign=0"
                            +" where dr.id="+Id+" and dr2.groups_=100 and dr.rank is not null";
                    sn.createSql(qSQL);
                    int s = sn.update();
                    out.print(s);
                }
            }
            if ("查询".equals(leixing)) {
                JSONArray a = sn.query().resultToJson(false);
                if (a != null) {
                    out.print(a.toString());
                } else {
                    out.print("[]");
                }
            }
            //sn.createStdCall("aaa",3);
            //String s= sn.stdCall(1,2,3).ResultMessage;
 
        } catch (Exception e) {
            e.printStackTrace();
 
        } finally {
            if (sn != null)
                sn.close();
        }
    }
 
 
    
%>