cl
2024-08-02 2b9842aefcc46df98a889ae7a7346e030ed4ebae
修改采集参数
已修改7个文件
97 ■■■■■ 文件已修改
jcdm-admin/src/main/resources/application-druid.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-admin/src/main/resources/application-druid.yml
@@ -17,13 +17,13 @@
            # 主库数据源
            master:
#                url: jdbc:sqlserver://192.168.0.189:1433;DataBaseName=Jcdm042-Mes
                url: jdbc:sqlserver://183.134.244.158:1433;DataBaseName=Jcdm035-Mes
#                url: jdbc:sqlserver://192.168.10.100:1433;DataBaseName=Jcdm035-Mes
#                url: jdbc:sqlserver://183.134.244.158:1433;DataBaseName=Jcdm035-Mes
                url: jdbc:sqlserver://192.168.20.250:1433;DataBaseName=Jcdm035-Mes
                username: sa
                password: JCDM@2023
#                password: JCDM@2023
#                password: admin@123
#                password: 1!deshine
#                password: 123456
                password: 123456
            # 从库数据源
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java
@@ -13,7 +13,7 @@
    public static final List<String> OP020_OP090 = new ArrayList<>();//电芯工位
    public static final List<String> OP100_OP150 = new ArrayList<>();//人工工位
    public static final List<String> OP040_OP160 = new ArrayList<>();//主线人工工位
    public static final List<String> ModuleList = new ArrayList<>();//模组工位,用于校验是否传入模组码
@@ -35,27 +35,29 @@
    public static final String ONE= "1";
    public static final String ZERO= "0";
    public static final String TWO= "2";
    public static final String OP070= "M1OP070";
    public static final String OP010= "M1OP010";
    public static final String OP020= "M1OP020";
    public static final String OP030= "M1OP030";
    public static final String OP040= "M1OP040";
    public static final String OP050= "M1OP050";
    public static final String OP060= "M1OP060";
    public static final String OP090= "M1OP090";
    public static final String OP100_1= "M1OP100-1";
    public static final String OP100_2= "M1OP100-2";
    public static final String OP110= "M1OP110";
    public static final String OP120= "M1OP120";
    public static final String OP130= "M1OP130";
    public static final String OP140= "M1OP140";
    public static final String OP150= "M1OP150";
    public static final String OP160= "M1OP160";
    public static final String OP170= "M1OP170";
    public static final String OP180= "M1OP180";
    public static final String OP210= "M1OP210";
    public static final String OP220= "M1OP220";
    public static final String OP010= "OP010";
    public static final String OP020= "OP020";
    public static final String OP030= "OP030";
    public static final String OP040= "OP040";
    public static final String OP050= "OP050";
    public static final String OP060= "OP060";
    public static final String OP070= "OP070";
    public static final String OP080= "OP080";
    public static final String OP090= "OP090";
    public static final String OP100= "OP100";
    public static final String OP110= "OP110";
    public static final String OP120= "OP120";
    public static final String OP130= "OP130";
    public static final String OP140= "OP140";
    public static final String OP150= "OP150";
    public static final String OP160= "OP160";
    public static final String OP170= "OP170";
    public static final String OP180= "OP180";
    public static final String OP210= "OP210";
    public static final String OP220= "OP220";
    public static final Integer INT_ONE= 1;
    public static final Integer INT_TWO= 2;
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -270,7 +270,7 @@
        if(StringUtils.isNotBlank(childInfo.getResults())){
            if(!childInfo.getResults().equals("OK")){
                try {
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("MOZU1."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("JCDM035."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
@@ -278,7 +278,7 @@
            }
        }else {
            try {
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("MOZU1."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("JCDM035."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
@@ -308,8 +308,8 @@
                this.saveParameters(daParamCollection);
                //给opc发21
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("MOZU1."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
                if(daParamCollection.getLocationCode().equals("M1OP100-1") || daParamCollection.getLocationCode().equals("M1OP100-2") ){
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("JCDM035."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
               /* if(daParamCollection.getLocationCode().equals("M1OP100-1") || daParamCollection.getLocationCode().equals("M1OP100-2") ){
                    try{
                        //更新工单状态为已执行
                        LambdaUpdateWrapper<OmProductionOrdeInfo> updateWrapper = new LambdaUpdateWrapper<>();
@@ -337,7 +337,7 @@
                        System.out.println(e.getMessage());
                    }
                }
                }*/
            } catch (Exception e) {
@@ -560,7 +560,9 @@
                childVO.setItemCode(daParamCollection.getParamCode());
//                BsFormulaChildInfo childOne = bsFormulaChildInfoService.getOne(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getParamCode, daParamCollection.getParamCode()));
//                DaCollectionParamConf paramConfOne = daCollectionParamConfService.getOne(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
                List<DaCollectionParamConf> paramConfOneList = daCollectionParamConfService.list(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
                List<DaCollectionParamConf> paramConfOneList = daCollectionParamConfService.list(new LambdaQueryWrapper<DaCollectionParamConf>()
                        .eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode())
                        .eq(DaCollectionParamConf::getProcessesCode,stationCode));
                DaCollectionParamConf paramConfOne = paramConfOneList.get(0);
//                if(childOne!=null){
//                    String operationType = childOne.getOperationType();
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -56,6 +56,14 @@
        //PLC到MES物料转换
        Constants.materialMap.put("1","9900199052A");
        Constants.materialMap.put("2","9900199053B");
        //主线人工工位
        Constants.OP040_OP160.add(Constants.OP040);
        Constants.OP040_OP160.add(Constants.OP050);
        Constants.OP040_OP160.add(Constants.OP060);
        Constants.OP040_OP160.add(Constants.OP070);
        Constants.OP040_OP160.add(Constants.OP080);
        OPCUaSubscription opcUaSubscription = new OPCUaSubscription(
                miloService,
                daPassingStationCollectionService,
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -103,9 +103,22 @@
        try{
            if (Constants.RECORD_DATA.equals(tab)) {  //出入站
                if (Constants.ONE.equals(valueString)) {//入站
                    Integer recordDataDone = 11;
                    miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".StartTime").value(new Date()).build());
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(recordDataDone).build());
                    if(Constants.OP040_OP160.contains(device)){
                        Object snCodeObjcet = miloService.readFromOpcUa(thoroughfare + "." + device + ".snCode").getValue();
                        if (ObjectUtil.isNull(snCodeObjcet)){
                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build());
                        }else{
                            String productNum = snCodeObjcet.toString();
                            //将产品SN发送到前台
                            productNum = "productNum,"+ productNum;
                            WebSocketUsers.sendMessageToUserByText(map.get(device), productNum);
                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build());
                        }
                    }else {
                        Integer recordDataDone = 11;
                        miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".StartTime").value(new Date()).build());
                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(recordDataDone).build());
                    }
                } else if(Constants.TWO.equals(valueString)){//出站
                    Integer result = 21;
                    //先判断是否有产品SN
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue
@@ -331,7 +331,7 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.10.100:8080/websocket/message/",
      url: "ws://192.168.20.250:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -262,7 +262,7 @@
      content: '',
      activeName: 'first',
      // url: "ws://10.103.210.248:8080/websocket/message/",
      url: "ws://192.168.10.100:8080/websocket/message/",
      url: "ws://192.168.20.250:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,