Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.beatSetting.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.beatSetting.domain.BsBeatSetting; |
| | | import com.jcdm.main.bs.beatSetting.service.IBsBeatSettingService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * èæ设置Controller |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-05 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/beatSetting") |
| | | public class BsBeatSettingController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsBeatSettingService bsBeatSettingService; |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ设置å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:beatSetting:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsBeatSetting bsBeatSetting) |
| | | { |
| | | startPage(); |
| | | List<BsBeatSetting> list = bsBeatSettingService.selectBsBeatSettingList(bsBeatSetting); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºèæ设置å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:beatSetting:export')") |
| | | @Log(title = "èæ设置", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsBeatSetting bsBeatSetting) |
| | | { |
| | | List<BsBeatSetting> list = bsBeatSettingService.selectBsBeatSettingList(bsBeatSetting); |
| | | ExcelUtil<BsBeatSetting> util = new ExcelUtil<BsBeatSetting>(BsBeatSetting.class); |
| | | util.exportExcel(response, list, "èæ设置æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åèæ设置详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:beatSetting:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsBeatSettingService.selectBsBeatSettingById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢èæ设置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:beatSetting:add')") |
| | | @Log(title = "èæ设置", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsBeatSetting bsBeatSetting) |
| | | { |
| | | return toAjax(bsBeatSettingService.insertBsBeatSetting(bsBeatSetting)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹èæ设置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:beatSetting:edit')") |
| | | @Log(title = "èæ设置", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsBeatSetting bsBeatSetting) |
| | | { |
| | | return toAjax(bsBeatSettingService.updateBsBeatSetting(bsBeatSetting)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤èæ设置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:beatSetting:remove')") |
| | | @Log(title = "èæ设置", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsBeatSettingService.deleteBsBeatSettingByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.beatSetting.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_beat_setting |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-05 |
| | | */ |
| | | public class BsBeatSetting extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** 产åç¼ç */ |
| | | @Excel(name = "产åç¼ç ") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** èæ */ |
| | | @Excel(name = "èæ") |
| | | private String beat; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** æ°æ®æ¥æº */ |
| | | @Excel(name = "æ°æ®æ¥æº") |
| | | private String dataSource; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setProductCode(String productCode) |
| | | { |
| | | this.productCode = productCode; |
| | | } |
| | | |
| | | public String getProductCode() |
| | | { |
| | | return productCode; |
| | | } |
| | | public void setProductName(String productName) |
| | | { |
| | | this.productName = productName; |
| | | } |
| | | |
| | | public String getProductName() |
| | | { |
| | | return productName; |
| | | } |
| | | public void setBeat(String beat) |
| | | { |
| | | this.beat = beat; |
| | | } |
| | | |
| | | public String getBeat() |
| | | { |
| | | return beat; |
| | | } |
| | | 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 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 setDataSource(String dataSource) |
| | | { |
| | | this.dataSource = dataSource; |
| | | } |
| | | |
| | | public String getDataSource() |
| | | { |
| | | return dataSource; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("productCode", getProductCode()) |
| | | .append("productName", getProductName()) |
| | | .append("beat", getBeat()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("remark", getRemark()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("dataSource", getDataSource()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.beatSetting.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting; |
| | | |
| | | /** |
| | | * èæ设置Mapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-05 |
| | | */ |
| | | public interface BsBeatSettingMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢èæ设置 |
| | | * |
| | | * @param id èæè®¾ç½®ä¸»é® |
| | | * @return èæ设置 |
| | | */ |
| | | public BsBeatSetting selectBsBeatSettingById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ设置å表 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return èæ设置éå |
| | | */ |
| | | public List<BsBeatSetting> selectBsBeatSettingList(BsBeatSetting bsBeatSetting); |
| | | |
| | | /** |
| | | * æ°å¢èæ设置 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsBeatSetting(BsBeatSetting bsBeatSetting); |
| | | |
| | | /** |
| | | * ä¿®æ¹èæ设置 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsBeatSetting(BsBeatSetting bsBeatSetting); |
| | | |
| | | /** |
| | | * å é¤èæ设置 |
| | | * |
| | | * @param id èæè®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBeatSettingById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤èæ设置 |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBeatSettingByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.beatSetting.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting; |
| | | |
| | | /** |
| | | * èæ设置Serviceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-05 |
| | | */ |
| | | public interface IBsBeatSettingService |
| | | { |
| | | /** |
| | | * æ¥è¯¢èæ设置 |
| | | * |
| | | * @param id èæè®¾ç½®ä¸»é® |
| | | * @return èæ设置 |
| | | */ |
| | | public BsBeatSetting selectBsBeatSettingById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ设置å表 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return èæ设置éå |
| | | */ |
| | | public List<BsBeatSetting> selectBsBeatSettingList(BsBeatSetting bsBeatSetting); |
| | | |
| | | /** |
| | | * æ°å¢èæ设置 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsBeatSetting(BsBeatSetting bsBeatSetting); |
| | | |
| | | /** |
| | | * ä¿®æ¹èæ设置 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsBeatSetting(BsBeatSetting bsBeatSetting); |
| | | |
| | | /** |
| | | * æ¹éå é¤èæ设置 |
| | | * |
| | | * @param ids éè¦å é¤çèæ设置主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBeatSettingByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤èæè®¾ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id èæè®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsBeatSettingById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.beatSetting.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.beatSetting.mapper.BsBeatSettingMapper; |
| | | import com.jcdm.main.bs.beatSetting.domain.BsBeatSetting; |
| | | import com.jcdm.main.bs.beatSetting.service.IBsBeatSettingService; |
| | | |
| | | /** |
| | | * èæ设置Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-05 |
| | | */ |
| | | @Service |
| | | public class BsBeatSettingServiceImpl implements IBsBeatSettingService |
| | | { |
| | | @Autowired |
| | | private BsBeatSettingMapper bsBeatSettingMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ设置 |
| | | * |
| | | * @param id èæè®¾ç½®ä¸»é® |
| | | * @return èæ设置 |
| | | */ |
| | | @Override |
| | | public BsBeatSetting selectBsBeatSettingById(Long id) |
| | | { |
| | | return bsBeatSettingMapper.selectBsBeatSettingById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ设置å表 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return èæ设置 |
| | | */ |
| | | @Override |
| | | public List<BsBeatSetting> selectBsBeatSettingList(BsBeatSetting bsBeatSetting) |
| | | { |
| | | return bsBeatSettingMapper.selectBsBeatSettingList(bsBeatSetting); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢èæ设置 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsBeatSetting(BsBeatSetting bsBeatSetting) |
| | | { |
| | | bsBeatSetting.setCreateTime(DateUtils.getNowDate()); |
| | | return bsBeatSettingMapper.insertBsBeatSetting(bsBeatSetting); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹èæ设置 |
| | | * |
| | | * @param bsBeatSetting èæ设置 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsBeatSetting(BsBeatSetting bsBeatSetting) |
| | | { |
| | | bsBeatSetting.setUpdateTime(DateUtils.getNowDate()); |
| | | return bsBeatSettingMapper.updateBsBeatSetting(bsBeatSetting); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤èæ设置 |
| | | * |
| | | * @param ids éè¦å é¤çèæè®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsBeatSettingByIds(Long[] ids) |
| | | { |
| | | return bsBeatSettingMapper.deleteBsBeatSettingByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤èæè®¾ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id èæè®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsBeatSettingById(Long id) |
| | | { |
| | | return bsBeatSettingMapper.deleteBsBeatSettingById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.sc.stationConf.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.sc.stationConf.domain.ScStationConf; |
| | | import com.jcdm.main.sc.stationConf.service.IScStationConfService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * å·¥ä½ç»ç«¯é
ç½®Controller |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/sc/stationConf") |
| | | public class ScStationConfController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IScStationConfService scStationConfService; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ç»ç«¯é
ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('sc:stationConf:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ScStationConf scStationConf) |
| | | { |
| | | startPage(); |
| | | List<ScStationConf> list = scStationConfService.selectScStationConfList(scStationConf); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå·¥ä½ç»ç«¯é
ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('sc:stationConf:export')") |
| | | @Log(title = "å·¥ä½ç»ç«¯é
ç½®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ScStationConf scStationConf) |
| | | { |
| | | List<ScStationConf> list = scStationConfService.selectScStationConfList(scStationConf); |
| | | ExcelUtil<ScStationConf> util = new ExcelUtil<ScStationConf>(ScStationConf.class); |
| | | util.exportExcel(response, list, "å·¥ä½ç»ç«¯é
ç½®æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åå·¥ä½ç»ç«¯é
置详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('sc:stationConf:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(scStationConfService.selectScStationConfById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ç»ç«¯é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('sc:stationConf:add')") |
| | | @Log(title = "å·¥ä½ç»ç«¯é
ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ScStationConf scStationConf) |
| | | { |
| | | return toAjax(scStationConfService.insertScStationConf(scStationConf)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ç»ç«¯é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('sc:stationConf:edit')") |
| | | @Log(title = "å·¥ä½ç»ç«¯é
ç½®", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ScStationConf scStationConf) |
| | | { |
| | | return toAjax(scStationConfService.updateScStationConf(scStationConf)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ç»ç«¯é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('sc:stationConf:remove')") |
| | | @Log(title = "å·¥ä½ç»ç«¯é
ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(scStationConfService.deleteScStationConfByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.sc.stationConf.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; |
| | | |
| | | /** |
| | | * å·¥ä½ç»ç«¯é
置对象 sc_station_conf |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-06 |
| | | */ |
| | | public class ScStationConf extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** å·¥åºç¼å· */ |
| | | @Excel(name = "å·¥åºç¼å·") |
| | | private String processesCode; |
| | | |
| | | /** å·¥åºå称 */ |
| | | @Excel(name = "å·¥åºå称") |
| | | private String processesName; |
| | | |
| | | /** å·¥åºç±»å */ |
| | | @Excel(name = "å·¥åºç±»å") |
| | | private String processesType; |
| | | |
| | | /** IPå°å */ |
| | | @Excel(name = "IPå°å") |
| | | private String ipAddress; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | /** é¢çå段3 */ |
| | | @Excel(name = "é¢çå段3") |
| | | private String spareField3; |
| | | |
| | | /** é¢çå段4 */ |
| | | @Excel(name = "é¢çå段4") |
| | | private String spareField4; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setProcessesCode(String processesCode) |
| | | { |
| | | this.processesCode = processesCode; |
| | | } |
| | | |
| | | public String getProcessesCode() |
| | | { |
| | | return processesCode; |
| | | } |
| | | public void setProcessesName(String processesName) |
| | | { |
| | | this.processesName = processesName; |
| | | } |
| | | |
| | | public String getProcessesName() |
| | | { |
| | | return processesName; |
| | | } |
| | | public void setProcessesType(String processesType) |
| | | { |
| | | this.processesType = processesType; |
| | | } |
| | | |
| | | public String getProcessesType() |
| | | { |
| | | return processesType; |
| | | } |
| | | public void setIpAddress(String ipAddress) |
| | | { |
| | | this.ipAddress = ipAddress; |
| | | } |
| | | |
| | | public String getIpAddress() |
| | | { |
| | | return ipAddress; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | | this.spareField1 = spareField1; |
| | | } |
| | | |
| | | public String getSpareField1() |
| | | { |
| | | return spareField1; |
| | | } |
| | | public void setSpareField2(String spareField2) |
| | | { |
| | | this.spareField2 = spareField2; |
| | | } |
| | | |
| | | public String getSpareField2() |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setSpareField3(String spareField3) |
| | | { |
| | | this.spareField3 = spareField3; |
| | | } |
| | | |
| | | public String getSpareField3() |
| | | { |
| | | return spareField3; |
| | | } |
| | | public void setSpareField4(String spareField4) |
| | | { |
| | | this.spareField4 = spareField4; |
| | | } |
| | | |
| | | public String getSpareField4() |
| | | { |
| | | return spareField4; |
| | | } |
| | | public void 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 setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("processesCode", getProcessesCode()) |
| | | .append("processesName", getProcessesName()) |
| | | .append("processesType", getProcessesType()) |
| | | .append("ipAddress", getIpAddress()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("spareField3", getSpareField3()) |
| | | .append("spareField4", getSpareField4()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("remarks", getRemarks()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.sc.stationConf.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.sc.stationConf.domain.ScStationConf; |
| | | |
| | | /** |
| | | * å·¥ä½ç»ç«¯é
ç½®Mapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-06 |
| | | */ |
| | | public interface ScStationConfMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param id å·¥ä½ç»ç«¯é
ç½®ä¸»é® |
| | | * @return å·¥ä½ç»ç«¯é
ç½® |
| | | */ |
| | | public ScStationConf selectScStationConfById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ç»ç«¯é
ç½®å表 |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return å·¥ä½ç»ç«¯é
ç½®éå |
| | | */ |
| | | public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf); |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertScStationConf(ScStationConf scStationConf); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateScStationConf(ScStationConf scStationConf); |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param id å·¥ä½ç»ç«¯é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteScStationConfById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteScStationConfByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.sc.stationConf.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.sc.stationConf.domain.ScStationConf; |
| | | |
| | | /** |
| | | * å·¥ä½ç»ç«¯é
ç½®Serviceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-06 |
| | | */ |
| | | public interface IScStationConfService |
| | | { |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param id å·¥ä½ç»ç«¯é
ç½®ä¸»é® |
| | | * @return å·¥ä½ç»ç«¯é
ç½® |
| | | */ |
| | | public ScStationConf selectScStationConfById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ç»ç«¯é
ç½®å表 |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return å·¥ä½ç»ç«¯é
ç½®éå |
| | | */ |
| | | public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf); |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertScStationConf(ScStationConf scStationConf); |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateScStationConf(ScStationConf scStationConf); |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param ids éè¦å é¤çå·¥ä½ç»ç«¯é
置主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteScStationConfByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ç»ç«¯é
ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ç»ç«¯é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteScStationConfById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.sc.stationConf.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.sc.stationConf.mapper.ScStationConfMapper; |
| | | import com.jcdm.main.sc.stationConf.domain.ScStationConf; |
| | | import com.jcdm.main.sc.stationConf.service.IScStationConfService; |
| | | |
| | | /** |
| | | * å·¥ä½ç»ç«¯é
ç½®Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2024-01-06 |
| | | */ |
| | | @Service |
| | | public class ScStationConfServiceImpl implements IScStationConfService |
| | | { |
| | | @Autowired |
| | | private ScStationConfMapper scStationConfMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param id å·¥ä½ç»ç«¯é
ç½®ä¸»é® |
| | | * @return å·¥ä½ç»ç«¯é
ç½® |
| | | */ |
| | | @Override |
| | | public ScStationConf selectScStationConfById(Long id) |
| | | { |
| | | return scStationConfMapper.selectScStationConfById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¥ä½ç»ç«¯é
ç½®å表 |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return å·¥ä½ç»ç«¯é
ç½® |
| | | */ |
| | | @Override |
| | | public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf) |
| | | { |
| | | return scStationConfMapper.selectScStationConfList(scStationConf); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertScStationConf(ScStationConf scStationConf) |
| | | { |
| | | scStationConf.setCreateTime(DateUtils.getNowDate()); |
| | | return scStationConfMapper.insertScStationConf(scStationConf); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param scStationConf å·¥ä½ç»ç«¯é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateScStationConf(ScStationConf scStationConf) |
| | | { |
| | | scStationConf.setUpdateTime(DateUtils.getNowDate()); |
| | | return scStationConfMapper.updateScStationConf(scStationConf); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤å·¥ä½ç»ç«¯é
ç½® |
| | | * |
| | | * @param ids éè¦å é¤çå·¥ä½ç»ç«¯é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteScStationConfByIds(Long[] ids) |
| | | { |
| | | return scStationConfMapper.deleteScStationConfByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥ä½ç»ç«¯é
ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id å·¥ä½ç»ç«¯é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteScStationConfById(Long id) |
| | | { |
| | | return scStationConfMapper.deleteScStationConfById(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.beatSetting.mapper.BsBeatSettingMapper"> |
| | | |
| | | <resultMap type="BsBeatSetting" id="BsBeatSettingResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="beat" column="beat" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <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="dataSource" column="data_source" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsBeatSettingVo"> |
| | | select id, product_code, product_name, beat, spare_field_1, spare_field_2, remark, create_user, create_time, update_user, update_time, data_source from bs_beat_setting |
| | | </sql> |
| | | |
| | | <select id="selectBsBeatSettingList" parameterType="BsBeatSetting" resultMap="BsBeatSettingResult"> |
| | | <include refid="selectBsBeatSettingVo"/> |
| | | <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="beat != null and beat != ''"> and beat = #{beat}</if> |
| | | <if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if> |
| | | <if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="dataSource != null and dataSource != ''"> and data_source = #{dataSource}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsBeatSettingById" parameterType="Long" resultMap="BsBeatSettingResult"> |
| | | <include refid="selectBsBeatSettingVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsBeatSetting" parameterType="BsBeatSetting" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into bs_beat_setting |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="productCode != null">product_code,</if> |
| | | <if test="productName != null">product_name,</if> |
| | | <if test="beat != null and beat != ''">beat,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</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="dataSource != null">data_source,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="productCode != null">#{productCode},</if> |
| | | <if test="productName != null">#{productName},</if> |
| | | <if test="beat != null and beat != ''">#{beat},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</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="dataSource != null">#{dataSource},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsBeatSetting" parameterType="BsBeatSetting"> |
| | | update bs_beat_setting |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="productCode != null">product_code = #{productCode},</if> |
| | | <if test="productName != null">product_name = #{productName},</if> |
| | | <if test="beat != null and beat != ''">beat = #{beat},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</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="dataSource != null">data_source = #{dataSource},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsBeatSettingById" parameterType="Long"> |
| | | delete from bs_beat_setting where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsBeatSettingByIds" parameterType="String"> |
| | | delete from bs_beat_setting 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.sc.stationConf.mapper.ScStationConfMapper"> |
| | | |
| | | <resultMap type="ScStationConf" id="ScStationConfResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="processesCode" column="processes_code" /> |
| | | <result property="processesName" column="processes_name" /> |
| | | <result property="processesType" column="processes_type" /> |
| | | <result property="ipAddress" column="ip_address" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="spareField3" column="spare_field_3" /> |
| | | <result property="spareField4" column="spare_field_4" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remarks" column="remarks" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectScStationConfVo"> |
| | | select id, processes_code, processes_name, processes_type, ip_address, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks from sc_station_conf |
| | | </sql> |
| | | |
| | | <select id="selectScStationConfList" parameterType="ScStationConf" resultMap="ScStationConfResult"> |
| | | <include refid="selectScStationConfVo"/> |
| | | <where> |
| | | <if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if> |
| | | <if test="processesName != null and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if> |
| | | <if test="processesType != null and processesType != ''"> and processes_type = #{processesType}</if> |
| | | <if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if> |
| | | <if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if> |
| | | <if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if> |
| | | <if test="spareField3 != null and spareField3 != ''"> and spare_field_3 = #{spareField3}</if> |
| | | <if test="spareField4 != null and spareField4 != ''"> and spare_field_4 = #{spareField4}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectScStationConfById" parameterType="Long" resultMap="ScStationConfResult"> |
| | | <include refid="selectScStationConfVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertScStationConf" parameterType="ScStationConf" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into sc_station_conf |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="processesCode != null">processes_code,</if> |
| | | <if test="processesName != null">processes_name,</if> |
| | | <if test="processesType != null">processes_type,</if> |
| | | <if test="ipAddress != null">ip_address,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="spareField3 != null">spare_field_3,</if> |
| | | <if test="spareField4 != null">spare_field_4,</if> |
| | | <if test="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="remarks != null">remarks,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="processesCode != null">#{processesCode},</if> |
| | | <if test="processesName != null">#{processesName},</if> |
| | | <if test="processesType != null">#{processesType},</if> |
| | | <if test="ipAddress != null">#{ipAddress},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="spareField3 != null">#{spareField3},</if> |
| | | <if test="spareField4 != null">#{spareField4},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateScStationConf" parameterType="ScStationConf"> |
| | | update sc_station_conf |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="processesCode != null">processes_code = #{processesCode},</if> |
| | | <if test="processesName != null">processes_name = #{processesName},</if> |
| | | <if test="processesType != null">processes_type = #{processesType},</if> |
| | | <if test="ipAddress != null">ip_address = #{ipAddress},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
| | | <if test="spareField4 != null">spare_field_4 = #{spareField4},</if> |
| | | <if test="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="remarks != null">remarks = #{remarks},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteScStationConfById" parameterType="Long"> |
| | | delete from sc_station_conf where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteScStationConfByIds" parameterType="String"> |
| | | delete from sc_station_conf where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢èæ设置å表 |
| | | export function listBeatSetting(query) { |
| | | return request({ |
| | | url: '/bs/beatSetting/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢èæè®¾ç½®è¯¦ç» |
| | | export function getBeatSetting(id) { |
| | | return request({ |
| | | url: '/bs/beatSetting/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢èæ设置 |
| | | export function addBeatSetting(data) { |
| | | return request({ |
| | | url: '/bs/beatSetting', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹èæ设置 |
| | | export function updateBeatSetting(data) { |
| | | return request({ |
| | | url: '/bs/beatSetting', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤èæ设置 |
| | | export function delBeatSetting(id) { |
| | | return request({ |
| | | url: '/bs/beatSetting/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢å·¥ä½ç»ç«¯é
ç½®å表 |
| | | export function listStationConf(query) { |
| | | return request({ |
| | | url: '/sc/stationConf/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢å·¥ä½ç»ç«¯é
ç½®è¯¦ç» |
| | | export function getStationConf(id) { |
| | | return request({ |
| | | url: '/sc/stationConf/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢å·¥ä½ç»ç«¯é
ç½® |
| | | export function addStationConf(data) { |
| | | return request({ |
| | | url: '/sc/stationConf', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹å·¥ä½ç»ç«¯é
ç½® |
| | | export function updateStationConf(data) { |
| | | return request({ |
| | | url: '/sc/stationConf', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤å·¥ä½ç»ç«¯é
ç½® |
| | | export function delStationConf(id) { |
| | | return request({ |
| | | url: '/sc/stationConf/' + 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="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 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:beatSetting: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:beatSetting: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:beatSetting: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:beatSetting:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="beatSettingList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="产åç¼ç " align="center" prop="productCode"> |
| | | </el-table-column> |
| | | <el-table-column label="产åå称" align="center" prop="productName"> |
| | | </el-table-column> |
| | | <el-table-column label="èæ" align="center" prop="beat"> |
| | | </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:beatSetting:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['bs:beatSetting: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="productCode"> |
| | | <el-select style="width: 100%" @change="handleSelectChange(form.productCode)" v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼ç "> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.productCode" |
| | | :label="item.productCode" |
| | | :value="item.productCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input disabled v-model="form.productName" placeholder="请è¾å
¥äº§åå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="èæ" prop="beat"> |
| | | <el-input v-model="form.beat" 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 { listBeatSetting, getBeatSetting, delBeatSetting, addBeatSetting, updateBeatSetting } from "@/api/main/bs/beatSetting/beatSetting"; |
| | | import {listProductBom} from "@/api/main/bs/ProductBom/ProductBom"; |
| | | |
| | | export default { |
| | | name: "BeatSetting", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | options: [], |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // èæè®¾ç½®è¡¨æ ¼æ°æ® |
| | | beatSettingList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productCode: null, |
| | | productName: null, |
| | | beat: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | dataSource: null |
| | | }, |
| | | productCodeQueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productCode: null, |
| | | productName: null, |
| | | beat: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | dataSource: null |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | beat: [ |
| | | { required: true, message: "èæä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.initProductBom(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢èæ设置å表 */ |
| | | handleSelectChange(selectedOption) { |
| | | this.productCodeQueryParams.productCode = selectedOption; |
| | | listProductBom(this.productCodeQueryParams).then(response => { |
| | | this.form.productName = response.rows[0].productName; |
| | | }); |
| | | }, |
| | | initProductBom(){ |
| | | listProductBom(this.queryParams).then(response => { |
| | | this.options = response.rows; |
| | | }); |
| | | }, |
| | | |
| | | getList() { |
| | | this.loading = true; |
| | | listBeatSetting(this.queryParams).then(response => { |
| | | this.beatSettingList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | productCode: null, |
| | | productName: null, |
| | | beat: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | remark: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | dataSource: 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 |
| | | getBeatSetting(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) { |
| | | updateBeatSetting(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addBeatSetting(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 delBeatSetting(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/beatSetting/export', { |
| | | ...this.queryParams |
| | | }, `beatSetting_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="产线ç¼ç " prop="lineCode">--> |
| | | <!-- <el-input v-model="form.lineCode" placeholder="请è¾å
¥äº§çº¿ç¼ç " />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="产线ç¼ç " prop="lineCode">--> |
| | | <!-- <el-select style="width: 100%" @change="handleSelectChangelineCode(form.processesCode)" v-model="form.lineCode" placeholder="请è¾å
¥äº§çº¿ç¼ç ">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options"--> |
| | | <!-- :key="item.lineCode"--> |
| | | <!-- :label="item.lineCode"--> |
| | | <!-- :value="item.lineCode">--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="å¤æ³¨" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | |
| | | // å¨è¿éç¼åå¤çéä¸äºä»¶çé»è¾ |
| | | handleSelectChange(selectedOption) { |
| | | this.form.lineCode = null; |
| | | listLineInfo(selectedOption).then(response => { |
| | | let param = { |
| | | workshopCode : selectedOption |
| | | } |
| | | listLineInfo(param).then(response => { |
| | | this.lineOptions = response.rows; |
| | | }); |
| | | }, |
| | | getList() { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | // this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | console.log(this.queryParams) |
| | | this.loading = true; |
| | | listEquipmentArchives(this.queryParams).then(response => { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="processesCode"> |
| | | <el-input |
| | | v-model="queryParams.processesCode" |
| | | placeholder="请è¾å
¥å·¥åºç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºå称" prop="processesName"> |
| | | <el-input |
| | | v-model="queryParams.processesName" |
| | | placeholder="请è¾å
¥å·¥åºå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="IPå°å" prop="ipAddress"> |
| | | <el-input |
| | | v-model="queryParams.ipAddress" |
| | | placeholder="请è¾å
¥IPå°å" |
| | | 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="['sc:stationConf: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="['sc:stationConf: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="['sc:stationConf: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="['sc:stationConf:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="stationConfList" @selection-change="handleSelectionChange"> |
| | | <el-form-item type="selection" width="55" align="center" > |
| | | </el-form-item> |
| | | <el-table-column label="å·¥åºç¼å·" align="center" prop="processesCode"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºå称" align="center" prop="processesName"> |
| | | </el-table-column> |
| | | <el-table-column label="IPå°å" align="center" prop="ipAddress"> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['sc:stationConf:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['sc:stationConf: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="processesCode"> |
| | | <el-select style="width: 100%" @change="handleSelectChangeprocessesCode(form.processesCode)" v-model="form.processesCode" placeholder="请éæ©å·¥åºç¼å·"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.index" |
| | | :label="item.processesName" |
| | | :value="item.processesCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºå称" prop="processesName"> |
| | | <el-input disabled v-model="form.processesName" placeholder="请è¾å
¥å·¥åºå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="IPå°å" prop="ipAddress"> |
| | | <el-input v-model="form.ipAddress" placeholder="请è¾å
¥IPå°å" /> |
| | | </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 {listStationConf, getStationConf, delStationConf, addStationConf, updateStationConf} from "@/api/main/sc/stationConf"; |
| | | import {listProcesses} from "@/api/main/bs/processes/processes"; |
| | | |
| | | export default { |
| | | name: "StationConf", |
| | | data() { |
| | | return { |
| | | options: [], |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // å·¥ä½ç»ç«¯é
ç½®è¡¨æ ¼æ°æ® |
| | | stationConfList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | processesCode: null, |
| | | processesName: null, |
| | | processesType: null, |
| | | ipAddress: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | remarks: null |
| | | }, |
| | | processesCodeQueryParams:{ |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | processesCodes: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.initProcesses(); |
| | | }, |
| | | methods: { |
| | | |
| | | handleSelectChangeprocessesCode(selectedOption) { |
| | | this.processesCodeQueryParams.processesCodes = selectedOption; |
| | | listProcesses(this.queryParams).then(response => { |
| | | this.form.processesName = response.rows[0].processesName; |
| | | }); |
| | | }, |
| | | initProcesses(){ |
| | | listProcesses(this.queryParams).then(response => { |
| | | this.options = response.rows; |
| | | }); |
| | | }, |
| | | /** æ¥è¯¢å·¥ä½ç»ç«¯é
ç½®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listStationConf(this.queryParams).then(response => { |
| | | this.stationConfList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | processesCode: null, |
| | | processesName: null, |
| | | processesType: null, |
| | | ipAddress: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | remarks: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.titleName = "æ·»å å·¥ä½ç»ç«¯é
ç½®"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getStationConf(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) { |
| | | updateStationConf(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addStationConf(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 delStationConf(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('sc/stationConf/export', { |
| | | ...this.queryParams |
| | | }, `stationConf_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |