严智鑫
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
 
<%@page import="com.northglass.service.device.DeviceService"%>
<%@page import="java.sql.*"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="${ctx}/static/styles/default.css" type="text/css" rel="stylesheet" />
<script src="${ctx}/static/holder.js" type="text/javascript"></script>
<%-- <script language="javascript" type="text/javascript" src="${ctx}/static/util.js"></script>   --%>
<script type="text/javascript" src="${ctx}/static/jquery/jquery-3.1.0.min.js"></script>
<title>玻璃识别</title>
<style>
#example tbody {
      display:block;
      height:595px;
      overflow-y:scroll;
}
#example thead,#example tbody tr {
     display:table;
     width:100%;
     table-layout:fixed;
}
#example thead {
     width: calc(100% - 1em);
}
#example thead th {
     background:#ccc;
}
</style>
<script type="text/javascript">
     var interval = setInterval('refreshStatus()', 5000); 
 
    // 设备页面自动刷新
    /* function refreshStatus() {
        window.location.reload();
 
    } */
    // 停止页面自动刷新
    function disableAutoRefresh() {
        clearInterval(interval);
    }
 
    function setRange() {
        disableAutoRefresh();
        $('#modifyRangeModal').modal('toggle');
    }
    
    function setdata() {
        disableAutoRefresh();
        $('#add-fix-info').modal('toggle');
    }
    function setpopo() {
        disableAutoRefresh();
        $('#delete-fix-info').modal('toggle');
    }
    function setpeople() {
        disableAutoRefresh();
        $('#people').modal('toggle');
    }
    
    /* $(document).delegate('#getsure','click',function(){
        $.ajax({ 
            async: false, 
        
            type:"GET", 
 
             url:"${ctx}/identifymachine/people/", 
 
            dataType:"text", 
 
            success:function(data){
                window.location.href="${ctx}/identifymachine/manage/1";
                }
            });
     }); */ 
     
     /修改模式  */
    function onchecks(type){
        var groups=document.getElementsByName('groups')[0].value;
        $.ajax({
              cache:false,
                type:"POST",
                dataType : "json", 
                 url:"${ctx}/identifymachine/updatemarking/"+groups,
                 data:{
                     "type":type,
                 },success:function(data){ 
                     window.location.href="${ctx}/identifymachine/manage/"+groups;
                  }
                 
        });
    }
     
     <%String result = null;
    try {
     String g = request.getParameter("line");
     String model = request.getParameter("type");    
     if (g != null && model != null) {
      Connection conn = DeviceService.getConnection();
      CallableStatement c = conn.prepareCall("{call Identify_Mark_UpdateModel(?,?,?)}");
      c.setString(1, g);
      c.setString(2, model);
      c.registerOutParameter(3, java.sql.Types.VARCHAR);
      c.execute();
      result = c.getString(3);
      c.close();
     }
     out.print("var result='" + result + "';\r\n");
     
    } catch (Exception e) {
 
    }
    if (result == null)
     out.print("var result=null;\r\n");%>
  
  
  function create() {
   if (result != null) {
    alert(result);
    window.location.href = "${groups}";
   }
  }
  create();
 
  //js请求方
  function DBControl(dbtype) {
   
  var type = dbtype;
   var ln = ${groups};
   var isC = confirm("将设置当前工程为钢化不打标模式\r\n设置后将无法再次修改当前工程的钢化打标模式\r\n\r\n是否继续执行当前操作?")
   if (isC == true) {
 
    if (type != null && ln != null && type < 2 && ln < 4) {
     var url = ln + "?line=" + ln + "&type=" + type;
     window.location.href = url;
    }
   }
  }
 
