春风项目四线(合箱线、总装线)
yyt
4 天以前 dd44823b3c6cc003de21ea023cea7ea8d85a873c
配瓦
已修改4个文件
已添加8个文件
1008 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/domain/DaTileMatchCollection.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/mapper/DaTileMatchCollectionMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/service/IDaTileMatchCollectionService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/service/impl/DaTileMatchCollectionServiceImpl.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/tileMatchCollection/DaTileMatchCollectionMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/da/tileMatchCollection/tileMatchCollection.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/tileMatchCollection/index.vue 338 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -25,6 +25,8 @@
import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection;
import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService;
import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
import com.jcdm.main.om.productionOrde.service.impl.OmProductionOrdeInfoServiceImpl;
import com.jcdm.main.plcserver.conf.OPCElement;
@@ -67,6 +69,8 @@
    private OmProductionOrdeInfoServiceImpl productionOrdeInfoService;
    @Resource
    private DaParamCollectionMapper daParamCollectionService;
    @Resource
    private IDaTileMatchCollectionService daTileMatchCollectionService;
    @Autowired
    MiloService miloService;
@@ -343,9 +347,17 @@
        saveData.setParamValue(engineNo);
        saveData.setLocationCode("OP010");
        saveData.setParamCode("XTM");
        saveData.setParamName("箱体码");
        saveData.setParamName("箱体");
        daParamCollectionService.insertDaParamCollection(saveData);
        DaTileMatchCollection MatchCollection = new DaTileMatchCollection();
        MatchCollection.setSfcCode(OrderScheduling.getEngineNo());
        MatchCollection.setParamValue(engineNo);
        MatchCollection.setLocationCode("OP010");
        MatchCollection.setParamCode("XTM");
        MatchCollection.setParamName("箱体");
        daTileMatchCollectionService.insertDaTileMatchCollection(MatchCollection);
        //更新上线数量
        int onlineNum = 0;
        List<BsOrderScheduling> onlineNumList = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling)
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
@@ -2,6 +2,7 @@
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
@@ -11,6 +12,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.tileMatchCollection.domain.DaTileMatchCollection;
import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService;
import com.jcdm.main.da.tileMatchMiddleware.domain.DaTileMatchMiddleware;
import com.jcdm.main.da.tileMatchMiddleware.service.IDaTileMatchMiddlewareService;
import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules;
@@ -54,6 +57,8 @@
    private IDaTileMatchRulesService daTileMatchRulesService;
    @Autowired
    private IDaTileMatchMiddlewareService daTileMatchMiddlewareService;
    @Resource
    private IDaTileMatchCollectionService daTileMatchCollectionService;
    /**
     * æŸ¥è¯¢äº¤äº’信号配置列表
@@ -163,6 +168,14 @@
                saveData.setParamName("曲轴");
                daParamCollectionService.insertDaParamCollection(saveData);
                DaTileMatchCollection MatchCollection = new DaTileMatchCollection();
                MatchCollection.setSfcCode(SNCode);
                MatchCollection.setParamValue(barcode);
                MatchCollection.setLocationCode(locationCode);
                MatchCollection.setParamCode("CZM");
                MatchCollection.setParamName("曲轴");
                daTileMatchCollectionService.insertDaTileMatchCollection(MatchCollection);
                DaTileMatchRules TileMatchRules = new DaTileMatchRules();
                TileMatchRules.setProductSeries("380Y");
                TileMatchRules.setScanObject1("连杆");
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.da.tileMatchCollection.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jcdm.common.annotation.Log;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection;
import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * æ¡ç é‡‡é›†Controller
 *
 * @author yyt
 * @date 2024-06-06
 */
