#
Junjie
2025-02-17 d8a9cfff5ff3f3deb33ef3dd1862f53415cc9b46
#
10个文件已修改
1个文件已添加
24个文件已删除
2532 ■■■■■ 已修改文件
pom.xml 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ConsoleController.java 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MonitorController.java 412 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OpenController.java 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/SiteController.java 192 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/dto/AxisBean.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/dto/WorkChartAxis.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/BarcodeDataVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/LocChartPie.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/PlcErrorTableVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/ScaleDataVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SiteDetailVo.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SiteTableVo.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SteDataVo.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/ReportQueryMapper.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/VersionUtils.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/ws/ConsoleWebSocket.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/annotations/OpenApiLog.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/LocTypeDto.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/DevpThread.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/ServerBootstrap.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/cache/MessageQueue.java 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/cache/OutputQueue.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/enums/SlaveType.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/DevpSlave.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/LedSlave.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/command/LedCommand.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/model/protocol/StaProtocol.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/properties/SlaveProperties.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/BarcodeThread.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/LedThread.java 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/ScaleThread.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 319 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -107,84 +107,9 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>
        <!-- led sdk -->
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>5m3</artifactId>
            <scope>system</scope>
            <version>0.5.0</version>
            <systemPath>${project.basedir}/src/main/resources/lib/bx05-0.5.0-SNAPSHOT.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>5m3message</artifactId>
            <scope>system</scope>
            <version>0.5.0</version>
            <systemPath>${project.basedir}/src/main/resources/lib/bx05.message-0.5.0-SNAPSHOT.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>5m3doc</artifactId>
            <scope>system</scope>
            <version>0.5.0</version>
            <systemPath>${project.basedir}/src/main/resources/lib/bx05-0.5.0-SNAPSHOT-javadoc.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>rxtx</artifactId>
            <scope>system</scope>
            <version>2.1.7</version>
            <systemPath>${project.basedir}/src/main/resources/lib/rxtx-2.1.7.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>simple-xml</artifactId>
            <scope>system</scope>
            <version>2.7.1</version>
            <systemPath>${project.basedir}/src/main/resources/lib/simple-xml-2.7.1.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>stax</artifactId>
            <scope>system</scope>
            <version>1.2.0</version>
            <systemPath>${project.basedir}/src/main/resources/lib/stax-1.2.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>stax-api</artifactId>
            <scope>system</scope>
            <version>1.0.1</version>
            <systemPath>${project.basedir}/src/main/resources/lib/stax-api-1.0.1.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>uia-comm</artifactId>
            <scope>system</scope>
            <version>0.5.1</version>
            <systemPath>${project.basedir}/src/main/resources/lib/uia-comm-0.5.1.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>uia-message</artifactId>
            <scope>system</scope>
            <version>0.6.0</version>
            <systemPath>${project.basedir}/src/main/resources/lib/uia-message-0.6.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>uia-utils</artifactId>
            <scope>system</scope>
            <version>0.2.0</version>
            <systemPath>${project.basedir}/src/main/resources/lib/uia-utils-0.2.0.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.wcs.led</groupId>
            <artifactId>xpp3</artifactId>
            <scope>system</scope>
            <version>1.1.3.3</version>
            <systemPath>${project.basedir}/src/main/resources/lib/xpp3-1.1.3.3.jar</systemPath>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
    </dependencies>
src/main/java/com/zy/asrs/controller/ConsoleController.java
@@ -2,36 +2,18 @@
import com.alibaba.fastjson.JSON;
import com.core.annotations.ManagerAuth;
import com.core.common.Arith;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.asrs.domain.enums.SiteStatusType;
import com.zy.asrs.domain.param.SystemSwitchParam;
import com.zy.asrs.domain.vo.*;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.entity.BasMap;
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.mapper.LocMastMapper;
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.BasMapService;
import com.zy.asrs.service.WrkMastService;
import com.zy.common.CodeRes;
import com.zy.common.model.MapNode;
import com.zy.common.model.enums.NavigationMapType;
import com.zy.common.utils.NavigateMapData;
import com.zy.common.utils.RedisUtil;
import com.zy.core.DevpThread;
import com.zy.core.Slave;
import com.zy.core.cache.OutputQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.RedisKeyType;
import com.zy.core.enums.SlaveType;
import com.zy.core.model.DevpSlave;
import com.zy.core.model.protocol.StaProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.properties.SystemProperties;
import com.zy.core.thread.BarcodeThread;
import com.zy.core.thread.ScaleThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -52,13 +34,7 @@
    @Autowired
    private SlaveProperties slaveProperties;
    @Autowired
    private WrkMastService wrkMastService;
    @Autowired
    private BasDevpService basDevpService;
    @Autowired
    private BasMapService basMapService;
    @Autowired
    private LocMastMapper locMastMapper;
    @Autowired
    private RedisUtil redisUtil;
    @Value("${super.pwd}")
