admin
2024-06-15 8cfe20288690f2ba46c804f41f39e8aa48c2dea0
上传逻辑大版本更新
已修改15个文件
398 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | 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 69 ●●●●● 补丁 | 查看 | 原始文档 | 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 3 ●●●●● 补丁 | 查看 | 原始文档 | 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 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/da/paramCollection/paramCollection.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/Instructions/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/stationTerminal/index.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -162,6 +162,24 @@
    }
    /**
     * 放行请空状态
     */
    @GetMapping("/clearWorkpieceRelease")
    public AjaxResult clearWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo)
    {
        return bsFormulaChildInfoService.clearWorkpieceRelease(bsFormulaChildInfo);
    }
    /**
     * 放行请空状态
     */
    @GetMapping("/jrmWorkpieceRelease")
    public AjaxResult jrmWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo)
    {
        return bsFormulaChildInfoService.jrmWorkpieceRelease(bsFormulaChildInfo);
    }
    /**
     * 拧紧后更新对应数据
     */
    @GetMapping("/updateTighteningFormula")
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/IBsFormulaChildInfoService.java
@@ -81,4 +81,8 @@
    AjaxResult yzUpdateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo);
    AjaxResult jrmUpdateResults(BsFormulaChildInfo bsFormulaChildInfo);
    AjaxResult jrmWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo);
    AjaxResult clearWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -18,6 +18,8 @@
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
import com.jcdm.main.da.paramCollectionTemp.domain.DaParamCollectionTemp;
import com.jcdm.main.da.paramCollectionTemp.service.IDaParamCollectionTempService;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
@@ -71,6 +73,9 @@
    @Autowired
    private IDaPassingStationCollectionService daPassingStationCollectionService;
    @Autowired
    private IDaParamCollectionTempService daParamCollectionTempService;
    Map<String, Session> map = WebSocketUsers.getUsers();
@@ -327,6 +332,47 @@
    }
    @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);
        }
        String[] split = bsFormulaChildInfo.getProductBarcode().split(",");
        try {
            for (int i = 0; i < split.length; i++) {
                daParamCollectionService.pushGeelycvMesFeedback(split[i], 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();
    }
    @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);
        }
        return AjaxResult.success();
    }
    @Override
    public BsFormulaChildInfo releaseCheck(BsFormulaChildInfo bsFormulaChildInfo) {
        return bsFormulaChildInfoMapper.releaseCheck(bsFormulaChildInfo);
    }
