admin
2024-07-15 273d640de28fc7fe55add05a9bc7ea1c19eca830
-切换大模组代码更改
已修改15个文件
978 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/domain/BsFormulaChildInfo.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 380 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java 175 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -5,8 +5,11 @@
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jcdm.main.constant.Constants;
import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.service.MiloService;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -42,7 +45,64 @@
    private IBsFormulaChildInfoService bsFormulaChildInfoService;
    @Autowired
    private IOmProductionOrdeInfoService omProductionOrdeInfoService;
    @Autowired
    private MiloService miloService;
    /**
     * 扫码确认
     */
    @GetMapping("/inPlaceInspection")
    public AjaxResult inPlaceInspection(BsFormulaChildInfo bsFormulaChildInfo)
    {
        Integer recordDataDone = 0;
        try {
            Object orderNumberObject = miloService.readFromOpcUa("PACK."+bsFormulaChildInfo.getProcessesCode()+".RecordDataDone").getValue();
            if(ObjectUtil.isNotEmpty(orderNumberObject)){
                if(Integer.valueOf(orderNumberObject.toString()) == 11){
                    recordDataDone = 1;
                }
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return AjaxResult.success(recordDataDone);
    }
    /**
     * 扫码确认
     */
    @GetMapping("/unfinishedProcess")
    public AjaxResult unfinishedProcess(BsFormulaChildInfo bsFormulaChildInfo)
    {
        try {
            String str = "PACK."+bsFormulaChildInfo.getProcessesCode()+".RecordDataDone";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(bsFormulaChildInfo.getRecordDataDone()).build());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return AjaxResult.success();
    }
    @GetMapping("/manualNgOffline")
    public AjaxResult manualNgOffline(BsFormulaChildInfo bsFormulaChildInfo)
    {
        Integer stepNumber = 90;
        try {
            String str = "PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>()
                .eq(OmProductionOrdeInfo::getProductNum, bsFormulaChildInfo.getSfcBarcode())
        );
        one.setArtificialNgFlag("1");
        omProductionOrdeInfoService.saveOrUpdate(one);
        return AjaxResult.success(stepNumber);
    }
    /**
     * 扫码确认
@@ -93,9 +153,6 @@
            list.addAll(collect2);
        }
        for (BsFormulaChildInfo formulaChildInfo : list) {
//            formulaChildInfo.setSort(formulaChildInfo.getStepSort());
//            formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement());
//            formulaChildInfo.setImg(formulaChildInfo.getOperationSteps());
            if(formulaChildInfo.getCollectData()!=null&& !"".equals(formulaChildInfo.getCollectData())){
                if(formulaChildInfo.getCollectData().contains("[")){
                    String data = formulaChildInfo.getCollectData();
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/domain/BsFormulaChildInfo.java
@@ -103,6 +103,16 @@
    @Excel(name = "结果")
    private String results;
    @Excel(name = "ng次数")
    private Integer ngTimes;
    @Excel(name = "ng采集数据")
    private String ngCollectData;
    /** 结果 */
    @Excel(name = "ng结果")
    private String ngResults;
    @TableField(exist = false)
    private String sort;
@@ -131,6 +141,9 @@
    private String scanBarcode;
    @TableField(exist = false)
    private Integer recordDataDone;
    @TableField(exist = false)
    private String sfcBarcode;
    @TableField(exist = false)
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -8,6 +8,7 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -190,6 +191,12 @@
                }
            }
        }
//        for (BsFormulaChildInfo formulaChildInfo : infos) {
//            if(bsFormulaChildInfo.getScanBarcode().contains(formulaChildInfo.getMaterialCode())) {
//                bsFormulaChildInfos.add(formulaChildInfo);
//                break;
//            }
//        }
        if(bsFormulaChildInfos.size()>0){
            String spareField4 = bsFormulaChildInfos.get(0).getSpareField4();
            bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getScanBarcode());
@@ -387,6 +394,7 @@
        updateWrapper.set(BsFormulaChildInfo::getCollectData, "");
        updateWrapper.set(BsFormulaChildInfo::getResults,"");
        updateWrapper.eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode());
        updateWrapper.eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode());
        BsFormulaChildInfo info = new BsFormulaChildInfo();
        boolean update = this.update(info,updateWrapper);
        return AjaxResult.success(update);
@@ -495,9 +503,10 @@
        daParamCollectionTemp.setParamValue(bsFormulaChildInfo.getParamValue());
        daParamCollectionTemp.setProductCode(bsFormulaChildInfo.getProductCode());
        daParamCollectionTemp.setCollectionTime(new Date());
        daParamCollection.setSfcCode(scanBarCode);
        daParamCollectionTemp.setSfcCode(scanBarCode);
        daParamCollectionTempService.save(daParamCollectionTemp);
        boolean save = daParamCollectionTempService.save(daParamCollectionTemp);
        System.out.println(save);
    }
    @Override
@@ -536,12 +545,16 @@
        String paramCode = bsFormulaChildInfo.getTightenTheArray();
        if(paramCode.contains("NG")){
       /*     List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
            bsFormulaChildInfos.get(0).setResults("NG");
            bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray());
*/
            bsFormulaChildInfo.setResults("NG");
            bsFormulaChildInfo.setCollectData(bsFormulaChildInfo.getTightenTheArray());
//            Integer ngTimes = bsFormulaChildInfo.getNgTimes();
//            bsFormulaChildInfo.setNgTimes(ngTimes+1);
//            if(ngTimes > 3){
//                WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "NG");
//                this.recordNgTighteningData(bsFormulaChildInfo.getLocationCode(), bsFormulaChildInfo.getProductCode());
//                return AjaxResult.error("超过三次拧紧 pack NG下线!");
//            }
            bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfo);
            return AjaxResult.error("拧紧结果NG,请重新拧紧!");
        }else {
@@ -568,13 +581,6 @@
                    // 执行操作
                    if(spareField4.equals("1")){
                        try {
    //                        //更新过站记录表出站时间
    //                        DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
    //                        daPassingStationCollection.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
    //                        List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
    //                        daPassingStationCollections.get(0).setOutboundTime(new Date());
    //                        daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
//                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
                            WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT");
                        } catch (Exception e) {
                            throw new RuntimeException(e);
@@ -597,6 +603,21 @@
        return AjaxResult.success("拧紧成功!");
    }
    public void recordNgTighteningData(String locationCode,String productCode){
        List<BsFormulaChildInfo> ngFormulaList = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
                .eq(BsFormulaChildInfo::getProcessesCode, locationCode)
                .eq(BsFormulaChildInfo::getProductCode, productCode)
        );
        List<BsFormulaChildInfo> filteredList = ngFormulaList.stream()
                .filter(formula -> formula.getResults() != null && !formula.getResults().isEmpty())
                .collect(Collectors.toList());
        for (BsFormulaChildInfo childInfo : filteredList) {
            childInfo.setNgCollectData(childInfo.getCollectData());
            childInfo.setNgResults(childInfo.getResults());
            bsFormulaChildInfoMapper.updateBsFormulaChildInfo(childInfo);
        }
    }
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -259,6 +259,7 @@
                daParamCollectionTemp.setSfcCode(daParamCollection.getProductBarcode());
                daParamCollectionTemp.setLocationCode(daParamCollection.getLocationCode());
                daParamCollectionTemp.setProductCode(daParamCollection.getProductCode());
                daParamCollectionTemp.setWorkOrderNo(daParamCollection.getWorkOrderNo());
                daParamCollectionTempService.save(daParamCollectionTemp);
            }
        }