@@ -89,147 +65,6 @@
        Thread.sleep(200L);
        SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE);
        return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get()));
    }
    /****************************************************************/
    /************************** 实时数据 ******************************/
    /****************************************************************/
    @PostMapping("/latest/data/site")
    @ManagerAuth(memo = "站点实时数据")
    public R siteLatestData(){
        List<SiteLatestDataVo> vos = new ArrayList<>();
        Map<Integer, StaProtocol> stations = new HashMap<>();
        for (DevpSlave devp : slaveProperties.getDevp()) {
            DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
            if (null != devpThread) {
                stations.putAll(devpThread.getStation());
            }
        }
        for (Map.Entry<Integer, StaProtocol> entry : stations.entrySet()) {
            SiteLatestDataVo vo = new SiteLatestDataVo();
            StaProtocol staProtocol = entry.getValue();
            vo.setSiteId(String.valueOf(entry.getKey())); // 站点编号
            vo.setWorkNo(staProtocol.getWorkNo()); // 工作号
            vo.setSiteStatus(SiteStatusType.process(staProtocol));  // 状态
            vos.add(vo);
        }
        return R.ok().add(vos);
    }
    @PostMapping("/latest/data/barcode")
    @ManagerAuth(memo = "条码扫描仪实时数据")
    public R barcodeLatestData(){
        List<BarcodeDataVo> list = new ArrayList<>();
        for (Slave barcode : slaveProperties.getBarcode()) {
            BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcode.getId());
            if (null == barcodeThread) {
                continue;
            }
            BarcodeDataVo vo = new BarcodeDataVo();
            vo.setBarcodeId(barcode.getId());
            vo.setCodeValue(barcodeThread.getBarcode());
            list.add(vo);
        }
        return R.ok().add(list);
    }
    @PostMapping("/latest/data/scale")
    @ManagerAuth(memo = "磅秤实时数据")
    public R scaleLatestData(){
        List<ScaleDataVo> list = new ArrayList<>();
        for (Slave scale : slaveProperties.getScale()) {
            ScaleThread scaleThread = (ScaleThread) SlaveConnection.get(SlaveType.Scale, scale.getId());
            if (null == scaleThread) {
                continue;
            }
            ScaleDataVo vo = new ScaleDataVo();
            vo.setScaleId(scale.getId());
            vo.setValue(String.valueOf(Arith.multiplys(1, scaleThread.getScale(), 1)));
            list.add(vo);
        }
        return R.ok().add(list);
    }
    /****************************************************************/
    /************************** 详情操作 ******************************/
    /****************************************************************/
    @PostMapping("/site/detail")
    @ManagerAuth(memo = "输送设备数据详情")
    public R siteDetail(@RequestParam Integer siteId){
        if (Cools.isEmpty(siteId)){
            return R.parse(CodeRes.EMPTY);
        }
        SiteDetailVo vo = new SiteDetailVo();
        for (DevpSlave devp : slaveProperties.getDevp()) {
            DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
            if (null != devpThread) {
                StaProtocol staProtocol = devpThread.getStation().get(siteId);
                if (staProtocol != null) {
                    BasDevp basDevp = basDevpService.selectById(siteId);
                    if (basDevp == null) {
                        return R.error("数据库维护异常");
                    }
                    vo.setSiteId(siteId);   // 站点编号
                    vo.setWorkNo(staProtocol.getWorkNo());   // 工作号
                    if (staProtocol.getWorkNo() > 0) {
                        WrkMast wrkMast = wrkMastService.selectById(staProtocol.getWorkNo());
                        if (wrkMast != null) {
                            vo.setWrkSts(wrkMast.getWrkSts$());   // 工作状态
                            vo.setIoType(wrkMast.getIoType$());   //  入出库类型
                            vo.setSourceStaNo(wrkMast.getSourceStaNo$());
                            vo.setStaNo(wrkMast.getStaNo$());
                            vo.setSourceLocNo(wrkMast.getSourceLocNo$());
                            vo.setLocNo(wrkMast.getLocNo$());
                        }
                    }
                    vo.setAutoing(staProtocol.isAutoing()?"Y":"N"); //  自动
                    vo.setLoading(staProtocol.isLoading()?"Y":"N"); //  有物
                    vo.setCanining(basDevp.getCanining());  //  能入
                    vo.setCanouting(basDevp.getCanouting());    //  能出
                    return R.ok().add(vo);
                }
            }
        }
        return R.error();
    }
    @Deprecated
    @PostMapping("/site/update")
    @ManagerAuth(memo = "输送设备数据修改")
    public R updateSite(){
        return R.ok();
    }
    @Deprecated
    @PostMapping("/crn/update")
    @ManagerAuth(memo = "堆垛机数据修改")
    public R updateCrn(){
        return R.ok();
    }
    @GetMapping("/barcode/output/site")
    public R barcodeOutput(){
        return R.ok().add(JSON.toJSONString(new ArrayList<>(OutputQueue.BARCODE)));
    }
    @GetMapping("/barcode/list")
    public R barcodeList(){
        ArrayList<HashMap<String, Object>> list = new ArrayList<>();
        for (Slave slave : slaveProperties.getBarcode()) {
            HashMap<String, Object> map = new HashMap<>();
            BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, slave.getId());
            map.put("id", slave.getId());
            map.put("barcode", barcodeThread.getBarcode());
            list.add(map);
        }
        return R.ok().add(list);
    }
    /**
src/main/java/com/zy/asrs/controller/MonitorController.java
File was deleted
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -1,10 +1,14 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSON;
import com.core.common.R;
import com.zy.asrs.domain.NotifyDto;
import com.zy.asrs.domain.enums.NotifyMsgType;
import com.zy.asrs.domain.param.*;
import com.zy.asrs.entity.ApiLog;
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.utils.NotifyUtils;
import com.zy.common.annotations.OpenApiLog;
import com.zy.common.service.CommonService;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.dispatcher.ShuttleDispatchUtils;
@@ -21,6 +25,7 @@
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@Slf4j
@@ -36,13 +41,32 @@
    private NotifyUtils notifyUtils;
    @Autowired
    private SlaveProperties slaveProperties;
    @Autowired
    private ApiLogService apiLogService;
    @PostMapping("/createMoveTask")
    @OpenApiLog(memo = "小车移动任务")
    public R createMoveTask(@RequestBody CreateMoveTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean dispatchShuttle = shuttleDispatchUtils.dispatchShuttle(null, param.getLocNo(), param.getShuttleNo());
        apiLogService.insert(new ApiLog(
                null
                , "小车移动任务"
                , "/createMoveTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , dispatchShuttle ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (dispatchShuttle) {
            return R.ok();
        }
@@ -51,11 +75,28 @@
    //移库任务
    @PostMapping("/createLocMoveTask")
    @OpenApiLog(memo = "移库任务")
    public R createLocMoveTask(@RequestBody CreateLocMoveTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean result = commonService.createLocMoveTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "移库任务"
                , "/createLocMoveTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , result ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (result) {
            return R.ok();
        }
@@ -64,11 +105,28 @@
    //入库任务
    @PostMapping("/createInTask")
    @OpenApiLog(memo = "入库任务")
    public R createInTask(@RequestBody CreateInTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean result = commonService.createInTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "入库任务"
                , "/createInTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , result ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (result) {
            return R.ok();
        }
@@ -77,11 +135,28 @@
    //出库任务
    @PostMapping("/createOutTask")
    @OpenApiLog(memo = "出库任务")
    public R createOutTask(@RequestBody CreateOutTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean result = commonService.createOutTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "出库任务"
                , "/createOutTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , result ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (result) {
            return R.ok();
        }
@@ -89,11 +164,28 @@
    }
    @PostMapping("/completeTask")
    @OpenApiLog(memo = "任务完成")
    public R completeTask(@RequestBody CompleteTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean completeTask = commonService.completeTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "任务完成"
                , "/completeTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , completeTask ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (completeTask) {
            return R.ok();
        }
@@ -101,11 +193,28 @@
    }
    @PostMapping("/cancelTask")
    @OpenApiLog(memo = "任务取消")
    public R cancelTask(@RequestBody CancelTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean completeTask = commonService.cancelTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "任务取消"
                , "/cancelTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , completeTask ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (completeTask) {
            return R.ok();
        }
@@ -113,6 +222,7 @@
    }
    @PostMapping("/deviceStatus")
    @OpenApiLog(memo = "获取设备状态")
    public R getDeviceStatus() {
        HashMap<String, Object> map = new HashMap<>();
        //获取小车数据
@@ -147,6 +257,24 @@
        map.put("shuttle", shuttleProtocols);
        map.put("forkLift", forkLiftProtocols);
        apiLogService.insert(new ApiLog(
                null
                , "获取设备状态"
                , "/deviceStatus"
                , null
                , null
                , null
                , null
                , JSON.toJSONString(map)
                , null
                , null
                , 1
                , new Date()
                , null
                , null
        ));
        return R.ok().add(map);
    }
src/main/java/com/zy/asrs/controller/SiteController.java
File was deleted
src/main/java/com/zy/asrs/domain/dto/AxisBean.java
File was deleted
src/main/java/com/zy/asrs/domain/dto/WorkChartAxis.java
File was deleted
src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/BarcodeDataVo.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/LocChartPie.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/PlcErrorTableVo.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/ScaleDataVo.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/SiteDetailVo.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/SiteTableVo.java
File was deleted
src/main/java/com/zy/asrs/domain/vo/SteDataVo.java
File was deleted
src/main/java/com/zy/asrs/mapper/ReportQueryMapper.java
@@ -1,53 +1,10 @@
package com.zy.asrs.mapper;
import com.zy.asrs.domain.dto.WorkChartAxis;
import com.zy.asrs.domain.vo.LocChartPie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
public interface ReportQueryMapper {
    @Select("select \n" +
            "Min(wm.io_time) as node,\n" +
            "isnull(count(1), 0) as val\n" +
            "from asr_wrk_mast_log wm\n" +
            "where wm.wrk_sts = 5 \n" +
            "and (wm.io_type = 1 OR wm.io_type = 54)\n" +
            "and datediff(d, wm.io_time, getdate())<=7 \n" +
            "group by datediff(day,wm.io_time,getdate())\n" +
            "order by Min(wm.io_time) asc\n")
    List<Map<String, Object>> queryPakinRep();
    @Select("select\n" +
            "Min(wm.io_time) as node,\n" +
            "isnull(count(1), 0) as val\n" +
            "from asr_wrk_mast_log wm\n" +
            "where 1=1\n" +
            "and ((wm.wrk_sts = 15 AND wm.io_type = 101) OR (wm.wrk_sts = 14 AND wm.io_type = 103))\n" +
            "and datediff(d, wm.io_time, getdate())<=7\n" +
            "group by datediff(day,wm.io_time,getdate())\n" +
            "order by Min(wm.io_time) asc")
    List<Map<String, Object>> queryPakOutRep();
    //曲线图
    @Select("select ymd,SUM(sto_qty) inqty,SUM(ret_qty) outqty from asr_sta_inout_view "
            + "where ymd>CONVERT(char(10), DATEADD(DAY,-12,GETDATE()), 120) group by ymd order by ymd")
    public List<WorkChartAxis> getChartAxis();
    @Select("select * from asr_loc_use_view")
    LocChartPie getLocUseRate();
    @Select("select count(1) as totalWrk from asr_wrk_mast_log where crn_no = #{crnNo}")
    Integer getTotalWrkByCrnId(Integer crnNo);
    @Select("select count(1) as totalLoc from asr_loc_mast")
    Integer getTotalLocByCrnId();
}
src/main/java/com/zy/asrs/utils/VersionUtils.java
File was deleted
src/main/java/com/zy/asrs/ws/ConsoleWebSocket.java
@@ -82,16 +82,8 @@
            R result = liftController.liftStateTable();
            socketMessage.setData(JSON.toJSONString(result));
            this.sendMessage(JSON.toJSONString(socketMessage));
        } else if (socketMessage.getUrl().equals("/console/latest/data/site")) {
            R result = consoleController.siteLatestData();
            socketMessage.setData(JSON.toJSONString(result));
            this.sendMessage(JSON.toJSONString(socketMessage));
        } else if (socketMessage.getUrl().equals("/console/map/auth")) {
            R result = consoleController.getMapFromRedis(Integer.parseInt(socketMessage.getData()));
            socketMessage.setData(JSON.toJSONString(result));
            this.sendMessage(JSON.toJSONString(socketMessage));
        } else if (socketMessage.getUrl().equals("/console/barcode/output/site")) {
            R result = consoleController.barcodeOutput();
            socketMessage.setData(JSON.toJSONString(result));
            this.sendMessage(JSON.toJSONString(socketMessage));
        }
src/main/java/com/zy/common/annotations/OpenApiLog.java
New file
@@ -0,0 +1,14 @@
package com.zy.common.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OpenApiLog {
    boolean value() default true;
    String memo() default "";
}
src/main/java/com/zy/common/model/LocTypeDto.java
File was deleted
src/main/java/com/zy/core/DevpThread.java
File was deleted
src/main/java/com/zy/core/ServerBootstrap.java
@@ -47,26 +47,6 @@
    }
    private void initMq(){
        // 初始化输送线mq
        for (Slave devp : slaveProperties.getDevp()) {
            MessageQueue.init(SlaveType.Devp, devp);
        }
        // 初始化条码扫描仪mq
        for (Slave barcode : slaveProperties.getBarcode()) {
            MessageQueue.init(SlaveType.Barcode, barcode);
        }
        // 初始化Led灯mq
        for (Slave led : slaveProperties.getLed()) {
            MessageQueue.init(SlaveType.Led, led);
        }
        // 初始化磅称mq
        for (Slave scale : slaveProperties.getScale()) {
            MessageQueue.init(SlaveType.Scale, scale);
        }
        // 初始化台车mq
        for (Slave car : slaveProperties.getCar()) {
            MessageQueue.init(SlaveType.Car, car);
        }
        // 初始化货叉提升机mq
        for (Slave forkLift : slaveProperties.getForkLift()) {
            MessageQueue.init(SlaveType.ForkLift, forkLift);
@@ -78,13 +58,6 @@
    }
    private void initThread(){
        // 初始化输送线线程
        News.info("初始化输送线线程...................................................");
        for (DevpSlave devp : slaveProperties.getDevp()) {
            DevpThread devpThread = new SiemensDevpThread(devp);
            new Thread((Runnable) devpThread).start();
            SlaveConnection.put(SlaveType.Devp, devp.getId(), devpThread);
        }
        // 初始化货叉提升机
        News.info("初始化货叉提升机........................................................");
        for (ForkLiftSlave forkLiftSlave : slaveProperties.getForkLift()) {
@@ -99,29 +72,6 @@
            new Thread(shuttleThread).start();
            SlaveConnection.put(SlaveType.Shuttle, shuttleSlave.getId(), shuttleThread);
        }
        // 初始化条码扫描仪线程
        News.info("初始化条码扫描仪线程...................................................");
        for (Slave barcode : slaveProperties.getBarcode()) {
            BarcodeThread barcodeThread = new BarcodeThread(barcode);
            if (barcode.getId() >= 11) {
                new Thread(barcodeThread).start();
            }
            SlaveConnection.put(SlaveType.Barcode, barcode.getId(), barcodeThread);
        }
        // 初始化LED线程
        News.info("初始化LED线程...................................................");
        for (LedSlave led : slaveProperties.getLed()) {
            LedThread ledThread = new LedThread(led);
            new Thread(ledThread).start();
            SlaveConnection.put(SlaveType.Led, led.getId(), ledThread);
        }
        // 初始化磅秤线程
//        News.info("初始化磅秤线程...................................................");
//        for (Slave scale : slaveProperties.getScale()) {
//            ScaleThread barcodeThread = new ScaleThread(scale);
//            new Thread(barcodeThread).start();
//            SlaveConnection.put(SlaveType.Scale, scale.getId(), barcodeThread);
//        }
    }
src/main/java/com/zy/core/cache/MessageQueue.java
@@ -7,7 +7,6 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.LinkedBlockingQueue;
/**
 * 消息队列
@@ -15,43 +14,23 @@
 */
