admin
2024-07-09 4e83fa344f6cba81412fb354e7f32a88a8f34fde
-切换大模组代码更改
已修改14个文件
642 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -84,7 +84,7 @@
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
                .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode())
                .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode())
                .orderByAsc(BsFormulaChildInfo::getStepSort)
//                .orderByAsc(BsFormulaChildInfo::getStepSort)
        );
        if (CollUtil.isNotEmpty(list)){
            List<BsFormulaChildInfo> collect1 = list.stream().filter(x -> Constants.OK.equals(x.getResults())).collect(Collectors.toList());
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -338,6 +338,8 @@
//                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strA+".RecordDataDone").value(21).build());
//                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strB+".RecordDataDone").value(21).build());
                        String locationCode = bsFormulaChildInfo.getLocationCode();
                        WebSocketUsers.sendMessageToUserByText(map.get(locationCode), "OUT");
//                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+locationCode+".RecordDataDone").value(21).build());
                    } catch (Exception e) {
                        throw new RuntimeException(e);
@@ -353,54 +355,12 @@
    @Override
    public AjaxResult jrmWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
        this.clearCollectDataAndResultsByProcessesCode(bsFormulaChildInfo);
//        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
//                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode())
//                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()));
//        for (BsFormulaChildInfo info : list) {
//            info.setCollectData("");
//            info.setResults("");
//            bsFormulaChildInfoService.saveOrUpdate(info);
//        }
        String[] split = bsFormulaChildInfo.getProductBarcode().split(",");
        try {
            for (int i = 0; i < split.length; i++) {
                daParamCollectionService.pushGeelycvMesFeedback(split[i], bsFormulaChildInfo.getLocationCode());
                String barCode = split[i];
                String locationCode = bsFormulaChildInfo.getLocationCode();
                if(StringUtils.isNotBlank(locationCode)&&StringUtils.isNotBlank(barCode)){
                    DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
                    daPassingStationCollection.setOutRsSign("1");
                    daPassingStationCollection.setOutboundTime(new Date());
                    daPassingStationCollection.setSfcCode(barCode);
                    daPassingStationCollection.setLocationCode(locationCode);
                    int updateDaPassingStation = daPassingStationCollectionService.updateDaPassingStationCollectionBySfcCodeAndLocationCode(daPassingStationCollection);
                    logger.info("加热膜人工工位更新过站记录updateDaPassingStationCollectionBySfcCodeAndLocationCode:更新了{}条数据-更新条件pack码{}-工位{}",updateDaPassingStation,barCode,locationCode);
                }
//                DaPassingStationCollection passingStationCollectionOne = daPassingStationCollectionService.getOne(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getSfcCode, barCode).eq(DaPassingStationCollection::getLocationCode, locationCode));
//                if (passingStationCollectionOne != null) {
//                    passingStationCollectionOne.setOutRsSign("1");
//                    passingStationCollectionOne.setOutboundTime(new Date());
//                    daPassingStationCollectionService.saveOrUpdate(passingStationCollectionOne);
//                }
            }
        }catch (Exception e){
        }
        daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode());
        return AjaxResult.success();
    }
    @Override
    public AjaxResult clearWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
//        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
//                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode())
//                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()));
//        for (BsFormulaChildInfo info : list) {
//            info.setCollectData("");
//            info.setResults("");
//            bsFormulaChildInfoService.saveOrUpdate(info);
//        }
        this.clearCollectDataAndResultsByProcessesCode(bsFormulaChildInfo);
        return AjaxResult.success();
    }
@@ -518,71 +478,33 @@
    public void jrmAddParameterCollection(BsFormulaChildInfo bsFormulaChildInfo){
        String scanBarCode = bsFormulaChildInfo.getSfcBarcode();
        String[] modeleSplit = scanBarCode.split(",");
//        for (String modele : modeleSplit) {
            DaParamCollection daParamCollection = new DaParamCollection();
            daParamCollection.setParamCode(bsFormulaChildInfo.getParamCode());
            daParamCollection.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
            daParamCollection.setLocationCode(bsFormulaChildInfo.getLocationCode());
            daParamCollection.setParamValue(bsFormulaChildInfo.getParamValue());
            daParamCollection.setProductCode(bsFormulaChildInfo.getProductCode());
            daParamCollection.setCollectionTime(new Date());
            if(bsFormulaChildInfo.getParamCode().contains("B")){
                daParamCollection.setSfcCode(modeleSplit[1]);
            }else {
                daParamCollection.setSfcCode(modeleSplit[0]);
            }
//            daParamCollection.setSfcCode(modele);
            daParamCollectionMapper.insertDaParamCollection(daParamCollection);
//        }
        DaParamCollection daParamCollection = new DaParamCollection();
        daParamCollection.setParamCode(bsFormulaChildInfo.getParamCode());
        daParamCollection.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
        daParamCollection.setLocationCode(bsFormulaChildInfo.getLocationCode());
        daParamCollection.setParamValue(bsFormulaChildInfo.getParamValue());
        daParamCollection.setProductCode(bsFormulaChildInfo.getProductCode());
        daParamCollection.setCollectionTime(new Date());
        daParamCollection.setSfcCode(scanBarCode);
        daParamCollectionMapper.insertDaParamCollection(daParamCollection);
            DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
            daParamCollectionTemp.setParamCode(bsFormulaChildInfo.getParamCode());
            daParamCollectionTemp.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
            daParamCollectionTemp.setLocationCode(bsFormulaChildInfo.getLocationCode());
            daParamCollectionTemp.setParamValue(bsFormulaChildInfo.getParamValue());
            daParamCollectionTemp.setProductCode(bsFormulaChildInfo.getProductCode());
            daParamCollectionTemp.setCollectionTime(new Date());
            if(bsFormulaChildInfo.getParamCode().contains("B")){
                daParamCollectionTemp.setSfcCode(modeleSplit[1]);
            }else {
                daParamCollectionTemp.setSfcCode(modeleSplit[0]);
            }
            daParamCollectionTempService.save(daParamCollectionTemp);
        DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
        daParamCollectionTemp.setParamCode(bsFormulaChildInfo.getParamCode());
        daParamCollectionTemp.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
        daParamCollectionTemp.setLocationCode(bsFormulaChildInfo.getLocationCode());
        daParamCollectionTemp.setParamValue(bsFormulaChildInfo.getParamValue());
        daParamCollectionTemp.setProductCode(bsFormulaChildInfo.getProductCode());
        daParamCollectionTemp.setCollectionTime(new Date());
        daParamCollection.setSfcCode(scanBarCode);
        daParamCollectionTempService.save(daParamCollectionTemp);
    }
    @Override
    public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
        this.clearCollectDataAndResultsByProcessesCode(bsFormulaChildInfo);
//        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
//                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode())
//                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()));
//        for (BsFormulaChildInfo info : list) {
//            info.setCollectData("");
//            info.setResults("");
//            bsFormulaChildInfoService.saveOrUpdate(info);
//        }
        try {
            daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode());
//            String barCode = bsFormulaChildInfo.getProductBarcode();
//            String locationCode = bsFormulaChildInfo.getLocationCode();
//
//            if(StringUtils.isNotBlank(locationCode)&&StringUtils.isNotBlank(barCode)){
//                DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
//                daPassingStationCollection.setOutRsSign("1");
//                daPassingStationCollection.setOutboundTime(new Date());
//                daPassingStationCollection.setSfcCode(barCode);
//                daPassingStationCollection.setLocationCode(locationCode);
//                int updateDaPassingStation = daPassingStationCollectionService.updateDaPassingStationCollectionBySfcCodeAndLocationCode(daPassingStationCollection);
//                logger.info("普通人工工位更新过站记录updateDaPassingStationCollectionBySfcCodeAndLocationCode:更新了{}条数据-更新条件pack码{}-工位{}",updateDaPassingStation,barCode,locationCode);
//            }
//            DaPassingStationCollection passingStationCollectionOne = daPassingStationCollectionService.getOne(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getSfcCode, barCode).eq(DaPassingStationCollection::getLocationCode, locationCode));
//            if (passingStationCollectionOne != null) {
//                passingStationCollectionOne.setOutRsSign("1");
//                passingStationCollectionOne.setOutboundTime(new Date());
//                daPassingStationCollectionService.saveOrUpdate(passingStationCollectionOne);
//            }
        }catch (Exception e){
        }
        return AjaxResult.success();
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -12,6 +12,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.gson.Gson;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.utils.DateUtils;
import com.jcdm.common.utils.SecurityUtils;
@@ -342,15 +343,15 @@
                    try{
                        CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                            logger.info("OP230报工开始-工厂MES异步方法");
                            String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), "OP230", format.format(new Date()));
                            String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), "POP230", format.format(new Date()));
                            JSONObject jsonObject = new JSONObject(reportResult);
                            String code = jsonObject.getStr("code");
                            if("success".equals(code)){
                                //如果成功,执行报工成功方法,修改是否报工为1,添加报工时间
                                omProductionOrdeInfoService.updateOrderByProductNum("1",daParamCollection.getProductBarcode(),"OP230");
                                omProductionOrdeInfoService.updateOrderByProductNum("1",daParamCollection.getProductBarcode(),"POP230");
                            }else{
                                //解析工厂mes返回结果,如果失败,执行报工失败方法,修改是否报工为2,添加报工时间
                                omProductionOrdeInfoService.updateOrderByProductNum("2",daParamCollection.getProductBarcode(),"OP230");
                                omProductionOrdeInfoService.updateOrderByProductNum("2",daParamCollection.getProductBarcode(),"POP230");
                            }
                            logger.info("OP230报工结束-工厂MES异步方法{}"+reportResult);
                        });
@@ -423,36 +424,26 @@
    @Override
    public void jrmSaveCampaignTimeParameters(DaParamCollection daParamCollection) {
        DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf();
        daCollectionParamConf.setProcessesCode(daParamCollection.getLocationCode());
        daCollectionParamConf.setCollectParameterId("OUTT");
        List<DaCollectionParamConf> daCollectionParamConfs = daCollectionParamConfMapper.selectDaCollectionParamConfList(daCollectionParamConf);
        DaParamCollection saveData = new DaParamCollection();
        saveData.setWorkOrderNo(daParamCollection.getWorkOrderNo());
        saveData.setProductCode(daParamCollection.getProductCode());
        saveData.setLocationCode(daParamCollection.getLocationCode());
        saveData.setSfcCode(daParamCollection.getProductBarcode());
        saveData.setParamCode(daCollectionParamConfs.get(0).getCollectParameterId());
        saveData.setParamName(daCollectionParamConfs.get(0).getCollectParameterName());
        saveData.setCollectionTime(new Date());
        saveData.setParamValue(DateUtil.formatDateTime(new Date()));
        daParamCollectionMapper.insertDaParamCollection(saveData);
        //更新过站记录表出站时间
        //增加过站记录
        DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
        daPassingStationCollection.setWorkOrderNo(daParamCollection.getWorkOrderNo());
        daPassingStationCollection.setSfcCode(daParamCollection.getProductBarcode());
        daPassingStationCollection.setProductCode(daParamCollection.getProductCode());
        daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode());
        List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
        daPassingStationCollections.get(0).setOutboundTime(new Date());
        int i = daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
        daPassingStationCollection.setInboundTime(daParamCollection.getInboundTime());
        daPassingStationCollection.setOutboundTime(new Date());
        daPassingStationCollection.setCreateTime(new Date());
        daPassingStationCollection.setOutRsSign("1");
        boolean save = daPassingStationCollectionService.save(daPassingStationCollection);
//                OPCUaSubscription.SaveParamData(daParamCollection.getProductBarcode(),"OP",daParamCollection.getLocationCode(),daParamCollection.getWorkOrderNo(),daParamCollection.getProductCode());
        //添加基础参数
        this.manualWorkstationsAddBasicParameters(daParamCollection);
        //给opc发21
        try {
//            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
            String strA = daParamCollection.getLocationCode();
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strA+".RecordDataDone").value(21).build());
            String str = daParamCollection.getLocationCode();
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+str+".RecordDataDone").value(21).build());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
@@ -571,7 +562,8 @@
                    logger.info("开始执行异步方法");
                    HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
                    logger.info("异步方法执行结束");
                    logger.info("手动工位传工厂MES异步方法{}"+execute.body());
                    logger.info("手动工位{}传工厂入参VO{}" + stationCode,new Gson().toJson(parentVO));
                    logger.info("手动工位{}传工厂MES异步方法{}"+stationCode,execute.body());
                    DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
                    daParamCollectionTemp.setSfcCode(packID);
@@ -587,9 +579,6 @@
                System.out.println(e.getMessage());
            }
//            HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
//            System.out.println(execute.body());
            System.out.println("-----------------------"+totalResult);
            logger.info("结束人工工位推送工厂MES数据方法-pushGeelycvMesFeedback-工位{}-pack码{}",stationCode,packID);
        }