@@ -339,7 +340,7 @@
                //给opc发21
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
                if(daParamCollection.getLocationCode().equals("OP240")){
                if(daParamCollection.getLocationCode().equals("POP240")){
                    try{
                        CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                            logger.info("OP230报工开始-工厂MES异步方法");
@@ -520,20 +521,8 @@
            for (DaParamCollectionTemp daParamCollection : paramList) {
                ChildVO childVO = new ChildVO();
                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()));
                DaCollectionParamConf paramConfOne = paramConfOneList.get(0);
//                if(childOne!=null){
//                    String operationType = childOne.getOperationType();
//                    if(operationType.equals("1")){
//                        childVO.setItemType("2");
//                    }else if(operationType.equals("2")){
//                        childVO.setItemType("1");
//                    }
//                }else {
//                    childVO.setItemType("3");
//                }
                if(paramConfOne!=null){
                    childVO.setItemType(paramConfOne.getSpareField1());
                    childVO.setItemText(paramConfOne.getCollectParameterName());
@@ -559,26 +548,21 @@
            parentVO.setCheckList(listChildVo);
            try{
                CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                    logger.info("开始执行异步方法");
                    logger.info("工位{}---开始执行异步方法---pack码是{}"+stationCode,packID);
                    HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
                    logger.info("异步方法执行结束");
                    logger.info("手动工位{}传工厂入参VO{}" + stationCode,new Gson().toJson(parentVO));
                    logger.info("手动工位{}传工厂MES异步方法{}"+stationCode,execute.body());
                    logger.info("工位{}---异步方法执行结束---pack码是{}"+stationCode,packID);
                    logger.info("手动工位{}传工厂入参VO{}---pack码是{}" + stationCode,new Gson().toJson(parentVO),packID);
                    logger.info("手动工位{}传工厂MES异步方法{}---pack码是{}"+stationCode,execute.body(),packID);
                    DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
                    daParamCollectionTemp.setSfcCode(packID);
                    daParamCollectionTemp.setLocationCode(stationCode);
                    int i = daParamCollectionTempService.deleteDaParamCollectionTempBySfcCodeAndLocationCode(daParamCollectionTemp);
                    logger.info("删除临时表数据条数{}-工位{}-pack码{}",i,stationCode,packID);
//                    List<Long> idsList = paramList.stream().map(DaParamCollectionTemp::getId).collect(Collectors.toList());
//                    Long[] array = idsList.toArray(new Long[0]);
//                    int i = daParamCollectionTempService.deleteDaParamCollectionTempByIds(array);
//                    logger.info("删除临时表数据条数{}-工位{}-pack码{}",i,stationCode,packID);
                });
            }catch (Exception e){
                System.out.println(e.getMessage());
            }
//            HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
            logger.info("结束人工工位推送工厂MES数据方法-pushGeelycvMesFeedback-工位{}-pack码{}",stationCode,packID);
        }
