999
zhangc
2025-04-18 23a2e30f0f70c1f526a04bffda38fd124ed47630
999
6个文件已修改
66 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/BasDevpController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/SiteController.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SiteTableVo.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/impl/FyDevpThread.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pipeline.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BasDevpController.java
@@ -40,7 +40,9 @@
        excludeTrash(param);
        EntityWrapper<BasDevp> wrapper = new EntityWrapper<>();
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        }
        return R.ok(basDevpService.selectPage(new Page<>(curr, limit), wrapper));
    }
@@ -109,7 +111,7 @@
    public R query(String condition) {
        EntityWrapper<BasDevp> wrapper = new EntityWrapper<>();
        wrapper.like("dev_no", condition);
        Page<BasDevp> page = basDevpService.selectPage(new Page<>(0, 10), wrapper);
        Page<BasDevp> page = basDevpService.selectPage(new Page<>(0, 100), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (BasDevp basDevp : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
src/main/java/com/zy/asrs/controller/SiteController.java
@@ -7,6 +7,7 @@
import com.zy.asrs.domain.vo.SiteTableVo;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.impl.MainServiceImpl;
import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.OutputQueue;
import com.zy.core.cache.SlaveConnection;
@@ -36,6 +37,8 @@
    private SlaveProperties slaveProperties;
    @Autowired
    private BasDevpService basDevpService;
    @Autowired
    private MainServiceImpl mainService;
    @GetMapping("/io/mode/info/site")
    @ManagerAuth(memo = "入出库模式")
@@ -58,6 +61,7 @@
        List<SiteTableVo> list = new ArrayList<>();
        // 内存数据
        Map<Integer, StaProtocol> station = new HashMap<>();
        FyDevpThread xx = (FyDevpThread) SlaveConnection.get(SlaveType.Devp, 1);
        for (DevpSlave devp : slaveProperties.getDevp()) {
            FyDevpThread devpThread = (FyDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
            station.putAll(devpThread.getStation());
@@ -75,14 +79,19 @@
            vo.setWorkNo(staProtocol.getWorkNo());   //  工作号
            vo.setAutoing(staProtocol.isAutoing() ? "Y" : "N");     //  自动
            vo.setLoading(staProtocol.isLoading() ? "Y" : "N");     // 有物
            vo.setInEnable(staProtocol.isInEnable() ? "Y" : "N");   // 可入
            vo.setOutEnable(staProtocol.isOutEnable() ? "Y" : "N"); // 可出
            vo.setInEnable(mainService.isInEnable(xx, devp.getDevNo()) ? "Y" : "N");   // 可入
            vo.setOutEnable(mainService.isOutEnable(xx, devp.getDevNo()) ? "Y" : "N"); // 可出
            vo.setPakMk(staProtocol.isPakMk() ? "Y" : "N");       // 入库标记
            vo.setEmptyMk(staProtocol.isEmptyMk() ? "Y" : "N");     // 空板信号
            vo.setStaNo(staProtocol.getStaNo());                // 目标站
//            vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高");     //高低库位
            vo.setLocType1(staProtocol.getWeight() == 1 ? "重" : "轻");
            vo.setFinishWorkNo(staProtocol.getFinishWorkNo());
//            vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高");     //高低库位
            //vo.setLocType1(staProtocol.getWeight() == 1 ? "重" : "轻");
            vo.setFinishWorkNo(staProtocol.getFinishWorkNo());
            if (staProtocol.getSiteId() == 1031 || staProtocol.getSiteId() == 1032) {
                vo.setOutInModel((staProtocol.getOutInModel() != null && staProtocol.getOutInModel() == 1) ? "出" : "入");
            }
        }
        return R.ok().add(list);
    }
src/main/java/com/zy/asrs/domain/vo/SiteTableVo.java
@@ -26,6 +26,9 @@
    // 可出
    private String outEnable = "-";
    // 可出
    private String  outInModel;
    // 需求1
    private String pakMk = "-";
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1,6 +1,7 @@
package com.zy.asrs.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zy.asrs.domain.enums.NotifyMsgType;
import com.zy.asrs.entity.*;
@@ -8,6 +9,7 @@
import com.zy.asrs.utils.NotifyUtils;
import com.zy.asrs.utils.Utils;
import com.zy.common.model.MapNode;
import com.zy.common.model.SearchLocParam;
import com.zy.common.model.enums.NavigationMapType;
import com.zy.common.service.CommonService;
import com.zy.common.utils.*;
@@ -40,10 +42,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * 立体仓库WCS系统主流程业务
@@ -101,7 +100,7 @@
    private BasWrkStatusService wrkStatusService;
    private boolean isInEnable(DevpThread devpThread, Integer staNo) {
    public boolean isInEnable(DevpThread devpThread, Integer staNo) {
        if (staNo == null) {
            return false;
        }
@@ -117,6 +116,7 @@
            case 1031:
            case 1032:
                return devpThread.getStation().get(1032).isInEnable();
            case 1024:
            case 1025:
            case 1026:
                return devpThread.getStation().get(1025).isInEnable();
@@ -128,7 +128,7 @@
        return false;
    }
    private boolean isOutEnable(DevpThread devpThread, Integer staNo) {
    public boolean isOutEnable(DevpThread devpThread, Integer staNo) {
        if (staNo == null) {
            return false;
        }
@@ -141,9 +141,7 @@
            case 1022:
            case 1023:
                return devpThread.getStation().get(1022).isOutEnable();
            case 1031:
            case 1032:
                return devpThread.getStation().get(1032).isOutEnable();
            case 1024:
            case 1025:
            case 1026:
                return devpThread.getStation().get(1025).isOutEnable();
@@ -151,6 +149,9 @@
            case 1014:
            case 1015:
                return devpThread.getStation().get(1014).isOutEnable();
            case 1031:
            case 1032:
                return devpThread.getStation().get(1032).isOutEnable();
        }
        return false;
    }
@@ -196,7 +197,7 @@
                            wrkMastService.updateById(wrkMast);
                        }
                        try {
                        /*String wmsUrl = "127.0.0.1:8080/fyxcwms";
                            String wmsUrl = "192.168.10.201:8080/fyxcwms";
                        SearchLocParam param = new SearchLocParam();
                        param.setBarcode(barcode);
                        param.setIoType(1);
@@ -211,8 +212,7 @@
                        JSONObject jsonObject = JSON.parseObject(response);
                        Integer code = jsonObject.getInteger("code");
                        if (code.equals(200)) {
                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
                                //StartupDto dto = jsonObject.getObject("data", StartupDto.class);
//                                String wmsLocNo = dto.getLocNo();
//                                int row = Integer.parseInt(wmsLocNo.substring(0, 2));
//                                int bay = Integer.parseInt(wmsLocNo.substring(2, 5));
@@ -255,7 +255,7 @@
                                    .build()
                                    .doPost();
                            News.error("入库申请失败,任务数据={},请求响应={}", JSON.toJSON(param), JSON.toJSON(jsonObject));
                        }*/
                            }
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
src/main/java/com/zy/core/thread/impl/FyDevpThread.java
@@ -156,6 +156,8 @@
                staProtocol.setAutoing(status[0]);  // 自动
                staProtocol.setIdle(status[1]); //空闲
                staProtocol.setLoading(status[2]);  // 有物
                staProtocol.setInEnable(status[3]); // 可入
                staProtocol.setOutEnable(status[4]);// 可出
                staProtocol.setBackErr(status[5]);
                staProtocol.setLeftErr(status[6]);
@@ -164,8 +166,8 @@
                staProtocol.setWeightErr(status[9]);
                staProtocol.setLow(status[10]);
                staProtocol.setHigh(status[11]);
                staProtocol.setInEnable(status[13]); // 可入
                staProtocol.setOutEnable(status[14]);// 可出
//                staProtocol.setInEnable(status[13]); // 可入
//                staProtocol.setOutEnable(status[14]);// 可出
                staProtocol.setWorkNo(siemensS7Net.getByteTransform().TransInt16(result.Content, i * 26 + 2));     // 工作号
src/main/webapp/views/pipeline.html
@@ -99,11 +99,11 @@
                        <th>有物</th>
                        <th>可入</th>
                        <th>可出</th>
                        <th>出入库模式</th>
<!--                        <th>出入库模式</th>-->
                        <th>完结工作号</th>
                        <th>目标站</th>
                        <th>提升机到位信号</th>
                        <th>高低信号</th>
<!--                        <th>高低信号</th>-->
                    </tr>
                    </thead>
                    <!-- 表格内容 -->
@@ -290,7 +290,7 @@
                        setVal(tr.children("td").eq(7), table[i-1].finishWorkNo);
                        setVal(tr.children("td").eq(8), table[i-1].staNo);
                        setVal(tr.children("td").eq(9), table[i-1].liftArrival);
                        setVal(tr.children("td").eq(10), table[i-1].locType1);
                        //setVal(tr.children("td").eq(10), table[i-1].locType1);
                    }
                } else if (res.code === 403){
                    window.location.href = baseUrl+"/login";
@@ -376,7 +376,7 @@
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                // "       <td></td>\n" +
                "       <td></td>\n" +
                "     </tr>\n";
        }