cl
2024-08-04 257bd3879f139cdf328e78158544130656c676fc
修改采集参数
已修改3个文件
19 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java
@@ -19,6 +19,7 @@
    public static final Map<String,String> materialMap = new HashMap();//人工工位
    public static final Map<String,String> thoroughfareMap = new HashMap();//人工工位
    public static final String YES = "Y";
    public static final String NG = "2";
    public static final String UN_PASS= "不合格";
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -265,12 +265,14 @@
    @Override
    public void saveCampaignTimeParameters(DaParamCollection daParamCollection) {
        String locationCode = daParamCollection.getLocationCode();
        String thoroughfare = Constants.thoroughfareMap.get(locationCode);
        BsFormulaChildInfo childInfo = daParamCollection.getFormulaChildEntity();
        if(StringUtils.isNotBlank(childInfo.getResults())){
            if(!childInfo.getResults().equals("OK")){
                try {
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("JCDM035."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare+"."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
@@ -278,7 +280,7 @@
            }
        }else {
            try {
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("JCDM035."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare+"."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
@@ -308,7 +310,7 @@
                this.saveParameters(daParamCollection);
                //给opc发21
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("JCDM035."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare+"."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
               /* if(daParamCollection.getLocationCode().equals("M1OP100-1") || daParamCollection.getLocationCode().equals("M1OP100-2") ){
                    try{
                        //更新工单状态为已执行
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -57,6 +57,16 @@
        Constants.materialMap.put("1","9900199052A");
        Constants.materialMap.put("2","9900199053B");
        //通道
        Constants.thoroughfareMap.put(Constants.OP040,"JCDM035-3");
        Constants.thoroughfareMap.put(Constants.OP050,"JCDM035-3");
        Constants.thoroughfareMap.put(Constants.OP060,"JCDM035-3");
        Constants.thoroughfareMap.put(Constants.OP070,"JCDM035-3");
        Constants.thoroughfareMap.put(Constants.OP080,"JCDM035-3");
        Constants.thoroughfareMap.put(Constants.OP090,"JCDM035-3");
        Constants.thoroughfareMap.put(Constants.OP100,"JCDM035-3");
        Constants.thoroughfareMap.put(Constants.OP110,"JCDM035-3");
        //主线人工工位
        Constants.OP040_OP160.add(Constants.OP040);
        Constants.OP040_OP160.add(Constants.OP050);