@@ -588,8 +572,8 @@
    public void automaticWorkstationPushGeelycvMesFeedback(String packID, String stationCode,List<DaParamCollection> paramList) {
        logger.info("进入工位{}-工厂MES推送数据方法automaticWorkstationPushGeelycvMesFeedback",stationCode);
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
        String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
        String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
//        String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
        String totalResult = "0";
        if(paramList.size() > 0){
            logger.info("进入工位{}-拼数据",stationCode);
@@ -608,16 +592,6 @@
//                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()));
                DaCollectionParamConf paramConfOne = paramConfOneList.get(0);
//                if(childOne!=null){
//                    String operationType = childOne.getOperationType();
//                    if(operationType.equals("1")){
//                        childVO.setItemType("2");
//                    }else if(operationType.equals("2")){
//                        childVO.setItemType("1");
//                    }
//                }else {
//                    childVO.setItemType("3");
//                }
                if(paramConfOne!=null){
                    childVO.setItemType(paramConfOne.getSpareField1());
                    childVO.setItemText(paramConfOne.getCollectParameterName());
@@ -644,9 +618,9 @@
            logger.info("进入工位{}-工厂MES推送数据方法HttpResponseSend",stationCode);
            try{
                CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                    logger.info("开始执行异步方法");
                    logger.info("工位{}---自动工位开始执行异步方法---pack码是{}"+stationCode,packID);
                    HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
                    logger.info("异步方法执行结束");
                    logger.info("工位{}---自动工位异步方法执行结束---pack码是{}"+stationCode,packID);
                    logger.info("自动工位{}传工厂入参VO{}" + stationCode,new Gson().toJson(parentVO));
                    logger.info("自动工位{}传工厂MES异步方法返回{}"+stationCode,execute.body());
                });
@@ -745,6 +719,18 @@
            saveData.setCollectionTime(new Date());
            saveData.setParamValue(value);
            daParamCollectionMapper.insertDaParamCollection(saveData);
            DaParamCollectionTemp saveDataTemp = new DaParamCollectionTemp();
            saveDataTemp.setWorkOrderNo(daParamCollection.getWorkOrderNo());
            saveDataTemp.setProductCode(daParamCollection.getProductCode());
            saveDataTemp.setLocationCode(daParamCollection.getLocationCode());
            saveDataTemp.setSfcCode(daParamCollection.getProductBarcode());
            saveDataTemp.setParamCode(daCollectionParamConfs.get(0).getCollectParameterId());
            saveDataTemp.setParamName(daCollectionParamConfs.get(0).getCollectParameterName());
            saveDataTemp.setCollectionTime(new Date());
            saveDataTemp.setParamValue(value);
            daParamCollectionTempService.save(saveDataTemp);
        });
    }
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -138,11 +138,12 @@
                omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode"));
                omProductionOrdeInfo.setOnlineCompletionMark("0");
                omProductionOrdeInfo.setSfResult("0");
                if(dataObject.getStr("model").equals("PE01A")){
                    omProductionOrdeInfo.setProductCode("PE01B");
                if(dataObject.getStr("model").equals("PE01B")){
                    omProductionOrdeInfo.setSoftwareVersionCode("2");
                }else {
                    omProductionOrdeInfo.setProductCode(dataObject.getStr("model"));
                    omProductionOrdeInfo.setSoftwareVersionCode("0");
                }
                omProductionOrdeInfo.setProductCode(dataObject.getStr("model"));
                omProductionOrdeInfo.setCreateTime(new Date());
                omProductionOrdeInfo.setCreateUser("工厂MES");
                omProductionOrdeInfoService.save(omProductionOrdeInfo);
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
@@ -15,6 +16,7 @@
 * @author ruimin
 * @date 2023-12-11
 */
@Data
public class OmProductionOrdeInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;
@@ -190,6 +192,22 @@
    /** 预留字段4 */
    private String spareField4;
    /** 自动站ng标记,用于返修补数据 */
    @Excel(name = "自动站ng标记,用于返修补数据")
    private String automaticNgFlag;
    /** 自动站ng工位 */
    @Excel(name = "自动站ng工位")
    private String automaticNgStation;
    /** 自动站ng螺丝号 */
    @Excel(name = "自动站ng螺丝号")
    private String automaticNgScrewNumber;
    /** 人工站ng标记 */
    @Excel(name = "人工站ng标记")
    private String artificialNgFlag;
    @TableField(exist = false)
    private Long[] idNums;
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -110,7 +110,7 @@
        lists.add(OPCElement.PACK_POP286_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP350B_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP290_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP365_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP365_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP300_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP320_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_POP400_RecordData);//请求记录数据
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -2,12 +2,10 @@
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.framework.websocket.WebSocketUsers;
import com.jcdm.main.constant.Constants;
@@ -17,28 +15,23 @@
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
import com.jcdm.main.da.testDeviceInterface.domain.DaTestDeviceInterface;
import com.jcdm.main.da.testDeviceInterface.service.IDaTestDeviceInterfaceService;
import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
import com.jcdm.main.plcserver.conf.OPCElement;
import com.jcdm.main.plcserver.util.TimeUtil;
import com.jcdm.main.restful.factoryMes.service.RestfulService;
import com.jcdm.main.restful.qingYan.doman.ChildVO;
import com.jcdm.main.restful.qingYan.doman.ParentVO;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.runner.subscription.SubscriptionCallback;
import com.kangaroohy.milo.service.MiloService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.websocket.Session;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
@Slf4j
@@ -122,146 +115,134 @@
                String tab = nodes[2];//标记
                String tabVlaue = value.toString();//地址值
                if (("RecordData").equals(tab)) {
                    String recordDataDoneValue = "";
                    if("1".equals(tabVlaue)){
                        //请求工单
//                        if(device.equals("OP230")){
//                            getFactoryOrder("OP230");
//                        }
                        //自动工位
                        if(automaticList.stream().anyMatch(s -> s.equals(device))){
                            //plc给我们一个模组码,拿模组码校验出型号
                            if(moduleCodeList.stream().anyMatch(s -> s.equals(device))) {
                                String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                                //读模组码
                                Object moduleCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue();
                                if(device.equals("OP365")){
                                    Object moduleCodeA = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCodeA").getValue();
                                    Object moduleCodeB = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCodeB").getValue();
                                    if(moduleCodeA!=null && moduleCodeB!=null){
                                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
                                    }else {
                                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(12).build());
                                    }
                                    return;
                                }
                                if(moduleCode!=null){
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
                                }else {
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(12).build());
                                }
                            }else {
                                if(agvId.stream().anyMatch(s -> s.equals(device))){
                                    Object agvIdObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".AGVID").getValue();
                                    //agvId 小车码是否为空
                                    if(agvIdObject!=null){
                                        String PACKCode = thoroughfare + "." + device + ".MPACKCode";
                                        OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getTrolleyYard, agvIdObject.toString()));
                                        //小车码查找工单是否为空
                                        if(one!=null){
                                            String packId = one.getProductNum();
                                            miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(PACKCode).value(packId).build());
                                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build());
                                        }else {
                                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build());
                                        }
                                    }else {
                                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build());
                                    }
                                }else {
                                    String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                                    Object packCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".PACKCode").getValue();
                                    if(packCodeObject!=null){
                                        //pack 如果区分型号的话就要处理
                                        //记录数据完成
                                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
                                    }else {
                                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(12).build());
                                    }
                                }
                            }
                        }else {
                            //手动工位处理逻辑
//                            if (map.containsKey(device)){
                                WebSocketUsers.sendMessageToUserByText(map.get(device), "IN");
                                String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
//                            }
                        }
                    }else if("2".equals(tabVlaue)){
                        if(automaticList.stream().anyMatch(s -> s.equals(device))){
                            //自动工位
                            //出站保存数据
                            outSaveDate(thoroughfare,device);
                            //记录数据完成
                            /*String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(Integer.valueOf(recordDataDoneValue)).build());*/
                        }else {
                            //手动工位
//                            if(device.contains("OP330")){
//                                String str = device.substring(0,5);
//                                WebSocketUsers.sendMessageToUserByText(map.get(str), "END");
//                            }else {
                                WebSocketUsers.sendMessageToUserByText(map.get(device), "END");
//                            }
                            if(testList.stream().anyMatch(s -> s.equals(device))){
                                String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build());
//                                Object packCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue();
//                                DaTestDeviceInterface deviceInterfaceOne = null;
//
//                                if (ObjectUtil.isNotNull(packCodeObject)) {
//                                    String modelCode = packCodeObject.toString();
//                                    deviceInterfaceOne = daTestDeviceInterfaceService.getOne(new LambdaQueryWrapper<DaTestDeviceInterface>()
//                                            .eq(DaTestDeviceInterface::getProductNum, modelCode)
//                                            .eq(DaTestDeviceInterface::getStationCode, device));
//                                }
//
//                                if (deviceInterfaceOne != null && "1".equals(deviceInterfaceOne.getTotalResult())) {
//                                writeToOpcShort(RecordDataDoneAddress, (short) 21);
//                                } else {
//                                    writeToOpc(RecordDataDoneAddress, (short) 22);
//                                }
//                                writeToOpc(RecordDataDoneAddress, (short) 21);
                            }
                        }
                    }else {
                        System.out.println("^");
                    }
                }
                //保存拧紧数据
                else if (("TighteningFrequency").equals(tab)) {
                    if(!"0".equals(tabVlaue)){
                        List<String> list = new ArrayList<>();
                        String[] suffixes = {"Torque", "Angle", "TorqueResult", "AngleResult"};
                        for (String suffix : suffixes) {
                            String string = thoroughfare + "." + device + "." + suffix;
                            list.add(string);
                        }
                        List<ReadWriteEntity> list1 = miloService.readFromOpcUa(list);
                        List<Object> collect = list1.stream().map(ReadWriteEntity::getValue).collect(Collectors.toList());
                        String joinedString = String.join(",", collect.toString());
                        WebSocketUsers.sendMessageToUserByText(map.get(device), TightenTheConversionOkNg(joinedString));
                        logger.info("读取到工位{}的Scaner数据:{}",device,TightenTheConversionOkNg(joinedString));
                    }
                }
                CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                    subHandle(thoroughfare,device,tab,tabVlaue);
                });
            }
        } catch (Exception e) {
            logger.info("订阅方法报错:{}"+e.getMessage());
            logger.error("订阅方法报错",e);
        }
    }
    public void subHandle(String thoroughfare,String device,String tab,String tabVlaue){
        try {
            String prefix = thoroughfare + "." + device + ".";
            if (("RecordData").equals(tab)) {
                String recordDataDoneValue = "";
                if("1".equals(tabVlaue)){
                    //自动工位
                    if(automaticList.stream().anyMatch(s -> s.equals(device))){
                        //plc给我们一个模组码,拿模组码校验出型号
                        if(moduleCodeList.stream().anyMatch(s -> s.equals(device))) {
                            String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                            //读模组码
                            Object moduleCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue();
                            if(device.equals("OP365")){
//                                Object moduleCodeA = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCodeA").getValue();
//                                Object moduleCodeB = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCodeB").getValue();
//                                if(moduleCodeA!=null && moduleCodeB!=null){
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
//                                }else {
//                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(12).build());
//                                }
                            }else {
                                if(moduleCode!=null){
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
                                }else {
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(12).build());
                                }
                            }
                        }else {
                            if(agvId.stream().anyMatch(s -> s.equals(device))){
                                Object agvIdObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".AGVID").getValue();
                                //agvId 小车码是否为空
                                if(agvIdObject!=null){
                                    String PACKCode = thoroughfare + "." + device + ".MPACKCode";
                                    OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getTrolleyYard, agvIdObject.toString()));
                                    //小车码查找工单是否为空
                                    if(one!=null){
                                        String packId = one.getProductNum();
                                        String workOrderNo = one.getWorkOrderNo();
                                        if(!one.getSoftwareVersionCode().equals("") &&one.getSoftwareVersionCode()!=null){
                                            Integer packModel = Integer.valueOf(one.getSoftwareVersionCode());
                                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(prefix + "MProductType").value(packModel).build());
                                        }
                                        miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(PACKCode).value(packId).build());
                                        miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(prefix + "MWorkOrderNumber").value(workOrderNo).build());
                                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build());
                                    }else {
                                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build());
                                    }
                                }else {
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build());
                                }
                            }else {
                                String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                                Object packCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".PACKCode").getValue();
                                if(packCodeObject!=null){
                                    //pack 如果区分型号的话就要处理
                                    //记录数据完成
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
                                }else {
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(12).build());
                                }
                            }
                        }
                    }else {
                        //手动工位处理逻辑
                        WebSocketUsers.sendMessageToUserByText(map.get(device), "IN");
                        String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build());
                    }
                }else if("2".equals(tabVlaue)){
                    if(automaticList.stream().anyMatch(s -> s.equals(device))){
                        //自动工位
                        //出站保存数据
                        outSaveDate(thoroughfare,device);
                        //记录数据完成
                            /*String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(Integer.valueOf(recordDataDoneValue)).build());*/
                    }else {
                        //手动工位测试工位出站
                        WebSocketUsers.sendMessageToUserByText(map.get(device), "END");
                        if(testList.stream().anyMatch(s -> s.equals(device))){
                            String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build());
                        }
                    }
                }else {
                    System.out.println("^");
                }
            }
            //保存拧紧数据
            else if (("TighteningFrequency").equals(tab)) {
                if(!"0".equals(tabVlaue)){
                    List<String> list = new ArrayList<>();
                    String[] suffixes = {"Torque", "Angle", "TorqueResult", "AngleResult"};
                    for (String suffix : suffixes) {
                        String string = thoroughfare + "." + device + "." + suffix;
                        list.add(string);
                    }
                    List<ReadWriteEntity> list1 = miloService.readFromOpcUa(list);
                    List<Object> collect = list1.stream().map(ReadWriteEntity::getValue).collect(Collectors.toList());
                    String joinedString = String.join(",", collect.toString());
                    WebSocketUsers.sendMessageToUserByText(map.get(device), TightenTheConversionOkNg(joinedString));
                    logger.info("读取到工位{}的Scaner数据:{}",device,TightenTheConversionOkNg(joinedString));
                }
            }
        }catch (Exception e){
            logger.error("订阅方法报错",e);
        }
    }
