懒羊羊
2023-12-26 4e2a0caf5a309945e8cb4f0b59922899afaaecf7
配方
已添加16个文件
2198 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formula/controller/BsFormulaInfoController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formula/domain/BsFormulaInfo.java 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formula/mapper/BsFormulaInfoMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formula/service/IBsFormulaInfoService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formula/service/impl/BsFormulaInfoServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/domain/BsFormulaChildInfo.java 301 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/mapper/BsFormulaChildInfoMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/IBsFormulaChildInfoService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/formula/BsFormulaInfoMapper.xml 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/formula/formula.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/formula/index.vue 345 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/formulaChild/index.vue 395 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formula/controller/BsFormulaInfoController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.bs.formula.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.formula.domain.BsFormulaInfo;
import com.jcdm.main.bs.formula.service.IBsFormulaInfoService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * é…æ–¹é…ç½®Controller
 *
 * @author ruimin
 * @date 2023-12-26
 */
@RestController
@RequestMapping("/bs/formula")
public class BsFormulaInfoController extends BaseController
{
    @Autowired
    private IBsFormulaInfoService bsFormulaInfoService;
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:formula:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsFormulaInfo bsFormulaInfo)
    {
        startPage();
        List<BsFormulaInfo> list = bsFormulaInfoService.selectBsFormulaInfoList(bsFormulaInfo);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºé…æ–¹é…ç½®åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:formula:export')")
    @Log(title = "配方配置", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsFormulaInfo bsFormulaInfo)
    {
        List<BsFormulaInfo> list = bsFormulaInfoService.selectBsFormulaInfoList(bsFormulaInfo);
        ExcelUtil<BsFormulaInfo> util = new ExcelUtil<BsFormulaInfo>(BsFormulaInfo.class);
        util.exportExcel(response, list, "配方配置数据");
    }
    /**
     * èŽ·å–配方配置详细信息
     */
    @PreAuthorize("@ss.hasPermi('bs:formula:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bsFormulaInfoService.selectBsFormulaInfoById(id));
    }
    /**
     * æ–°å¢žé…æ–¹é…ç½®
     */
    @PreAuthorize("@ss.hasPermi('bs:formula:add')")
    @Log(title = "配方配置", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsFormulaInfo bsFormulaInfo)
    {
        return toAjax(bsFormulaInfoService.insertBsFormulaInfo(bsFormulaInfo));
    }
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®
     */
    @PreAuthorize("@ss.hasPermi('bs:formula:edit')")
    @Log(title = "配方配置", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsFormulaInfo bsFormulaInfo)
    {
        return toAjax(bsFormulaInfoService.updateBsFormulaInfo(bsFormulaInfo));
    }
    /**
     * åˆ é™¤é…æ–¹é…ç½®
     */
    @PreAuthorize("@ss.hasPermi('bs:formula:remove')")
    @Log(title = "配方配置", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(bsFormulaInfoService.deleteBsFormulaInfoByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/formula/domain/BsFormulaInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,176 @@
package com.jcdm.main.bs.formula.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_formula_info
 *
 * @author ruimin
 * @date 2023-12-26
 */
public class BsFormulaInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** é…æ–¹ç¼–码 */
    @Excel(name = "配方编码")
    private String formulaCode;
    /** é…æ–¹åç§° */
    @Excel(name = "配方名称")
    private String formulaName;
    /** çŠ¶æ€ */
    @Excel(name = "状态")
    private String status;
    /** äº§å“ç¼–码 */
    @Excel(name = "产品编码")
    private String productCode;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ”¹ç”¨æˆ· */
    @Excel(name = "更改用户")
    private String updateUser;
    /** é¢„留字段1 */
    private String spareField1;
    /** é¢„留字段2 */
    private String spareField2;
    /** é¢„留字段3 */
    private String spareField3;
    /** é¢„留字段4 */
    private String spareField4;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setFormulaCode(String formulaCode)
    {
        this.formulaCode = formulaCode;
    }
    public String getFormulaCode()
    {
        return formulaCode;
    }
    public void setFormulaName(String formulaName)
    {
        this.formulaName = formulaName;
    }
    public String getFormulaName()
    {
        return formulaName;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }
    public String getStatus()
    {
        return status;
    }
    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }
    public String getProductCode()
    {
        return productCode;
    }
    public void setCreateUser(String createUser)
    {
        this.createUser = createUser;
    }
    public String getCreateUser()
    {
        return createUser;
    }
    public void setUpdateUser(String updateUser)
    {
        this.updateUser = updateUser;
    }
    public String getUpdateUser()
    {
        return updateUser;
    }
    public void setSpareField1(String spareField1)
    {
        this.spareField1 = spareField1;
    }
    public String getSpareField1()
    {
        return spareField1;
    }
    public void setSpareField2(String spareField2)
    {
        this.spareField2 = spareField2;
    }
    public String getSpareField2()
    {
        return spareField2;
    }
    public void setSpareField3(String spareField3)
    {
        this.spareField3 = spareField3;
    }
    public String getSpareField3()
    {
        return spareField3;
    }
    public void setSpareField4(String spareField4)
    {
        this.spareField4 = spareField4;
    }
    public String getSpareField4()
    {
        return spareField4;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("formulaCode", getFormulaCode())
            .append("formulaName", getFormulaName())
            .append("status", getStatus())
            .append("productCode", getProductCode())
            .append("remark", getRemark())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("spareField3", getSpareField3())
            .append("spareField4", getSpareField4())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/formula/mapper/BsFormulaInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.formula.mapper;
import java.util.List;
import com.jcdm.main.bs.formula.domain.BsFormulaInfo;
/**
 * é…æ–¹é…ç½®Mapper接口
 *
 * @author ruimin
 * @date 2023-12-26
 */
public interface BsFormulaInfoMapper
{
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®
     *
     * @param id é…æ–¹é…ç½®ä¸»é”®
     * @return é…æ–¹é…ç½®
     */
    public BsFormulaInfo selectBsFormulaInfoById(Long id);
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®åˆ—表
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return é…æ–¹é…ç½®é›†åˆ
     */
    public List<BsFormulaInfo> selectBsFormulaInfoList(BsFormulaInfo bsFormulaInfo);
    /**
     * æ–°å¢žé…æ–¹é…ç½®
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return ç»“æžœ
     */
    public int insertBsFormulaInfo(BsFormulaInfo bsFormulaInfo);
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return ç»“æžœ
     */
    public int updateBsFormulaInfo(BsFormulaInfo bsFormulaInfo);
    /**
     * åˆ é™¤é…æ–¹é…ç½®
     *
     * @param id é…æ–¹é…ç½®ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsFormulaInfoById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤é…æ–¹é…ç½®
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsFormulaInfoByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formula/service/IBsFormulaInfoService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.formula.service;
import java.util.List;
import com.jcdm.main.bs.formula.domain.BsFormulaInfo;
/**
 * é…æ–¹é…ç½®Service接口
 *
 * @author ruimin
 * @date 2023-12-26
 */
public interface IBsFormulaInfoService
{
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®
     *
     * @param id é…æ–¹é…ç½®ä¸»é”®
     * @return é…æ–¹é…ç½®
     */
    public BsFormulaInfo selectBsFormulaInfoById(Long id);
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®åˆ—表
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return é…æ–¹é…ç½®é›†åˆ
     */
    public List<BsFormulaInfo> selectBsFormulaInfoList(BsFormulaInfo bsFormulaInfo);
    /**
     * æ–°å¢žé…æ–¹é…ç½®
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return ç»“æžœ
     */
    public int insertBsFormulaInfo(BsFormulaInfo bsFormulaInfo);
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return ç»“æžœ
     */
    public int updateBsFormulaInfo(BsFormulaInfo bsFormulaInfo);
    /**
     * æ‰¹é‡åˆ é™¤é…æ–¹é…ç½®
     *
     * @param ids éœ€è¦åˆ é™¤çš„配方配置主键集合
     * @return ç»“æžœ
     */
    public int deleteBsFormulaInfoByIds(Long[] ids);
    /**
     * åˆ é™¤é…æ–¹é…ç½®ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsFormulaInfoById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formula/service/impl/BsFormulaInfoServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.bs.formula.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.formula.mapper.BsFormulaInfoMapper;
import com.jcdm.main.bs.formula.domain.BsFormulaInfo;
import com.jcdm.main.bs.formula.service.IBsFormulaInfoService;
/**
 * é…æ–¹é…ç½®Service业务层处理
 *
 * @author ruimin
 * @date 2023-12-26
 */
@Service
public class BsFormulaInfoServiceImpl implements IBsFormulaInfoService
{
    @Autowired
    private BsFormulaInfoMapper bsFormulaInfoMapper;
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®
     *
     * @param id é…æ–¹é…ç½®ä¸»é”®
     * @return é…æ–¹é…ç½®
     */
    @Override
    public BsFormulaInfo selectBsFormulaInfoById(Long id)
    {
        return bsFormulaInfoMapper.selectBsFormulaInfoById(id);
    }
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®åˆ—表
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return é…æ–¹é…ç½®
     */
    @Override
    public List<BsFormulaInfo> selectBsFormulaInfoList(BsFormulaInfo bsFormulaInfo)
    {
        return bsFormulaInfoMapper.selectBsFormulaInfoList(bsFormulaInfo);
    }
    /**
     * æ–°å¢žé…æ–¹é…ç½®
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return ç»“æžœ
     */
    @Override
    public int insertBsFormulaInfo(BsFormulaInfo bsFormulaInfo)
    {
        bsFormulaInfo.setCreateTime(DateUtils.getNowDate());
        return bsFormulaInfoMapper.insertBsFormulaInfo(bsFormulaInfo);
    }
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®
     *
     * @param bsFormulaInfo é…æ–¹é…ç½®
     * @return ç»“æžœ
     */
    @Override
    public int updateBsFormulaInfo(BsFormulaInfo bsFormulaInfo)
    {
        bsFormulaInfo.setUpdateTime(DateUtils.getNowDate());
        return bsFormulaInfoMapper.updateBsFormulaInfo(bsFormulaInfo);
    }
    /**
     * æ‰¹é‡åˆ é™¤é…æ–¹é…ç½®
     *
     * @param ids éœ€è¦åˆ é™¤çš„配方配置主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsFormulaInfoByIds(Long[] ids)
    {
        return bsFormulaInfoMapper.deleteBsFormulaInfoByIds(ids);
    }
    /**
     * åˆ é™¤é…æ–¹é…ç½®ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsFormulaInfoById(Long id)
    {
        return bsFormulaInfoMapper.deleteBsFormulaInfoById(id);
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.bs.formulaChild.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.formulaChild.domain.BsFormulaChildInfo;
import com.jcdm.main.bs.formulaChild.service.IBsFormulaChildInfoService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * é…æ–¹é…ç½®å­ä¿¡æ¯Controller
 *
 * @author ruimin
 * @date 2023-12-26
 */
@RestController
@RequestMapping("/bs/formulaChild")
public class BsFormulaChildInfoController extends BaseController
{
    @Autowired
    private IBsFormulaChildInfoService bsFormulaChildInfoService;
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsFormulaChildInfo bsFormulaChildInfo)
    {
        startPage();
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºé…æ–¹é…ç½®å­ä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:export')")
    @Log(title = "配方配置子信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsFormulaChildInfo bsFormulaChildInfo)
    {
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo);
        ExcelUtil<BsFormulaChildInfo> util = new ExcelUtil<BsFormulaChildInfo>(BsFormulaChildInfo.class);
        util.exportExcel(response, list, "配方配置子信息数据");
    }
    /**
     * èŽ·å–配方配置子信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bsFormulaChildInfoService.selectBsFormulaChildInfoById(id));
    }
    /**
     * æ–°å¢žé…æ–¹é…ç½®å­ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:add')")
    @Log(title = "配方配置子信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsFormulaChildInfo bsFormulaChildInfo)
    {
        return toAjax(bsFormulaChildInfoService.insertBsFormulaChildInfo(bsFormulaChildInfo));
    }
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®å­ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:edit')")
    @Log(title = "配方配置子信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsFormulaChildInfo bsFormulaChildInfo)
    {
        return toAjax(bsFormulaChildInfoService.updateBsFormulaChildInfo(bsFormulaChildInfo));
    }
    /**
     * åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:remove')")
    @Log(title = "配方配置子信息", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(bsFormulaChildInfoService.deleteBsFormulaChildInfoByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/domain/BsFormulaChildInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,301 @@
package com.jcdm.main.bs.formulaChild.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_formula_child_info
 *
 * @author ruimin
 * @date 2023-12-26
 */
public class BsFormulaChildInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** id */
    private Long id;
    /** è½¦é—´ */
    @Excel(name = "车间")
    private String workshopCode;
    /** äº§çº¿ */
    @Excel(name = "产线")
    private String lineCode;
    /** å·¥åº */
    @Excel(name = "工序")
    private String processesCode;
    /** äº§å“ç¼–号 */
    @Excel(name = "产品编号")
    private String productCode;
    /** æ“ä½œå†…容 */
    @Excel(name = "操作内容")
    private String operationSteps;
    /** æŠ€æœ¯è¦æ±‚ */
    @Excel(name = "技术要求")
    private String techRequirement;
    /** ç±»åž‹ï¼ˆæ‰«æäº§å“æ¡ç 1、扫描物料条码2、拧紧类3) */
    @Excel(name = "类型", readConverterExp = "扫=描产品条码1、扫描物料条码2、拧紧类3")
    private String operationType;
    /** æŽ’序 */
    @Excel(name = "排序")
    private String stepSort;
    /** å‚数编码 */
    @Excel(name = "参数编码")
    private String paramCode;
    /** ç‰©æ–™ç¼–码 */
    @Excel(name = "物料编码")
    private String materialCode;
    /** é…æ–¹ç¼–码 */
    @Excel(name = "配方编码")
    private String formulaCode;
    /** å›¾ç‰‡ */
    @Excel(name = "图片")
    private String picture;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ”¹ç”¨æˆ· */
    @Excel(name = "更改用户")
    private String updateUser;
    /** é¢„留字段1 */
    private String spareField1;
    /** é¢„留字段2 */
    private String spareField2;
    /** é¢„留字段3 */
    private String spareField3;
    /** é¢„留字段4 */
    private String spareField4;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setWorkshopCode(String workshopCode)
    {
        this.workshopCode = workshopCode;
    }
    public String getWorkshopCode()
    {
        return workshopCode;
    }
    public void setLineCode(String lineCode)
    {
        this.lineCode = lineCode;
    }
    public String getLineCode()
    {
        return lineCode;
    }
    public void setProcessesCode(String processesCode)
    {
        this.processesCode = processesCode;
    }
    public String getProcessesCode()
    {
        return processesCode;
    }
    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }
    public String getProductCode()
    {
        return productCode;
    }
    public void setOperationSteps(String operationSteps)
    {
        this.operationSteps = operationSteps;
    }
    public String getOperationSteps()
    {
        return operationSteps;
    }
    public void setTechRequirement(String techRequirement)
    {
        this.techRequirement = techRequirement;
    }
    public String getTechRequirement()
    {
        return techRequirement;
    }
    public void setOperationType(String operationType)
    {
        this.operationType = operationType;
    }
    public String getOperationType()
    {
        return operationType;
    }
    public void setStepSort(String stepSort)
    {
        this.stepSort = stepSort;
    }
    public String getStepSort()
    {
        return stepSort;
    }
    public void setParamCode(String paramCode)
    {
        this.paramCode = paramCode;
    }
    public String getParamCode()
    {
        return paramCode;
    }
    public void setMaterialCode(String materialCode)
    {
        this.materialCode = materialCode;
    }
    public String getMaterialCode()
    {
        return materialCode;
    }
    public void setFormulaCode(String formulaCode)
    {
        this.formulaCode = formulaCode;
    }
    public String getFormulaCode()
    {
        return formulaCode;
    }
    public void setPicture(String picture)
    {
        this.picture = picture;
    }
    public String getPicture()
    {
        return picture;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }
    public String getRemarks()
    {
        return remarks;
    }
    public void setCreateUser(String createUser)
    {
        this.createUser = createUser;
    }
    public String getCreateUser()
    {
        return createUser;
    }
    public void setUpdateUser(String updateUser)
    {
        this.updateUser = updateUser;
    }
    public String getUpdateUser()
    {
        return updateUser;
    }
    public void setSpareField1(String spareField1)
    {
        this.spareField1 = spareField1;
    }
    public String getSpareField1()
    {
        return spareField1;
    }
    public void setSpareField2(String spareField2)
    {
        this.spareField2 = spareField2;
    }
    public String getSpareField2()
    {
        return spareField2;
    }
    public void setSpareField3(String spareField3)
    {
        this.spareField3 = spareField3;
    }
    public String getSpareField3()
    {
        return spareField3;
    }
    public void setSpareField4(String spareField4)
    {
        this.spareField4 = spareField4;
    }
    public String getSpareField4()
    {
        return spareField4;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("workshopCode", getWorkshopCode())
            .append("lineCode", getLineCode())
            .append("processesCode", getProcessesCode())
            .append("productCode", getProductCode())
            .append("operationSteps", getOperationSteps())
            .append("techRequirement", getTechRequirement())
            .append("operationType", getOperationType())
            .append("stepSort", getStepSort())
            .append("paramCode", getParamCode())
            .append("materialCode", getMaterialCode())
            .append("formulaCode", getFormulaCode())
            .append("picture", getPicture())
            .append("remarks", getRemarks())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("spareField3", getSpareField3())
            .append("spareField4", getSpareField4())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/mapper/BsFormulaChildInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.formulaChild.mapper;
import java.util.List;
import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo;
/**
 * é…æ–¹é…ç½®å­ä¿¡æ¯Mapper接口
 *
 * @author ruimin
 * @date 2023-12-26
 */
public interface BsFormulaChildInfoMapper
{
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®å­ä¿¡æ¯ä¸»é”®
     * @return é…æ–¹é…ç½®å­ä¿¡æ¯
     */
    public BsFormulaChildInfo selectBsFormulaChildInfoById(Long id);
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯åˆ—表
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return é…æ–¹é…ç½®å­ä¿¡æ¯é›†åˆ
     */
    public List<BsFormulaChildInfo> selectBsFormulaChildInfoList(BsFormulaChildInfo bsFormulaChildInfo);
    /**
     * æ–°å¢žé…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsFormulaChildInfo(BsFormulaChildInfo bsFormulaChildInfo);
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsFormulaChildInfo(BsFormulaChildInfo bsFormulaChildInfo);
    /**
     * åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®å­ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsFormulaChildInfoById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsFormulaChildInfoByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/IBsFormulaChildInfoService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.formulaChild.service;
import java.util.List;
import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo;
/**
 * é…æ–¹é…ç½®å­ä¿¡æ¯Service接口
 *
 * @author ruimin
 * @date 2023-12-26
 */
public interface IBsFormulaChildInfoService
{
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®å­ä¿¡æ¯ä¸»é”®
     * @return é…æ–¹é…ç½®å­ä¿¡æ¯
     */
    public BsFormulaChildInfo selectBsFormulaChildInfoById(Long id);
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯åˆ—表
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return é…æ–¹é…ç½®å­ä¿¡æ¯é›†åˆ
     */
    public List<BsFormulaChildInfo> selectBsFormulaChildInfoList(BsFormulaChildInfo bsFormulaChildInfo);
    /**
     * æ–°å¢žé…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsFormulaChildInfo(BsFormulaChildInfo bsFormulaChildInfo);
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsFormulaChildInfo(BsFormulaChildInfo bsFormulaChildInfo);
    /**
     * æ‰¹é‡åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„配方配置子信息主键集合
     * @return ç»“æžœ
     */
    public int deleteBsFormulaChildInfoByIds(Long[] ids);
    /**
     * åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®å­ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsFormulaChildInfoById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.bs.formulaChild.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.formulaChild.mapper.BsFormulaChildInfoMapper;
import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo;
import com.jcdm.main.bs.formulaChild.service.IBsFormulaChildInfoService;
/**
 * é…æ–¹é…ç½®å­ä¿¡æ¯Service业务层处理
 *
 * @author ruimin
 * @date 2023-12-26
 */
@Service
public class BsFormulaChildInfoServiceImpl implements IBsFormulaChildInfoService
{
    @Autowired
    private BsFormulaChildInfoMapper bsFormulaChildInfoMapper;
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®å­ä¿¡æ¯ä¸»é”®
     * @return é…æ–¹é…ç½®å­ä¿¡æ¯
     */
    @Override
    public BsFormulaChildInfo selectBsFormulaChildInfoById(Long id)
    {
        return bsFormulaChildInfoMapper.selectBsFormulaChildInfoById(id);
    }
    /**
     * æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯åˆ—表
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return é…æ–¹é…ç½®å­ä¿¡æ¯
     */
    @Override
    public List<BsFormulaChildInfo> selectBsFormulaChildInfoList(BsFormulaChildInfo bsFormulaChildInfo)
    {
        return bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(bsFormulaChildInfo);
    }
    /**
     * æ–°å¢žé…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int insertBsFormulaChildInfo(BsFormulaChildInfo bsFormulaChildInfo)
    {
        bsFormulaChildInfo.setCreateTime(DateUtils.getNowDate());
        return bsFormulaChildInfoMapper.insertBsFormulaChildInfo(bsFormulaChildInfo);
    }
    /**
     * ä¿®æ”¹é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param bsFormulaChildInfo é…æ–¹é…ç½®å­ä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int updateBsFormulaChildInfo(BsFormulaChildInfo bsFormulaChildInfo)
    {
        bsFormulaChildInfo.setUpdateTime(DateUtils.getNowDate());
        return bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfo);
    }
    /**
     * æ‰¹é‡åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„配方配置子信息主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsFormulaChildInfoByIds(Long[] ids)
    {
        return bsFormulaChildInfoMapper.deleteBsFormulaChildInfoByIds(ids);
    }
    /**
     * åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯ä¿¡æ¯
     *
     * @param id é…æ–¹é…ç½®å­ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsFormulaChildInfoById(Long id)
    {
        return bsFormulaChildInfoMapper.deleteBsFormulaChildInfoById(id);
    }
}
jcdm-main/src/main/resources/mapper/bs/formula/BsFormulaInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,109 @@
<?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.formula.mapper.BsFormulaInfoMapper">
    <resultMap type="BsFormulaInfo" id="BsFormulaInfoResult">
        <result property="id"    column="id"    />
        <result property="formulaCode"    column="formula_code"    />
        <result property="formulaName"    column="formula_name"    />
        <result property="status"    column="status"    />
        <result property="productCode"    column="product_code"    />
        <result property="remark"    column="remark"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="spareField3"    column="spare_field_3"    />
        <result property="spareField4"    column="spare_field_4"    />
    </resultMap>
    <sql id="selectBsFormulaInfoVo">
        select id, formula_code, formula_name, status, product_code, remark, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_formula_info
    </sql>
    <select id="selectBsFormulaInfoList" parameterType="BsFormulaInfo" resultMap="BsFormulaInfoResult">
        <include refid="selectBsFormulaInfoVo"/>
        <where>
            <if test="formulaCode != null  and formulaCode != ''"> and formula_code like concat('%', #{formulaCode}, '%')</if>
            <if test="formulaName != null  and formulaName != ''"> and formula_name like concat('%', #{formulaName}, '%')</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
        </where>
    </select>
    <select id="selectBsFormulaInfoById" parameterType="Long" resultMap="BsFormulaInfoResult">
        <include refid="selectBsFormulaInfoVo"/>
        where id = #{id}
    </select>
    <insert id="insertBsFormulaInfo" parameterType="BsFormulaInfo">
        insert into bs_formula_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="formulaCode != null and formulaCode != ''">formula_code,</if>
            <if test="formulaName != null">formula_name,</if>
            <if test="status != null and status != ''">status,</if>
            <if test="productCode != null and productCode != ''">product_code,</if>
            <if test="remark != null">remark,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="spareField3 != null">spare_field_3,</if>
            <if test="spareField4 != null">spare_field_4,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="formulaCode != null and formulaCode != ''">#{formulaCode},</if>
            <if test="formulaName != null">#{formulaName},</if>
            <if test="status != null and status != ''">#{status},</if>
            <if test="productCode != null and productCode != ''">#{productCode},</if>
            <if test="remark != null">#{remark},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="spareField3 != null">#{spareField3},</if>
            <if test="spareField4 != null">#{spareField4},</if>
         </trim>
    </insert>
    <update id="updateBsFormulaInfo" parameterType="BsFormulaInfo">
        update bs_formula_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="formulaCode != null and formulaCode != ''">formula_code = #{formulaCode},</if>
            <if test="formulaName != null">formula_name = #{formulaName},</if>
            <if test="status != null and status != ''">status = #{status},</if>
            <if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
            <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteBsFormulaInfoById" parameterType="Long">
        delete from bs_formula_info where id = #{id}
    </delete>
    <delete id="deleteBsFormulaInfoByIds" parameterType="String">
        delete from bs_formula_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,140 @@
<?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.formulaChild.mapper.BsFormulaChildInfoMapper">
    <resultMap type="BsFormulaChildInfo" id="BsFormulaChildInfoResult">
        <result property="id"    column="id"    />
        <result property="workshopCode"    column="workshop_code"    />
        <result property="lineCode"    column="line_code"    />
        <result property="processesCode"    column="processes_code"    />
        <result property="productCode"    column="product_code"    />
        <result property="operationSteps"    column="operation_steps"    />
        <result property="techRequirement"    column="tech_requirement"    />
        <result property="operationType"    column="operation_type"    />
        <result property="stepSort"    column="step_sort"    />
        <result property="paramCode"    column="param_code"    />
        <result property="materialCode"    column="material_code"    />
        <result property="formulaCode"    column="formula_code"    />
        <result property="picture"    column="picture"    />
        <result property="remarks"    column="remarks"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="spareField3"    column="spare_field_3"    />
        <result property="spareField4"    column="spare_field_4"    />
    </resultMap>
    <sql id="selectBsFormulaChildInfoVo">
        select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_formula_child_info
    </sql>
    <select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult">
        <include refid="selectBsFormulaChildInfoVo"/>
        <where>
            <if test="workshopCode != null  and workshopCode != ''"> and workshop_code like concat('%', #{workshopCode}, '%')</if>
            <if test="lineCode != null  and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if>
            <if test="processesCode != null  and processesCode != ''"> and processes_code like concat('%', #{processesCode}, '%')</if>
            <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
            <if test="operationType != null  and operationType != ''"> and operation_type like concat('%', #{operationType}, '%')</if>
        </where>
    </select>
    <select id="selectBsFormulaChildInfoById" parameterType="Long" resultMap="BsFormulaChildInfoResult">
        <include refid="selectBsFormulaChildInfoVo"/>
        where id = #{id}
    </select>
    <insert id="insertBsFormulaChildInfo" parameterType="BsFormulaChildInfo" useGeneratedKeys="true" keyProperty="id">
        insert into bs_formula_child_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="workshopCode != null">workshop_code,</if>
            <if test="lineCode != null">line_code,</if>
            <if test="processesCode != null">processes_code,</if>
            <if test="productCode != null">product_code,</if>
            <if test="operationSteps != null">operation_steps,</if>
            <if test="techRequirement != null">tech_requirement,</if>
            <if test="operationType != null">operation_type,</if>
            <if test="stepSort != null">step_sort,</if>
            <if test="paramCode != null">param_code,</if>
            <if test="materialCode != null">material_code,</if>
            <if test="formulaCode != null">formula_code,</if>
            <if test="picture != null">picture,</if>
            <if test="remarks != null">remarks,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="spareField3 != null">spare_field_3,</if>
            <if test="spareField4 != null">spare_field_4,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="workshopCode != null">#{workshopCode},</if>
            <if test="lineCode != null">#{lineCode},</if>
            <if test="processesCode != null">#{processesCode},</if>
            <if test="productCode != null">#{productCode},</if>
            <if test="operationSteps != null">#{operationSteps},</if>
            <if test="techRequirement != null">#{techRequirement},</if>
            <if test="operationType != null">#{operationType},</if>
            <if test="stepSort != null">#{stepSort},</if>
            <if test="paramCode != null">#{paramCode},</if>
            <if test="materialCode != null">#{materialCode},</if>
            <if test="formulaCode != null">#{formulaCode},</if>
            <if test="picture != null">#{picture},</if>
            <if test="remarks != null">#{remarks},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="spareField3 != null">#{spareField3},</if>
            <if test="spareField4 != null">#{spareField4},</if>
         </trim>
    </insert>
    <update id="updateBsFormulaChildInfo" parameterType="BsFormulaChildInfo">
        update bs_formula_child_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="workshopCode != null">workshop_code = #{workshopCode},</if>
            <if test="lineCode != null">line_code = #{lineCode},</if>
            <if test="processesCode != null">processes_code = #{processesCode},</if>
            <if test="productCode != null">product_code = #{productCode},</if>
            <if test="operationSteps != null">operation_steps = #{operationSteps},</if>
            <if test="techRequirement != null">tech_requirement = #{techRequirement},</if>
            <if test="operationType != null">operation_type = #{operationType},</if>
            <if test="stepSort != null">step_sort = #{stepSort},</if>
            <if test="paramCode != null">param_code = #{paramCode},</if>
            <if test="materialCode != null">material_code = #{materialCode},</if>
            <if test="formulaCode != null">formula_code = #{formulaCode},</if>
            <if test="picture != null">picture = #{picture},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
            <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteBsFormulaChildInfoById" parameterType="Long">
        delete from bs_formula_child_info where id = #{id}
    </delete>
    <delete id="deleteBsFormulaChildInfoByIds" parameterType="String">
        delete from bs_formula_child_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/bs/formula/formula.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢é…æ–¹é…ç½®åˆ—表
export function listFormula(query) {
  return request({
    url: '/bs/formula/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢é…æ–¹é…ç½®è¯¦ç»†
export function getFormula(id) {
  return request({
    url: '/bs/formula/' + id,
    method: 'get'
  })
}
// æ–°å¢žé…æ–¹é…ç½®
export function addFormula(data) {
  return request({
    url: '/bs/formula',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹é…æ–¹é…ç½®
export function updateFormula(data) {
  return request({
    url: '/bs/formula',
    method: 'put',
    data: data
  })
}
// åˆ é™¤é…æ–¹é…ç½®
export function delFormula(id) {
  return request({
    url: '/bs/formula/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯åˆ—表
export function listFormulaChild(query) {
  return request({
    url: '/bs/formulaChild/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯è¯¦ç»†
export function getFormulaChild(id) {
  return request({
    url: '/bs/formulaChild/' + id,
    method: 'get'
  })
}
// æ–°å¢žé…æ–¹é…ç½®å­ä¿¡æ¯
export function addFormulaChild(data) {
  return request({
    url: '/bs/formulaChild',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹é…æ–¹é…ç½®å­ä¿¡æ¯
export function updateFormulaChild(data) {
  return request({
    url: '/bs/formulaChild',
    method: 'put',
    data: data
  })
}
// åˆ é™¤é…æ–¹é…ç½®å­ä¿¡æ¯
export function delFormulaChild(id) {
  return request({
    url: '/bs/formulaChild/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/bs/formula/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,345 @@
<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="formulaCode">
            <el-input
              v-model="queryParams.formulaCode"
              placeholder="请输入配方编码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="配方名称" prop="formulaName">
            <el-input
              v-model="queryParams.formulaName"
              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.${dictType}"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item label="产品编码" prop="productCode">
            <el-input
              v-model="queryParams.productCode"
              placeholder="请输入产品编码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['bs:formula: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:formula: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:formula: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:formula:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="formulaList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="配方编码" width="130" align="center" prop="formulaCode">
          </el-table-column>
          <el-table-column label="配方名称" width="150" align="center" prop="formulaName">
          </el-table-column>
          <el-table-column label="状态" width="90" align="center" prop="status">
          </el-table-column>
          <el-table-column label="产品编码" width="130" align="center" prop="productCode">
          </el-table-column>
          <el-table-column label="备注" width="130" align="center" prop="remark">
          </el-table-column>
          <el-table-column label="创建用户" width="150" align="center" prop="createUser">
          </el-table-column>
          <el-table-column label="创建时间" width="150" align="center" prop="createTime">
          </el-table-column>
          <el-table-column label="更改用户" width="150" align="center" prop="updateUser">
          </el-table-column>
          <el-table-column label="更改时间" width="150" align="center" prop="updateTime">
          </el-table-column>
          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="success"
                plain
                style="width: 72px"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['bs:formula:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['bs:formula:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改配方配置对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="配方编码" prop="formulaCode">
          <el-input v-model="form.formulaCode" placeholder="请输入配方编码" />
        </el-form-item>
        <el-form-item label="配方名称" prop="formulaName">
          <el-input v-model="form.formulaName" placeholder="请输入配方名称" />
        </el-form-item>
<!--        <el-form-item label="状态" prop="status">-->
<!--          <el-radio-group v-model="form.status">-->
<!--            <el-radio-->
<!--              v-for="dict in dict.type.${dictType}"-->
<!--              :key="dict.value"-->
<!--              :label="dict.value"-->
<!--            >{{dict.label}}</el-radio>-->
<!--          </el-radio-group>-->
<!--        </el-form-item>-->
        <el-form-item label="产品编码" prop="productCode">
          <el-input v-model="form.productCode" 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 { listFormula, getFormula, delFormula, addFormula, updateFormula } from "@/api/main/bs/formula/formula";
export default {
  name: "Formula",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // é…æ–¹é…ç½®è¡¨æ ¼æ•°æ®
      formulaList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        formulaCode: null,
        formulaName: null,
        status: null,
        productCode: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
        formulaCode: [
          { required: true, message: "配方编码不能为空", trigger: "blur" }
        ],
        status: [
          { required: true, message: "状态不能为空", trigger: "change" }
        ],
        productCode: [
          { required: true, message: "产品编码不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢é…æ–¹é…ç½®åˆ—表 */
    getList() {
      this.loading = true;
      listFormula(this.queryParams).then(response => {
        this.formulaList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        formulaCode: null,
        formulaName: null,
        status: null,
        productCode: null,
        remark: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.open = true;
      this.titleName = "添加配方配置";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getFormula(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) {
            updateFormula(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addFormula(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 delFormula(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('bs/formula/export', {
        ...this.queryParams
      }, `formula_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
jcdm-ui/src/views/main/bs/formulaChild/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,395 @@
<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="workshopCode">
            <el-input
              v-model="queryParams.workshopCode"
              placeholder="请输入车间"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="产线" prop="lineCode">
            <el-input
              v-model="queryParams.lineCode"
              placeholder="请输入产线"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="工序" prop="processesCode">
            <el-input
              v-model="queryParams.processesCode"
              placeholder="请输入工序"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="产品编号" prop="productCode">
            <el-input
              v-model="queryParams.productCode"
              placeholder="请输入产品编号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
<!--          <el-form-item label="类型" prop="operationType">-->
<!--            <el-select v-model="queryParams.operationType" placeholder="请选择类型" clearable>-->
<!--              <el-option-->
<!--                v-for="dict in dict.type.${dictType}"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['bs:formulaChild: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:formulaChild: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:formulaChild: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:formulaChild:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="formulaChildList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="id" align="center" prop="id" />
          <el-table-column label="车间" align="center" prop="workshopCode">
          </el-table-column>
          <el-table-column label="产线" align="center" prop="lineCode">
          </el-table-column>
          <el-table-column label="工序" align="center" prop="processesCode">
          </el-table-column>
          <el-table-column label="产品编号" align="center" prop="productCode">
          </el-table-column>
          <el-table-column label="操作内容" align="center" prop="operationSteps">
          </el-table-column>
          <el-table-column label="技术要求" :show-overflow-tooltip='true' align="center" prop="techRequirement">
          </el-table-column>
          <el-table-column label="类型" align="center" prop="operationType">
          </el-table-column>
          <el-table-column label="排序" align="center" prop="stepSort">
          </el-table-column>
          <el-table-column label="参数编码" align="center" prop="paramCode">
          </el-table-column>
          <el-table-column label="物料编码" align="center" prop="materialCode">
          </el-table-column>
          <el-table-column label="配方编码" align="center" prop="formulaCode">
          </el-table-column>
          <el-table-column label="图片" align="center" prop="picture">
          </el-table-column>
          <el-table-column label="备注" align="center" prop="remarks">
          </el-table-column>
          <el-table-column label="创建用户" align="center" prop="createUser">
          </el-table-column>
          <el-table-column label="创建时间" align="center" prop="createTime">
          </el-table-column>
          <el-table-column label="更改用户" align="center" prop="updateUser">
          </el-table-column>
          <el-table-column label="更改时间" align="center" prop="updateTime">
          </el-table-column>
          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="success"
                plain
                style="width: 72px"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['bs:formulaChild:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['bs:formulaChild:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改配方配置子信息对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="车间" prop="workshopCode">
          <el-input v-model="form.workshopCode" placeholder="请输入车间" />
        </el-form-item>
        <el-form-item label="产线" prop="lineCode">
          <el-input v-model="form.lineCode" placeholder="请输入产线" />
        </el-form-item>
        <el-form-item label="工序" prop="processesCode">
          <el-input v-model="form.processesCode" 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="operationSteps">
          <el-input v-model="form.operationSteps" placeholder="请输入操作内容" />
        </el-form-item>
        <el-form-item label="技术要求" prop="techRequirement">
          <el-input v-model="form.techRequirement" placeholder="请输入技术要求" />
        </el-form-item>
<!--        <el-form-item label="类型" prop="operationType">-->
<!--          <el-select v-model="form.operationType" placeholder="请选择类型">-->
<!--            <el-option-->
<!--              v-for="dict in dict.type.${dictType}"-->
<!--              :key="dict.value"-->
<!--              :label="dict.label"-->
<!--              :value="dict.value"-->
<!--            ></el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="排序" prop="stepSort">
          <el-input v-model="form.stepSort" placeholder="请输入排序" />
        </el-form-item>
        <el-form-item label="参数编码" prop="paramCode">
          <el-input v-model="form.paramCode" placeholder="请输入参数编码" />
        </el-form-item>
        <el-form-item label="物料编码" prop="materialCode">
          <el-input v-model="form.materialCode" placeholder="请输入物料编码" />
        </el-form-item>
        <el-form-item label="配方编码" prop="formulaCode">
          <el-input v-model="form.formulaCode" placeholder="请输入配方编码" />
        </el-form-item>
        <el-form-item label="图片" prop="picture">
          <el-input v-model="form.picture" placeholder="请输入图片" />
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" placeholder="请输入备注" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listFormulaChild, getFormulaChild, delFormulaChild, addFormulaChild, updateFormulaChild } from "@/api/main/bs/formulaChild/formulaChild";
export default {
  name: "FormulaChild",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // é…æ–¹é…ç½®å­ä¿¡æ¯è¡¨æ ¼æ•°æ®
      formulaChildList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        workshopCode: null,
        lineCode: null,
        processesCode: null,
        productCode: null,
        operationType: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "id不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢é…æ–¹é…ç½®å­ä¿¡æ¯åˆ—表 */
    getList() {
      this.loading = true;
      listFormulaChild(this.queryParams).then(response => {
        this.formulaChildList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        workshopCode: null,
        lineCode: null,
        processesCode: null,
        productCode: null,
        operationSteps: null,
        techRequirement: null,
        operationType: null,
        stepSort: null,
        paramCode: null,
        materialCode: null,
        formulaCode: null,
        picture: null,
        remarks: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.open = true;
      this.titleName = "添加配方配置子信息";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getFormulaChild(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) {
            updateFormulaChild(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addFormulaChild(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 delFormulaChild(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('bs/formulaChild/export', {
        ...this.queryParams
      }, `formulaChild_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>