| | |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.News; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import com.zy.core.enums.StationCommandType; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.StationObjModel; |
| | |
| | | } |
| | | |
| | | // 条码扫描器 |
| | | OperateResultExOne<byte[]> result2 = siemensNet.Read("DB101.0", (short) (barcodeOriginList.size() * 16)); |
| | | OperateResultExOne<byte[]> result2 = siemensNet.Read("DB101.16", (short) (barcodeOriginList.size() * 16)); |
| | | if (result2.IsSuccess) { |
| | | for (int i = 0; i < barcodeOriginList.size(); i++) { |
| | | ZyStationStatusEntity barcodeEntity = findStatusEntityByBarcodeIdx(i + 1); |
| | |
| | | } |
| | | |
| | | // 称重 |
| | | OperateResultExOne<byte[]> result3 = siemensNet.Read("DB102.0", (short) (barcodeOriginList.size() * 4)); |
| | | OperateResultExOne<byte[]> result3 = siemensNet.Read("DB102.4", (short) (barcodeOriginList.size() * 4)); |
| | | if (result3.IsSuccess) { |
| | | for (int i = 0; i < barcodeOriginList.size(); i++) { |
| | | ZyStationStatusEntity barcodeEntity = findStatusEntityByBarcodeIdx(i + 1); |
| | |
| | | } |
| | | |
| | | // 报警信息 |
| | | OperateResultExOne<byte[]> result4 = siemensNet.Read("DB103.0", (short) (barcodeOriginList.size() * 2)); |
| | | OperateResultExOne<byte[]> result4 = siemensNet.Read("DB103.2", (short) (barcodeOriginList.size() * 2)); |
| | | if (result4.IsSuccess) { |
| | | for (int i = 0; i < barcodeOriginList.size(); i++) { |
| | | ZyStationStatusEntity barcodeEntity = findStatusEntityByBarcodeIdx(i + 1); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public CommandResponse sendOriginCommand(String address, short[] data) { |
| | | public synchronized CommandResponse sendOriginCommand(String address, short[] data) { |
| | | CommandResponse commandResponse = new CommandResponse(false); |
| | | if (null == data || data.length == 0) { |
| | | commandResponse.setMessage("数据为空"); |