@@ -657,16 +646,15 @@
                CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                    logger.info("开始执行异步方法");
                    HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
                    System.out.println(execute.body());
                    logger.info("异步方法执行结束");
                    logger.info("自动工位传工厂MES异步方法{}"+execute.body());
                    logger.info("自动工位{}传工厂入参VO{}" + stationCode,new Gson().toJson(parentVO));
                    logger.info("自动工位{}传工厂MES异步方法返回{}"+stationCode,execute.body());
                });
            }catch (Exception e){
                System.out.println(e.getMessage());
            }
//            HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
            logger.info("结束工位{}-工厂MES推送数据方法HttpResponseSend",stationCode);
            System.out.println("-----------------------"+totalResult);
        }
        logger.info("结束工位{}-工厂MES推送数据方法automaticWorkstationPushGeelycvMesFeedback",stationCode);
    }
@@ -710,7 +698,7 @@
        childVOList.add(childVO);
        parentVO.setSiteCode("3983");
        parentVO.setRecordId(""+timestampMillis);
        parentVO.setStationCode("OP500");
        parentVO.setStationCode("POP430");
        parentVO.setProductNum(daParamCollection.getSfcCode());
        parentVO.setTotalResult("1");
        parentVO.setCheckList(childVOList);
@@ -726,7 +714,7 @@
//        }catch (Exception e){
//            System.out.println(e.getMessage());
//        }
        RestfulService.getWorkReportResultFeedback(daParamCollection.getSfcCode(),"OP500",format.format(new Date()));
        RestfulService.getWorkReportResultFeedback(daParamCollection.getSfcCode(),"POP430",format.format(new Date()));
    }
    @Override
@@ -762,10 +750,11 @@
    @Override
    public void preInstallOut(DaParamCollection daParamCollection) {
        String locationCode = daParamCollection.getLocationCode();
        //增加过站记录
        DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
        daPassingStationCollection.setSfcCode(daParamCollection.getProductBarcode());
        daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode());
        daPassingStationCollection.setLocationCode(locationCode);
        daPassingStationCollection.setInboundTime(daParamCollection.getInboundTime());
        daPassingStationCollection.setOutboundTime(new Date());
        daPassingStationCollection.setCreateTime(new Date());
@@ -773,6 +762,14 @@
        boolean save = daPassingStationCollectionService.save(daPassingStationCollection);
        //添加基础参数
        this.manualWorkstationsAddBasicParameters(daParamCollection);
        try {
            String str = "PACK."+locationCode+".RecordDataDone";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(21).build());
            logger.info("预装工位写入OPC成功,工位:{},值{}",str,21);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -121,7 +121,7 @@
        if(list.size() > 0){
            paramProductNum = list.get(list.size()-1).getProductNum();
        }
        String orderJsonString = RestfulService.getProductionWorkOrderRequest(paramProductNum, "OP230");
        String orderJsonString = RestfulService.getProductionWorkOrderRequest(paramProductNum, "POP230");
        JSONObject jsonObject = new JSONObject(orderJsonString);
        // 从JSONObject中获取data对象
        JSONObject dataObject = jsonObject.getJSONObject("data");
