admin
2024-07-01 768498719683f85e5ed19c73eb3d14cdbf420df4
绑定小车码,预装总成码,手动工位扫码,拧紧逻辑优化
已修改28个文件
1569 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/domain/BsBeatSetting.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/IBsFormulaChildInfoService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/beatSetting/BsBeatSettingMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/da/paramCollection/paramCollection.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/om/productionOrde/productionOrde.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/formulaChild/index.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/Instructions/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/paramCollection/index.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/passingStationCollection/index.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/testDeviceInterface/index.vue 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 233 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 253 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/domain/BsBeatSetting.java
@@ -30,14 +30,6 @@
    @Excel(name = "节拍")
    private String beat;
    /** 预留字段1 */
    @Excel(name = "预留字段1")
    private String spareField1;
    /** 预留字段2 */
    @Excel(name = "预留字段2")
    private String spareField2;
    /** 创建用户 */
    @Excel(name = "创建用户")
    private String createUser;
@@ -86,24 +78,6 @@
    {
        return beat;
    }
    public void setSpareField1(String spareField1)
    {
        this.spareField1 = spareField1;
    }
    public String getSpareField1()
    {
        return spareField1;
    }
    public void setSpareField2(String spareField2)
    {
        this.spareField2 = spareField2;
    }
    public String getSpareField2()
    {
        return spareField2;
    }
    public void setCreateUser(String createUser) 
    {
        this.createUser = createUser;
@@ -139,8 +113,6 @@
            .append("productCode", getProductCode())
            .append("productName", getProductName())
            .append("beat", getBeat())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("remark", getRemark())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -83,7 +83,9 @@
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
                .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode())
                .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode()));
                .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode())
                .orderByAsc(BsFormulaChildInfo::getStepSort)
        );
        if (CollUtil.isNotEmpty(list)){
            List<BsFormulaChildInfo> collect1 = list.stream().filter(x -> Constants.OK.equals(x.getResults())).collect(Collectors.toList());
            List<BsFormulaChildInfo> collect2 = list.stream().filter(x -> !Constants.OK.equals(x.getResults())).collect(Collectors.toList());
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/IBsFormulaChildInfoService.java
@@ -88,4 +88,8 @@
    AjaxResult checkMaterialCode(BsFormulaChildInfo bsFormulaChildInfo);
    AjaxResult clearCollectDataAndResultsByProcessesCode(BsFormulaChildInfo bsFormulaChildInfo);
    AjaxResult updateTighteningData(BsFormulaChildInfo bsFormulaChildInfo,String result,String data);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -11,6 +11,7 @@
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.utils.DateUtils;
@@ -180,10 +181,13 @@
                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode())
                .eq(BsFormulaChildInfo::getOperationType, "2")
        );
        for (BsFormulaChildInfo formulaChildInfo : infos) {
            if(bsFormulaChildInfo.getScanBarcode().contains(formulaChildInfo.getMaterialCode())){
                bsFormulaChildInfos.add(formulaChildInfo);
                break;
        List<String> newResultsList = infos.stream().map(s -> s.getCollectData()).collect(Collectors.toList());
        if(newResultsList.stream().noneMatch(results -> results.equals(bsFormulaChildInfo.getScanBarcode()))){
            for (BsFormulaChildInfo formulaChildInfo : infos) {
                if(bsFormulaChildInfo.getScanBarcode().contains(formulaChildInfo.getMaterialCode())) {
                    bsFormulaChildInfos.add(formulaChildInfo);
                    break;
                }
            }
        }
        if(bsFormulaChildInfos.size()>0){
@@ -225,42 +229,44 @@
////                return AjaxResult.success("扫描未完成,禁止拧紧操作!");
//            }
//        }
        BsFormulaChildInfo listQuery = new BsFormulaChildInfo();
        listQuery.setParamCode(bsFormulaChildInfo.getParamCode());
        listQuery.setProcessesCode(bsFormulaChildInfo.getLocationCode());
        String paramCode = bsFormulaChildInfo.getTightenTheArray();
        if(paramCode.contains("N")){
//        BsFormulaChildInfo listQuery = new BsFormulaChildInfo();
//        listQuery.setParamCode(bsFormulaChildInfo.getParamCode());
//        listQuery.setProcessesCode(bsFormulaChildInfo.getLocationCode());
        String paramData = bsFormulaChildInfo.getTightenTheArray();
        if(paramData.contains("N")){
            result = "3";
            List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
            bsFormulaChildInfos.get(0).setResults("NG");
            bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray());
            bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0));
//            List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
//            bsFormulaChildInfos.get(0).setResults("NG");
//            bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray());
//            bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0));
            this.updateTighteningData(bsFormulaChildInfo,"NG",paramData);
//            return AjaxResult.success("扫描结果NG,请重新扫描!");
        }else {
            List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
            if(bsFormulaChildInfos.get(0).getSpareField2()!=null&&bsFormulaChildInfos.get(0).getSpareField3()!=null){
//            List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
            if(bsFormulaChildInfo.getSpareField2()!=null&&bsFormulaChildInfo.getSpareField3()!=null){
                String tightenArray = bsFormulaChildInfo.getTightenTheArray().replace("[", "").replace("]", "").replace(" ", "");
                String[] tightenDataParts = tightenArray.split(",");
                b = TimeUtil.isNumberInRange(Double.parseDouble(tightenDataParts[0]),Double.parseDouble(bsFormulaChildInfos.get(0).getSpareField2()),Double.parseDouble(bsFormulaChildInfos.get(0).getSpareField3()));
                b = TimeUtil.isNumberInRange(Double.parseDouble(tightenDataParts[0]),Double.parseDouble(bsFormulaChildInfo.getSpareField2()),Double.parseDouble(bsFormulaChildInfo.getSpareField3()));
            }
            if(b){
                result = "3";
                bsFormulaChildInfos.get(0).setResults("OK");
                bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray());
                bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0));
                logger.info("yzUpdateTighteningFormula--查询条件参数:"+listQuery);
                logger.info("yzUpdateTighteningFormula--查询结果:"+bsFormulaChildInfos.get(0));
                Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort());
//                bsFormulaChildInfos.get(0).setResults("OK");
//                bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray());
//                bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0));
                this.updateTighteningData(bsFormulaChildInfo,"OK",paramData);
//                logger.info("yzUpdateTighteningFormula--查询条件参数:"+listQuery);
//                logger.info("yzUpdateTighteningFormula--查询结果:"+bsFormulaChildInfos.get(0));
                Integer stepNumber = Integer.valueOf(bsFormulaChildInfo.getStepSort());
                try {
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                String spareField4 = bsFormulaChildInfos.get(0).getSpareField4();
                String spareField4 = bsFormulaChildInfo.getSpareField4();
                if (spareField4 != null && !spareField4.isEmpty()) {
                    // 执行操作
                    if(bsFormulaChildInfos.get(0).getSpareField4().equals("1")){
                    if(bsFormulaChildInfo.getSpareField4().equals("1")){
                        try {
//                        WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT");
                            result = "2";
@@ -271,16 +277,28 @@
                }
            }else {
                result = "3";
                List<BsFormulaChildInfo> bsFormulaChildInfos1 = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
                bsFormulaChildInfos1.get(0).setResults("NG");
                String originalString = bsFormulaChildInfo.getTightenTheArray();
                String modifiedString = originalString.replaceFirst("OK", "NG");
                bsFormulaChildInfos1.get(0).setCollectData(modifiedString);
                bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos1.get(0));
//                List<BsFormulaChildInfo> bsFormulaChildInfos1 = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
//                bsFormulaChildInfos1.get(0).setResults("NG");
//                String originalString = bsFormulaChildInfo.getTightenTheArray();
                String modifiedString = paramData.replaceFirst("OK", "NG");
//                bsFormulaChildInfos1.get(0).setCollectData(modifiedString);
//                bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos1.get(0));
                this.updateTighteningData(bsFormulaChildInfo,"NG",modifiedString);
//                return AjaxResult.success("扫描结果NG,请重新扫描!");
            }
        }
        return AjaxResult.success(result);
    }
    @Override
    public AjaxResult updateTighteningData(BsFormulaChildInfo bsFormulaChildInfo,String result,String data) {
        LambdaUpdateWrapper<BsFormulaChildInfo> updateWrapper = new LambdaUpdateWrapper();
        updateWrapper.set(BsFormulaChildInfo::getCollectData, data);
        updateWrapper.set(BsFormulaChildInfo::getResults, result);
        updateWrapper.eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode());
        updateWrapper.eq(BsFormulaChildInfo::getParamCode, bsFormulaChildInfo.getParamCode());
        boolean update = bsFormulaChildInfoService.update(new BsFormulaChildInfo(), updateWrapper);
        return AjaxResult.success(update);
    }
    @Override
@@ -334,14 +352,15 @@
    @Override
    public AjaxResult jrmWorkpieceRelease(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);
//        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++) {
@@ -374,14 +393,15 @@
    @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);
        }
//        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();
    }
@@ -399,6 +419,17 @@
            }
        }
        return AjaxResult.success(result);
    }
    @Override
    public AjaxResult clearCollectDataAndResultsByProcessesCode(BsFormulaChildInfo bsFormulaChildInfo) {
        LambdaUpdateWrapper<BsFormulaChildInfo> updateWrapper = new LambdaUpdateWrapper();
        updateWrapper.set(BsFormulaChildInfo::getCollectData, "");
        updateWrapper.set(BsFormulaChildInfo::getResults,"");
        updateWrapper.eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode());
        BsFormulaChildInfo info = new BsFormulaChildInfo();
        boolean update = this.update(info,updateWrapper);
        return AjaxResult.success(update);
    }
    @Override
@@ -522,28 +553,29 @@
    @Override
    public AjaxResult workpieceRelease(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);
//        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);
            }
//            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) {
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java
@@ -125,6 +125,15 @@
    /**
     * 出战时间参数增加
     */
    @PostMapping("/preInstallOut")
    public void preInstallOut(@RequestBody DaParamCollection daParamCollection)
    {
        daParamCollectionService.preInstallOut(daParamCollection);
    }
    /**
     * 出战时间参数增加
     */
    @PostMapping("/checkRecordDataDone")
    public AjaxResult checkRecordDataDone(@RequestBody DaParamCollection daParamCollection)
    {
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java
@@ -1,8 +1,10 @@
package com.jcdm.main.da.paramCollection.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.BaseEntity;
import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -117,6 +119,34 @@
    @TableField(exist = false)
    private String weightValue;
    @TableField(exist = false)
    private BsFormulaChildInfo formulaChildEntity;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date inboundTime;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date outboundTime;
    public Date getInboundTime() {
        return inboundTime;
    }
    public void setInboundTime(Date inboundTime) {
        this.inboundTime = inboundTime;
    }
    public BsFormulaChildInfo getFormulaChildEntity() {
        return formulaChildEntity;
    }
    public void setFormulaChildEntity(BsFormulaChildInfo formulaChildEntity) {
        this.formulaChildEntity = formulaChildEntity;
    }
    public String getTightenTheArray() {
        return tightenTheArray;
    }
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java
@@ -86,4 +86,8 @@
    AjaxResult checkRecordDataDone(DaParamCollection daParamCollection);
    void enterWeighing(DaParamCollection daParamCollection);
    void manualWorkstationsAddBasicParameters(DaParamCollection daParamCollection);
    void preInstallOut(DaParamCollection daParamCollection);
}
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -7,11 +7,14 @@
import cn.hutool.db.Db;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
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.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.utils.DateUtils;
import com.jcdm.common.utils.SecurityUtils;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.main.bs.formula.service.IBsFormulaInfoService;
import com.jcdm.main.bs.formula.service.impl.BsFormulaInfoServiceImpl;
@@ -30,6 +33,7 @@
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
import com.jcdm.main.plcserver.sub.OPCUaSubscription;
import com.jcdm.main.restful.factoryMes.service.RestfulService;
@@ -98,6 +102,9 @@
    @Autowired
    private IOmProductionOrdeInfoService omProductionOrdeInfoService;
    @Autowired
    private IDaPassingStationCollectionService daPassingStationCollectionService;
    public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -258,12 +265,13 @@
    @Override
    public void saveCampaignTimeParameters(DaParamCollection daParamCollection) {
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
                .eq(BsFormulaChildInfo::getProcessesCode, daParamCollection.getLocationCode())
                .eq(BsFormulaChildInfo::getSpareField4, "1")
        );
        if(StringUtils.isNotBlank(list.get(0).getResults())){
            if(!list.get(0).getResults().equals("OK")){
//        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
//                .eq(BsFormulaChildInfo::getProcessesCode, daParamCollection.getLocationCode())
//                .eq(BsFormulaChildInfo::getSpareField4, "1")
//        );
        BsFormulaChildInfo childInfo = daParamCollection.getFormulaChildEntity();
        if(StringUtils.isNotBlank(childInfo.getResults())){
            if(!childInfo.getResults().equals("OK")){
                try {
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
                } catch (Exception e) {
@@ -279,37 +287,52 @@
            }
            return;
        }
        BsFormulaChildInfo bsFormulaChildInfo = new BsFormulaChildInfo();
        bsFormulaChildInfo.setProcessesCode(daParamCollection.getLocationCode());
        bsFormulaChildInfo.setProductCode(daParamCollection.getProductCode());
        bsFormulaChildInfo.setSpareField4("1");
        List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(bsFormulaChildInfo);
        String result = bsFormulaChildInfos.get(0).getResults();
//        BsFormulaChildInfo bsFormulaChildInfo = new BsFormulaChildInfo();
//        bsFormulaChildInfo.setProcessesCode(daParamCollection.getLocationCode());
//        bsFormulaChildInfo.setProductCode(daParamCollection.getProductCode());
//        bsFormulaChildInfo.setSpareField4("1");
//        List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(bsFormulaChildInfo);
        String result = childInfo.getResults();
        if(result != null && !result.isEmpty()){
            try {
                //过站参数采集记录出站时间
                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);
//                //更新参数采集配置表
//                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);
                //添加基础参数
                this.manualWorkstationsAddBasicParameters(daParamCollection);
//                //更新过站记录表出站时间
//                DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
//                daPassingStationCollection.setWorkOrderNo(daParamCollection.getWorkOrderNo());
//                daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode());
//                List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
//                daPassingStationCollections.get(0).setOutboundTime(new Date());
//                int i = daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
//                OPCUaSubscription.SaveParamData(daParamCollection.getProductBarcode(),"OP",daParamCollection.getLocationCode(),daParamCollection.getWorkOrderNo(),daParamCollection.getProductCode());
@@ -320,12 +343,14 @@
                        CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                            logger.info("OP230报工开始-工厂MES异步方法");
                            String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), "OP230", format.format(new Date()));
                            if("".equals(reportResult)){
                                //执行报工失败方法
                            JSONObject jsonObject = new JSONObject(reportResult);
                            String code = jsonObject.getStr("code");
                            if("success".equals(code)){
                                //如果成功,执行报工成功方法,修改是否报工为1,添加报工时间
                                omProductionOrdeInfoService.updateOrderByProductNum("1",daParamCollection.getProductBarcode(),"OP230");
                            }else{
                                //解析工厂mes返回结果,如果失败,执行报工失败方法,修改是否报工为2,添加报工时间
                                //如果成功,执行报工成功方法,修改是否报工为1,添加报工时间
                                omProductionOrdeInfoService.updateOrderByProductNum("2",daParamCollection.getProductBarcode(),"OP230");
                            }
                            logger.info("OP230报工结束-工厂MES异步方法{}"+reportResult);
                        });
@@ -488,8 +513,8 @@
    public void pushGeelycvMesFeedback(String packID, String stationCode) {
        logger.info("进入人工工位推送工厂MES数据方法-pushGeelycvMesFeedback-工位{}-pack码{}",stationCode,packID);
        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";
        List<DaParamCollectionTemp> paramList = daParamCollectionTempService.list(new LambdaQueryWrapper<DaParamCollectionTemp>().eq(DaParamCollectionTemp::getSfcCode, packID).eq(DaParamCollectionTemp::getLocationCode, stationCode));
        if(paramList.size() > 0){
@@ -704,4 +729,50 @@
        RestfulService.getWorkReportResultFeedback(daParamCollection.getSfcCode(),"OP500",format.format(new Date()));
    }
    @Override
    public void manualWorkstationsAddBasicParameters(DaParamCollection daParamCollection) {
        // 假设这是从数据库或其他地方获取的参数数据
        Map<String, String> map = new HashMap<>();
        map.put("GC", "南浔工厂");
        map.put("CXBH", "Pack线");
        map.put("SBBH", "设备001");
        map.put("YGBH", SecurityUtils.getUsername());
        map.put("GDBH", daParamCollection.getWorkOrderNo());
        map.put("CPXH", daParamCollection.getProductCode());
        map.put("INT", format.format(daParamCollection.getInboundTime()));
        map.put("OUTT",format.format(new Date()));
        map.forEach((key, value) -> {
            DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf();
            daCollectionParamConf.setProcessesCode(daParamCollection.getLocationCode());
            daCollectionParamConf.setCollectParameterId(key);
            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(value);
            daParamCollectionMapper.insertDaParamCollection(saveData);
        });
    }
    @Override
    public void preInstallOut(DaParamCollection daParamCollection) {
        //增加过站记录
        DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
        daPassingStationCollection.setSfcCode(daParamCollection.getProductBarcode());
        daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode());
        daPassingStationCollection.setInboundTime(daParamCollection.getInboundTime());
        daPassingStationCollection.setOutboundTime(new Date());
        daPassingStationCollection.setCreateTime(new Date());
        daPassingStationCollection.setOutRsSign("1");
        boolean save = daPassingStationCollectionService.save(daPassingStationCollection);
        //添加基础参数
        this.manualWorkstationsAddBasicParameters(daParamCollection);
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java
@@ -83,6 +83,10 @@
    /** 预留字段2 */
    private String spareField2;
    private Date createTime;
    private Date updateTime;
    /** 创建用户 */
    private String createUser;
@@ -96,6 +100,26 @@
    @TableField(exist = false)
    private Long[] ids;
    @Override
    public Date getCreateTime() {
        return createTime;
    }
    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Override
    public Date getUpdateTime() {
        return updateTime;
    }
    @Override
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Long[] getIds() {
        return ids;
    }
jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java
@@ -1,5 +1,6 @@
package com.jcdm.main.da.testDeviceInterface.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
@@ -68,8 +69,10 @@
    @Excel(name = "创建用户")
    private String createUser;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /** 更改用户 */
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -136,6 +136,8 @@
                omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum"));
                omProductionOrdeInfo.setStationCode(dataObject.getStr("stationCode"));
                omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode"));
                omProductionOrdeInfo.setOnlineCompletionMark("0");
                omProductionOrdeInfo.setSfResult("0");
                if(dataObject.getStr("model").equals("PE01A")){
                    omProductionOrdeInfo.setProductCode("1P102S");
                }else {
@@ -249,4 +251,13 @@
    {
        return omProductionOrdeInfoService.findBytrolleyYardGetOne(omProductionOrdeInfo);
    }
    @GetMapping("/workReportingByStation/{id}/{stationCode}")
    public AjaxResult workReportingByStation(@PathVariable("id") Long id, @PathVariable("stationCode") String stationCode)
    {
        OmProductionOrdeInfo omProductionOrdeInfo = new OmProductionOrdeInfo();
        omProductionOrdeInfo.setId(id);
        omProductionOrdeInfo.setStationCode(stationCode);
        return omProductionOrdeInfoService.workReportingByStation(omProductionOrdeInfo);
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java
@@ -75,4 +75,9 @@
    AjaxResult findBytrolleyYardGetOne(OmProductionOrdeInfo omProductionOrdeInfo);
    List<OmProductionOrdeInfo> checkCarCode(OmProductionOrdeInfo omProductionOrdeInfo);
    AjaxResult workReportingByStation(OmProductionOrdeInfo omProductionOrdeInfo);
    void updateOrderByProductNum(String status,String productNum,String stationCode);
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
@@ -1,10 +1,14 @@
package com.jcdm.main.om.productionOrde.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
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.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.utils.DateUtils;
@@ -29,6 +33,7 @@
public class OmProductionOrdeInfoServiceImpl extends ServiceImpl<OmProductionOrdeInfoMapper,OmProductionOrdeInfo> implements IOmProductionOrdeInfoService
{
    private static final Logger logger = LoggerFactory.getLogger("sys-user");
    public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    @Autowired
    private OmProductionOrdeInfoMapper omProductionOrdeInfoMapper;
@@ -197,4 +202,37 @@
        List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, omProductionOrdeInfo.getProductNum()).isNotNull(OmProductionOrdeInfo::getTrolleyYard));
        return list;
    }
    @Override
    public AjaxResult workReportingByStation(OmProductionOrdeInfo info) {
        OmProductionOrdeInfo omProductionOrdeInfo = omProductionOrdeInfoService.getById(info.getId());
        logger.info("OP230报工开始-工厂MES异步方法");
        String reportResult = RestfulService.getWorkReportResultFeedback(omProductionOrdeInfo.getProductNum(), info.getStationCode(), format.format(new Date()));
        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,添加报工时间
            this.updateOrderByProductNum("1",omProductionOrdeInfo.getProductNum(),info.getStationCode());
        }else{
            //解析工厂mes返回结果,如果失败,执行报工失败方法,修改是否报工为2,添加报工时间
            this.updateOrderByProductNum("2",omProductionOrdeInfo.getProductNum(),info.getStationCode());
        }
        return null;
    }
    @Override
    public void updateOrderByProductNum(String onlineCompletionMark, String productNum, String stationCode) {
        LambdaUpdateWrapper<OmProductionOrdeInfo> updateWrapper = new LambdaUpdateWrapper<>();
        if(stationCode.equals("OP230")){
            updateWrapper.set(OmProductionOrdeInfo::getOnlineCompletionMark,onlineCompletionMark);
            updateWrapper.set(OmProductionOrdeInfo::getActualStartTime,new Date());
        }
        if(stationCode.equals("OP500")){
            updateWrapper.set(OmProductionOrdeInfo::getSfResult,onlineCompletionMark);
        }
        updateWrapper.eq(OmProductionOrdeInfo::getProductNum,productNum);
        OmProductionOrdeInfo omProductionOrdeInfo = new OmProductionOrdeInfo();
        omProductionOrdeInfoService.update(omProductionOrdeInfo,updateWrapper);
    }
}
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -63,56 +63,56 @@
    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_OP290_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP290_AngleResult);//请求记录数据
        lists.add(OPCElement.PACK_OP300A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP300B_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP310A_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_OP500_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP500_AngleResult);//请求记录数据
