#
Junjie
2024-06-12 0ab215622ebc3e97b5f4d2be9e23470af1d0a209
#
3个文件已修改
5个文件已删除
2 文件已重命名
587 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/deviceConfig/deviceBarcode/components/edit.jsx 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/deviceConfig/deviceBarcode/index.jsx 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/StationController.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasConveyorSta.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/Station.java 382 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/StationMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/StationService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/StationServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/StaProtocol.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SiemensDevpThread.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/deviceConfig/deviceBarcode/components/edit.jsx
zy-asrs-flow/src/pages/deviceConfig/deviceBarcode/index.jsx
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/StationController.java
File was deleted
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasConveyorSta.java
@@ -165,6 +165,12 @@
    @ApiModelProperty(value= "四向穿梭车所识别的二维码")
    private String qrCodeValue;
    /**
     * 工作号
     */
    @ApiModelProperty(value= "工作号")
    private Integer taskNo;
    public BasConveyorSta() {}
    public BasConveyorSta(Long conveyorId,Integer conveyorNo,Long updateBy,Long createBy,Date createTime,Date updateTime,String memo,Integer deleted,Long hostId,Integer siteNo,String inEnable,String outEnable,String autoing,String loading,String canining,String canouting,Integer locType1,Integer locType2,Integer locType3,String locNo,String qrCodeValue) {
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/Station.java
File was deleted
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/StationMapper.java
File was deleted
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/StationService.java
File was deleted
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/StationServiceImpl.java
File was deleted
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/StaProtocol.java
@@ -1,6 +1,6 @@
package com.zy.asrs.wcs.rcs.model.protocol;
import com.zy.asrs.wcs.core.entity.Station;
import com.zy.asrs.wcs.core.entity.BasConveyorSta;
import lombok.Data;
/**
@@ -81,9 +81,9 @@
        return null;
    }
    public Station toSqlModel(Station station){
        station.setStaNo(String.valueOf(siteId));
        station.setTaskNo(String.valueOf(workNo));
    public BasConveyorSta toSqlModel(BasConveyorSta station){
        station.setSiteNo(siteId);
        station.setTaskNo(workNo.intValue());
        station.setAutoing(autoing?"Y":"N");
        station.setLoading(loading?"Y":"N");
        station.setInEnable(inEnable?"Y":"N");
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SiemensDevpThread.java
@@ -9,8 +9,10 @@
import com.zy.asrs.framework.common.Cools;
import com.zy.asrs.framework.common.DateUtils;
import com.zy.asrs.framework.common.SpringUtils;
import com.zy.asrs.wcs.core.entity.Station;
import com.zy.asrs.wcs.core.service.StationService;
import com.zy.asrs.wcs.core.entity.BasConveyor;
import com.zy.asrs.wcs.core.entity.BasConveyorSta;
import com.zy.asrs.wcs.core.service.BasConveyorService;
import com.zy.asrs.wcs.core.service.BasConveyorStaService;
import com.zy.asrs.wcs.core.utils.RedisUtil;
import com.zy.asrs.wcs.rcs.News;
import com.zy.asrs.wcs.rcs.cache.OutputQueue;
@@ -35,7 +37,7 @@
    private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>();
    public static ArrayList<Station> stationList = new ArrayList<>();
    public static ArrayList<BasConveyorSta> stationList = new ArrayList<>();
    /**
     * 条码数量
@@ -47,15 +49,20 @@
        this.redisUtil = redisUtil;
    }
    private ArrayList<Station> getStaNo() {
    private ArrayList<BasConveyorSta> getStaNo() {
        try {
            if (stationList.isEmpty()) {
                StationService stationService = SpringUtils.getBean(StationService.class);
                List<Station> stations = stationService.list(new LambdaQueryWrapper<Station>()
                        .eq(Station::getDeviceId, device.getId())
                        .eq(Station::getStatus, 1)
                        .eq(Station::getHostId, device.getHostId()));
                stationList.addAll(stations);
                BasConveyorService basConveyorService = SpringUtils.getBean(BasConveyorService.class);
                BasConveyorStaService basConveyorStaService = SpringUtils.getBean(BasConveyorStaService.class);
                BasConveyor basConveyor = basConveyorService.getOne(new LambdaQueryWrapper<BasConveyor>()
                        .eq(BasConveyor::getDeviceId, device.getId())
                        .eq(BasConveyor::getHostId, device.getHostId()));
                if(basConveyor != null) {
                    List<BasConveyorSta> stations = basConveyorStaService.list(new LambdaQueryWrapper<BasConveyorSta>()
                            .eq(BasConveyorSta::getConveyorId, basConveyor.getId())
                            .eq(BasConveyorSta::getHostId, device.getHostId()));
                    stationList.addAll(stations);
                }
            }
            return stationList;
        } catch (Exception e) {
@@ -79,13 +86,13 @@
    }
    private void read() throws InterruptedException {
        ArrayList<Station> staNos = getStaNo();
        ArrayList<BasConveyorSta> staNos = getStaNo();
        int staNoSize = staNos.size();
        OperateResultExOne<byte[]> result = siemensS7Net.Read("DB101.0", (short) (staNoSize*8));
        if (result.IsSuccess) {
            for (int i = 0; i < staNoSize; i++) {
                Station siteStation = staNos.get(i);
                int siteId = Integer.parseInt(siteStation.getStaNo());// 站点编号
                BasConveyorSta siteStation = staNos.get(i);
                int siteId = siteStation.getSiteNo();// 站点编号
                StaProtocol staProtocol = station.get(siteId);
                if (null == staProtocol) {
                    staProtocol = new StaProtocol();
@@ -113,12 +120,12 @@
        }
        Thread.sleep(200);
        ArrayList<Station> errorStaNo = getStaNo();
        ArrayList<BasConveyorSta> errorStaNo = getStaNo();
        OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB101.800.0", (short) (errorStaNo.size() * 4));
        if (result3.IsSuccess) {
            for (int i = 0; i < errorStaNo.size(); i++) {
                Station siteStation = errorStaNo.get(i);
                Integer siteId = Integer.parseInt(siteStation.getStaNo()); // 站点编号
                BasConveyorSta siteStation = errorStaNo.get(i);
                Integer siteId = siteStation.getSiteNo(); // 站点编号
                StaProtocol staProtocol = station.get(siteId);
                boolean[] status = siemensS7Net.getByteTransform().TransBool(result3.Content, (i * 4 + 2), 2);
                staProtocol.setFrontErr(status[0]);//前超限
@@ -137,16 +144,16 @@
            // 根据实时信息更新数据库
            try {
                List<Station> stations = new ArrayList<>();
                for (Station sta : getStaNo()) {
                    StaProtocol staProtocol = station.get(Integer.parseInt(sta.getStaNo()));
                    Station sqlModel = staProtocol.toSqlModel(sta);
                List<BasConveyorSta> stations = new ArrayList<>();
                for (BasConveyorSta sta : getStaNo()) {
                    StaProtocol staProtocol = station.get(sta.getSiteNo());
                    BasConveyorSta sqlModel = staProtocol.toSqlModel(sta);
                    stations.add(sqlModel);
                }
                if (!stations.isEmpty()) {
                    StationService stationService = SpringUtils.getBean(StationService.class);
                    if (null != stationService && !stationService.updateBatchById(stations)) {
                    BasConveyorStaService basConveyorStaService = SpringUtils.getBean(BasConveyorStaService.class);
                    if (null != basConveyorStaService && !basConveyorStaService.updateBatchById(stations)) {
                        throw new Exception("更新数据库数据失败");
                    }
                }
@@ -257,12 +264,12 @@
    }
    private int findStaNosIndex(int siteId) {
        ArrayList<Station> staNos = getStaNo();
        ArrayList<BasConveyorSta> staNos = getStaNo();
        int index = -1;
        for (int i = 0; i < staNos.size(); i++) {
            Station sta = staNos.get(i);
            if (Integer.parseInt(sta.getStaNo()) == siteId) {
            BasConveyorSta sta = staNos.get(i);
            if (sta.getSiteNo() == siteId) {
                index = i;
                break;
            }