| | |
| | | // @Select("select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC") |
| | | WrkMast selectPakInStep1(@Param("sourceStaNo")Integer sourceStaNo, @Param("barcode")String barcode); |
| | | |
| | | WrkMast selectPakInStep111(@Param("sourceStaNo")Integer sourceStaNo, @Param("barcode")String barcode); |
| | | |
| | | WrkMast selectPakInStep11(@Param("sourceStaNo")Integer sourceStaNo); |
| | | |
| | | // 入库第二步,当托盘物料在堆垛机入库站时时查询 |
| | |
| | | // 判断重复工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); |
| | | if (wrkMast != null) { |
| | | log.error("工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo()); |
| | | continue; |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo()); |
| | | staProtocol.setStaNo(wrkMast.getStaNo()); |
| | | |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | throw new CoolException("更新plc站点信息失败"); |
| | | } |
| | | return; |
| | | } |
| | | // // 获取入库通知档 |
| | | // List<WaitPakin> waitPakins = waitPakinMapper.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode).eq("io_status", "N")); |
| | |
| | | // throw new CoolException("更新plc站点信息失败"); |
| | | // } |
| | | continue; |
| | | } |
| | | |
| | | // 判断重复工作档 |
| | | WrkMast wrkMast111 = wrkMastMapper.selectPakInStep111(inSta.getStaNo(), barcode); |
| | | if (wrkMast111 != null) { |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNo(wrkMast111.getWrkNo()); |
| | | staProtocol.setStaNo(wrkMast111.getStaNo()); |
| | | |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | throw new CoolException("更新plc站点信息失败"); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | // 判断重复工作档 |
| | |
| | | // } |
| | | continue; |
| | | } |
| | | |
| | | // |
| | | // // 判断重复工作档 |
| | | // WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); |
| | | // if (wrkMast != null) { |
| | | // log.error("工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo()); |
| | | // continue; |
| | | // } |
| | | // 判断重复工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); |
| | | if (wrkMast != null) { |
| | | log.error("工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo()); |
| | | continue; |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo()); |
| | | staProtocol.setStaNo(wrkMast.getStaNo()); |
| | | |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | throw new CoolException("更新plc站点信息失败"); |
| | | } |
| | | return; |
| | | } |
| | | // // 获取入库通知档 |
| | | // List<WaitPakin> waitPakins = waitPakinMapper.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode).eq("io_status", "N")); |
| | |
| | | /** |
| | | * 条码数量 |
| | | */ |
| | | private int barcodeSize = 5; |
| | | private int barcodeSize = 9; |
| | | |
| | | /** |
| | | * 入出库模式 |
| | |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB101.2440",(short)(barcodeSize*8)); |
| | | if (result2.IsSuccess) { |
| | | int[] staNosRgv = {281,292,173,214,120}; |
| | | int[] staNosRgv = {281,292,173,214,120,100,101,102,103}; |
| | | |
| | | for (int i = 0; i < barcodeSize; i++) { //1:281 2:292 3:174(173) 4:214 5:120 |
| | | String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8"); |
| | |
| | | # 大料箱 双工位单伸 入库口1 |
| | | inLargeSta[0]: |
| | | staNo: 292 |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | # 大料箱 双工位单伸 入库口1 |
| | | inLargeSta[1]: |
| | | staNo: 281 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | # 大料箱 双工位单伸 空板入库口1 |
| | | emptyInLargeSta[0]: |
| | | staNo: 292 |
| | |
| | | # 入库口1 |
| | | inSta[0]: |
| | | staNo: 460 |
| | | barcode: ${wcs-slave.barcode[3].id} |
| | | # 入库口2 |
| | | inSta[1]: |
| | | staNo: 453 |
| | | barcode: ${wcs-slave.barcode[4].id} |
| | | # 入硫化罐RGV |
| | | enterRgv[0]: |
| | | rgvNo: 623 |
| | |
| | | id: 5 |
| | | ip: 10.10.10.52 |
| | | port: 51236 |
| | | # 条码扫描仪 |
| | | barcode[5]: |
| | | id: 6 |
| | | ip: 10.10.10.52 |
| | | port: 51236 |
| | | # 条码扫描仪 |
| | | barcode[6]: |
| | | id: 7 |
| | | ip: 10.10.10.52 |
| | | port: 51236 |
| | | # 条码扫描仪 |
| | | barcode[7]: |
| | | id: 8 |
| | | ip: 10.10.10.52 |
| | | port: 51236 |
| | | # 条码扫描仪 |
| | | barcode[8]: |
| | | id: 9 |
| | | ip: 10.10.10.52 |
| | | port: 51236 |
| | | # LED1 |
| | | led[0]: |
| | | id: 1 |
| | |
| | | select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC |
| | | </select> |
| | | |
| | | <select id="selectPakInStep111" resultMap="BaseResultMap"> |
| | | select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and barcode=#{barcode} and ((io_type=202 and wrk_sts=51) or (io_type=1 and wrk_sts=2)) order by io_pri desc,io_time,wrk_no ASC |
| | | </select> |
| | | |
| | | <select id="selectPakInStep11" resultMap="BaseResultMap"> |
| | | select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=1 and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC |
| | | </select> |