| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param param |
| | | * @return |
| | | */ |
| | | // public String noticeWeightDone(ApiInoutData param) { |
| | | // //获取称重主控器配置 |
| | | // InoutConf conf = getWeightGateway(param.getCompanyId(), param.getDeptId(), param.getSort()); |
| | | // |
| | | // if (null == conf) { |
| | | // return "称重主控未配置,支持失败"; |
| | | // } |
| | | // |
| | | // ApiInoutData apiData = new ApiInoutData(conf); |
| | | // apiData.setPlateNum(param.getPlateNum()); |
| | | // apiData.setTime(new Date()); |
| | | // |
| | | // ApiInoutService inoutApiService = apiInoutManager.getApiService(conf.getProtocol()); |
| | | // |
| | | // // return inoutApiService.noticeWeightDone(apiData); TODO |
| | | // return null; |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * 出入库抓拍 |
| | |
| | | req.setPlayType(conf.getPlayType()); |
| | | req.setSerSn(null == snapSer ? null : snapSer.getSn()); |
| | | req.setBizId(param.getBizId()); |
| | | //若为出入库称重抓拍,则不传递业务主键。在出入库业务提交时保存文件信息 |
| | | if(InoutConstant.PROGRESS_WEIGHT_TAG.equals(conf.getInoutProgress())){ |
| | | req.setBizId(null); |
| | | } |
| | | req.setCameraName(conf.getName()); |
| | | |
| | | req.setMediaAddr(CameraUtil.updateMediaAddr(conf.getMediaAddr(), conf.getLoginId(), |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * @Desc: 获取称重网关设备 |
| | | * @author: Andy |
| | | * @update-time: 2022/11/26 |
| | | */ |
| | | public InoutConf getLedConf(String companyId, String deptId, String sort) { |
| | | if (null == sort) sort = "1"; |
| | | List<InoutConf> list = inoutCommonService.getCacheInoutConf(companyId, deptId); |
| | | if (null == list || list.isEmpty()) return null; |
| | | |
| | | for (InoutConf conf : list) { |
| | | if (InoutConstant.CONF_TYPE_40.equals(conf.getType()) && sort.equals(conf.getSort())) { |
| | | return conf; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 被动收到车牌识别结果,事件 |
| | |
| | | */ |
| | | @Async |
| | | public void onInoutWeight(InoutData data, String curProgress, String nextProgress) { |
| | | ApiInoutData apiData; |
| | | //通知化验屏 |
| | | //获取LED屏配置信息 |
| | | InoutConf ledConf = this.getLedConf(data.getCompanyId(), data.getDeptId(), null); |
| | | if(null != ledConf){ |
| | | apiData = new ApiInoutData(ledConf); |
| | | apiData.setTime(new Date()); |
| | | apiData.setDeviceCode(InoutApiConstant.DEVICE_CODE_6001); |
| | | ApiInoutService inoutApiService = apiInoutManager.getApiService(ledConf.getProtocol()); |
| | | inoutApiService.noticeLed(apiData, data); |
| | | } |
| | | |
| | | //获取地磅控制器 |
| | | InoutConf conf = this.getWeightGateway(data.getCompanyId(), data.getDeptId(), null); |
| | | if (null == conf) { |
| | |
| | | } |
| | | |
| | | //1、通知称重显示屏,设备编号6001 |
| | | ApiInoutData apiData = new ApiInoutData(conf); |
| | | apiData = new ApiInoutData(conf); |
| | | apiData.setTime(new Date()); |
| | | apiData.setDeviceCode(InoutApiConstant.DEVICE_CODE_6001); |
| | | ApiInoutService inoutApiService = apiInoutManager.getApiService(conf.getProtocol()); |