严智鑫
2025-05-23 1d8bdfc12ad07ac2632b9edd42256624d956fea8
1.配方页面修改
2.仓储交互逻辑修改
3.配置最大连接数改成50
5个文件已修改
77 ■■■■ 已修改文件
gmms/WebContent/bigScreen/peifangchaxun.jsp 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
nglib/bin/druid.properties 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
nglib/src/builder/HttpApi.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
nglib/src/druid.properties 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
nglib/src/ng/devices/MysqlService.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gmms/WebContent/bigScreen/peifangchaxun.jsp
@@ -55,31 +55,35 @@
        </section>
    
    <div id = "allstatu" ></div>
           <div id = "info" ></div>
           <div id = "info" style="height:3%;" >
               <input style="display:none" type="text" name="groups" value="${groups}" />
           </div>
        <!-- Main content -->
            <input style="display:none" type="text" name="groups" value="${groups}" />
        <section class="content container-fluid" style="padding: 0px;">
            <div>
            </div>
            
            <div class="box" style="height: 600px; overflow: auto;margin-top: 10px;">
        <section class="content container-fluid" style="padding: 0px;">
            <div class="box" style="height:90%; overflow: auto;margin-top: 10px;">
                    <table class="table table-striped table-hover"
                        style="overflow-x: auto;font-size: 12px;">
                        <thead>
                        <thead style="font-size: 22px;font-weight: bold;">
                            <tr>
                                <th>设备ID</th>
                                <th>设备名称</th>
                                <th>设备IP</th>
                                <th>当前配方</th>
                                <th>当前配方更新时间</th>
                                <th>MES发送配方</th>
                                <th>MES发送配方更新时间</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item, index) in shuzu" :key="index" style="height: 51px;">
                                <td>{{item['0_id']}}</td>
                                <td>{{item['1_machine_name']}}</td>
                                <td style="font-size: 18px;font-weight: bold;">{{item['1_machine_name']}}</td>
                                <td>{{item['2_ip_address']}}</td>
                                <td style="font-weight: bold; font-size: 18px">{{item['3_content_value']}}</td>
                                <td style="font-size: 18px">{{item['4_finsh_time']}}</td>
                                <td style="font-weight: bold; font-size: 18px">{{item['5_content_value2']}}</td>
                                <td style="font-size: 18px">{{item['6_finsh_time2']}}</td>
                                </td>
                            </tr>
                        </tbody>
nglib/bin/druid.properties
@@ -3,9 +3,9 @@
username=root
password=beibo.123/
#初始化时池中建立的物理连接个数
#��ʼ��ʱ���н������������Ӹ���
initialSize=10
#最大的可活跃的连接池数量
maxActive=20
#获取连接时最大等待时间,单位毫秒,超过连接就会失效
#���Ŀɻ�Ծ�����ӳ�����
maxActive=50
#��ȡ����ʱ���ȴ�ʱ�䣬��λ���룬�������Ӿͻ�ʧЧ
maxWait=3000
nglib/src/builder/HttpApi.java
@@ -67,21 +67,25 @@
                String color=set.getString(7);//订单原片膜系
                if(not_completed>0){  //有未完成的原片任务
                    JSONObject thisShelfTask = HttpApi.thisShelfTaskApi();//查询仓储当前任务
                    JSONObject jsonObject=new JSONObject();
                    jsonObject.put("thickness", thickness);
                    jsonObject.put("width", largeglass_length);
                    jsonObject.put("height", largeglass_width);
                    jsonObject.put("sameCount", not_completed);
                    jsonObject.put("glassType", color);
                    if (thisShelfTask != null) {
                        double width_shelf = Double.valueOf(thisShelfTask.get("width").toString());
                        double height_shelf = Double.valueOf(thisShelfTask.get("height").toString());
                        int thickness_shelf = Integer.valueOf(thisShelfTask.get("thickness").toString());
                        int sameCount_shelf = Integer.valueOf(thisShelfTask.get("sameCount").toString());
                        String glassType_shelf = thisShelfTask.get("glass_type").toString();
                        String glassType_shelf = thisShelfTask.get("glassType").toString();
                        if(largeglass_length!=width_shelf||largeglass_width!=height_shelf||thickness!=thickness_shelf||!color.equals(glassType_shelf)||sameCount_shelf==0){
                            JSONObject jsonObject=new JSONObject();
                            jsonObject.put("thickness", thickness);
                            jsonObject.put("width", largeglass_length);
                            jsonObject.put("height", largeglass_width);
                            jsonObject.put("sameCount", not_completed);
                            jsonObject.put("glassType", color);
                            JSONObject shelfJosn=shelfTaskApi(jsonObject);
                        }
                        return true;
                    }else{
                        JSONObject shelfJosn=shelfTaskApi(jsonObject);
                        return false;
                    }
                }