@RestController
@RequestMapping("/da/tileMatchCollection")
public class DaTileMatchCollectionController extends BaseController
{
    @Autowired
    private IDaTileMatchCollectionService daTileMatchCollectionService;
    /**
     * æŸ¥è¯¢æ¡ç é‡‡é›†åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:list')")
    @GetMapping("/list")
    public TableDataInfo list(DaTileMatchCollection daTileMatchCollection)
    {
        startPage();
        List<DaTileMatchCollection> list = daTileMatchCollectionService.selectDaTileMatchCollectionList(daTileMatchCollection);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºæ¡ç é‡‡é›†åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:export')")
    @Log(title = "条码采集", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, DaTileMatchCollection daTileMatchCollection)
    {
        List<DaTileMatchCollection> list = daTileMatchCollectionService.selectDaTileMatchCollectionList(daTileMatchCollection);
        ExcelUtil<DaTileMatchCollection> util = new ExcelUtil<DaTileMatchCollection>(DaTileMatchCollection.class);
        util.exportExcel(response, list, "条码采集数据");
    }
    /**
     * èŽ·å–条码采集详细信息
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(daTileMatchCollectionService.selectDaTileMatchCollectionById(id));
    }
    /**
     * æ–°å¢žæ¡ç é‡‡é›†
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:add')")
    @Log(title = "条码采集", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody DaTileMatchCollection daTileMatchCollection)
    {
        return toAjax(daTileMatchCollectionService.insertDaTileMatchCollection(daTileMatchCollection));
    }
    /**
     * ä¿®æ”¹æ¡ç é‡‡é›†
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:edit')")
    @Log(title = "条码采集", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody DaTileMatchCollection daTileMatchCollection)
    {
        return toAjax(daTileMatchCollectionService.updateDaTileMatchCollection(daTileMatchCollection));
    }
    /**
     * åˆ é™¤æ¡ç é‡‡é›†
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:remove')")
    @Log(title = "条码采集", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(daTileMatchCollectionService.deleteDaTileMatchCollectionByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/domain/DaTileMatchCollection.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,123 @@
package com.jcdm.main.da.tileMatchCollection.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.BaseEntity;
/**
 * æ¡ç é‡‡é›†å¯¹è±¡ da_tile_match_collection
 *
 * @author yyt
 * @date 2024-06-06
 */
public class DaTileMatchCollection extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** id */
    private Long id;
    /** å‘动机号 */
    @Excel(name = "发动机号")
    private String sfcCode;
    /** é›¶ä»¶ç¼–号 */
    @Excel(name = "零件编号")
    private String paramCode;
    /** é›¶ä»¶åç§° */
    @Excel(name = "零件名称")
    private String paramName;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    /** å·¥åºç¼–号 */
    @Excel(name = "工序编号")
    private String locationCode;
    /** æ¡ç  */
    @Excel(name = "条码")
    private String paramValue;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setSfcCode(String sfcCode)
    {
        this.sfcCode = sfcCode;
    }
    public String getSfcCode()
    {
        return sfcCode;
    }
    public void setParamCode(String paramCode)
    {
        this.paramCode = paramCode;
    }
    public String getParamCode()
    {
        return paramCode;
    }
    public void setParamName(String paramName)
    {
        this.paramName = paramName;
    }
    public String getParamName()
    {
        return paramName;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }
    public String getRemarks()
    {
        return remarks;
    }
    public void setLocationCode(String locationCode)
    {
        this.locationCode = locationCode;
    }
    public String getLocationCode()
    {
        return locationCode;
    }
    public void setParamValue(String paramValue)
    {
        this.paramValue = paramValue;
    }
    public String getParamValue()
    {
        return paramValue;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sfcCode", getSfcCode())
            .append("paramCode", getParamCode())
            .append("paramName", getParamName())
            .append("createTime", getCreateTime())
            .append("remarks", getRemarks())
            .append("locationCode", getLocationCode())
            .append("paramValue", getParamValue())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/mapper/DaTileMatchCollectionMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.da.tileMatchCollection.mapper;
import java.util.List;
import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection;
/**
 * æ¡ç é‡‡é›†Mapper接口
 *
 * @author yyt
 * @date 2024-06-06
 */
public interface DaTileMatchCollectionMapper
{
    /**
     * æŸ¥è¯¢æ¡ç é‡‡é›†
     *
     * @param id æ¡ç é‡‡é›†ä¸»é”®
     * @return æ¡ç é‡‡é›†
     */
    public DaTileMatchCollection selectDaTileMatchCollectionById(Long id);
    /**
     * æŸ¥è¯¢æ¡ç é‡‡é›†åˆ—表
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return æ¡ç é‡‡é›†é›†åˆ
     */
    public List<DaTileMatchCollection> selectDaTileMatchCollectionList(DaTileMatchCollection daTileMatchCollection);
    /**
     * æ–°å¢žæ¡ç é‡‡é›†
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return ç»“æžœ
     */
    public int insertDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection);
    /**
     * ä¿®æ”¹æ¡ç é‡‡é›†
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return ç»“æžœ
     */
    public int updateDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection);
    /**
     * åˆ é™¤æ¡ç é‡‡é›†
     *
     * @param id æ¡ç é‡‡é›†ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchCollectionById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æ¡ç é‡‡é›†
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchCollectionByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/service/IDaTileMatchCollectionService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.da.tileMatchCollection.service;
import java.util.List;
import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection;
/**
 * æ¡ç é‡‡é›†Service接口
 *
 * @author yyt
 * @date 2024-06-06
 */
public interface IDaTileMatchCollectionService
{
    /**
     * æŸ¥è¯¢æ¡ç é‡‡é›†
     *
     * @param id æ¡ç é‡‡é›†ä¸»é”®
     * @return æ¡ç é‡‡é›†
     */
    public DaTileMatchCollection selectDaTileMatchCollectionById(Long id);
    /**
     * æŸ¥è¯¢æ¡ç é‡‡é›†åˆ—表
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return æ¡ç é‡‡é›†é›†åˆ
     */
    public List<DaTileMatchCollection> selectDaTileMatchCollectionList(DaTileMatchCollection daTileMatchCollection);
    /**
     * æ–°å¢žæ¡ç é‡‡é›†
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return ç»“æžœ
     */
    public int insertDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection);
    /**
     * ä¿®æ”¹æ¡ç é‡‡é›†
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return ç»“æžœ
     */
    public int updateDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection);
    /**
     * æ‰¹é‡åˆ é™¤æ¡ç é‡‡é›†
     *
     * @param ids éœ€è¦åˆ é™¤çš„条码采集主键集合
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchCollectionByIds(Long[] ids);
    /**
     * åˆ é™¤æ¡ç é‡‡é›†ä¿¡æ¯
     *
     * @param id æ¡ç é‡‡é›†ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchCollectionById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/service/impl/DaTileMatchCollectionServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,95 @@
package com.jcdm.main.da.tileMatchCollection.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.da.tileMatchCollection.mapper.DaTileMatchCollectionMapper;
import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection;
import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService;
/**
 * æ¡ç é‡‡é›†Service业务层处理
 *
 * @author yyt
 * @date 2024-06-06
 */
