dubin
2025-08-19 730a25580b579ab32e0eae53fa4ae8aaa15c2d14
联调
4个文件已修改
5个文件已添加
189 ■■■■ 已修改文件
pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/LicenseInfos.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/mapper/LicenseInfosMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/LicenseInfosService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/service/impl/LicenseInfosServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/asrs/LicenseInfosMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -15,7 +15,7 @@
    <properties>
        <java.version>1.8</java.version>
        <cool.version>3.4.5</cool.version>
        <cool.version>3.4.0</cool.version>
        <mysql-driver.version>5.1.47</mysql-driver.version>
        <mybatis-plus.version>2.3.2</mybatis-plus.version>
        <fastjson.version>1.2.58</fastjson.version>
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -194,7 +194,8 @@
                        && staProtocol.isLoading()
                        && staProtocol.isInEnable()
                        && !staProtocol.isEmptyMk()
                        && staProtocol.isPakMk()) {
                        && staProtocol.isPakMk()
                        && staProtocol.getWorkNo()==9999) {
                    if (Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) {
                        News.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode);
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -7,12 +7,9 @@
import com.alibaba.fastjson.JSON;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.entity.BasRgvMap;
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.BasRgvMapService;
import com.zy.common.utils.News;
import com.zy.core.DevpThread;
import com.zy.core.cache.MessageQueue;
@@ -28,7 +25,10 @@
import lombok.extern.slf4j.Slf4j;
import java.text.MessageFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
@@ -49,10 +49,10 @@
//    }};
    public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{
        add(101);add(102);add(103);
        add(201);add(202);add(203);
        add(104);add(105);
    }};
    public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{
    /*public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{
        add(101);add(102);add(103);
        add(104);add(105);add(106);add(107);
        add(108);add(109);
@@ -62,7 +62,7 @@
        add(208);add(209);add(210);add(211);
        add(401);add(402);add(403);add(404);
    }};
    }};*/
    public static final ArrayList<Integer> BarcodeList1 = new ArrayList<Integer>() {{
        add(1); add(2);add(3);add(4);add(5);
@@ -72,14 +72,14 @@
        add(6);add(7);add(8);add(9);
        add(10); add(11); add(12); add(13);
    }};
    public static final ArrayList<Integer> staNosErrList2 = new ArrayList<Integer>() {{
    /*public static final ArrayList<Integer> staNosErrList2 = new ArrayList<Integer>() {{
        add(102); add(105);add(107);add(109);
        add(203);add(205);add(208);add(211);
    }};
    }};*/
    public static final ArrayList<Integer> staNosErrList1 = new ArrayList<Integer>() {{
        add(123);
        add(223);add(225);add(228);add(231);
        add(101);
        add(102);add(103);add(104);add(105);
    }};
    public static final ArrayList<Integer> staNoWeight1 = new ArrayList<Integer>() {{
@@ -119,8 +119,8 @@
        switch (slave.getId()) {
            case 1:
                return staNosErrList1;
            case 2:
                return staNosErrList2;
            /*case 2:
                return staNosErrList2;*/
            default:
                throw new CoolException("服务器异常");
        }
@@ -141,8 +141,8 @@
        switch (slave.getId()) {
            case 1:
                return staNos1;
            case 2:
                return staNos2;
            /*case 2:
                return staNos2;*/
            default:
                throw new CoolException("服务器异常");
        }
src/main/java/com/zy/system/entity/LicenseInfos.java
New file
@@ -0,0 +1,56 @@
package com.zy.system.entity;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
@Data
@TableName("sys_license_infos")
public class LicenseInfos implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value= "")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value= "")
    private String license;
    @ApiModelProperty(value= "")
    private String licenseTime;
    @ApiModelProperty(value= "")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    public LicenseInfos() {}
    public LicenseInfos(String license,Date createTime) {
        this.license = license;
        this.createTime = createTime;
    }
//    LicenseInfos licenseInfos = new LicenseInfos(
//            null,    //
//            null    //
//    );
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
}
src/main/java/com/zy/system/mapper/LicenseInfosMapper.java
New file
@@ -0,0 +1,14 @@
package com.zy.system.mapper;
import com.zy.system.entity.LicenseInfos;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface LicenseInfosMapper extends BaseMapper<LicenseInfos> {
    LicenseInfos getLatestLicense();
}
src/main/java/com/zy/system/service/LicenseInfosService.java
New file
@@ -0,0 +1,10 @@
package com.zy.system.service;
import com.zy.system.entity.LicenseInfos;
import com.baomidou.mybatisplus.service.IService;
public interface LicenseInfosService extends IService<LicenseInfos> {
    LicenseInfos getLatestLicense();
}
src/main/java/com/zy/system/service/impl/LicenseInfosServiceImpl.java
New file
@@ -0,0 +1,16 @@
package com.zy.system.service.impl;
import com.zy.system.mapper.LicenseInfosMapper;
import com.zy.system.entity.LicenseInfos;
import com.zy.system.service.LicenseInfosService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service("licenseInfosService")
public class LicenseInfosServiceImpl extends ServiceImpl<LicenseInfosMapper, LicenseInfos> implements LicenseInfosService {
    @Override
    public LicenseInfos getLatestLicense() {
        return this.baseMapper.getLatestLicense();
    }
}
src/main/resources/application.yml
@@ -63,28 +63,28 @@
    # 堆垛机入库站点
    crnInStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 102
      row: 1
      staNo: 101
      row: 2
      bay: 1
      lev: 1
    # 堆垛机出库站点
    crnOutStn[0]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 101
      row: 1
      row: 2
      bay: 1
      lev: 1
    # 堆垛机出库站点
    crnOutStn[1]:
      devpPlcId: ${wcs-slave.devp[0].id}
      staNo: 104
      row: 1
      staNo: 105
      row: 3
      bay: 1
      lev: 1
  # plc
  devp[0]:
    id: 1
    ip: 10.10.10.144
    ip: 10.10.10.120
    port: 102
    rack: 0
    slot: 0
@@ -92,7 +92,7 @@
    inSta[0]:
      staNo: 102
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 101
      backSta: 103
      led: ${wcs-slave.led[0].id}
#    # 入库口2
#    inSta[1]:
@@ -102,10 +102,10 @@
#      led: ${wcs-slave.led[1].id}
    # 拣料入库口1
    pickSta[0]:
      staNo: 223
      staNo: 105
      barcode: ${wcs-slave.barcode[0].id}
      led: ${wcs-slave.led[0].id}
      backSta: 222
      led: ${wcs-slave.led[1].id}
      backSta: 104
#    # 拣料入库口2
#    pickSta[1]:
#      staNo: 225
@@ -114,19 +114,19 @@
#      backSta: 224
    # 空板入库口1
    emptyInSta[0]:
      staNo: 123
      staNo: 102
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 122
      backSta: 103
      led: ${wcs-slave.led[0].id}
    # 空板入库口2
    emptyInSta[1]:
      staNo: 223
      barcode: ${wcs-slave.barcode[0].id}
      backSta: 222
      led: ${wcs-slave.led[1].id}
    #emptyInSta[1]:
      #staNo: 223
      #barcode: ${wcs-slave.barcode[0].id}
      #backSta: 222
      #led: ${wcs-slave.led[1].id}
    # 出库口1
    outSta[0]:
      staNo: 121
      staNo: 104
  # 条码扫描仪1
  barcode[0]:
    id: 1
@@ -138,12 +138,12 @@
    ip: 10.10.10.51
    port: 5005
    devpPlcId: ${wcs-slave.devp[0].id}
    staArr: 121
    staArr: 102
  # LED2
  led[1]:
    id: 123
    ip: 10.10.10.52
    port: 5005
    devpPlcId: ${wcs-slave.devp[0].id}
    staArr: 123
    staArr: 104
src/main/resources/mapper/asrs/LicenseInfosMapper.xml
New file
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.system.mapper.LicenseInfosMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.system.entity.LicenseInfos">
        <id column="id" property="id" />
        <result column="license" property="license" />
        <result column="license_time" property="licenseTime" />
        <result column="create_time" property="createTime" />
    </resultMap>
    <select id="getLatestLicense" resultMap="BaseResultMap">
        select top 1 * from sys_license_infos order by create_time desc
    </select>
</mapper>