@@ -339,37 +320,6 @@
        }
    }
//    /**
//     * 出站保存数据
//     */
//    public String outSaveDate(String thoroughfare,String device) {
//        String result = "";
//        try {
//            //读取SNCode
//            String PACKCode = thoroughfare + "." + device + ".PACKCode";
//            Object PACKCodeObject = miloService.readFromOpcUa(PACKCode).getValue();
//            if(null == PACKCodeObject || "".equals(PACKCodeObject)){
//               result = "22";
//            }else{
//                String PACKCodeParam = PACKCodeObject.toString();
//                //1、更新工单信息
//                //updateOrderInfo();
//                //2、保存过站采集数据
//                saveStationInfo(PACKCodeParam,thoroughfare,device);
//                //3、保存参数采集数据
//                SaveParamData(PACKCodeParam,thoroughfare,device,"","");
//
//                result = "21";
//
//            }
//
//        }catch (Exception e) {
//
//        }
//        return result;
//    }
    /**
     * 保存过站采集
     */
@@ -425,9 +375,9 @@
                    ParamCollection.setParamValue(readWriteEntityList.get(i).getValue().toString());
                }
                ParamCollection.setSfcCode(packCode);
                if(device.contains("OP360")){
                if(device.contains("POP290")){
                    String node = nodeIdList.get(i);
                    Object value = miloService.readFromOpcUa("PACK.OP360.ModuleSNCode"+node.charAt(node.length()-1)).getValue();
                    Object value = miloService.readFromOpcUa("PACK.POP290.ModuleSNCode"+node.charAt(node.length()-1)).getValue();
                    if(value!=null){
                        ParamCollection.setModuleCode(value.toString());
                    }
@@ -573,47 +523,47 @@
     */
    public void saveStationInfo365(String thoroughfare,String device) throws Exception {
        String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
        String prefix = thoroughfare+"."+device+".";
        List<DaPassingStationCollection> passingStationCollections = new ArrayList<>();
        String ModuleCodeA = "";
        String ModuleCodeB = "";
        String StationStatusA = "";
        String StationStatusB = "";
        Object objectModuleCodeA = miloService.readFromOpcUa(prefix + "ModuleCodeA").getValue();
        Object objectModuleCodeB = miloService.readFromOpcUa(prefix + "ModuleCodeB").getValue();
        Object objectStationStatusA = miloService.readFromOpcUa(prefix + "StationStatusA").getValue();
        Object objectStationStatusB = miloService.readFromOpcUa(prefix + "StationStatusB").getValue();
        if(ObjectUtil.isNotNull(objectModuleCodeA) && ObjectUtil.isNotNull(objectStationStatusA) && ObjectUtil.isNotNull(objectModuleCodeB) && ObjectUtil.isNotNull(objectStationStatusB)){
            ModuleCodeA = objectModuleCodeA.toString();
            ModuleCodeB = objectModuleCodeB.toString();
            StationStatusA = objectStationStatusA.toString();
            StationStatusB = objectStationStatusB.toString();
            String[] modeles = {ModuleCodeA,ModuleCodeB};
            String[] StationStatus = {StationStatusA,StationStatusB};
            String startTime = miloService.readFromOpcUa(prefix + "StartTime").getValue().toString();
            String stopTime = miloService.readFromOpcUa(prefix + "StopTime").getValue().toString();
            for (int i = 0; i < 2; i++) {
                DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
                String strt = TimeUtil.stringProcessing(startTime);
                String end = TimeUtil.stringProcessing(stopTime);
                daPassingStationCollection.setInboundTime(format.parse(TimeUtil.test(strt)));//入站时间
                daPassingStationCollection.setOutboundTime(format.parse(TimeUtil.test(end)));//出站时间
                daPassingStationCollection.setSfcCode(modeles[i]);
                daPassingStationCollection.setLocationCode(device);
                daPassingStationCollection.setOutRsSign(StationStatus[i]);//出站是否合格
                passingStationCollections.add(daPassingStationCollection);
            }
            daPassingStationCollectionService.saveBeachDaPassingStationCollection(passingStationCollections);
//        String prefix = thoroughfare+"."+device+".";
//        List<DaPassingStationCollection> passingStationCollections = new ArrayList<>();
//        String ModuleCodeA = "";
//        String ModuleCodeB = "";
//        String StationStatusA = "";
//        String StationStatusB = "";
//
//        Object objectModuleCodeA = miloService.readFromOpcUa(prefix + "ModuleCodeA").getValue();
//        Object objectModuleCodeB = miloService.readFromOpcUa(prefix + "ModuleCodeB").getValue();
//        Object objectStationStatusA = miloService.readFromOpcUa(prefix + "StationStatusA").getValue();
//        Object objectStationStatusB = miloService.readFromOpcUa(prefix + "StationStatusB").getValue();
//
//        if(ObjectUtil.isNotNull(objectModuleCodeA) && ObjectUtil.isNotNull(objectStationStatusA) && ObjectUtil.isNotNull(objectModuleCodeB) && ObjectUtil.isNotNull(objectStationStatusB)){
//            ModuleCodeA = objectModuleCodeA.toString();
//            ModuleCodeB = objectModuleCodeB.toString();
//            StationStatusA = objectStationStatusA.toString();
//            StationStatusB = objectStationStatusB.toString();
//
//            String[] modeles = {ModuleCodeA,ModuleCodeB};
//            String[] StationStatus = {StationStatusA,StationStatusB};
//
//            String startTime = miloService.readFromOpcUa(prefix + "StartTime").getValue().toString();
//            String stopTime = miloService.readFromOpcUa(prefix + "StopTime").getValue().toString();
//            for (int i = 0; i < 2; i++) {
//                DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
//                String strt = TimeUtil.stringProcessing(startTime);
//                String end = TimeUtil.stringProcessing(stopTime);
//                daPassingStationCollection.setInboundTime(format.parse(TimeUtil.test(strt)));//入站时间
//                daPassingStationCollection.setOutboundTime(format.parse(TimeUtil.test(end)));//出站时间
//                daPassingStationCollection.setSfcCode(modeles[i]);
//                daPassingStationCollection.setLocationCode(device);
//                daPassingStationCollection.setOutRsSign(StationStatus[i]);//出站是否合格
//                passingStationCollections.add(daPassingStationCollection);
//            }
//            daPassingStationCollectionService.saveBeachDaPassingStationCollection(passingStationCollections);
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build());
            logger.info("工位{}回复21",device);
        }else {
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(22).build());
        }
//            logger.info("工位{}回复21",device);
//
//        }else {
//            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(22).build());
//        }
    }
    private static void writeToOpcShort(String identifier, short value) {
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -84,7 +84,7 @@
     * 导出点检任务列表
     */
    @PostMapping("/deviceResultFeedback")
    public AjaxResult hdy(@RequestBody ParentVO parentVO)
    public AjaxResult deviceResultFeedback(@RequestBody ParentVO parentVO)
    {
        ObjectMapper mapper = new ObjectMapper();
        List<ChildVO> li = parentVO.getCheckList();
@@ -130,27 +130,25 @@
    @GetMapping("/productionWorkOrderRequest")
    public AjaxResult productionWorkOrderRequest(){
        List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list();
        List<RestFulOrder> restFulOrders = new ArrayList<>();
        for (OmProductionOrdeInfo omProductionOrdeInfo : list) {
            RestFulOrder order = new RestFulOrder();
            order.setProductionOrderNum(omProductionOrdeInfo.getWorkOrderNo());
            order.setProductNum(omProductionOrdeInfo.getProductNum());
            order.setMaterialCode(omProductionOrdeInfo.getMaterialCode());
            order.setStationCode(omProductionOrdeInfo.getStationCode());
            order.setPlanQty(omProductionOrdeInfo.getPlanQty());
            order.setCreateTime(format.format(omProductionOrdeInfo.getCreateTime()));
            restFulOrders.add(order);
        }
//        try{
//            CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
//                List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list();
//                for (OmProductionOrdeInfo omProductionOrdeInfo : list) {
//                    RestFulOrder order = new RestFulOrder();
//                    order.setProductionOrderNum(omProductionOrdeInfo.getWorkOrderNo());
//                    order.setProductNum(omProductionOrdeInfo.getProductNum());
//                    order.setMaterialCode(omProductionOrdeInfo.getMaterialCode());
//                    order.setStationCode(omProductionOrdeInfo.getStationCode());
//                    order.setPlanQty(omProductionOrdeInfo.getPlanQty());
//                    order.setCreateTime(format.format(omProductionOrdeInfo.getCreateTime()));
//                    restFulOrders.add(order);
//                }
//            });
//        }catch (Exception e){
//            System.out.println(e.getMessage());
//        }
        return AjaxResult.success(restFulOrders);
    }
    public static void main(String[] args) {
        String str = "0RSPB0011A2E3AE5P0000002  2024-05-28 15:48:51";
        String[] split = str.split("  ");
        System.out.println(split[0]);
        System.out.println(split[1]);
    }
    @GetMapping("/getQualityData")
@@ -160,22 +158,22 @@
//        Map<String,Integer> map = new HashMap<>();
//        map.put("qualified",qualified.size());
//        map.put("unQualified",unQualified.size());
        for (BsBeatSetting bsBeatSetting : bsBeatSettingService.list()) {
            String str = bsBeatSetting.getProductCode();
            String[] split = str.split("  ");
            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");
            if("success".equals(code)&&"S".equals(status)){
                //如果成功,执行报工成功方法,修改是否报工为1,添加报工时间
                bsBeatSetting.setProductName("S");
                this.bsBeatSettingService.saveOrUpdate(bsBeatSetting);
            }else{
                bsBeatSetting.setProductName("F");
                this.bsBeatSettingService.saveOrUpdate(bsBeatSetting);
            }
        }
//        for (BsBeatSetting bsBeatSetting : bsBeatSettingService.list()) {
//            String str = bsBeatSetting.getProductCode();
//            String[] split = str.split("  ");
//            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");
//            if("success".equals(code)&&"S".equals(status)){
//                //如果成功,执行报工成功方法,修改是否报工为1,添加报工时间
//                bsBeatSetting.setProductName("S");
//                this.bsBeatSettingService.saveOrUpdate(bsBeatSetting);
//            }else{
//                bsBeatSetting.setProductName("F");
//                this.bsBeatSettingService.saveOrUpdate(bsBeatSetting);
//            }
//        }
        return AjaxResult.success();
    }
@@ -183,50 +181,24 @@
    @GetMapping("/productionOrderComponentRequest")
    public AjaxResult productionOrderComponentRequest(BsFormulaChildInfo bsFormulaChildInfo){
        Map<String,List<String>> map = new HashMap<>();
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getProcessesCode())
                .eq(BsFormulaChildInfo::getOperationType, "2")
        );
        List<ProductionOrderComponentRequest> requests = new ArrayList<>();
        for (BsFormulaChildInfo info : list) {
            ProductionOrderComponentRequest request = new ProductionOrderComponentRequest();
            request.setMaterialCode(info.getMaterialCode());
            request.setOperationSteps(info.getOperationSteps());
            requests.add(request);
        }