//        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_OP290_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP290_AngleResult);//请求记录数据
//        lists.add(OPCElement.PACK_OP300A_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP300B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP310A_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_OP280_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP320A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP320B_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP340A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP340B_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP350A_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP350B_RecordData);//请求记录数据
        lists.add(OPCElement.PACK_OP360_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_OP500_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP500_AngleResult);//请求记录数据
////
//        lists.add(OPCElement.PACK_OP280_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP320A_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP320B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP340A_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP340B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP350A_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP350B_RecordData);//请求记录数据
//        lists.add(OPCElement.PACK_OP360_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);//请求记录数据
        return lists;
    }
jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java
@@ -2,23 +2,27 @@
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
public class RestfulService {
    public static void main(String[] args) {
        String str = "uuuuuu11uuuuuuuuuuuuuuu";
        System.out.println(str.length());
//        getWorkReportResultFeedback() https://imes-uat-group.geelycv-test.com
        String json = "{\"code\":\"success\",\"data\":{\"productNum\":\"LCV123456P0600036\",\"stationCode\":\"1HZ01\",\"resultCode\":\"S\",\"resultText\":\"报工成功\"},\"message\":\"API 调用成功\"}";
        JSONObject jsonObject = new JSONObject(json);
        String code = jsonObject.getStr("code");
        String resultCode = jsonObject.getJSONObject("data").getStr("resultCode");
        System.out.println("code: " + code);
        System.out.println("resultCode: " + resultCode);
    }
//    public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration";
    public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration";
//
//    public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface";
    public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface";
    public static final String getRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration";
//    public static final String getRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration";
    public static final String postRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/interface";
//    public static final String postRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/interface";
    public static final String siteCode = "3983";
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -5,6 +5,7 @@
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -12,6 +13,8 @@
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.framework.websocket.WebSocketUsers;
import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting;
import com.jcdm.main.bs.beatSetting.service.IBsBeatSettingService;
import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo;
import com.jcdm.main.bs.formulaChild.service.IBsFormulaChildInfoService;
import com.jcdm.main.constant.Constants;
@@ -23,6 +26,7 @@
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.restful.factoryMes.service.RestfulService;
import com.jcdm.main.restful.qingYan.doman.*;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.weaver.loadtime.Aj;
@@ -65,6 +69,9 @@
    @Autowired
    private IBsFormulaChildInfoService bsFormulaChildInfoService;
    @Autowired
    private IBsBeatSettingService bsBeatSettingService;
    private IDaPassingStationCollectionService passingStationCollectionService;
@@ -205,14 +212,38 @@
        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")
    public AjaxResult getQualityData(){
        List<DaPassingStationCollection> qualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "1"));
        List<DaPassingStationCollection> unQualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "2"));
        Map<String,Integer> map = new HashMap<>();
        map.put("qualified",qualified.size());
        map.put("unQualified",unQualified.size());
        return AjaxResult.success(map);
