¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.main.bs.domain.BsFormulaChildInfo; |
| | | import com.billion.main.bs.service.IBsFormulaChildInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®åä¿¡æ¯Controller |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/formulaChildInfo") |
| | | public class BsFormulaChildInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsFormulaChildInfoService bsFormulaChildInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | startPage(); |
| | | List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºé
æ¹é
ç½®åä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info: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('main:info:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsFormulaChildInfoService.selectBsFormulaChildInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é
æ¹é
ç½®åä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:add')") |
| | | @Log(title = "é
æ¹é
ç½®åä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | return toAjax(bsFormulaChildInfoService.insertBsFormulaChildInfo(bsFormulaChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é
æ¹é
ç½®åä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:edit')") |
| | | @Log(title = "é
æ¹é
ç½®åä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | return toAjax(bsFormulaChildInfoService.updateBsFormulaChildInfo(bsFormulaChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é
æ¹é
ç½®åä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:remove')") |
| | | @Log(title = "é
æ¹é
ç½®åä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsFormulaChildInfoService.deleteBsFormulaChildInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.billion.common.core.domain.R; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.main.bs.domain.BsFormulaInfo; |
| | | import com.billion.main.bs.service.IBsFormulaInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®Controller |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/formulaInfo") |
| | | public class BsFormulaInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsFormulaInfoService bsFormulaInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é
æ¹é
ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsFormulaInfo bsFormulaInfo) |
| | | { |
| | | startPage(); |
| | | List<BsFormulaInfo> list = bsFormulaInfoService.selectBsFormulaInfoList(bsFormulaInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºé
æ¹é
ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info: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('main:info:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsFormulaInfoService.selectBsFormulaInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é
æ¹é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:add')") |
| | | @Log(title = "é
æ¹é
ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsFormulaInfo bsFormulaInfo) |
| | | { |
| | | return toAjax(bsFormulaInfoService.insertBsFormulaInfo(bsFormulaInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é
æ¹é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:edit')") |
| | | @Log(title = "é
æ¹é
ç½®", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsFormulaInfo bsFormulaInfo) |
| | | { |
| | | return toAjax(bsFormulaInfoService.updateBsFormulaInfo(bsFormulaInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é
æ¹é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:info:remove')") |
| | | @Log(title = "é
æ¹é
ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsFormulaInfoService.deleteBsFormulaInfoByIds(ids)); |
| | | } |
| | | |
| | | @GetMapping("/getOne") |
| | | public R getOne(BsFormulaInfo bsFormulaInfo){ |
| | | BsFormulaInfo one = bsFormulaInfoService.getOne(new LambdaQueryWrapper<BsFormulaInfo>() |
| | | .eq(BsFormulaInfo::getFormulaCode, bsFormulaInfo.getFormulaCode())); |
| | | return R.ok(one); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®åä¿¡æ¯å¯¹è±¡ bs_formula_child_info |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Data |
| | | public class BsFormulaChildInfo extends BaseEntity |
| | | { |
| | | /** é
æ¹ç¼ç */ |
| | | @Excel(name = "é
æ¹ç¼ç ") |
| | | private String formulaCode; |
| | | |
| | | /** 产线 */ |
| | | @Excel(name = "产线ç¼ç ") |
| | | private String lineCode; |
| | | |
| | | /** å·¥ä½ç¼å· */ |
| | | @Excel(name = "å·¥ä½ç¼å·") |
| | | private String locationCode; |
| | | |
| | | /** 产åç¼å· */ |
| | | @Excel(name = "产åç¼å·") |
| | | private String productCode; |
| | | |
| | | /** æä½å
容 */ |
| | | @Excel(name = "æä½å
容") |
| | | private String operationContent; |
| | | |
| | | /** æä½ç±»å */ |
| | | @Excel(name = "æä½ç±»å", readConverterExp = "1=æ«æ产åæ¡ç ,2=æ§ç´§æ°æ®éé") |
| | | private String operationType; |
| | | |
| | | /** æåº */ |
| | | @Excel(name = "æåº") |
| | | private Integer stepSort; |
| | | |
| | | /** åæ°ç¼ç */ |
| | | @Excel(name = "åæ°ç¼ç ") |
| | | private String paramCode; |
| | | |
| | | /** å¾ç */ |
| | | private String picture; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** ééæ°æ® */ |
| | | private String collectData; |
| | | |
| | | /** ç»æ */ |
| | | private String results; |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.domain; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.billion.common.annotation.Excel; |
| | | import com.billion.main.common.BaseEntity; |
| | | |
| | | /** |
| | | * é
æ¹é
置对象 bs_formula_info |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Data |
| | | public class BsFormulaInfo extends BaseEntity |
| | | { |
| | | |
| | | /** 产åç¼ç */ |
| | | @Excel(name = "产åç¼ç ") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** é
æ¹ç¼ç */ |
| | | @Excel(name = "é
æ¹ç¼ç ") |
| | | private String formulaCode; |
| | | |
| | | /** é
æ¹å称 */ |
| | | @Excel(name = "é
æ¹å称") |
| | | private String formulaName; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ", readConverterExp = "1=å¯ç¨,0=æªå¯ç¨") |
| | | private String status; |
| | | |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remark; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsFormulaChildInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®åä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface BsFormulaChildInfoMapper extends BaseMapper<BsFormulaChildInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯ |
| | | * |
| | | * @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.billion.main.bs.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.billion.main.bs.domain.BsFormulaInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®Mapperæ¥å£ |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface BsFormulaInfoMapper extends BaseMapper<BsFormulaInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢é
æ¹é
ç½® |
| | | * |
| | | * @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.billion.main.bs.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsFormulaChildInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®åä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface IBsFormulaChildInfoService extends IService<BsFormulaChildInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯ |
| | | * |
| | | * @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.billion.main.bs.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.billion.main.bs.domain.BsFormulaInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®Serviceæ¥å£ |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | public interface IBsFormulaInfoService extends IService<BsFormulaInfo> |
| | | { |
| | | /** |
| | | * æ¥è¯¢é
æ¹é
ç½® |
| | | * |
| | | * @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.billion.main.bs.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.core.domain.entity.SysUser; |
| | | import com.billion.common.core.domain.model.LoginUser; |
| | | import com.billion.common.utils.DateUtils; |
| | | import com.billion.common.utils.SecurityUtils; |
| | | import com.billion.main.bs.domain.BsFormulaChildInfo; |
| | | import com.billion.main.bs.mapper.BsFormulaChildInfoMapper; |
| | | import com.billion.main.bs.service.IBsFormulaChildInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®åä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Service |
| | | public class BsFormulaChildInfoServiceImpl extends ServiceImpl<BsFormulaChildInfoMapper, BsFormulaChildInfo> 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()); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | bsFormulaChildInfo.setCreateTime(new Date()); |
| | | bsFormulaChildInfo.setUpdateTime(new Date()); |
| | | bsFormulaChildInfo.setCreateBy(user.getUserName()); |
| | | bsFormulaChildInfo.setUpdateBy(user.getUserName()); |
| | | return bsFormulaChildInfoMapper.insertBsFormulaChildInfo(bsFormulaChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é
æ¹é
ç½®åä¿¡æ¯ |
| | | * |
| | | * @param bsFormulaChildInfo é
æ¹é
ç½®åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsFormulaChildInfo(BsFormulaChildInfo bsFormulaChildInfo) |
| | | { |
| | | bsFormulaChildInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | bsFormulaChildInfo.setUpdateBy(user.getUserName()); |
| | | 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.billion.main.bs.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.core.domain.entity.SysUser; |
| | | import com.billion.common.core.domain.model.LoginUser; |
| | | import com.billion.common.exception.ServiceException; |
| | | import com.billion.common.utils.DateUtils; |
| | | import com.billion.common.utils.SecurityUtils; |
| | | import com.billion.main.bs.domain.BsFormulaInfo; |
| | | import com.billion.main.bs.mapper.BsFormulaInfoMapper; |
| | | import com.billion.main.bs.service.IBsFormulaInfoService; |
| | | import com.billion.main.common.BaseEntity; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * é
æ¹é
ç½®Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Billion |
| | | * @date 2024-11-26 |
| | | */ |
| | | @Service |
| | | public class BsFormulaInfoServiceImpl extends ServiceImpl<BsFormulaInfoMapper, BsFormulaInfo> 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) |
| | | { |
| | | List<BsFormulaInfo> check = this.list(new LambdaQueryWrapper<BsFormulaInfo>().eq(BsFormulaInfo::getFormulaCode, bsFormulaInfo.getFormulaCode())); |
| | | if (CollUtil.isNotEmpty(check)){ |
| | | throw new ServiceException("å·²åå¨æ¤é
æ¹ç¼ç "); |
| | | } |
| | | List<BsFormulaInfo> check1 = this.list(new LambdaQueryWrapper<BsFormulaInfo>().eq(BsFormulaInfo::getProductCode, bsFormulaInfo.getProductCode())); |
| | | if (CollUtil.isNotEmpty(check1)){ |
| | | throw new ServiceException("å·²åå¨æ¤äº§åç¼ç "); |
| | | } |
| | | bsFormulaInfo.setCreateTime(DateUtils.getNowDate()); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | bsFormulaInfo.setCreateTime(new Date()); |
| | | bsFormulaInfo.setUpdateTime(new Date()); |
| | | bsFormulaInfo.setCreateBy(user.getUserName()); |
| | | bsFormulaInfo.setUpdateBy(user.getUserName()); |
| | | return bsFormulaInfoMapper.insertBsFormulaInfo(bsFormulaInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é
æ¹é
ç½® |
| | | * |
| | | * @param bsFormulaInfo é
æ¹é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsFormulaInfo(BsFormulaInfo bsFormulaInfo) |
| | | { |
| | | List<BsFormulaInfo> check = this.list(new LambdaQueryWrapper<BsFormulaInfo>().eq(BsFormulaInfo::getFormulaCode, bsFormulaInfo.getFormulaCode()) |
| | | .notIn(BaseEntity::getId,bsFormulaInfo.getId())); |
| | | if (CollUtil.isNotEmpty(check)){ |
| | | throw new ServiceException("å·²åå¨æ¤é
æ¹ç¼ç "); |
| | | } |
| | | List<BsFormulaInfo> check1 = this.list(new LambdaQueryWrapper<BsFormulaInfo>().eq(BsFormulaInfo::getProductCode, bsFormulaInfo.getProductCode()) |
| | | .notIn(BaseEntity::getId,bsFormulaInfo.getId())); |
| | | if (CollUtil.isNotEmpty(check1)){ |
| | | throw new ServiceException("å·²åå¨æ¤äº§åç¼ç "); |
| | | } |
| | | bsFormulaInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | bsFormulaInfo.setUpdateBy(user.getUserName()); |
| | | 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.billion.main.bs.mapper.BsFormulaChildInfoMapper"> |
| | | |
| | | <resultMap type="BsFormulaChildInfo" id="BsFormulaChildInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="lineCode" column="line_code" /> |
| | | <result property="locationCode" column="location_code" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="operationContent" column="operation_content" /> |
| | | <result property="operationType" column="operation_type" /> |
| | | <result property="stepSort" column="step_sort" /> |
| | | <result property="paramCode" column="param_code" /> |
| | | <result property="picture" column="picture" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="collectData" column="collect_data" /> |
| | | <result property="results" column="results" /> |
| | | <result property="formulaCode" column="formula_code" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsFormulaChildInfoVo"> |
| | | select id, line_code, location_code, product_code, operation_content, operation_type, step_sort, param_code, picture, remarks, create_by, create_time, update_by, update_time, collect_data, results, formula_code, del_flag from bs_formula_child_info |
| | | </sql> |
| | | |
| | | <select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult"> |
| | | <include refid="selectBsFormulaChildInfoVo"/> |
| | | <where> |
| | | <if test="lineCode != null and lineCode != ''"> and line_code = #{lineCode}</if> |
| | | <if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if> |
| | | <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
| | | <if test="operationType != null and operationType != ''"> and operation_type = #{operationType}</if> |
| | | <if test="stepSort != null "> and step_sort = #{stepSort}</if> |
| | | <if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if> |
| | | <if test="formulaCode != null and formulaCode != ''"> and formula_code = #{formulaCode}</if> |
| | | and del_flag = "0" |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsFormulaChildInfoById" parameterType="Long" resultMap="BsFormulaChildInfoResult"> |
| | | <include refid="selectBsFormulaChildInfoVo"/> |
| | | where id = #{id} |
| | | and del_flag = "0" |
| | | </select> |
| | | |
| | | <insert id="insertBsFormulaChildInfo" parameterType="BsFormulaChildInfo"> |
| | | insert into bs_formula_child_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="lineCode != null and lineCode != ''">line_code,</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code,</if> |
| | | <if test="productCode != null and productCode != ''">product_code,</if> |
| | | <if test="operationContent != null and operationContent != ''">operation_content,</if> |
| | | <if test="operationType != null and operationType != ''">operation_type,</if> |
| | | <if test="stepSort != null">step_sort,</if> |
| | | <if test="paramCode != null and paramCode != ''">param_code,</if> |
| | | <if test="picture != null">picture,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="collectData != null">collect_data,</if> |
| | | <if test="results != null">results,</if> |
| | | <if test="formulaCode != null">formula_code,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="lineCode != null and lineCode != ''">#{lineCode},</if> |
| | | <if test="locationCode != null and locationCode != ''">#{locationCode},</if> |
| | | <if test="productCode != null and productCode != ''">#{productCode},</if> |
| | | <if test="operationContent != null and operationContent != ''">#{operationContent},</if> |
| | | <if test="operationType != null and operationType != ''">#{operationType},</if> |
| | | <if test="stepSort != null">#{stepSort},</if> |
| | | <if test="paramCode != null and paramCode != ''">#{paramCode},</if> |
| | | <if test="picture != null">#{picture},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="collectData != null">#{collectData},</if> |
| | | <if test="results != null">#{results},</if> |
| | | <if test="formulaCode != null">#{formulaCode},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsFormulaChildInfo" parameterType="BsFormulaChildInfo"> |
| | | update bs_formula_child_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if> |
| | | <if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
| | | <if test="operationContent != null and operationContent != ''">operation_content = #{operationContent},</if> |
| | | <if test="operationType != null and operationType != ''">operation_type = #{operationType},</if> |
| | | <if test="stepSort != null">step_sort = #{stepSort},</if> |
| | | <if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if> |
| | | <if test="picture != null">picture = #{picture},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="collectData != null">collect_data = #{collectData},</if> |
| | | <if test="results != null">results = #{results},</if> |
| | | <if test="formulaCode != null">formula_code = #{formulaCode},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteBsFormulaChildInfoById" parameterType="Long"> |
| | | update bs_formula_child_info set del_flag = "1" where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteBsFormulaChildInfoByIds" parameterType="String"> |
| | | update bs_formula_child_info set del_flag = "1" where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | </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.billion.main.bs.mapper.BsFormulaInfoMapper"> |
| | | |
| | | <resultMap type="BsFormulaInfo" id="BsFormulaInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="formulaCode" column="formula_code" /> |
| | | <result property="formulaName" column="formula_name" /> |
| | | <result property="status" column="status" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsFormulaInfoVo"> |
| | | select id, product_code, product_name, formula_code, formula_name, status, remark, create_by, create_time, update_by, update_time, del_flag from bs_formula_info |
| | | </sql> |
| | | |
| | | <select id="selectBsFormulaInfoList" parameterType="BsFormulaInfo" resultMap="BsFormulaInfoResult"> |
| | | <include refid="selectBsFormulaInfoVo"/> |
| | | <where> |
| | | <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
| | | <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
| | | <if test="formulaCode != null and formulaCode != ''"> and formula_code = #{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> |
| | | and del_flag = "0" |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsFormulaInfoById" parameterType="Long" resultMap="BsFormulaInfoResult"> |
| | | <include refid="selectBsFormulaInfoVo"/> |
| | | where id = #{id} |
| | | and del_flag = "0" |
| | | </select> |
| | | |
| | | <insert id="insertBsFormulaInfo" parameterType="BsFormulaInfo"> |
| | | insert into bs_formula_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="productCode != null and productCode != ''">product_code,</if> |
| | | <if test="productName != null and productName != ''">product_name,</if> |
| | | <if test="formulaCode != null and formulaCode != ''">formula_code,</if> |
| | | <if test="formulaName != null and formulaName != ''">formula_name,</if> |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="productCode != null and productCode != ''">#{productCode},</if> |
| | | <if test="productName != null and productName != ''">#{productName},</if> |
| | | <if test="formulaCode != null and formulaCode != ''">#{formulaCode},</if> |
| | | <if test="formulaName != null and formulaName != ''">#{formulaName},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsFormulaInfo" parameterType="BsFormulaInfo"> |
| | | update bs_formula_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
| | | <if test="productName != null and productName != ''">product_name = #{productName},</if> |
| | | <if test="formulaCode != null and formulaCode != ''">formula_code = #{formulaCode},</if> |
| | | <if test="formulaName != null and formulaName != ''">formula_name = #{formulaName},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteBsFormulaInfoById" parameterType="Long"> |
| | | update bs_formula_info set del_flag = "1" where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteBsFormulaInfoByIds" parameterType="String"> |
| | | update bs_formula_info set del_flag = "1" where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
| | |
| | | "clipboard": "2.0.8", |
| | | "core-js": "3.37.1", |
| | | "echarts": "5.4.0", |
| | | "electron": "^33.2.0", |
| | | "element-ui": "2.15.14", |
| | | "file-saver": "2.0.5", |
| | | "fuse.js": "6.4.3", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯å表 |
| | | export function listInfo(query) { |
| | | return request({ |
| | | url: '/formulaChildInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯è¯¦ç» |
| | | export function getInfo(id) { |
| | | return request({ |
| | | url: '/formulaChildInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢é
æ¹é
ç½®åä¿¡æ¯ |
| | | export function addInfo(data) { |
| | | return request({ |
| | | url: '/formulaChildInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹é
æ¹é
ç½®åä¿¡æ¯ |
| | | export function updateInfo(data) { |
| | | return request({ |
| | | url: '/formulaChildInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤é
æ¹é
ç½®åä¿¡æ¯ |
| | | export function delInfo(id) { |
| | | return request({ |
| | | url: '/formulaChildInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢é
æ¹é
ç½®å表 |
| | | export function listInfo(query) { |
| | | return request({ |
| | | url: '/formulaInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | export function getOne(query) { |
| | | return request({ |
| | | url: '/formulaInfo/getOne', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢é
æ¹é
ç½®è¯¦ç» |
| | | export function getInfo(id) { |
| | | return request({ |
| | | url: '/formulaInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢é
æ¹é
ç½® |
| | | export function addInfo(data) { |
| | | return request({ |
| | | url: '/formulaInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹é
æ¹é
ç½® |
| | | export function updateInfo(data) { |
| | | return request({ |
| | | url: '/formulaInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤é
æ¹é
ç½® |
| | | export function delInfo(id) { |
| | | return request({ |
| | | url: '/formulaInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | const isBlob = blobValidate(res.index); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data]) |
| | | const blob = new Blob([res.index]) |
| | | this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | this.printErrMsg(res.index); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | const isBlob = blobValidate(res.index); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data]) |
| | | const blob = new Blob([res.index]) |
| | | this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | this.printErrMsg(res.index); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then((res) => { |
| | | const isBlob = blobValidate(res.data); |
| | | const isBlob = blobValidate(res.index); |
| | | if (isBlob) { |
| | | const blob = new Blob([res.data], { type: 'application/zip' }) |
| | | const blob = new Blob([res.index], { type: 'application/zip' }) |
| | | this.saveAs(blob, name) |
| | | } else { |
| | | this.printErrMsg(res.data); |
| | | this.printErrMsg(res.index); |
| | | } |
| | | downloadLoadingInstance.close(); |
| | | }).catch((r) => { |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/main/formula-data', |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['bs:formulaInfo:list'], |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | | component: () => import('@/views/main/bs/formulaInfoChild/index'), |
| | | name: 'Data', |
| | | meta: { title: 'å·¥èºé
æ¹è¯¦æ
', activeMenu: '/main/bs/formulaInfoChild' } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/main/route-data', |
| | | component: Layout, |
| | | hidden: true, |
| | |
| | | } |
| | | |
| | | export default new Router({ |
| | | mode: 'history', // å»æurlä¸ç# |
| | | mode: 'hash', // å»æurlä¸ç# |
| | | scrollBehavior: () => ({ y: 0 }), |
| | | routes: constantRoutes |
| | | }) |
| | |
| | | const TokenKey = 'Admin-Token' |
| | | |
| | | export function getToken() { |
| | | return Cookies.get(TokenKey) |
| | | return localStorage.getItem(TokenKey) |
| | | } |
| | | |
| | | export function setToken(token) { |
| | | return Cookies.set(TokenKey, token) |
| | | return localStorage.setItem(TokenKey, token) |
| | | } |
| | | |
| | | export function removeToken() { |
| | | return Cookies.remove(TokenKey) |
| | | return localStorage.removeItem(TokenKey) |
| | | } |
| | |
| | | // å建axioså®ä¾ |
| | | const service = axios.create({ |
| | | // axiosä¸è¯·æ±é
ç½®æbaseURLé项ï¼è¡¨ç¤ºè¯·æ±URLå
Œ
±é¨å |
| | | baseURL: process.env.VUE_APP_BASE_API, |
| | | baseURL: `http://192.168.20.9:8080`, |
| | | // è¶
æ¶ |
| | | timeout: 10000 |
| | | }) |
| | |
| | | cache.session.setJSON('sessionObj', requestObj) |
| | | } else { |
| | | const s_url = sessionObj.url; // 请æ±å°å |
| | | const s_data = sessionObj.data; // 请æ±æ°æ® |
| | | const s_data = sessionObj.index; // 请æ±æ°æ® |
| | | const s_time = sessionObj.time; // 请æ±æ¶é´ |
| | | const interval = 1000; // é´éæ¶é´(ms)ï¼å°äºæ¤æ¶é´è§ä¸ºéå¤æ交 |
| | | if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input |
| | | v-model="queryParams.productCode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input |
| | | v-model="queryParams.productName" |
| | | placeholder="请è¾å
¥äº§åå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="é
æ¹ç¼ç " prop="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.open_status" |
| | | :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-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="['main:info: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="['main:info: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="['main:info: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="['main:info:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column show-overflow-tooltip label="产åç¼ç " align="center" prop="productCode" /> |
| | | <el-table-column show-overflow-tooltip label="产åå称" align="center" prop="productName" /> |
| | | <el-table-column show-overflow-tooltip label="é
æ¹ç¼ç " align="center" prop="formulaCode" > |
| | | <template slot-scope="scope"> |
| | | <router-link :to="{path: '/main/formula-data/index/', query: {formulaCode: scope.row.formulaCode} }" class="link-type"> |
| | | <span>{{ scope.row.formulaCode }}</span> |
| | | </router-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip label="é
æ¹å称" align="center" prop="formulaName" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.open_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" width="180px" show-overflow-tooltip align="center" prop="remark" /> |
| | | <el-table-column show-overflow-tooltip label="æ´æ°ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column label="æ´æ°æ¶é´" align="center" prop="updateTime" width="180"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹é
æ¹é
置对è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input v-model="form.productName" placeholder="请è¾å
¥äº§åå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="é
æ¹ç¼ç " prop="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.open_status" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remark"> |
| | | <el-input |
| | | type="textarea" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | v-model="form.remark" |
| | | maxlength="30" |
| | | show-word-limit |
| | | > |
| | | </el-input> |
| | | </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 { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/main/bs/formulaInfo"; |
| | | |
| | | export default { |
| | | name: "Info", |
| | | dicts: ['open_status'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // é
æ¹é
ç½®è¡¨æ ¼æ°æ® |
| | | infoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productCode: null, |
| | | productName: null, |
| | | formulaCode: null, |
| | | formulaName: null, |
| | | status: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | productCode: [ |
| | | { required: true, message: "产åç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | productName: [ |
| | | { required: true, message: "产åå称ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | formulaCode: [ |
| | | { required: true, message: "é
æ¹ç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | formulaName: [ |
| | | { required: true, message: "é
æ¹å称ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | status: [ |
| | | { required: true, message: "ç¶æä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢é
æ¹é
ç½®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInfo(this.queryParams).then(response => { |
| | | this.infoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | productCode: null, |
| | | productName: null, |
| | | formulaCode: null, |
| | | formulaName: null, |
| | | status: null, |
| | | remark: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null, |
| | | delFlag: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å é
æ¹é
ç½®"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹é
æ¹é
ç½®"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤').then(function() { |
| | | return delInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('formulaInfo/export', { |
| | | ...this.queryParams |
| | | }, `info_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="产线ç¼å·" prop="lineCode"> |
| | | <el-input |
| | | v-model="queryParams.lineCode" |
| | | placeholder="请è¾å
¥äº§çº¿ç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½ç¼å·" prop="locationCode"> |
| | | <el-input |
| | | v-model="queryParams.locationCode" |
| | | placeholder="请è¾å
¥å·¥ä½ç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æä½ç±»å" prop="operationType"> |
| | | <el-select v-model="queryParams.operationType" placeholder="请éæ©æä½ç±»å" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.operation_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ç¼ç " prop="paramCode"> |
| | | <el-input |
| | | v-model="queryParams.paramCode" |
| | | 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> |
| | | |
| | | <div style="width: 600px"> |
| | | <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="['main:info: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="['main:info: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="['main:info: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="['main:info:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <el-descriptions class="margin-top" :column="3" :size="size" border> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i class="el-icon-user"></i> |
| | | é
æ¹ç¼ç |
| | | </template> |
| | | {{queryParams.formulaCode}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i class="el-icon-mobile-phone"></i> |
| | | é
æ¹å称 |
| | | </template> |
| | | {{showData.formulaName}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i class="el-icon-location-outline"></i> |
| | | 产åç¼å· |
| | | </template> |
| | | {{showData.productCode}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | <i class="el-icon-tickets"></i> |
| | | 产åå称 |
| | | </template> |
| | | {{showData.productName}} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-table border v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column show-overflow-tooltip label="é
æ¹ç¼ç " align="center" prop="formulaCode" /> |
| | | <el-table-column show-overflow-tooltip label="产线ç¼å·" align="center" prop="lineCode" /> |
| | | <el-table-column show-overflow-tooltip label="å·¥ä½ç¼å·" align="center" prop="locationCode" /> |
| | | <el-table-column show-overflow-tooltip label="产åç¼å·" align="center" prop="productCode" /> |
| | | <el-table-column show-overflow-tooltip label="æä½å
容" align="center" prop="operationContent" /> |
| | | <el-table-column label="æä½ç±»å" align="center" prop="operationType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.operation_type" :value="scope.row.operationType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip label="æåº" align="center" prop="stepSort" /> |
| | | <el-table-column show-overflow-tooltip label="åæ°ç¼ç " align="center" prop="paramCode" /> |
| | | <el-table-column label="å¾ç" align="center" prop="picture" width="100"> |
| | | <template slot-scope="scope"> |
| | | <image-preview :src="scope.row.picture" :width="50" :height="50"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip label="å¤æ³¨" align="center" prop="remarks" /> |
| | | |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹é
æ¹é
ç½®åä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="é
æ¹ç¼ç " prop="formulaCode"> |
| | | <el-input v-model="form.formulaCode" placeholder="请è¾å
¥é
æ¹ç¼ç " disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼å·" prop="productCode"> |
| | | <el-input v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼å·" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="产线ç¼å·" prop="lineCode"> |
| | | <el-input v-model="form.lineCode" placeholder="请è¾å
¥äº§çº¿ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½ç¼å·" prop="locationCode"> |
| | | <el-input v-model="form.locationCode" placeholder="请è¾å
¥å·¥ä½ç¼å·" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æä½å
容"> |
| | | <editor v-model="form.operationContent" :min-height="192"/> |
| | | </el-form-item> |
| | | <el-form-item label="æä½ç±»å" prop="operationType"> |
| | | <el-select v-model="form.operationType" placeholder="请éæ©æä½ç±»å"> |
| | | <el-option |
| | | v-for="dict in dict.type.operation_type" |
| | | :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="picture"> |
| | | <image-upload v-model="form.picture"/> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" type="textarea" placeholder="请è¾å
¥å
容" |
| | | maxlength="30" |
| | | show-word-limit /> |
| | | </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 {addInfo, delInfo, getInfo, listInfo, updateInfo} from "@/api/main/bs/formulaChildinfo"; |
| | | import { getOne } from '@/api/main/bs/formulaInfo' |
| | | |
| | | export default { |
| | | name: "formulaInfoChild", |
| | | dicts: ['operation_type'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // é
æ¹é
ç½®åä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | infoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | lineCode: null, |
| | | locationCode: null, |
| | | productCode: null, |
| | | operationType: null, |
| | | stepSort: null, |
| | | paramCode: null, |
| | | formulaCode: null, |
| | | }, |
| | | showData: { |
| | | formulaCode: null, |
| | | productCode: null, |
| | | productName: null, |
| | | formulaName: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | lineCode: [ |
| | | { required: true, message: "产线ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | locationCode: [ |
| | | { required: true, message: "å·¥ä½ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | productCode: [ |
| | | { required: true, message: "产åç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | operationContent: [ |
| | | { required: true, message: "æä½å
容ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | operationType: [ |
| | | { required: true, message: "æä½ç±»åä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | stepSort: [ |
| | | { required: true, message: "æåºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | paramCode: [ |
| | | { required: true, message: "åæ°ç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.queryParams.formulaCode = this.$route.query.formulaCode |
| | | this.getOne() |
| | | console.log('this.queryParams.formulaCode',this.queryParams.formulaCode) |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | getOne(){ |
| | | getOne({formulaCode: this.queryParams.formulaCode}).then(res => { |
| | | if (res.code === 200){ |
| | | this.showData.productCode = res.data.productCode |
| | | this.showData.productName = res.data.productName |
| | | this.showData.formulaName = res.data.formulaName |
| | | } |
| | | }) |
| | | }, |
| | | /** æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInfo(this.queryParams).then(response => { |
| | | this.infoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | lineCode: null, |
| | | locationCode: null, |
| | | productCode: null, |
| | | operationContent: null, |
| | | operationType: null, |
| | | stepSort: null, |
| | | paramCode: null, |
| | | picture: null, |
| | | remarks: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null, |
| | | collectData: null, |
| | | results: null, |
| | | formulaCode: null, |
| | | delFlag: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.form.productCode = this.showData.productCode |
| | | this.form.formulaCode = this.queryParams.formulaCode |
| | | this.open = true; |
| | | this.title = "æ·»å é
æ¹é
ç½®åä¿¡æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹é
æ¹é
ç½®åä¿¡æ¯"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤').then(function() { |
| | | return delInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('formulaChildInfo/export', { |
| | | ...this.queryParams |
| | | }, `info_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ°ç¨æ·" align="center" prop="updateBy" /> |
| | | <el-table-column label="å¤æ³¨" width="180px" show-overflow-tooltip align="center" prop="remarks" /> |
| | | <!-- <el-table-column label="æä½" align="center" class-name="small-padding fixed-width">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- v-hasPermi="['main:info:edit']"--> |
| | | <!-- >ä¿®æ¹</el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- v-hasPermi="['main:info:remove']"--> |
| | | <!-- >å é¤</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | |
| | | <pagination |
| | |
| | | }, |
| | | remove(node, data) { |
| | | const { parent } = node |
| | | const children = parent.data.children || parent.data |
| | | const children = parent.index.children || parent.index |
| | | const index = children.findIndex(d => d.id === data.id) |
| | | children.splice(index, 1) |
| | | }, |
| | |
| | | // é¨ç½²ç产ç¯å¢åå¼åç¯å¢ä¸çURLã |
| | | // é»è®¤æ
åµä¸ï¼Vue CLI ä¼åè®¾ä½ çåºç¨æ¯è¢«é¨ç½²å¨ä¸ä¸ªååçæ ¹è·¯å¾ä¸ |
| | | // ä¾å¦ https://www.ruoyi.vip/ãå¦æåºç¨è¢«é¨ç½²å¨ä¸ä¸ªåè·¯å¾ä¸ï¼ä½ å°±éè¦ç¨è¿ä¸ªé项æå®è¿ä¸ªåè·¯å¾ãä¾å¦ï¼å¦æä½ çåºç¨è¢«é¨ç½²å¨ https://www.ruoyi.vip/admin/ï¼å设置 baseUrl 为 /admin/ã |
| | | publicPath: process.env.NODE_ENV === "production" ? "/" : "/", |
| | | // publicPath: process.env.NODE_ENV === "production" ? "/" : "/", |
| | | publicPath: "./", |
| | | // å¨npm run build æ yarn build æ¶ ï¼çææ件çç®å½å称ï¼è¦åbaseUrlçç产ç¯å¢è·¯å¾ä¸è´ï¼ï¼é»è®¤distï¼ |
| | | outputDir: 'dist', |
| | | // ç¨äºæ¾ç½®çæçéæèµæº (jsãcssãimgãfonts) çï¼ï¼é¡¹ç®æå
ä¹åï¼éæèµæºä¼æ¾å¨è¿ä¸ªæ件夹ä¸ï¼ |
| | |
| | | // æ¯å¦å¼å¯eslintä¿åæ£æµï¼ææå¼ï¼ture | false | 'error' |
| | | lintOnSave: process.env.NODE_ENV === 'development', |
| | | // å¦æä½ ä¸éè¦ç产ç¯å¢ç source mapï¼å¯ä»¥å°å
¶è®¾ç½®ä¸º false 以å éç产ç¯å¢æ建ã |
| | | productionSourceMap: false, |
| | | productionSourceMap: true, |
| | | transpileDependencies: ['quill'], |
| | | // webpack-dev-server ç¸å
³é
ç½® |
| | | devServer: { |
| | |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: `http://localhost:8080`, |
| | | target: `http://192.168.20.9:8080`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |