admin
2024-01-08 f1836e2107bdb13687dddb94de72b91efb49a393
Merge remote-tracking branch 'origin/master'
已修改1个文件
已添加16个文件
1992 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/controller/BsBeatSettingController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/domain/BsBeatSetting.java 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/mapper/BsBeatSettingMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/service/IBsBeatSettingService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/service/impl/BsBeatSettingServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/domain/ScStationConf.java 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/mapper/ScStationConfMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/IScStationConfService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/impl/ScStationConfServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/beatSetting/BsBeatSettingMapper.xml 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/sc/stationConf/ScStationConfMapper.xml 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/beatSetting/beatSetting.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/sc/stationConf.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/beatSetting/index.vue 336 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/em/equipmentArchives/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/sc/stationConf/index.vue 342 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/controller/BsBeatSettingController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.bs.beatSetting.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jcdm.common.annotation.Log;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting;
import com.jcdm.main.bs.beatSetting.service.IBsBeatSettingService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * èŠ‚拍设置Controller
 *
 * @author Yi
 * @date 2024-01-05
 */
@RestController
@RequestMapping("/bs/beatSetting")
public class BsBeatSettingController extends BaseController
{
    @Autowired
    private IBsBeatSettingService bsBeatSettingService;
    /**
     * æŸ¥è¯¢èŠ‚拍设置列表
     */
    @PreAuthorize("@ss.hasPermi('bs:beatSetting:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsBeatSetting bsBeatSetting)
    {
        startPage();
        List<BsBeatSetting> list = bsBeatSettingService.selectBsBeatSettingList(bsBeatSetting);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºèŠ‚拍设置列表
     */
    @PreAuthorize("@ss.hasPermi('bs:beatSetting:export')")
    @Log(title = "节拍设置", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsBeatSetting bsBeatSetting)
    {
        List<BsBeatSetting> list = bsBeatSettingService.selectBsBeatSettingList(bsBeatSetting);
        ExcelUtil<BsBeatSetting> util = new ExcelUtil<BsBeatSetting>(BsBeatSetting.class);
        util.exportExcel(response, list, "节拍设置数据");
    }
    /**
     * èŽ·å–节拍设置详细信息
     */
    @PreAuthorize("@ss.hasPermi('bs:beatSetting:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bsBeatSettingService.selectBsBeatSettingById(id));
    }
    /**
     * æ–°å¢žèŠ‚拍设置
     */
    @PreAuthorize("@ss.hasPermi('bs:beatSetting:add')")
    @Log(title = "节拍设置", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsBeatSetting bsBeatSetting)
    {
        return toAjax(bsBeatSettingService.insertBsBeatSetting(bsBeatSetting));
    }
    /**
     * ä¿®æ”¹èŠ‚拍设置
     */
    @PreAuthorize("@ss.hasPermi('bs:beatSetting:edit')")
    @Log(title = "节拍设置", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsBeatSetting bsBeatSetting)
    {
        return toAjax(bsBeatSettingService.updateBsBeatSetting(bsBeatSetting));
    }
    /**
     * åˆ é™¤èŠ‚拍设置
     */
    @PreAuthorize("@ss.hasPermi('bs:beatSetting:remove')")
    @Log(title = "节拍设置", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(bsBeatSettingService.deleteBsBeatSettingByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/domain/BsBeatSetting.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,152 @@
package com.jcdm.main.bs.beatSetting.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;
/**
 * èŠ‚拍设置对象 bs_beat_setting
 *
 * @author Yi
 * @date 2024-01-05
 */
public class BsBeatSetting extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** äº§å“ç¼–码 */
    @Excel(name = "产品编码")
    private String productCode;
    /** äº§å“åç§° */
    @Excel(name = "产品名称")
    private String productName;
    /** èŠ‚拍 */
    @Excel(name = "节拍")
    private String beat;
    /** é¢„留字段1 */
    @Excel(name = "预留字段1")
    private String spareField1;
    /** é¢„留字段2 */
    @Excel(name = "预留字段2")
    private String spareField2;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ”¹ç”¨æˆ· */
    @Excel(name = "更改用户")
    private String updateUser;
    /** æ•°æ®æ¥æº */
    @Excel(name = "数据来源")
    private String dataSource;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }
    public String getProductCode()
    {
        return productCode;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }
    public String getProductName()
    {
        return productName;
    }
    public void setBeat(String beat)
    {
        this.beat = beat;
    }
    public String getBeat()
    {
        return beat;
    }
    public void setSpareField1(String spareField1)
    {
        this.spareField1 = spareField1;
    }
    public String getSpareField1()
    {
        return spareField1;
    }
    public void setSpareField2(String spareField2)
    {
        this.spareField2 = spareField2;
    }
    public String getSpareField2()
    {
        return spareField2;
    }
    public void setCreateUser(String createUser)
    {
        this.createUser = createUser;
    }
    public String getCreateUser()
    {
        return createUser;
    }
    public void setUpdateUser(String updateUser)
    {
        this.updateUser = updateUser;
    }
    public String getUpdateUser()
    {
        return updateUser;
    }
    public void setDataSource(String dataSource)
    {
        this.dataSource = dataSource;
    }
    public String getDataSource()
    {
        return dataSource;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productCode", getProductCode())
            .append("productName", getProductName())
            .append("beat", getBeat())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("remark", getRemark())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("dataSource", getDataSource())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/mapper/BsBeatSettingMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.beatSetting.mapper;
import java.util.List;
import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting;
/**
 * èŠ‚拍设置Mapper接口
 *
 * @author Yi
 * @date 2024-01-05
 */
public interface BsBeatSettingMapper
{
    /**
     * æŸ¥è¯¢èŠ‚拍设置
     *
     * @param id èŠ‚拍设置主键
     * @return èŠ‚拍设置
     */
    public BsBeatSetting selectBsBeatSettingById(Long id);
    /**
     * æŸ¥è¯¢èŠ‚拍设置列表
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return èŠ‚拍设置集合
     */
    public List<BsBeatSetting> selectBsBeatSettingList(BsBeatSetting bsBeatSetting);
    /**
     * æ–°å¢žèŠ‚拍设置
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return ç»“æžœ
     */
    public int insertBsBeatSetting(BsBeatSetting bsBeatSetting);
    /**
     * ä¿®æ”¹èŠ‚拍设置
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return ç»“æžœ
     */
    public int updateBsBeatSetting(BsBeatSetting bsBeatSetting);
    /**
     * åˆ é™¤èŠ‚拍设置
     *
     * @param id èŠ‚拍设置主键
     * @return ç»“æžœ
     */
    public int deleteBsBeatSettingById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤èŠ‚拍设置
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsBeatSettingByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/service/IBsBeatSettingService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.beatSetting.service;
import java.util.List;
import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting;
/**
 * èŠ‚拍设置Service接口
 *
 * @author Yi
 * @date 2024-01-05
 */
public interface IBsBeatSettingService
{
    /**
     * æŸ¥è¯¢èŠ‚拍设置
     *
     * @param id èŠ‚拍设置主键
     * @return èŠ‚拍设置
     */
    public BsBeatSetting selectBsBeatSettingById(Long id);
    /**
     * æŸ¥è¯¢èŠ‚拍设置列表
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return èŠ‚拍设置集合
     */
    public List<BsBeatSetting> selectBsBeatSettingList(BsBeatSetting bsBeatSetting);
    /**
     * æ–°å¢žèŠ‚拍设置
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return ç»“æžœ
     */
    public int insertBsBeatSetting(BsBeatSetting bsBeatSetting);
    /**
     * ä¿®æ”¹èŠ‚拍设置
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return ç»“æžœ
     */
    public int updateBsBeatSetting(BsBeatSetting bsBeatSetting);
    /**
     * æ‰¹é‡åˆ é™¤èŠ‚拍设置
     *
     * @param ids éœ€è¦åˆ é™¤çš„节拍设置主键集合
     * @return ç»“æžœ
     */
    public int deleteBsBeatSettingByIds(Long[] ids);
    /**
     * åˆ é™¤èŠ‚拍设置信息
     *
     * @param id èŠ‚拍设置主键
     * @return ç»“æžœ
     */
    public int deleteBsBeatSettingById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/bs/beatSetting/service/impl/BsBeatSettingServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.bs.beatSetting.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.bs.beatSetting.mapper.BsBeatSettingMapper;
import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting;
import com.jcdm.main.bs.beatSetting.service.IBsBeatSettingService;
/**
 * èŠ‚拍设置Service业务层处理
 *
 * @author Yi
 * @date 2024-01-05
 */
@Service
public class BsBeatSettingServiceImpl implements IBsBeatSettingService
{
    @Autowired
    private BsBeatSettingMapper bsBeatSettingMapper;
    /**
     * æŸ¥è¯¢èŠ‚拍设置
     *
     * @param id èŠ‚拍设置主键
     * @return èŠ‚拍设置
     */
    @Override
    public BsBeatSetting selectBsBeatSettingById(Long id)
    {
        return bsBeatSettingMapper.selectBsBeatSettingById(id);
    }
    /**
     * æŸ¥è¯¢èŠ‚拍设置列表
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return èŠ‚拍设置
     */
    @Override
    public List<BsBeatSetting> selectBsBeatSettingList(BsBeatSetting bsBeatSetting)
    {
        return bsBeatSettingMapper.selectBsBeatSettingList(bsBeatSetting);
    }
    /**
     * æ–°å¢žèŠ‚拍设置
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return ç»“æžœ
     */
    @Override
    public int insertBsBeatSetting(BsBeatSetting bsBeatSetting)
    {
        bsBeatSetting.setCreateTime(DateUtils.getNowDate());
        return bsBeatSettingMapper.insertBsBeatSetting(bsBeatSetting);
    }
    /**
     * ä¿®æ”¹èŠ‚拍设置
     *
     * @param bsBeatSetting èŠ‚拍设置
     * @return ç»“æžœ
     */
    @Override
    public int updateBsBeatSetting(BsBeatSetting bsBeatSetting)
    {
        bsBeatSetting.setUpdateTime(DateUtils.getNowDate());
        return bsBeatSettingMapper.updateBsBeatSetting(bsBeatSetting);
    }
    /**
     * æ‰¹é‡åˆ é™¤èŠ‚拍设置
     *
     * @param ids éœ€è¦åˆ é™¤çš„节拍设置主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsBeatSettingByIds(Long[] ids)
    {
        return bsBeatSettingMapper.deleteBsBeatSettingByIds(ids);
    }
    /**
     * åˆ é™¤èŠ‚拍设置信息
     *
     * @param id èŠ‚拍设置主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsBeatSettingById(Long id)
    {
        return bsBeatSettingMapper.deleteBsBeatSettingById(id);
    }
}
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.sc.stationConf.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jcdm.common.annotation.Log;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.main.sc.stationConf.domain.ScStationConf;
import com.jcdm.main.sc.stationConf.service.IScStationConfService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * å·¥ä½ç»ˆç«¯é…ç½®Controller
 *
 * @author Yi
 * @date 2024-01-06
 */
@RestController
@RequestMapping("/sc/stationConf")
public class ScStationConfController extends BaseController
{
    @Autowired
    private IScStationConfService scStationConfService;
    /**
     * æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('sc:stationConf:list')")
    @GetMapping("/list")
    public TableDataInfo list(ScStationConf scStationConf)
    {
        startPage();
        List<ScStationConf> list = scStationConfService.selectScStationConfList(scStationConf);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºå·¥ä½ç»ˆç«¯é…ç½®åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('sc:stationConf:export')")
    @Log(title = "工位终端配置", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ScStationConf scStationConf)
    {
        List<ScStationConf> list = scStationConfService.selectScStationConfList(scStationConf);
        ExcelUtil<ScStationConf> util = new ExcelUtil<ScStationConf>(ScStationConf.class);
        util.exportExcel(response, list, "工位终端配置数据");
    }
    /**
     * èŽ·å–工位终端配置详细信息
     */
    @PreAuthorize("@ss.hasPermi('sc:stationConf:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(scStationConfService.selectScStationConfById(id));
    }
    /**
     * æ–°å¢žå·¥ä½ç»ˆç«¯é…ç½®
     */
    @PreAuthorize("@ss.hasPermi('sc:stationConf:add')")
    @Log(title = "工位终端配置", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody ScStationConf scStationConf)
    {
        return toAjax(scStationConfService.insertScStationConf(scStationConf));
    }
    /**
     * ä¿®æ”¹å·¥ä½ç»ˆç«¯é…ç½®
     */
    @PreAuthorize("@ss.hasPermi('sc:stationConf:edit')")
    @Log(title = "工位终端配置", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody ScStationConf scStationConf)
    {
        return toAjax(scStationConfService.updateScStationConf(scStationConf));
    }
    /**
     * åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®
     */
    @PreAuthorize("@ss.hasPermi('sc:stationConf:remove')")
    @Log(title = "工位终端配置", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(scStationConfService.deleteScStationConfByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/domain/ScStationConf.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,193 @@
package com.jcdm.main.sc.stationConf.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;
/**
 * å·¥ä½ç»ˆç«¯é…ç½®å¯¹è±¡ sc_station_conf
 *
 * @author Yi
 * @date 2024-01-06
 */
public class ScStationConf extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** å·¥åºç¼–号 */
    @Excel(name = "工序编号")
    private String processesCode;
    /** å·¥åºåç§° */
    @Excel(name = "工序名称")
    private String processesName;
    /** å·¥åºç±»åž‹ */
    @Excel(name = "工序类型")
    private String processesType;
    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;
    /** é¢„留字段1 */
    @Excel(name = "预留字段1")
    private String spareField1;
    /** é¢„留字段2 */
    @Excel(name = "预留字段2")
    private String spareField2;
    /** é¢„留字段3 */
    @Excel(name = "预留字段3")
    private String spareField3;
    /** é¢„留字段4 */
    @Excel(name = "预留字段4")
    private String spareField4;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ”¹ç”¨æˆ· */
    @Excel(name = "更改用户")
    private String updateUser;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setProcessesCode(String processesCode)
    {
        this.processesCode = processesCode;
    }
    public String getProcessesCode()
    {
        return processesCode;
    }
    public void setProcessesName(String processesName)
    {
        this.processesName = processesName;
    }
    public String getProcessesName()
    {
        return processesName;
    }
    public void setProcessesType(String processesType)
    {
        this.processesType = processesType;
    }
    public String getProcessesType()
    {
        return processesType;
    }
    public void setIpAddress(String ipAddress)
    {
        this.ipAddress = ipAddress;
    }
    public String getIpAddress()
    {
        return ipAddress;
    }
    public void setSpareField1(String spareField1)
    {
        this.spareField1 = spareField1;
    }
    public String getSpareField1()
    {
        return spareField1;
    }
    public void setSpareField2(String spareField2)
    {
        this.spareField2 = spareField2;
    }
    public String getSpareField2()
    {
        return spareField2;
    }
    public void setSpareField3(String spareField3)
    {
        this.spareField3 = spareField3;
    }
    public String getSpareField3()
    {
        return spareField3;
    }
    public void setSpareField4(String spareField4)
    {
        this.spareField4 = spareField4;
    }
    public String getSpareField4()
    {
        return spareField4;
    }
    public void setCreateUser(String createUser)
    {
        this.createUser = createUser;
    }
    public String getCreateUser()
    {
        return createUser;
    }
    public void setUpdateUser(String updateUser)
    {
        this.updateUser = updateUser;
    }
    public String getUpdateUser()
    {
        return updateUser;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }
    public String getRemarks()
    {
        return remarks;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("processesCode", getProcessesCode())
            .append("processesName", getProcessesName())
            .append("processesType", getProcessesType())
            .append("ipAddress", getIpAddress())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("spareField3", getSpareField3())
            .append("spareField4", getSpareField4())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("remarks", getRemarks())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/mapper/ScStationConfMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.sc.stationConf.mapper;
import java.util.List;
import com.jcdm.main.sc.stationConf.domain.ScStationConf;
/**
 * å·¥ä½ç»ˆç«¯é…ç½®Mapper接口
 *
 * @author Yi
 * @date 2024-01-06
 */
public interface ScStationConfMapper
{
    /**
     * æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param id å·¥ä½ç»ˆç«¯é…ç½®ä¸»é”®
     * @return å·¥ä½ç»ˆç«¯é…ç½®
     */
    public ScStationConf selectScStationConfById(Long id);
    /**
     * æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®åˆ—表
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return å·¥ä½ç»ˆç«¯é…ç½®é›†åˆ
     */
    public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf);
    /**
     * æ–°å¢žå·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return ç»“æžœ
     */
    public int insertScStationConf(ScStationConf scStationConf);
    /**
     * ä¿®æ”¹å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return ç»“æžœ
     */
    public int updateScStationConf(ScStationConf scStationConf);
    /**
     * åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param id å·¥ä½ç»ˆç«¯é…ç½®ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteScStationConfById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteScStationConfByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/IScStationConfService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.sc.stationConf.service;
import java.util.List;
import com.jcdm.main.sc.stationConf.domain.ScStationConf;
/**
 * å·¥ä½ç»ˆç«¯é…ç½®Service接口
 *
 * @author Yi
 * @date 2024-01-06
 */
public interface IScStationConfService
{
    /**
     * æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param id å·¥ä½ç»ˆç«¯é…ç½®ä¸»é”®
     * @return å·¥ä½ç»ˆç«¯é…ç½®
     */
    public ScStationConf selectScStationConfById(Long id);
    /**
     * æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®åˆ—表
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return å·¥ä½ç»ˆç«¯é…ç½®é›†åˆ
     */
    public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf);
    /**
     * æ–°å¢žå·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return ç»“æžœ
     */
    public int insertScStationConf(ScStationConf scStationConf);
    /**
     * ä¿®æ”¹å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return ç»“æžœ
     */
    public int updateScStationConf(ScStationConf scStationConf);
    /**
     * æ‰¹é‡åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param ids éœ€è¦åˆ é™¤çš„工位终端配置主键集合
     * @return ç»“æžœ
     */
    public int deleteScStationConfByIds(Long[] ids);
    /**
     * åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®ä¿¡æ¯
     *
     * @param id å·¥ä½ç»ˆç«¯é…ç½®ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteScStationConfById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/impl/ScStationConfServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.sc.stationConf.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.sc.stationConf.mapper.ScStationConfMapper;
import com.jcdm.main.sc.stationConf.domain.ScStationConf;
import com.jcdm.main.sc.stationConf.service.IScStationConfService;
/**
 * å·¥ä½ç»ˆç«¯é…ç½®Service业务层处理
 *
 * @author Yi
 * @date 2024-01-06
 */
@Service
public class ScStationConfServiceImpl implements IScStationConfService
{
    @Autowired
    private ScStationConfMapper scStationConfMapper;
    /**
     * æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param id å·¥ä½ç»ˆç«¯é…ç½®ä¸»é”®
     * @return å·¥ä½ç»ˆç«¯é…ç½®
     */
    @Override
    public ScStationConf selectScStationConfById(Long id)
    {
        return scStationConfMapper.selectScStationConfById(id);
    }
    /**
     * æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®åˆ—表
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return å·¥ä½ç»ˆç«¯é…ç½®
     */
    @Override
    public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf)
    {
        return scStationConfMapper.selectScStationConfList(scStationConf);
    }
    /**
     * æ–°å¢žå·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return ç»“æžœ
     */
    @Override
    public int insertScStationConf(ScStationConf scStationConf)
    {
        scStationConf.setCreateTime(DateUtils.getNowDate());
        return scStationConfMapper.insertScStationConf(scStationConf);
    }
    /**
     * ä¿®æ”¹å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param scStationConf å·¥ä½ç»ˆç«¯é…ç½®
     * @return ç»“æžœ
     */
    @Override
    public int updateScStationConf(ScStationConf scStationConf)
    {
        scStationConf.setUpdateTime(DateUtils.getNowDate());
        return scStationConfMapper.updateScStationConf(scStationConf);
    }
    /**
     * æ‰¹é‡åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®
     *
     * @param ids éœ€è¦åˆ é™¤çš„工位终端配置主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteScStationConfByIds(Long[] ids)
    {
        return scStationConfMapper.deleteScStationConfByIds(ids);
    }
    /**
     * åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®ä¿¡æ¯
     *
     * @param id å·¥ä½ç»ˆç«¯é…ç½®ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteScStationConfById(Long id)
    {
        return scStationConfMapper.deleteScStationConfById(id);
    }
}
jcdm-main/src/main/resources/mapper/bs/beatSetting/BsBeatSettingMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,103 @@
<?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.bs.beatSetting.mapper.BsBeatSettingMapper">
    <resultMap type="BsBeatSetting" id="BsBeatSettingResult">
        <result property="id"    column="id"    />
        <result property="productCode"    column="product_code"    />
        <result property="productName"    column="product_name"    />
        <result property="beat"    column="beat"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="remark"    column="remark"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="dataSource"    column="data_source"    />
    </resultMap>
    <sql id="selectBsBeatSettingVo">
        select id, product_code, product_name, beat, spare_field_1, spare_field_2, remark, create_user, create_time, update_user, update_time, data_source from bs_beat_setting
    </sql>
    <select id="selectBsBeatSettingList" parameterType="BsBeatSetting" resultMap="BsBeatSettingResult">
        <include refid="selectBsBeatSettingVo"/>
        <where>
            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
            <if test="beat != null  and beat != ''"> and beat = #{beat}</if>
            <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="dataSource != null  and dataSource != ''"> and data_source = #{dataSource}</if>
        </where>
    </select>
    <select id="selectBsBeatSettingById" parameterType="Long" resultMap="BsBeatSettingResult">
        <include refid="selectBsBeatSettingVo"/>
        where id = #{id}
    </select>
    <insert id="insertBsBeatSetting" parameterType="BsBeatSetting" useGeneratedKeys="true" keyProperty="id">
        insert into bs_beat_setting
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="productCode != null">product_code,</if>
            <if test="productName != null">product_name,</if>
            <if test="beat != null and beat != ''">beat,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="remark != null">remark,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="dataSource != null">data_source,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="productCode != null">#{productCode},</if>
            <if test="productName != null">#{productName},</if>
            <if test="beat != null and beat != ''">#{beat},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="remark != null">#{remark},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="dataSource != null">#{dataSource},</if>
         </trim>
    </insert>
    <update id="updateBsBeatSetting" parameterType="BsBeatSetting">
        update bs_beat_setting
        <trim prefix="SET" suffixOverrides=",">
            <if test="productCode != null">product_code = #{productCode},</if>
            <if test="productName != null">product_name = #{productName},</if>
            <if test="beat != null and beat != ''">beat = #{beat},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="dataSource != null">data_source = #{dataSource},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteBsBeatSettingById" parameterType="Long">
        delete from bs_beat_setting where id = #{id}
    </delete>
    <delete id="deleteBsBeatSettingByIds" parameterType="String">
        delete from bs_beat_setting where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-main/src/main/resources/mapper/sc/stationConf/ScStationConfMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,114 @@
<?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.sc.stationConf.mapper.ScStationConfMapper">
    <resultMap type="ScStationConf" id="ScStationConfResult">
        <result property="id"    column="id"    />
        <result property="processesCode"    column="processes_code"    />
        <result property="processesName"    column="processes_name"    />
        <result property="processesType"    column="processes_type"    />
        <result property="ipAddress"    column="ip_address"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="spareField3"    column="spare_field_3"    />
        <result property="spareField4"    column="spare_field_4"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remarks"    column="remarks"    />
    </resultMap>
    <sql id="selectScStationConfVo">
        select id, processes_code, processes_name, processes_type, ip_address, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks from sc_station_conf
    </sql>
    <select id="selectScStationConfList" parameterType="ScStationConf" resultMap="ScStationConfResult">
        <include refid="selectScStationConfVo"/>
        <where>
            <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
            <if test="processesName != null  and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
            <if test="processesType != null  and processesType != ''"> and processes_type = #{processesType}</if>
            <if test="ipAddress != null  and ipAddress != ''"> and ip_address = #{ipAddress}</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="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>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
        </where>
    </select>
    <select id="selectScStationConfById" parameterType="Long" resultMap="ScStationConfResult">
        <include refid="selectScStationConfVo"/>
        where id = #{id}
    </select>
    <insert id="insertScStationConf" parameterType="ScStationConf" useGeneratedKeys="true" keyProperty="id">
        insert into sc_station_conf
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="processesCode != null">processes_code,</if>
            <if test="processesName != null">processes_name,</if>
            <if test="processesType != null">processes_type,</if>
            <if test="ipAddress != null">ip_address,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="spareField3 != null">spare_field_3,</if>
            <if test="spareField4 != null">spare_field_4,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remarks != null">remarks,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="processesCode != null">#{processesCode},</if>
            <if test="processesName != null">#{processesName},</if>
            <if test="processesType != null">#{processesType},</if>
            <if test="ipAddress != null">#{ipAddress},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="spareField3 != null">#{spareField3},</if>
            <if test="spareField4 != null">#{spareField4},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remarks != null">#{remarks},</if>
         </trim>
    </insert>
    <update id="updateScStationConf" parameterType="ScStationConf">
        update sc_station_conf
        <trim prefix="SET" suffixOverrides=",">
            <if test="processesCode != null">processes_code = #{processesCode},</if>
            <if test="processesName != null">processes_name = #{processesName},</if>
            <if test="processesType != null">processes_type = #{processesType},</if>
            <if test="ipAddress != null">ip_address = #{ipAddress},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
            <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteScStationConfById" parameterType="Long">
        delete from sc_station_conf where id = #{id}
    </delete>
    <delete id="deleteScStationConfByIds" parameterType="String">
        delete from sc_station_conf where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/bs/beatSetting/beatSetting.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢èŠ‚拍设置列表
export function listBeatSetting(query) {
  return request({
    url: '/bs/beatSetting/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢èŠ‚拍设置详细
export function getBeatSetting(id) {
  return request({
    url: '/bs/beatSetting/' + id,
    method: 'get'
  })
}
// æ–°å¢žèŠ‚拍设置
export function addBeatSetting(data) {
  return request({
    url: '/bs/beatSetting',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹èŠ‚拍设置
export function updateBeatSetting(data) {
  return request({
    url: '/bs/beatSetting',
    method: 'put',
    data: data
  })
}
// åˆ é™¤èŠ‚拍设置
export function delBeatSetting(id) {
  return request({
    url: '/bs/beatSetting/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/api/main/sc/stationConf.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®åˆ—表
export function listStationConf(query) {
  return request({
    url: '/sc/stationConf/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®è¯¦ç»†
export function getStationConf(id) {
  return request({
    url: '/sc/stationConf/' + id,
    method: 'get'
  })
}
// æ–°å¢žå·¥ä½ç»ˆç«¯é…ç½®
export function addStationConf(data) {
  return request({
    url: '/sc/stationConf',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹å·¥ä½ç»ˆç«¯é…ç½®
export function updateStationConf(data) {
  return request({
    url: '/sc/stationConf',
    method: 'put',
    data: data
  })
}
// åˆ é™¤å·¥ä½ç»ˆç«¯é…ç½®
export function delStationConf(id) {
  return request({
    url: '/sc/stationConf/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/bs/beatSetting/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="产品编码" prop="productCode">
            <el-input
              v-model="queryParams.productCode"
              placeholder="请输入产品编码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="产品名称" prop="productName">
            <el-input
              v-model="queryParams.productName"
              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="['bs:beatSetting: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="['bs:beatSetting: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="['bs:beatSetting: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="['bs:beatSetting:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="beatSettingList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="产品编码" align="center" prop="productCode">
          </el-table-column>
          <el-table-column label="产品名称" align="center" prop="productName">
          </el-table-column>
          <el-table-column label="节拍" align="center" prop="beat">
          </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="['bs:beatSetting:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['bs:beatSetting:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改节拍设置对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="产品编码" prop="productCode">
          <el-select style="width: 100%" @change="handleSelectChange(form.productCode)" v-model="form.productCode" placeholder="请输入产品编码">
            <el-option
              v-for="item in options"
              :key="item.productCode"
              :label="item.productCode"
              :value="item.productCode">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item  label="产品名称" prop="productName">
          <el-input  disabled v-model="form.productName" placeholder="请输入产品名称" />
        </el-form-item>
        <el-form-item label="节拍" prop="beat">
          <el-input v-model="form.beat" placeholder="请输入节拍" />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" 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 { listBeatSetting, getBeatSetting, delBeatSetting, addBeatSetting, updateBeatSetting } from "@/api/main/bs/beatSetting/beatSetting";
import {listProductBom} from "@/api/main/bs/ProductBom/ProductBom";
export default {
  name: "BeatSetting",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      options: [],
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // èŠ‚拍设置表格数据
      beatSettingList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        productCode: null,
        productName: null,
        beat: null,
        spareField1: null,
        spareField2: null,
        createUser: null,
        updateUser: null,
        dataSource: null
      },
      productCodeQueryParams: {
        pageNum: 1,
        pageSize: 10,
        productCode: null,
        productName: null,
        beat: null,
        spareField1: null,
        spareField2: null,
        createUser: null,
        updateUser: null,
        dataSource: null
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
        beat: [
          { required: true, message: "节拍不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
    this.initProductBom();
  },
  methods: {
    /** æŸ¥è¯¢èŠ‚拍设置列表 */
    handleSelectChange(selectedOption) {
      this.productCodeQueryParams.productCode = selectedOption;
      listProductBom(this.productCodeQueryParams).then(response => {
        this.form.productName = response.rows[0].productName;
      });
    },
    initProductBom(){
      listProductBom(this.queryParams).then(response => {
        this.options = response.rows;
      });
    },
    getList() {
      this.loading = true;
      listBeatSetting(this.queryParams).then(response => {
        this.beatSettingList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        productCode: null,
        productName: null,
        beat: null,
        spareField1: null,
        spareField2: null,
        remark: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: null,
        dataSource: 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
      getBeatSetting(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) {
            updateBeatSetting(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addBeatSetting(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 delBeatSetting(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('bs/beatSetting/export', {
        ...this.queryParams
      }, `beatSetting_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
jcdm-ui/src/views/main/em/equipmentArchives/index.vue
@@ -157,19 +157,6 @@
            </el-option>
          </el-select>
        </el-form-item>
<!--        <el-form-item label="产线编码" prop="lineCode">-->
<!--          <el-input v-model="form.lineCode" placeholder="请输入产线编码" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="产线编码" prop="lineCode">-->
<!--          <el-select style="width: 100%" @change="handleSelectChangelineCode(form.processesCode)" v-model="form.lineCode" placeholder="请输入产线编码">-->
<!--            <el-option-->
<!--              v-for="item in options"-->
<!--              :key="item.lineCode"-->
<!--              :label="item.lineCode"-->
<!--              :value="item.lineCode">-->
<!--            </el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注" />
        </el-form-item>
@@ -273,12 +260,15 @@
    // åœ¨è¿™é‡Œç¼–写处理选中事件的逻辑
    handleSelectChange(selectedOption) {
      this.form.lineCode = null;
      listLineInfo(selectedOption).then(response => {
      let param = {
        workshopCode : selectedOption
      }
      listLineInfo(param).then(response => {
        this.lineOptions = response.rows;
      });
    },
    getList() {
      this.$modal.msgSuccess("修改成功");
      // this.$modal.msgSuccess("修改成功");
      console.log(this.queryParams)
      this.loading = true;
      listEquipmentArchives(this.queryParams).then(response => {
jcdm-ui/src/views/main/sc/stationConf/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,342 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="工序编号" prop="processesCode">
            <el-input
              v-model="queryParams.processesCode"
              placeholder="请输入工序编号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="工序名称" prop="processesName">
            <el-input
              v-model="queryParams.processesName"
              placeholder="请输入工序名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="IP地址" prop="ipAddress">
            <el-input
              v-model="queryParams.ipAddress"
              placeholder="请输入IP地址"
              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="['sc:stationConf: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="['sc:stationConf: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="['sc:stationConf: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="['sc:stationConf:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="stationConfList" @selection-change="handleSelectionChange">
          <el-form-item type="selection" width="55" align="center" >
          </el-form-item>
          <el-table-column label="工序编号" align="center" prop="processesCode">
          </el-table-column>
          <el-table-column label="工序名称" align="center" prop="processesName">
          </el-table-column>
          <el-table-column label="IP地址" align="center" prop="ipAddress">
          </el-table-column>
          <el-table-column label="备注" align="center" prop="remarks">
          </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="['sc:stationConf:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['sc:stationConf:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改工位终端配置对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="工序编号" prop="processesCode">
          <el-select style="width: 100%" @change="handleSelectChangeprocessesCode(form.processesCode)" v-model="form.processesCode" placeholder="请选择工序编号">
            <el-option
              v-for="item in options"
              :key="item.index"
              :label="item.processesName"
              :value="item.processesCode">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="工序名称" prop="processesName">
          <el-input  disabled v-model="form.processesName" placeholder="请输入工序名称" />
        </el-form-item>
        <el-form-item label="IP地址" prop="ipAddress">
          <el-input v-model="form.ipAddress" placeholder="请输入IP地址" />
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" 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 {listStationConf, getStationConf, delStationConf, addStationConf, updateStationConf} from "@/api/main/sc/stationConf";
import {listProcesses} from "@/api/main/bs/processes/processes";
export default {
  name: "StationConf",
  data() {
    return {
      options: [],
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // å·¥ä½ç»ˆç«¯é…ç½®è¡¨æ ¼æ•°æ®
      stationConfList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        processesCode: null,
        processesName: null,
        processesType: null,
        ipAddress: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: null,
        createUser: null,
        updateUser: null,
        remarks: null
      },
      processesCodeQueryParams:{
        pageNum: 1,
        pageSize: 10,
        processesCodes: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
    this.initProcesses();
  },
  methods: {
    handleSelectChangeprocessesCode(selectedOption) {
      this.processesCodeQueryParams.processesCodes = selectedOption;
      listProcesses(this.queryParams).then(response => {
        this.form.processesName = response.rows[0].processesName;
      });
    },
    initProcesses(){
      listProcesses(this.queryParams).then(response => {
        this.options = response.rows;
      });
    },
    /** æŸ¥è¯¢å·¥ä½ç»ˆç«¯é…ç½®åˆ—表 */
    getList() {
      this.loading = true;
      listStationConf(this.queryParams).then(response => {
        this.stationConfList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        processesCode: null,
        processesName: null,
        processesType: null,
        ipAddress: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: null,
        remarks: 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
      getStationConf(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) {
            updateStationConf(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addStationConf(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 delStationConf(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('sc/stationConf/export', {
        ...this.queryParams
      }, `stationConf_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>