ZengTao
2024-08-18 f1916b183ebcff81c64bccae502a63b097c304f5
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
@@ -11,6 +11,7 @@
import com.mes.downstorage.service.DownStorageCageService;
import com.mes.downworkstation.entity.DownWorkstation;
import com.mes.downworkstation.service.DownWorkstationService;
import com.mes.tools.DateUtil;
import com.mes.tools.WebSocketServer;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -113,6 +114,10 @@
        if (null == request) {
            request = new DownGlassInfoRequest();
        }
        if (request.getBeginDate() == null) {
            request.setBeginDate(DateUtil.getBeginDate());
            request.setEndDate(DateUtil.getEndDate());
        }
        log.info("发送当前正在执行工程已落架的玻璃信息");
        LambdaQueryWrapper<DownGlassInfo> wrapper = new LambdaQueryWrapper<DownGlassInfo>()
                .between(null != request.getBeginDate(), DownGlassInfo::getGmtCreate, request.getBeginDate(), request.getEndDate())
@@ -123,11 +128,11 @@
            wrapper.eq(DownGlassInfo::getWorkStationId, request.getWorkStationId());
        }
        List<DownGlassInfo> downGlassInfos = downGlassInfoService.list(wrapper);
        Map<Integer, List<DownGlassInfo>> listMap = downGlassInfos.stream().collect(Collectors.groupingBy(DownGlassInfo::getWorkStationId));
//        Map<Integer, List<DownGlassInfo>> listMap = downGlassInfos.stream().collect(Collectors.groupingBy(DownGlassInfo::getWorkStationId));
        List<Object> engineerIdListTemp = downGlassInfoService.listObjs(new QueryWrapper<DownGlassInfo>().select("distinct engineer_id"));
        List<String> engineerIdList = engineerIdListTemp.stream().map(String::valueOf).collect(Collectors.toList());
        JSONObject jsonObject4 = new JSONObject();
        jsonObject4.append("downGlassInfos", listMap);
        jsonObject4.append("downGlassInfos", downGlassInfos);
        jsonObject4.append("engineerIdList", engineerIdList);
        //钢化开关