//        List<DaPassingStationCollection> qualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "1"));
//        List<DaPassingStationCollection> unQualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "2"));
//        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], "OP500", "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();
    }
jcdm-main/src/main/resources/mapper/bs/beatSetting/BsBeatSettingMapper.xml
@@ -9,8 +9,6 @@
        <result property="productCode"    column="product_code"    />
        <result property="productName"    column="product_name"    />
        <result property="beat"    column="beat"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="remark"    column="remark"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
@@ -20,7 +18,7 @@
    </resultMap>
    <sql id="selectBsBeatSettingVo">
        select id, product_code, product_name, beat, spare_field_1, spare_field_2, remark, create_user, create_time, update_user, update_time, data_source from bs_beat_setting
        select id, product_code, product_name, beat, remark, create_user, create_time, update_user, update_time, data_source from bs_beat_setting
    </sql>
    <select id="selectBsBeatSettingList" parameterType="BsBeatSetting" resultMap="BsBeatSettingResult">
@@ -29,8 +27,6 @@
            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
            <if test="beat != null  and beat != ''"> and beat = #{beat}</if>
            <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="dataSource != null  and dataSource != ''"> and data_source = #{dataSource}</if>
@@ -48,8 +44,6 @@
            <if test="productCode != null">product_code,</if>
            <if test="productName != null">product_name,</if>
            <if test="beat != null and beat != ''">beat,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="remark != null">remark,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
@@ -61,8 +55,6 @@
            <if test="productCode != null">#{productCode},</if>
            <if test="productName != null">#{productName},</if>
            <if test="beat != null and beat != ''">#{beat},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="remark != null">#{remark},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
@@ -78,8 +70,6 @@
            <if test="productCode != null">product_code = #{productCode},</if>
            <if test="productName != null">product_name = #{productName},</if>
            <if test="beat != null and beat != ''">beat = #{beat},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -81,6 +81,8 @@
            <if test="resultText != null  and resultText != ''"> and result_text = #{resultText}</if>
            <if test="resultCode != null  and resultCode != ''"> and result_code = #{resultCode}</if>
            <if test="sfResult != null  and sfResult != ''"> and sf_result = #{sfResult}</if>
            <if test="onlineCompletionMark != null  and sfResult != ''"> and online_completion_mark = #{onlineCompletionMark}</if>
        </where>
        ORDER BY stream_number DESC
    </select>
jcdm-ui/src/api/main/da/paramCollection/paramCollection.js
@@ -71,6 +71,15 @@
  })
}
export function preInstallOut(data) {
  return request({
    url: '/main/paramCollection/preInstallOut',
    method: 'post',
    data: data
  })
}
// 新增设备产品过程参数采集 saveCampaignTimeParameters
export function saveCampaignTimeParameters(data) {
  return request({
jcdm-ui/src/api/main/om/productionOrde/productionOrde.js
@@ -74,6 +74,13 @@
  })
}
export function workReportingByStation(id,stationCode) {
  return request({
    url: '/om/productionOrde/workReportingByStation/' + id+'/' + stationCode,
    method: 'get',
  })
}
// 新增生产工单
export function addProductionOrde(data) {
  return request({
jcdm-ui/src/views/main/bs/formulaChild/index.vue
@@ -2,22 +2,6 @@
  <div class="app-container">
    <el-card class="box-card">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="车间" prop="workshopCode">
            <el-input
              v-model="queryParams.workshopCode"
              placeholder="请输入车间"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="产线" prop="lineCode">
            <el-input
              v-model="queryParams.lineCode"
              placeholder="请输入产线"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="工序" prop="processesCode">
            <el-input
              v-model="queryParams.processesCode"
@@ -26,24 +10,40 @@
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="产品编号" prop="productCode">
          <el-form-item label="参数编码" prop="paramCode">
            <el-input
              v-model="queryParams.productCode"
              placeholder="请输入产品编号"
              v-model="queryParams.paramCode"
              placeholder="请输入参数编码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
<!--          <el-form-item label="类型" prop="operationType">-->
<!--            <el-select v-model="queryParams.operationType" placeholder="请选择类型" clearable>-->
<!--              <el-option-->
<!--                v-for="dict in dict.type.${dictType}"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          <el-form-item label="产线" prop="lineCode">-->
<!--            <el-input-->
<!--              v-model="queryParams.lineCode"-->
<!--              placeholder="请输入产线"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="产品编号" prop="productCode">-->
<!--            <el-input-->
<!--              v-model="queryParams.productCode"-->
<!--              placeholder="请输入产品编号"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
          <el-form-item label="类型" prop="operationType">
            <el-select v-model="queryParams.operationType" placeholder="请选择类型" clearable>
              <el-option
                v-for="dict in dict.type.operation_type"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -218,12 +218,12 @@
    />
    <!-- 添加或修改配方配置子信息对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
    <el-dialog v-dialogpop-up  :title="title" :visible.sync="open" width="1000px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
      <el-form ref="form" :inline="true" :model="form" :rules="rules" label-width="80px">
<!--        <el-form-item label="车间" prop="workshopCode">-->
<!--          <el-input v-model="form.workshopCode" placeholder="请输入车间" />-->
<!--        </el-form-item>-->
jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -45,7 +45,7 @@
                  <br>
                  <br>
                  <br>
                  <div ref="canvasWrapper" id="canvasWrapper1" style="display: flex;justify-content: center;margin-top: -27px"></div>
                  <div ref="canvasWrapper" id="canvasWrapper1" style="display: flex;justify-content: center;margin-top: -27px;"></div>
                  <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 9px">P9900166410#T{{text1}}#V993983#SSW002.005#HHW001.001#NBMS#</span>
                  <br>
                  <br>
jcdm-ui/src/views/main/da/paramCollection/index.vue
@@ -2,18 +2,42 @@
  <div class="app-container">
    <el-card class="box-card">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="产品编码" prop="productCode">
      <el-form-item label="工单编号" prop="workOrderNo">
        <el-input
          v-model="queryParams.productCode"
          placeholder="请输入产品编码"
          v-model="queryParams.workOrderNo"
          placeholder="请输入工单编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="产品名称" prop="productName">
      <el-form-item label-width="100px" label="总成序列号" prop="sfcCode">
        <el-input
          v-model="queryParams.productName"
          placeholder="请输入产品名称"
          v-model="queryParams.sfcCode"
          placeholder="请输入总成序列号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="参数编码" prop="paramCode">
        <el-input
          v-model="queryParams.paramCode"
          placeholder="请输入参数编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="工序" prop="locationCode">
        <el-input
          v-model="queryParams.locationCode"
          placeholder="请输入工序"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="产品编码" prop="productCode">
        <el-input
          v-model="queryParams.productCode"
          placeholder="请输入产品编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
@@ -73,15 +97,15 @@
    <el-table v-loading="loading" border :data="paramCollectionList" @selection-change="handleSelectionChange" v-if="paramCollectionList.length > 0">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="工单编号" width="150" align="center" prop="workOrderNo"></el-table-column>
      <el-table-column label="总成序列号" align="center" width="140" prop="sfcCode" ></el-table-column>
      <el-table-column label="产品编号" align="center" width="150" prop="productCode"></el-table-column>
      <el-table-column label="工单编号" width="100" align="center" prop="workOrderNo"></el-table-column>
      <el-table-column label="总成序列号" align="center" width="290" prop="sfcCode" ></el-table-column>
      <el-table-column label="产品编号" align="center" width="100" prop="productCode"></el-table-column>
<!--      <el-table-column label="产线编号" align="center" prop="productionLine"></el-table-column>-->
      <el-table-column label="工序编号" align="center" prop="locationCode"></el-table-column>
<!--      <el-table-column label="设备编号" align="center" prop="equipmentNo"></el-table-column>-->
      <el-table-column label="参数编码" width="150" align="center" prop="paramCode"></el-table-column>
      <el-table-column label="参数编码" width="190" align="center" prop="paramCode"></el-table-column>
      <el-table-column label="参数名称" width="150" align="center" prop="paramName"></el-table-column>
      <el-table-column label="参数值" width="160" align="center" prop="paramValue"></el-table-column>
      <el-table-column label="参数值" width="330" align="center" prop="paramValue"></el-table-column>
<!--      <el-table-column label="参数上限" align="center" prop="paramUpper"></el-table-column>
      <el-table-column label="参数下限" align="center" prop="paramLower"></el-table-column>-->
      <el-table-column label="采集时间" align="center" prop="collectionTime" width="160">
jcdm-ui/src/views/main/da/passingStationCollection/index.vue
@@ -2,6 +2,30 @@
  <div class="app-container">
    <el-card class="box-card">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="工单编号" prop="workOrderNo">
        <el-input
          v-model="queryParams.workOrderNo"
          placeholder="请输入工单编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label-width="100px" label="总成序列号" prop="sfcCode">
        <el-input
          v-model="queryParams.sfcCode"
          placeholder="请输入总成序列号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="工序" prop="locationCode">
        <el-input
          v-model="queryParams.locationCode"
          placeholder="请输入工序"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入站时间" prop="inboundTime">
        <el-date-picker clearable
          v-model="queryParams.inboundTime"
@@ -73,11 +97,11 @@
    <el-table v-loading="loading" border :data="passingStationCollectionList" @selection-change="handleSelectionChange" v-if="passingStationCollectionList.length > 0">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="工单编号" align="center" prop="workOrderNo">
      <el-table-column label="工单编号" width="100" align="center" prop="workOrderNo">
      </el-table-column>
<!--      <el-table-column label="总成序列号" align="center" prop="sfcCode">-->
<!--      </el-table-column>-->
      <el-table-column label="产品序列号" align="center" prop="productCode">
      <el-table-column label="总成序列号" width="310" align="center" prop="sfcCode">
      </el-table-column>
      <el-table-column label="产品编码" align="center" prop="productCode">
      </el-table-column>
<!--      <el-table-column label="产线编号" align="center" prop="productionLine">-->
<!--      </el-table-column>-->
@@ -94,7 +118,10 @@
        </template>
      </el-table-column>
      <el-table-column label="是否合格" align="center" prop="outRsSign">
      <el-table-column label="是否合格" align="center">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.qualified_status" :value="scope.row.outRsSign"/>
        </template>
      </el-table-column>
      <el-table-column label="NG原因" align="center" prop="outMsgSign">
      </el-table-column>
@@ -103,19 +130,19 @@
<!--          <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
<!--        </template>-->
<!--      </el-table-column>-->
      <el-table-column label="节拍时间" align="center" prop="beatTime">
      </el-table-column>
<!--      <el-table-column label="节拍时间" align="center" prop="beatTime">-->
<!--      </el-table-column>-->
      <el-table-column fixed="right" label="操作" width="200" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="success"
            plain
            style="width: 72px"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['da:passingStationCollection:edit']"
          >修改</el-button>
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="success"-->
<!--            plain-->
<!--            style="width: 72px"-->
<!--            icon="el-icon-edit"-->
<!--            @click="handleUpdate(scope.row)"-->
<!--            v-hasPermi="['da:passingStationCollection:edit']"-->
<!--          >修改</el-button>-->
          <el-button
            size="mini"
            type="danger"
@@ -178,7 +205,7 @@
            placeholder="请选择出站时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="是否合格" prop="outRsSign">
        <el-form-item label="是否合格">
          <el-input v-model="form.outRsSign" placeholder="请输入出站是否合格" />
        </el-form-item>
        <el-form-item label="NG原因" prop="outMsgSign">
@@ -209,6 +236,7 @@
export default {
  name: "PassingStationCollection",
  dicts: ['qualified_status'],
  data() {
    return {
      // 遮罩层
jcdm-ui/src/views/main/da/testDeviceInterface/index.vue
@@ -2,10 +2,10 @@
  <div class="app-container">
    <el-card class="box-card">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="检验记录编号" prop="recordId">
          <el-form-item label-width="1" label="检验记录编号" prop="recordId">
            <el-input
              v-model="queryParams.recordId"
              placeholder="请输入检验记录编号,由各设备按自定规则生成,唯一编码"
              placeholder="请输入检验记录编号"
              clearable
              @keyup.enter.native="handleQuery"
            />
@@ -69,38 +69,38 @@
    <el-card style="margin-top: 10px" class="box-card">
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['da:testDeviceInterface:add']"
            >新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="mini"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['da:testDeviceInterface:edit']"
            >修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="mini"
              :disabled="multiple"
              @click="handleDelete"
              v-hasPermi="['da:testDeviceInterface:remove']"
            >删除</el-button>
          </el-col>
<!--          <el-col :span="1.5">-->
<!--            <el-button-->
<!--              type="primary"-->
<!--              plain-->
<!--              icon="el-icon-plus"-->
<!--              size="mini"-->
<!--              @click="handleAdd"-->
<!--              v-hasPermi="['da:testDeviceInterface:add']"-->
<!--            >新增</el-button>-->
<!--          </el-col>-->
<!--          <el-col :span="1.5">-->
<!--            <el-button-->
<!--              type="success"-->
<!--              plain-->
<!--              icon="el-icon-edit"-->
<!--              size="mini"-->
<!--              :disabled="single"-->
<!--              @click="handleUpdate"-->
<!--              v-hasPermi="['da:testDeviceInterface:edit']"-->
<!--            >修改</el-button>-->
<!--          </el-col>-->
<!--          <el-col :span="1.5">-->
<!--            <el-button-->
<!--              type="danger"-->
<!--              plain-->
<!--              icon="el-icon-delete"-->
<!--              size="mini"-->
<!--              :disabled="multiple"-->
<!--              @click="handleDelete"-->
<!--              v-hasPermi="['da:testDeviceInterface:remove']"-->
<!--            >删除</el-button>-->
<!--          </el-col>-->
          <el-col :span="1.5">
            <el-button
              type="warning"
@@ -116,57 +116,56 @@
        <el-table border v-loading="loading" :data="testDeviceInterfaceList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="id" align="center" prop="id" />
          <el-table-column label="检验记录编号" align="center" prop="recordId">
          <el-table-column label="检验记录编号" width="100" :show-overflow-tooltip='true' align="center" prop="recordId">
          </el-table-column>
          <el-table-column label="站点编号" align="center" prop="stationCode">
          <el-table-column label="站点编号" width="100" align="center" prop="stationCode">
          </el-table-column>
          <el-table-column label="pack码" align="center" prop="productNum">
          <el-table-column label="pack码" width="230" :show-overflow-tooltip='true' align="center" prop="productNum">
          </el-table-column>
          <el-table-column label="整体结果 " align="center" prop="totalResult">
          <el-table-column label="整体结果" width="100" align="center" prop="totalResult">
          </el-table-column>
          <el-table-column label="工单号" align="center" prop="workOrderNo">
          <el-table-column label="工单号" width="100" align="center" prop="workOrderNo">
          </el-table-column>
          <el-table-column label="供应商类型" align="center" prop="supplierType">
<!--          <el-table-column label="供应商类型" align="center" prop="supplierType">-->
<!--          </el-table-column>-->
          <el-table-column label="入参" width="300" :show-overflow-tooltip='true' align="center" prop="checkList">
          </el-table-column>
          <el-table-column label="入参" align="center" prop="checkList">
          </el-table-column>
          <el-table-column label="状态编码" align="center" prop="resultCode">
          </el-table-column>
          <el-table-column label="返回信息" align="center" prop="resultMessage">
          </el-table-column>
          <el-table-column label="出参" align="center" prop="resultData">
          </el-table-column>
<!--          <el-table-column label="状态编码" width="100" align="center" prop="resultCode">-->
<!--          </el-table-column>-->
<!--          <el-table-column label="返回信息" width="100" align="center" prop="resultMessage">-->
<!--          </el-table-column>-->
<!--          <el-table-column label="出参" width="100" align="center" prop="resultData">-->
<!--          </el-table-column>-->
          <el-table-column label="创建用户" align="center" prop="createUser">
          </el-table-column>
          <el-table-column label="创建时间" align="center" prop="createTime">
          <el-table-column label="创建时间" width="160" align="center" prop="createTime">
          </el-table-column>
          <el-table-column label="更改用户" align="center" prop="updateUser">
          </el-table-column>
          <el-table-column label="更改时间" align="center" prop="updateTime">
          <el-table-column label="更改时间" width="160" align="center" prop="updateTime">
          </el-table-column>
          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="success"
                plain
                style="width: 72px"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['da:testDeviceInterface:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['da:testDeviceInterface:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
<!--          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">-->
<!--            <template slot-scope="scope">-->
<!--              <el-button-->
<!--                size="mini"-->
<!--                type="success"-->
<!--                plain-->
<!--                style="width: 72px"-->
<!--                icon="el-icon-edit"-->
<!--                @click="handleUpdate(scope.row)"-->
<!--                v-hasPermi="['da:testDeviceInterface:edit']"-->
<!--              >修改</el-button>-->
<!--              <el-button-->
<!--                size="mini"-->
<!--                type="danger"-->
<!--                plain-->
<!--                style="width: 72px"-->
<!--                icon="el-icon-delete"-->
<!--                @click="handleDelete(scope.row)"-->
<!--                v-hasPermi="['da:testDeviceInterface:remove']"-->
<!--              >删除</el-button>-->
<!--            </template>-->
<!--          </el-table-column>-->
        </el-table>
    </el-card>
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -4,6 +4,7 @@
     <el-col :span="7">
       <el-card shadow="never">
         <span class="head-font">工位编号 : {{headContent.processesCode}}</span>
         <span hidden>{{headContent.inboundTime}}</span>
       </el-card>
     </el-col>
     <el-col :span="7">
@@ -201,7 +202,7 @@
import USBDevice from "@/utils/usb.json";
import {addPassingStationCollection} from "@/api/main/da/passingStationCollection/passingStationCollection";
import {
  addTighteningParameters,
  addTighteningParameters, preInstallOut,
  replaceAssemblyCode,
  saveCampaignTimeParameters,
  yzAddBasicParameters,
@@ -229,6 +230,7 @@
        processesName: '贴标机-贴码',
        sfcCode: '',
        yzSfcCode: '',
        inboundTime: '',
      },
      workpieceInformation: {
        workOrderNo: null,
@@ -259,7 +261,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,
@@ -337,6 +340,20 @@
      }
    },
    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');
    },
    serialPortMethod(value){
      let formulaChildParams = {
@@ -420,7 +437,7 @@
      }
      fistSetpNumber(param).then(response => {});
      this.getListFormulaChild()
      this.addOverStationCollection()
      // this.addOverStationCollection()
    },
    /** 入站增加过站采集记录 **/
@@ -477,36 +494,7 @@
        this.$message('websocket连接成功!');
      };
      this.ws.onmessage = function (event) {
        if (event.data === "IN") {
          self.cakeLamp.InPlace = 1;
        } else if (event.data === "IN0") {
          self.cakeLamp.InPlace = 0;
        } else if (event.data === "OUT") {
          console.log("out")
          const param = {
            workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: "1P102S",
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
          }
          // saveCampaignTimeParameters(param).then(response => {});
          // self.cakeLamp.release = 1;
          workpieceRelease(param).then(response => {});
          self.formulaChildList = [];
          self.headContent.sfcCode = '';
          console.log(self.formulaChildList)
        } else if (event.data === "END") {
          // const param = {
          //   workOrderNo: self.workpieceInformation.workOrderNo,
          //   productCode: self.workpieceInformation.productCode,
          //   locationCode: self.headContent.processesCode,
          //   productBarcode: self.headContent.sfcCode,
          // }
          // saveCampaignTimeParameters(param).then(response => {});
          // self.endClear()
          // workpieceRelease(param).then(response => {});
        } else if (event.data.includes("[")) {
        if(event.data.includes("[")) {
          let formulaChilds = "";
          self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort);
          self.formulaChildList
@@ -523,45 +511,46 @@
            tightenTheArray: event.data,
            paramCode: formulaChilds.paramCode,
            // workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: "1P102S",
            // productCode: "1P102S",
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
          }
          if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){
            self.$message('未找到参数码,请检查参数码是否正确');
            return;
            spareField2: formulaChilds.spareField2,
            spareField3: formulaChilds.spareField3,
            spareField4: formulaChilds.spareField4,
            stepSort: formulaChilds.stepSort
          }
          if(self.headContent.sfcCode === null||self.headContent.sfcCode ===''){
            self.$message('未找到总成码,请先扫码!');
            return;
          }
          if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){
            self.$message('未找到参数码,请检查参数码是否正确');
            return;
          }
          checkMaterialCode(param).then(response => {
            if(response.msg === "2"){
              self.$message('未扫描物料码完毕!');
              return;
            }else {
              yzUpdateTighteningFormula(param).then(response => {
                console.log(response)
                if(response.msg === "1" || response.msg === "3"){
                  self.getListFormulaChild()
                }else {
                  const param = {
                    locationCode: self.headContent.processesCode,
                    productBarcode: self.headContent.sfcCode,
                    inboundTime: self.headContent.inboundTime
                  }
                  preInstallOut(param).then(response => {});
                  workpieceRelease(param).then(response => {});
                  self.formulaChildList = [];
                  self.headContent.sfcCode = '';
                }
              });
              addTighteningParameters(param).then(response => {});
            }
          });
          yzUpdateTighteningFormula(param).then(response => {
          console.log(response)
          if(response.msg === "1" || response.msg === "3"){
              self.getListFormulaChild()
          }else {
            const param = {
              workOrderNo: self.workpieceInformation.workOrderNo,
              productCode: "1P102S",
              locationCode: self.headContent.processesCode,
              productBarcode: self.headContent.sfcCode,
            }
            saveCampaignTimeParameters(param).then(response => {});
            workpieceRelease(param).then(response => {});
            self.formulaChildList = [];
            self.headContent.sfcCode = '';
          }
        });
        addTighteningParameters(param).then(response => {});
        // self.getListFormulaChild()
        }
      };
    },
@@ -581,6 +570,7 @@
          this.serialPortMethod(scanValue)
        } else {
          this.headContent.sfcCode = scanValue;
          this.headContent.inboundTime = this.getCurrentTime();
          this.getList()
        }
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -34,18 +34,21 @@
           <el-descriptions-item label="工单编号">
               <span>{{workpieceInformation.workOrderNo}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品编号">
           <el-descriptions-item label="产品型号">
             <span>{{workpieceInformation.productCode}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品型号">
             <span>{{workpieceInformation.productModel}}</span>
           <el-descriptions-item label="小车码">
             <span>{{headContent.cardCode}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品名称">
             <span>{{workpieceInformation.productName}}</span>
           </el-descriptions-item>
<!--           <el-descriptions-item label="节拍">-->
<!--             <span>{{workpieceInformation.beat}}</span>-->
<!--           <el-descriptions-item label="产品型号">-->
<!--             <span>{{workpieceInformation.productModel}}</span>-->
<!--           </el-descriptions-item>-->
<!--           <el-descriptions-item label="产品名称">-->
<!--             <span>{{workpieceInformation.productName}}</span>-->
<!--           </el-descriptions-item>-->
           <el-descriptions-item label="开始时间">
             <span>{{workpieceInformation.inboundTime}}</span>
           </el-descriptions-item>
         </el-descriptions>
         <el-divider></el-divider>
         <el-row>
@@ -93,10 +96,10 @@
<!--           <el-button @click="bindYzSfc" type="primary">绑定</el-button>-->
<!--         </el-row>-->
         <el-row v-show="onLineBinDing" style="margin-top: 20px">
           <el-col></el-col>
           <span style="width: 130px;" class="head-font">小车码 : {{headContent.cardCode}}</span>
         </el-row>
<!--         <el-row v-show="onLineBinDing" style="margin-top: 20px">-->
<!--           <el-col></el-col>-->
<!--           <span style="width: 130px;" class="head-font">小车码 : {{headContent.cardCode}}</span>-->
<!--         </el-row>-->
<!--         <el-row v-show="onLineBinDing" style="margin-top: 20px">-->
<!--           <el-button @click="bindcardCode" type="primary">绑定</el-button>-->
<!--         </el-row>-->
@@ -111,18 +114,21 @@
             <el-table height="500" :cell-style="rowStyle" :data="formulaChildList">
<!--               <el-table-column label="排序" width="60" align="center" type="index">-->
<!--               </el-table-column>-->
               <el-table-column label="拧紧步号" align="center" prop="stepSort">
               <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 label="操作内容" align="center" prop="operationSteps">
               </el-table-column>
               <el-table-column label="产品编号" align="center" prop="productCode">
<!--               <el-table-column label="上限" width="60" align="center" prop="spareField3">-->
<!--               </el-table-column>-->
<!--               <el-table-column label="下限" width="60" align="center" prop="spareField4">-->
<!--               </el-table-column>-->
               <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="110" 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>
@@ -361,7 +367,7 @@
        productCode: null,
        productModel: null,
        productName: null,
        beat: null,
        inboundTime: null,
      },
      // 查询参数
      queryParams: {
@@ -385,7 +391,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,
@@ -415,6 +422,7 @@
      passingStationForm: {},
      originalArray: [],
      yzSfcFlag: 1,
      endYz: false,
    }
  },
  beforeDestroy() {
@@ -451,11 +459,11 @@
    },
  },
  methods: {
    bindcardCode(){
      this.$message('绑定成功!');
    bindcardCode(scanValue){
      // this.$message('绑定成功!');
      let param = {
        productNum: this.headContent.sfcCode,
        trolleyYard: this.headContent.cardCode,
        trolleyYard: scanValue,
      }
      trolleyYardBinDing(param).then(response => {
      });
@@ -560,6 +568,7 @@
      this.workpieceInformation.workOrderNo = null;
      this.workpieceInformation.productModel = null;
      this.workpieceInformation.productName = null;
      this.workpieceInformation.inboundTime = null;
      this.headContent.sfcCode = '';
      this.headContent.yzSfcCode = '';
      this.headContent.cardCode = '';
@@ -598,12 +607,11 @@
        this.workpieceInformation.productCode = rowsData.productCode;
        this.workpieceInformation.productModel = rowsData.productModel;
        this.workpieceInformation.productName = rowsData.productName;
        // this.timer = setInterval(() => {
        //   this.workpieceInformation.beat++;
        // }, 1000);
        this.headContent.cardCode = rowsData.trolleyYard;
      });
      this.getListFormulaChild()
      this.addOverStationCollection()
      // this.addOverStationCollection()
      this.workpieceInformation.inboundTime = this.getCurrentTime()
      const param = {
        processesCode: this.headContent.processesCode,
      }
@@ -612,6 +620,19 @@
      });
    },
    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');
    },
    addBaseData(){
      addBasicParameters(this.passingStationForm).then(response => {});
    },
@@ -662,7 +683,7 @@
          this.onLineBinDing = true
        }
        if(this.headContent.processesCode === 'OP260'){
          this.showInput = true
          // this.showInput = true
        }
        console.log('设置工位编码' + this.headContent.processesCode)
@@ -690,12 +711,8 @@
        } else if (event.data === "OUT") {
          self.cakeLamp.release = 1;
        } else if (event.data === "END") {
          const param = {
            workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: self.workpieceInformation.productCode,
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
          }
          const formulaChildIndex = self.formulaChildList.length-1
          const orderParam = {
            productNum: self.headContent.sfcCode,
@@ -703,49 +720,97 @@
          if(self.headContent.sfcCode=== ''||self.headContent.sfcCode=== null){
            self.$message('总成码为空,请扫码!')
            return
            return;
          }
          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
              });
            }
          });
          // 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,
            productCode: self.workpieceInformation.productCode,
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
            inboundTime: self.workpieceInformation.inboundTime,
            formulaChildEntity: self.formulaChildList[formulaChildIndex]
          }
          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);
@@ -794,7 +859,13 @@
      };
    },
    endSaveData(param){
      saveCampaignTimeParameters(param).then(response => {
      this.cakeLamp.release = 1;
      this.endClear()
      workpieceRelease(param).then(response => {});
      });
    },
    //接受数据的回调
    callBack(value) {
@@ -805,12 +876,14 @@
        console.log("sfc=--"+this.headContent.sfcCode+"--")
        if(this.headContent.sfcCode !== '' && this.headContent.sfcCode !== null
          && this.headContent.sfcCode !== undefined){
          if(scanValue.includes("P9900173252")){
            this.headContent.yzSfcCode = scanValue
            this.bindYzSfc();
          }else if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'OP240'){
          // if(scanValue.includes("P9900173252")){
          //   this.headContent.yzSfcCode = scanValue
          //   this.bindYzSfc();
          // }else
          if(scanValue.includes("0RSP1TE") && this.headContent.processesCode === 'OP240'){
            this.headContent.cardCode = scanValue
            this.bindcardCode();
            this.bindcardCode(scanValue);
            this.serialPortMethod(scanValue)
          }else {
            this.$message('工位终端扫描物料编码'+scanValue);
            console.log(scanValue)
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -10,24 +10,51 @@
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="产品名称" prop="productName">
      <el-form-item label="产品编码" prop="productCode">
        <el-input
          v-model="queryParams.productName"
          placeholder="请输入产品名称"
          v-model="queryParams.productCode"
          placeholder="请输入产品编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="工单状态" prop="orderStatus">
        <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>
      <el-form-item label-width="80" label="PACK码" prop="productNum">
        <el-input
          v-model="queryParams.productNum"
          placeholder="请输入PACK码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="小车码" prop="trolleyYard">
        <el-input
          v-model="queryParams.trolleyYard"
          placeholder="请输入小车码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label-width="1" label="上线报工状态" prop="onlineCompletionMark">
        <el-select v-model="queryParams.onlineCompletionMark" placeholder="请选择上线报工状态" clearable>
          <el-option
            v-for="dict in dict.type.order_state"
            v-for="dict in dict.type.work_reporting_status"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label-width="1" label="下线报工状态" prop="sfResult">
        <el-select v-model="queryParams.sfResult" placeholder="请选择下线报工状态" clearable>
          <el-option
            v-for="dict in dict.type.work_reporting_status"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <div style="display: none">
        <div id="printMe" style="width: 500px;">
          <div ref="canvasWrapper" id="canvasWrapper" style="display: flex;justify-content: center;"></div>
@@ -80,54 +107,54 @@
    <el-card style="margin-top: 10px" class="box-card">
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['om:productionOrde:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['om:productionOrde:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="danger"-->
<!--          type="primary"-->
<!--          plain-->
<!--          icon="el-icon-delete"-->
<!--          icon="el-icon-plus"-->
<!--          size="mini"-->
<!--          :disabled="multiple"-->
<!--          @click="handleDelete"-->
<!--          v-hasPermi="['om:productionOrde:remove']"-->
<!--        >删除</el-button>-->
        <el-button
          type="info"
          icon="el-icon-upload2"
          size="mini"
          @click="handleImport"
        >导入</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['om:productionOrde:export']"
        >导出</el-button>
      </el-col>
<!--          @click="handleAdd"-->
<!--          v-hasPermi="['om:productionOrde:add']"-->
<!--        >新增</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="success"-->
<!--          plain-->
<!--          icon="el-icon-edit"-->
<!--          size="mini"-->
<!--          :disabled="single"-->
<!--          @click="handleUpdate"-->
<!--          v-hasPermi="['om:productionOrde:edit']"-->
<!--        >修改</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--&lt;!&ndash;        <el-button&ndash;&gt;-->
<!--&lt;!&ndash;          type="danger"&ndash;&gt;-->
<!--&lt;!&ndash;          plain&ndash;&gt;-->
<!--&lt;!&ndash;          icon="el-icon-delete"&ndash;&gt;-->
<!--&lt;!&ndash;          size="mini"&ndash;&gt;-->
<!--&lt;!&ndash;          :disabled="multiple"&ndash;&gt;-->
<!--&lt;!&ndash;          @click="handleDelete"&ndash;&gt;-->
<!--&lt;!&ndash;          v-hasPermi="['om:productionOrde:remove']"&ndash;&gt;-->
<!--&lt;!&ndash;        >删除</el-button>&ndash;&gt;-->
<!--        <el-button-->
<!--          type="info"-->
<!--          icon="el-icon-upload2"-->
<!--          size="mini"-->
<!--          @click="handleImport"-->
<!--        >导入</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="warning"-->
<!--          plain-->
<!--          icon="el-icon-download"-->
<!--          size="mini"-->
<!--          @click="handleExport"-->
<!--          v-hasPermi="['om:productionOrde:export']"-->
<!--        >导出</el-button>-->
<!--      </el-col>-->
      <el-col :span="1.5">
        <el-button
          type="warning"
@@ -147,6 +174,26 @@
          @click="patchwork"
        >补打</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          :disabled="onlineSingle"
          @click="onlineWorkReporting"
        >上线报工</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          :disabled="offlineSingle"
          @click="offlineWorkReporting"
        >下线报工</el-button>
      </el-col>
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="warning"-->
@@ -162,12 +209,14 @@
      <el-table border v-loading="loading" :data="productionOrdeList" @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="生产工单号" width="160" align="center">
          <template slot-scope="scope">
            <router-link :to="{path: '/main/workReport-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">
              <span>{{ scope.row.workOrderNo }}</span>
            </router-link>
          </template>
<!--        <el-table-column label="生产工单号" width="160" align="center">-->
<!--          <template slot-scope="scope">-->
<!--            <router-link :to="{path: '/main/workReport-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">-->
<!--              <span>{{ scope.row.workOrderNo }}</span>-->
<!--            </router-link>-->
<!--          </template>-->
<!--        </el-table-column>-->
        <el-table-column label="生产工单号" width="160" align="center" prop="workOrderNo">
        </el-table-column>
<!--        <el-table-column label="订单编号" width="140" align="center" prop="salesOrderCode">-->
<!--        </el-table-column>-->
@@ -175,34 +224,41 @@
        </el-table-column>
        <el-table-column :show-overflow-tooltip='true' label="小车码" width="160" align="center" prop="trolleyYard">
        </el-table-column>
        <el-table-column label="产品编号" width="110" align="center" prop="productCode">
        <el-table-column label="产品型号" width="110" align="center" prop="productCode">
        </el-table-column>
        <el-table-column label="产品名称" width="120" align="center" prop="productName">
        </el-table-column>
        <el-table-column label="产品型号" align="center" prop="productModel">
        <el-table-column label="上线是否报工" align="center" width="120">
          <template slot-scope="scope">
           <dict-tag :options="dict.type.work_reporting_status" :value="scope.row.onlineCompletionMark"/>
          </template>
        </el-table-column>
<!--        <el-table-column label="工单状态" width="100" align="center" prop="orderStatus">-->
        <el-table-column label="实际开始时间" width="160" align="center" prop="actualStartTime">
        </el-table-column>
        <el-table-column label="下线是否报工" width="120" align="center">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.work_reporting_status" :value="scope.row.sfResult"/>
          </template>
        </el-table-column>
<!--        <el-table-column width="240" fixed="right" label="操作" align="center" class-name="small-padding fixed-width">-->
<!--          <template slot-scope="scope">-->
<!--            <dict-tag :options="dict.type.order_state" :value="scope.row.orderStatus"/>-->
<!--            <el-button-->
<!--              size="mini"-->
<!--              type="success"-->
<!--              plain-->
<!--              style="width: 72px"-->
<!--              @click="onlineWorkReporting(scope.row)"-->
<!--              :disabled="isEditDisabled(scope.row.onlineCompletionMark)"-->
<!--            >上线报工</el-button>-->
<!--            <el-button-->
<!--              size="mini"-->
<!--              plain-->
<!--              style="width: 72px"-->
<!--              type="danger"-->
<!--              @click="offlineWorkReporting(scope.row)"-->
<!--              :disabled="isEditDisabled(scope.row.sfResult)"-->
<!--            >下线报工</el-button>-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column label="工厂编号" align="center" prop="siteCode">-->
<!--        </el-table-column>-->
        <el-table-column label="工站编号" align="center" prop="stationCode">
        </el-table-column>
<!--        <el-table-column label="报工信息结果" width="110" align="center" prop="resultText">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="报工结果代码" width="110" align="center" prop="resultCode">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="是否报工" width="80" align="center" prop="sfResult">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="实际开始时间" width="160" align="center" prop="actualStartTime">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="当前站点报工时间" width="160" align="center" prop="actualEndTime">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="创建人" width="80" align="center" prop="createUser">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="备注" width="100" align="center" prop="remarks">-->
<!--        </el-table-column>-->
      </el-table>
    </el-card>
@@ -307,13 +363,13 @@
  delProductionOrde,
  addProductionOrde,
  updateProductionOrde,
  receivingWorkOrders, jieBang
  receivingWorkOrders, jieBang, workReportingByStation
} from "@/api/main/om/productionOrde/productionOrde";
import QRCode from "qrcodejs2";
export default {
  name: "ProductionOrde",
  dicts: ['order_state'],
  dicts: ['order_state','work_reporting_status'],
  components: {
    ItemSelect ,
  },
@@ -335,6 +391,8 @@
      ids: [],
      // 非单个禁用
      single: true,
      onlineSingle: true,
      offlineSingle: true,
      // 非多个禁用
      multiple: true,
      move: true,
@@ -416,6 +474,20 @@
    this.test1()
  },
  methods: {
    onlineWorkReporting(row){
      const id = row.id || this.ids
      const stationCode = "OP230"
      workReportingByStation(id,stationCode).then(response => {
        this.getList()
      });
    },
    offlineWorkReporting(row){
      const id = row.id || this.ids
      const stationCode = "OP500"
      workReportingByStation(id,stationCode).then(response => {
        this.getList()
      });
    },
    jieBang(row){
      const id = row.id || this.ids
      jieBang(id).then(response => {
@@ -644,6 +716,25 @@
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
      this.onlineSingle = selection.length!==1
      this.offlineSingle = selection.length!==1
      if(selection.length === 0){
        this.onlineSingle = true
        this.offlineSingle = true
      }
      if(selection.length === 1){
        if(selection[0].onlineCompletionMark === '2'){
          this.onlineSingle = false
        }else {
          this.onlineSingle = true
        }
        if(selection[0].sfResult === '2'){
          this.offlineSingle = false
        }else {
          this.offlineSingle = true
        }
      }
    },
    /** 新增按钮操作 */
    handleAdd() {