yantian yue
2023-12-09 f3774241207844dbeb79e82dcb3ddbf17492e98b
Merge remote-tracking branch 'origin/master'
已添加8个文件
1056 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/processes/controller/BsProcessesInfoController.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/processes/domain/BsProcessesInfo.java 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/processes/mapper/BsProcessesInfoMapper.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/processes/service/IBsProcessesInfoService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/processes/service/impl/BsProcessesInfoServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/processes/BsProcessesInfoMapper.xml 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/processes/processes.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/processes/index.vue 353 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/processes/controller/BsProcessesInfoController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,105 @@
package com.jcdm.main.bs.processes.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.main.bs.processes.domain.BsProcessesInfo;
import com.jcdm.main.bs.processes.service.IBsProcessesInfoService;
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.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * å·¥åºä¿¡æ¯Controller
 *
 * @author ruimin
 * @date 2023-12-09
 */
@RestController
@RequestMapping("/bs/processes")
public class BsProcessesInfoController extends BaseController
{
    @Autowired
    private IBsProcessesInfoService bsProcessesInfoService;
    /**
     * æŸ¥è¯¢å·¥åºä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:processes:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsProcessesInfo bsProcessesInfo)
    {
        startPage();
        List<BsProcessesInfo> list = bsProcessesInfoService.selectBsProcessesInfoList(bsProcessesInfo);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºå·¥åºä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:processes:export')")
    @Log(title = "工序信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsProcessesInfo bsProcessesInfo)
    {
        List<BsProcessesInfo> list = bsProcessesInfoService.selectBsProcessesInfoList(bsProcessesInfo);
        ExcelUtil<BsProcessesInfo> util = new ExcelUtil<BsProcessesInfo>(BsProcessesInfo.class);
        util.exportExcel(response, list, "工序信息数据");
    }
    /**
     * èŽ·å–工序信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('bs:processes:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bsProcessesInfoService.selectBsProcessesInfoById(id));
    }
    /**
     * æ–°å¢žå·¥åºä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:processes:add')")
    @Log(title = "工序信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsProcessesInfo bsProcessesInfo)
    {
        return toAjax(bsProcessesInfoService.insertBsProcessesInfo(bsProcessesInfo));
    }
    /**
     * ä¿®æ”¹å·¥åºä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:processes:edit')")
    @Log(title = "工序信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsProcessesInfo bsProcessesInfo)
    {
        return toAjax(bsProcessesInfoService.updateBsProcessesInfo(bsProcessesInfo));
    }
    /**
     * åˆ é™¤å·¥åºä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:processes:remove')")
    @Log(title = "工序信息", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(bsProcessesInfoService.deleteBsProcessesInfoByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/processes/domain/BsProcessesInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,217 @@
package com.jcdm.main.bs.processes.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_processes_info
 *
 * @author ruimin
 * @date 2023-12-09
 */
public class BsProcessesInfo 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;
    /** å‡†å¤‡æ—¶é—´ */
    @Excel(name = "准备时间")
    private String preparationTime;
    /** ç”Ÿäº§æ—¶é—´ */
    @Excel(name = "生产时间")
    private String productiveTime;
    /** çŠ¶æ€ */
    @Excel(name = "状态")
    private String status;
    /** é¢„留字段1 */
    private String spareField1;
    /** é¢„留字段2 */
    private String spareField2;
    /** é¢„留字段3 */
    private String spareField3;
    /** é¢„留字段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 setPreparationTime(String preparationTime)
    {
        this.preparationTime = preparationTime;
    }
    public String getPreparationTime()
    {
        return preparationTime;
    }
    public void setProductiveTime(String productiveTime)
    {
        this.productiveTime = productiveTime;
    }
    public String getProductiveTime()
    {
        return productiveTime;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }
    public String getStatus()
    {
        return status;
    }
    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("preparationTime", getPreparationTime())
            .append("productiveTime", getProductiveTime())
            .append("status", getStatus())
            .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/bs/processes/mapper/BsProcessesInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.jcdm.main.bs.processes.mapper;
import com.jcdm.main.bs.processes.domain.BsProcessesInfo;
import java.util.List;
/**
 * å·¥åºä¿¡æ¯Mapper接口
 *
 * @author ruimin
 * @date 2023-12-09
 */
public interface BsProcessesInfoMapper
{
    /**
     * æŸ¥è¯¢å·¥åºä¿¡æ¯
     *
     * @param id å·¥åºä¿¡æ¯ä¸»é”®
     * @return å·¥åºä¿¡æ¯
     */
    public BsProcessesInfo selectBsProcessesInfoById(Long id);
    /**
     * æŸ¥è¯¢å·¥åºä¿¡æ¯åˆ—表
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return å·¥åºä¿¡æ¯é›†åˆ
     */
    public List<BsProcessesInfo> selectBsProcessesInfoList(BsProcessesInfo bsProcessesInfo);
    /**
     * æ–°å¢žå·¥åºä¿¡æ¯
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsProcessesInfo(BsProcessesInfo bsProcessesInfo);
    /**
     * ä¿®æ”¹å·¥åºä¿¡æ¯
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsProcessesInfo(BsProcessesInfo bsProcessesInfo);
    /**
     * åˆ é™¤å·¥åºä¿¡æ¯
     *
     * @param id å·¥åºä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsProcessesInfoById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤å·¥åºä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsProcessesInfoByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/bs/processes/service/IBsProcessesInfoService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.jcdm.main.bs.processes.service;
import com.jcdm.main.bs.processes.domain.BsProcessesInfo;
import java.util.List;
/**
 * å·¥åºä¿¡æ¯Service接口
 *
 * @author ruimin
 * @date 2023-12-09
 */
public interface IBsProcessesInfoService
{
    /**
     * æŸ¥è¯¢å·¥åºä¿¡æ¯
     *
     * @param id å·¥åºä¿¡æ¯ä¸»é”®
     * @return å·¥åºä¿¡æ¯
     */
    public BsProcessesInfo selectBsProcessesInfoById(Long id);
    /**
     * æŸ¥è¯¢å·¥åºä¿¡æ¯åˆ—表
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return å·¥åºä¿¡æ¯é›†åˆ
     */
    public List<BsProcessesInfo> selectBsProcessesInfoList(BsProcessesInfo bsProcessesInfo);
    /**
     * æ–°å¢žå·¥åºä¿¡æ¯
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsProcessesInfo(BsProcessesInfo bsProcessesInfo);
    /**
     * ä¿®æ”¹å·¥åºä¿¡æ¯
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsProcessesInfo(BsProcessesInfo bsProcessesInfo);
    /**
     * æ‰¹é‡åˆ é™¤å·¥åºä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„工序信息主键集合
     * @return ç»“æžœ
     */
    public int deleteBsProcessesInfoByIds(Long[] ids);
    /**
     * åˆ é™¤å·¥åºä¿¡æ¯ä¿¡æ¯
     *
     * @param id å·¥åºä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsProcessesInfoById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/bs/processes/service/impl/BsProcessesInfoServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.bs.processes.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import com.jcdm.main.bs.processes.domain.BsProcessesInfo;
import com.jcdm.main.bs.processes.mapper.BsProcessesInfoMapper;
import com.jcdm.main.bs.processes.service.IBsProcessesInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * å·¥åºä¿¡æ¯Service业务层处理
 *
 * @author ruimin
 * @date 2023-12-09
 */
@Service
public class BsProcessesInfoServiceImpl implements IBsProcessesInfoService
{
    @Autowired
    private BsProcessesInfoMapper bsProcessesInfoMapper;
    /**
     * æŸ¥è¯¢å·¥åºä¿¡æ¯
     *
     * @param id å·¥åºä¿¡æ¯ä¸»é”®
     * @return å·¥åºä¿¡æ¯
     */
    @Override
    public BsProcessesInfo selectBsProcessesInfoById(Long id)
    {
        return bsProcessesInfoMapper.selectBsProcessesInfoById(id);
    }
    /**
     * æŸ¥è¯¢å·¥åºä¿¡æ¯åˆ—表
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return å·¥åºä¿¡æ¯
     */
    @Override
    public List<BsProcessesInfo> selectBsProcessesInfoList(BsProcessesInfo bsProcessesInfo)
    {
        return bsProcessesInfoMapper.selectBsProcessesInfoList(bsProcessesInfo);
    }
    /**
     * æ–°å¢žå·¥åºä¿¡æ¯
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int insertBsProcessesInfo(BsProcessesInfo bsProcessesInfo)
    {
        bsProcessesInfo.setCreateTime(DateUtils.getNowDate());
        return bsProcessesInfoMapper.insertBsProcessesInfo(bsProcessesInfo);
    }
    /**
     * ä¿®æ”¹å·¥åºä¿¡æ¯
     *
     * @param bsProcessesInfo å·¥åºä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int updateBsProcessesInfo(BsProcessesInfo bsProcessesInfo)
    {
        bsProcessesInfo.setUpdateTime(DateUtils.getNowDate());
        return bsProcessesInfoMapper.updateBsProcessesInfo(bsProcessesInfo);
    }
    /**
     * æ‰¹é‡åˆ é™¤å·¥åºä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„工序信息主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsProcessesInfoByIds(Long[] ids)
    {
        return bsProcessesInfoMapper.deleteBsProcessesInfoByIds(ids);
    }
    /**
     * åˆ é™¤å·¥åºä¿¡æ¯ä¿¡æ¯
     *
     * @param id å·¥åºä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsProcessesInfoById(Long id)
    {
        return bsProcessesInfoMapper.deleteBsProcessesInfoById(id);
    }
}
jcdm-main/src/main/resources/mapper/bs/processes/BsProcessesInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,117 @@
<?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.processes.mapper.BsProcessesInfoMapper">
    <resultMap type="BsProcessesInfo" id="BsProcessesInfoResult">
        <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="preparationTime"    column="preparation_time"    />
        <result property="productiveTime"    column="productive_time"    />
        <result property="status"    column="status"    />
        <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="selectBsProcessesInfoVo">
        select id, processes_code, processes_name, processes_type, preparation_time, productive_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks from bs_processes_info
    </sql>
    <select id="selectBsProcessesInfoList" parameterType="BsProcessesInfo" resultMap="BsProcessesInfoResult">
        <include refid="selectBsProcessesInfoVo"/>
<!--        <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 like concat('%', #{processesType}, '%')</if>-->
<!--            <if test="status != null  and status != ''"> and status = #{status}</if>-->
<!--        </where>-->
    </select>
    <select id="selectBsProcessesInfoById" parameterType="Long" resultMap="BsProcessesInfoResult">
        <include refid="selectBsProcessesInfoVo"/>
        where id = #{id}
    </select>
    <insert id="insertBsProcessesInfo" parameterType="BsProcessesInfo">
        insert into bs_processes_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="processesCode != null and processesCode != ''">processes_code,</if>
            <if test="processesName != null">processes_name,</if>
            <if test="processesType != null and processesType != ''">processes_type,</if>
            <if test="preparationTime != null">preparation_time,</if>
            <if test="productiveTime != null">productive_time,</if>
            <if test="status != null">status,</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="id != null">#{id},</if>
            <if test="processesCode != null and processesCode != ''">#{processesCode},</if>
            <if test="processesName != null">#{processesName},</if>
            <if test="processesType != null and processesType != ''">#{processesType},</if>
            <if test="preparationTime != null">#{preparationTime},</if>
            <if test="productiveTime != null">#{productiveTime},</if>
            <if test="status != null">#{status},</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="updateBsProcessesInfo" parameterType="BsProcessesInfo">
        update bs_processes_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if>
            <if test="processesName != null">processes_name = #{processesName},</if>
            <if test="processesType != null and processesType != ''">processes_type = #{processesType},</if>
            <if test="preparationTime != null">preparation_time = #{preparationTime},</if>
            <if test="productiveTime != null">productive_time = #{productiveTime},</if>
            <if test="status != null">status = #{status},</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="deleteBsProcessesInfoById" parameterType="Long">
        delete from bs_processes_info where id = #{id}
    </delete>
    <delete id="deleteBsProcessesInfoByIds" parameterType="String">
        delete from bs_processes_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/bs/processes/processes.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢å·¥åºä¿¡æ¯åˆ—表
export function listProcesses(query) {
  return request({
    url: '/bs/processes/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢å·¥åºä¿¡æ¯è¯¦ç»†
export function getProcesses(id) {
  return request({
    url: '/bs/processes/' + id,
    method: 'get'
  })
}
// æ–°å¢žå·¥åºä¿¡æ¯
export function addProcesses(data) {
  return request({
    url: '/bs/processes',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹å·¥åºä¿¡æ¯
export function updateProcesses(data) {
  return request({
    url: '/bs/processes',
    method: 'put',
    data: data
  })
}
// åˆ é™¤å·¥åºä¿¡æ¯
export function delProcesses(id) {
  return request({
    url: '/bs/processes/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/bs/processes/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,353 @@
<template>
  <div class="app-container">
    <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="工序类型" prop="processesType">-->
<!--        <el-select v-model="queryParams.processesType" 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="status">-->
<!--        <el-select v-model="queryParams.status" 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>
        <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-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:processes: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:processes: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:processes: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:processes:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="processesList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="主键id" align="center" prop="id" />
      <el-table-column label="工序编号" align="center" prop="processesCode">
      </el-table-column>
      <el-table-column label="工序名称" align="center" prop="processesName">
      </el-table-column>
      <el-table-column label="工序类型" align="center" prop="processesType">
      </el-table-column>
      <el-table-column label="准备时间" align="center" prop="preparationTime">
      </el-table-column>
      <el-table-column label="生产时间" align="center" prop="productiveTime">
      </el-table-column>
      <el-table-column label="状态" align="center" prop="status">
      </el-table-column>
      <el-table-column label="创建用户" align="center" prop="createUser">
      </el-table-column>
      <el-table-column label="更改用户" align="center" prop="updateUser">
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remarks">
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['bs:processes:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['bs:processes:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <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>
      <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="processesName">
          <el-input v-model="form.processesName" placeholder="请输入工序名称" />
        </el-form-item>
<!--        <el-form-item label="工序类型" prop="processesType">-->
<!--          <el-select v-model="form.processesType" 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="preparationTime">
          <el-input v-model="form.preparationTime" placeholder="请输入准备时间" />
        </el-form-item>
        <el-form-item label="生产时间" prop="productiveTime">
          <el-input v-model="form.productiveTime" placeholder="请输入生产时间" />
        </el-form-item>
<!--        <el-form-item label="状态" prop="status">-->
<!--          <el-radio-group v-model="form.status">-->
<!--            <el-radio-->
<!--              v-for="dict in dict.type.${dictType}"-->
<!--              :key="dict.value"-->
<!--              :label="dict.value"-->
<!--            >{{dict.label}}</el-radio>-->
<!--          </el-radio-group>-->
<!--        </el-form-item>-->
        <el-form-item label="创建用户" prop="createUser">
          <el-input v-model="form.createUser" placeholder="请输入创建用户" />
        </el-form-item>
        <el-form-item label="更改用户" prop="updateUser">
          <el-input v-model="form.updateUser" 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 { listProcesses, getProcesses, delProcesses, addProcesses, updateProcesses } from "@/api/main/bs/processes/processes";
export default {
  name: "Processes",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // å·¥åºä¿¡æ¯è¡¨æ ¼æ•°æ®
      processesList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        processesCode: null,
        processesName: null,
        processesType: null,
        status: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
        processesCode: [
          { required: true, message: "工序编号不能为空", trigger: "blur" }
        ],
        processesType: [
          { required: true, message: "工序类型不能为空", trigger: "change" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢å·¥åºä¿¡æ¯åˆ—表 */
    getList() {
      this.loading = true;
      listProcesses(this.queryParams).then(response => {
        this.processesList = 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,
        preparationTime: null,
        productiveTime: null,
        status: 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.title = "添加工序信息";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getProcesses(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改工序信息";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateProcesses(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addProcesses(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 delProcesses(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('bs/processes/export', {
        ...this.queryParams
      }, `processes_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>