@@ -115,7 +119,12 @@
        try {
            String requestURL="http://"+Ip+":5000/GlassInfo";
            JSONObject resultJSON= httpApi(requestURL,"GET",null);
            return resultJSON;
            JSONArray jsonArray=resultJSON.getJSONArray("data");
            if(jsonArray.size()>0){
                JSONObject thisShelfJson=jsonArray.getJSONObject(0);
                return thisShelfJson;
            }
            return null;
        } catch (Exception e) {
            // TODO: handle exception
            System.out.println("HTTP ERROR:http://39.105.110.179:5000/GlassInfo  GET");
nglib/src/druid.properties
@@ -3,9 +3,9 @@
username=root
password=beibo.123/
#初始化时池中建立的物理连接个数
#��ʼ��ʱ���н������������Ӹ���
initialSize=10
#最大的可活跃的连接池数量
maxActive=20
#获取连接时最大等待时间,单位毫秒,超过连接就会失效
#���Ŀɻ�Ծ�����ӳ�����
maxActive=50
#��ȡ����ʱ���ȴ�ʱ�䣬��λ���룬�������Ӿͻ�ʧЧ
maxWait=3000
nglib/src/ng/devices/MysqlService.java
@@ -117,6 +117,7 @@
                sn=this.db.createSession(false);
                Connection con= sn.getConnection();
                JSONObject jSONObject=HttpApi.selectLoadRack();
                boolean isSuccess=HttpApi.sendShelfTask();
//                JSONObject jSONObject=new JSONObject();
//                jSONObject.put("thickness", "4");
//                jSONObject.put("width", "3660");
@@ -135,6 +136,7 @@
                    sameCount_load = Integer.valueOf(jSONObject.get("sameCount").toString());
                    glassType =jSONObject.get("glassType").toString();
                }
                //System.out.println(width_load+","+height_load+","+thickness_load+","+sameCount_load+","+glassType);
                //调用那个存储过程
                CallableStatement sql=con.prepareCall("{call Total_method_load(?,?,?,?,?,?,?,?,?)}");
                sql.registerOutParameter(8, java.sql.Types.VARCHAR);
@@ -148,23 +150,15 @@
                sql.setString(7, glassType );
                sql.execute();
                //读取返回参数
                //System.out.println("result:"+result);
                result= sql.getString(8);
                flag= sql.getString(9);//1 表示任务完成数量减一
                if ("1".equals(flag) ){
                    //减少上片数量
                    JSONObject b=HttpApi.loadRackReduction();
                    boolean isSuccess=HttpApi.sendShelfTask();
//                        for (int i=0;i<1;){
//                            JSONObject loadRackReductionJson=HttpApi.loadRackReduction();
//                            if ("true".equals(loadRackReductionJson.get("success").toString())){
//                                //调用成功
//                                i++;
//                                break;
//                            }
//                        }
                }else if("3".equals(flag) ){
                    boolean isSuccess=HttpApi.sendShelfTask();
                }
            }catch(Exception e){
                e.printStackTrace();