@@ -391,6 +437,16 @@
        daParamCollection.setCollectionTime(new Date());
        daParamCollection.setSfcCode(bsFormulaChildInfo.getSfcBarcode());
        daParamCollectionMapper.insertDaParamCollection(daParamCollection);
        DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
        daParamCollectionTemp.setParamCode(bsFormulaChildInfo.getParamCode());
        daParamCollectionTemp.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
        daParamCollectionTemp.setLocationCode(bsFormulaChildInfo.getLocationCode());
        daParamCollectionTemp.setParamValue(bsFormulaChildInfo.getParamValue());
        daParamCollectionTemp.setProductCode(bsFormulaChildInfo.getProductCode());
        daParamCollectionTemp.setCollectionTime(new Date());
        daParamCollectionTemp.setSfcCode(bsFormulaChildInfo.getSfcBarcode());
        daParamCollectionTempService.save(daParamCollectionTemp);
    }
    public void jrmAddParameterCollection(BsFormulaChildInfo bsFormulaChildInfo){
@@ -413,6 +469,19 @@
            daParamCollectionMapper.insertDaParamCollection(daParamCollection);
//        }
            DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
            daParamCollectionTemp.setParamCode(bsFormulaChildInfo.getParamCode());
            daParamCollectionTemp.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
            daParamCollectionTemp.setLocationCode(bsFormulaChildInfo.getLocationCode());
            daParamCollectionTemp.setParamValue(bsFormulaChildInfo.getParamValue());
            daParamCollectionTemp.setProductCode(bsFormulaChildInfo.getProductCode());
            daParamCollectionTemp.setCollectionTime(new Date());
            if(bsFormulaChildInfo.getParamCode().contains("B")){
                daParamCollectionTemp.setSfcCode(modeleSplit[1]);
            }else {
                daParamCollectionTemp.setSfcCode(modeleSplit[0]);
            }
            daParamCollectionTempService.save(daParamCollectionTemp);
    }
    @Override
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java
@@ -151,6 +151,15 @@
    }
    /**
     * 更换总成号
     */
    @PostMapping("/enterWeighing")
    public void enterWeighing(@RequestBody DaParamCollection daParamCollection)
    {
        daParamCollectionService.enterWeighing(daParamCollection);
    }
    /**
     * 修改设备产品过程参数采集
     */
    @PreAuthorize("@ss.hasPermi('main:paramCollection:edit')")
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/domain/DaParamCollection.java
@@ -114,6 +114,9 @@
    @TableField(exist = false)
    private String yzSfcCode;
    @TableField(exist = false)
    private String weightValue;
    public String getTightenTheArray() {
        return tightenTheArray;
    }
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java
@@ -81,5 +81,9 @@
    void pushGeelycvMesFeedback(String packID,String stationCode);
    void automaticWorkstationPushGeelycvMesFeedback(String packID,String stationCode,List<DaParamCollection> list);
    AjaxResult checkRecordDataDone(DaParamCollection daParamCollection);
    void enterWeighing(DaParamCollection daParamCollection);
}
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -25,6 +25,8 @@
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
import com.jcdm.main.da.paramCollectionTemp.domain.DaParamCollectionTemp;
import com.jcdm.main.da.paramCollectionTemp.service.IDaParamCollectionTempService;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
@@ -82,6 +84,9 @@
    @Autowired
    private IDaCollectionParamConfService daCollectionParamConfService;
    @Autowired
    private IDaParamCollectionTempService daParamCollectionTempService;
    public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -224,6 +229,14 @@
                daParamCollection.setCollectionTime(new Date());
                daParamCollection.setSfcCode(daParamCollection.getProductBarcode());
                daParamCollectionMapper.insertDaParamCollection(daParamCollection);
                DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
                daParamCollectionTemp.setParamValue(tightenDataParts[i]);
                daParamCollectionTemp.setParamCode(paramCodeParts[i]);
                daParamCollectionTemp.setCollectionTime(new Date());
                daParamCollectionTemp.setSfcCode(daParamCollection.getProductBarcode());
                daParamCollectionTemp.setLocationCode(daParamCollection.getLocationCode());
                daParamCollectionTempService.save(daParamCollectionTemp);
            }
        }
    }