@@ -139,7 +139,7 @@
                omProductionOrdeInfo.setOnlineCompletionMark("0");
                omProductionOrdeInfo.setSfResult("0");
                if(dataObject.getStr("model").equals("PE01A")){
                    omProductionOrdeInfo.setProductCode("1P102S");
                    omProductionOrdeInfo.setProductCode("PE01B");
                }else {
                    omProductionOrdeInfo.setProductCode(dataObject.getStr("model"));
                }
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
@@ -224,11 +224,11 @@
    @Override
    public void updateOrderByProductNum(String onlineCompletionMark, String productNum, String stationCode) {
        LambdaUpdateWrapper<OmProductionOrdeInfo> updateWrapper = new LambdaUpdateWrapper<>();
        if(stationCode.equals("OP230")){
        if(stationCode.equals("POP230")){
            updateWrapper.set(OmProductionOrdeInfo::getOnlineCompletionMark,onlineCompletionMark);
            updateWrapper.set(OmProductionOrdeInfo::getActualStartTime,new Date());
        }
        if(stationCode.equals("OP500")){
        if(stationCode.equals("POP430")){
            updateWrapper.set(OmProductionOrdeInfo::getSfResult,onlineCompletionMark);
        }
        updateWrapper.eq(OmProductionOrdeInfo::getProductNum,productNum);
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -62,57 +62,58 @@
     */
    public List<String> getSubList(){
        List<String> lists = new ArrayList<>();
        lists.add(OPCElement.PACK_OP230_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP240_RecordData);//请求记录数据.
//        lists.add(OPCElement.PACK_OP240_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP2501_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP2502_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP2503_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP260_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP260_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP270_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP270_AngleResult);//请求记录数据
        lists.add(OPCElement.PACK_POP230_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP240_RecordData);//请求记录数据.
        lists.add(OPCElement.PACK_POP240_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_PPOP241_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_PPOP242_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_POP301_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_POP250_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP250_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_POP260_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP260_TighteningFrequency);//请求记录数据
//        lists.add(OPCElement.PACK_OP290_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP290_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP300A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP281_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP300B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP310A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP282_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP310B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP330_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP380_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP380_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP400_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP400_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP410_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP410_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP4301_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP4302_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP4303_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP4304_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP440_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP450_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP450_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP460_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP460_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP4801_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP4802_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP4803_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP284_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP310_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP310_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_POP330_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP330_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_POP340_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP340_TighteningFrequency);//请求记录数据
        lists.add(OPCElement.PACK_POP3601_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP3602_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP3603_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP3604_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP370_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP380_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP390_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP4101_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP4102_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP4103_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP4201_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP4202_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP4203_RecordData);//请求记录数据
//
//        lists.add(OPCElement.PACK_OP500_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP500_AngleResult);//请求记录数据
        lists.add(OPCElement.PACK_POP430_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK__AngleResult);//请求记录数据
////
//        lists.add(OPCElement.PACK_OP280_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP320A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP270_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP283_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP320B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP340A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP285_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP340B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP350A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP286_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP350B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP360_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP290_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP365_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP370_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP390_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP470_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP300_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP320_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP400_RecordData);//请求记录数据
        return lists;
    }
jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java
@@ -11,43 +11,45 @@
     * OP230
     */
//    public static final String PACK_OP010_RecordSN = "PACK.OP1010.RecordSN";//请求下发SN号
    public static final String PACK_OP230_RecordData = "PACK.OP230.RecordData";//请求记录数据
    public static final String PACK_POP230_RecordData = "PACK.POP230.RecordData";//请求记录数据
    public static final String PACK_OP230_AngleResult = "PACK.OP230.AngleResult";//请求拧紧数据
    /**
     * OP240
     */
    public static final String PACK_OP240_RecordData = "PACK.OP240.RecordData";//请求记录数据
    public static final String PACK_OP240_AngleResult = "PACK.OP240.AngleResult";//请求拧紧数据
    public static final String PACK_POP240_RecordData = "PACK.POP240.RecordData";//请求记录数据
    public static final String PACK_POP240_TighteningFrequency = "PACK.POP240.TighteningFrequency";//请求拧紧数据
    public static final String PACK_PPOP241_TighteningFrequency = "PACK.PPOP241.TighteningFrequency";//请求拧紧数据
    public static final String PACK_PPOP242_TighteningFrequency = "PACK.PPOP242.TighteningFrequency";//请求拧紧数据
    public static final String PACK_POP301_TighteningFrequency = "PACK.POP301.TighteningFrequency";//请求拧紧数据
//    public static final String PACK_OP2502_RecordData = "PACK.OP250-2.RecordData";//请求记录数据
    public static final String PACK_OP2501_AngleResult = "PACK.OP250-1.AngleResult";//请求拧紧数据
    public static final String PACK_OP2502_AngleResult = "PACK.OP250-2.AngleResult";//请求拧紧数据
    public static final String PACK_OP2503_AngleResult = "PACK.OP250-3.AngleResult";//请求拧紧数据
    public static final String PACK_POP3601_RecordData = "PACK.POP360-1.RecordData";//请求拧紧数据
    public static final String PACK_POP3602_RecordData = "PACK.POP360-2.RecordData";//请求拧紧数据
    public static final String PACK_POP3603_RecordData = "PACK.POP360-3.RecordData";//请求拧紧数据
    public static final String PACK_POP3604_RecordData = "PACK.POP360-4.RecordData";//请求拧紧数据
    public static final String PACK_OP4301_RecordData = "PACK.OP430-1.RecordData";//请求拧紧数据
    public static final String PACK_OP4302_RecordData = "PACK.OP430-2.RecordData";//请求拧紧数据
    public static final String PACK_OP4303_RecordData = "PACK.OP430-3.RecordData";//请求拧紧数据
    public static final String PACK_OP4304_RecordData = "PACK.OP430-4.RecordData";//请求拧紧数据
    public static final String PACK_POP4101_RecordData = "PACK.POP410-1.RecordData";//请求拧紧数据
    public static final String PACK_POP4102_RecordData = "PACK.POP410-2.RecordData";//请求拧紧数据
    public static final String PACK_POP4103_RecordData = "PACK.POP410-3.RecordData";//请求拧紧数据
    public static final String PACK_OP4801_RecordData = "PACK.OP480-1.RecordData";//请求拧紧数据
    public static final String PACK_OP4802_RecordData = "PACK.OP480-2.RecordData";//请求拧紧数据
    public static final String PACK_OP4803_RecordData = "PACK.OP480-3.RecordData";//请求拧紧数据
    public static final String PACK_POP4201_RecordData = "PACK.POP420-1.RecordData";//请求拧紧数据
    public static final String PACK_POP4202_RecordData = "PACK.POP420-2.RecordData";//请求拧紧数据
    public static final String PACK_POP4203_RecordData = "PACK.POP420-3.RecordData";//请求拧紧数据
    /**
     * OP260
     */
    public static final String PACK_OP260_RecordData = "PACK.OP260.RecordData";//请求记录数据
    public static final String PACK_POP250_RecordData = "PACK.POP250.RecordData";//请求记录数据
    public static final String PACK_OP260_AngleResult = "PACK.OP260.AngleResult";//请求拧紧数据
    public static final String PACK_POP250_TighteningFrequency = "PACK.POP250.TighteningFrequency";//请求拧紧数据
    /**
     * OP270
     */
    public static final String PACK_OP270_RecordData = "PACK.OP270.RecordData";//请求记录数据
    public static final String PACK_POP260_RecordData = "PACK.POP260.RecordData";//请求记录数据
    public static final String PACK_OP270_AngleResult = "PACK.OP270.AngleResult";//请求拧紧数据
    public static final String PACK_POP260_TighteningFrequency = "PACK.POP260.TighteningFrequency";//请求拧紧数据
    /**
     * OP290
     */
@@ -58,76 +60,70 @@
    /**
     * OP300
     */
    public static final String PACK_OP300A_RecordData = "PACK.OP300A.RecordData";//请求记录数据
    public static final String PACK_POP281_RecordData = "PACK.POP281.RecordData";//请求记录数据
    public static final String PACK_OP300B_RecordData = "PACK.OP300B.RecordData";//请求记录数据
    /**
     * OP310
     */
    public static final String PACK_OP310A_RecordData = "PACK.OP310A.RecordData";//请求记录数据
    public static final String PACK_POP282_RecordData = "PACK.POP282.RecordData";//请求记录数据
    public static final String PACK_OP310B_RecordData = "PACK.OP310B.RecordData";//请求记录数据
    public static final String PACK_OP320A_RecordData = "PACK.OP320A.RecordData";//请求记录数据
    public static final String PACK_POP283_RecordData = "PACK.POP283.RecordData";//请求记录数据
    public static final String PACK_OP320B_RecordData = "PACK.OP320B.RecordData";//请求记录数据
    /**
     * OP330
     */
    public static final String PACK_OP330_RecordData = "PACK.OP330.RecordData";//请求记录数据
    public static final String PACK_POP284_RecordData = "PACK.POP284.RecordData";//请求记录数据
//    public static final String PACK_OP330B_RecordData = "PACK.OP330B.RecordData";//请求记录数据
    /**
     * OP380
     */
    public static final String PACK_OP380_RecordData = "PACK.OP380.RecordData";//请求记录数据
    public static final String PACK_POP310_RecordData = "PACK.POP310.RecordData";//请求记录数据
    public static final String PACK_OP380_AngleResult = "PACK.OP380.AngleResult";//请求拧紧数据
    public static final String PACK_POP310_TighteningFrequency = "PACK.POP310.TighteningFrequency";//请求拧紧数据
    /**
     * OP400
     */
    public static final String PACK_OP400_RecordData = "PACK.OP400.RecordData";//请求记录数据
    public static final String PACK_POP330_RecordData = "PACK.POP330.RecordData";//请求记录数据
    public static final String PACK_OP400_AngleResult = "PACK.OP400.AngleResult";//请求拧紧数据
    public static final String PACK_POP330_TighteningFrequency = "PACK.POP330.TighteningFrequency";//请求拧紧数据
    /**
     * OP410
     */
    public static final String PACK_OP410_RecordData = "PACK.OP410.RecordData";//请求记录数据
    public static final String PACK_POP340_RecordData = "PACK.POP340.RecordData";//请求记录数据
    public static final String PACK_OP410_AngleResult = "PACK.OP410.AngleResult";//请求拧紧数据
    public static final String PACK_POP340_TighteningFrequency = "PACK.POP340.TighteningFrequency";//请求拧紧数据
    /**
     * OP440
     */
    public static final String PACK_OP440_RecordData = "PACK.OP440.RecordData";//请求记录数据
    public static final String PACK_OP440_AngleResult = "PACK.OP440.AngleResult";//请求拧紧数据
    public static final String PACK_POP370_RecordData = "PACK.POP370.RecordData";//请求记录数据
    /**
     * OP450
     */
    public static final String PACK_OP450_RecordData = "PACK.OP450.RecordData";//请求记录数据
    public static final String PACK_OP450_AngleResult = "PACK.OP450.AngleResult";//请求拧紧数据
    public static final String PACK_POP380_RecordData = "PACK.POP380.RecordData";//请求记录数据
    /**
     * OP460
     */
    public static final String PACK_OP460_RecordData = "PACK.OP460.RecordData";//请求记录数据
    public static final String PACK_OP460_AngleResult = "PACK.OP460.AngleResult";//请求拧紧数据
    public static final String PACK_POP390_RecordData = "PACK.POP390.RecordData";//请求记录数据
    /**
     * OP500
     *
     */
    public static final String PACK_OP500_RecordData = "PACK.OP500.RecordData";//请求记录数据
    public static final String PACK_POP430_RecordData = "PACK.POP430.RecordData";//请求记录数据
    public static final String PACK_OP500_AngleResult = "PACK.OP500.AngleResult";//请求拧紧数据
    public static final String PACK__AngleResult = "PACK..AngleResult";//请求拧紧数据
    /**
     * OP280
     */
    public static final String PACK_OP280_RecordData = "PACK.OP280.RecordData";//请求记录数据
    public static final String PACK_POP270_RecordData = "PACK.POP270.RecordData";//请求记录数据
    /**
     * OP320
     */
@@ -135,36 +131,36 @@
    /**
     * OP340
     */
    public static final String PACK_OP340A_RecordData = "PACK.OP340A.RecordData";//请求记录数据
    public static final String PACK_POP285_RecordData = "PACK.POP285.RecordData";//请求记录数据
    public static final String PACK_OP340B_RecordData = "PACK.OP340B.RecordData";//请求记录数据
    /**
     * OP350
     */
    public static final String PACK_OP350A_RecordData = "PACK.OP350A.RecordData";//请求记录数据
    public static final String PACK_POP286_RecordData = "PACK.POP286.RecordData";//请求记录数据
    public static final String PACK_OP350B_RecordData = "PACK.OP350B.RecordData";//请求记录数据
    /**
     * OP360
     */
    public static final String PACK_OP360_RecordData = "PACK.OP360.RecordData";//请求记录数据
    public static final String PACK_POP290_RecordData = "PACK.POP290.RecordData";//请求记录数据
    public static final String PACK_OP365_RecordData = "PACK.OP365.RecordData";//请求记录数据
    /**
     * OP370
     */
    public static final String PACK_OP370_RecordData = "PACK.OP370.RecordData";//请求记录数据
    public static final String PACK_POP300_RecordData = "PACK.POP300.RecordData";//请求记录数据
    /**
     * OP390
     */
    public static final String PACK_OP390_RecordData = "PACK.OP390.RecordData";//请求记录数据
    public static final String PACK_POP320_RecordData = "PACK.POP320.RecordData";//请求记录数据
    /**
     * OP470
     */
    public static final String PACK_OP470_RecordData = "PACK.OP470.RecordData";//请求记录数据
    public static final String PACK_POP400_RecordData = "PACK.POP400.RecordData";//请求记录数据
}
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -48,29 +48,36 @@
    private static final Logger logger = LoggerFactory.getLogger("sys-user");
    public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    //新自动工站
    public List<String> automaticList = Arrays.asList("OP280","OP310A","OP310B", "OP300A","OP300B", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470");
    public List<String> automaticList = Arrays.asList("POP270","POP282", "POP281", "POP283", "POP285", "POP286", "POP290","OP365","POP300", "POP320", "POP400");
    //采集模组工位 ModuleCode
    public List<String> moduleCodeList = Arrays.asList("OP300A","OP310A","OP310B","OP300B","OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330");
    //区分模组型号工位
    public List<String> distinguishingModules = Arrays.asList("OP300","OP310", "OP340", "OP350", "OP330");
    public List<String> moduleCodeList = Arrays.asList("POP281","POP282","POP283","POP285","OP365", "POP286", "POP284");
    //区分小车码
    public List<String> agvId = Arrays.asList("OP360", "OP390", "OP470","OP280");
    //区分pack型号的工位
    public List<String> packIdList = Arrays.asList("OP280","OP360","OP390","OP470");
    public List<String> agvId = Arrays.asList("POP290", "POP320", "POP400","POP270");
    //测试设备手动工位
    public List<String> testList = Arrays.asList("OP430-1","OP430-2","OP430-3","OP430-4","OP480-1","OP480-2","OP480-3","OP440");
    public List<String> testList = Arrays.asList("POP360-1","POP360-2","POP360-3","POP360-4","POP410-1","POP410-2","POP410-3","POP370","POP420-1","POP420-2","POP420-3");
    //空的
    public List<String> nullList = Arrays.asList("OP250","OP260");
//    //新自动工站
//    public List<String> automaticList = Arrays.asList("OP280","OP310A","OP310B", "OP300A","OP300B", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470");
//
//    //采集模组工位 ModuleCode
//    public List<String> moduleCodeList = Arrays.asList("OP300A","OP310A","OP310B","OP300B","OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330");
//
//    //区分小车码
//    public List<String> agvId = Arrays.asList("OP360", "OP390", "OP470","OP280");
//
//    //测试设备手动工位
//    public List<String> testList = Arrays.asList("OP430-1","OP430-2","OP430-3","OP430-4","OP480-1","OP480-2","OP480-3","OP440");
//
//
//    //空的
//    public List<String> nullList = Arrays.asList("OP250","OP260");
    public static MiloService miloService;
@@ -219,7 +226,7 @@
//                                }
//
//                                if (deviceInterfaceOne != null && "1".equals(deviceInterfaceOne.getTotalResult())) {
//                                    writeToOpc(RecordDataDoneAddress, (short) 21);
//                                writeToOpcShort(RecordDataDoneAddress, (short) 21);
//                                } else {
//                                    writeToOpc(RecordDataDoneAddress, (short) 22);
//                                }
@@ -233,8 +240,8 @@
                    }
                }
                //保存拧紧数据
                else if (("AngleResult").equals(tab)) {
                    if("1".equals(tabVlaue)||"2".equals(tabVlaue)){
                else if (("TighteningFrequency").equals(tab)) {
                    if(!"0".equals(tabVlaue)){
                        List<String> list = new ArrayList<>();
                        String[] suffixes = {"Torque", "Angle", "TorqueResult", "AngleResult"};
@@ -246,9 +253,7 @@
                        List<Object> collect = list1.stream().map(ReadWriteEntity::getValue).collect(Collectors.toList());
                        String joinedString = String.join(",", collect.toString());
                        WebSocketUsers.sendMessageToUserByText(map.get(device), TightenTheConversionOkNg(joinedString));
                        if(device.contains("270") || device.contains("260")){
                            logger.info("读取到工位{}的Scaner数据:{}",device,TightenTheConversionOkNg(joinedString));
                        }
                        logger.info("读取到工位{}的Scaner数据:{}",device,TightenTheConversionOkNg(joinedString));
                    }
                }
            }
@@ -316,7 +321,7 @@
                    List<DaParamCollection> daParamCollectionList = SaveParamData(snCode,thoroughfare,device,workOrderNo,productCode);
                    //如果是末尾工站要报工
                    if(device.equals("OP500")){
                    if(device.equals("POP430")){
                        RestfulService.getWorkReportResultFeedback(snCode,device,format.format(new Date()));
                        //1、更新工单信息
                        updateOrderInfo(snCode);
@@ -611,7 +616,7 @@
        }
    }
    private static void writeToOpc(String identifier, short value) {
    private static void writeToOpcShort(String identifier, short value) {
        try {
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(identifier).value(value).build());
        } catch (Exception e) {
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -10,6 +10,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.framework.websocket.WebSocketUsers;
@@ -85,76 +86,6 @@
    @PostMapping("/deviceResultFeedback")
    public AjaxResult hdy(@RequestBody ParentVO parentVO)
    {
        //保存
        //过站记录
//        String productNum = parentVO.getProductNum();
//        if (StrUtil.isNotBlank(productNum)){
//            List<OmProductionOrdeInfo> list = productionOrdeInfoService.list(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, productNum));
//            if (CollUtil.isNotEmpty(list)){
//                OmProductionOrdeInfo omProductionOrdeInfo = list.get(0);
//                DaPassingStationCollection passingStationCollection = new DaPassingStationCollection();
//                passingStationCollection.setWorkOrderNo(omProductionOrdeInfo.getWorkOrderNo());
//                passingStationCollection.setSfcCode(productNum);
//                passingStationCollection.setProductCode(omProductionOrdeInfo.getProductCode());
//                passingStationCollection.setLocationCode(parentVO.getStationCode());
//                passingStationCollection.setOutRsSign(parentVO.getTotalResult());
//                passingStationCollection.setCreateTime(new Date());
//
//                List<ChildVO> checkList = parentVO.getCheckList();
//                if (CollUtil.isNotEmpty(checkList)){
//                    List<String> collect = checkList.stream()
//                            .filter(x -> Constants.IN_BOUND_TIME_CODE.equals(x.getItemCode()))
//                            .map(ChildVO::getItemValue)
//                            .collect(Collectors.toList());
//                    if (CollUtil.isNotEmpty(collect)){
//                        String s = collect.get(0);
//                        if (StrUtil.isNotBlank(s)){
//                            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//                            try {
//                                Date parse = simpleDateFormat.parse(s);
//                                passingStationCollection.setInboundTime(parse);
//                            } catch (ParseException e) {
//                                throw new RuntimeException(e);
//                            }
//                        }
//                    }
//                    List<String> collect2 = checkList.stream()
//                            .filter(x -> Constants.OUT_BOUND_TIME_CODE.equals(x.getItemCode()))
//                            .map(ChildVO::getItemValue)
//                            .collect(Collectors.toList());
//                    if (CollUtil.isNotEmpty(collect2)){
//                        String s = collect2.get(0);
//                        if (StrUtil.isNotBlank(s)){
//                            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//                            try {
//                                Date parse = simpleDateFormat.parse(s);
//                                passingStationCollection.setOutboundTime(parse);
//                            } catch (ParseException e) {
//                                throw new RuntimeException(e);
//                            }
//                        }
//                    }
//                    daPassingStationCollectionService.save(passingStationCollection);
//                    //参数保存
//                    List<DaParamCollection> paramCollectionList = new ArrayList<>();
//                    for (ChildVO childVO : checkList) {
//                        DaParamCollection daParamCollection = new DaParamCollection();
//                        daParamCollection.setWorkOrderNo(omProductionOrdeInfo.getWorkOrderNo());
//                        daParamCollection.setSfcCode(productNum);
//                        daParamCollection.setProductCode(omProductionOrdeInfo.getProductCode());
//                        daParamCollection.setLocationCode(omProductionOrdeInfo.getStationCode());
//                        daParamCollection.setParamCode(childVO.getItemCode());
//                        daParamCollection.setParamValue(childVO.getItemValue());
//                        daParamCollection.setCollectionTime(new Date());
//                        daParamCollection.setParamName(childVO.getItemText());
//                        paramCollectionList.add(daParamCollection);
//                    }
//                    if (CollUtil.isNotEmpty(paramCollectionList)){
//                        daParamCollectionService.insertBatch(paramCollectionList);
//                    }
//                }
//            }
//        }
        ObjectMapper mapper = new ObjectMapper();
        List<ChildVO> li = parentVO.getCheckList();
        String s = null;
@@ -191,7 +122,9 @@
//        }catch (Exception e){
//            System.out.println(e.getMessage());
//        }
        logger.info("收到工位{}的测试设备数据入参VO{}" + parentVO.getStationCode(),new Gson().toJson(parentVO));
        HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
        logger.info("工厂MES返回报文{}-工位{}" + execute.body(),parentVO.getStationCode());
        return AjaxResult.success(execute.body());
    }
@@ -230,7 +163,7 @@
        for (BsBeatSetting bsBeatSetting : bsBeatSettingService.list()) {
            String str = bsBeatSetting.getProductCode();
            String[] split = str.split("  ");
            String reportResult = RestfulService.getWorkReportResultFeedback(split[0], "OP500", "2024-06-27 15:48:51");
            String reportResult = RestfulService.getWorkReportResultFeedback(split[0], "", "2024-06-27 15:48:51");
            JSONObject jsonObject = new JSONObject(reportResult);
            String code = jsonObject.getStr("code");
            String status = jsonObject.getJSONObject("data").getStr("resultCode");
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java
@@ -40,7 +40,7 @@
    /**
     * 查询工位终端配置列表
     */
    @PreAuthorize("@ss.hasPermi('sc:stationConf:list')")
//    @PreAuthorize("@ss.hasPermi('sc:stationConf:list')")
    @GetMapping("/list")
    public TableDataInfo list(ScStationConf scStationConf)
    {
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue
@@ -6,22 +6,22 @@
         <span class="head-font">工位编号 : {{headContent.processesCode}}</span>
       </el-card>
     </el-col>
     <el-col :span="17">
     <el-col :span="7">
       <el-card shadow="never">
         <span class="head-font">工位名称 : {{headContent.processesName}}</span>
<!--         <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">串口连接</el-button>-->
<!--         <el-button @click="clearClick" style="float: right" type="danger" size="mini">清除</el-button>-->
       </el-card>
     </el-col>
     <el-col :span="10">
       <el-card shadow="never">
         <span class="head-font">模组码 : {{headContent.module}}</span>
<!--         <el-input v-model="content" style="float: right;width: 150px;" placeholder="请输入内容"></el-input>-->
<!--         <el-button @click="scanCompleted" style="float: right" type="primary">扫码完成</el-button>-->
         <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">串口连接</el-button>
         <el-button @click="clearClick" style="float: right" type="danger" size="mini">清除</el-button>
       </el-card>
     </el-col>
<!--     <el-col :span="10">-->
<!--       <el-card shadow="never">-->
<!--         <span class="head-font">产品序列号 : {{headContent.sfcCode}}</span>-->
<!--&lt;!&ndash;         <el-input v-model="content" style="float: right;width: 150px;" placeholder="请输入内容"></el-input>&ndash;&gt;-->
<!--&lt;!&ndash;         <el-button @click="scanCompleted" style="float: right" type="primary">扫码完成</el-button>&ndash;&gt;-->
<!--         <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">串口连接</el-button>-->
<!--         <el-button @click="clearClick" style="float: right" type="danger" size="mini">清除</el-button>-->
<!--       </el-card>-->
<!--     </el-col>-->
   </el-row>
   <el-row :gutter="5" style="margin-top: 5px">
@@ -31,6 +31,12 @@
           <i class="el-icon-tickets"></i>
           <span style="font-weight: bold">当前工位信息</span>
         </div>
         <el-descriptions :column="1" border :content-style="{'min-width': '140px'}">
           <el-descriptions-item label="开始时间">
             <span>{{workpieceInformation.inboundTime}}</span>
           </el-descriptions-item>
         </el-descriptions>
         <el-divider></el-divider>
         <el-row>
           <el-col :span="12">
             <el-button class="circle-button" :class="cakeLamp.plcState ? 'circle-green-animate':'circle-red'" circle></el-button>
@@ -67,13 +73,6 @@
             <span>&nbsp;允许放行</span>
           </el-col>
         </el-row>
         <el-divider></el-divider>
         <el-row style="margin-top: 20px">
           <span style="width: 130px;" class="head-font">模组码A : {{headContent.moduleA}}</span>
         </el-row>
         <el-row style="margin-top: 20px">
           <span style="width: 130px;" class="head-font">模组码B : {{headContent.moduleB}}</span>
         </el-row>
       </el-card>
@@ -245,6 +244,7 @@
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {
  clearWorkpieceRelease,
  jrmUpdateResults, jrmWorkpieceRelease,
  listFormulaChild,
  noPageListFormulaChild,
@@ -299,15 +299,15 @@
        sfcCode: '',
        yzSfcCode: '',
        cardCode: '',
        moduleA: '',
        moduleB: '',
        module: '',
        // moduleB: '',
      },
      workpieceInformation: {
        workOrderNo: null,
        productCode: null,
        productModel: null,
        productName: null,
        beat: null,
        inboundTime: null,
      },
      // 查询参数
      queryParams: {
@@ -331,7 +331,8 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.2.76:8080/websocket/message/",
      url: "ws://10.103.210.248:8080/websocket/message/",
      // url: "ws://192.168.2.76:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -422,9 +423,9 @@
    serialPortMethod(value){
      let formulaChildParams = {
        scanBarcode: value,
        sfcBarcode: this.headContent.moduleA+','+this.headContent.moduleB,
        sfcBarcode: this.headContent.module,
        // workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: '1P102S',
        productCode: 'PE01B',
        locationCode: this.headContent.processesCode,
        collectionTime: new Date()
      }
@@ -444,6 +445,19 @@
      }
      return '';
    },
    getCurrentTime() {
      const now = new Date();
      const year = now.getFullYear();
      const month = this.padTimeUnit(now.getMonth() + 1); // 月份是从0开始的
      const day = this.padTimeUnit(now.getDate());
      const hours = this.padTimeUnit(now.getHours());
      const minutes = this.padTimeUnit(now.getMinutes());
      const seconds = this.padTimeUnit(now.getSeconds());
      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
    padTimeUnit(value) {
      return value.toString().padStart(2, '0');
    },
    getElement() {
      let temp33 = document.getElementsByClassName('el-table__row')
      console.log('temp33',temp33)
@@ -459,7 +473,7 @@
    getListFormulaChild() {
      console.log('getListFormulaChild')
      // this.formulaChildList = []
      this.formulaChildParams.productCode = '1P102S'
      this.formulaChildParams.productCode = 'PE01B'
      this.formulaChildParams.processesCode = this.headContent.processesCode
      console.log(this.formulaChildParams)
      noPageListFormulaChild(this.formulaChildParams).then(response => {
@@ -498,25 +512,24 @@
      this.workpieceInformation.productModel = null;
      this.workpieceInformation.productName = null;
      this.headContent.sfcCode = '';
      this.headContent.moduleB = '';
      this.headContent.moduleA = '';
      this.workpieceInformation.inboundTime = null;
      this.headContent.module = '';
    },
    changeMenu(tab, event) {
      console.log(tab, event);
    },
    clearClick(){
      const param = {
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: "1P102S",
        productCode: "PE01B",
        locationCode: this.headContent.processesCode,
        productBarcode: this.headContent.moduleA+','+this.headContent.moduleB,
      }
      jrmSaveCampaignTimeParameters(param).then(response => {});
      this.cakeLamp.release = 1;
      // jrmSaveCampaignTimeParameters(param).then(response => {});
      // this.cakeLamp.release = 1;
      this.endClear()
      clearWorkpieceRelease(param).then(response => {});
      // workpieceRelease(param).then(response => {});
      jrmWorkpieceRelease(param).then(response => {});
      // this.$message('这是一条清除消息提示');
      // jrmWorkpieceRelease(param).then(response => {});
      this.$message('这是一条清除消息提示');
      // this.headContent.sfcCode = null
    },
    scanCompleted(){
@@ -531,8 +544,9 @@
    },
    /** 查询工单列表 */
    async getList() {
      this.workpieceInformation.inboundTime = this.getCurrentTime()
      this.getListFormulaChild()
      this.addOverStationCollection()
      // this.addOverStationCollection()
    },
    /** 入站增加过站采集记录 **/
@@ -545,7 +559,7 @@
        locationCode: this.headContent.processesCode,
        // model: this.workpieceInformation.productModel,
        // productBarcode: this.headContent.sfcCode,
        sfcCode: this.headContent.moduleA+','+this.headContent.moduleB,
        sfcCode: this.headContent.module,
        inboundTime: new Date()
      }
      jrmAddPassingStationCollection(this.passingStationForm).then(response => {});
@@ -603,11 +617,23 @@
        } else if (event.data === "OUT") {
          self.cakeLamp.release = 1;
        } else if (event.data === "END") {
          const formulaChildIndex = self.formulaChildList.length-1
          if(self.headContent.module=== ''||self.headContent.module=== null){
            self.$message.error('模组码为空,请扫码!')
            return;
          }
          if(self.formulaChildList[formulaChildIndex].results !== 'OK'){
            self.$message('未做完工序禁止放行');
            return;
          }
          const param = {
            workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: "1P102S",
            productCode: "PE01B",
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.moduleA+','+self.headContent.moduleB,
            productBarcode: self.headContent.module,
            inboundTime: self.workpieceInformation.inboundTime
          }
          jrmSaveCampaignTimeParameters(param).then(response => {});
          self.cakeLamp.release = 1;
@@ -654,14 +680,11 @@
        const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, '');
        console.log("串口收到数据-------------------"+scanValue)
        if(this.headContent.moduleA !== '' && this.headContent.moduleB !== '' ){
        if(this.headContent.module !== ''){
          this.serialPortMethod(scanValue)
        } else {
          if(scanValue.includes("9900168135")){
            this.headContent.moduleA = scanValue;
          }
          if(scanValue.includes("9900168136")){
            this.headContent.moduleB = scanValue;
            this.headContent.module = scanValue;
            this.$message('扫码识别产品序列号'+scanValue);
            this.getList()
            // this.cakeLamp.InPlace = 1
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -30,17 +30,19 @@
           <span slot="label"> <a class="el-icon-date"></a>首页</span>
           <el-col :span="24">
             <el-table height="500" :cell-style="rowStyle" :data="formulaChildList">
               <el-table-column label="排序" width="60" align="center" type="index">
<!--               <el-table-column label="排序" width="60" align="center" type="index">-->
<!--               </el-table-column>-->
               <el-table-column label="拧紧步号" width="80" align="center" prop="stepSort">
               </el-table-column>
               <el-table-column label="操作内容" :show-overflow-tooltip='true' align="center" prop="operationSteps">
               </el-table-column>
               <el-table-column label="产品编号" align="center" prop="productCode">
               <el-table-column label="产品编号" width="80" align="center" prop="productCode">
               </el-table-column>
               <el-table-column label="物料编码" align="center" prop="materialCode">
               <el-table-column label="物料编码" width="140" align="center" prop="materialCode">
               </el-table-column>
               <el-table-column label="采集值" align="center" prop="collectData">
               </el-table-column>
               <el-table-column label="结果" align="center" prop="results">
               <el-table-column label="结果" width="60" align="center" prop="results">
               </el-table-column>
             </el-table>
           </el-col>
@@ -360,7 +362,7 @@
        scanBarcode: value,
        sfcBarcode: this.headContent.sfcCode,
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: "1P102S",
        productCode: "PE01B",
        locationCode: this.headContent.processesCode,
        collectionTime: new Date()
      }
@@ -378,7 +380,7 @@
    },
    /** 查询配方配置子信息列表 */
    getListFormulaChild() {
      this.formulaChildParams.productCode = "1P102S"
      this.formulaChildParams.productCode = "PE01B"
      this.formulaChildParams.processesCode = this.headContent.processesCode
      console.log(this.formulaChildParams)
      noPageListFormulaChild(this.formulaChildParams).then(response => {
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -124,7 +124,7 @@
<!--               </el-table-column>-->
               <el-table-column label="产品编号" width="80" align="center" prop="productCode">
               </el-table-column>
               <el-table-column label="物料编码" width="110" align="center" prop="materialCode">
               <el-table-column label="物料编码" width="140" align="center" prop="materialCode">
               </el-table-column>
               <el-table-column label="采集值" align="center" prop="collectData">
               </el-table-column>
@@ -391,6 +391,7 @@
      },
      content: '',
      activeName: 'first',
      // url: "ws://192.168.2.248:8080/websocket/message/",
      url: "ws://10.103.210.248:8080/websocket/message/",
      // url: "ws://192.168.2.76:8080/websocket/message/",
      message: "",
@@ -714,27 +715,15 @@
          const formulaChildIndex = self.formulaChildList.length-1
          const orderParam = {
            productNum: self.headContent.sfcCode,
          }
          if(self.headContent.sfcCode=== ''||self.headContent.sfcCode=== null){
            self.$message('总成码为空,请扫码!')
            return;
          }
          // if(self.headContent.cardCode === null || self.headContent.cardCode === ''){
          //   self.$alert('<strong style="color: red;font-size: 30px">未扫描小车码禁止放行</strong>', '提示', {
          //     dangerouslyUseHTMLString: true
          //   });
          //   return;
          // }
          if(self.formulaChildList[formulaChildIndex].results !== 'OK'){
            self.$message('未做完工序禁止放行');
            return;
          }
          const param = {
            workOrderNo: self.workpieceInformation.workOrderNo,
@@ -880,7 +869,7 @@
          //   this.headContent.yzSfcCode = scanValue
          //   this.bindYzSfc();
          // }else
          if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'OP240'){
          if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'POP240'){
            this.headContent.cardCode = scanValue
            this.bindcardCode(scanValue);
            this.serialPortMethod(scanValue)
@@ -890,7 +879,7 @@
            this.serialPortMethod(scanValue)
          }
        } else {
          if(this.headContent.processesCode === 'OP240'){
          if(this.headContent.processesCode === 'POP240'){
            this.headContent.sfcCode = scanValue;
            this.queryParams.productNum = scanValue;
            this.getList()
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -476,14 +476,14 @@
  methods: {
    onlineWorkReporting(row){
      const id = row.id || this.ids
      const stationCode = "OP230"
      const stationCode = "POP230"
      workReportingByStation(id,stationCode).then(response => {
        this.getList()
      });
    },
    offlineWorkReporting(row){
      const id = row.id || this.ids
      const stationCode = "OP500"
      const stationCode = "POP430"
      workReportingByStation(id,stationCode).then(response => {
        this.getList()
      });