huang
2025-10-09 d4a06fc08b6e6e215bbf1771d204c3b7d773bc29
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -26,6 +26,7 @@
import com.mes.sysconfig.service.SysConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -104,7 +105,9 @@
                    .last("limit 1")
            );
        }
        Assert.isTrue(null != relationInfoOne, "相关流程卡未找到对应的组号信息,玻璃流程卡:{},序号:{},总层数:{},层数:{}", flowCardId, glassType, totalLayer, layer);
        if (null == relationInfoOne) {
            throw new RuntimeException("相关流程卡未找到对应的组号信息,玻璃流程卡:" + flowCardId + ",序号:" + glassType + ",总层数:" + totalLayer + ",层数:" + layer);
        }
        Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_WIDTH);
        //详情表内获取本组是否已经有玻璃在笼子内(0表示提前占用)
        int taskCount = hollowGlassOutRelationInfoService.count(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
@@ -324,7 +327,7 @@
            HollowAllFlowCardVO hollowAllFlowCardVO = new HollowAllFlowCardVO();
            HollowBigStorageCageDetails cageDetails = v.get(0);
            //按照流程卡获取对应的产品名称
            OrderDetailsDTO orderDetails = baseMapper.queryProductNameByFlowCardId(cageDetails.getFlowCardId(), query.getProductName(), query.getCustomerName());
            OrderDetailsDTO orderDetails = this.queryProductNameByFlowCardId(cageDetails.getFlowCardId(), query.getProductName(), query.getCustomerName());
            if (null != orderDetails) {
                BeanUtils.copyProperties(orderDetails, hollowAllFlowCardVO);
                hollowAllFlowCardVO.setFlowCardId(e);
@@ -400,10 +403,9 @@
    }
    @Override
    public Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) {
        List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard(flowCardId);
        Map<Integer, List<LackDetailsDTO>> listMap = lackDetailsList.stream().collect(Collectors.groupingBy(LackDetailsDTO::getLayer));
        return listMap;
    public List<LackDetailsDTO> queryLackByFlowCard() {
        List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard();
        return lackDetailsList;
    }
    @Override
@@ -439,6 +441,16 @@
        return Boolean.TRUE;
    }
    @Override
    public OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId, String productName, String customerName) {
        OrderDetailsDTO dto = hollowGlassOutRelationInfoService.queryProductNameByFlowCardId(flowCardId);
        if ((StringUtils.isBlank(productName) || dto.getProductName().contains(productName)) && (StringUtils.isBlank(customerName) || dto.getCustomerName().contains(customerName))) {
            return dto;
        }
        return null;
    }
    private void sortFlowCardIdList(List<HollowAllFlowCardVO> list) {
        Pattern pattern = Pattern.compile("^NG(\\d+)([A-Za-z]+)(\\d+)$");