@@ -444,7 +457,72 @@
//        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<DaParamCollection> paramList = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>().eq(DaParamCollection::getSfcCode, packID).eq(DaParamCollection::getLocationCode, stationCode));
        List<DaParamCollectionTemp> paramList = daParamCollectionTempService.list(new LambdaQueryWrapper<DaParamCollectionTemp>().eq(DaParamCollectionTemp::getSfcCode, packID).eq(DaParamCollectionTemp::getLocationCode, stationCode));
        if(paramList.size() > 0){
            ParentVO parentVO = new ParentVO();
            parentVO.setSiteCode("3983");
            parentVO.setRecordId(String.valueOf(Instant.now().toEpochMilli()));
            parentVO.setStationCode(stationCode);
            parentVO.setProductNum(packID);
            parentVO.setTotalResult("1");
            List<ChildVO> listChildVo = new ArrayList<>();
            for (DaParamCollectionTemp daParamCollection : paramList) {
                ChildVO childVO = new ChildVO();
                childVO.setItemCode(daParamCollection.getParamCode());
//                BsFormulaChildInfo childOne = bsFormulaChildInfoService.getOne(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getParamCode, daParamCollection.getParamCode()));
//                DaCollectionParamConf paramConfOne = daCollectionParamConfService.getOne(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
                List<DaCollectionParamConf> paramConfOneList = daCollectionParamConfService.list(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
                DaCollectionParamConf paramConfOne = paramConfOneList.get(0);
//                if(childOne!=null){
//                    String operationType = childOne.getOperationType();
//                    if(operationType.equals("1")){
//                        childVO.setItemType("2");
//                    }else if(operationType.equals("2")){
//                        childVO.setItemType("1");
//                    }
//                }else {
//                    childVO.setItemType("3");
//                }
                if(paramConfOne!=null){
                    childVO.setItemType(paramConfOne.getSpareField1());
                    childVO.setItemText(paramConfOne.getCollectParameterName());
                }else {
                    childVO.setItemType("3");
                    childVO.setItemText("");
                }
                childVO.setItemValue(daParamCollection.getParamValue());
                if(daParamCollection.getParamValue().equals("1")){
                    childVO.setCheckResult("1");
                }else if(daParamCollection.getParamValue().equals("2")){
                    childVO.setCheckResult("0");
                    parentVO.setTotalResult("0");
                    totalResult = "1";
                }else {
                    childVO.setCheckResult("1");
                }
                childVO.setCheckTime(format.format(daParamCollection.getCollectionTime()));
                listChildVo.add(childVO);
            }
            parentVO.setCheckList(listChildVo);
            HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
            List<Long> idsList = paramList.stream().map(DaParamCollectionTemp::getId).collect(Collectors.toList());
            Long[] array = idsList.toArray(new Long[0]);
            daParamCollectionTempService.deleteDaParamCollectionTempByIds(array);
            System.out.println(execute.body());
            System.out.println("-----------------------"+totalResult);
        }
    }
    @Override
    public void automaticWorkstationPushGeelycvMesFeedback(String packID, String stationCode,List<DaParamCollection> paramList) {
        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 totalResult = "0";
        if(paramList.size() > 0){
            ParentVO parentVO = new ParentVO();
            parentVO.setSiteCode("3983");
@@ -457,8 +535,10 @@
            for (DaParamCollection daParamCollection : paramList) {
                ChildVO childVO = new ChildVO();
                childVO.setItemCode(daParamCollection.getParamCode());
                BsFormulaChildInfo childOne = bsFormulaChildInfoService.getOne(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getParamCode, daParamCollection.getParamCode()));
                DaCollectionParamConf paramConfOne = daCollectionParamConfService.getOne(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
//                BsFormulaChildInfo childOne = bsFormulaChildInfoService.getOne(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getParamCode, daParamCollection.getParamCode()));
//                DaCollectionParamConf paramConfOne = daCollectionParamConfService.getOne(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
                List<DaCollectionParamConf> paramConfOneList = daCollectionParamConfService.list(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
                DaCollectionParamConf paramConfOne = paramConfOneList.get(0);
//                if(childOne!=null){
//                    String operationType = childOne.getOperationType();
//                    if(operationType.equals("1")){
@@ -495,21 +575,54 @@
            System.out.println(execute.body());
            System.out.println("-----------------------"+totalResult);
        }
    }
    @Override
    public AjaxResult checkRecordDataDone(DaParamCollection daParamCollection) {
        String result = "";
        try {
            Object recordDataDone = miloService.readFromOpcUa("PACK" + "." + daParamCollection.getLocationCode() + ".RecordDataDone").getValue();
            List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getSpareField4, "1").eq(BsFormulaChildInfo::getProcessesCode, daParamCollection.getLocationCode()));
            if(list.size()>0){
                String results = list.get(0).getResults();
                if(results!= null && !results.equals("") && results.equals("OK")){
                    result = "21";
                }
            }
            /*Object recordDataDone = miloService.readFromOpcUa("PACK" + "." + daParamCollection.getLocationCode() + ".RecordDataDone").getValue();
            if(ObjectUtil.isNotNull(recordDataDone)){
                result = recordDataDone.toString();
            }
            }*/
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return AjaxResult.success(result);
    }
    @Override
    public void enterWeighing(DaParamCollection daParamCollection) {
        String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
        long timestampMillis = Instant.now().toEpochMilli();
        ParentVO parentVO = new ParentVO();
        ChildVO childVO = new ChildVO();
        List<ChildVO> childVOList = new ArrayList<>();
        childVO.setItemCode("PWD_PW");
        childVO.setItemType("3");
        childVO.setItemText("Pack重量值");
        childVO.setItemValue(daParamCollection.getWeightValue());
        childVO.setCheckTime(format.format(new Date()));
        childVO.setCheckResult("1");
        childVOList.add(childVO);
        parentVO.setSiteCode("3983");
        parentVO.setRecordId(""+timestampMillis);
        parentVO.setStationCode("OP500");
        parentVO.setProductNum(daParamCollection.getSfcCode());
        parentVO.setTotalResult("1");
        parentVO.setCheckList(childVOList);
        HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
        RestfulService.getWorkReportResultFeedback(daParamCollection.getSfcCode(),"OP500",format.format(new Date()));
        System.out.println(execute.body());
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -17,7 +17,10 @@
import com.jcdm.main.om.productionOrde.mapper.OmProductionOrdeInfoMapper;
import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
import com.jcdm.main.restful.factoryMes.service.RestfulService;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.weaver.loadtime.Aj;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -42,10 +45,13 @@
 * @author ruimin
 * @date 2023-12-11
 */
@Slf4j
@RestController
@RequestMapping("/om/productionOrde")
public class OmProductionOrdeInfoController extends BaseController
{
    private static final Logger logger = LoggerFactory.getLogger("sys-user");
    @Autowired
    private IOmProductionOrdeInfoService omProductionOrdeInfoService;
@@ -122,24 +128,26 @@
        String code = jsonObject.getStr("code");
        // 判断接单是否成功
        if(code.equals("success")){
            OmProductionOrdeInfo omProductionOrdeInfo = new OmProductionOrdeInfo();
            omProductionOrdeInfo.setWorkOrderNo(dataObject.getStr("productionOrderNum"));
            omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum"));
            omProductionOrdeInfo.setStationCode(dataObject.getStr("stationCode"));
            omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode"));
            if(dataObject.getStr("model").equals("PE01A")){
                omProductionOrdeInfo.setProductCode("1P102S");
            }else {
                omProductionOrdeInfo.setProductCode(dataObject.getStr("model"));
            logger.info("请求工厂MES工单:入参pack{}出参pack:{}",paramProductNum,dataObject.getStr("productNum"));
            List<OmProductionOrdeInfo> check = omProductionOrdeInfoService.list(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum,dataObject.getStr("productNum")));
            if(check.size() == 0){
                OmProductionOrdeInfo omProductionOrdeInfo = new OmProductionOrdeInfo();
                omProductionOrdeInfo.setWorkOrderNo(dataObject.getStr("productionOrderNum"));
                omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum"));
                omProductionOrdeInfo.setStationCode(dataObject.getStr("stationCode"));
                omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode"));
                if(dataObject.getStr("model").equals("PE01A")){
                    omProductionOrdeInfo.setProductCode("1P102S");
                }else {
                    omProductionOrdeInfo.setProductCode(dataObject.getStr("model"));
                }
                omProductionOrdeInfo.setCreateTime(new Date());
                omProductionOrdeInfo.setCreateUser("工厂MES");
                omProductionOrdeInfoService.save(omProductionOrdeInfo);
            }
            omProductionOrdeInfo.setCreateTime(new Date());
            omProductionOrdeInfo.setCreateUser("工厂MES");
            omProductionOrdeInfoService.save(omProductionOrdeInfo);
        }else {
            return AjaxResult.error("接单失败,请联系管理员");
        }
        return AjaxResult.success(dataObject.getStr("productNum"));
    }
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
@@ -12,6 +12,9 @@
import com.jcdm.main.om.productionOrde.mapper.OmProductionOrdeInfoMapper;
import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
import com.jcdm.main.restful.factoryMes.service.RestfulService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -21,9 +24,12 @@
 * @author ruimin
 * @date 2023-12-11
 */
@Slf4j
@Service
public class OmProductionOrdeInfoServiceImpl extends ServiceImpl<OmProductionOrdeInfoMapper,OmProductionOrdeInfo> implements IOmProductionOrdeInfoService
{
    private static final Logger logger = LoggerFactory.getLogger("sys-user");
    @Autowired
    private OmProductionOrdeInfoMapper omProductionOrdeInfoMapper;
@@ -163,6 +169,8 @@
        OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, omProductionOrdeInfo.getProductNum()));
        one.setTrolleyYard(omProductionOrdeInfo.getTrolleyYard());
        omProductionOrdeInfoService.saveOrUpdate(one);
        logger.info("绑定pack码{}到小车:{}",omProductionOrdeInfo.getProductNum(),omProductionOrdeInfo.getTrolleyYard());
        return AjaxResult.success();
    }
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -24,6 +24,8 @@
import com.jcdm.main.plcserver.conf.OPCElement;
import com.jcdm.main.plcserver.util.TimeUtil;
import com.jcdm.main.restful.factoryMes.service.RestfulService;
import com.jcdm.main.restful.qingYan.doman.ChildVO;
import com.jcdm.main.restful.qingYan.doman.ParentVO;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.runner.subscription.SubscriptionCallback;
import com.kangaroohy.milo.service.MiloService;
@@ -35,6 +37,7 @@
import javax.websocket.Session;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.*;
import java.util.stream.Collectors;
@@ -313,7 +316,7 @@
                    saveStationInfo(snCode,thoroughfare,device,workOrderNo,productCode);
                    //3、保存参数采集数据
                    SaveParamData(snCode,thoroughfare,device,workOrderNo,productCode);
                    List<DaParamCollection> daParamCollectionList = SaveParamData(snCode,thoroughfare,device,workOrderNo,productCode);
                    //如果是末尾工站要报工
                    if(device.equals("OP500")){
@@ -322,7 +325,7 @@
                        updateOrderInfo(snCode);
                    }
                    try{
                        daParamCollectionService.pushGeelycvMesFeedback(snCode,device);
                        daParamCollectionService.automaticWorkstationPushGeelycvMesFeedback(snCode,device,daParamCollectionList);
                    }catch (Exception e){
                    }
                    result = "21";
@@ -391,11 +394,12 @@
        daPassingStationCollectionService.insertDaPassingStationCollection(daPassingStationCollection);
    }
    public static void SaveParamData(String packCode,String thoroughfare,String device,String workOrderNo,String productType) throws Exception {
    public static List<DaParamCollection> SaveParamData(String packCode,String thoroughfare,String device,String workOrderNo,String productType) throws Exception {
        List<DaCollectionParamConf> list;
        DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf();
        daCollectionParamConf.setGatherAddress(thoroughfare+ "." + device);
        list = collectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf);
        List<DaParamCollection> daParamCollectionlist = new ArrayList<>();
        List<String> nodeIdList = list.stream().map(info -> {
            String nodeid = info.getGatherAddress();
@@ -409,11 +413,12 @@
                    readWriteEntityList.get(i).setValue(" ");
                }
            }
            List<DaParamCollection> daParamCollectionlist = new ArrayList<>();
            for(int i=0;i<nodeIdList.size();i++){
                if(!readWriteEntityList.get(i).getValue().toString().equals("0.0")){
                    String tt = readWriteEntityList.get(i).getValue().toString();
                    DaParamCollection ParamCollection = new DaParamCollection();
                    ChildVO childVO = new ChildVO();
                    ParamCollection.setParamCode(list.get(i).getCollectParameterId());
                    ParamCollection.setLocationCode(device);
                    if(tt.contains("Time")){
@@ -445,12 +450,16 @@
                }
            }
            daParamCollectionService.saveBeachDaParamCollection(daParamCollectionlist);
        }
        addBaseData(workOrderNo,productType,device,packCode);
        }
        List<DaParamCollection> baseDataList = addBaseData(workOrderNo,productType,device,packCode);
        for (int i = 0; i < baseDataList.size(); i++){
            daParamCollectionlist.add(baseDataList.get(i));
        }
        return daParamCollectionlist;
    }
    public static void addBaseData(String workOrderNo,String productCode,String locationCode,String packCode){
    public static List<DaParamCollection> addBaseData(String workOrderNo,String productCode,String locationCode,String packCode){
        Map<String, String> map = new HashMap<>();
        map.put("GC", "南浔工厂");
        map.put("CXBH", "Pack线");
@@ -473,6 +482,7 @@
            confList.add(saveData);
        });
        daParamCollectionService.insertBatch(confList);
        return confList;
    }
    public static void getFactoryOrder(String locationCode){
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
@@ -67,6 +67,26 @@
}
// 查询配方配置子信息列表
export function jrmWorkpieceRelease(query) {
  return request({
    url: '/bs/formulaChild/jrmWorkpieceRelease',
    method: 'get',
    params: query
  })
}
// 查询配方配置子信息列表
export function clearWorkpieceRelease(query) {
  return request({
    url: '/bs/formulaChild/clearWorkpieceRelease',
    method: 'get',
    params: query
  })
}
// 查询配方配置子信息列表
export function workpieceRelease(query) {
  return request({
    url: '/bs/formulaChild/workpieceRelease',
jcdm-ui/src/api/main/da/paramCollection/paramCollection.js
@@ -45,6 +45,15 @@
}
// 线边总成换总成码
export function enterWeighing(data) {
  return request({
    url: '/main/paramCollection/enterWeighing',
    method: 'post',
    data: data
  })
}
// 线边总成换总成码
export function replaceAssemblyCode(data) {
  return request({
    url: '/main/paramCollection/replaceAssemblyCode',
jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -23,7 +23,7 @@
    </el-row>
    <el-row :gutter="5" style="margin-top: 5px">
      <el-col :span="24">
      <el-col :span="12">
        <el-tabs type="border-card"  style="height: 600px" v-model="activeName" @tab-click="changeMenu">
          <el-tab-pane name="first">
            <span slot="label"> <a class="el-icon-date"></a>首页</span>
@@ -60,6 +60,10 @@
            </el-col>
          </el-tab-pane>
        </el-tabs>
      </el-col>
      <el-col :span="12">
        <el-input v-model="weightValue" placeholder="请输入称重数据"></el-input>
        <el-button @click="enterWeighing">录入</el-button>
      </el-col>
    </el-row>
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open1" width="1000" append-to-body>
@@ -213,7 +217,7 @@
import USBDevice from "@/utils/usb.json";
import {addPassingStationCollection} from "@/api/main/da/passingStationCollection/passingStationCollection";
import {
  addTighteningParameters,
  addTighteningParameters, enterWeighing,
  replaceAssemblyCode,
  saveCampaignTimeParameters,
  yzAddBasicParameters,
@@ -224,6 +228,7 @@
  name: "stationTerminal",
  data() {
    return {
      weightValue: '',
      showInput: true,
      serialPortContent: '',
      // 查询参数
@@ -338,6 +343,19 @@
    },
  },
  methods: {
    enterWeighing(){
      if(this.headContent.sfcCode ==='' || this.weightValue === '' ){
        this.$message.error('参数不全!');
      }else {
        let param = {
          sfcCode: this.headContent.sfcCode,
          weightValue: this.weightValue,
        }
        enterWeighing(param).then(response => {
          this.$message('录入完成!');
        });
      }
    },
    serialLink() {
      this.open1 = true
    },
jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue
@@ -245,7 +245,7 @@
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {
  jrmUpdateResults,
  jrmUpdateResults, jrmWorkpieceRelease,
  listFormulaChild,
  noPageListFormulaChild,
  releaseCheck,
@@ -518,8 +518,19 @@
      console.log(tab, event);
    },
    clearClick(){
      this.$message('这是一条清除消息提示');
      this.headContent.sfcCode = null
      const param = {
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: "1P102S",
        locationCode: this.headContent.processesCode,
        productBarcode: this.headContent.moduleA+','+this.headContent.moduleB,
      }
      jrmSaveCampaignTimeParameters(param).then(response => {});
      this.cakeLamp.release = 1;
      this.endClear()
      // workpieceRelease(param).then(response => {});
      jrmWorkpieceRelease(param).then(response => {});
      // this.$message('这是一条清除消息提示');
      // this.headContent.sfcCode = null
    },
    scanCompleted(){
      this.$message('扫码完成'+this.content);
@@ -609,12 +620,13 @@
            workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: "1P102S",
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
            productBarcode: self.headContent.moduleA+','+self.headContent.moduleB,
          }
          jrmSaveCampaignTimeParameters(param).then(response => {});
          self.cakeLamp.release = 1;
          self.endClear()
          workpieceRelease(param).then(response => {});
          // workpieceRelease(param).then(response => {});
          jrmWorkpieceRelease(param).then(response => {});
        } else if (event.data.includes("[")) {
          let formulaChilds = "";
          self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort);
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -109,9 +109,12 @@
           <span slot="label"> <a class="el-icon-date"></a>首页</span>
           <el-col :span="24">
             <el-table height="500" :cell-style="rowStyle" :data="formulaChildList">
               <el-table-column label="排序" width="60" align="center" type="index">
<!--               <el-table-column label="排序" width="60" align="center" type="index">-->
<!--               </el-table-column>-->
               <el-table-column label="拧紧步号" align="center" prop="stepSort">
               </el-table-column>
               <el-table-column label="操作内容" :show-overflow-tooltip='true' align="center" prop="operationSteps">
<!--               <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>
@@ -121,6 +124,7 @@
               </el-table-column>
               <el-table-column label="结果" align="center" prop="results">
               </el-table-column>
             </el-table>
           </el-col>
<!--           <el-col :span="14">-->
@@ -297,6 +301,7 @@
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {
  clearWorkpieceRelease,
  fistSetpNumber,
  listFormulaChild,
  noPageListFormulaChild,
@@ -561,8 +566,16 @@
      console.log(tab, event);
    },
    clearClick(){
      this.$message('这是一条清除消息提示');
      this.headContent.sfcCode = null
      const param = {
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: this.workpieceInformation.productCode,
        locationCode: this.headContent.processesCode,
        productBarcode: this.headContent.sfcCode,
      }
      this.endClear()
      clearWorkpieceRelease(param).then(response => {});
      this.headContent.sfcCode = ''
      this.$message('清楚成功!');
    },
    scanCompleted(){
      this.$message('扫码完成'+this.content);
@@ -591,6 +604,10 @@
      this.addOverStationCollection()
    },
    addBaseData(){
      addBasicParameters(this.passingStationForm).then(response => {});
    },
    /** 入站增加过站采集记录 **/
    addOverStationCollection(){
      this.passingStationForm = {