public class MessageQueue {
    // 输送线mq交换机
    private static final Map<Integer, ConcurrentLinkedQueue<Task>> DEVP_EXCHANGE = new ConcurrentHashMap<>();
    // 条码扫描仪mq交换机
    private static final Map<Integer, ConcurrentLinkedQueue<Task>> BARCODE_EXCHANGE = new ConcurrentHashMap<>();
    // Led灯 mq交换机
    private static final Map<Integer, LinkedBlockingQueue<Task>> LED_EXCHANGE = new ConcurrentHashMap<>();
    // 磅称mq交换机
    private static final Map<Integer, ConcurrentLinkedQueue<Task>> SCALE_EXCHANGE = new ConcurrentHashMap<>();
    // 台车mq交换机
    private static final Map<Integer, ConcurrentLinkedQueue<Task>> CAR_EXCHANGE = new ConcurrentHashMap<>();
    //四向穿梭车mq交换机
    private static final Map<Integer, ConcurrentLinkedQueue<Task>> SHUTTLE_EXCHANGE = new ConcurrentHashMap<>();
    //提升机mq交换机
    private static final Map<Integer, ConcurrentLinkedQueue<Task>> LIFT_EXCHANGE = new ConcurrentHashMap<>();
    //货叉提升机mq交换机
    private static final Map<Integer, ConcurrentLinkedQueue<Task>> FORK_LIFT_EXCHANGE = new ConcurrentHashMap<>();
    /**
     * mq 交换机初始化
     */
    public static void init(SlaveType type, Slave slave) {
        switch (type) {
            case Devp:
                DEVP_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                break;
            case Barcode:
                BARCODE_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                break;
            case Led:
                LED_EXCHANGE.put(slave.getId(), new LinkedBlockingQueue<>(1));
                break;
            case Scale:
                SCALE_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                break;
            case Car:
                CAR_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                break;
            case Shuttle:
                SHUTTLE_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                break;
            case ForkLift:
                FORK_LIFT_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
                break;
            case Lift:
                LIFT_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>());
@@ -67,18 +46,10 @@
     */
    public static boolean offer(SlaveType type, Integer id, Task task) {
        switch (type) {
            case Devp:
                return DEVP_EXCHANGE.get(id).offer(task);
            case Barcode:
                return BARCODE_EXCHANGE.get(id).offer(task);
            case Led:
                return LED_EXCHANGE.get(id).offer(task);
            case Scale:
                return SCALE_EXCHANGE.get(id).offer(task);
            case Car:
                return CAR_EXCHANGE.get(id).offer(task);
            case Shuttle:
                return SHUTTLE_EXCHANGE.get(id).offer(task);
            case ForkLift:
                return FORK_LIFT_EXCHANGE.get(id).offer(task);
            case Lift:
                return LIFT_EXCHANGE.get(id).offer(task);
            default:
@@ -92,18 +63,10 @@
     */
    public static Task poll(SlaveType type, Integer id) {
        switch (type) {
            case Devp:
                return DEVP_EXCHANGE.get(id).poll();
            case Barcode:
                return BARCODE_EXCHANGE.get(id).poll();
            case Led:
                return LED_EXCHANGE.get(id).poll();
            case Scale:
                return SCALE_EXCHANGE.get(id).poll();
            case Car:
                return CAR_EXCHANGE.get(id).poll();
            case Shuttle:
                return SHUTTLE_EXCHANGE.get(id).poll();
            case ForkLift:
                return FORK_LIFT_EXCHANGE.get(id).poll();
            case Lift:
                return LIFT_EXCHANGE.get(id).poll();
            default:
@@ -116,18 +79,10 @@
     */
    public static Task peek(SlaveType type, Integer id) {
        switch (type) {
            case Devp:
                return DEVP_EXCHANGE.get(id).peek();
            case Barcode:
                return BARCODE_EXCHANGE.get(id).peek();
            case Led:
                return LED_EXCHANGE.get(id).peek();
            case Scale:
                return SCALE_EXCHANGE.get(id).peek();
            case Car:
                return CAR_EXCHANGE.get(id).peek();
            case Shuttle:
                return SHUTTLE_EXCHANGE.get(id).peek();
            case ForkLift:
                return FORK_LIFT_EXCHANGE.get(id).peek();
            case Lift:
                return LIFT_EXCHANGE.get(id).peek();
            default:
@@ -137,24 +92,12 @@
    public static void clear(SlaveType type, Integer id){
        switch (type) {
            case Devp:
                DEVP_EXCHANGE.get(id).clear();
                break;
            case Barcode:
                BARCODE_EXCHANGE.get(id).clear();
                break;
            case Led:
                LED_EXCHANGE.get(id).clear();
                break;
            case Scale:
                SCALE_EXCHANGE.get(id).clear();
                break;
            case Car:
                CAR_EXCHANGE.get(id).clear();
                break;
            case Shuttle:
                SHUTTLE_EXCHANGE.get(id).clear();
                break;
            case ForkLift:
                FORK_LIFT_EXCHANGE.get(id).clear();
                break;
            case Lift:
                LIFT_EXCHANGE.get(id).clear();
                break;
src/main/java/com/zy/core/cache/OutputQueue.java
@@ -9,14 +9,6 @@
 */
public class OutputQueue {
    // 堆垛机输出日志
    public static ArrayBlockingQueue<String> CRN = new ArrayBlockingQueue<>(32);
    // 输送线输出日志
    public static ArrayBlockingQueue<String> DEVP = new ArrayBlockingQueue<>(32);
    // 条码器输出日志
    public static ArrayBlockingQueue<JSONObject> BARCODE = new ArrayBlockingQueue<>(32);
    // 穿梭车输出日志
    public static ArrayBlockingQueue<String> STE = new ArrayBlockingQueue<>(32);
    //四向穿梭车输出日志
    public static ArrayBlockingQueue<String> SHUTTLE = new ArrayBlockingQueue<>(32);
    //提升机输出日志
src/main/java/com/zy/core/enums/SlaveType.java
@@ -2,13 +2,6 @@
public enum SlaveType {
    Crn,
    Devp,
    Barcode,
    Led,
    Scale,
    Car,
    Ste,
    Shuttle,
    Lift,
    ForkLift,
src/main/java/com/zy/core/model/DevpSlave.java
File was deleted
src/main/java/com/zy/core/model/LedSlave.java
File was deleted
src/main/java/com/zy/core/model/command/LedCommand.java
File was deleted
src/main/java/com/zy/core/model/protocol/StaProtocol.java
File was deleted
src/main/java/com/zy/core/properties/SlaveProperties.java
@@ -23,18 +23,6 @@
    private int groupCount;
    private List<String> channel = new ArrayList<>();
    private List<DevpSlave> devp = new ArrayList<>();
    private List<Slave> barcode = new ArrayList<>();
    private List<LedSlave> led = new ArrayList<>();
    private List<Slave> scale = new ArrayList<>();
    private List<Slave> car = new ArrayList<>();
    private List<ShuttleSlave> shuttle = new ArrayList<>();
    private List<ForkLiftSlave> forkLift = new ArrayList<>();
src/main/java/com/zy/core/thread/BarcodeThread.java
File was deleted
src/main/java/com/zy/core/thread/LedThread.java
File was deleted
src/main/java/com/zy/core/thread/ScaleThread.java
File was deleted
src/main/java/com/zy/core/thread/SiemensDevpThread.java
File was deleted