//        try{
//            CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
//                List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
//                        .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getProcessesCode())
//                        .eq(BsFormulaChildInfo::getOperationType, "2")
//                );
//                for (BsFormulaChildInfo info : list) {
//                    ProductionOrderComponentRequest request = new ProductionOrderComponentRequest();
//                    request.setMaterialCode(info.getMaterialCode());
//                    request.setOperationSteps(info.getOperationSteps());
//                    requests.add(request);
//                }
//            });
//        }catch (Exception e){
//            System.out.println(e.getMessage());
//        }
        return AjaxResult.success(requests);
    }
    @PostMapping("/pushParamData")
    public void receivingData(@RequestBody PostEntity postEntity) throws JsonProcessingException {
//        ObjectMapper objectMapper = new ObjectMapper();
//        PostEntity person = objectMapper.readValue(postEntity, PostEntity.class);
        Class<?> entityClass = PostEntity.class; // 替换为你的实体类
        String packId = postEntity.getPEOL_PackID();
        OmProductionOrdeInfo one = productionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, packId));
        String productType = "type";
        String workOrderNo = one.getWorkOrderNo();
        for (Field field : entityClass.getDeclaredFields()) {
            String fieldName = field.getName();
            DaParamCollection daParamCollection = new DaParamCollection();
            daParamCollection.setWorkOrderNo(workOrderNo);
            daParamCollection.setProductCode(productType);
            daParamCollection.setSfcCode(packId);
            daParamCollection.setParamCode(field.getName());
            daParamCollection.setParamValue((String) getFieldValue(postEntity, fieldName));
            if(fieldName.contains("GDBH")){
                daParamCollection.setParamValue(workOrderNo);
            }
            if(fieldName.contains("CPXH")){
                daParamCollection.setParamValue(productType);
            }
            daParamCollectionService.save(daParamCollection);
        }
    }
    /**
@@ -237,51 +209,4 @@
    {
        WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), bsFormulaChildInfo.getResults());
    }
    /**
     * 使用反射获取对象的属性值
     *
     * @param obj       目标对象
     * @param fieldName 属性名
     * @return 属性值,如果获取失败则返回null
     */
    public static Object getFieldValue(Object obj, String fieldName) {
        if (obj == null) {
            throw new IllegalArgumentException("Object must not be null");
        }
        try {
            Field field = obj.getClass().getDeclaredField(fieldName);
            field.setAccessible(true); // 设置可访问性,以便访问私有字段
            return field.get(obj);
        } catch (NoSuchFieldException e) {
            // 如果当前类没有该字段,则尝试从父类中获取
            Class<?> superClass = obj.getClass().getSuperclass();
            if (superClass != null && !superClass.equals(Object.class)) {
                return getFieldValue(obj, fieldName, superClass);
            }
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }
    private static Object getFieldValue(Object obj, String fieldName, Class<?> superClass) {
        try {
            Field field = superClass.getDeclaredField(fieldName);
            field.setAccessible(true);
            return field.get(obj);
        } catch (NoSuchFieldException e) {
            // 如果父类也没有该字段,则继续向上查找
            Class<?> grandParentClass = superClass.getSuperclass();
            if (grandParentClass != null && !grandParentClass.equals(Object.class)) {
                return getFieldValue(obj, fieldName, grandParentClass);
            }
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }
}
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml
@@ -29,12 +29,15 @@
        <result property="spareField4"    column="spare_field4"    />
        <result property="collectData"    column="collect_data"    />
        <result property="results"    column="results"    />
        <result property="ngCollectData"    column="ng_collect_data"    />
        <result property="ngResults"    column="ng_results"    />
        <result property="ngTimes"    column="ng_times"    />
        <result property="counts"    column="counts"    />
    </resultMap>
    <sql id="selectBsFormulaChildInfoVo">
        select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, collect_data, results from bs_formula_child_info
        select id, workshop_code, line_code, ng_times,ng_results,ng_results, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, collect_data, results from bs_formula_child_info
    </sql>
    <select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult">
@@ -89,7 +92,10 @@
            <if test="spareField4 != null">spare_field4,</if>
            <if test="collectData != null">collect_data,</if>
            <if test="results != null">results,</if>
         </trim>
            <if test="ngCollectData != null">ng_collect_data,</if>
            <if test="ngResults != null">ng_results,</if>
            <if test="ngTimes != null">ng_times,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="workshopCode != null">#{workshopCode},</if>
            <if test="lineCode != null">#{lineCode},</if>
@@ -112,9 +118,12 @@
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="spareField3 != null">#{spareField3},</if>
            <if test="spareField4 != null">#{spareField4},</if>
            <if test="collectData != null">collect_data,</if>
            <if test="results != null">results,</if>
         </trim>
            <if test="collectData != null">#{collectData},</if>
            <if test="results != null">#{results},</if>
            <if test="ngCollectData != null">#{ngCollectData},</if>
            <if test="ngResults != null">#{ngResults},</if>
            <if test="ngTimes != null">#{ngTimes},</if>
        </trim>
    </insert>
    <update id="updateBsFormulaChildInfo" parameterType="BsFormulaChildInfo">
@@ -143,6 +152,9 @@
            <if test="spareField4 != null">spare_field4 = #{spareField4},</if>
            <if test="collectData != null">collect_data = #{collectData},</if>
            <if test="results != null">results = #{results},</if>
            <if test="ngCollectData != null">ng_collect_data = #{ngCollectData},</if>
            <if test="ngResults != null">ng_results = #{ngResults},</if>
            <if test="ngTimes != null">ng_times = #{ngTimes},</if>
        </trim>
        where id = #{id}
    </update>
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -50,11 +50,15 @@
        <result property="resultText"    column="result_text"    />
        <result property="sfResult"    column="sf_result"    />
        <result property="productModel"    column="product_model"    />
        <result property="automaticNgFlag"    column="automatic_ng_flag"    />
        <result property="automaticNgStation"    column="automatic_ng_station"    />
        <result property="automaticNgScrewNumber"    column="automatic_ng_screw_number"    />
        <result property="artificialNgFlag"    column="artificial_ng_flag"    />
    </resultMap>
    <sql id="selectOmProductionOrdeInfoVo">
        select id,site_code,product_num,station_code, product_model,result_code,result_text,sf_result ,work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, material_code, software_version_code, product_company_code, trolley_yard, spare_field2, spare_field3, spare_field4 from om_production_orde_info
        select id,site_code,product_num,station_code, product_model,result_code,result_text,sf_result ,work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, material_code, software_version_code, product_company_code, trolley_yard, spare_field2, spare_field3, spare_field4, automatic_ng_flag, automatic_ng_station, automatic_ng_screw_number, artificial_ng_flag from om_production_orde_info
    </sql>
    <select id="selectOmProductionOrdeInfoList" parameterType="OmProductionOrdeInfo" resultMap="OmProductionOrdeInfoResult">
@@ -140,6 +144,10 @@
            <if test="resultCode != null">result_code,</if>
            <if test="sfResult != null">sf_result,</if>
            <if test="productModel != null">product_model,</if>
            <if test="automaticNgFlag != null">automatic_ng_flag,</if>
            <if test="automaticNgStation != null">automatic_ng_station,</if>
            <if test="automaticNgScrewNumber != null">automatic_ng_screw_number,</if>
            <if test="artificialNgFlag != null">artificial_ng_flag,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -188,6 +196,10 @@
            <if test="resultCode != null">#{resultCode},</if>
            <if test="sfResult != null">#{sfResult},</if>
            <if test="productModel != null">#{productModel},</if>
            <if test="automaticNgFlag != null">#{automaticNgFlag},</if>
            <if test="automaticNgStation != null">#{automaticNgStation},</if>
            <if test="automaticNgScrewNumber != null">#{automaticNgScrewNumber},</if>
            <if test="artificialNgFlag != null">#{artificialNgFlag},</if>
        </trim>
    </insert>
@@ -239,7 +251,10 @@
            <if test="resultCode != null">result_code = #{resultCode},</if>
            <if test="sfResult != null">sf_result = #{sfResult},</if>
            <if test="productModel != null">product_model = #{productModel},</if>
            <if test="automaticNgFlag != null">automatic_ng_flag = #{automaticNgFlag},</if>
            <if test="automaticNgStation != null">automatic_ng_station = #{automaticNgStation},</if>
            <if test="automaticNgScrewNumber != null">automatic_ng_screw_number = #{automaticNgScrewNumber},</if>
            <if test="artificialNgFlag != null">artificial_ng_flag = #{artificialNgFlag},</if>
        </trim>
        where id = #{id}
    </update>
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
@@ -37,6 +37,24 @@
  })
}
export function unfinishedProcess(query) {
  return request({
    url: '/bs/formulaChild/unfinishedProcess',
    method: 'get',
    params: query
  })
}
export function inPlaceInspection(query) {
  return request({
    url: '/bs/formulaChild/inPlaceInspection',
    method: 'get',
    params: query
  })
}
// 查询配方配置子信息列表
export function fistSetpNumber(query) {
  return request({
@@ -48,6 +66,15 @@
}
// 查询配方配置子信息列表
export function manualNgOffline(query) {
  return request({
    url: '/bs/formulaChild/manualNgOffline',
    method: 'get',
    params: query
  })
}
// 查询配方配置子信息列表
export function jrmUpdateResults(query) {
  return request({
    url: '/bs/formulaChild/jrmUpdateResults',
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue
@@ -331,6 +331,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: "",
@@ -681,9 +682,10 @@
        console.log("串口收到数据-------------------"+scanValue)
        if(this.headContent.module !== ''){
          this.$message('扫码模组物料码'+scanValue);
          this.serialPortMethod(scanValue)
        } else {
          if(scanValue.includes("9900168136")){
          if(scanValue.includes("ORSM")){
            this.headContent.module = scanValue;
            this.$message('扫码识别产品序列号'+scanValue);
            this.getList()
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -263,8 +263,9 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://10.103.210.248:8080/websocket/message/",
      // url: "ws://192.168.2.76:8080/websocket/message/",
      // 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: "",
      text_content: "",
      ws: null,
@@ -414,7 +415,7 @@
    },
    clearClick(){
      const param = {
        productCode: '1P102S',
        productCode: 'PE01B',
        locationCode: this.headContent.processesCode,
      }
      clearWorkpieceRelease(param).then(response => {});
@@ -542,7 +543,8 @@
                  const param = {
                    locationCode: self.headContent.processesCode,
                    productBarcode: self.headContent.sfcCode,
                    inboundTime: self.headContent.inboundTime
                    inboundTime: self.headContent.inboundTime,
                    productCode: "PE01B"
                  }
                  preInstallOut(param).then(response => {});
                  workpieceRelease(param).then(response => {});
@@ -571,9 +573,14 @@
          console.log(scanValue)
          this.serialPortMethod(scanValue)
        } else {
          this.headContent.sfcCode = scanValue;
          this.headContent.inboundTime = this.getCurrentTime();
          this.getList()
          if(scanValue.includes("P9900183275") || scanValue.includes("P9900173252")){
            this.headContent.sfcCode = scanValue;
            this.headContent.inboundTime = this.getCurrentTime();
            this.getList()
          }else {
            this.$message.error('总成码扫描错误!');
          }
        }
      }
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -308,10 +308,10 @@
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {
  clearWorkpieceRelease,
  fistSetpNumber,
  listFormulaChild,
  fistSetpNumber, inPlaceInspection,
  listFormulaChild, manualNgOffline,
  noPageListFormulaChild,
  releaseCheck,
  releaseCheck, unfinishedProcess,
  updateResults,
  updateTighteningFormula,
  workpieceRelease
@@ -392,8 +392,8 @@
      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/",
      // url: "ws://10.103.210.248:8080/websocket/message/",
      url: "ws://192.168.2.76:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -680,14 +680,11 @@
        }
        this.headContent.processesName = rows.processesName
        this.headContent.processesCode = rows.processesCode
        if(this.headContent.processesCode === 'OP240'){
          this.onLineBinDing = true
        }
        if(this.headContent.processesCode === 'OP260'){
          // this.showInput = true
        }
        console.log('设置工位编码' + this.headContent.processesCode)
        inPlaceInspection({processesCode: this.headContent.processesCode}).then(response => {
          console.log(response)
          this.cakeLamp.InPlace = response.data
        });
      });
      this.conCom()
@@ -702,13 +699,16 @@
      this.ws.onmessage = function (event) {
        if (event.data === "IN") {
          self.cakeLamp.InPlace = 1;
          console.log(self.headContent.processesCode);
          // const param = {
          //   processesCode: self.headContent.processesCode,
          // }
          // fistSetpNumber(param).then(response => {});
        } else if (event.data === "IN0") {
          self.cakeLamp.InPlace = 0;
        } else if (event.data === "NG") {
          //给plc发下线信号
          //清除数据
          this.$confirm('<span style="font-size: 20px;color: red">拧紧超过三次该产品NG下线,请确认!</span>', '通知', {
            confirmButtonText: '确定',
            type: 'warning'
          }).then(() => {
            self.ngFunction();
          })
        } else if (event.data === "OUT") {
          self.cakeLamp.release = 1;
        } else if (event.data === "END") {
@@ -716,12 +716,14 @@
          const formulaChildIndex = self.formulaChildList.length-1
          if(self.headContent.sfcCode=== ''||self.headContent.sfcCode=== null){
            unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 26}).then(response => {});
            self.$message('总成码为空,请扫码!')
            return;
          }
          if(self.formulaChildList[formulaChildIndex].results !== 'OK'){
            self.$message('未做完工序禁止放行');
            unfinishedProcess({processesCode: self.headContent.processesCode,recordDataDone: 25}).then(response => {});
            return;
          }
@@ -736,70 +738,6 @@
          console.log("进入最终方法")
          self.endSaveData(param)
          // if(self.headContent.processesCode === "OP260"){
          //   checkYzSfcCode(orderParam).then(response => {
          //     if(response.data === 0){
          //       self.$message('未绑定总成码禁止放行');
          //       return;
          //     }else {
          //       self.endSaveData(param)
          //       // saveCampaignTimeParameters(param).then(response => {
          //       //   self.cakeLamp.release = 1;
          //       //   self.endClear()
          //       //   workpieceRelease(param).then(response => {});});
          //     }
          //   })
          // }else {
          //   self.endSaveData(param)
          //   // saveCampaignTimeParameters(param).then(response => {
          //   //   self.cakeLamp.release = 1;
          //   //   self.endClear()
          //   //   workpieceRelease(param).then(response => {});
          //   // });
          // }
          // checkCarCode(orderParam).then(response => {
          //   console.log(response.data)
          //   if(response.data === 1){
          //     if(self.headContent.processesCode === "OP260"){
          //       checkYzSfcCode(orderParam).then(response => {
          //         if(response.data === 1){
          //           saveCampaignTimeParameters(param).then(response => {
          //             checkRecordDataDone(param).then(response => {
          //               if(response.msg === "21"){
          //                 self.cakeLamp.release = 1;
          //                 self.endClear()
          //                 workpieceRelease(param).then(response => {});
          //               }else {
          //                 self.$message('未做完工序禁止放行');
          //               }
          //             });
          //           });
          //         }else {
          //           self.$message('请先绑定预装总成');
          //         }
          //       });
          //     }else {
          //       saveCampaignTimeParameters(param).then(response => {
          //         checkRecordDataDone(param).then(response => {
          //           if(response.msg === "21"){
          //             self.cakeLamp.release = 1;
          //             self.endClear()
          //             workpieceRelease(param).then(response => {});
          //           }else {
          //             self.$message('未做完工序禁止放行');
          //           }
          //         });
          //       });
          //     }
          //   }else {
          //     self.$alert('<strong style="color: red;font-size: 30px">未扫描小车码禁止放行</strong>', '提示', {
          //       dangerouslyUseHTMLString: true
          //     });
          //   }
          // });
        } else if (event.data.includes("[")) {
          let formulaChilds = "";
          self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort);
@@ -830,7 +768,8 @@
            spareField2: formulaChilds.spareField2,
            spareField3: formulaChilds.spareField3,
            spareField4: formulaChilds.spareField4,
            stepSort: formulaChilds.stepSort
            stepSort: formulaChilds.stepSort,
            ngTimes: formulaChilds.ngTimes,
          }
          if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){
            self.$message('未找到参数码,请检查参数码是否正确');
@@ -856,6 +795,17 @@
      });
    },
    ngFunction(){
      const param = {
        locationCode: this.headContent.processesCode,
        sfcBarcode: this.headContent.sfcCode,
        productCode: this.workpieceInformation.productCode,
      }
      manualNgOffline(param).then(response => {});
      clearWorkpieceRelease(param).then(releaseCheck =>{});
      this.endClear()
    },
    //接受数据的回调
    callBack(value) {
      if (this.form1.isShowHistory) this.form1.desc = this.readLi().join("");
@@ -869,7 +819,7 @@
          //   this.headContent.yzSfcCode = scanValue
          //   this.bindYzSfc();
          // }else
          if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'POP240'){
          if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'POP230'){
            this.headContent.cardCode = scanValue
            this.bindcardCode(scanValue);
            this.serialPortMethod(scanValue)
@@ -879,7 +829,7 @@
            this.serialPortMethod(scanValue)
          }
        } else {
          if(this.headContent.processesCode === 'POP240'){
          if(this.headContent.processesCode === 'POP230'){
            this.headContent.sfcCode = scanValue;
            this.queryParams.productNum = scanValue;
            this.getList()