pjb
11 小时以前 cb2e9ba3d787767f4d7593ed53124e1135a391d5
src/main/java/com/zy/service/impl/MainServiceImpl.java
@@ -2677,7 +2677,7 @@
                // 根据罐装线反馈任务号查询工作档
                WrkMast wrkMast = wrkMastService.selectById(staProtocol.getWrkNo());
                if(wrkMast == null) {
                    log.error("出罐装线货物任务号工作档不存在:{}",staProtocol.getWrkNo());
                    News.error("出罐装线货物任务号工作档不存在:{}",staProtocol.getWrkNo());
                    continue;
                } else if(wrkMast.getWrkSts() != 2) {
                    log.error("出罐装线货物任务号工作档状态异常,不为2:{}",staProtocol.getWrkNo());
@@ -2753,10 +2753,15 @@
            if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.getWorkNo() != 0) {
                // 查询工作档
                WrkMast wrkMast = wrkMastMapper.selectByWrkNo(staProtocol.getWorkNo());
                if (wrkMast != null && wrkMast.getWhsType() == null && wrkMast.getIoType() != 120) {
                if (wrkMast != null && wrkMast.getWhsType() == null) {
                    WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo()));
                    staProtocol.setBucketType(wrkDetl.getMatnr());
                    staProtocol.setBucketCount(wrkDetl.getAnfme().intValue());
                    if(wrkMast.getIoType() == 120) {
                        staProtocol.setBucketType("1");
                        staProtocol.setBucketCount(1);
                    } else {
                        staProtocol.setBucketType(wrkDetl.getMatnr());
                        staProtocol.setBucketCount(wrkDetl.getAnfme().intValue());
                    }
                    boolean result = MessageQueue.offer(SlaveType.Devp, inGzxSiteList.indexOf(site) + 4, new Task(4, staProtocol));
                    if (result) {
                        log.info("告诉罐装线入库桶信息命令队列推送成功:" + staProtocol.getWorkNo() + "," +"托盘码:" + wrkMast.getBarcode() +"," + site + "," + staProtocol.getBucketType() +"," + staProtocol.getBucketCount());
@@ -2823,7 +2828,7 @@
            }
            // 站点条件判断
            if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() == 0 && staProtocol.isPakMk()) {
            if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() == 0) {
                // 更新站点信息 且 下发plc命令
                StaProtocol staProtocolNew = new StaProtocol();
                staProtocolNew.setSiteId(staProtocol.getSiteId());
@@ -2831,6 +2836,11 @@
                staProtocolNew.setStaNo(crnOutSiteToRgvSite2.get(wrkMast.getSourceStaNo()) != null ? crnOutSiteToRgvSite2.get(wrkMast.getSourceStaNo()) :wrkMast.getSourceStaNo().shortValue());
                devpThread.setPakMk(staProtocol.getSiteId(), false);
                boolean result = MessageQueue.offer(SlaveType.Devp, devpId, new Task(2, staProtocolNew));
                Integer siteId = staProtocol.getSiteId();
                if(siteId == 1081 || siteId == 1084 || siteId == 1087) {
                    staProtocol.setPlaceableFlag(1);
                    MessageQueue.offer(SlaveType.Devp, outGzxSiteList.indexOf(staProtocol.getSiteId()) + 4, new Task(5, staProtocol));
                }
                log.info("手动站位转移输送线下发:" + staProtocolNew.getWorkNo() + "," + staProtocolNew.getSiteId() + "->" + staProtocolNew.getStaNo());
                if (!result) {
                    News.errorNoLog("" + " - 1" + " - 更新plc站点信息失败");