¶Ô±ÈÐÂÎļþ |
| | |
| | | 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)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |