-
admin
2024-06-04 a759f5fd41414651325494926583843568bac334
-
已修改5个文件
63 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -20,11 +20,15 @@
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
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.da.testDeviceInterface.service.IDaTestDeviceInterfaceService;
import com.jcdm.main.plcserver.util.TimeUtil;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.service.MiloService;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.weaver.loadtime.Aj;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.bs.formulaChild.mapper.BsFormulaChildInfoMapper;
@@ -40,8 +44,10 @@
 * @date 2023-12-26
 */
@Service
@Slf4j
public class BsFormulaChildInfoServiceImpl extends ServiceImpl<BsFormulaChildInfoMapper,BsFormulaChildInfo> implements IBsFormulaChildInfoService
{
    private static final Logger logger = LoggerFactory.getLogger("sys-user");
    @Autowired
    private BsFormulaChildInfoMapper bsFormulaChildInfoMapper;
@@ -62,6 +68,9 @@
    @Autowired
    private IDaParamCollectionService daParamCollectionService;
    @Autowired
    private IDaPassingStationCollectionService daPassingStationCollectionService;
    Map<String, Session> map = WebSocketUsers.getUsers();
@@ -212,6 +221,7 @@
        }
        BsFormulaChildInfo listQuery = new BsFormulaChildInfo();
        listQuery.setParamCode(bsFormulaChildInfo.getParamCode());
        listQuery.setLocationCode(bsFormulaChildInfo.getLocationCode());
        String paramCode = bsFormulaChildInfo.getTightenTheArray();
        if(paramCode.contains("N")){
            result = "3";
@@ -232,7 +242,8 @@
                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());
                try {
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build());
@@ -406,10 +417,6 @@
    @Override
    public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
        try {
            daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode());
        }catch (Exception e){
        }
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode())
                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()));
@@ -417,6 +424,18 @@
            info.setCollectData("");
            info.setResults("");
            bsFormulaChildInfoService.saveOrUpdate(info);
        }
        try {
            daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode());
            String barCode = bsFormulaChildInfo.getProductBarcode();
            String locationCode = bsFormulaChildInfo.getLocationCode();
            DaPassingStationCollection passingStationCollectionOne = daPassingStationCollectionService.getOne(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getSfcCode, barCode).eq(DaPassingStationCollection::getLocationCode, locationCode));
            if (passingStationCollectionOne != null) {
                passingStationCollectionOne.setOutRsSign("1");
                passingStationCollectionOne.setOutboundTime(new Date());
                daPassingStationCollectionService.saveOrUpdate(passingStationCollectionOne);
            }
        }catch (Exception e){
        }
        return AjaxResult.success();
    }
@@ -436,6 +455,7 @@
        }
        BsFormulaChildInfo listQuery = new BsFormulaChildInfo();
        listQuery.setParamCode(bsFormulaChildInfo.getParamCode());
        listQuery.setLocationCode(bsFormulaChildInfo.getLocationCode());
        String paramCode = bsFormulaChildInfo.getTightenTheArray();
        if(paramCode.contains("N")){
            List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery);
@@ -454,6 +474,8 @@
                bsFormulaChildInfos.get(0).setResults("OK");
                bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray());
                bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0));
                logger.info("查询条件参数:"+listQuery);
                logger.info("查询结果:"+bsFormulaChildInfos.get(0));
                Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort());
                try {
                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build());
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java
@@ -44,10 +44,10 @@
    /**
     * 查询设备产品过程参数采集列表
     */
    @GetMapping("/testput")
    public void testput(@RequestBody DaParamCollection daParamCollection)
    @PostMapping("/sendIMesData")
    public void sendIMesData(@RequestBody DaParamCollection daParamCollection)
    {
        daParamCollectionService.pushGeelycvMesFeedback("0RSPB0011A2E3AE5P0000001","OP460");
        daParamCollectionService.pushGeelycvMesFeedback(daParamCollection.getSfcCode(),daParamCollection.getLocationCode());
    }
    /**
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
@@ -3,6 +3,7 @@
import java.util.List;
import java.util.stream.Collectors;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jcdm.common.core.domain.AjaxResult;
@@ -154,6 +155,11 @@
    @Override
    public AjaxResult trolleyYardBinDing(OmProductionOrdeInfo omProductionOrdeInfo) {
        OmProductionOrdeInfo clearTrolleyYard = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getTrolleyYard, omProductionOrdeInfo.getTrolleyYard()));
        if(clearTrolleyYard!=null){
            clearTrolleyYard.setTrolleyYard("");
            omProductionOrdeInfoService.saveOrUpdate(clearTrolleyYard);
        }
        OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, omProductionOrdeInfo.getProductNum()));
        one.setTrolleyYard(omProductionOrdeInfo.getTrolleyYard());
        omProductionOrdeInfoService.saveOrUpdate(one);
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -27,6 +27,9 @@
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.runner.subscription.SubscriptionCallback;
import com.kangaroohy.milo.service.MiloService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -35,9 +38,11 @@
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Component
public class OPCUaSubscription implements SubscriptionCallback {
    private static final Logger logger = LoggerFactory.getLogger("sys-user");
    public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -98,6 +103,7 @@
    @Override
    public void onSubscribe(String identifier, Object value) {
        logger.info("地址:"+identifier+"值:"+value);
        try {
            if(null != value && Integer.valueOf(value.toString())!= 0) {
                String[] nodes = identifier.split("[.]");
@@ -237,11 +243,15 @@
                        List<Object> collect = list1.stream().map(ReadWriteEntity::getValue).collect(Collectors.toList());
                        String joinedString = String.join(",", collect.toString());
                        WebSocketUsers.sendMessageToUserByText(map.get(device), TightenTheConversionOkNg(joinedString));
                        if(device.contains("270") || device.contains("260")){
                            logger.info("读取到工位{}的Scaner数据:{}",device,TightenTheConversionOkNg(joinedString));
                        }
                    }
                }
            }
        } catch (Exception e) {
            logger.info("订阅方法报错:{}"+e.getMessage());
            e.printStackTrace();
        }
    }
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -189,6 +189,7 @@
<script>
import {getIpv4, listStationConf} from "@/api/main/sc/stationConf";
import {
  fistSetpNumber,
  noPageListFormulaChild,
  workpieceRelease,
  yzUpdateResults,
@@ -420,6 +421,10 @@
    },
    /** 查询工单列表 */
    async getList() {
      const param = {
        processesCode: this.headContent.processesCode,
      }
      fistSetpNumber(param).then(response => {});
      this.getListFormulaChild()
      this.addOverStationCollection()
    },