ZengTao
2025-02-26 91320a3e9679c8e7ff73720750e87ced2e29a136
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/job/RawGlassPushMessage.java
@@ -2,10 +2,14 @@
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.mes.common.config.Const;
import com.mes.rawglassdetails.entity.RawGlassStorageDetails;
import com.mes.rawglassdetails.service.RawGlassStorageDetailsService;
import com.mes.rawglassstation.entity.RawGlassStorageStation;
import com.mes.rawglassstation.service.RawGlassStorageStationService;
import com.mes.rawglasstask.entity.RawGlassStorageTask;
import com.mes.rawglasstask.service.RawGlassStorageTaskService;
@@ -54,10 +58,13 @@
    public void largenScreen() {
        log.info("发送任务信息和架子信息");
        JSONObject jsonObject = new JSONObject();
        List<RawGlassStorageDetails> rawGlassStorageDetailList = rawGlassStorageDetailsService.list(
                new LambdaUpdateWrapper<RawGlassStorageDetails>()
                        .eq(RawGlassStorageDetails::getState, Const.RAW_GLASS_STATE_IN)
        );
        MPJLambdaWrapper<RawGlassStorageDetails> wrapper = new MPJLambdaWrapper<>();
        wrapper.select(RawGlassStorageStation::getSlot)
                .select(RawGlassStorageDetails::getRemainQuantity)
                .rightJoin(RawGlassStorageStation.class, on -> on.eq(RawGlassStorageStation::getSlot, RawGlassStorageDetails::getSlot)
                        .eq(RawGlassStorageDetails::getState, Const.RAW_GLASS_STATE_IN))
                .orderByAsc(RawGlassStorageStation::getSlot);
        List<RawGlassStorageDetails> rawGlassStorageDetailList = rawGlassStorageDetailsService.list(wrapper);
        jsonObject.append("rawGlassStorageDetailList", rawGlassStorageDetailList);
        List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("largenScreen");
        if (CollectionUtil.isNotEmpty(sendwServer)) {