admin
2024-11-23 8494738306fa1796d1f3680511ce9a5ad67436ac
-工艺路线
已添加16个文件
已修改2个文件
1809 ■■■■■ 文件已修改
billion-main/src/main/java/com/billion/main/bs/controller/BsRouteChildInfoController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/controller/BsRouteInfoController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/domain/BsRouteChildInfo.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/domain/BsRouteInfo.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/mapper/BsRouteChildInfoMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/mapper/BsRouteInfoMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/service/IBsRouteChildInfoService.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/service/IBsRouteInfoService.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/service/impl/BsRouteChildInfoServiceImpl.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/service/impl/BsRouteInfoServiceImpl.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/da/service/impl/DaParamCollectionServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/resources/mapper/bs/BsRouteChildInfoMapper.xml 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/resources/mapper/bs/BsRouteInfoMapper.xml 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-ui/src/api/main/bs/routeChildInfo.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-ui/src/api/main/bs/routeInfo.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-ui/src/router/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-ui/src/views/main/bs/routeChildInfo/index.vue 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-ui/src/views/main/bs/routeInfo/index.vue 357 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-main/src/main/java/com/billion/main/bs/controller/BsRouteChildInfoController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.billion.main.bs.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.billion.common.annotation.Log;
import com.billion.common.core.controller.BaseController;
import com.billion.common.core.domain.AjaxResult;
import com.billion.common.enums.BusinessType;
import com.billion.main.bs.domain.BsRouteChildInfo;
import com.billion.main.bs.service.IBsRouteChildInfoService;
import com.billion.common.utils.poi.ExcelUtil;
import com.billion.common.core.page.TableDataInfo;
/**
 * å·¥è‰ºè·¯çº¿å­ä¿¡æ¯Controller
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
@RestController
@RequestMapping("/bs/routeChildInfo")
public class BsRouteChildInfoController extends BaseController
{
    @Autowired
    private IBsRouteChildInfoService bsRouteChildInfoService;
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsRouteChildInfo bsRouteChildInfo)
    {
        startPage();
        List<BsRouteChildInfo> list = bsRouteChildInfoService.selectBsRouteChildInfoList(bsRouteChildInfo);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºå·¥è‰ºè·¯çº¿å­ä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:export')")
    @Log(title = "工艺路线子信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsRouteChildInfo bsRouteChildInfo)
    {
        List<BsRouteChildInfo> list = bsRouteChildInfoService.selectBsRouteChildInfoList(bsRouteChildInfo);
        ExcelUtil<BsRouteChildInfo> util = new ExcelUtil<BsRouteChildInfo>(BsRouteChildInfo.class);
        util.exportExcel(response, list, "工艺路线子信息数据");
    }
    /**
     * èŽ·å–工艺路线子信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bsRouteChildInfoService.selectBsRouteChildInfoById(id));
    }
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:add')")
    @Log(title = "工艺路线子信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsRouteChildInfo bsRouteChildInfo)
    {
        return toAjax(bsRouteChildInfoService.insertBsRouteChildInfo(bsRouteChildInfo));
    }
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:edit')")
    @Log(title = "工艺路线子信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsRouteChildInfo bsRouteChildInfo)
    {
        return toAjax(bsRouteChildInfoService.updateBsRouteChildInfo(bsRouteChildInfo));
    }
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:routeChildInfo:remove')")
    @Log(title = "工艺路线子信息", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(bsRouteChildInfoService.deleteBsRouteChildInfoByIds(ids));
    }
}
billion-main/src/main/java/com/billion/main/bs/controller/BsRouteInfoController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.billion.main.bs.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.billion.common.annotation.Log;
import com.billion.common.core.controller.BaseController;
import com.billion.common.core.domain.AjaxResult;
import com.billion.common.enums.BusinessType;
import com.billion.main.bs.domain.BsRouteInfo;
import com.billion.main.bs.service.IBsRouteInfoService;
import com.billion.common.utils.poi.ExcelUtil;
import com.billion.common.core.page.TableDataInfo;
/**
 * å·¥è‰ºè·¯çº¿Controller
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
@RestController
@RequestMapping("/bs/routeInfo")
public class BsRouteInfoController extends BaseController
{
    @Autowired
    private IBsRouteInfoService bsRouteInfoService;
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:routeInfo:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsRouteInfo bsRouteInfo)
    {
        startPage();
        List<BsRouteInfo> list = bsRouteInfoService.selectBsRouteInfoList(bsRouteInfo);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºå·¥è‰ºè·¯çº¿åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:routeInfo:export')")
    @Log(title = "工艺路线", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsRouteInfo bsRouteInfo)
    {
        List<BsRouteInfo> list = bsRouteInfoService.selectBsRouteInfoList(bsRouteInfo);
        ExcelUtil<BsRouteInfo> util = new ExcelUtil<BsRouteInfo>(BsRouteInfo.class);
        util.exportExcel(response, list, "工艺路线数据");
    }
    /**
     * èŽ·å–工艺路线详细信息
     */
    @PreAuthorize("@ss.hasPermi('bs:routeInfo:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bsRouteInfoService.selectBsRouteInfoById(id));
    }
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿
     */
    @PreAuthorize("@ss.hasPermi('bs:routeInfo:add')")
    @Log(title = "工艺路线", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsRouteInfo bsRouteInfo)
    {
        return toAjax(bsRouteInfoService.insertBsRouteInfo(bsRouteInfo));
    }
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿
     */
    @PreAuthorize("@ss.hasPermi('bs:routeInfo:edit')")
    @Log(title = "工艺路线", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsRouteInfo bsRouteInfo)
    {
        return toAjax(bsRouteInfoService.updateBsRouteInfo(bsRouteInfo));
    }
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿
     */
    @PreAuthorize("@ss.hasPermi('bs:routeInfo:remove')")
    @Log(title = "工艺路线", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(bsRouteInfoService.deleteBsRouteInfoByIds(ids));
    }
}
billion-main/src/main/java/com/billion/main/bs/domain/BsRouteChildInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
package com.billion.main.bs.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.billion.common.annotation.Excel;
import com.billion.main.common.BaseEntity;
/**
 * å·¥è‰ºè·¯çº¿å­ä¿¡æ¯å¯¹è±¡ bs_route_child_info
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
@Data
public class BsRouteChildInfo 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 locationCode;
    /** å·¥ä½åç§° */
    @Excel(name = "工位名称")
    private String locationName;
    /** åŠ å·¥é¡ºåº */
    @Excel(name = "加工顺序")
    private Long stepNo;
    /** é€»è¾‘删除 */
    private String delFlag;
    /** æµç¨‹ç¼–码 */
    @Excel(name = "流程编码")
    private String routeCode;
}
billion-main/src/main/java/com/billion/main/bs/domain/BsRouteInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
package com.billion.main.bs.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.billion.common.annotation.Excel;
import com.billion.main.common.BaseEntity;
/**
 * å·¥è‰ºè·¯çº¿å¯¹è±¡ bs_route_info
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
@Data
public class BsRouteInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** æµç¨‹ç¼–码 */
    @Excel(name = "流程编码")
    private String routeCode;
    /** æµç¨‹åç§° */
    @Excel(name = "流程名称")
    private String routeName;
    /** äº§å“ç¼–码 */
    @Excel(name = "产品编码")
    private String productCode;
    /** äº§å“åç§° */
    @Excel(name = "产品名称")
    private String productName;
    /** ç‰ˆæœ¬ */
    @Excel(name = "版本")
    private String version;
    /** çŠ¶æ€(字典) */
    @Excel(name = "状态(字典)")
    private String status;
    /** æ•°æ®æ¥æº */
    @Excel(name = "数据来源")
    private String dataSource;
    /** é€»è¾‘删除 */
    private String delFlag;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remark;
}
billion-main/src/main/java/com/billion/main/bs/mapper/BsRouteChildInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.billion.main.bs.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.billion.main.bs.domain.BsRouteChildInfo;
/**
 * å·¥è‰ºè·¯çº¿å­ä¿¡æ¯Mapper接口
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
public interface BsRouteChildInfoMapper extends BaseMapper<BsRouteChildInfo>
{
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¸»é”®
     * @return å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     */
    public BsRouteChildInfo selectBsRouteChildInfoById(Long id);
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯åˆ—表
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return å·¥è‰ºè·¯çº¿å­ä¿¡æ¯é›†åˆ
     */
    public List<BsRouteChildInfo> selectBsRouteChildInfoList(BsRouteChildInfo bsRouteChildInfo);
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo);
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo);
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsRouteChildInfoById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsRouteChildInfoByIds(Long[] ids);
}
billion-main/src/main/java/com/billion/main/bs/mapper/BsRouteInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.billion.main.bs.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.billion.main.bs.domain.BsRouteInfo;
/**
 * å·¥è‰ºè·¯çº¿Mapper接口
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
public interface BsRouteInfoMapper extends BaseMapper<BsRouteInfo>
{
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿
     *
     * @param id å·¥è‰ºè·¯çº¿ä¸»é”®
     * @return å·¥è‰ºè·¯çº¿
     */
    public BsRouteInfo selectBsRouteInfoById(Long id);
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿åˆ—表
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return å·¥è‰ºè·¯çº¿é›†åˆ
     */
    public List<BsRouteInfo> selectBsRouteInfoList(BsRouteInfo bsRouteInfo);
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return ç»“æžœ
     */
    public int insertBsRouteInfo(BsRouteInfo bsRouteInfo);
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return ç»“æžœ
     */
    public int updateBsRouteInfo(BsRouteInfo bsRouteInfo);
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿
     *
     * @param id å·¥è‰ºè·¯çº¿ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsRouteInfoById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤å·¥è‰ºè·¯çº¿
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsRouteInfoByIds(Long[] ids);
}
billion-main/src/main/java/com/billion/main/bs/service/IBsRouteChildInfoService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.billion.main.bs.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.billion.main.bs.domain.BsRouteChildInfo;
/**
 * å·¥è‰ºè·¯çº¿å­ä¿¡æ¯Service接口
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
public interface IBsRouteChildInfoService extends IService<BsRouteChildInfo>
{
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¸»é”®
     * @return å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     */
    public BsRouteChildInfo selectBsRouteChildInfoById(Long id);
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯åˆ—表
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return å·¥è‰ºè·¯çº¿å­ä¿¡æ¯é›†åˆ
     */
    public List<BsRouteChildInfo> selectBsRouteChildInfoList(BsRouteChildInfo bsRouteChildInfo);
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo);
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo);
    /**
     * æ‰¹é‡åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„工艺路线子信息主键集合
     * @return ç»“æžœ
     */
    public int deleteBsRouteChildInfoByIds(Long[] ids);
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsRouteChildInfoById(Long id);
}
billion-main/src/main/java/com/billion/main/bs/service/IBsRouteInfoService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.billion.main.bs.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.billion.main.bs.domain.BsRouteInfo;
/**
 * å·¥è‰ºè·¯çº¿Service接口
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
public interface IBsRouteInfoService extends IService<BsRouteInfo>
{
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿
     *
     * @param id å·¥è‰ºè·¯çº¿ä¸»é”®
     * @return å·¥è‰ºè·¯çº¿
     */
    public BsRouteInfo selectBsRouteInfoById(Long id);
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿åˆ—表
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return å·¥è‰ºè·¯çº¿é›†åˆ
     */
    public List<BsRouteInfo> selectBsRouteInfoList(BsRouteInfo bsRouteInfo);
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return ç»“æžœ
     */
    public int insertBsRouteInfo(BsRouteInfo bsRouteInfo);
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return ç»“æžœ
     */
    public int updateBsRouteInfo(BsRouteInfo bsRouteInfo);
    /**
     * æ‰¹é‡åˆ é™¤å·¥è‰ºè·¯çº¿
     *
     * @param ids éœ€è¦åˆ é™¤çš„工艺路线主键集合
     * @return ç»“æžœ
     */
    public int deleteBsRouteInfoByIds(Long[] ids);
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsRouteInfoById(Long id);
}
billion-main/src/main/java/com/billion/main/bs/service/impl/BsRouteChildInfoServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.billion.main.bs.service.impl;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.billion.common.utils.DateUtils;
import com.billion.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.billion.main.bs.mapper.BsRouteChildInfoMapper;
import com.billion.main.bs.domain.BsRouteChildInfo;
import com.billion.main.bs.service.IBsRouteChildInfoService;
import static org.apache.commons.lang3.SystemUtils.getUserName;
/**
 * å·¥è‰ºè·¯çº¿å­ä¿¡æ¯Service业务层处理
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
@Service
public class BsRouteChildInfoServiceImpl extends ServiceImpl<BsRouteChildInfoMapper, BsRouteChildInfo> implements IBsRouteChildInfoService
{
    @Autowired
    private BsRouteChildInfoMapper bsRouteChildInfoMapper;
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¸»é”®
     * @return å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     */
    @Override
    public BsRouteChildInfo selectBsRouteChildInfoById(Long id)
    {
        return bsRouteChildInfoMapper.selectBsRouteChildInfoById(id);
    }
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯åˆ—表
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     */
    @Override
    public List<BsRouteChildInfo> selectBsRouteChildInfoList(BsRouteChildInfo bsRouteChildInfo)
    {
        return bsRouteChildInfoMapper.selectBsRouteChildInfoList(bsRouteChildInfo);
    }
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int insertBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo)
    {
        bsRouteChildInfo.setCreateTime(DateUtils.getNowDate());
        bsRouteChildInfo.setCreateBy(getUserName());
        return bsRouteChildInfoMapper.insertBsRouteChildInfo(bsRouteChildInfo);
    }
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param bsRouteChildInfo å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int updateBsRouteChildInfo(BsRouteChildInfo bsRouteChildInfo)
    {
        bsRouteChildInfo.setUpdateTime(DateUtils.getNowDate());
        bsRouteChildInfo.setUpdateBy(getUserName());
        return bsRouteChildInfoMapper.updateBsRouteChildInfo(bsRouteChildInfo);
    }
    /**
     * æ‰¹é‡åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„工艺路线子信息主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsRouteChildInfoByIds(Long[] ids)
    {
        return bsRouteChildInfoMapper.deleteBsRouteChildInfoByIds(ids);
    }
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿å­ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsRouteChildInfoById(Long id)
    {
        return bsRouteChildInfoMapper.deleteBsRouteChildInfoById(id);
    }
}
billion-main/src/main/java/com/billion/main/bs/service/impl/BsRouteInfoServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,105 @@
package com.billion.main.bs.service.impl;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.billion.common.utils.DateUtils;
import com.billion.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.billion.main.bs.mapper.BsRouteInfoMapper;
import com.billion.main.bs.domain.BsRouteInfo;
import com.billion.main.bs.service.IBsRouteInfoService;
import static org.apache.commons.lang3.SystemUtils.getUserName;
/**
 * å·¥è‰ºè·¯çº¿Service业务层处理
 *
 * @author Billion-Yi
 * @date 2024-11-23
 */
