| | |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import com.mes.hollow.service.HollowGlassOutRelationInfoService; |
| | | import com.mes.hollow.service.HollowGlassRelationInfoService; |
| | | import com.mes.order.entity.HollowGlassDetailsDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.order.service.OrdersService; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | SysConfigService sysConfigService; |
| | | @Resource |
| | | DamageService damageService; |
| | | @Resource |
| | | OrdersService ordersService; |
| | | // @Value("${mes.slotWidth}") |
| | | // private Integer slotWidth; |
| | | // @Value("${mes.glassGap}") |
| | |
| | | return; |
| | | } |
| | | //按照流程卡获取本流程卡最后一层或第一次的玻璃数据 |
| | | List<HollowGlassDetailsDTO> glassDetailsDTOS = this.baseMapper.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer); |
| | | List<HollowGlassDetailsDTO> glassDetailsDTOS = ordersService.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer); |
| | | if (CollectionUtil.isEmpty(glassDetailsDTOS)) { |
| | | log.info("当前流程卡最外层数据未找到,请在erp确认数据无误,流程卡:{},总层数{}", flowCardId, totalLayer); |
| | | return; |
| | | } |
| | | if (totalLayer != layer) { |
| | | glassDetailsDTOS = this.baseMapper.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer); |
| | | glassDetailsDTOS = ordersService.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer); |
| | | } |
| | | if (CollectionUtil.isEmpty(glassDetailsDTOS)) { |
| | | log.info("当前流程卡最外层数据未找到,请在erp确认数据无误,流程卡:{},总层数{},层数{}", flowCardId, totalLayer, layer); |
| | |
| | | for (List<HollowGlassRelationInfo> item : tempHollowList) { |
| | | relationInfoList.addAll(item); |
| | | } |
| | | log.info("分配完毕"); |
| | | log.info("分配完毕:{}", relationInfoList); |
| | | try { |
| | | this.saveBatch(relationInfoList); |
| | | } catch (Exception e) { |
| | | log.error("保存失败:{}", e); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<GlassInfo> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query) { |
| | | public List<LackDetailsDTO> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query) { |
| | | return baseMapper.queryLackGlassByFlowCard(query.getFlowCardId(), query.getOrderSort(), query.getLayer()); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId, String productName, String customerName) { |
| | | OrderDetailsDTO dto = hollowGlassOutRelationInfoService.queryProductNameByFlowCardId(flowCardId); |
| | | OrderDetailsDTO dto = ordersService.queryProductNameByFlowCardId(flowCardId); |
| | | if ((StringUtils.isBlank(productName) || dto.getProductName().contains(productName)) && (StringUtils.isBlank(customerName) || dto.getCustomerName().contains(customerName))) { |
| | | return dto; |
| | | } |