春风项目四线(合箱线、总装线)
yyt
2024-06-03 5030f3d30ccc1bd16db371c6970a48103aff9191
380新产品,优化
已修改17个文件
已添加14个文件
2050 ■■■■ 文件已修改
jcdm-admin/src/main/resources/application.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/controller/DaTileMatchMiddlewareController.java 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/domain/DaTileMatchMiddleware.java 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/mapper/DaTileMatchMiddlewareMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/service/IDaTileMatchMiddlewareService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/service/impl/DaTileMatchMiddlewareServiceImpl.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/tileMatchMiddleware/DaTileMatchMiddlewareMapper.xml 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/tileMatchRules/DaTileMatchRulesMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/tileMatchRules/tileMatchRules.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/da/opcuaconfig/opcuaconfig.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/da/tileMatchMiddleware/tileMatchMiddleware.js 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/orderScheduling/index.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/BalanceShaft/index.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/connectingRod/index.vue 119 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/connectingRodUp/index.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaft/index.vue 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs1.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs2.vue 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs3.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs5.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs6.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs7.vue 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/crankshaftUp/index.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/cfkb/tileMatchKb/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/tileMatchMiddleware/index.vue 336 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-admin/src/main/resources/application.yml
@@ -138,8 +138,8 @@
      default:
        endpoint: opc.tcp://127.0.0.1:49320
        security-policy: none
