From 75d84104d68e3a41518ad1579335dfdfb67faff8 Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期四, 04 一月 2024 08:07:30 +0800
Subject: [PATCH] 工艺文档页面创建

---
 jcdm-ui/src/views/main/bs/processFile/index.vue                                                 |  438 +++++++++++++++++++++
 jcdm-main/src/main/java/com/jcdm/main/bs/processFile/domain/BsProcessFile.java                  |  245 ++++++++++++
 jcdm-ui/src/api/main/bs/processFile/processFile.js                                              |   44 ++
 jcdm-main/src/main/resources/mapper/bs/processFile/BsProcessFileMapper.xml                      |  130 ++++++
 jcdm-main/src/main/java/com/jcdm/main/bs/processFile/mapper/BsProcessFileMapper.java            |   61 +++
 jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/IBsProcessFileService.java         |   61 +++
 jcdm-main/src/main/java/com/jcdm/main/bs/processFile/controller/BsProcessFileController.java    |  104 +++++
 jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/impl/BsProcessFileServiceImpl.java |   96 ++++
 8 files changed, 1,179 insertions(+), 0 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/controller/BsProcessFileController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/controller/BsProcessFileController.java
new file mode 100644
index 0000000..8dac115
--- /dev/null
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/controller/BsProcessFileController.java
@@ -0,0 +1,104 @@
+package com.jcdm.main.bs.processFile.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.processFile.domain.BsProcessFile;
+import com.jcdm.main.bs.processFile.service.IBsProcessFileService;
+import com.jcdm.common.utils.poi.ExcelUtil;
+import com.jcdm.common.core.page.TableDataInfo;
+
+/**
+ * 宸ヨ壓鏂囨。Controller
+ * 
+ * @author Yi
+ * @date 2024-01-03
+ */
+@RestController
+@RequestMapping("/bs/processFile")
+public class BsProcessFileController extends BaseController
+{
+    @Autowired
+    private IBsProcessFileService bsProcessFileService;
+
+    /**
+     * 鏌ヨ宸ヨ壓鏂囨。鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('bs:processFile:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BsProcessFile bsProcessFile)
+    {
+        startPage();
+        List<BsProcessFile> list = bsProcessFileService.selectBsProcessFileList(bsProcessFile);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭宸ヨ壓鏂囨。鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('bs:processFile:export')")
+    @Log(title = "宸ヨ壓鏂囨。", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BsProcessFile bsProcessFile)
+    {
+        List<BsProcessFile> list = bsProcessFileService.selectBsProcessFileList(bsProcessFile);
+        ExcelUtil<BsProcessFile> util = new ExcelUtil<BsProcessFile>(BsProcessFile.class);
+        util.exportExcel(response, list, "宸ヨ壓鏂囨。鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇宸ヨ壓鏂囨。璇︾粏淇℃伅
+     */
+    @PreAuthorize("@ss.hasPermi('bs:processFile:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bsProcessFileService.selectBsProcessFileById(id));
+    }
+
+    /**
+     * 鏂板宸ヨ壓鏂囨。
+     */
+    @PreAuthorize("@ss.hasPermi('bs:processFile:add')")
+    @Log(title = "宸ヨ壓鏂囨。", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BsProcessFile bsProcessFile)
+    {
+        return toAjax(bsProcessFileService.insertBsProcessFile(bsProcessFile));
+    }
+
+    /**
+     * 淇敼宸ヨ壓鏂囨。
+     */
+    @PreAuthorize("@ss.hasPermi('bs:processFile:edit')")
+    @Log(title = "宸ヨ壓鏂囨。", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BsProcessFile bsProcessFile)
+    {
+        return toAjax(bsProcessFileService.updateBsProcessFile(bsProcessFile));
+    }
+
+    /**
+     * 鍒犻櫎宸ヨ壓鏂囨。
+     */
+    @PreAuthorize("@ss.hasPermi('bs:processFile:remove')")
+    @Log(title = "宸ヨ壓鏂囨。", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(bsProcessFileService.deleteBsProcessFileByIds(ids));
+    }
+}
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/domain/BsProcessFile.java b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/domain/BsProcessFile.java
new file mode 100644
index 0000000..1c65568
--- /dev/null
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/domain/BsProcessFile.java
@@ -0,0 +1,245 @@
+package com.jcdm.main.bs.processFile.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_process_file
+ * 
+ * @author Yi
+ * @date 2024-01-03
+ */
+public class BsProcessFile 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 processesCode;
+
+    /** 宸ュ簭鍚嶇О */
+    @Excel(name = "宸ュ簭鍚嶇О")
+    private String processesName;
+
+    /** 鏂囦欢缂栧彿 */
+    @Excel(name = "鏂囦欢缂栧彿")
+    private String fileCode;
+
+    /** 鏂囦欢鍚嶇О */
+    @Excel(name = "鏂囦欢鍚嶇О")
+    private String fileName;
+
+    /** 鏂囦欢鍦板潃 */
+    @Excel(name = "鏂囦欢鍦板潃")
+    private String fileAddress;
+
+    /** 鐘舵�� */
+    @Excel(name = "鐘舵��")
+    private String status;
+
+    /** 鍒涘缓浜� */
+    @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;
+
+    /** 澶囨敞 */
+    @Excel(name = "澶囨敞")
+    private String remarks;
+
+    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 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 setFileCode(String fileCode) 
+    {
+        this.fileCode = fileCode;
+    }
+
+    public String getFileCode() 
+    {
+        return fileCode;
+    }
+    public void setFileName(String fileName) 
+    {
+        this.fileName = fileName;
+    }
+
+    public String getFileName() 
+    {
+        return fileName;
+    }
+    public void setFileAddress(String fileAddress) 
+    {
+        this.fileAddress = fileAddress;
+    }
+
+    public String getFileAddress() 
+    {
+        return fileAddress;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    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;
+    }
+    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("productCode", getProductCode())
+            .append("productName", getProductName())
+            .append("processesCode", getProcessesCode())
+            .append("processesName", getProcessesName())
+            .append("fileCode", getFileCode())
+            .append("fileName", getFileName())
+            .append("fileAddress", getFileAddress())
+            .append("status", getStatus())
+            .append("createUser", getCreateUser())
+            .append("createTime", getCreateTime())
+            .append("updateUser", getUpdateUser())
+            .append("updateTime", getUpdateTime())
+            .append("spareField1", getSpareField1())
+            .append("spareField2", getSpareField2())
+            .append("spareField3", getSpareField3())
+            .append("spareField4", getSpareField4())
+            .append("remarks", getRemarks())
+            .toString();
+    }
+}
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/mapper/BsProcessFileMapper.java b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/mapper/BsProcessFileMapper.java
new file mode 100644
index 0000000..6db02aa
--- /dev/null
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/mapper/BsProcessFileMapper.java
@@ -0,0 +1,61 @@
+package com.jcdm.main.bs.processFile.mapper;
+
+import java.util.List;
+import com.jcdm.main.bs.processFile.domain.BsProcessFile;
+
+/**
+ * 宸ヨ壓鏂囨。Mapper鎺ュ彛
+ * 
+ * @author Yi
+ * @date 2024-01-03
+ */
+public interface BsProcessFileMapper 
+{
+    /**
+     * 鏌ヨ宸ヨ壓鏂囨。
+     * 
+     * @param id 宸ヨ壓鏂囨。涓婚敭
+     * @return 宸ヨ壓鏂囨。
+     */
+    public BsProcessFile selectBsProcessFileById(Long id);
+
+    /**
+     * 鏌ヨ宸ヨ壓鏂囨。鍒楄〃
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 宸ヨ壓鏂囨。闆嗗悎
+     */
+    public List<BsProcessFile> selectBsProcessFileList(BsProcessFile bsProcessFile);
+
+    /**
+     * 鏂板宸ヨ壓鏂囨。
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 缁撴灉
+     */
+    public int insertBsProcessFile(BsProcessFile bsProcessFile);
+
+    /**
+     * 淇敼宸ヨ壓鏂囨。
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 缁撴灉
+     */
+    public int updateBsProcessFile(BsProcessFile bsProcessFile);
+
+    /**
+     * 鍒犻櫎宸ヨ壓鏂囨。
+     * 
+     * @param id 宸ヨ壓鏂囨。涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteBsProcessFileById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎宸ヨ壓鏂囨。
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteBsProcessFileByIds(Long[] ids);
+}
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/IBsProcessFileService.java b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/IBsProcessFileService.java
new file mode 100644
index 0000000..075a8b4
--- /dev/null
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/IBsProcessFileService.java
@@ -0,0 +1,61 @@
+package com.jcdm.main.bs.processFile.service;
+
+import java.util.List;
+import com.jcdm.main.bs.processFile.domain.BsProcessFile;
+
+/**
+ * 宸ヨ壓鏂囨。Service鎺ュ彛
+ * 
+ * @author Yi
+ * @date 2024-01-03
+ */
+public interface IBsProcessFileService 
+{
+    /**
+     * 鏌ヨ宸ヨ壓鏂囨。
+     * 
+     * @param id 宸ヨ壓鏂囨。涓婚敭
+     * @return 宸ヨ壓鏂囨。
+     */
+    public BsProcessFile selectBsProcessFileById(Long id);
+
+    /**
+     * 鏌ヨ宸ヨ壓鏂囨。鍒楄〃
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 宸ヨ壓鏂囨。闆嗗悎
+     */
+    public List<BsProcessFile> selectBsProcessFileList(BsProcessFile bsProcessFile);
+
+    /**
+     * 鏂板宸ヨ壓鏂囨。
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 缁撴灉
+     */
+    public int insertBsProcessFile(BsProcessFile bsProcessFile);
+
+    /**
+     * 淇敼宸ヨ壓鏂囨。
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 缁撴灉
+     */
+    public int updateBsProcessFile(BsProcessFile bsProcessFile);
+
+    /**
+     * 鎵归噺鍒犻櫎宸ヨ壓鏂囨。
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑宸ヨ壓鏂囨。涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteBsProcessFileByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎宸ヨ壓鏂囨。淇℃伅
+     * 
+     * @param id 宸ヨ壓鏂囨。涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteBsProcessFileById(Long id);
+}
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/impl/BsProcessFileServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/impl/BsProcessFileServiceImpl.java
new file mode 100644
index 0000000..9d05656
--- /dev/null
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/processFile/service/impl/BsProcessFileServiceImpl.java
@@ -0,0 +1,96 @@
+package com.jcdm.main.bs.processFile.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.processFile.mapper.BsProcessFileMapper;
+import com.jcdm.main.bs.processFile.domain.BsProcessFile;
+import com.jcdm.main.bs.processFile.service.IBsProcessFileService;
+
+/**
+ * 宸ヨ壓鏂囨。Service涓氬姟灞傚鐞�
+ * 
+ * @author Yi
+ * @date 2024-01-03
+ */
+@Service
+public class BsProcessFileServiceImpl implements IBsProcessFileService 
+{
+    @Autowired
+    private BsProcessFileMapper bsProcessFileMapper;
+
+    /**
+     * 鏌ヨ宸ヨ壓鏂囨。
+     * 
+     * @param id 宸ヨ壓鏂囨。涓婚敭
+     * @return 宸ヨ壓鏂囨。
+     */
+    @Override
+    public BsProcessFile selectBsProcessFileById(Long id)
+    {
+        return bsProcessFileMapper.selectBsProcessFileById(id);
+    }
+
+    /**
+     * 鏌ヨ宸ヨ壓鏂囨。鍒楄〃
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 宸ヨ壓鏂囨。
+     */
+    @Override
+    public List<BsProcessFile> selectBsProcessFileList(BsProcessFile bsProcessFile)
+    {
+        return bsProcessFileMapper.selectBsProcessFileList(bsProcessFile);
+    }
+
+    /**
+     * 鏂板宸ヨ壓鏂囨。
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertBsProcessFile(BsProcessFile bsProcessFile)
+    {
+        bsProcessFile.setCreateTime(DateUtils.getNowDate());
+        return bsProcessFileMapper.insertBsProcessFile(bsProcessFile);
+    }
+
+    /**
+     * 淇敼宸ヨ壓鏂囨。
+     * 
+     * @param bsProcessFile 宸ヨ壓鏂囨。
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateBsProcessFile(BsProcessFile bsProcessFile)
+    {
+        bsProcessFile.setUpdateTime(DateUtils.getNowDate());
+        return bsProcessFileMapper.updateBsProcessFile(bsProcessFile);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎宸ヨ壓鏂囨。
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑宸ヨ壓鏂囨。涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteBsProcessFileByIds(Long[] ids)
+    {
+        return bsProcessFileMapper.deleteBsProcessFileByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎宸ヨ壓鏂囨。淇℃伅
+     * 
+     * @param id 宸ヨ壓鏂囨。涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteBsProcessFileById(Long id)
+    {
+        return bsProcessFileMapper.deleteBsProcessFileById(id);
+    }
+}
diff --git a/jcdm-main/src/main/resources/mapper/bs/processFile/BsProcessFileMapper.xml b/jcdm-main/src/main/resources/mapper/bs/processFile/BsProcessFileMapper.xml
new file mode 100644
index 0000000..b63bbf9
--- /dev/null
+++ b/jcdm-main/src/main/resources/mapper/bs/processFile/BsProcessFileMapper.xml
@@ -0,0 +1,130 @@
+<?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.processFile.mapper.BsProcessFileMapper">
+    
+    <resultMap type="BsProcessFile" id="BsProcessFileResult">
+        <result property="id"    column="id"    />
+        <result property="productCode"    column="product_code"    />
+        <result property="productName"    column="product_name"    />
+        <result property="processesCode"    column="processes_code"    />
+        <result property="processesName"    column="processes_name"    />
+        <result property="fileCode"    column="file_code"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="fileAddress"    column="file_address"    />
+        <result property="status"    column="status"    />
+        <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"    />
+        <result property="remarks"    column="remarks"    />
+    </resultMap>
+
+    <sql id="selectBsProcessFileVo">
+        select id, product_code, product_name, processes_code, processes_name, file_code, file_name, file_address, status, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4, remarks from bs_process_file
+    </sql>
+
+    <select id="selectBsProcessFileList" parameterType="BsProcessFile" resultMap="BsProcessFileResult">
+        <include refid="selectBsProcessFileVo"/>
+        <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="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
+            <if test="processesName != null  and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
+            <if test="fileCode != null  and fileCode != ''"> and file_code = #{fileCode}</if>
+            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
+            <if test="fileAddress != null  and fileAddress != ''"> and file_address = #{fileAddress}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</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="selectBsProcessFileById" parameterType="Long" resultMap="BsProcessFileResult">
+        <include refid="selectBsProcessFileVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertBsProcessFile" parameterType="BsProcessFile" useGeneratedKeys="true" keyProperty="id">
+        insert into bs_process_file
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="productCode != null">product_code,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="processesCode != null">processes_code,</if>
+            <if test="processesName != null">processes_name,</if>
+            <if test="fileCode != null">file_code,</if>
+            <if test="fileName != null">file_name,</if>
+            <if test="fileAddress != null">file_address,</if>
+            <if test="status != null">status,</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>
+            <if test="remarks != null">remarks,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="productCode != null">#{productCode},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="processesCode != null">#{processesCode},</if>
+            <if test="processesName != null">#{processesName},</if>
+            <if test="fileCode != null">#{fileCode},</if>
+            <if test="fileName != null">#{fileName},</if>
+            <if test="fileAddress != null">#{fileAddress},</if>
+            <if test="status != null">#{status},</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>
+            <if test="remarks != null">#{remarks},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBsProcessFile" parameterType="BsProcessFile">
+        update bs_process_file
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="productCode != null">product_code = #{productCode},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="processesCode != null">processes_code = #{processesCode},</if>
+            <if test="processesName != null">processes_name = #{processesName},</if>
+            <if test="fileCode != null">file_code = #{fileCode},</if>
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="fileAddress != null">file_address = #{fileAddress},</if>
+            <if test="status != null">status = #{status},</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>
+            <if test="remarks != null">remarks = #{remarks},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBsProcessFileById" parameterType="Long">
+        delete from bs_process_file where id = #{id}
+    </delete>
+
+    <delete id="deleteBsProcessFileByIds" parameterType="String">
+        delete from bs_process_file where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
\ No newline at end of file
diff --git a/jcdm-ui/src/api/main/bs/processFile/processFile.js b/jcdm-ui/src/api/main/bs/processFile/processFile.js
new file mode 100644
index 0000000..f8ec451
--- /dev/null
+++ b/jcdm-ui/src/api/main/bs/processFile/processFile.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 鏌ヨ宸ヨ壓鏂囨。鍒楄〃
+export function listProcessFile(query) {
+  return request({
+    url: '/bs/processFile/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ宸ヨ壓鏂囨。璇︾粏
+export function getProcessFile(id) {
+  return request({
+    url: '/bs/processFile/' + id,
+    method: 'get'
+  })
+}
+
+// 鏂板宸ヨ壓鏂囨。
+export function addProcessFile(data) {
+  return request({
+    url: '/bs/processFile',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼宸ヨ壓鏂囨。
+export function updateProcessFile(data) {
+  return request({
+    url: '/bs/processFile',
+    method: 'put',
+    data: data
+  })
+}
+
+// 鍒犻櫎宸ヨ壓鏂囨。
+export function delProcessFile(id) {
+  return request({
+    url: '/bs/processFile/' + id,
+    method: 'delete'
+  })
+}
diff --git a/jcdm-ui/src/views/main/bs/processFile/index.vue b/jcdm-ui/src/views/main/bs/processFile/index.vue
new file mode 100644
index 0000000..c3f55db
--- /dev/null
+++ b/jcdm-ui/src/views/main/bs/processFile/index.vue
@@ -0,0 +1,438 @@
+<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="fileCode">
+            <el-input
+              v-model="queryParams.fileCode"
+              placeholder="璇疯緭鍏ユ枃浠剁紪鍙�"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="鏂囦欢鍚嶇О" prop="fileName">
+            <el-input
+              v-model="queryParams.fileName"
+              placeholder="璇疯緭鍏ユ枃浠跺悕绉�"
+              clearable
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="鏂囦欢鍦板潃" prop="fileAddress">
+            <el-input
+              v-model="queryParams.fileAddress"
+              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 type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">楂樼骇鏌ヨ</el-button>-->
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+          </el-form-item>
+          <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px">
+          </el-form>
+        </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:processFile: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:processFile: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:processFile: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:processFile:export']"
+            >瀵煎嚭</el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <el-table border v-loading="loading" :data="processFileList" @selection-change="handleSelectionChange" v-if="processFileList.length > 0">
+          <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="processesCode">
+          </el-table-column>
+          <el-table-column label="宸ュ簭鍚嶇О" align="center" prop="processesName">
+          </el-table-column>
+          <el-table-column label="鏂囦欢缂栧彿" align="center" prop="fileCode">
+          </el-table-column>
+          <el-table-column label="鏂囦欢鍚嶇О" align="center" prop="fileName">
+          </el-table-column>
+          <el-table-column label="鏂囦欢鍦板潃" align="center" prop="fileAddress">
+          </el-table-column>
+          <el-table-column label="鐘舵��" align="center" prop="status">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+            </template>
+          </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 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:processFile:edit']"
+              >淇敼</el-button>
+              <el-button
+                size="mini"
+                type="danger"
+                plain
+                style="width: 72px"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['bs:processFile:remove']"
+              >鍒犻櫎</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      <el-empty v-else>
+        <span slot="description">鏆傛棤鏁版嵁</span>
+      </el-empty>
+    </el-card>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 娣诲姞鎴栦慨鏀瑰伐鑹烘枃妗e璇濇 -->
+    <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-input v-model="form.productCode" placeholder="璇烽�夋嫨浜у搧" >
+            <el-button slot="append" @click="handleSelectProduct" icon="el-icon-search"></el-button>
+          </el-input>
+          <ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
+        </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="processesCode">
+          <el-select style="width: 100%" @change="handleSelectChangeprocessesCode(form.processesCode)" v-model="form.processesCode" placeholder="璇烽�夋嫨宸ュ簭缂栧彿">
+            <el-option
+              v-for="item in options"
+              :key="item.processesCode"
+              :label="item.processesCode"
+              :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="鏂囦欢缂栧彿" prop="fileCode">
+          <el-input v-model="form.fileCode" placeholder="璇疯緭鍏ユ枃浠剁紪鍙�" />
+        </el-form-item>
+        <el-form-item label="鏂囦欢鍚嶇О" prop="fileName">
+          <el-input v-model="form.fileName" placeholder="璇疯緭鍏ユ枃浠跺悕绉�" />
+        </el-form-item>
+        <el-form-item label="鏂囦欢鍦板潃" prop="fileAddress">
+          <el-input v-model="form.fileAddress" 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.sys_normal_disable"
+              :key="dict.value"
+              :label="dict.value"
+            >{{dict.label}}</el-radio>
+          </el-radio-group>
+        </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 { listProcessFile, getProcessFile, delProcessFile, addProcessFile, updateProcessFile } from "@/api/main/bs/processFile/processFile";
+import {listProductBom} from "@/api/main/bs/ProductBom/ProductBom";
+import {listProcesses} from "@/api/main/bs/processes/processes";
+import ItemSelect from "@/components/itemSelect/single.vue";
+import {listTechnologyRoute} from "@/api/main/bs/technologyRoute/technologyRoute";
+
+
+export default {
+  name: "ProcessFile",
+  components: {ItemSelect},
+  dicts: ['sys_normal_disable'],
+  data() {
+    return {
+      // 閬僵灞�
+      loading: true,
+      titleName: "",
+      // 閫変腑鏁扮粍
+      ids: [],
+      options: [],
+      // 闈炲崟涓鐢�
+      single: true,
+      // 闈炲涓鐢�
+      multiple: true,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 宸ヨ壓鏂囨。琛ㄦ牸鏁版嵁
+      processFileList: [],
+      // 寮瑰嚭灞傛爣棰�
+      title: "",
+      // 鏄惁鏄剧ず寮瑰嚭灞�
+      open: false,
+      advancedShowSearch: false,
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        productCode: null,
+        productName: null,
+        processesCode: null,
+        processesName: null,
+        fileCode: null,
+        fileName: null,
+        fileAddress: null,
+        status: null,
+        createUser: null,
+        updateUser: null,
+        remarks: null
+      },
+      productCodeQueryParams:{
+        pageNum: 1,
+        pageSize: 10,
+        productCode: null,
+      },
+      processesCodeQueryParams:{
+        pageNum: 1,
+        pageSize: 10,
+        processesCode: null,
+      },
+      // 琛ㄥ崟鍙傛暟
+      form: {},
+      // 琛ㄥ崟鏍¢獙
+      rules: {
+        id: [
+          { required: true, message: "id涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        productCode: [
+          { required: true, message: "浜у搧缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        processesCode: [
+          { required: true, message: "宸ュ簭缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        fileCode: [
+          { required: true, message: "鏂囦欢缂栫爜涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        fileName: [
+          { required: true, message: "鏂囦欢鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.initProcesses();
+  },
+  methods: {
+
+    handleSelectChangeprocessesCode(selectedOption) {
+      this.processesCodeQueryParams.processesCode = selectedOption;
+      listProcesses(this.queryParams).then(response => {
+        this.form.processesName = response.rows[0].processesName;
+      });
+    },
+    initProcesses(){
+      listProcesses(this.queryParams).then(response => {
+        this.options = response.rows;
+      });
+    },
+    //鐗╂枡閫夋嫨寮瑰嚭妗�
+    onItemSelected(obj){
+      if(obj !== undefined && obj !== null){
+        let productCode = obj.materialCode;
+        this.form.productCode = productCode;
+        this.form.productName = obj.materialName;
+        this.queryParams.productCode = productCode
+        listTechnologyRoute(this.queryParams).then(response => {
+          this.form.routeCode = response.rows[0].routeCode;
+        });
+        listProductBom(this.queryParams).then(response => {
+          this.form.bomCode = response.rows[0].bomCode;
+        });
+      }
+    },
+    handleSelectProduct(){
+      this.$refs.itemSelect.showFlag = true;
+    },
+
+    advancedQuery(){
+      this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
+    },
+    /** 鏌ヨ宸ヨ壓鏂囨。鍒楄〃 */
+    getList() {
+      this.loading = true;
+      listProcessFile(this.queryParams).then(response => {
+        this.processFileList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 鍙栨秷鎸夐挳
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 琛ㄥ崟閲嶇疆
+    reset() {
+      this.form = {
+        id: null,
+        productCode: null,
+        productName: null,
+        processesCode: null,
+        processesName: null,
+        fileCode: null,
+        fileName: null,
+        fileAddress: null,
+        status: "0",
+        createUser: null,
+        createTime: null,
+        updateUser: null,
+        updateTime: null,
+        spareField1: null,
+        spareField2: null,
+        spareField3: null,
+        spareField4: 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
+      getProcessFile(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) {
+            updateProcessFile(this.form).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addProcessFile(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 delProcessFile(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => {});
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      this.download('bs/processFile/export', {
+        ...this.queryParams
+      }, `processFile_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

--
Gitblit v1.9.3