@Service
public class DaTileMatchCollectionServiceImpl implements IDaTileMatchCollectionService
{
    @Autowired
    private DaTileMatchCollectionMapper daTileMatchCollectionMapper;
    /**
     * æŸ¥è¯¢æ¡ç é‡‡é›†
     *
     * @param id æ¡ç é‡‡é›†ä¸»é”®
     * @return æ¡ç é‡‡é›†
     */
    @Override
    public DaTileMatchCollection selectDaTileMatchCollectionById(Long id)
    {
        return daTileMatchCollectionMapper.selectDaTileMatchCollectionById(id);
    }
    /**
     * æŸ¥è¯¢æ¡ç é‡‡é›†åˆ—表
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return æ¡ç é‡‡é›†
     */
    @Override
    public List<DaTileMatchCollection> selectDaTileMatchCollectionList(DaTileMatchCollection daTileMatchCollection)
    {
        return daTileMatchCollectionMapper.selectDaTileMatchCollectionList(daTileMatchCollection);
    }
    /**
     * æ–°å¢žæ¡ç é‡‡é›†
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return ç»“æžœ
     */
    @Override
    public int insertDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection)
    {
        daTileMatchCollection.setCreateTime(DateUtils.getNowDate());
        return daTileMatchCollectionMapper.insertDaTileMatchCollection(daTileMatchCollection);
    }
    /**
     * ä¿®æ”¹æ¡ç é‡‡é›†
     *
     * @param daTileMatchCollection æ¡ç é‡‡é›†
     * @return ç»“æžœ
     */
    @Override
    public int updateDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection)
    {
        return daTileMatchCollectionMapper.updateDaTileMatchCollection(daTileMatchCollection);
    }
    /**
     * æ‰¹é‡åˆ é™¤æ¡ç é‡‡é›†
     *
     * @param ids éœ€è¦åˆ é™¤çš„条码采集主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteDaTileMatchCollectionByIds(Long[] ids)
    {
        return daTileMatchCollectionMapper.deleteDaTileMatchCollectionByIds(ids);
    }
    /**
     * åˆ é™¤æ¡ç é‡‡é›†ä¿¡æ¯
     *
     * @param id æ¡ç é‡‡é›†ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteDaTileMatchCollectionById(Long id)
    {
        return daTileMatchCollectionMapper.deleteDaTileMatchCollectionById(id);
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java
@@ -2,11 +2,14 @@
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection;
import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService;
import com.jcdm.main.da.tileMatchMiddleware.domain.DaTileMatchMiddleware;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +47,8 @@
    @Autowired
    public IDaParamCollectionService daParamCollectionService;
    @Resource
    private IDaTileMatchCollectionService daTileMatchCollectionService;
    /**
     * æŸ¥è¯¢é…ç“¦è§„则列表()
@@ -168,10 +173,18 @@
                saveData.setSfcCode(SNCode);
                saveData.setParamValue(barcode);
                saveData.setLocationCode(locationCode);
                saveData.setParamCode("CZM");
                saveData.setParamName("曲轴");
                saveData.setParamCode("PHZ");
                saveData.setParamName("平衡轴");
                daParamCollectionService.insertDaParamCollection(saveData);
                DaTileMatchCollection MatchCollection = new DaTileMatchCollection();
                MatchCollection.setSfcCode(SNCode);
                MatchCollection.setParamValue(barcode);
                MatchCollection.setLocationCode(locationCode);
                MatchCollection.setParamCode("PHZ");
                MatchCollection.setParamName("平衡轴");
                daTileMatchCollectionService.insertDaTileMatchCollection(MatchCollection);
                DaParamCollection ParamCollection = new DaParamCollection();
                ParamCollection.setSfcCode(SNCode);
                List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection);
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -99,31 +99,33 @@
                        logger.info("-------监听到,{}的扫码枪扫码的CODE_CHECK的信号",identifier);
                        scannerGunMessage();
                    }
//                    if (identifier.equals(OPCElement.OP060_HX_CODE_CHECK) && "1".equals(value.toString())){
//                        Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code1").getValue();
//                        if (null == SNCodeObject){
//                            SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code").getValue();
//                        }
//                        if (null != SNCodeObject){
//                            String XT="";
//                            String CZ="";
//                            String SNCode = SNCodeObject.toString();
//                            DaParamCollection ParamCollection = new DaParamCollection();
//                            ParamCollection.setSfcCode(SNCode);
//                            List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection);
//                            List<DaParamCollection> XTParamCollection = DaParamCollectionlist.stream().filter(x -> "箱体".equals(x.getParamName())).collect(Collectors.toList());
//                            if (CollUtil.isNotEmpty(XTParamCollection)){
//                                DaParamCollection lastOne = XTParamCollection.get(0);
//                                XT = lastOne.getParamValue();
//                            }
//                            List<DaParamCollection> CZParamCollection = DaParamCollectionlist.stream().filter(x -> "曲轴".equals(x.getParamName())).collect(Collectors.toList());
//                            if (CollUtil.isNotEmpty(CZParamCollection)){
//                                DaParamCollection lastOne = CZParamCollection.get(0);
//                                CZ = lastOne.getParamValue();
//                            }
//                            passingStationCollectionServiceImpl.sendMessage(XT+"*"+CZ,"OP060");
//                        }
//                    }
                    if (identifier.equals(OPCElement.OP060_HX_CODE_CHECK) && "1".equals(value.toString())){
                        Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code1").getValue();
                        if (null == SNCodeObject){
                            SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code").getValue();
                        }
                        if (null != SNCodeObject){
                            String XT=null;
                            String CZ=null;
                            String SNCode = SNCodeObject.toString();
                            DaParamCollection ParamCollection = new DaParamCollection();
                            ParamCollection.setSfcCode(SNCode);
                            List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection);
                            List<DaParamCollection> XTParamCollection = DaParamCollectionlist.stream().filter(x -> "箱体".equals(x.getParamName())).collect(Collectors.toList());
                            if (CollUtil.isNotEmpty(XTParamCollection)){
                                DaParamCollection lastOne = XTParamCollection.get(0);
                                XT = lastOne.getParamValue();
                            }
                            List<DaParamCollection> CZParamCollection = DaParamCollectionlist.stream().filter(x -> "曲轴".equals(x.getParamName())).collect(Collectors.toList());
                            if (CollUtil.isNotEmpty(CZParamCollection)){
                                DaParamCollection lastOne = CZParamCollection.get(0);
                                CZ = lastOne.getParamValue();
                            }
                            if(null != XT&&null != CZ) {
                                passingStationCollectionServiceImpl.sendMessage(XT+"*"+CZ,"OP060");
                            }
                        }
                    }
                }
                if (collect2.contains(identifier)){
                    if ("1".equals(value.toString())){
jcdm-main/src/main/resources/mapper/da/tileMatchCollection/DaTileMatchCollectionMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jcdm.main.da.tileMatchCollection.mapper.DaTileMatchCollectionMapper">
    <resultMap type="DaTileMatchCollection" id="DaTileMatchCollectionResult">
        <result property="id"    column="id"    />
        <result property="sfcCode"    column="sfc_code"    />
        <result property="paramCode"    column="param_code"    />
        <result property="paramName"    column="param_name"    />
        <result property="createTime"    column="create_time"    />
        <result property="remarks"    column="remarks"    />
        <result property="locationCode"    column="location_code"    />
    </resultMap>
    <sql id="selectDaTileMatchCollectionVo">
        select id, sfc_code, param_code, param_name, create_time, remarks, location_code,param_value from da_tile_match_collection
    </sql>
    <select id="selectDaTileMatchCollectionList" parameterType="DaTileMatchCollection" resultMap="DaTileMatchCollectionResult">
        <include refid="selectDaTileMatchCollectionVo"/>
        <where>
            <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
            <if test="paramCode != null  and paramCode != ''"> and param_code = #{paramCode}</if>
            <if test="paramValue != null  and paramValue != ''"> and param_value = #{paramValue}</if>
            <if test="paramName != null  and paramName != ''"> and param_name like concat('%', #{paramValue}, '%')</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
            <if test="locationCode != null  and locationCode != ''"> and location_code = #{locationCode}</if>
        </where>
    </select>
    <select id="selectDaTileMatchCollectionById" parameterType="Long" resultMap="DaTileMatchCollectionResult">
        <include refid="selectDaTileMatchCollectionVo"/>
        where id = #{id}
    </select>
    <insert id="insertDaTileMatchCollection" parameterType="DaTileMatchCollection">
        insert into da_tile_match_collection
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="sfcCode != null">sfc_code,</if>
            <if test="paramCode != null">param_code,</if>
            <if test="paramName != null">param_name,</if>
            <if test="paramValue != null">param_value,</if>
            <if test="createTime != null">create_time,</if>
            <if test="remarks != null">remarks,</if>
            <if test="locationCode != null">location_code,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="sfcCode != null">#{sfcCode},</if>
            <if test="paramCode != null">#{paramCode},</if>
            <if test="paramName != null">#{paramName},</if>
            <if test="paramValue != null">#{paramValue},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="remarks != null">#{remarks},</if>
            <if test="locationCode != null">#{locationCode},</if>
         </trim>
    </insert>
    <update id="updateDaTileMatchCollection" parameterType="DaTileMatchCollection">
        update da_tile_match_collection
        <trim prefix="SET" suffixOverrides=",">
            <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
            <if test="paramCode != null">param_code = #{paramCode},</if>
            <if test="paramName != null">param_name = #{paramName},</if>
            <if test="paramValue != null">param_value = #{paramValue},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="locationCode != null">location_code = #{locationCode},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteDaTileMatchCollectionById" parameterType="Long">
        delete from da_tile_match_collection where id = #{id}
    </delete>
    <delete id="deleteDaTileMatchCollectionByIds" parameterType="String">
        delete from da_tile_match_collection where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/da/tileMatchCollection/tileMatchCollection.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢æ¡ç é‡‡é›†åˆ—表
export function listTileMatchCollection(query) {
  return request({
    url: '/da/tileMatchCollection/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢æ¡ç é‡‡é›†è¯¦ç»†
export function getTileMatchCollection(id) {
  return request({
    url: '/da/tileMatchCollection/' + id,
    method: 'get'
  })
}
// æ–°å¢žæ¡ç é‡‡é›†
export function addTileMatchCollection(data) {
  return request({
    url: '/da/tileMatchCollection',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹æ¡ç é‡‡é›†
export function updateTileMatchCollection(data) {
  return request({
    url: '/da/tileMatchCollection',
    method: 'put',
    data: data
  })
}
// åˆ é™¤æ¡ç é‡‡é›†
export function delTileMatchCollection(id) {
  return request({
    url: '/da/tileMatchCollection/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/da/tileMatchCollection/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,338 @@
<template>
  <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="sfcCode">
            <el-input
              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="paramName">
            <el-input
              v-model="queryParams.paramName"
              placeholder="请输入零件名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="备注" prop="remarks">
            <el-input
              v-model="queryParams.remarks"
              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 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>
          </el-form-item>
        </el-form>
    </el-card>
    <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:tileMatchCollection: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:tileMatchCollection: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:tileMatchCollection:remove']"
            >删除</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['da:tileMatchCollection:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="tileMatchCollectionList" @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="sfcCode">
<!--            <template slot-scope="scope">-->
<!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.sfcCode"/>-->
<!--            </template>-->
          </el-table-column>
          <el-table-column label="零件编号" align="center" prop="paramCode">
<!--            <template slot-scope="scope">-->
<!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramCode"/>-->
<!--            </template>-->
          </el-table-column>
          <el-table-column label="零件名称" align="center" prop="paramName">
<!--            <template slot-scope="scope">-->
<!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramName"/>-->
<!--            </template>-->
          </el-table-column>
          <el-table-column label="备注" align="center" prop="remarks">
<!--            <template slot-scope="scope">-->
<!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>-->
<!--            </template>-->
          </el-table-column>
          <el-table-column label="工序编号" align="center" prop="locationCode">
<!--            <template slot-scope="scope">-->
<!--              <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.locationCode"/>-->
<!--            </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:tileMatchCollection:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['da:tileMatchCollection:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改条码采集对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" 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-item label="发动机号" prop="sfcCode">
          <el-input v-model="form.sfcCode" placeholder="请输入发动机号" />
        </el-form-item>
        <el-form-item label="零件编号" prop="paramCode">
          <el-input v-model="form.paramCode" placeholder="请输入零件编号" />
        </el-form-item>
        <el-form-item label="零件名称" prop="paramName">
          <el-input v-model="form.paramName" placeholder="请输入零件名称" />
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="工序编号" prop="locationCode">
          <el-input v-model="form.locationCode" placeholder="请输入工序编号" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listTileMatchCollection, getTileMatchCollection, delTileMatchCollection, addTileMatchCollection, updateTileMatchCollection } from "@/api/main/da/tileMatchCollection/tileMatchCollection";
export default {
  name: "TileMatchCollection",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // æ¡ç é‡‡é›†è¡¨æ ¼æ•°æ®
      tileMatchCollectionList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        sfcCode: null,
        paramCode: null,
        paramName: null,
        remarks: null,
        locationCode: null
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "id不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢æ¡ç é‡‡é›†åˆ—表 */
    getList() {
      this.loading = true;
      listTileMatchCollection(this.queryParams).then(response => {
        this.tileMatchCollectionList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        sfcCode: null,
        paramCode: null,
        paramName: null,
        createTime: null,
        remarks: null,
        locationCode: null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.open = true;
      this.titleName = "添加条码采集";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getTileMatchCollection(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.titleName = "修改条码采集";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateTileMatchCollection(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addTileMatchCollection(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除条码采集编号为"' + ids + '"的数据项?').then(function() {
        return delTileMatchCollection(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('da/tileMatchCollection/export', {
        ...this.queryParams
      }, `tileMatchCollection_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>