| | |
| | | import com.mes.largenscreen.entity.PieChartVO; |
| | | import com.mes.order.entity.HollowOrderDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.order.entity.dto.InterlayerDTO; |
| | | import com.mes.order.service.OrdersService; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import com.mes.tools.DateUtil; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | |
| | | } |
| | | |
| | | private HollowGlassOutRelationInfo childrenTask(HollowTaskRequest request, int isForce) { |
| | | |
| | | try { |
| | | |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, request.getFlowCardId()).last("limit 1")); |
| | | HollowGlassOutRelationInfo info = new HollowGlassOutRelationInfo(); |
| | | if (null == glassInfo) { |
| | |
| | | info.setFormulaId(request.getFormulaId()); |
| | | this.save(info); |
| | | // 查询出需要出玻璃的队列 |
| | | List<Integer> layerList = new ArrayList<>(); |
| | | int isPairCount = 0; |
| | | if (932 == request.getCell()) { |
| | | List<InterlayerDTO> interlayerList = ordersService.queryInterlayerByERP(request.getFlowCardId()); |
| | | if (CollectionUtil.isNotEmpty(interlayerList)) { |
| | | List<Integer> tempList = new ArrayList<>(); |
| | | for (InterlayerDTO dto : interlayerList) { |
| | | tempList.add(dto.getPrevSort()); |
| | | tempList.add(dto.getNextSort()); |
| | | } |
| | | layerList = tempList.stream().distinct().collect(Collectors.toList()); |
| | | isPairCount = layerList.size() * request.getTotalPairQuantity(); |
| | | }else{ |
| | | isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity(); |
| | | } |
| | | } else { |
| | | isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity(); |
| | | } |
| | | List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService |
| | | .queryOutGlassList(request.getFlowCardId(), request.getCell()); |
| | | int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity(); |
| | | .queryOutGlassList(request.getFlowCardId(), request.getCell(), layerList); |
| | | List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>(); |
| | | Integer carWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_CAR_WIDTH); |
| | | Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(hollowBigStorageCageDetailsList.get(0).getThickness()); |