hdy
2023-12-25 13a2840b53505e622fd3ccaa50507134b35694f9
Merge remote-tracking branch 'origin/master'
已添加8个文件
1306 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/controller/DaCollectionParamConfController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/domain/DaCollectionParamConf.java 343 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/mapper/DaCollectionParamConfMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/service/IDaCollectionParamConfService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/service/impl/DaCollectionParamConfServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/collectionParamConf/DaCollectionParamConfMapper.xml 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/da/collectionParamConf/collectionParamConf.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/da/collectionParamConf/index.vue 440 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/controller/DaCollectionParamConfController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.da.collectionParamConf.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jcdm.common.annotation.Log;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf;
import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * é‡‡é›†å‚数配置Controller
 *
 * @author ruimin
 * @date 2023-12-25
 */
@RestController
@RequestMapping("/da/collectionParamConf")
public class DaCollectionParamConfController extends BaseController
{
    @Autowired
    private IDaCollectionParamConfService daCollectionParamConfService;
    /**
     * æŸ¥è¯¢é‡‡é›†å‚数配置列表
     */
    @PreAuthorize("@ss.hasPermi('da:collectionParamConf:list')")
    @GetMapping("/list")
    public TableDataInfo list(DaCollectionParamConf daCollectionParamConf)
    {
        startPage();
        List<DaCollectionParamConf> list = daCollectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºé‡‡é›†å‚数配置列表
     */
    @PreAuthorize("@ss.hasPermi('da:collectionParamConf:export')")
    @Log(title = "采集参数配置", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, DaCollectionParamConf daCollectionParamConf)
    {
        List<DaCollectionParamConf> list = daCollectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf);
        ExcelUtil<DaCollectionParamConf> util = new ExcelUtil<DaCollectionParamConf>(DaCollectionParamConf.class);
        util.exportExcel(response, list, "采集参数配置数据");
    }
    /**
     * èŽ·å–采集参数配置详细信息
     */
    @PreAuthorize("@ss.hasPermi('da:collectionParamConf:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(daCollectionParamConfService.selectDaCollectionParamConfById(id));
    }
    /**
     * æ–°å¢žé‡‡é›†å‚数配置
     */
    @PreAuthorize("@ss.hasPermi('da:collectionParamConf:add')")
    @Log(title = "采集参数配置", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody DaCollectionParamConf daCollectionParamConf)
    {
        return toAjax(daCollectionParamConfService.insertDaCollectionParamConf(daCollectionParamConf));
    }
    /**
     * ä¿®æ”¹é‡‡é›†å‚数配置
     */
    @PreAuthorize("@ss.hasPermi('da:collectionParamConf:edit')")
    @Log(title = "采集参数配置", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody DaCollectionParamConf daCollectionParamConf)
    {
        return toAjax(daCollectionParamConfService.updateDaCollectionParamConf(daCollectionParamConf));
    }
    /**
     * åˆ é™¤é‡‡é›†å‚数配置
     */
    @PreAuthorize("@ss.hasPermi('da:collectionParamConf:remove')")
    @Log(title = "采集参数配置", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(daCollectionParamConfService.deleteDaCollectionParamConfByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/domain/DaCollectionParamConf.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,343 @@
package com.jcdm.main.da.collectionParamConf.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_collection_param_conf
 *
 * @author ruimin
 * @date 2023-12-25
 */
public class DaCollectionParamConf extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** å·¥åºç¼–号 */
    @Excel(name = "工序编号")
    private String processesCode;
    /** å‚数集编码 */
    @Excel(name = "参数集编码")
    private String parameterSetCode;
    /** å‚数集名称 */
    @Excel(name = "参数集名称")
    private String parameterSetName;
    /** é‡‡é›†å‚æ•°ID */
    @Excel(name = "采集参数ID")
    private String collectParameterId;
    /** é‡‡é›†å‚数名称 */
    @Excel(name = "采集参数名称")
    private String collectParameterName;
    /** æ˜¯å¦ä½œä¸ºå¯¹æ¯”参数 */
    @Excel(name = "是否作为对比参数")
    private String contrastParameterFlag;
    /** é‡‡é›†å‚数类型 */
    @Excel(name = "采集参数类型")
    private String collectParameterType;
    /** é‡‡é›†å‚数单位 */
    @Excel(name = "采集参数单位")
    private String collectParameterUnit;
    /** æ•°æ®æè¿° */
    @Excel(name = "数据描述")
    private String Descriptives;
    /** ä¸Šé™å€¼ */
    @Excel(name = "上限值")
    private String paramUpper;
    /** ä¸‹é™å€¼ */
    @Excel(name = "下限值")
    private String paramLower;
    /** ä¸­å¿ƒå€¼ */
    @Excel(name = "中心值")
    private String paramCentral;
    /** äº§å“ç¼–码 */
    @Excel(name = "产品编码")
    private String productCode;
    /** é‡‡é›†åœ°å€ */
    @Excel(name = "采集地址")
    private String gatherAddress;
    /** é‡‡é›†é¡ºåº */
    @Excel(name = "采集顺序")
    private String gatherSequence;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ”¹ç”¨æˆ· */
    @Excel(name = "更改用户")
    private String updateUser;
    /** é¢„留字段1 */
    private String spareField1;
    /** é¢„留字段2 */
    private String spareField2;
    /** é¢„留字段3 */
    private String spareField3;
    /** é¢„留字段4 */
    private String spareField4;
    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 setParameterSetCode(String parameterSetCode)
    {
        this.parameterSetCode = parameterSetCode;
    }
    public String getParameterSetCode()
    {
        return parameterSetCode;
    }
    public void setParameterSetName(String parameterSetName)
    {
        this.parameterSetName = parameterSetName;
    }
    public String getParameterSetName()
    {
        return parameterSetName;
    }
    public void setCollectParameterId(String collectParameterId)
    {
        this.collectParameterId = collectParameterId;
    }
    public String getCollectParameterId()
    {
        return collectParameterId;
    }
    public void setCollectParameterName(String collectParameterName)
    {
        this.collectParameterName = collectParameterName;
    }
    public String getCollectParameterName()
    {
        return collectParameterName;
    }
    public void setContrastParameterFlag(String contrastParameterFlag)
    {
        this.contrastParameterFlag = contrastParameterFlag;
    }
    public String getContrastParameterFlag()
    {
        return contrastParameterFlag;
    }
    public void setCollectParameterType(String collectParameterType)
    {
        this.collectParameterType = collectParameterType;
    }
    public String getCollectParameterType()
    {
        return collectParameterType;
    }
    public void setCollectParameterUnit(String collectParameterUnit)
    {
        this.collectParameterUnit = collectParameterUnit;
    }
    public String getCollectParameterUnit()
    {
        return collectParameterUnit;
    }
    public void setDescriptives(String Descriptives)
    {
        this.Descriptives = Descriptives;
    }
    public String getDescriptives()
    {
        return Descriptives;
    }
    public void setParamUpper(String paramUpper)
    {
        this.paramUpper = paramUpper;
    }
    public String getParamUpper()
    {
        return paramUpper;
    }
    public void setParamLower(String paramLower)
    {
        this.paramLower = paramLower;
    }
    public String getParamLower()
    {
        return paramLower;
    }
    public void setParamCentral(String paramCentral)
    {
        this.paramCentral = paramCentral;
    }
    public String getParamCentral()
    {
        return paramCentral;
    }
    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }
    public String getProductCode()
    {
        return productCode;
    }
    public void setGatherAddress(String gatherAddress)
    {
        this.gatherAddress = gatherAddress;
    }
    public String getGatherAddress()
    {
        return gatherAddress;
    }
    public void setGatherSequence(String gatherSequence)
    {
        this.gatherSequence = gatherSequence;
    }
    public String getGatherSequence()
    {
        return gatherSequence;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }
    public String getRemarks()
    {
        return remarks;
    }
    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 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;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("processesCode", getProcessesCode())
            .append("parameterSetCode", getParameterSetCode())
            .append("parameterSetName", getParameterSetName())
            .append("collectParameterId", getCollectParameterId())
            .append("collectParameterName", getCollectParameterName())
            .append("contrastParameterFlag", getContrastParameterFlag())
            .append("collectParameterType", getCollectParameterType())
            .append("collectParameterUnit", getCollectParameterUnit())
            .append("Descriptives", getDescriptives())
            .append("paramUpper", getParamUpper())
            .append("paramLower", getParamLower())
            .append("paramCentral", getParamCentral())
            .append("productCode", getProductCode())
            .append("gatherAddress", getGatherAddress())
            .append("gatherSequence", getGatherSequence())
            .append("remarks", getRemarks())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("spareField3", getSpareField3())
            .append("spareField4", getSpareField4())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/mapper/DaCollectionParamConfMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.da.collectionParamConf.mapper;
import java.util.List;
import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf;
/**
 * é‡‡é›†å‚数配置Mapper接口
 *
 * @author ruimin
 * @date 2023-12-25
 */
public interface DaCollectionParamConfMapper
{
    /**
     * æŸ¥è¯¢é‡‡é›†å‚数配置
     *
     * @param id é‡‡é›†å‚数配置主键
     * @return é‡‡é›†å‚数配置
     */
    public DaCollectionParamConf selectDaCollectionParamConfById(Long id);
    /**
     * æŸ¥è¯¢é‡‡é›†å‚数配置列表
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return é‡‡é›†å‚数配置集合
     */
    public List<DaCollectionParamConf> selectDaCollectionParamConfList(DaCollectionParamConf daCollectionParamConf);
    /**
     * æ–°å¢žé‡‡é›†å‚数配置
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return ç»“æžœ
     */
    public int insertDaCollectionParamConf(DaCollectionParamConf daCollectionParamConf);
    /**
     * ä¿®æ”¹é‡‡é›†å‚数配置
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return ç»“æžœ
     */
    public int updateDaCollectionParamConf(DaCollectionParamConf daCollectionParamConf);
    /**
     * åˆ é™¤é‡‡é›†å‚数配置
     *
     * @param id é‡‡é›†å‚数配置主键
     * @return ç»“æžœ
     */
    public int deleteDaCollectionParamConfById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤é‡‡é›†å‚数配置
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteDaCollectionParamConfByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/service/IDaCollectionParamConfService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.da.collectionParamConf.service;
import java.util.List;
import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf;
/**
 * é‡‡é›†å‚数配置Service接口
 *
 * @author ruimin
 * @date 2023-12-25
 */
public interface IDaCollectionParamConfService
{
    /**
     * æŸ¥è¯¢é‡‡é›†å‚数配置
     *
     * @param id é‡‡é›†å‚数配置主键
     * @return é‡‡é›†å‚数配置
     */
    public DaCollectionParamConf selectDaCollectionParamConfById(Long id);
    /**
     * æŸ¥è¯¢é‡‡é›†å‚数配置列表
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return é‡‡é›†å‚数配置集合
     */
    public List<DaCollectionParamConf> selectDaCollectionParamConfList(DaCollectionParamConf daCollectionParamConf);
    /**
     * æ–°å¢žé‡‡é›†å‚数配置
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return ç»“æžœ
     */
    public int insertDaCollectionParamConf(DaCollectionParamConf daCollectionParamConf);
    /**
     * ä¿®æ”¹é‡‡é›†å‚数配置
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return ç»“æžœ
     */
    public int updateDaCollectionParamConf(DaCollectionParamConf daCollectionParamConf);
    /**
     * æ‰¹é‡åˆ é™¤é‡‡é›†å‚数配置
     *
     * @param ids éœ€è¦åˆ é™¤çš„采集参数配置主键集合
     * @return ç»“æžœ
     */
    public int deleteDaCollectionParamConfByIds(Long[] ids);
    /**
     * åˆ é™¤é‡‡é›†å‚数配置信息
     *
     * @param id é‡‡é›†å‚数配置主键
     * @return ç»“æžœ
     */
    public int deleteDaCollectionParamConfById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/da/collectionParamConf/service/impl/DaCollectionParamConfServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.da.collectionParamConf.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.da.collectionParamConf.mapper.DaCollectionParamConfMapper;
import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf;
import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService;
/**
 * é‡‡é›†å‚数配置Service业务层处理
 *
 * @author ruimin
 * @date 2023-12-25
 */
@Service
public class DaCollectionParamConfServiceImpl implements IDaCollectionParamConfService
{
    @Autowired
    private DaCollectionParamConfMapper daCollectionParamConfMapper;
    /**
     * æŸ¥è¯¢é‡‡é›†å‚数配置
     *
     * @param id é‡‡é›†å‚数配置主键
     * @return é‡‡é›†å‚数配置
     */
    @Override
    public DaCollectionParamConf selectDaCollectionParamConfById(Long id)
    {
        return daCollectionParamConfMapper.selectDaCollectionParamConfById(id);
    }
    /**
     * æŸ¥è¯¢é‡‡é›†å‚数配置列表
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return é‡‡é›†å‚数配置
     */
    @Override
    public List<DaCollectionParamConf> selectDaCollectionParamConfList(DaCollectionParamConf daCollectionParamConf)
    {
        return daCollectionParamConfMapper.selectDaCollectionParamConfList(daCollectionParamConf);
    }
    /**
     * æ–°å¢žé‡‡é›†å‚数配置
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return ç»“æžœ
     */
    @Override
    public int insertDaCollectionParamConf(DaCollectionParamConf daCollectionParamConf)
    {
        daCollectionParamConf.setCreateTime(DateUtils.getNowDate());
        return daCollectionParamConfMapper.insertDaCollectionParamConf(daCollectionParamConf);
    }
    /**
     * ä¿®æ”¹é‡‡é›†å‚数配置
     *
     * @param daCollectionParamConf é‡‡é›†å‚数配置
     * @return ç»“æžœ
     */
    @Override
    public int updateDaCollectionParamConf(DaCollectionParamConf daCollectionParamConf)
    {
        daCollectionParamConf.setUpdateTime(DateUtils.getNowDate());
        return daCollectionParamConfMapper.updateDaCollectionParamConf(daCollectionParamConf);
    }
    /**
     * æ‰¹é‡åˆ é™¤é‡‡é›†å‚数配置
     *
     * @param ids éœ€è¦åˆ é™¤çš„采集参数配置主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteDaCollectionParamConfByIds(Long[] ids)
    {
        return daCollectionParamConfMapper.deleteDaCollectionParamConfByIds(ids);
    }
    /**
     * åˆ é™¤é‡‡é›†å‚数配置信息
     *
     * @param id é‡‡é›†å‚数配置主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteDaCollectionParamConfById(Long id)
    {
        return daCollectionParamConfMapper.deleteDaCollectionParamConfById(id);
    }
}
jcdm-main/src/main/resources/mapper/da/collectionParamConf/DaCollectionParamConfMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,157 @@
<?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.collectionParamConf.mapper.DaCollectionParamConfMapper">
    <resultMap type="DaCollectionParamConf" id="DaCollectionParamConfResult">
        <result property="id"    column="id"    />
        <result property="processesCode"    column="processes_code"    />
        <result property="parameterSetCode"    column="parameter_set_code"    />
        <result property="parameterSetName"    column="parameter_set_name"    />
        <result property="collectParameterId"    column="collect_parameter_id"    />
        <result property="collectParameterName"    column="collect_parameter_name"    />
        <result property="contrastParameterFlag"    column="contrast_parameter_flag"    />
        <result property="collectParameterType"    column="collect_parameter_type"    />
        <result property="collectParameterUnit"    column="collect_parameter_unit"    />
        <result property="Descriptives"    column="Descriptives"    />
        <result property="paramUpper"    column="param_upper"    />
        <result property="paramLower"    column="param_lower"    />
        <result property="paramCentral"    column="param_Central"    />
        <result property="productCode"    column="product_code"    />
        <result property="gatherAddress"    column="gather_address"    />
        <result property="gatherSequence"    column="gather_sequence"    />
        <result property="remarks"    column="remarks"    />
        <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="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"    />
    </resultMap>
    <sql id="selectDaCollectionParamConfVo">
        select id, processes_code, parameter_set_code, parameter_set_name, collect_parameter_id, collect_parameter_name, contrast_parameter_flag, collect_parameter_type, collect_parameter_unit, Descriptives, param_upper, param_lower, param_Central, product_code, gather_address, gather_sequence, remarks, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from da_collection_param_conf
    </sql>
    <select id="selectDaCollectionParamConfList" parameterType="DaCollectionParamConf" resultMap="DaCollectionParamConfResult">
        <include refid="selectDaCollectionParamConfVo"/>
        <where>
            <if test="processesCode != null  and processesCode != ''"> and processes_code like concat('%', #{processesCode}, '%')</if>
            <if test="parameterSetCode != null  and parameterSetCode != ''"> and parameter_set_code like concat('%', #{parameterSetCode}, '%')</if>
            <if test="parameterSetName != null  and parameterSetName != ''"> and parameter_set_name like concat('%', #{parameterSetName}, '%')</if>
            <if test="collectParameterId != null  and collectParameterId != ''"> and collect_parameter_id like concat('%', #{collectParameterId}, '%')</if>
            <if test="collectParameterName != null  and collectParameterName != ''"> and collect_parameter_name like concat('%', #{collectParameterName}, '%')</if>
            <if test="contrastParameterFlag != null  and contrastParameterFlag != ''"> and contrast_parameter_flag like concat('%', #{contrastParameterFlag}, '%')</if>
            <if test="collectParameterType != null  and collectParameterType != ''"> and collect_parameter_type like concat('%', #{collectParameterType}, '%')</if>
            <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
        </where>
    </select>
    <select id="selectDaCollectionParamConfById" parameterType="Long" resultMap="DaCollectionParamConfResult">
        <include refid="selectDaCollectionParamConfVo"/>
        where id = #{id}
    </select>
    <insert id="insertDaCollectionParamConf" parameterType="DaCollectionParamConf">
        insert into da_collection_param_conf
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="processesCode != null">processes_code,</if>
            <if test="parameterSetCode != null">parameter_set_code,</if>
            <if test="parameterSetName != null">parameter_set_name,</if>
            <if test="collectParameterId != null">collect_parameter_id,</if>
            <if test="collectParameterName != null">collect_parameter_name,</if>
            <if test="contrastParameterFlag != null">contrast_parameter_flag,</if>
            <if test="collectParameterType != null">collect_parameter_type,</if>
            <if test="collectParameterUnit != null">collect_parameter_unit,</if>
            <if test="Descriptives != null">Descriptives,</if>
            <if test="paramUpper != null">param_upper,</if>
            <if test="paramLower != null">param_lower,</if>
            <if test="paramCentral != null">param_Central,</if>
            <if test="productCode != null">product_code,</if>
            <if test="gatherAddress != null">gather_address,</if>
            <if test="gatherSequence != null">gather_sequence,</if>
            <if test="remarks != null">remarks,</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="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>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="processesCode != null">#{processesCode},</if>
            <if test="parameterSetCode != null">#{parameterSetCode},</if>
            <if test="parameterSetName != null">#{parameterSetName},</if>
            <if test="collectParameterId != null">#{collectParameterId},</if>
            <if test="collectParameterName != null">#{collectParameterName},</if>
            <if test="contrastParameterFlag != null">#{contrastParameterFlag},</if>
            <if test="collectParameterType != null">#{collectParameterType},</if>
            <if test="collectParameterUnit != null">#{collectParameterUnit},</if>
            <if test="Descriptives != null">#{Descriptives},</if>
            <if test="paramUpper != null">#{paramUpper},</if>
            <if test="paramLower != null">#{paramLower},</if>
            <if test="paramCentral != null">#{paramCentral},</if>
            <if test="productCode != null">#{productCode},</if>
            <if test="gatherAddress != null">#{gatherAddress},</if>
            <if test="gatherSequence != null">#{gatherSequence},</if>
            <if test="remarks != null">#{remarks},</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="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="spareField3 != null">#{spareField3},</if>
            <if test="spareField4 != null">#{spareField4},</if>
         </trim>
    </insert>
    <update id="updateDaCollectionParamConf" parameterType="DaCollectionParamConf">
        update da_collection_param_conf
        <trim prefix="SET" suffixOverrides=",">
            <if test="processesCode != null">processes_code = #{processesCode},</if>
            <if test="parameterSetCode != null">parameter_set_code = #{parameterSetCode},</if>
            <if test="parameterSetName != null">parameter_set_name = #{parameterSetName},</if>
            <if test="collectParameterId != null">collect_parameter_id = #{collectParameterId},</if>
            <if test="collectParameterName != null">collect_parameter_name = #{collectParameterName},</if>
            <if test="contrastParameterFlag != null">contrast_parameter_flag = #{contrastParameterFlag},</if>
            <if test="collectParameterType != null">collect_parameter_type = #{collectParameterType},</if>
            <if test="collectParameterUnit != null">collect_parameter_unit = #{collectParameterUnit},</if>
            <if test="Descriptives != null">Descriptives = #{Descriptives},</if>
            <if test="paramUpper != null">param_upper = #{paramUpper},</if>
            <if test="paramLower != null">param_lower = #{paramLower},</if>
            <if test="paramCentral != null">param_Central = #{paramCentral},</if>
            <if test="productCode != null">product_code = #{productCode},</if>
            <if test="gatherAddress != null">gather_address = #{gatherAddress},</if>
            <if test="gatherSequence != null">gather_sequence = #{gatherSequence},</if>
            <if test="remarks != null">remarks = #{remarks},</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="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>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteDaCollectionParamConfById" parameterType="Long">
        delete from da_collection_param_conf where id = #{id}
    </delete>
    <delete id="deleteDaCollectionParamConfByIds" parameterType="String">
        delete from da_collection_param_conf where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/da/collectionParamConf/collectionParamConf.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢é‡‡é›†å‚数配置列表
export function listCollectionParamConf(query) {
  return request({
    url: '/da/collectionParamConf/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢é‡‡é›†å‚数配置详细
export function getCollectionParamConf(id) {
  return request({
    url: '/da/collectionParamConf/' + id,
    method: 'get'
  })
}
// æ–°å¢žé‡‡é›†å‚数配置
export function addCollectionParamConf(data) {
  return request({
    url: '/da/collectionParamConf',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹é‡‡é›†å‚数配置
export function updateCollectionParamConf(data) {
  return request({
    url: '/da/collectionParamConf',
    method: 'put',
    data: data
  })
}
// åˆ é™¤é‡‡é›†å‚数配置
export function delCollectionParamConf(id) {
  return request({
    url: '/da/collectionParamConf/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/da/collectionParamConf/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,440 @@
<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="parameterSetCode">-->
<!--            <el-input-->
<!--              v-model="queryParams.parameterSetCode"-->
<!--              placeholder="请输入参数集编码"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="参数集名称" prop="parameterSetName">-->
<!--            <el-input-->
<!--              v-model="queryParams.parameterSetName"-->
<!--              placeholder="请输入参数集名称"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="采集参数ID" prop="collectParameterId">-->
<!--            <el-input-->
<!--              v-model="queryParams.collectParameterId"-->
<!--              placeholder="请输入采集参数ID"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="采集参数名称" prop="collectParameterName">-->
<!--            <el-input-->
<!--              v-model="queryParams.collectParameterName"-->
<!--              placeholder="请输入采集参数名称"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="是否作为对比参数" prop="contrastParameterFlag">-->
<!--            <el-input-->
<!--              v-model="queryParams.contrastParameterFlag"-->
<!--              placeholder="请输入是否作为对比参数"-->
<!--              clearable-->
<!--              @keyup.enter.native="handleQuery"-->
<!--            />-->
<!--          </el-form-item>-->
<!--          <el-form-item label="采集参数类型" prop="collectParameterType">-->
<!--            <el-select v-model="queryParams.collectParameterType" placeholder="请选择采集参数类型" clearable>-->
<!--              <el-option-->
<!--                v-for="dict in dict.type.${dictType}"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item label="产品编码" prop="productCode">
            <el-input
              v-model="queryParams.productCode"
              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:collectionParamConf: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:collectionParamConf: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:collectionParamConf: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:collectionParamConf:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="collectionParamConfList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
<!--          <el-table-column label="主键id" align="center" prop="id" />-->
          <el-table-column label="工序编号" align="center" width="130" prop="processesCode">
          </el-table-column>
          <el-table-column label="参数集编码" align="center" width="130" prop="parameterSetCode">
          </el-table-column>
          <el-table-column label="参数集名称" align="center" width="160" prop="parameterSetName">
          </el-table-column>
          <el-table-column label="采集参数ID" align="center" width="130" prop="collectParameterId">
          </el-table-column>
          <el-table-column label="采集参数名称" align="center" width="160" prop="collectParameterName">
          </el-table-column>
<!--          <el-table-column label="是否作为对比参数" align="center" prop="contrastParameterFlag">-->
<!--          </el-table-column>-->
          <el-table-column label="采集参数类型" align="center" width="130" prop="collectParameterType">
          </el-table-column>
          <el-table-column label="采集参数单位" align="center" width="130" prop="collectParameterUnit">
          </el-table-column>
          <el-table-column label="数据描述" align="center" width="160" prop="Descriptives">
          </el-table-column>
          <el-table-column label="上限值" align="center" prop="paramUpper">
          </el-table-column>
          <el-table-column label="下限值" align="center" prop="paramLower">
          </el-table-column>
          <el-table-column label="中心值" align="center" prop="paramCentral">
          </el-table-column>
          <el-table-column label="产品编码" align="center" width="150" prop="productCode">
          </el-table-column>
          <el-table-column label="采集地址" align="center" width="130" prop="gatherAddress">
          </el-table-column>
          <el-table-column label="采集顺序" align="center" width="130" prop="gatherSequence">
          </el-table-column>
          <el-table-column label="备注" align="center" width="160" prop="remarks">
          </el-table-column>
          <el-table-column label="创建用户" align="center" prop="createUser">
          </el-table-column>
          <el-table-column label="创建时间" align="center" width="160" prop="createTime">
          </el-table-column>
          <el-table-column label="更改用户" align="center" prop="updateUser">
          </el-table-column>
          <el-table-column label="更改时间" align="center" width="160" prop="updateTime">
          </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:collectionParamConf:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['da:collectionParamConf: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 :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-input v-model="form.processesCode" placeholder="请输入工序编号" />
        </el-form-item>
        <el-form-item label="参数集编码" prop="parameterSetCode">
          <el-input v-model="form.parameterSetCode" placeholder="请输入参数集编码" />
        </el-form-item>
        <el-form-item label="参数集名称" prop="parameterSetName">
          <el-input v-model="form.parameterSetName" placeholder="请输入参数集名称" />
        </el-form-item>
        <el-form-item label="采集参数ID" prop="collectParameterId">
          <el-input v-model="form.collectParameterId" placeholder="请输入采集参数ID" />
        </el-form-item>
        <el-form-item label="采集参数名称" prop="collectParameterName">
          <el-input v-model="form.collectParameterName" placeholder="请输入采集参数名称" />
        </el-form-item>
        <el-form-item label="是否作为对比参数" prop="contrastParameterFlag">
          <el-input v-model="form.contrastParameterFlag" placeholder="请输入是否作为对比参数" />
        </el-form-item>
<!--        <el-form-item label="采集参数类型" prop="collectParameterType">-->
<!--          <el-select v-model="form.collectParameterType" placeholder="请选择采集参数类型">-->
<!--            <el-option-->
<!--              v-for="dict in dict.type.${dictType}"-->
<!--              :key="dict.value"-->
<!--              :label="dict.label"-->
<!--              :value="dict.value"-->
<!--            ></el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="采集参数单位" prop="collectParameterUnit">
          <el-input v-model="form.collectParameterUnit" placeholder="请输入采集参数单位" />
        </el-form-item>
        <el-form-item label="数据描述" prop="Descriptives">
          <el-input v-model="form.Descriptives" placeholder="请输入数据描述" />
        </el-form-item>
        <el-form-item label="上限值" prop="paramUpper">
          <el-input v-model="form.paramUpper" placeholder="请输入上限值" />
        </el-form-item>
        <el-form-item label="下限值" prop="paramLower">
          <el-input v-model="form.paramLower" placeholder="请输入下限值" />
        </el-form-item>
        <el-form-item label="中心值" prop="paramCentral">
          <el-input v-model="form.paramCentral" placeholder="请输入中心值" />
        </el-form-item>
        <el-form-item label="产品编码" prop="productCode">
          <el-input v-model="form.productCode" placeholder="请输入产品编码" />
        </el-form-item>
        <el-form-item label="采集地址" prop="gatherAddress">
          <el-input v-model="form.gatherAddress" placeholder="请输入采集地址" />
        </el-form-item>
        <el-form-item label="采集顺序" prop="gatherSequence">
          <el-input v-model="form.gatherSequence" placeholder="请输入采集顺序" />
        </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 { listCollectionParamConf, getCollectionParamConf, delCollectionParamConf, addCollectionParamConf, updateCollectionParamConf } from "@/api/main/da/collectionParamConf/collectionParamConf";
export default {
  name: "CollectionParamConf",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // é‡‡é›†å‚数配置表格数据
      collectionParamConfList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        processesCode: null,
        parameterSetCode: null,
        parameterSetName: null,
        collectParameterId: null,
        collectParameterName: null,
        contrastParameterFlag: null,
        collectParameterType: null,
        productCode: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢é‡‡é›†å‚数配置列表 */
    getList() {
      this.loading = true;
      listCollectionParamConf(this.queryParams).then(response => {
        this.collectionParamConfList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        processesCode: null,
        parameterSetCode: null,
        parameterSetName: null,
        collectParameterId: null,
        collectParameterName: null,
        contrastParameterFlag: null,
        collectParameterType: null,
        collectParameterUnit: null,
        Descriptives: null,
        paramUpper: null,
        paramLower: null,
        paramCentral: null,
        productCode: null,
        gatherAddress: null,
        gatherSequence: null,
        remarks: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: 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
      getCollectionParamConf(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) {
            updateCollectionParamConf(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addCollectionParamConf(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 delCollectionParamConf(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('da/collectionParamConf/export', {
        ...this.queryParams
      }, `collectionParamConf_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>