ZengTao
2024-10-16 a6114a739396420028f6a5397697e1e9ca90cc33
版本整合05:新增opcua开关配置
5个文件已修改
1个文件已添加
130 ■■■■■ 已修改文件
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
@@ -806,78 +806,6 @@
        return Boolean.FALSE;
    }
    /**
     * 保存出片任务相关信息
     *
     * @param glassInfo
     * @param endcell
     * @param confirmationWrodAddress
     * @param glassId
     * @return
     */
    private boolean saveOutGlassMessageBySlot(EdgStorageCageDetails glassInfo, int endcell, String confirmationWrodAddress, String glassId, Integer currentSlot) {
        if (glassInfo != null) {
            log.info("4、添加出片任务,玻璃id:{},任务类型:{},起始位置:{},结束位置:{}", glassInfo.getGlassId(),
                    2, glassInfo.getSlot(), endcell);
            if (glassInfo.getGlassId().equals(glassId)) {
                log.info("5、直通任务,将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo);
                EdgStorageCageDetails details = new EdgStorageCageDetails();
                //玻璃信息替换
                String glassIdChange = queryAndChangeGlass(glassId);
                if (StringUtils.isBlank(glassIdChange)) {
                    BeanUtils.copyProperties(glassInfo, details);
                } else {
                    GlassInfo one = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId));
                    BeanUtils.copyProperties(glassInfo, details);
                }
                EdgStorageCage nearestEmpty = edgStorageCageService.selectNearestEmpty(currentSlot, Boolean.TRUE);
                Assert.isTrue(null != nearestEmpty, "格子已满,无法执行直通任务");
                log.info("3、查询卧式理片笼里面的空格:{}", nearestEmpty);
                details.setSlot(nearestEmpty.getSlot());
                details.setState(Const.GLASS_STATE_OUT);
                edgStorageCageDetailsService.save(details);
                boolean taskCacheStatus = saveTaskCache(glassInfo.getGlassId(), nearestEmpty.getSlot(), endcell, Const.GLASS_CACHE_TYPE_THROUGH);
                log.info("6、添加出片任务是否完成:{}", taskCacheStatus);
            } else {
                log.info("5、非直通任务,将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo);
                if (endcell != currentSlot) {
                    EdgStorageCageDetails currentGlass = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>()
                            .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)
                            .eq(EdgStorageCageDetails::getSlot, currentSlot).eq(EdgStorageCageDetails::getWidth, glassInfo.getWidth())
                            .eq(EdgStorageCageDetails::getHeight, glassInfo.getHeight()).eq(EdgStorageCageDetails::getThickness, glassInfo.getThickness())
                    );
                    if (null != currentGlass) {
                        glassInfo = currentGlass;
                        endcell = currentSlot;
                    }
                }
                //玻璃信息替换
                String glassIdChange = queryAndChangeGlass(glassInfo.getGlassId());
                //处理在卧理内的玻璃信息:笼内的数据处理
                queryEdgAndChangeGlass(glassInfo.getGlassId(), glassIdChange);
                LambdaUpdateWrapper<EdgStorageCageDetails> wrapper = new LambdaUpdateWrapper<>();
                wrapper.eq(EdgStorageCageDetails::getGlassId, glassInfo.getGlassId()).set(EdgStorageCageDetails::getState, Const.GLASS_STATE_OUT);
                edgStorageCageDetailsService.update(wrapper);
                log.info("5、更新出片玻璃的状态为{}", Const.GLASS_STATE_OUT);
                boolean taskCacheStatus = saveTaskCache(glassInfo.getGlassId(), glassInfo.getSlot(), endcell, Const.GLASS_CACHE_TYPE_OUT);
                log.info("6、添加出片任务是否完成:{}", taskCacheStatus);
            }
            boolean glassSizeStatus = saveGlassSize(glassInfo, endcell);
            log.info("7、添加出片玻璃尺寸信息到磨边前玻璃表是否完成:{}", glassSizeStatus);
            S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 1);
            log.info("8、发送确认字已完成");
            Damage damage = new Damage();
            damage.setGlassId(glassInfo.getGlassId());
            damage.setWorkingProcedure("切割");
            damage.setLine(1001);
            damage.setType(1);
            damage.setRemark("过卧式理片");
            damageService.insertDamage(damage);
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }
    /**
     * 添加理片笼任务
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
@@ -30,12 +30,7 @@
      secondLength: 400
  sequence:
    order: false
kangaroohy:
  milo:
    primary: default
    config:
      default:
        endpoint: opc.tcp://127.0.0.1:49320
        security-policy: basic256sha256
        username: zsh
        password: 1qaz2wsx3edc4rfv
    enabled: false
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
@@ -21,4 +21,7 @@
  inCarMaxSize: 0    #进片大车最大存放玻璃数量
  outCarMaxSize: 2     #出片大车最大存放玻璃数量
  glassGap: 350  #玻璃间距
  xMaxSize: 2800
  xMaxSize: 2800
kangaroohy:
  milo:
    enabled: false
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
@@ -14,5 +14,8 @@
  mapper-locations: classpath*:mapper/*.xml
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
kangaroohy:
  milo:
    enabled: false
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -10,4 +10,7 @@
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
kangaroohy:
  milo:
    enabled: false
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
New file
@@ -0,0 +1,36 @@
server:
  port: 8085
spring:
  profiles:
    active: cz
  application:
    name: unLoadGlass
  liquibase:
    enabled: false
  task:
    scheduling:
      pool:
        size: 10
      thread-name-prefix: task-unLoad
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mes:
  maxWidth: 2500    #下片的最大宽度
  maxHeight: 2000   #下片的最大高度
  minWidth: 400    #下片的最小宽度
  minHeight: 400   #下片的最小高度
  throughWidth: 3000
  throughHeight: 2500
  threshold: 5      #下片的最大阈值
  scan:
    ip: 192.168.30.199
    port: 5000
kangaroohy:
  milo:
    enabled: false