Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes
# Conflicts:
# springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
# springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
# springboot-vue3/src/main/java/com/example/springboot/component/PlchomeNew.java
| | |
| | | margin-top: -150px; |
| | | margin-left: -200px; |
| | | } |
| | | |
| | | .cells { |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | <template> |
| | | <el-container> |
| | | <!-- <el-header style="padding: 10px;"></el-header> --> |
| | | <el-main> |
| | | <div class="box" @click="dialogFormVisible2 = true"> |
| | | <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')"> |
| | | <el-table :data="this.alarm" border style="width: 100%;font-size: 25px;"> |
| | | <el-table-column prop="id" :label="$t('id')"></el-table-column> |
| | | <el-table-column prop="content" :label="$t('content')"></el-table-column> |
| | | <el-table-column prop="timeons" :label="$t('timeon')"></el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <div class="box" @click="dialogFormVisible2 = true" style="z-index: 999;"> |
| | | <div class="text"> |
| | | <!-- Alarm: --> |
| | | {{ this.text }} |
| | |
| | | {{ $t('Task queue') }}</el-button> |
| | | |
| | | </div> |
| | | <div style="display: flex;align-items: center;"> |
| | | <div style="display: flex;align-items: center;overflow: hidden;"> |
| | | <div class="blocks" style="position: relative;width: 100%;"> |
| | | <div class="blocks-img" :style="'z-index:999;left:150px;top:555px;'"> |
| | | <div class="blocks-img" :style="'z-index:99;left:150px;top:555px;'"> |
| | | |
| | | </div> |
| | | <div |
| | | :style="'position: absolute;z-index:999;left:271px;top:987px;width:210px;height:38px;background-color:' + ShowDeviceList(0) + ';;'"> |
| | | :style="'position: absolute;z-index:99;left:271px;top:987px;width:210px;height:38px;background-color:' + ShowDeviceList(0) + ';'"> |
| | | </div> |
| | | <div |
| | | :style="'position: absolute;z-index:999;left:553px;top:956px;width:110px;height:74px;background-color:' + ShowDeviceList(0) + ';;'"> |
| | | :style="'position: absolute;z-index:99;left:553px;top:956px;width:110px;height:74px;background-color:' + ShowDeviceList(0) + ';'"> |
| | | </div> |
| | | <div |
| | | :style="'position: absolute;z-index:999;left:800px;top:450px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';;'"> |
| | | :style="'position: absolute;z-index:99;left:800px;top:450px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';'"> |
| | | </div> |
| | | <div |
| | | :style="'position: absolute;z-index:999;left:800px;top:675px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';;'"> |
| | | :style="'position: absolute;z-index:99;left:800px;top:675px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';'"> |
| | | </div> |
| | | <div |
| | | :style="'position: absolute;z-index:999;left:740px;top:930px;width:230px;height:90px;background-color:' + ShowDeviceList(0) + ';;'"> |
| | | <div v-for="item in cagelist1" :key="item['number']"> |
| | | <div v-for="(num) in item['number']" :key="num"> |
| | | 1 |
| | | <div :style="'position: absolute;z-index:1000;left:740px;top:507px;width:230px;height:114px;'"> |
| | | <div v-for="item in cagelist4" :key="item['id']" |
| | | :style="'display:flex;height:4.55px;position: relative;'"> |
| | | <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' + |
| | | ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div :style="'position: absolute;z-index:1000;left:740px;top:730px;width:230px;height:90px;'"> |
| | | <div v-for="item in cagelist3" :key="item['id']" |
| | | :style="'display:flex;height:2.25px;position: relative;'"> |
| | | <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' + |
| | | ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div :style="'position: absolute;z-index:1000;left:740px;top:830px;width:230px;height:90px;'"> |
| | | <div v-for="item in cagelist2" :key="item['id']" |
| | | :style="'display:flex;height:2.25px;position: relative;'"> |
| | | <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' + |
| | | ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div :style="'position: absolute;z-index:1000;left:740px;top:930px;width:230px;height:90px;'"> |
| | | <div v-for="item in cagelist1" :key="item['id']" |
| | | :style="'display:flex;height:2.25px;position: relative;'"> |
| | | <div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' + |
| | | ((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <el-button type="primary" @click="AnewMeasure()" :disabled="SoftEmergencyStopState" |
| | | style="z-index: 999;">重新测量</el-button> |
| | | </div> |
| | | <br> |
| | | <!--显示--> |
| | | <div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;margin: auto auto;"> |
| | | <div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;"> |
| | | <!--玻璃图 #81b337--> |
| | | <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin: auto;position:absolute;width:' |
| | | + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: ' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;background-color: #93d2f3;text-align: center;'"> |
| | | <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:auto auto;position:absolute;width:' |
| | | + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: ' |
| | | + (this.LastQueue.glassheight / 25 * 7) + 'px;background-color: #93d2f3;text-align: center;'"> |
| | | {{ this.LastQueue.glasswidth }}*{{ this.LastQueue.glassheight }} |
| | | </div> |
| | | |
| | |
| | | } |
| | | } |
| | | }, |
| | | //获取设备显示状态 |
| | | ShowCellList(num) { |
| | | if (num == null) { |
| | | return ""; |
| | | } else if (num > 0) { |
| | | return "gray"; |
| | | // return "rgba(0,0,0,1)"; |
| | | } |
| | | }, |
| | | //获取设备玻璃id |
| | | ShowGlassIdList(num) { |
| | | if (this.GlassIdList != null && this.GlassIdList.length > 0) { |
| | |
| | | public class MyGenerator { |
| | | |
| | | /** 数据源配置*/ |
| | | private static final String jdbc = "jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"; |
| | | private static final String jdbc = "jdbc:mysql://192.168.10.99:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"; |
| | | private static final String driverName = "com.mysql.cj.jdbc.Driver"; |
| | | |
| | | private static final String username = "root"; |
| | |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | |
| | | // readAndUpdateWordValues(plcStateObject); |
| | | int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // System.out.println(index); |
| | | PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // System.out.println(PlcMesObject.getPlcParameter("AddStart").getAddress(index)); |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("FeedID"); |
| | | addresses.add("AddStart"); |
| | | // System.out.println(addresses); |
| | | // System.out.println(PlcMesObject.getPlcParameterValues(addresses)); |
| | | List<String> addresses2 = new ArrayList<>(); |
| | | addresses2.add("FeedID"); |
| | | addresses2.add("FeedCarStatus"); |
| | | // int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // // System.out.println(index); |
| | | // PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // // System.out.println(PlcMesObject.getPlcParameter("AddStart").getAddress(index)); |
| | | // List<String> addresses = new ArrayList<>(); |
| | | // addresses.add("FeedID"); |
| | | // addresses.add("AddStart"); |
| | | // // System.out.println(addresses); |
| | | // // System.out.println(PlcMesObject.getPlcParameterValues(addresses)); |
| | | // List<String> addresses2 = new ArrayList<>(); |
| | | // addresses2.add("FeedID"); |
| | | // addresses2.add("FeedCarStatus"); |
| | | |
| | | //System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); |
| | | |
| | |
| | | // \\ TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | // List<Short> ss= S7control.getinstance().ReadWord("DB14.0", 1); |
| | | // System.out.println(ss); |
| | | // System.out.println(111111); |
| | | // List<Short> E0sss1id = S7control.getinstance().ReadWord("DB14.0",1); |
| | | // String E01id = S7control.getinstance().readStrings("DB14.38"); |
| | | // System.out.println(E01id); |
| | | // if (S7control.getinstance().CheckCsonnected() == false) { |
| | | List<Short> E0sss1id = S7control.getinstance().ReadWord("DB14.206",1); |
| | | //List<String> st= S7control.getinstance().readStrings("DB14.206"); |
| | | byte[] E0sss1ids = S7control.getinstance().ReadByte("DB14.206",2); |
| | | byte[] E0sss1idss = S7control.getinstance().ReadByte("DB14.0",210); |
| | | |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianServiceNew.class); |
| | | albaniaMapper = WebSocketServer.applicationContext.getBean(AlbaniaMapper.class); |
| | | //spianService.selectAll(albaniaMapper.SelectGlass()); |
| | |
| | | |
| | | |
| | | //一号线请求 |
| | | if (ExportTOMES1.equals("1") == true&&B01State.equals("0")==true) { |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | spianService.selectout(1); |
| | | } |
| | | //二线号请求时 |
| | | if (ExportToMES2.equals("1") == true&&B01State.equals("0")==true) { |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | spianService.selectout(2); |
| | | } |
| | | // if (ExportTOMES1.equals("1") == true&&B01State.equals("0")==true) { |
| | | // //将运输车状态改为忙碌 |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | // spianService.selectout(1); |
| | | // } |
| | | // //二线号请求时 |
| | | // if (ExportToMES2.equals("1") == true&&B01State.equals("0")==true) { |
| | | // //将运输车状态改为忙碌 |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | // spianService.selectout(2); |
| | | // } |
| | | //进片请求时 |
| | | if(PLCToMES!=null && B01State!=null){ |
| | | if(PLCToMES.equals("1")==true&&B01State.equals("0")==true){ |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | |
| | | spianService.selectAll(albaniaMapper.SelectGlass()); |
| | | } |
| | | |
| | | |
| | | |
| | | //任务完成时 |
| | | if(TastState.equals("1")==true){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 查询数据库 |
| | | // 推送到前端 |
| | |
| | | //读取DB105区文件 |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | |
| | | //String PlcRequest=plcmes.getPlcParameter("GaToMES").getValue();//请求 |
| | | //String MesSend=plcmes.getPlcParameter("MESToGaStatus").getValue();//发送 |
| | | //double width=plcmes.getPlcParameter("Height").getValue();//宽 |
| | | //double height=plcmes.getPlcParameter("width").getValue();//高 |
| | | // String PlcRequest=plcmes.getPlcParameter("GaToMES").getValue();//请求 |
| | | // String MesSend=plcmes.getPlcParameter("MESToGaStatus").getValue();//发送 |
| | | // double width=Double.valueOf(plcmes.getPlcParameter("Height").getValue());//宽 |
| | | // double height=Double.valueOf(plcmes.getPlcParameter("width").getValue());//高 |
| | | |
| | | // String PlcRequest=S7control.getinstance().ReadWord("DB14.26", 1).get(0)+""; |
| | | // double width=Double.parseDouble(S7control.getinstance().ReadWord("DB14.28", 1).get(0)+""); |
| | | // double height=Double.parseDouble(S7control.getinstance().ReadWord("DB14.30", 1).get(0)+""); |
| | | // String MesSend=S7control.getinstance().ReadWord("DB14.170", 1).get(0)+""; |
| | | |
| | | //获取测量的长,宽 |
| | | |
| | | |
| | | //String url="C:\\Users\\SNG-ZDH-012\\Desktop\\阿尔巴尼亚数据要求.xlsx";E:\ |
| | | //String url="E:\\阿尔巴尼亚数据要求.xlsx"; |
| | | // List result= HomeService.ReadExecl(url); |
| | | // for(int i=0;i<result.size();i++){ |
| | | // System.out.println(result.get(i)); |
| | | // } |
| | | |
| | | |
| | | |
| | | boolean istest = false; |
| | | String PlcRequest = "1"; |
| | | String MesSend = "0"; |
| | | double width = 402; |
| | | double height = 402; |
| | | |
| | | //匹配 |
| | | //System.err.println(PlcRequest+","+MesSend+","+width+","+height); |
| | | if ("0".equals(PlcRequest)&&istest) { |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 0); |
| | | } |
| | | if ("1".equals(PlcRequest)&&"0".equals(MesSend)) { |
| | | GlassInfo MesureGlassinfo=HomeService.Normal(width, height, "1"); |
| | | boolean is=HomeService.Normal(width, height, "1"); |
| | | if (is&&istest) { |
| | | // 测量成功 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | |
| | | }else if(istest){ |
| | | // 重新测量 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 4); |
| | | } |
| | | |
| | | } |
| | | Queue LastQueue= QueueMapper.selectLastQueue(); |
| | | // String E01id = new String( S7controlLK.getinstance().ReadByte("DB17.0",16)); |
| | |
| | | List<StorageTask> StoragTaskeTaskOut = storageCageService.SelectStorageTask(1); |
| | | jsonObject.append("StoragTaskeTaskOut", StoragTaskeTaskOut); |
| | | |
| | | //查询当前订单任务 |
| | | // //查询当前订单任务 |
| | | List<FlowCard> OrderTask = storageCageService.SelectOrderTask(); |
| | | jsonObject.append("OrderTask", OrderTask); |
| | | |
| | |
| | | } |
| | | return addresslist; |
| | | } |
| | | |
| | | public void writeString(String addr,String data) { |
| | | s7PLC.writeString(addr,data); |
| | | } |
| | | |
| | | public String readStrings(String addr) { |
| | | return s7PLC.readString(addr); |
| | | } |
| | |
| | | // TODO Auto-generated method stub |
| | | // |
| | | System.out.println("启动完成"); |
| | | // new PLCAutoMes().start(); |
| | | //new PLCAutoMes().start(); |
| | | // new PlcHold().start(); |
| | | // new PlcHoldNew().start(); |
| | | //new PlcHoldNew().start(); |
| | | |
| | | new Plchome().start(); |
| | | // new PlcLayout().start(); |
| | |
| | | } |
| | | if (addressLength == 14 ) { |
| | | int wordindex = index; |
| | | int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex +"-" + newIndex; |
| | | //int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex ; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | @Update("UPDATE `albania`.`storage_cage` SET `glass_id` =#{glassid}, `width` =width-#{glasswidth}, `glasswidth` =#{glasswidth}, `glassheight` =#{glassheight}, `glasswidthmm` =#{glasswidthmm}, `glassheightmm` = #{glassheightmm}, `state` = #{state}, `glasstype` = #{glasstype}, `number` = #{number} WHERE `id` =#{id};") |
| | | void AddCage(int id,String glassid,Double glasswidth,Double glassheight,Double glasswidthmm,Double glassheightmm,int state,int glasstype,int number); |
| | | //获取进片数据 |
| | | @Select("select glassid,flowcard,glasswidth as width,glassheight as height,glasswidthmm,glassheightmm,glasstype from queue where state=0 limit 1") |
| | | @Select("select glassid,flowcard,glasswidth as width,glassheight as height,glasswidthmm,glassheightmm,glasstype from queue where state=1 limit 1") |
| | | GlassInfo SelectGlass(); |
| | | //一号线查询任务 |
| | | @Select("select * from v_cagerelease1 where mateid not in(select mateid from v_cagerelease1 where surplus=0 group by mateid);") |
| | |
| | | "values (null,null,null,null,null,null,#{glasswidthmm},#{glassheightmm},null,#{state},NOW())") |
| | | void insertMatchFailure(@Param("glasswidthmm") double glasswidthmm, @Param("glassheightmm") double glassheightmm,@Param("state") int state); |
| | | |
| | | @Delete("delete from queue where state<=0") |
| | | void DeleteErrorQueue(); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | // 匹配逻辑 |
| | | public GlassInfo Normal(double width, double height, String line) { |
| | | public boolean Normal(double width, double height, String line) { |
| | | List<Queue> ErrowQueues= QueueMapper.selectErrorQueues(); |
| | | if (ErrowQueues.size()>0) { |
| | | //System.out.println("有匹配失败数据未去除"); |
| | | return new GlassInfo(); |
| | | return false; |
| | | } |
| | | List<GlassInfo> Result = NormalGlassInfo(width, height, "1"); |
| | | if (Result.size() == 1) { |
| | |
| | | GlassInfoMapper.updatemeasurenumber(GlassInfo.getId()); |
| | | System.out.println("匹配成功"); |
| | | System.out.println(GlassInfo.getGlassid()); |
| | | return GlassInfo; |
| | | return true; |
| | | } else if (Result.size() > 1) { |
| | | // 匹配失败 匹配到多条符合的数据 添加数据 |
| | | QueueMapper.insertMatchFailure(width, height, 0); |
| | |
| | | QueueMapper.insertMatchFailure(width, height, -1); |
| | | System.out.println("未找到符合的数据"); |
| | | } |
| | | return new GlassInfo(); |
| | | return false; |
| | | } |
| | | |
| | | // Execl表格 传入文件路径 |
| | |
| | | //如果有同类型时直接增加 |
| | | if(cageid!=Integer.MIN_VALUE){ |
| | | //发送plc任务 |
| | | Mestast(glassid, 1001, cageid, 1,"MESID1"); |
| | | //任务发送字 |
| | | //Mestast(glassid,1001,cageid,1); |
| | | |
| | | }else{ |
| | |
| | | } |
| | | //当返回的格子号为空时,返回400笼子已满 |
| | | if(cageid!=Integer.MIN_VALUE){ |
| | | Mestast(glassid,1001,cageid,1); |
| | | Mestast(glassid,1001,cageid,1,"MESID1"); |
| | | //发送plc任务 |
| | | |
| | | }else{ |
| | |
| | | |
| | | StorageCage glass= albaniaMapper.SelectCageGlass(glasstype); |
| | | //发送配片数据 |
| | | Mestast(glassmate.getGlasstype()+"i", glass.getId(),2002, 0); |
| | | Mestast(glassmate.getGlasstype()+"i", glass.getId(),2002, 0,"MESID1"); |
| | | albaniaMapper.AddFinishNumber(flowcard, mateid, tier); |
| | | albaniaMapper.Inserttask(1, 0, glass.getId(), 2002, glassmate.getGlassid()+i, glasstype,glass.getFlowcard(),mateid,tier); |
| | | if(tier==sumid){ |
| | |
| | | glassidlist.add((byte) iditem); |
| | | } |
| | | byte[] bytes = Bytes.toArray(glassidlist); |
| | | //writeString |
| | | System.out.println("outmesidbytes:" + bytes.length); |
| | | S7control.getinstance().WriteByte(plcmes.getPlcParameter(address).getAddress(),bytes); |
| | | System.out.println(plcmes.getPlcParameter(address).getAddress()); |
| | | System.out.println(); |
| | | |
| | | //S7control.getinstance().WriteByte(plcmes.getPlcParameter(address).getAddress(),bytes); |
| | | //S7control.getinstance().WriteByte(address, bytes);// 派发出片id |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | //下发理片任务 |
| | | public void Mestast(String glassid,int MESToPLCStart1,int MESToPLCTarget1,int MESToPLC) { |
| | | outmesid(glassid, "MESID1");//下发玻璃id |
| | | public void Mestast(String glassid,int MESToPLCStart1,int MESToPLCTarget1,int MESToPLC,String address) { |
| | | //outmesid(glassid, "MESID1");//下发玻璃id |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter(address).getAddress(),glassid); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCStart1").getAddress(), (short) MESToPLCStart1);//起始位置 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCTarget1").getAddress(), (short) MESToPLCTarget1);//目标位置 |
| | | if(MESToPLC!=0){ |
| | |
| | | import com.example.springboot.entity.StorageTask; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | import com.example.springboot.mapper.QueueMapper; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | |
| | | @Service |
| | |
| | | |
| | | @Autowired |
| | | private OutSliceServive outSliceServive; |
| | | |
| | | @Autowired |
| | | private QueueMapper QueueMapper; |
| | | |
| | | @Autowired |
| | | private SpianService spianService; |
| | |
| | | // 查询订单任务 |
| | | public List<FlowCard> SelectOrderTask() { |
| | | List<FlowCard> OrderTask = homeMapper.SelectOrderTask(); |
| | | for (FlowCard flowcard : OrderTask) { |
| | | flowcard.setglassinfo(homeMapper.SelectOrderView(flowcard.getFlowcard())); |
| | | } |
| | | // for (FlowCard flowcard : OrderTask) { |
| | | // flowcard.setglassinfo(homeMapper.SelectOrderView(flowcard.getFlowcard())); |
| | | // } |
| | | return OrderTask; |
| | | } |
| | | |
| | |
| | | // 读取DB105区文件 |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | // 移除 |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), |
| | | // (short) 3); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 3); |
| | | //删除数据 |
| | | QueueMapper.DeleteErrorQueue(); |
| | | |
| | | // plcmes.getPlcParameter("GaToMES").setValue("3"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | |
| | | // 读取DB105区文件 |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | // 重新测量 |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), |
| | | // (short) 2); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 2); |
| | | //删除数据 |
| | | QueueMapper.DeleteErrorQueue(); |
| | | // plcmes.getPlcParameter("GaToMES").setValue("2"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | |
| | | glasstype = Integer.valueOf(value); |
| | | } |
| | | homeMapper.AddGlassinfo(map.get("order").toString(), glasstype, |
| | | Integer.parseInt(map.get("glasstype").toString()) // 需要计算 配片ID |
| | | Integer.parseInt(map.get("matching").toString()) // 需要计算 配片ID |
| | | , glasstype+"" // 需要计算 玻璃ID |
| | | , Integer.parseInt(map.get("tier").toString()), map.get("films").toString(), |
| | | Double.parseDouble(map.get("base").toString()), Double.parseDouble(map.get("height").toString()), |
| | |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MainControl", |
| | | "addressIndex":"208", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | } |
| | | ] |
| | | } |
| | |
| | | #\u6570\u636E\u5E93\u9A71\u52A8 |
| | | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver |
| | | #\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740 |
| | | #spring.datasource.url=jdbc:mysql://localhost:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai |
| | | spring.datasource.url=jdbc:mysql://10.153.19.150:3306/albania?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai |
| | | #\u6570\u636E\u5E93\u7528\u6237\u540D |
| | | spring.datasource.username=root |