#websocketUrl: 'ws://10.10.12.100:8081/websocket/'
websocketUrl: 'ws://127.0.0.1:8081/websocket/'
websocketUrl: 'ws://10.10.12.100:8081/websocket/'
#websocketUrl: 'ws://127.0.0.1:8081/websocket/'
# mybatis-plus
#mybatis-plus:
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
@@ -1,14 +1,20 @@
package com.jcdm.main.da.opcuaconfig.controller;
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig;
import com.jcdm.main.da.opcuaconfig.domain.NodeEntity;
import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService;
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.tileMatchMiddleware.domain.DaTileMatchMiddleware;
import com.jcdm.main.da.tileMatchMiddleware.service.IDaTileMatchMiddlewareService;
import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules;
import com.jcdm.main.da.tileMatchRules.service.IDaTileMatchRulesService;
import com.jcdm.main.plcserver.sub.OPCUaSubscription;
import com.kangaroohy.milo.model.ReadWriteEntity;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -42,7 +48,12 @@
{
    @Autowired
    private IDaOpcuaConfigService daOpcuaConfigService;
    @Autowired
    private IDaParamCollectionService daParamCollectionService;
    @Autowired
    private IDaTileMatchRulesService daTileMatchRulesService;
    @Autowired
    private IDaTileMatchMiddlewareService daTileMatchMiddlewareService;
    /**
     * æŸ¥è¯¢äº¤äº’信号配置列表
@@ -132,15 +143,16 @@
     * é…ç“¦æ‰«ç 
     */
    @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')")
    @GetMapping(value = "/barcode/{barcode}/{locationCode}")
    public AjaxResult setBarcode(@PathVariable("barcode") String barcode,@PathVariable("locationCode") String locationCode) {
        Boolean out= true;
    @GetMapping(value = "/barcode1")
    public DaParamCollection setBarcode1(String barcode,String locationCode) {
        Boolean out = true;
        DaParamCollection xParamCollection = null;
        try {
            Object SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+".Code1").getValue();
            if (null == SNCodeObject){
                SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+ ".Code").getValue();
            Object SNCodeObject = miloService.readFromOpcUa("CFL4HX." + locationCode + ".Code1").getValue();
            if (null == SNCodeObject) {
                SNCodeObject = miloService.readFromOpcUa("CFL4HX." + locationCode + ".Code").getValue();
            }
            if (null != SNCodeObject){
            if (null != SNCodeObject) {
                String SNCode = SNCodeObject.toString();
                //插入数据
                DaParamCollection saveData = new DaParamCollection();
@@ -148,12 +160,36 @@
                saveData.setParamValue(barcode);
                saveData.setLocationCode(locationCode);
                saveData.setParamCode("CZM");
                saveData.setParamName("曲轴码");
                saveData.setParamName("曲轴");
                daParamCollectionService.insertDaParamCollection(saveData);
                DaTileMatchRules TileMatchRules = new DaTileMatchRules();
                TileMatchRules.setProductSeries("380Y");
                TileMatchRules.setScanObject1("连杆");
                TileMatchRules.setScanObject2("曲轴");
                daTileMatchRulesService.selectDaTileMatchRulesList(TileMatchRules);
                for (int i = 1; i <= 3; i++) {
                    DaTileMatchMiddleware TileMatchMiddleware = new DaTileMatchMiddleware();
                    TileMatchMiddleware.setSfcCode(SNCode);
                    TileMatchMiddleware.setCrankshaftNo(barcode);
                    TileMatchMiddleware.setCylinder((long) i);
                    TileMatchMiddleware.setState(1L);
                    daTileMatchMiddlewareService.insertDaTileMatchMiddleware(TileMatchMiddleware);
                }
                DaParamCollection ParamCollection = new DaParamCollection();
                ParamCollection.setSfcCode(SNCode);
                ParamCollection.setParamName("箱体");
                List<DaParamCollection> DaParamCollectionlist = daParamCollectionService.selectDaParamCollectionList(ParamCollection);
                List<DaParamCollection> XTParamCollection = DaParamCollectionlist.stream().filter(x -> "箱体".equals(x.getParamName())).collect(Collectors.toList());
                if (CollUtil.isNotEmpty(XTParamCollection)) {
                    xParamCollection = XTParamCollection.get(0);
                }
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return toAjax(out);
        return xParamCollection;
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/controller/DaTileMatchMiddlewareController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,160 @@
package com.jcdm.main.da.tileMatchMiddleware.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules;
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.tileMatchMiddleware.domain.DaTileMatchMiddleware;
import com.jcdm.main.da.tileMatchMiddleware.service.IDaTileMatchMiddlewareService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
import static com.jcdm.main.plcserver.sub.OPCUaSubscription.miloService;
/**
 * æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´Controller
 *
 * @author yyt
 * @date 2024-05-28
 */
@RestController
@RequestMapping("/da/tileMatchMiddleware")
public class DaTileMatchMiddlewareController extends BaseController
{
    @Autowired
    private IDaTileMatchMiddlewareService daTileMatchMiddlewareService;
    /**
     * æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:list')")
    @GetMapping("/list")
    public TableDataInfo list(DaTileMatchMiddleware daTileMatchMiddleware)
    {
        startPage();
        List<DaTileMatchMiddleware> list = daTileMatchMiddlewareService.selectDaTileMatchMiddlewareList(daTileMatchMiddleware);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºæ´»å¡žè¿žæ†é…ç“¦ä¸­é—´åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:export')")
    @Log(title = "活塞连杆配瓦中间", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, DaTileMatchMiddleware daTileMatchMiddleware)
    {
        List<DaTileMatchMiddleware> list = daTileMatchMiddlewareService.selectDaTileMatchMiddlewareList(daTileMatchMiddleware);
        ExcelUtil<DaTileMatchMiddleware> util = new ExcelUtil<DaTileMatchMiddleware>(DaTileMatchMiddleware.class);
        util.exportExcel(response, list, "活塞连杆配瓦中间数据");
    }
    /**
     * èŽ·å–活塞连杆配瓦中间详细信息
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(daTileMatchMiddlewareService.selectDaTileMatchMiddlewareById(id));
    }
    /**
     * æ–°å¢žæ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:add')")
    @Log(title = "活塞连杆配瓦中间", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody DaTileMatchMiddleware daTileMatchMiddleware)
    {
        return toAjax(daTileMatchMiddlewareService.insertDaTileMatchMiddleware(daTileMatchMiddleware));
    }
    /**
     * ä¿®æ”¹æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:edit')")
    @Log(title = "活塞连杆配瓦中间", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody DaTileMatchMiddleware daTileMatchMiddleware)
    {
        return toAjax(daTileMatchMiddlewareService.updateDaTileMatchMiddleware(daTileMatchMiddleware));
    }
    /**
     * åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     */
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:remove')")
    @Log(title = "活塞连杆配瓦中间", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(daTileMatchMiddlewareService.deleteDaTileMatchMiddlewareByIds(ids));
    }
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:query')")
    @GetMapping(value = "/barcodeup")
    public DaTileMatchMiddleware setBarcodeup(String barcode,String locationCode) {
        DaTileMatchMiddleware rMiddleware=null;
        try {
            //Object SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+".Code1").getValue();
            Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP050.Code1").getValue();
            if (null == SNCodeObject){
                //SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+ ".Code").getValue();
                SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP050.Code").getValue();
            }
            if (null != SNCodeObject){
                String SNCode = SNCodeObject.toString();
                DaTileMatchMiddleware TileMatchMiddleware=new DaTileMatchMiddleware();
                TileMatchMiddleware.setSfcCode(SNCode);
                TileMatchMiddleware.setPalletNo(barcode);
                TileMatchMiddleware.setState(2L);
                List<DaTileMatchMiddleware> TileMatchMiddlewareList=daTileMatchMiddlewareService.selectDaTileMatchMiddlewareList(TileMatchMiddleware);
                if(TileMatchMiddlewareList.size()>0){
                    for(int i=0;i<TileMatchMiddlewareList.size();i++){
                        DaTileMatchMiddleware Middleware=TileMatchMiddlewareList.get(i);
                        Middleware.setState(3L);
                        daTileMatchMiddlewareService.updateDaTileMatchMiddleware(Middleware);
                    }
                    rMiddleware=TileMatchMiddlewareList.get(0);
                }
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return rMiddleware;
    }
    @PreAuthorize("@ss.hasPermi('da:tileMatchMiddleware:query')")
    @GetMapping(value = "/barcode")
    public DaTileMatchMiddleware setBarcode(String barcode,String locationCode) {
        DaTileMatchMiddleware rMiddleware=new DaTileMatchMiddleware();;
        rMiddleware.setState(1L);
        List<DaTileMatchMiddleware> TileMatchMiddlewareList=daTileMatchMiddlewareService.selectDaTileMatchMiddlewareList(rMiddleware);
        if(TileMatchMiddlewareList.size()>0){
            rMiddleware=TileMatchMiddlewareList.get(0);
            rMiddleware.setPalletNo(locationCode);
            rMiddleware.setConnectingrodNo(barcode);
            rMiddleware.setState(2L);
            daTileMatchMiddlewareService.updateDaTileMatchMiddleware(rMiddleware);
        }
        return rMiddleware;
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/domain/DaTileMatchMiddleware.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,135 @@
package com.jcdm.main.da.tileMatchMiddleware.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_middleware
 *
 * @author yyt
 * @date 2024-05-28
 */
public class DaTileMatchMiddleware extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ID */
    private Long id;
    /** äº§å“SN号 */
    @Excel(name = "产品SN号")
    private String sfcCode;
    /** æ‰˜ç›˜å· */
    @Excel(name = "托盘号")
    private String palletNo;
    /** æ›²è½´ç  */
    @Excel(name = "曲轴码")
    private String crankshaftNo;
    /** çŠ¶æ€ */
    @Excel(name = "状态")
    private Long state;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    /** è¿žæ†ç  */
    @Excel(name = "连杆码")
    private String connectingrodNo;
    /** æ°”缸编号 */
    @Excel(name = "气缸编号")
    private Long cylinder;
    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 setPalletNo(String palletNo)
    {
        this.palletNo = palletNo;
    }
    public String getPalletNo()
    {
        return palletNo;
    }
    public void setCrankshaftNo(String crankshaftNo)
    {
        this.crankshaftNo = crankshaftNo;
    }
    public String getCrankshaftNo()
    {
        return crankshaftNo;
    }
    public void setState(Long state)
    {
        this.state = state;
    }
    public Long getState()
    {
        return state;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }
    public String getRemarks()
    {
        return remarks;
    }
    public void setConnectingrodNo(String connectingrodNo)
    {
        this.connectingrodNo = connectingrodNo;
    }
    public String getConnectingrodNo()
    {
        return connectingrodNo;
    }
    public void setCylinder(Long cylinder)
    {
        this.cylinder = cylinder;
    }
    public Long getCylinder()
    {
        return cylinder;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sfcCode", getSfcCode())
            .append("palletNo", getPalletNo())
            .append("crankshaftNo", getCrankshaftNo())
            .append("state", getState())
            .append("remarks", getRemarks())
            .append("connectingrodNo", getConnectingrodNo())
            .append("cylinder", getCylinder())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/mapper/DaTileMatchMiddlewareMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.da.tileMatchMiddleware.mapper;
import java.util.List;
import com.jcdm.main.da.tileMatchMiddleware.domain.DaTileMatchMiddleware;
/**
 * æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´Mapper接口
 *
 * @author yyt
 * @date 2024-05-28
 */
public interface DaTileMatchMiddlewareMapper
{
    /**
     * æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param id æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¸»é”®
     * @return æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     */
    public DaTileMatchMiddleware selectDaTileMatchMiddlewareById(Long id);
    /**
     * æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´åˆ—表
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´é›†åˆ
     */
    public List<DaTileMatchMiddleware> selectDaTileMatchMiddlewareList(DaTileMatchMiddleware daTileMatchMiddleware);
    /**
     * æ–°å¢žæ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return ç»“æžœ
     */
    public int insertDaTileMatchMiddleware(DaTileMatchMiddleware daTileMatchMiddleware);
    /**
     * ä¿®æ”¹æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return ç»“æžœ
     */
    public int updateDaTileMatchMiddleware(DaTileMatchMiddleware daTileMatchMiddleware);
    /**
     * åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param id æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchMiddlewareById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchMiddlewareByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/service/IDaTileMatchMiddlewareService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.da.tileMatchMiddleware.service;
import java.util.List;
import com.jcdm.main.da.tileMatchMiddleware.domain.DaTileMatchMiddleware;
/**
 * æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´Service接口
 *
 * @author yyt
 * @date 2024-05-28
 */
public interface IDaTileMatchMiddlewareService
{
    /**
     * æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param id æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¸»é”®
     * @return æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     */
    public DaTileMatchMiddleware selectDaTileMatchMiddlewareById(Long id);
    /**
     * æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´åˆ—表
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´é›†åˆ
     */
    public List<DaTileMatchMiddleware> selectDaTileMatchMiddlewareList(DaTileMatchMiddleware daTileMatchMiddleware);
    /**
     * æ–°å¢žæ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return ç»“æžœ
     */
    public int insertDaTileMatchMiddleware(DaTileMatchMiddleware daTileMatchMiddleware);
    /**
     * ä¿®æ”¹æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return ç»“æžœ
     */
    public int updateDaTileMatchMiddleware(DaTileMatchMiddleware daTileMatchMiddleware);
    /**
     * æ‰¹é‡åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param ids éœ€è¦åˆ é™¤çš„活塞连杆配瓦中间主键集合
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchMiddlewareByIds(Long[] ids);
    /**
     * åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¿¡æ¯
     *
     * @param id æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteDaTileMatchMiddlewareById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/service/impl/DaTileMatchMiddlewareServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,93 @@
package com.jcdm.main.da.tileMatchMiddleware.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.da.tileMatchMiddleware.mapper.DaTileMatchMiddlewareMapper;
import com.jcdm.main.da.tileMatchMiddleware.domain.DaTileMatchMiddleware;
import com.jcdm.main.da.tileMatchMiddleware.service.IDaTileMatchMiddlewareService;
/**
 * æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´Service业务层处理
 *
 * @author yyt
 * @date 2024-05-28
 */
@Service
public class DaTileMatchMiddlewareServiceImpl implements IDaTileMatchMiddlewareService
{
    @Autowired
    private DaTileMatchMiddlewareMapper daTileMatchMiddlewareMapper;
    /**
     * æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param id æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¸»é”®
     * @return æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     */
    @Override
    public DaTileMatchMiddleware selectDaTileMatchMiddlewareById(Long id)
    {
        return daTileMatchMiddlewareMapper.selectDaTileMatchMiddlewareById(id);
    }
    /**
     * æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´åˆ—表
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     */
    @Override
    public List<DaTileMatchMiddleware> selectDaTileMatchMiddlewareList(DaTileMatchMiddleware daTileMatchMiddleware)
    {
        return daTileMatchMiddlewareMapper.selectDaTileMatchMiddlewareList(daTileMatchMiddleware);
    }
    /**
     * æ–°å¢žæ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return ç»“æžœ
     */
    @Override
    public int insertDaTileMatchMiddleware(DaTileMatchMiddleware daTileMatchMiddleware)
    {
        return daTileMatchMiddlewareMapper.insertDaTileMatchMiddleware(daTileMatchMiddleware);
    }
    /**
     * ä¿®æ”¹æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param daTileMatchMiddleware æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     * @return ç»“æžœ
     */
    @Override
    public int updateDaTileMatchMiddleware(DaTileMatchMiddleware daTileMatchMiddleware)
    {
        return daTileMatchMiddlewareMapper.updateDaTileMatchMiddleware(daTileMatchMiddleware);
    }
    /**
     * æ‰¹é‡åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
     *
     * @param ids éœ€è¦åˆ é™¤çš„活塞连杆配瓦中间主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteDaTileMatchMiddlewareByIds(Long[] ids)
    {
        return daTileMatchMiddlewareMapper.deleteDaTileMatchMiddlewareByIds(ids);
    }
    /**
     * åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¿¡æ¯
     *
     * @param id æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteDaTileMatchMiddlewareById(Long id)
    {
        return daTileMatchMiddlewareMapper.deleteDaTileMatchMiddlewareById(id);
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java
@@ -1,7 +1,13 @@
package com.jcdm.main.da.tileMatchRules.controller;
import java.util.List;
import java.util.stream.Collectors;
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.tileMatchMiddleware.domain.DaTileMatchMiddleware;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -21,6 +27,8 @@
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
import static com.jcdm.main.plcserver.sub.OPCUaSubscription.miloService;
/**
 * é…ç“¦è§„则Controller
 * 
@@ -33,6 +41,9 @@
{
    @Autowired
    private IDaTileMatchRulesService daTileMatchRulesService;
    @Autowired
    public IDaParamCollectionService daParamCollectionService;
    /**
     * æŸ¥è¯¢é…ç“¦è§„则列表()
@@ -137,4 +148,42 @@
    {
        return toAjax(daTileMatchRulesService.deleteDaTileMatchRulesByIds(ids));
    }
    @PreAuthorize("@ss.hasPermi('da:tileMatchRules:query')")
    @GetMapping(value = "/barcode")
    public String setBarcode(String barcode,String locationCode) {
        String XT="";
        try {
            //Object SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+".Code1").getValue();
            Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.HOP040.Code1").getValue();
            if (null == SNCodeObject){
                //SNCodeObject = miloService.readFromOpcUa("CFL4HX."+locationCode+ ".Code").getValue();
                SNCodeObject = miloService.readFromOpcUa("CFL4HX.HOP040.Code").getValue();
            }
            if (null != SNCodeObject){
                String SNCode = SNCodeObject.toString();
                //插入数据
                DaParamCollection saveData = new DaParamCollection();
                saveData.setSfcCode(SNCode);
                saveData.setParamValue(barcode);
                saveData.setLocationCode(locationCode);
                saveData.setParamCode("CZM");
                saveData.setParamName("曲轴");
                daParamCollectionService.insertDaParamCollection(saveData);
                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();
                }
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return XT;
    }
}
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -105,8 +105,23 @@
                            SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code").getValue();
                        }
                        if (null != SNCodeObject){
                            String XT="";
                            String CZ="";
                            String SNCode = SNCodeObject.toString();
                            passingStationCollectionServiceImpl.sendMessage("P0SQ0-01FZ01-1000;T231224116;DBBBBA*P0SQ0-041000-1002;T2312020675;DAABBA;S500003","OP060");
                            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");
                        }
                    }
                }
@@ -187,7 +202,7 @@
                if (StrUtil.isNotBlank(a)){
                    int input = Integer.parseInt(a);
                    ReadWriteEntity entity = new ReadWriteEntity(parts[0]+"."+parts[1]+".CodeCheckFeed", input);
                    logger.info("-------监听到,{}的CodeCheck的信号",Node);
                    logger.info("发动机号:{},监听到{}的CodeCheck的信号",SNCode,Node);
                    miloService.writeToOpcByte(entity);
                    logger.info("监听到返回codecheckfeed信号,{}",entity);
                    //首站传输订单号
jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java
@@ -210,6 +210,34 @@
                .getAsJsonObject("ET_DATA");
        return etData.toString();
    }
    /**
     * æ–¹å¼--è´°
     * ä½¿ç”¨hutool工具包中的工具转化
     * @param xmlStr
     * @return
     */
    public static String xmlToJSON1(String xmlStr){
        String status = "";
        if(xmlStr.contains("EV_MESSAGE")){
            JSONObject jsonObject1 = cn.hutool.json.XML.toJSONObject(xmlStr, true);
            ObjectMapper objectMapper = new ObjectMapper();
            JsonNode rootNode = null;
            try {
                rootNode = objectMapper.readTree(String.valueOf(jsonObject1));
            } catch (JsonProcessingException e) {
                throw new RuntimeException(e);
            }
            String evStatus = rootNode
                    .path("SOAP:Envelope")
                    .path("SOAP:Body")
                    .path("n0:ZPP_BC_001.Response")
                    .path("EV_MESSAGE")
                    .asText();
            status = evStatus;
        }
        return status;
    }
    /**
     * æ–¹å¼--è´°
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
@@ -1,9 +1,9 @@
<?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">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper">
    <resultMap type="BsOrderScheduling" id="BsOrderSchedulingResult">
        <result property="id"    column="id"    />
        <result property="orderNo"    column="order_no"    />
@@ -47,7 +47,7 @@
    <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
        <where>
        <where>
            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
            <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
            <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
@@ -64,8 +64,8 @@
            <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
            <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
            <if test="status != null  and status != ''"> and status = #{status}</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="spareField1 != null  and spareField1 != ''"> and isnull(spare_field_1,'') != #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and isnull(spare_field_2,'') != #{spareField2}</if>
            <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
            <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
@@ -146,7 +146,7 @@
        </where>
        order by create_time DESC
    </select>
    <select id="selectBsOrderSchedulingById" parameterType="Long" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
        where id = #{id}
@@ -209,7 +209,7 @@
            <if test="finalAssemblyOfflineTime != null">final_assembly_offline_time,</if>
            <if test="cvtLaunchTime != null">cvt_launch_time,</if>
            <if test="cvtOfflineTime != null">cvt_offline_time,</if>
         </trim>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="orderNo != null">#{orderNo},</if>
            <if test="engineNo != null">#{engineNo},</if>
@@ -292,7 +292,7 @@
    </delete>
    <delete id="deleteBsOrderSchedulingByIds" parameterType="String">
        delete from bs_order_scheduling where id in
        delete from bs_order_scheduling where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
jcdm-main/src/main/resources/mapper/da/tileMatchMiddleware/DaTileMatchMiddlewareMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,87 @@
<?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.tileMatchMiddleware.mapper.DaTileMatchMiddlewareMapper">
    <resultMap type="DaTileMatchMiddleware" id="DaTileMatchMiddlewareResult">
        <result property="id"    column="id"    />
        <result property="sfcCode"    column="sfc_code"    />
        <result property="palletNo"    column="Pallet_no"    />
        <result property="crankshaftNo"    column="crankshaft_no"    />
        <result property="state"    column="state"    />
        <result property="remarks"    column="remarks"    />
        <result property="connectingrodNo"    column="connectingRod_no"    />
        <result property="cylinder"    column="cylinder"    />
    </resultMap>
    <sql id="selectDaTileMatchMiddlewareVo">
        select id, sfc_code, Pallet_no, crankshaft_no, state, remarks, connectingRod_no, cylinder from da_tile_match_middleware
    </sql>
    <select id="selectDaTileMatchMiddlewareList" parameterType="DaTileMatchMiddleware" resultMap="DaTileMatchMiddlewareResult">
        <include refid="selectDaTileMatchMiddlewareVo"/>
        <where>
            <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
            <if test="palletNo != null  and palletNo != ''"> and Pallet_no = #{palletNo}</if>
            <if test="crankshaftNo != null  and crankshaftNo != ''"> and crankshaft_no = #{crankshaftNo}</if>
            <if test="state != null "> and state = #{state}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
            <if test="connectingrodNo != null  and connectingrodNo != ''"> and connectingRod_no = #{connectingrodNo}</if>
            <if test="cylinder != null "> and cylinder = #{cylinder}</if>
        </where>
    </select>
    <select id="selectDaTileMatchMiddlewareById" parameterType="Long" resultMap="DaTileMatchMiddlewareResult">
        <include refid="selectDaTileMatchMiddlewareVo"/>
        where id = #{id}
    </select>
    <insert id="insertDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware">
        insert into da_tile_match_middleware
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="sfcCode != null">sfc_code,</if>
            <if test="palletNo != null">Pallet_no,</if>
            <if test="crankshaftNo != null">crankshaft_no,</if>
            <if test="state != null">state,</if>
            <if test="remarks != null">remarks,</if>
            <if test="connectingrodNo != null">connectingRod_no,</if>
            <if test="cylinder != null">cylinder,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="sfcCode != null">#{sfcCode},</if>
            <if test="palletNo != null">#{palletNo},</if>
            <if test="crankshaftNo != null">#{crankshaftNo},</if>
            <if test="state != null">#{state},</if>
            <if test="remarks != null">#{remarks},</if>
            <if test="connectingrodNo != null">#{connectingrodNo},</if>
            <if test="cylinder != null">#{cylinder},</if>
         </trim>
    </insert>
    <update id="updateDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware">
        update da_tile_match_middleware
        <trim prefix="SET" suffixOverrides=",">
            <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
            <if test="palletNo != null">Pallet_no = #{palletNo},</if>
            <if test="crankshaftNo != null">crankshaft_no = #{crankshaftNo},</if>
            <if test="state != null">state = #{state},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="connectingrodNo != null">connectingRod_no = #{connectingrodNo},</if>
            <if test="cylinder != null">cylinder = #{cylinder},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteDaTileMatchMiddlewareById" parameterType="Long">
        delete from da_tile_match_middleware where id = #{id}
    </delete>
    <delete id="deleteDaTileMatchMiddlewareByIds" parameterType="String">
        delete from da_tile_match_middleware where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-main/src/main/resources/mapper/da/tileMatchRules/DaTileMatchRulesMapper.xml
@@ -39,8 +39,8 @@
            <if test="tileName != null  and tileName != ''"> and tile_name like concat('%', #{tileName}, '%')</if>
            <if test="axisParameterNoPosition != null "> and axis_parameter_no_position = #{axisParameterNoPosition}</if>
            <if test="neckParameterPosition != null "> and neck_parameter_position = #{neckParameterPosition}</if>
            <if test="axisValue != null  and axisValue != ''"> and axis_value = SUBSTRING(#{axisValue}, axis_parameter_no_position, 1)</if>
            <if test="neckValue != null  and neckValue != ''"> and neck_value = SUBSTRING(#{neckValue}, neck_parameter_position, 1)</if>
            <if test="axisValue != null  and axisValue != ''"> and axis_value = SUBSTRING(#{axisValue}, axis_parameter_no_position+1, 1)</if>
            <if test="neckValue != null  and neckValue != ''"> and neck_value = SUBSTRING(#{neckValue}, neck_parameter_position+1, 1)</if>
            <if test="tileColor != null  and tileColor != ''"> and tile_color = #{tileColor}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java
@@ -52,14 +52,38 @@
        BsOrderScheduling bsOrderScheduling = new BsOrderScheduling();
        bsOrderScheduling.setReport10("0");
        List<BsOrderScheduling> bsOrderSchedulings = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling);
        String status="";
        String ev_meassage="";
        for (BsOrderScheduling orderScheduling : bsOrderSchedulings) {
            String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0010"));
            String status = ReceivingServices.xmlToJSON3(xmlResult);
            if(status.equals("1")){
            try {
                String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0010"));
                ev_meassage=ReceivingServices.xmlToJSON1(xmlResult);
                status = ReceivingServices.xmlToJSON3(xmlResult);
            } catch (Exception e) {
                status="3";
            }
            if(status.equals("1")) {
                orderScheduling.setReport10("1");
                int i = bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                System.out.println("更新状态成功");
                //logger.info("{}合箱报工成功",orderScheduling.getOrderNo());
                logger.info("{}合箱报工成功",orderScheduling.getOrderNo());
            }else {
                if(StringUtils.isEmpty(orderScheduling.getSpareField1())){
                    orderScheduling.setSpareField1("1");
                    bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                }else{
                    if(Integer.valueOf(orderScheduling.getSpareField1())+1>=3) {
                        //累计报工异常超过3次
                        orderScheduling.setReport10("3");
                        orderScheduling.setSpareField1(String.valueOf(Integer.valueOf(orderScheduling.getSpareField1()) + 1));
                    }else {
                        orderScheduling.setSpareField1(String.valueOf(Integer.valueOf(orderScheduling.getSpareField1()) + 1));
                    }
                    bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                }
                if(status.equals("3"))
                    logger.info("{}合箱报工因为网络原因,报工失败!",orderScheduling.getOrderNo());
                else
                    logger.info("{}合箱报工失败,原因:{}",orderScheduling.getOrderNo(),ev_meassage);
            }
        }
    }
@@ -68,14 +92,38 @@
        BsOrderScheduling bsOrderScheduling = new BsOrderScheduling();
        bsOrderScheduling.setReport20("0");
        List<BsOrderScheduling> bsOrderSchedulings = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling);
        String status="";
        String ev_meassage="";
        for (BsOrderScheduling orderScheduling : bsOrderSchedulings) {
            String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0020"));
            String status = ReceivingServices.xmlToJSON3(xmlResult);
            try {
                String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0020"));
                ev_meassage=ReceivingServices.xmlToJSON1(xmlResult);
                status = ReceivingServices.xmlToJSON3(xmlResult);
            } catch (Exception e) {
                status="3";
            }
            if(status.equals("1")){
                orderScheduling.setReport20("1");
                int i = bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                System.out.println("更新状态成功");
                //logger.info("{}总装报工成功",orderScheduling.getOrderNo());
                logger.info("{}总装报工成功",orderScheduling.getOrderNo());
            }else {
                if(StringUtils.isEmpty(orderScheduling.getSpareField2())){
                    orderScheduling.setSpareField2("1");
                    bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                }else{
                    if(Integer.valueOf(orderScheduling.getSpareField2())+1>=3) {
                        //累计报工异常超过3次
                        orderScheduling.setReport20("3");
                        orderScheduling.setSpareField2(String.valueOf(Integer.valueOf(orderScheduling.getSpareField2()) + 1));
                    }else{
                        orderScheduling.setSpareField2(String.valueOf(Integer.valueOf(orderScheduling.getSpareField2()) + 1));
                    }
                    bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                    if(status.equals("3"))
                        logger.info("{}总装报工因为网络原因,报工失败!",orderScheduling.getOrderNo());
                    else
                        logger.info("{}总装报工失败,原因:{}",orderScheduling.getOrderNo(),ev_meassage);
                }
            }
        }
    }
jcdm-ui/src/api/main/bs/tileMatchRules/tileMatchRules.js
@@ -42,3 +42,11 @@
    method: 'delete'
  })
}
export function setBarcode(param) {
  return request({
    url: '/da/tileMatchRules/barcode',
    method: 'get',
    params: param
  })
}
jcdm-ui/src/api/main/da/opcuaconfig/opcuaconfig.js
@@ -18,10 +18,11 @@
}
// æŸ¥è¯¢äº¤äº’信号配置详细
export function setBarcode(barcode,locationCode) {
export function setBarcode1(param) {
  return request({
    url: '/da/opcuaconfig/barcode/' + barcode+'/'+locationCode,
    method: 'get'
    url: '/da/opcuaconfig/barcode1',
    method: 'get',
    params: param
  })
}
jcdm-ui/src/api/main/da/tileMatchMiddleware/tileMatchMiddleware.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
import request from '@/utils/request'
// æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´åˆ—表
export function listTileMatchMiddleware(query) {
  return request({
    url: '/da/tileMatchMiddleware/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´è¯¦ç»†
export function getTileMatchMiddleware(id) {
  return request({
    url: '/da/tileMatchMiddleware/' + id,
    method: 'get'
  })
}
// æ–°å¢žæ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
export function addTileMatchMiddleware(data) {
  return request({
    url: '/da/tileMatchMiddleware',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
export function updateTileMatchMiddleware(data) {
  return request({
    url: '/da/tileMatchMiddleware',
    method: 'put',
    data: data
  })
}
// åˆ é™¤æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´
export function delTileMatchMiddleware(id) {
  return request({
    url: '/da/tileMatchMiddleware/' + id,
    method: 'delete'
  })
}
export function setBarcodeup(param) {
  return request({
    url: '/da/tileMatchMiddleware/barcodeup',
    method: 'get',
    params: param
  })
}
export function setBarcode(param) {
  return request({
    url: '/da/tileMatchMiddleware/barcode',
    method: 'get',
    params: param
  })
}
jcdm-ui/src/views/main/bs/orderScheduling/index.vue
@@ -62,20 +62,33 @@
        </el-form-item>
        <br/>
        <el-form-item label="合箱报工" prop="report10">
          <el-input
          <el-select
            v-model="queryParams.report10"
            placeholder="请输入合箱报工"
            clearable
            @keyup.enter.native="handleQuery"
          />
            @keyup.enter.native="handleQuery">
            <el-option
              v-for="dict in dict.type.workreportingstatus"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="总装报工" prop="report20">
          <el-input
          <el-select
            v-model="queryParams.report20"
            placeholder="请输入总装报工"
            clearable
            @keyup.enter.native="handleQuery"
          />
            @keyup.enter.native="handleQuery">
            <el-option
              v-for="dict in dict.type.workreportingstatus"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="CVT报工" prop="report30">
          <el-input
@@ -195,14 +208,23 @@
            </template>
          </el-table-column>
          <el-table-column label="合箱报工" align="center" prop="report10">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.workreportingstatus" :value="scope.row.report10"/>
            </template>
          </el-table-column>
          <el-table-column label="总装报工" align="center" prop="report20">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.workreportingstatus" :value="scope.row.report20"/>
            </template>
          </el-table-column>
          <el-table-column label="CVT报工" align="center" prop="report30">
          </el-table-column>
          <el-table-column label="报工异常" align="center" prop="report30">
          </el-table-column>
          <el-table-column label="合箱上线时间" align="center" prop="boxClosingOnlineTime" width="160">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.boxClosingOnlineTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@@ -321,7 +343,7 @@
export default {
  name: "OrderScheduling",
  dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'],
  dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type','workreportingstatus'],
  data() {
    return {
      // é®ç½©å±‚
jcdm-ui/src/views/main/cfkb/BalanceShaft/index.vue
@@ -3,16 +3,6 @@
    <div style="width: 100%">
      <el-card class="box-card" >
        <el-form :model="from" size="large" :inline="true" label-width="68px" @submit.native.prevent>
<!--          <el-form-item label="箱体码:" prop="scanObject1" >-->
<!--            <el-input-->
<!--              style="width: 350px"-->
<!--              v-model="from.scanObject1"-->
<!--              placeholder="请输入箱体码"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--              @input="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
          <el-form-item label-width="200" label="平衡轴码" :prop="from.scanObject2"  style="align-content: center">
            <input v-model="from.scanObject2"
                   ref="inputdata"
@@ -30,29 +20,6 @@
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="轴名称:" prop="axisName" >
            <el-select v-model="from.axisName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.axisname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="颈名称:" prop="neckName" >
            <el-select v-model="from.neckName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.neckname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
@@ -63,7 +30,6 @@
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
@@ -86,17 +52,11 @@
            <el-descriptions-item label="平衡轴码">
              <span>{{queryParams.scanObject2}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="轴名称">
              <span>{{queryParams.axisName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="颈名称">
              <span>{{queryParams.neckName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="瓦名称">
              <span>{{queryParams.tileName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="配瓦颜色">
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
              <span v-for="(word, index) in queryParams.words" :key="index" :style="{ backgroundColor: queryParams.colors[index],fontSize: '30px',}">{{ word }}</span>
            </el-descriptions-item>
          </el-descriptions>
          <el-divider></el-divider>
@@ -108,6 +68,7 @@
<script>
import VueQr from 'vue-qr'
import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules";
import {setBarcode} from "@/api/main/bs/tileMatchRules/tileMatchRules";
export default {
  name: "index",
  dicts: ['colour_hex','productseries','axisname','neckname','tilename'],
@@ -124,13 +85,12 @@
      from:{
        pageNum: 1,
        pageSize: 10,
        productSeries: null,
        //scanObject1: null,
        //scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: '',
        productSeries: '380Y',
        scanObject1: null,
        scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
        axisName: null,
        neckName: null,
        tileName: null,
        tileName: '平衡轴瓦',
        axisParameterNoPosition: null,
        neckParameterPosition: null,
        axisValue: null,
@@ -146,11 +106,12 @@
        pageSize: 10,
        productSeries: null,
        scanObject1: null,
        // scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: null,
        scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
        axisName: null,
        neckName: null,
        tileName: null,
        words: ['------', '------', ],
        colors: ['#FFFFFF', '#FFFFFF'],
        axisParameterNoPosition: null,
        neckParameterPosition: null,
        axisValue: null,
@@ -192,6 +153,14 @@
        this.scannerFlag = true
        console.log('条码:',this.from.scanObject2)
        //扫描完成
        if (typeof this.from.scanObject2 !== 'undefined') {
          console.log('条码:',this.from.scanObject2,'HOP040')
          setBarcode({barcode:this.from.scanObject2,locationCode:'HOP040'}).then(res =>{
            console.log('res',res)
            this.from.scanObject1=res
          })
        }
        this.handleQuery()
      }
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
@@ -199,9 +168,9 @@
      this.clear();
      if(this.from.scanObject1 !== null && this.from.scanObject2 !== null
        && this.from.axisName !== null && this.from.axisName !== ""
        && this.from.neckName !== null && this.from.neckName !== ""
        && this.from.tileName !== null && this.from.tileName !== ""
        // && this.from.axisName !== null && this.from.axisName !== ""
        // && this.from.neckName !== null && this.from.neckName !== ""
        // && this.from.tileName !== null && this.from.tileName !== ""
        && this.from.productSeries !== null && this.from.productSeries !== "")
      {
        this.axisValueextracted();
@@ -224,6 +193,7 @@
        }
      }
      else{
        console.log("搜索条件",this.from.scanObject1 ,this.from.scanObject2)
        const h = this.$createElement;
        this.$message({
          message: h('p',null, [
@@ -269,7 +239,14 @@
      }
      console.log(queryParams)
      listTileMatchRules(queryParams).then(response => {
        this.queryParams.tileColor = response.rows[0].tileColor;
        // this.queryParams.tileColor = response.rows[0].tileColor;
        this.queryParams.words= ['------', '------']
        this.queryParams.colors= ['#FFFFFF', '#FFFFFF']
        for (var i=0;i<response.rows.length;i++){
          this.queryParams.colors[i]=response.rows[i].tileColor;
          this.queryParams.words[i]=response.rows[i].tileName;
        }
        console.log('颜色:',response)
      });
    },
    clear(){
jcdm-ui/src/views/main/cfkb/connectingRod/index.vue
@@ -2,7 +2,7 @@
  <div class="app-container">
    <div style="width: 100%">
      <el-card class="box-card" >
        <el-form :model="from" ref="queryForm" :inline="true" >
        <el-form :model="from" size="large" :inline="true" label-width="68px" @submit.native.prevent>
          <el-form-item label="托盘码:" prop="scanObject1" >
            <el-input
              style="width: 350px"
@@ -13,14 +13,11 @@
              @input="handleQuery"
            />
          </el-form-item>
          <el-form-item label="连杆码:" prop="scanObject2" >
            <el-input
              style="width: 350px"
              v-model="from.scanObject2"
              placeholder="请输入连杆码"
              clearable
              @keyup.enter.native="handleQuery"
              @input="handleQuery"
          <el-form-item label-width="200" label="连杆码" :prop="from.scanObject2"  style="align-content: center">
            <input v-model="from.scanObject2"
                   ref="inputdata"
                   style="height: 39px; width: 300px"
                   placeholder="请输入连杆码"
            />
          </el-form-item>
        </el-form>
@@ -30,28 +27,6 @@
              <el-option
                v-for="dict in dict.type.productseries"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="轴名称:" prop="axisName" >
            <el-select v-model="from.axisName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.axisname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="颈名称:" prop="neckName" >
            <el-select v-model="from.neckName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.neckname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
@@ -83,23 +58,17 @@
            <el-descriptions-item label="机型">
              <span>{{queryParams.productSeries}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="箱体码">
            <el-descriptions-item label="曲轴码">
              <span>{{queryParams.scanObject1}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="曲轴码">
            <el-descriptions-item label="连杆码">
              <span>{{queryParams.scanObject2}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="轴名称">
              <span>{{queryParams.axisName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="颈名称">
              <span>{{queryParams.neckName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="瓦名称">
              <span>{{queryParams.tileName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="重量">
              <span>{{queryParams.weight}}</span>
            <el-descriptions-item label="连杆码">
              <span>{{queryParams.axisName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="配瓦颜色">
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
@@ -113,7 +82,8 @@
</template>
<script>
import VueQr from 'vue-qr'
import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules";
import {setBarcode} from "@/api/main/da/tileMatchMiddleware/tileMatchMiddleware";
import {listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules} from "@/api/main/bs/tileMatchRules/tileMatchRules";
export default {
  name: "index",
  dicts: ['colour_hex','productseries','axisname','neckname','tilename'],
@@ -122,6 +92,7 @@
  },
  data(){
    return{
      scannerFlag: false,
      loading: true,
      tileMatchKbList: [],
      qrCode: '',
@@ -129,13 +100,12 @@
      from:{
        pageNum: 1,
        pageSize: 10,
        productSeries: null,
        productSeries:'380Y',
        scanObject1: null,
        //scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: 'P0SQ0-041000-1002;T2312020675;DAABBA;S500003',
        scanObject2: null,
        axisName: null,
        neckName: null,
        tileName: null,
        tileName: '连杆瓦',
        axisParameterNoPosition: null,
        neckParameterPosition: null,
        axisValue: null,
@@ -151,7 +121,6 @@
        pageSize: 10,
        productSeries: null,
        scanObject1: null,
        // scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: null,
        axisName: null,
        neckName: null,
@@ -168,15 +137,55 @@
      },
    }
  },
  mounted() {
    this.setFocus()
    this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput)
  },
  beforeDestroy() {
    this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput)
  },
  methods:{
    refresh() {
      location.reload();
    },
    setFocus(){
      this.$nextTick(()=>{
        this.$refs.inputdata.focus()
      })
    },
    handleScannerInput(event){
      if (this.scannerFlag){
        this.from.scanObject2 = ''
        this.$refs.inputdata.value = ''
        this.scannerFlag = false
      }
      const input = event.target
      const inputValue = input.value
      this.from.scanObject2 = inputValue
      if (event.key === 'Enter'){
        this.scannerFlag = true
        //console.log('条码:',this.from.scanObject2)
        //扫描完成
        if (typeof this.from.scanObject2 !== 'undefined') {
          setBarcode({barcode:this.from.scanObject2,locationCode:'HOP040'}).then(res =>{
            console.log('res',res)
            this.queryParams.productSeries=res.sfcCode;
            this.queryParams.scanObject1=res.crankshaftNo;
            this.queryParams.axisName=res.cylinder;
            this.from.scanObject1=this.queryParams.scanObject1
            this.queryParams.tileName=this.from.tileName;
            this.queryParams.scanObject2=this.from.scanObject2;
            //this.from.scanObject1=res
          })
        }
        this.handleQuery()
      }
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.clear();
      if(this.from.scanObject1 !== null && this.from.scanObject2 !== null
        && this.from.axisName !== null && this.from.axisName !== ""
        && this.from.neckName !== null && this.from.neckName !== ""
        && this.from.tileName !== null && this.from.tileName !== ""
        && this.from.productSeries !== null && this.from.productSeries !== "")
      {
        this.axisValueextracted();
@@ -214,7 +223,7 @@
    // å–箱体码第三段为配瓦值
    axisValueextracted() {
      const parts1 = this.from.scanObject1.split(";");
      const parts1 = this.from.scanObject2.split(";");
      if (parts1.length >= 3) {
        //const axisValueextracted = parts1[2].substring(3,4);
        const axisValueextracted = parts1[2];
@@ -225,7 +234,7 @@
    //取曲轴码第三段为配瓦值
    neckValueextracted() {
      const parts2 = this.from.scanObject2.split(";");
      const parts2 = this.from.scanObject1.split(";");
      if (parts2.length >= 3) {
        //const neckValueextracted = parts2[2].substring(3,4);
        const neckValueextracted = parts2[2];
@@ -237,12 +246,12 @@
      let queryParams = {
        productSeries : this.queryParams.productSeries,
        axisName : this.queryParams.axisName,
        neckName : this.queryParams.neckName,
        // neckName : this.queryParams.neckName,
        tileName : this.queryParams.tileName,
        axisValue: this.queryParams.axisValue,
        neckValue: this.queryParams.neckValue,
      }
      console.log(queryParams)
      console.log('参数:',queryParams)
      listTileMatchRules(queryParams).then(response => {
        this.queryParams.tileColor = response.rows[0].tileColor;
      });
@@ -253,7 +262,7 @@
    },
    insetFromToQueryParams(){
      this.queryParams.productSeries=this.from.productSeries;
      this.queryParams.axisName=this.from.axisName;
      //this.queryParams.axisName=this.from.axisName;
      this.queryParams.neckName=this.from.neckName;
      this.queryParams.tileName=this.from.tileName;
      this.queryParams.scanObject1=this.from.scanObject1;
jcdm-ui/src/views/main/cfkb/connectingRodUp/index.vue
@@ -57,7 +57,7 @@
              <span>{{queryParams.scanObject2}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="结果">
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.words}}</span>
            </el-descriptions-item>
          </el-descriptions>
          <el-divider></el-divider>
@@ -70,6 +70,7 @@
import VueQr from 'vue-qr'
import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules";
import {listStationConf,getIp} from "@/api/main/sc/stationConf";
import {setBarcodeup} from "@/api/main/da/tileMatchMiddleware/tileMatchMiddleware";
export default {
  name: "index",
  dicts: ['colour_hex','productseries','axisname','neckname','tilename'],
@@ -91,7 +92,7 @@
        productSeries: null,
        scanObject1: null,
        //scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: "",
        scanObject2: null,
        axisName: null,
        neckName: null,
        tileName: null,
@@ -119,6 +120,7 @@
        neckParameterPosition: null,
        axisValue: null,
        neckValue: null,
        words:"",
        tileColor: null,
        createUser: null,
        updateUser: null,
@@ -156,8 +158,28 @@
      this.from.scanObject2 = inputValue
      if (event.key === 'Enter'){
        this.scannerFlag = true
        console.log('条码:',this.from.scanObject2)
        //扫描完成
        if (typeof this.from.scanObject2 !== 'undefined'&& typeof this.locationCode !== 'undefined' ) {
          setBarcodeup({barcode:this.from.scanObject2,locationCode:this.locationCode}).then(res => {
            if (res===''){
              this.$message({
                message:res.msg,
                type:'warning'
              })
            }else {
              this.$message({
                message:'操作成功',
                type:'success'
              })
              console.log('返回:',res)
              this.queryParams.productSeries=res.sfcCode;
              this.queryParams.scanObject1=res.connectingRodNo;
              this.queryParams.scanObject2=res.PalletNo;
              this.queryParams.words="扫码成功";
              this.queryParams.tileColor='#00FF00';
            }
          })
        }
      }
    },
jcdm-ui/src/views/main/cfkb/crankshaft/index.vue
@@ -37,28 +37,28 @@
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="轴名称:" prop="axisName" >
            <el-select v-model="from.axisName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.axisname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
          <el-form-item  label="颈名称:" prop="neckName" >
            <el-select v-model="from.neckName" placeholder="" clearable style="width: 125px">
              <el-option
                v-for="dict in dict.type.neckname"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
                @keyup.enter.native="handleQuery"
              />
            </el-select>
          </el-form-item>
<!--          <el-form-item  label="轴名称:" prop="axisName" >-->
<!--            <el-select v-model="from.axisName" placeholder="" clearable style="width: 125px">-->
<!--              <el-option-->
<!--                v-for="dict in dict.type.axisname"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--                @keyup.enter.native="handleQuery"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
<!--          <el-form-item  label="颈名称:" prop="neckName" >-->
<!--            <el-select v-model="from.neckName" placeholder="" clearable style="width: 125px">-->
<!--              <el-option-->
<!--                v-for="dict in dict.type.neckname"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--                @keyup.enter.native="handleQuery"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item  label="瓦名称:" prop="tileName" >
            <el-select v-model="from.tileName" placeholder="" clearable style="width: 125px" >
              <el-option
@@ -89,20 +89,20 @@
            <el-descriptions-item label="曲轴码">
              <span>{{queryParams.scanObject2}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="轴名称">
              <span>{{queryParams.axisName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="颈名称">
              <span>{{queryParams.neckName}}</span>
            </el-descriptions-item>
<!--            <el-descriptions-item label="轴名称">-->
<!--              <span>{{queryParams.axisName}}</span>-->
<!--            </el-descriptions-item>-->
<!--            <el-descriptions-item label="颈名称">-->
<!--              <span>{{queryParams.neckName}}</span>-->
<!--            </el-descriptions-item>-->
            <el-descriptions-item label="瓦名称">
              <span>{{queryParams.tileName}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="重量">
              <span>{{queryParams.weight}}</span>
            </el-descriptions-item>
<!--            <el-descriptions-item label="重量">-->
<!--              <span>{{queryParams.weight}}</span>-->
<!--            </el-descriptions-item>-->
            <el-descriptions-item label="配瓦颜色">
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
              <span v-for="(word, index) in queryParams.words" :key="index" :style="{ backgroundColor: queryParams.colors[index],fontSize: '30px',}">{{ word }}</span>
            </el-descriptions-item>
          </el-descriptions>
          <el-divider></el-divider>
@@ -133,13 +133,14 @@
      from:{
        pageNum: 1,
        pageSize: 10,
        productSeries: null,
        //scanObject1: null,
        productSeries: '380Y',
        // scanObject1: 'ONYL01FZ0120003023123;1206B0026;D2212BA',
        // scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
        scanObject1: null,
        scanObject2: null,
        axisName: null,
        neckName: null,
        tileName: null,
        tileName: '主轴瓦',
        axisParameterNoPosition: null,
        neckParameterPosition: null,
        axisValue: null,
@@ -164,6 +165,8 @@
        axisValue: null,
        neckValue: null,
        tileColor: null,
        words: ['------', '------', '------', '------'],
        colors: ['#FFFFFF', '#FFFFFF', '#FFFFFF', '#FFFFFF'],
        createUser: null,
        updateUser: null,
        state: null,
@@ -223,9 +226,9 @@
      this.clear();
      if(this.from.scanObject1 !== null && this.from.scanObject2 !== null
        && this.from.axisName !== null && this.from.axisName !== ""
        && this.from.neckName !== null && this.from.neckName !== ""
        && this.from.tileName !== null && this.from.tileName !== ""
        // && this.from.axisName !== null && this.from.axisName !== ""
        // && this.from.neckName !== null && this.from.neckName !== ""
        // && this.from.tileName !== null && this.from.tileName !== ""
        && this.from.productSeries !== null && this.from.productSeries !== "")
      {
        this.axisValueextracted();
@@ -293,7 +296,13 @@
      }
      console.log(queryParams)
      listTileMatchRules(queryParams).then(response => {
        this.queryParams.tileColor = response.rows[0].tileColor;
        this.queryParams.words= ['------', '------', '------', '------']
        this.queryParams.colors= ['#FFFFFF', '#FFFFFF', '#FFFFFF', '#FFFFFF']
        for (var i=0;i<response.rows.length;i++){
          this.queryParams.colors[i]=response.rows[i].tileColor;
          this.queryParams.words[i]=response.rows[i].tileName;
        }
        console.log('颜色:',response)
      });
    },
    clear(){
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs1.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,83 @@
<template>
  <el-input
    Î¿nkeyup="this.value=this.value.replace(/\D|/g,'')"
    clearable
    maxlength="116"
    v-model="codeValue"
    placeholder="请输入条形码"
  />
</template>
<script>
export default {
  data(){
    return {
      codeValue: "",
      code: "",
      lastTime: "",
      nextTime: "",
      lastCode: "",
      nextCode: "",
      dtmainId: "",
    };
  },
  created() {
    window.document.onkeypress = (e) => {
      if (window.event) {
        // IE
        this.nextCode = e.keyCode;
      } else if (e.which) {
        // Netscape/Firefox/Opera
        this.nextCode = e.which;
      }
      if (e.which === 13) {
        // é”®ç›˜å›žè½¦äº‹ä»¶
        if (this.code.length < 3) return; // æ‰«ç æžªçš„速度很快,手动输入的时间不会让code的长度大于2,所以这里不会对扫码枪有效
        //console.log("扫码结束。");
        //console.log("条形码:", this.code);
        this.parseQRCode(this.code); // èŽ·å–到扫码枪输入的内容,做别的操作
        this.lastCode = "";
        this.lastTime = "";
        return;
      }
      this.nextTime = new Date().getTime();
      if (!this.lastTime && !this.lastCode) {
        this.code = ""; // æ¸…空上次的条形码
        this.code += e.key;
        //console.log("扫码开始---", this.code);
      }
      if (this.lastCode && this.lastTime && this.nextTime - this.lastTime > 500) {
        // å½“扫码前有keypress事件时,防止首字缺失
        this.code = e.key;
        //console.log("防止首字缺失。。。", this.code);
      } else if (this.lastCode && this.lastTime) {
        this.code += e.key;
        //console.log("扫码中。。。", this.code);
      }
      this.lastCode = this.nextCode;
      this.lastTime = this.nextTime;
    };
  },
  methods: {
    parseQRCode(code) {
      // if (code.length === 16) {
      //   console.log(code);
      // } else if (code.length === 0) {
      //   console.log("请输入条码!");
      // } else {
      //   alert("条码不合法:" + code);
      // }
      this.codeValue = code;
      // å‘送网络请求
    },
  },
}
</script>
<style scoped lang="scss">
</style>
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs2.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
<template>
  <div style="height: 100%;width: 100%">
    <el-card class="box-card">
      <el-form size="large" :inline="true" label-width="68px" @submit.native.prevent>
        <el-form-item label-width="200" label="箱体码" :prop="barcode"  style="align-content: center">
          <input v-model="barcode"
               ref="inputdata"
               style="height: 39px; width: 300px"
               placeholder="请扫描箱体码"
          />
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>
<script>
export default {
  data(){
    return {
      scannerFlag: false,
      barcode: "",
    };
  },
  mounted() {
    this.setFocus()
    this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput)
  },
  beforeDestroy() {
    this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput)
  },
  methods: {
    refresh() {
      location.reload();
    },
    setFocus(){
      this.$nextTick(()=>{
        this.$refs.inputdata.focus()
      })
    },
    handleScannerInput(event){
      if (this.scannerFlag){
        this.barcode = ''
        this.$refs.inputdata.value = ''
        this.scannerFlag = false
      }
      const input = event.target
      const inputValue = input.value
      this.barcode = inputValue
      if (event.key === 'Enter'){
        this.scannerFlag = true
        console.log('条码:',this.barcode)
        //扫描完成
      }
    },
  },
}
</script>
<style scoped lang="scss">
</style>
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs3.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
<!--在Vue中,你可以使用v-model来绑定多个输入字段到同一个数据模型的不同属性上。以下是一个简单的例子,展示了如何连续扫描多个属性的条码:-->
<template>
  <div>
    <input v-model="scannedCode.partNumber" @input="handleScan" placeholder="Part Number">
    <input v-model="scannedCode.serialNumber" @input="handleScan" placeholder="Serial Number">
    <input v-model="scannedCode.batchCode" @input="handleScan" placeholder="Batch Code">
  </div>
</template>
<script>
export default {
  data() {
    return {
      scannedCode: {
        partNumber: '',
        serialNumber: '',
        batchCode: ''
      }
    };
  },
  methods: {
    handleScan() {
      // æ‰«æå¤„理逻辑
      console.log('Scanned code:', this.scannedCode);
      // æ ¹æ®å®žé™…需求,这里可以添加扫描处理逻辑,例如发送数据到服务器等
    }
  }
};
</script>
<!--在这个例子中,我们有三个输入字段绑定到scannedCode对象的不同属性上。每当用户输入时,handleScan方法会被调用,你可以在这个方法中添加扫描处理的逻辑。这个例子假设扫描处理只是简单地在控制台输出扫描的代码信息;在实际应用中,你可能需要进行更复杂的处理,比如验证数据或发送到服务器。-->
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs5.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
<template>
  <div>
    <span v-for="(word, index) in words" :key="index" :style="{ color: colors[index] }">{{ word }}</span>
  </div>
</template>
<script>
export default {
  data() {
    return {
      words: ['一档   .', '二档  .', '三档  .', '四档  .'],
      colors: ['#FF0000', '#00FF00', '#0000FF', '#FFFF00']
    };
  }
};
</script>
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs6.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
<template>
  <el-form size="large" :inline="true" label-width="68px" @submit.native.prevent>
    <el-form-item v-for="(item, index) in scanList"
                  :key="index"
                  label-width="200"
                  label="箱体码"
                  :prop="item.value"
                  style="align-content: center"
                  @focus="handleFocus(index)">
      <input v-model="item.value"
             ref="scanInput${index}"
             style="height: 39px; width: 300px"
             placeholder="请扫描箱体码"
      />
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  data() {
    return {
      scannerFlag: false,
      scanList: [
        { value: '' },
        { value: '' },
        // å¯ä»¥æ ¹æ®éœ€è¦å¢žåŠ æ›´å¤šçš„项
      ],
      focusedIndex: 0, // å½“前聚焦的input索引
    };
  },
  mounted() {
    this.focusScanInput(this.focusedIndex);
    this.setFocus()
    this.$refs.scanInput$index.addEventListener('keydown',this.handleScannerInput)
  },
  beforeDestroy() {
    this.$refs.scanInput$index.removeEventListener('keydown',this.handleScannerInput)
  },
  watch: {
    // ç›‘听scanList的变化,如果发现焦点索引超出范围,则自动聚焦到最后一个输入框
    scanList: {
      deep: true,
      handler(newList) {
        if (this.focusedIndex >= newList.length) {
          this.focusedIndex = newList.length - 1;
          this.$nextTick(() => {
            this.focusScanInput(this.focusedIndex);
          });
        }
      },
    },
  },
  methods: {
    refresh() {
      location.reload();
    },
    setFocus(){
      this.$nextTick(()=>{
        this.$refs.inputdata.focus()
      })
    },
    handleScannerInput(event){
      if (this.scannerFlag){
        this.barcode = ''
        this.$refs.inputdata.value = ''
        this.scannerFlag = false
      }
      const input = event.target
      const inputValue = input.value
      this.item.value = inputValue
      if (event.key === 'Enter'){
        this.scannerFlag = true
        console.log('条码:',this.item.value)
        //扫描完成
      }
    },
    handleFocus(index) {
      this.focusedIndex = index;
    },
    focusScanInput(index) {
      this.$refs[`scanInput${index}`][0].focus();
    },
  },
};
</script>
<!--在这个例子中,我们使用了一个数组scanList来动态生成多个输入框。通过handleFocus方法更新当前聚焦的输入框索引,
并通过watch来监听scanList的变化,以确保如果新添加的输入框超出了原有的索引范围,
我们可以自动聚焦到最后一个输入框上。focusScanInput方法用于设置真实DOM的焦点。-->
jcdm-ui/src/views/main/cfkb/crankshaftUp/cs7.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,93 @@
<template>
  <div style="height: 100%;width: 100%">
    <el-card class="box-card">
      <el-form size="large" :inline="true" label-width="68px" @submit.native.prevent>
        <el-form-item label-width="200" label="箱体码" :prop="barcode1"  style="align-content: center">
          <input v-model="barcode1"
                 ref="inputdata1"
                 style="height: 39px; width: 300px"
                 placeholder="请扫描箱体码"
          />
        </el-form-item>
        <el-form-item label-width="200" label="宝码" :prop="barcode2"  style="align-content: center">
          <input v-model="barcode2"
                 ref="inputdata2"
                 style="height: 39px; width: 300px"
                 placeholder="请扫描宝码"
          />
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>
<script>
export default {
  data(){
    return {
      scannerFlag: false,
      barcode1: "",
      barcode2: "",
    };
  },
  mounted() {
    this.setFocus()
    this.$refs.inputdata1.addEventListener('keydown',this.handleScannerInput1)
    this.$refs.inputdata2.addEventListener('keydown',this.handleScannerInput2)
  },
  beforeDestroy() {
    this.$refs.inputdata1.removeEventListener('keydown',this.handleScannerInput1)
    this.$refs.inputdata2.removeEventListener('keydown',this.handleScannerInput2)
  },
  methods: {
    refresh() {
      location.reload();
    },
    setFocus(){
      this.$nextTick(()=>{
        this.$refs.inputdata1.focus()
      })
    },
    handleScannerInput1(event){
      if (this.scannerFlag){
        this.barcode1 = ''
        this.$refs.inputdata1.value = ''
        this.scannerFlag = false
      }
      const input = event.target
      const inputValue = input.value
      this.barcode1 = inputValue
      if (event.key === 'Enter'){
        this.scannerFlag = true
        console.log('条码1:',this.barcode1)
        this.$refs.inputdata2.focus();
        //扫描完成
      }
    },
    handleScannerInput2(event){
      if (this.scannerFlag){
        this.barcode2 = ''
        this.$refs.inputdata2.value = ''
        this.scannerFlag = false
      }
      const input = event.target
      const inputValue = input.value
      this.barcode2 = inputValue
      if (event.key === 'Enter'){
        this.scannerFlag = true
        console.log('条码2:',this.barcode2)
        this.$refs.inputdata1.focus();
        //扫描完成
      }
    },
  },
}
</script>
<style scoped lang="scss">
</style>
jcdm-ui/src/views/main/cfkb/crankshaftUp/index.vue
@@ -57,7 +57,7 @@
              <span>{{queryParams.scanObject2}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="结果">
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.words}}</span>
            </el-descriptions-item>
          </el-descriptions>
          <el-divider></el-divider>
@@ -70,6 +70,7 @@
import VueQr from 'vue-qr'
import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules";
import {listStationConf,getIp} from "@/api/main/sc/stationConf";
import {setBarcode1} from "@/api/main/da/opcuaconfig/opcuaconfig";
export default {
  name: "index",
  dicts: ['colour_hex','productseries','axisname','neckname','tilename'],
@@ -119,6 +120,7 @@
        neckParameterPosition: null,
        axisValue: null,
        neckValue: null,
        words:"",
        tileColor: null,
        createUser: null,
        updateUser: null,
@@ -153,11 +155,41 @@
      }
      const input = event.target
      const inputValue = input.value
      this.from.scanObject2 = inputValue
      //this.from.scanObject2 = inputValue
      if (event.key === 'Enter'){
        this.scannerFlag = true
        console.log('条码:',this.from.scanObject2)
        //扫描完成
        this.from.scanObject2 = inputValue
        //console.log('条码:',this.from.scanObject2,this.locationCode)
        if (typeof this.from.scanObject2 !== 'undefined'&& typeof this.locationCode !== 'undefined' ) {
          console.log('条码:',this.from.scanObject2,this.locationCode)
          setBarcode1({barcode:this.from.scanObject2,locationCode:this.locationCode}).then(res => {
            if (res.data===500){
              this.$message({
                message:res.msg,
                type:'warning'
              })
            }else {
              this.$message({
                message:'操作成功',
                type:'success'
              })
              console.log('返回:',res)
              this.queryParams.productSeries=res.sfcCode
              this.queryParams.scanObject1=res.paramValue
              this.queryParams.scanObject2=this.from.scanObject2
              this.queryParams.words="扫码成功";
              this.queryParams.tileColor='#00FF00';
            }
          })
        }
        //setBarcode({barcode:'1111',locationCode:'555555'})
        // //扫描完成
        // if(this.form.scanObject2 !== null && this.form.scanObject2 !== undefined){
        //   console.log('条码:',this.from.scanObject2,this.locationCode)
        //   //setBarcode(this.form.scanObject2,this.locationCode)
        // }
      }
    },
jcdm-ui/src/views/main/cfkb/tileMatchKb/index.vue
@@ -144,7 +144,8 @@
              <span>{{queryParams.weight}}</span>
            </el-descriptions-item>
            <el-descriptions-item label="配瓦颜色">
              <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>
<!--          <span  style="color: #FFFFFF;"  :style="{ backgroundColor: queryParams.tileColor }">{{queryParams.tileColor}}</span>-->
              <span v-for="(word, index) in queryParams.words" :key="index" :style="{ backgroundColor: queryParams.colors[index],fontSize: '30px',}">{{ word }}</span>
            </el-descriptions-item>
          </el-descriptions>
          <el-divider></el-divider>
@@ -173,8 +174,8 @@
        pageSize: 10,
        productSeries: null,
        //scanObject1: null,
        scanObject1: 'P0SQ0-01FZ01-1000;T231224116;DBBBBA',
        scanObject2: 'P0SQ0-041000-1002;T2312020675;DAABBA;S500003',
        scanObject1: 'ONYL01FZ0120003023123;1206B0026;D2212BA',
        scanObject2: 'P0NYK0410001000;T231107031;D2222232;S500003',
        axisName: null,
        neckName: null,
        tileName: null,
@@ -202,7 +203,9 @@
        neckParameterPosition: null,
        axisValue: null,
        neckValue: null,
        tileColor: null,
        tileColor: "",
        words: ['一档   .', '二档  .', '三档  .', '四档  .'],
        colors: ['#FFFFFF', '#FFFFFF', '#FFFFFF', '#FFFFFF'],
        createUser: null,
        updateUser: null,
        state: null,
@@ -216,9 +219,9 @@
      this.clear();
      if(this.from.scanObject1 !== null && this.from.scanObject2 !== null
        && this.from.axisName !== null && this.from.axisName !== ""
        && this.from.neckName !== null && this.from.neckName !== ""
        && this.from.tileName !== null && this.from.tileName !== ""
        // && this.from.axisName !== null && this.from.axisName !== ""
        // && this.from.neckName !== null && this.from.neckName !== ""
        // && this.from.tileName !== null && this.from.tileName !== ""
        && this.from.productSeries !== null && this.from.productSeries !== "")
      {
        this.axisValueextracted();
@@ -286,7 +289,13 @@
      }
      console.log(queryParams)
      listTileMatchRules(queryParams).then(response => {
        this.queryParams.tileColor = response.rows[0].tileColor;
        this.queryParams.words= ['------', '------', '------', '------']
        this.queryParams.colors= ['#FFFFFF', '#FFFFFF', '#FFFFFF', '#FFFFFF']
        for (var i=0;i<response.rows.length;i++){
          this.queryParams.colors[i]=response.rows[i].tileColor;
          this.queryParams.words[i]=response.rows[i].tileName;
        }
        console.log('颜色:',response)
      });
    },
    clear(){
jcdm-ui/src/views/main/da/tileMatchMiddleware/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,336 @@
<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="产品SN号" prop="sfcCode">
            <el-input
              v-model="queryParams.sfcCode"
              placeholder="请输入产品SN号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="托盘号" prop="palletNo">
            <el-input
              v-model="queryParams.palletNo"
              placeholder="请输入托盘号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="曲轴码" prop="crankshaftNo">
            <el-input
              v-model="queryParams.crankshaftNo"
              placeholder="请输入曲轴码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="状态" prop="state">
            <el-input
              v-model="queryParams.state"
              placeholder="请输入状态"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="连杆码" prop="connectingrodNo">
            <el-input
              v-model="queryParams.connectingrodNo"
              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:tileMatchMiddleware: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:tileMatchMiddleware: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:tileMatchMiddleware: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:tileMatchMiddleware:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="tileMatchMiddlewareList" @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="产品SN号" align="center" prop="sfcCode">
          </el-table-column>
          <el-table-column label="托盘号" align="center" prop="palletNo">
          </el-table-column>
          <el-table-column label="曲轴码" align="center" prop="crankshaftNo">
          </el-table-column>
          <el-table-column label="状态" align="center" prop="state">
          </el-table-column>
          <el-table-column label="备注" align="center" prop="remarks">
          </el-table-column>
          <el-table-column label="连杆码" align="center" prop="connectingrodNo">
          </el-table-column>
          <el-table-column label="气缸编号" align="center" prop="cylinder">
          </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:tileMatchMiddleware:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['da:tileMatchMiddleware: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="产品SN号" prop="sfcCode">
          <el-input v-model="form.sfcCode" placeholder="请输入产品SN号" />
        </el-form-item>
        <el-form-item label="托盘号" prop="palletNo">
          <el-input v-model="form.palletNo" placeholder="请输入托盘号" />
        </el-form-item>
        <el-form-item label="曲轴码" prop="crankshaftNo">
          <el-input v-model="form.crankshaftNo" placeholder="请输入曲轴码" />
        </el-form-item>
        <el-form-item label="状态" prop="state">
          <el-input v-model="form.state" 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="connectingrodNo">
          <el-input v-model="form.connectingrodNo" placeholder="请输入连杆码" />
        </el-form-item>
        <el-form-item label="气缸编号" prop="cylinder">
          <el-input v-model="form.cylinder" 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 { listTileMatchMiddleware, getTileMatchMiddleware, delTileMatchMiddleware, addTileMatchMiddleware, updateTileMatchMiddleware } from "@/api/main/da/tileMatchMiddleware/tileMatchMiddleware";
export default {
  name: "TileMatchMiddleware",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´è¡¨æ ¼æ•°æ®
      tileMatchMiddlewareList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        sfcCode: null,
        palletNo: null,
        crankshaftNo: null,
        state: null,
        remarks: null,
        connectingrodNo: null,
        cylinder: null
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "ID不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢æ´»å¡žè¿žæ†é…ç“¦ä¸­é—´åˆ—表 */
    getList() {
      this.loading = true;
      listTileMatchMiddleware(this.queryParams).then(response => {
        this.tileMatchMiddlewareList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        sfcCode: null,
        palletNo: null,
        crankshaftNo: null,
        state: null,
        remarks: null,
        connectingrodNo: null,
        cylinder: 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
      getTileMatchMiddleware(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) {
            updateTileMatchMiddleware(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addTileMatchMiddleware(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 delTileMatchMiddleware(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('da/tileMatchMiddleware/export', {
        ...this.queryParams
      }, `tileMatchMiddleware_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>