zhoushihao
2024-10-16 7956f09935a708f17b0f1b29a6625475f53c7509
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
@@ -1,6 +1,5 @@
package com.mes.downglassinfo.service.impl;
import cn.smallbun.screw.core.util.CollectionUtils;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -19,6 +18,7 @@
import com.mes.downworkstation.entity.dto.DownGlassInfoDTO;
import com.mes.downworkstation.service.DownWorkstationService;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.job.DownLoadCacheGlassTask;
import com.mes.pp.service.FlowCardService;
import lombok.extern.slf4j.Slf4j;
@@ -31,7 +31,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Slf4j
@Service
@@ -52,6 +51,9 @@
    @Autowired
    FlowCardService flowCardService;
    @Autowired
    GlassInfoService glassInfoService;
    /**
     * 根据流程卡号查询最大序号
@@ -224,8 +226,15 @@
    @Override
    public List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo) {
        List<Map<String, Object>> resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer());
        List<Map<String, Object>> resultList = null;
        if (downGlassInfo.getGlassId() != null) {
            resultList = glassInfoService.listMaps(
                    new LambdaQueryWrapper<GlassInfo>()
                            .eq(GlassInfo::getGlassId, downGlassInfo.getGlassId())
            );
        } else {
            resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer());
        }
        log.info("MES落架数据:{}", resultList);
        //获取ERP标签所需的信息
        List<Map<String, Object>> labelInfo;