</script>
</head>
<body>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                测量显示 
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 测量</a></li>
 
            </ol>
        </section>
 
        <!-- Main content -->
        <section class="content container-fluid">
 
            <!--------------------------
        | Your Page Content Here |
        -------------------------->
            <fieldset>
                
                <div>
                            <%-- <table class="table table-striped table-hover" style="width: 70%">
                                <tr>
                                    <th width="8%"><span style="font-size:20px;">测量进度</span><br> 
                                    </th>
                                    <td width="5%">${progress}
                                        <span style="font-size:20px;">${completePieces}/${totalPieces}</span>
                                    </td>
                                    <td width="60%">
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-aqua" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="${progress}">
                                              <span class="sr-only">${progress} Complete</span>
                                            </div>
                                         </div>
                                    </td>
                                </tr>
                            </table> --%>
                            <input style="display:none" type="text" name="groups" value="${groups}" />
                            </div>
                            <div style="height:250px;width:30%;float:right;font-size:22px; text-align:left;">
                                <div style="float:right;">玻璃单位:mm</div>
                                
                                <table class="table table-striped table-hover">
                                    <%-- <tr>
                                        <td>批次编号:<span style="color:#1D82FE;">${txtname}</span></td>
                                    </tr> --%>
                                    <tr>
                                        <td>玻璃厚度:<span style="color:#1D82FE;">${thickness}</span></td>
                                    </tr>
                                    <%-- <tr><td style="color:#1D82FE;">${thickness}</td></tr> --%>
                                    <tr>
                                         <td>玻璃色种:<span style="color:#1D82FE;">${color}</span></td>
                                    </tr>
                                    <%-- <tr><td style="color:#1D82FE;">${color}</td></tr> --%>
                                    <tr>
                                        <td>测量宽度:<span style="color:#1D82FE;">${actuallength}</span></td>
                                    </tr>
                                    <tr>
                                        <td>测量高度:<span style="color:#1D82FE;">${actualwidth}</span></td>
                                    </tr>
                                    <%-- <tr><td style="color:#1D82FE;">${actualLength}</td></tr> --%>
                                    
                                    <tr>
                                        <td>当前状态:<span style="color:#1D82FE;">${status}</span></td>
                                    </tr>
                                    <tr>
                                        <td>测量处理:<span style="color:#1D82FE;"><button class='btn btn-success' onclick="setdata()">人工匹配</button>&nbsp;&nbsp;&nbsp;
                                        <a class='btn btn-danger' onclick="setpopo()">破损</a>&nbsp;&nbsp;&nbsp;<a class='btn btn-warning' onclick="setpeople()">人工拿走</a></span></td>
                                    </tr>
                                    
                                    <tr>
                                        <td>切割故障处理:<span style="color:#1D82FE;"><a class='btn btn-danger' href='/gmms2/identifymachine/damage'>未测玻璃破损</a></span></td>
                                    </tr>
                                    <tr>
                                        <td>测量故障处理:<span style="color:#1D82FE;"><a class='btn btn-danger' href='/gmms2/identifymachine/review'>测量玻璃故障</a></span></td>
                                    </tr>
                                    <%-- <tr><td style="color:#1D82FE;">${statue}</td></tr> --%>
                                </table>
                            </div>
                            
                            
    <span style='font-size: 15px;'>当前生产线:</span>${buttonhmtl}
      <%
      String s = request.getParameter("line");//生产线
      String ghmark = null;
      String dbmark = null;
      if (s != null) {
      } else {
       String url2 = request.getAttribute("javax.servlet.forward.request_uri").toString();
       s = url2.substring(url2.length() - 1);
      }
      try{
       Connection con = DeviceService.getConnection();
       Statement st = con.createStatement();
       ResultSet set = st.executeQuery("select u.DBMark,u.GHMark from gmms_raw_file f left join gmms_identify_mark_update u on f.file_name = u.gongchenghao where f.state = '已领取' and f.operator ="+s);
       if (set.next()) {
        ghmark = set.getString(1);
        dbmark = set.getString(2);
       }
       con.close();
       if("0".equals(ghmark)){
        out.print("<span style='font-size: 15px;'>钢化小片打标模式:</span>");
        out.print("<span style='font-size: 15px;color:red' id='DBmodelInfo'>不打标</span>");
       }else if(ghmark ==null){
        out.print("<button class='btn btn-primary' onclick='DBControl(1)'>设置钢化不打标</button>&nbsp;");
        out.print("<span style='font-size: 15px;'>钢化打标模式:</span>");
        out.print("<span style='font-size: 15px;color:green' id='DBmodelInfo'>自动</span>"); 
       }
      }catch(Exception ex){
       System.out.print("打标模式设置出错:"+ex.getMessage());
      }
      
      %>
                            
                            
                            
                            <div style="height:300px;width:70%;margin-top:10%;margin-left:10%; text-align: center;">
                            <h2 style="color:red">${mesgess}</h2>
                            <div style="font-size:30px;"><span>玻璃ID:</span><span style="color:#1D82FE;">${glassid}</span></div>
                            <div style="font-size:100px;"><span style="color:#1D82FE;">${length}</span> x <span style="color:#1D82FE;">${width}</span></div>
                             <img  src="${ctx }/static/images/${img}" style="margin: 0 auto;">
                            </div> 
                
            </fieldset>
            <div class="modal fade" id="add-fix-info" tabindex="-1" role="dialog"
                aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content" style="width:700px">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true" data-backdrop="static">&times;</button>
                            <h3 class="modal-title" id="myModalLabel"
                                style="font-weight: bolder;">可能匹配数据</h3>
                        </div>
                        <form method="post" class="form-horizontal"
                    action="${ctx}/identifymachine/modify/${groups}">
                    <div class="modal-body">
                        <div class="control-group">
                            <table id="example" class="table table-striped table-hover" style='font-size:20px;'>
                                
                                <thead>
                                    <tr>
                                        <th style="width:15%">人工选择</th>
                                        <th style="width:15%">#</th>
                                        <th style="width:20%">高</th>
                                        <th style="width:20%">宽</th>
                                        <th>流程卡</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <c:forEach items="${glassLists}" var="glass" varStatus="status">
                                    <tr>
                                        <td style="width:15%"><input type="radio" name="glassid"
                                            value="${glass.id}" /></td>
                                        <td style="width:15%">${glass.id}</td>
                                        <td style="width:20%">${glass.height}</td>
                                        <td style="width:20%">${glass.width}</td>
                                        <td>${glass.processcardId}</td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="submit" class="btn btn-primary">提交</button>
                        <button type="button" class="btn" data-dismiss="modal">关闭</button>
                    </div>
                </form>
                    </div>
                </div>
            </div>
            
            <div class="modal fade" id="people" tabindex="-1" role="dialog"
                aria-labelledby="myModalLabel" aria-hidden="true">
                <form class="form-horizontal" role="form"  method="post" action="${ctx}/identifymachine/yichu/${groups}" >
                    <div class="modal-dialog">
                        <div class="modal-content">
                        <input type='hidden' id = "lineprint">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                    aria-hidden="true">&times;</button>
                                <h3 class="modal-title" id="myModalLabel">提示信息</h3>
                            </div>
                            <div class="modal-body" style="text-align: left;">
                                <h3>请拿走玻璃,复位测量台,重新测量!</h3>
                            </div>
                            <div class="modal-footer">
 
                                <button type="button" class="btn btn-default btn-lg"
                                    data-dismiss="modal">取消</button>
 
                                <button type="submit" class="btn btn-primary btn-lg"
                                    id="getsure">确认</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            
            <div class="modal fade" id="delete-fix-info" tabindex="-1" role="dialog"
                aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true" data-backdrop="static">&times;</button>
                            <h3 class="modal-title" id="myModalLabel"
                                style="font-weight: bolder;">破损选择</h3>
                        </div>
                        <form method="post" class="form-horizontal" action="${ctx}/identifymachine/modifyy/${groups}">
                    <div class="modal-body">
                        <div class="control-group">
                            <table class="table table-striped table-hover" style='font-size:20px;'>
                                <tbody>
                                <thead>
                                    <tr>
                                        <th>人工选择</th>
                                        <th>#</th>
                                        <th>高</th>
                                        <th>宽</th>
                                        
                                    </tr>
                                </thead>
                                <c:forEach items="${glassLists}" var="glass" varStatus="status">
                                    <tr>
                                        <td><input type="radio" name="glassid2"
                                            value="${glass.id}" /></td>
                                        <td>${glass.id}</td>
                                        <td>${glass.height}</td>
                                        <td>${glass.width}</td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="submit" class="btn btn-primary">提交</button>
                        <button type="button" class="btn" data-dismiss="modal">关闭</button>
                    </div>
                </form>
                    </div>
                </div>
            </div>
        </section>
        <!-- /.content -->
    </div>
</body>
</html>