zhang
2025-08-02 3e5358a4aba7a024509dcd601070001a6f3bcb55
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -4,6 +4,7 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.exception.CoolException;
@@ -39,7 +40,6 @@
import com.zy.core.thread.BarcodeThread;
import com.zy.core.thread.LedThread;
import com.zy.core.thread.SiemensDevpThread;
import com.zy.system.service.impl.ConfigServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -94,7 +94,7 @@
    private String wmsUrl;
    public short wrkNo = 9999;
    @Autowired
    private ConfigServiceImpl configService;
    private BasCrnOptService crnOptService;
    /**
     * 组托
@@ -2298,11 +2298,16 @@
                if (crnProtocol.getBay() == 1 && crnProtocol.getLevel() == 1) {
                    continue;
                }
                if (System.currentTimeMillis() - crnProtocol.getLastCommandTime() < 1000 * 60 * 2) {
                    continue;
                Page<BasCrnOpt> basCrnOptPage = crnOptService.selectPage(new Page<>(1, 1), new EntityWrapper<BasCrnOpt>().eq("crn_no", crn.getId()).orderBy("send_time", false));
                if (basCrnOptPage != null && basCrnOptPage.getRecords() != null && basCrnOptPage.getRecords().size() > 0) {
                    if (System.currentTimeMillis() - basCrnOptPage.getRecords().get(0).getSendTime().getTime() < 1000 * 60 * 3) {
                        continue;
                    }
                } else {
                    if (System.currentTimeMillis() - crnProtocol.getLastCommandTime() < 1000 * 60 * 2) {
                        continue;
                    }
                }
                List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                        .eq("crn_no", crn.getId())
                        .notIn("wrk_sts", 5, 14, 15)