| | |
| | | staProtocol.setPakMk(true); |
| | | } |
| | | |
| | | //20230110,日志打印,确认收到入库站可入信号时,对应条码数据是否已有 |
| | | if ((siteId==101 || siteId==109 || siteId==117 || siteId==201 || siteId==207 || siteId==213) |
| | | && staProtocol.isInEnable()){ |
| | | Integer barcodeId = 0; |
| | | switch (siteId){ |
| | | case 101: |
| | | barcodeId=1; |
| | | break; |
| | | case 109: |
| | | barcodeId=2; |
| | | break; |
| | | case 117: |
| | | barcodeId=3; |
| | | break; |
| | | case 201: |
| | | barcodeId=4; |
| | | break; |
| | | case 207: |
| | | barcodeId=5; |
| | | break; |
| | | case 213: |
| | | barcodeId=6; |
| | | break; |
| | | } |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId); |
| | | if(barcodeThread!=null){ |
| | | log.info("{}站有可入信号时,条码值为{}", siteId, barcodeThread.getBarcode()); |
| | | if(Cools.isEmpty(barcodeThread.getBarcode())){ |
| | | staProtocol.setInEnable(false);//条码数据为空时,先清一次内存的站点可入信号,等待下一次获取可入信号 |
| | | } |
| | | } |
| | | if (staProtocol.getStamp()>=2 && !staProtocol.isLoading()){ |
| | | staProtocol.setStamp(0); |
| | | }else if (staProtocol.getStamp()<2 && staProtocol.isLoading()){ |
| | | //lfd入库印记 当stamp>=2时才入库 |
| | | staProtocol.setStamp(staProtocol.getStamp()+1); |
| | | } |
| | | |
| | | // //20230110,日志打印,确认收到入库站可入信号时,对应条码数据是否已有 |
| | | // if ((siteId==101 || siteId==109 || siteId==117 || siteId==201 || siteId==207 || siteId==213) |
| | | // && staProtocol.isInEnable()){ |
| | | // Integer barcodeId = 0; |
| | | // switch (siteId){ |
| | | // case 101: |
| | | // barcodeId=1; |
| | | // break; |
| | | // case 109: |
| | | // barcodeId=2; |
| | | // break; |
| | | // case 117: |
| | | // barcodeId=3; |
| | | // break; |
| | | // case 201: |
| | | // barcodeId=4; |
| | | // break; |
| | | // case 207: |
| | | // barcodeId=5; |
| | | // break; |
| | | // case 213: |
| | | // barcodeId=6; |
| | | // break; |
| | | // } |
| | | // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcodeId); |
| | | // if(barcodeThread!=null){ |
| | | // //lfd入库印记 当stamp>=2时才入库 |
| | | // staProtocol.setStamp(staProtocol.getStamp()+1); |
| | | // log.info("{}站有可入信号时,条码值为{}", siteId, barcodeThread.getBarcode()); |
| | | // if(Cools.isEmpty(barcodeThread.getBarcode())){ |
| | | // staProtocol.setInEnable(false);//条码数据为空时,先清一次内存的站点可入信号,等待下一次获取可入信号 |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | |