| | |
| | | List<GlassInfo> Results = new ArrayList<GlassInfo>(); |
| | | // 获取匹配设置 |
| | | MeasureSetting MeasureSetting = MeasureSettingMapper.SelectMeasureSetting(line); |
| | | |
| | | if (height > 0 && width > 0 && MeasureSetting != null) { |
| | | // 有效参数 请求=1 长/宽>0 |
| | | double maxheight = height + MeasureSetting.getErrorHeight(); |
| | | double minheight = height - MeasureSetting.getErrorHeight(); |
| | | double maxwidth = width + MeasureSetting.getErrorWidth(); |
| | | double minwidth = width - MeasureSetting.getErrorWidth(); |
| | | // 查询当前测量数据 |
| | | List<GlassInfo> GlassInfos = GlassInfoMapper.selectGlassInfos(maxwidth, minwidth, maxheight, minheight); |
| | | Integer Thickness = MeasureSetting.getThickness(); |
| | | String Films = MeasureSetting.getFilms(); |
| | | // 查询当前测量数据 |
| | | List<GlassInfo> GlassInfos = GlassInfoMapper.selectGlassInfos(maxwidth, minwidth, maxheight, minheight,Thickness,Films); |
| | | if(Thickness==0||Films==""){ |
| | | System.out.println("厚度"+Thickness+"膜"+Films); |
| | | return null; |
| | | } |
| | | List types = new ArrayList<>(); |
| | | for (int i = 0; i < GlassInfos.size(); i++) { |
| | | Integer glasstype = GlassInfos.get(i).getGlasstype(); |
| | |
| | | public boolean Normal(double width, double height, String line) { |
| | | List<Queue> ErrowQueues= QueueMapper.selectErrorQueues(); |
| | | if (ErrowQueues.size()>0) { |
| | | //System.out.println("有匹配失败数据未去除"); |
| | | System.out.println("有匹配失败数据未去除"); |
| | | return false; |
| | | } |
| | | //查询当前领取的任务 |
| | | List<GlassInfo> Result = NormalGlassInfo(width, height, "1"); |
| | | System.out.println("Result:"+Result); |
| | | if (Result.size() == 1) { |
| | | // 匹配成功 就一种类型 添加数据 |
| | | GlassInfo GlassInfo = Result.get(0); |
| | | QueueMapper.insert(GlassInfo.getGlassid(), width, height, 1); |
| | | int insertCount=QueueMapper.insert(GlassInfo.getId(), width, height, 1); |
| | | GlassInfoMapper.updatemeasurenumber(GlassInfo.getId()); |
| | | |
| | | System.out.println("添加条数:"+insertCount); |
| | | System.out.println("匹配成功"); |
| | | System.out.println(GlassInfo.getGlassid()); |
| | | return true; |