@Service
public class BsRouteInfoServiceImpl extends ServiceImpl<BsRouteInfoMapper, BsRouteInfo> implements IBsRouteInfoService
{
    @Autowired
    private BsRouteInfoMapper bsRouteInfoMapper;
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿
     *
     * @param id å·¥è‰ºè·¯çº¿ä¸»é”®
     * @return å·¥è‰ºè·¯çº¿
     */
    @Override
    public BsRouteInfo selectBsRouteInfoById(Long id)
    {
        return bsRouteInfoMapper.selectBsRouteInfoById(id);
    }
    /**
     * æŸ¥è¯¢å·¥è‰ºè·¯çº¿åˆ—表
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return å·¥è‰ºè·¯çº¿
     */
    @Override
    public List<BsRouteInfo> selectBsRouteInfoList(BsRouteInfo bsRouteInfo)
    {
        return bsRouteInfoMapper.selectBsRouteInfoList(bsRouteInfo);
    }
    /**
     * æ–°å¢žå·¥è‰ºè·¯çº¿
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return ç»“æžœ
     */
    @Override
    public int insertBsRouteInfo(BsRouteInfo bsRouteInfo)
    {
        bsRouteInfo.setCreateTime(DateUtils.getNowDate());
        bsRouteInfo.setCreateBy(getUserName());
        bsRouteInfo.setDataSource("MES");
        return bsRouteInfoMapper.insertBsRouteInfo(bsRouteInfo);
    }
    /**
     * ä¿®æ”¹å·¥è‰ºè·¯çº¿
     *
     * @param bsRouteInfo å·¥è‰ºè·¯çº¿
     * @return ç»“æžœ
     */
    @Override
    public int updateBsRouteInfo(BsRouteInfo bsRouteInfo)
    {
        bsRouteInfo.setUpdateTime(DateUtils.getNowDate());
        bsRouteInfo.setUpdateBy(getUserName());
        return bsRouteInfoMapper.updateBsRouteInfo(bsRouteInfo);
    }
    /**
     * æ‰¹é‡åˆ é™¤å·¥è‰ºè·¯çº¿
     *
     * @param ids éœ€è¦åˆ é™¤çš„工艺路线主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsRouteInfoByIds(Long[] ids)
    {
        return bsRouteInfoMapper.deleteBsRouteInfoByIds(ids);
    }
    /**
     * åˆ é™¤å·¥è‰ºè·¯çº¿ä¿¡æ¯
     *
     * @param id å·¥è‰ºè·¯çº¿ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsRouteInfoById(Long id)
    {
        return bsRouteInfoMapper.deleteBsRouteInfoById(id);
    }
}
billion-main/src/main/java/com/billion/main/da/service/impl/DaParamCollectionServiceImpl.java
@@ -5,11 +5,14 @@
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.billion.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.billion.main.da.mapper.DaParamCollectionMapper;
import com.billion.main.da.domain.DaParamCollection;
import com.billion.main.da.service.IDaParamCollectionService;
import static org.apache.commons.lang3.SystemUtils.getUserName;
/**
 * å‚数采集Service业务层处理
@@ -61,6 +64,7 @@
    public int insertDaParamCollection(DaParamCollection daParamCollection)
    {
        daParamCollection.setCollectTime(new Date());
        daParamCollection.setCreateBy(getUserName());
        return daParamCollectionMapper.insertDaParamCollection(daParamCollection);
    }
billion-main/src/main/resources/mapper/bs/BsRouteChildInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
<?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.billion.main.bs.mapper.BsRouteChildInfoMapper">
    <resultMap type="BsRouteChildInfo" id="BsRouteChildInfoResult">
        <result property="id"    column="id"    />
        <result property="productCode"    column="product_code"    />
        <result property="productName"    column="product_name"    />
        <result property="locationCode"    column="location_code"    />
        <result property="locationName"    column="location_name"    />
        <result property="stepNo"    column="step_no"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="routeCode"    column="route_code"    />
    </resultMap>
    <sql id="selectBsRouteChildInfoVo">
        select id, product_code, product_name, location_code, location_name, step_no, create_by, create_time, update_by, update_time, del_flag, route_code from bs_route_child_info
    </sql>
    <select id="selectBsRouteChildInfoList" parameterType="BsRouteChildInfo" resultMap="BsRouteChildInfoResult">
        <include refid="selectBsRouteChildInfoVo"/>
        <where>
            <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
            <if test="locationCode != null  and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if>
            <if test="locationName != null  and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
            <if test="routeCode != null  and routeCode != ''"> and route_code = #{routeCode}</if>
        </where>
    </select>
    <select id="selectBsRouteChildInfoById" parameterType="Long" resultMap="BsRouteChildInfoResult">
        <include refid="selectBsRouteChildInfoVo"/>
        where id = #{id}
    </select>
    <insert id="insertBsRouteChildInfo" parameterType="BsRouteChildInfo">
        insert into bs_route_child_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="productCode != null and productCode != ''">product_code,</if>
            <if test="productName != null">product_name,</if>
            <if test="locationCode != null and locationCode != ''">location_code,</if>
            <if test="locationName != null">location_name,</if>
            <if test="stepNo != null">step_no,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="delFlag != null">del_flag,</if>
            <if test="routeCode != null">route_code,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="productCode != null and productCode != ''">#{productCode},</if>
            <if test="productName != null">#{productName},</if>
            <if test="locationCode != null and locationCode != ''">#{locationCode},</if>
            <if test="locationName != null">#{locationName},</if>
            <if test="stepNo != null">#{stepNo},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="routeCode != null">#{routeCode},</if>
         </trim>
    </insert>
    <update id="updateBsRouteChildInfo" parameterType="BsRouteChildInfo">
        update bs_route_child_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
            <if test="productName != null">product_name = #{productName},</if>
            <if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
            <if test="locationName != null">location_name = #{locationName},</if>
            <if test="stepNo != null">step_no = #{stepNo},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="routeCode != null">route_code = #{routeCode},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteBsRouteChildInfoById" parameterType="Long">
        delete from bs_route_child_info where id = #{id}
    </delete>
    <delete id="deleteBsRouteChildInfoByIds" parameterType="String">
        delete from bs_route_child_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
billion-main/src/main/resources/mapper/bs/BsRouteInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,111 @@
<?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.billion.main.bs.mapper.BsRouteInfoMapper">
    <resultMap type="BsRouteInfo" id="BsRouteInfoResult">
        <result property="id"    column="id"    />
        <result property="routeCode"    column="route_code"    />
        <result property="routeName"    column="route_name"    />
        <result property="productCode"    column="product_code"    />
        <result property="productName"    column="product_name"    />
        <result property="version"    column="version"    />
        <result property="status"    column="status"    />
        <result property="dataSource"    column="data_source"    />
        <result property="remark"    column="remark"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="delFlag"    column="del_flag"    />
    </resultMap>
    <sql id="selectBsRouteInfoVo">
        select id, route_code, route_name, product_code, product_name, version, status, data_source, remark, create_by, create_time, update_by, update_time, del_flag from bs_route_info
    </sql>
    <select id="selectBsRouteInfoList" parameterType="BsRouteInfo" resultMap="BsRouteInfoResult">
        <include refid="selectBsRouteInfoVo"/>
        <where>
            <if test="routeCode != null  and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if>
            <if test="routeName != null  and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if>
            <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
            <if test="version != null  and version != ''"> and version like concat('%', #{version}, '%')</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
        </where>
    </select>
    <select id="selectBsRouteInfoById" parameterType="Long" resultMap="BsRouteInfoResult">
        <include refid="selectBsRouteInfoVo"/>
        where id = #{id}
    </select>
    <insert id="insertBsRouteInfo" parameterType="BsRouteInfo">
        insert into bs_route_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="routeCode != null and routeCode != ''">route_code,</if>
            <if test="routeName != null">route_name,</if>
            <if test="productCode != null and productCode != ''">product_code,</if>
            <if test="productName != null">product_name,</if>
            <if test="version != null">version,</if>
            <if test="status != null">status,</if>
            <if test="dataSource != null">data_source,</if>
            <if test="remark != null">remark,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="delFlag != null">del_flag,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="routeCode != null and routeCode != ''">#{routeCode},</if>
            <if test="routeName != null">#{routeName},</if>
            <if test="productCode != null and productCode != ''">#{productCode},</if>
            <if test="productName != null">#{productName},</if>
            <if test="version != null">#{version},</if>
            <if test="status != null">#{status},</if>
            <if test="dataSource != null">#{dataSource},</if>
            <if test="remark != null">#{remark},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="delFlag != null">#{delFlag},</if>
         </trim>
    </insert>
    <update id="updateBsRouteInfo" parameterType="BsRouteInfo">
        update bs_route_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="routeCode != null and routeCode != ''">route_code = #{routeCode},</if>
            <if test="routeName != null">route_name = #{routeName},</if>
            <if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
            <if test="productName != null">product_name = #{productName},</if>
            <if test="version != null">version = #{version},</if>
            <if test="status != null">status = #{status},</if>
            <if test="dataSource != null">data_source = #{dataSource},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteBsRouteInfoById" parameterType="Long">
        delete from bs_route_info where id = #{id}
    </delete>
    <delete id="deleteBsRouteInfoByIds" parameterType="String">
        delete from bs_route_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
billion-ui/src/api/main/bs/routeChildInfo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯åˆ—表
export function listRouteChildInfo(query) {
  return request({
    url: '/bs/routeChildInfo/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯è¯¦ç»†
export function getRouteChildInfo(id) {
  return request({
    url: '/bs/routeChildInfo/' + id,
    method: 'get'
  })
}
// æ–°å¢žå·¥è‰ºè·¯çº¿å­ä¿¡æ¯
export function addRouteChildInfo(data) {
  return request({
    url: '/bs/routeChildInfo',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
export function updateRouteChildInfo(data) {
  return request({
    url: '/bs/routeChildInfo',
    method: 'put',
    data: data
  })
}
// åˆ é™¤å·¥è‰ºè·¯çº¿å­ä¿¡æ¯
export function delRouteChildInfo(id) {
  return request({
    url: '/bs/routeChildInfo/' + id,
    method: 'delete'
  })
}
billion-ui/src/api/main/bs/routeInfo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢å·¥è‰ºè·¯çº¿åˆ—表
export function listRouteInfo(query) {
  return request({
    url: '/bs/routeInfo/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢å·¥è‰ºè·¯çº¿è¯¦ç»†
export function getRouteInfo(id) {
  return request({
    url: '/bs/routeInfo/' + id,
    method: 'get'
  })
}
// æ–°å¢žå·¥è‰ºè·¯çº¿
export function addRouteInfo(data) {
  return request({
    url: '/bs/routeInfo',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹å·¥è‰ºè·¯çº¿
export function updateRouteInfo(data) {
  return request({
    url: '/bs/routeInfo',
    method: 'put',
    data: data
  })
}
// åˆ é™¤å·¥è‰ºè·¯çº¿
export function delRouteInfo(id) {
  return request({
    url: '/bs/routeInfo/' + id,
    method: 'delete'
  })
}
billion-ui/src/router/index.js
@@ -135,6 +135,20 @@
    ]
  },
  {
    path: '/main/route-data',
    component: Layout,
    hidden: true,
    permissions: ['bs:routeChildInfo:list'],
    children: [
      {
        path: 'index',
        component: () => import('@/views/main/bs/routeChildInfo/index'),
        name: 'Data',
        meta: { title: '工艺路线详情', activeMenu: '/main/bs/routeChildInfo' }
      }
    ]
  },
  {
    path: '/monitor/job-log',
    component: Layout,
    hidden: true,
billion-ui/src/views/main/bs/routeChildInfo/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,354 @@
<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="locationCode">
        <el-input
          v-model="queryParams.locationCode"
          placeholder="请输入工位编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="工位名称" prop="locationName">
        <el-input
          v-model="queryParams.locationName"
          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-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">高级查询</el-button>
      </el-form-item>
      <transition name="fade">
        <div v-if="advancedSearchVisible" class="advanced-search">
          <el-form-item label="产品编码" prop="productCode">
            <el-input
              v-model="queryParams.productCode"
              placeholder="请输入产品编码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="产品名称" prop="productName">
            <el-input
              v-model="queryParams.productName"
              placeholder="请输入产品名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="流程编码" prop="routeCode">
            <el-input
              v-model="queryParams.routeCode"
              placeholder="请输入流程编码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </div>
      </transition>
    </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:routeChildInfo: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:routeChildInfo: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:routeChildInfo: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:routeChildInfo:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-close"
          size="mini"
          @click="handleClose"
        >关闭</el-button>
      </el-col>
    </el-row>
    <el-row>
      <el-descriptions class="margin-top" :column="4" label-style="font-weight: bold" content-style="font-weight: bold">
        <el-descriptions-item label="流程编码">{{this.queryParams.routeCode}}</el-descriptions-item>
        <el-descriptions-item label="流程名称">{{this.routeInfo[0].routeName}}</el-descriptions-item>
        <el-descriptions-item label="产品编码">{{this.routeInfo[0].productCode}}</el-descriptions-item>
        <el-descriptions-item label="产品名称">{{this.routeInfo[0].productName}}</el-descriptions-item>
      </el-descriptions>
    </el-row>
    <el-table border v-loading="loading" :data="routeChildInfoList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column show-overflow-tooltip="true" label="工位编码" align="center" prop="locationCode" />
      <el-table-column show-overflow-tooltip="true" label="工位名称" align="center" prop="locationName" />
      <el-table-column show-overflow-tooltip="true" label="加工顺序" align="center" prop="stepNo" />
      <el-table-column show-overflow-tooltip="true" label="产品编码" align="center" prop="productCode" />
      <el-table-column show-overflow-tooltip="true" label="产品名称" align="center" prop="productName" />
      <el-table-column show-overflow-tooltip="true" label="创建用户" align="center" prop="createBy" />
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
      </el-table-column>
      <el-table-column show-overflow-tooltip="true" label="更改用户" align="center" prop="updateBy" />
      <el-table-column label="更改时间" align="center" prop="updateTime" width="180">
      </el-table-column>
      <el-table-column show-overflow-tooltip="true" label="流程编码" align="center" prop="routeCode" />
    </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="主键id" prop="id">-->
<!--          <el-input v-model="form.id" placeholder="请输入主键id" />-->
<!--        </el-form-item>-->
        <el-form-item label="流程编码" prop="routeCode">
          <el-input :disabled="true"  v-model="form.routeCode" placeholder="请输入流程编码" />
        </el-form-item>
        <el-form-item label="产品编码" prop="productCode">
          <el-input :disabled="true" v-model="form.productCode" placeholder="请输入产品编码" />
        </el-form-item>
        <el-form-item label="产品名称" prop="productName">
          <el-input :disabled="true" v-model="form.productName" placeholder="请输入产品名称" />
        </el-form-item>
        <el-form-item label="工位编码" prop="locationCode">
          <el-input v-model="form.locationCode" placeholder="请输入工位编码" />
        </el-form-item>
        <el-form-item label="工位名称" prop="locationName">
          <el-input v-model="form.locationName" placeholder="请输入工位名称" />
        </el-form-item>
        <el-form-item label="加工顺序" prop="stepNo">
          <el-input v-model="form.stepNo" 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 { listRouteChildInfo, getRouteChildInfo, delRouteChildInfo, addRouteChildInfo, updateRouteChildInfo } from "@/api/main/bs/routeChildInfo";
import {listRouteInfo} from "@/api/main/bs/routeInfo";
export default {
  name: "RouteChildInfo",
  data() {
    return {
      advancedSearchVisible: false,
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // å·¥è‰ºè·¯çº¿å­ä¿¡æ¯è¡¨æ ¼æ•°æ®
      routeChildInfoList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        productCode: null,
        productName: null,
        locationCode: null,
        locationName: null,
        routeCode: null
      },
      // è¡¨å•å‚æ•°
      form: {
        routeCode: "12323",
      },
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
        locationCode: [
          { required: true, message: "工位编码不能为空", trigger: "blur" }
        ],
      },
      //父页面信息
      routeInfo: {
      }
    };
  },
  created() {
    let routeCode = this.$route.query.routeCode;
    this.queryParams.routeCode = routeCode;
    this.headerInformation();
    this.getList();
    console.log(this.routeInfo)
  },
  methods: {
    /** å·¥è‰ºæµç¨‹è¡¨å¤´ä¿¡æ¯ */
    headerInformation() {
      listRouteInfo(this.queryParams).then(response => {
        this.routeInfo = response.rows;
      });
    },
    toggleAdvancedSearch() {
      this.advancedSearchVisible = !this.advancedSearchVisible;
    },
    /** è¿”回按钮操作 */
    handleClose() {
      const obj = { path: "/main/bs/routeInfo" };
      this.$tab.closeOpenPage(obj);
    },
    /** æŸ¥è¯¢å·¥è‰ºè·¯çº¿å­ä¿¡æ¯åˆ—表 */
    getList() {
      this.loading = true;
      listRouteChildInfo(this.queryParams).then(response => {
        this.routeChildInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        productCode: this.routeInfo[0].productCode,
        productName: this.routeInfo[0].productName,
        locationCode: null,
        locationName: null,
        stepNo: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        delFlag: null,
        routeCode: this.queryParams.routeCode
      };
      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() {
      console.log(this.routeInfo)
      this.reset();
      this.open = true;
      this.title = "添加工艺路线子信息";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getRouteChildInfo(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) {
            updateRouteChildInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addRouteChildInfo(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除').then(function() {
        return delRouteChildInfo(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('bs/routeChildInfo/export', {
        ...this.queryParams
      }, `routeChildInfo_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
billion-ui/src/views/main/bs/routeInfo/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,357 @@
<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="routeCode">
        <el-input
          v-model="queryParams.routeCode"
          placeholder="请输入流程编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </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-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">高级查询</el-button>
      </el-form-item>
      <transition name="fade">
        <div v-if="advancedSearchVisible" class="advanced-search">
          <el-form-item label="产品名称" prop="productName">
            <el-input
              v-model="queryParams.productName"
              placeholder="请输入产品名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="流程名称" prop="routeName">
            <el-input
              v-model="queryParams.routeName"
              placeholder="请输入流程名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="版本" prop="version">
            <el-input
              v-model="queryParams.version"
              placeholder="请输入版本"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </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.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </div>
      </transition>
    </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:routeInfo: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:routeInfo: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:routeInfo: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:routeInfo:export']"
        >导出</el-button>
      </el-col>
    </el-row>
    <el-table border v-loading="loading" :data="routeInfoList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
<!--      <el-table-column show-overflow-tooltip="true" label="流程编码" align="center" prop="routeCode" />-->
      <el-table-column label="流程编码" align="center" :show-overflow-tooltip="true">
        <template slot-scope="scope">
          <router-link :to="{path: '/main/route-data/index/', query: {routeCode: scope.row.routeCode} }" class="link-type">
            <span>{{ scope.row.routeCode }}</span>
          </router-link>
        </template>
      </el-table-column>
      <el-table-column show-overflow-tooltip="true" label="流程名称" align="center" prop="routeName" />
      <el-table-column show-overflow-tooltip="true" label="产品编码" align="center" prop="productCode" />
      <el-table-column show-overflow-tooltip="true" label="产品名称" align="center" prop="productName" />
      <el-table-column show-overflow-tooltip="true" label="版本" align="center" prop="version" />
      <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 show-overflow-tooltip="true" label="数据来源" align="center" prop="dataSource" />
      <el-table-column show-overflow-tooltip="true" label="备注" align="center" prop="remark" />
      <el-table-column show-overflow-tooltip="true" label="创建用户" align="center" prop="createBy" />
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
      </el-table-column>
      <el-table-column show-overflow-tooltip="true" label="更改用户" align="center" prop="updateBy" />
      <el-table-column label="更改时间" align="center" prop="updateTime" width="180">
      </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="主键id" prop="id">-->
<!--          <el-input v-model="form.id" placeholder="请输入主键id" />-->
<!--        </el-form-item>-->
        <el-form-item label="流程编码" prop="routeCode">
          <el-input v-model="form.routeCode" placeholder="请输入流程编码" />
        </el-form-item>
        <el-form-item label="流程名称" prop="routeName">
          <el-input v-model="form.routeName" 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="productName">
          <el-input v-model="form.productName" placeholder="请输入产品名称" />
        </el-form-item>
        <el-form-item label="版本" prop="version">
          <el-input v-model="form.version" 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="dataSource">-->
<!--          <el-input v-model="form.dataSource" placeholder="请输入数据来源" />-->
<!--        </el-form-item>-->
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listRouteInfo, getRouteInfo, delRouteInfo, addRouteInfo, updateRouteInfo } from "@/api/main/bs/routeInfo";
export default {
  name: "RouteInfo",
  dicts: ['sys_normal_disable'],
  data() {
    return {
      advancedSearchVisible: false,
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // å·¥è‰ºè·¯çº¿è¡¨æ ¼æ•°æ®
      routeInfoList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        routeCode: null,
        routeName: null,
        productCode: null,
        productName: null,
        version: null,
        status: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
        routeCode: [
          { required: true, message: "流程编码不能为空", trigger: "blur" }
        ],
        productCode: [
          { required: true, message: "产品编码不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    toggleAdvancedSearch() {
      this.advancedSearchVisible = !this.advancedSearchVisible;
    },
    /** æŸ¥è¯¢å·¥è‰ºè·¯çº¿åˆ—表 */
    getList() {
      this.loading = true;
      listRouteInfo(this.queryParams).then(response => {
        this.routeInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        routeCode: null,
        routeName: null,
        productCode: null,
        productName: null,
        version: null,
        status: "0",
        dataSource: null,
        remark: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        delFlag: 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
      getRouteInfo(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) {
            updateRouteInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addRouteInfo(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除').then(function() {
        return delRouteInfo(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('bs/routeInfo/export', {
        ...this.queryParams
      }, `routeInfo_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>