| | |
| | | import com.github.yulichang.query.MPJLambdaQueryWrapper; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.mapper.DamageMapper; |
| | | import com.mes.damage.service.DamageService; |
| | |
| | | import com.mes.engineering.mapper.EngineeringMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import com.mes.pp.entity.*; |
| | | import com.mes.pp.mapper.OptimizeDetailMapper; |
| | | import com.mes.pp.mapper.OptimizeHeatDetailMapper; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | |
| | | |
| | | @Autowired |
| | | OptimizeDetailMapper optimizeDetailMapper; |
| | | |
| | | @Autowired |
| | | OptimizeHeatDetailMapper optimizeHeatDetailMapper; |
| | | |
| | | @Autowired |
| | | EdgStorageCageMapper edgStorageCageMapper; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取 工程下的钢化版图 |
| | | * |
| | | * @param current |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<List<Map<String, Object>>> selectTemperingTerritory(String current) { |
| | | //此工程的所有优化数据 |
| | | List<Map<String, Object>> resultCutTerritory=optimizeHeatDetailMapper.selectJoinMaps(JoinWrappers.lambda(OptimizeHeatDetail.class) |
| | | .selectAll(OptimizeHeatDetail.class) |
| | | .selectAs(OptimizeProject::getLoadWidth, "olWidth") |
| | | .selectAs(OptimizeProject::getLoadLength, "olHeight") |
| | | .leftJoin(OptimizeHeatLayout.class, on -> on |
| | | .eq(OptimizeHeatLayout::getProjectNo, OptimizeHeatDetail::getProjectNo) |
| | | .eq(OptimizeHeatLayout::getLayoutId, OptimizeHeatDetail::getLayoutId)) |
| | | .leftJoin(OptimizeProject.class, on -> on |
| | | .eq(OptimizeProject::getProjectNo, OptimizeHeatLayout::getProjectNo)) |
| | | .eq(OptimizeHeatDetail::getProjectNo, current) |
| | | ); |
| | | |
| | | Map<String, List<Map<String, Object>>> groupBy=resultCutTerritory.stream().collect(Collectors.groupingBy(item->item.get("layout_id").toString())); |
| | | // List<List<Map<String, Object>>> Result=groupBy.values().stream().collect(Collectors.toList()); |
| | | List<List<Map<String, Object>>> result=new ArrayList<>(); |
| | | for (int i=1;i<=groupBy.keySet().size();i++) { |
| | | String key=i+""; |
| | | if(key!=null){ |
| | | result.add(groupBy.get(key)); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询笼内版图差值范围内的 此尺寸玻璃 如无则按照 钢化版图序号 以及玻璃序号 |
| | | * |
| | | * @param glassId |
| | |
| | | .set(EdgGlassTaskInfo::getStatus, request.getState()).eq(EdgGlassTaskInfo::getGlassId, request.getGlassId())); |
| | | return "success"; |
| | | } |
| | | |
| | | /** |
| | | * 进片 扫码ID验证重复 |
| | | * |
| | | * @param glassId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean inToVerify(String glassId){ |
| | | List<EdgStorageCageDetails> listEdgStorageCageDetails = baseMapper.selectList(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getGlassId, glassId) |
| | | ); |
| | | if (listEdgStorageCageDetails.isEmpty()) { |
| | | //说明此玻璃没有进过理片 |
| | | return true; |
| | | }else{ |
| | | List<Damage> damage=damageMapper.selectList(new LambdaQueryWrapper<Damage>() |
| | | .eq(Damage::getGlassId, glassId) |
| | | .and(wrapper->wrapper.eq(Damage::getType, 8).or().eq(Damage::getType, 9)) |
| | | ); |
| | | if(!damage.isEmpty()){ |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |