change - add工位、托盘、附件信息

master
yinq 10 months ago
parent dd72705735
commit f6154c5816

@ -0,0 +1,105 @@
package com.hw.mes.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
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.hw.common.log.annotation.Log;
import com.hw.common.log.enums.BusinessType;
import com.hw.common.security.annotation.RequiresPermissions;
import com.hw.mes.domain.MesBaseAttachInfo;
import com.hw.mes.service.IMesBaseAttachInfoService;
import com.hw.common.core.web.controller.BaseController;
import com.hw.common.core.web.domain.AjaxResult;
import com.hw.common.core.utils.poi.ExcelUtil;
import com.hw.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-01-26
*/
@RestController
@RequestMapping("/baseAttachInfo")
public class MesBaseAttachInfoController extends BaseController
{
@Autowired
private IMesBaseAttachInfoService mesBaseAttachInfoService;
/**
*
*/
@RequiresPermissions("mes:baseAttachInfo:list")
@GetMapping("/list")
public TableDataInfo list(MesBaseAttachInfo mesBaseAttachInfo)
{
startPage();
List<MesBaseAttachInfo> list = mesBaseAttachInfoService.selectMesBaseAttachInfoList(mesBaseAttachInfo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:baseAttachInfo:export")
@Log(title = "附件信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesBaseAttachInfo mesBaseAttachInfo)
{
List<MesBaseAttachInfo> list = mesBaseAttachInfoService.selectMesBaseAttachInfoList(mesBaseAttachInfo);
ExcelUtil<MesBaseAttachInfo> util = new ExcelUtil<MesBaseAttachInfo>(MesBaseAttachInfo.class);
util.exportExcel(response, list, "附件信息数据");
}
/**
*
*/
@RequiresPermissions("mes:baseAttachInfo:query")
@GetMapping(value = "/{attachId}")
public AjaxResult getInfo(@PathVariable("attachId") Long attachId)
{
return success(mesBaseAttachInfoService.selectMesBaseAttachInfoByAttachId(attachId));
}
/**
*
*/
@RequiresPermissions("mes:baseAttachInfo:add")
@Log(title = "附件信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MesBaseAttachInfo mesBaseAttachInfo)
{
return toAjax(mesBaseAttachInfoService.insertMesBaseAttachInfo(mesBaseAttachInfo));
}
/**
*
*/
@RequiresPermissions("mes:baseAttachInfo:edit")
@Log(title = "附件信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MesBaseAttachInfo mesBaseAttachInfo)
{
return toAjax(mesBaseAttachInfoService.updateMesBaseAttachInfo(mesBaseAttachInfo));
}
/**
*
*/
@RequiresPermissions("mes:baseAttachInfo:remove")
@Log(title = "附件信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{attachIds}")
public AjaxResult remove(@PathVariable Long[] attachIds)
{
return toAjax(mesBaseAttachInfoService.deleteMesBaseAttachInfoByAttachIds(attachIds));
}
}

@ -0,0 +1,105 @@
package com.hw.mes.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
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.hw.common.log.annotation.Log;
import com.hw.common.log.enums.BusinessType;
import com.hw.common.security.annotation.RequiresPermissions;
import com.hw.mes.domain.MesBasePalletInfo;
import com.hw.mes.service.IMesBasePalletInfoService;
import com.hw.common.core.web.controller.BaseController;
import com.hw.common.core.web.domain.AjaxResult;
import com.hw.common.core.utils.poi.ExcelUtil;
import com.hw.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-01-26
*/
@RestController
@RequestMapping("/basePalletInfo")
public class MesBasePalletInfoController extends BaseController
{
@Autowired
private IMesBasePalletInfoService mesBasePalletInfoService;
/**
*
*/
@RequiresPermissions("mes:basePalletInfo:list")
@GetMapping("/list")
public TableDataInfo list(MesBasePalletInfo mesBasePalletInfo)
{
startPage();
List<MesBasePalletInfo> list = mesBasePalletInfoService.selectMesBasePalletInfoList(mesBasePalletInfo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:basePalletInfo:export")
@Log(title = "托盘信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesBasePalletInfo mesBasePalletInfo)
{
List<MesBasePalletInfo> list = mesBasePalletInfoService.selectMesBasePalletInfoList(mesBasePalletInfo);
ExcelUtil<MesBasePalletInfo> util = new ExcelUtil<MesBasePalletInfo>(MesBasePalletInfo.class);
util.exportExcel(response, list, "托盘信息数据");
}
/**
*
*/
@RequiresPermissions("mes:basePalletInfo:query")
@GetMapping(value = "/{palletInfoId}")
public AjaxResult getInfo(@PathVariable("palletInfoId") Long palletInfoId)
{
return success(mesBasePalletInfoService.selectMesBasePalletInfoByPalletInfoId(palletInfoId));
}
/**
*
*/
@RequiresPermissions("mes:basePalletInfo:add")
@Log(title = "托盘信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MesBasePalletInfo mesBasePalletInfo)
{
return toAjax(mesBasePalletInfoService.insertMesBasePalletInfo(mesBasePalletInfo));
}
/**
*
*/
@RequiresPermissions("mes:basePalletInfo:edit")
@Log(title = "托盘信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MesBasePalletInfo mesBasePalletInfo)
{
return toAjax(mesBasePalletInfoService.updateMesBasePalletInfo(mesBasePalletInfo));
}
/**
*
*/
@RequiresPermissions("mes:basePalletInfo:remove")
@Log(title = "托盘信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{palletInfoIds}")
public AjaxResult remove(@PathVariable Long[] palletInfoIds)
{
return toAjax(mesBasePalletInfoService.deleteMesBasePalletInfoByPalletInfoIds(palletInfoIds));
}
}

@ -0,0 +1,104 @@
package com.hw.mes.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.hw.common.log.annotation.Log;
import com.hw.common.log.enums.BusinessType;
import com.hw.common.security.annotation.RequiresPermissions;
import com.hw.mes.domain.MesBaseStationInfo;
import com.hw.mes.service.IMesBaseStationInfoService;
import com.hw.common.core.web.controller.BaseController;
import com.hw.common.core.web.domain.AjaxResult;
import com.hw.common.core.utils.poi.ExcelUtil;
import com.hw.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-01-26
*/
@RestController
@RequestMapping("/baseStationInfo")
public class MesBaseStationInfoController extends BaseController
{
@Autowired
private IMesBaseStationInfoService mesBaseStationInfoService;
/**
*
*/
@RequiresPermissions("mes:baseStationInfo:list")
@GetMapping("/list")
public TableDataInfo list(MesBaseStationInfo mesBaseStationInfo)
{
startPage();
List<MesBaseStationInfo> list = mesBaseStationInfoService.selectMesBaseStationInfoList(mesBaseStationInfo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:baseStationInfo:export")
@Log(title = "工位信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MesBaseStationInfo mesBaseStationInfo)
{
List<MesBaseStationInfo> list = mesBaseStationInfoService.selectMesBaseStationInfoList(mesBaseStationInfo);
ExcelUtil<MesBaseStationInfo> util = new ExcelUtil<MesBaseStationInfo>(MesBaseStationInfo.class);
util.exportExcel(response, list, "工位信息数据");
}
/**
*
*/
@RequiresPermissions("mes:baseStationInfo:query")
@GetMapping(value = "/{stationId}")
public AjaxResult getInfo(@PathVariable("stationId") Long stationId)
{
return success(mesBaseStationInfoService.selectMesBaseStationInfoByStationId(stationId));
}
/**
*
*/
@RequiresPermissions("mes:baseStationInfo:add")
@Log(title = "工位信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MesBaseStationInfo mesBaseStationInfo)
{
return toAjax(mesBaseStationInfoService.insertMesBaseStationInfo(mesBaseStationInfo));
}
/**
*
*/
@RequiresPermissions("mes:baseStationInfo:edit")
@Log(title = "工位信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MesBaseStationInfo mesBaseStationInfo)
{
return toAjax(mesBaseStationInfoService.updateMesBaseStationInfo(mesBaseStationInfo));
}
/**
*
*/
@RequiresPermissions("mes:baseStationInfo:remove")
@Log(title = "工位信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{stationIds}")
public AjaxResult remove(@PathVariable Long[] stationIds)
{
return toAjax(mesBaseStationInfoService.deleteMesBaseStationInfoByStationIds(stationIds));
}
}

@ -0,0 +1,131 @@
package com.hw.mes.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hw.common.core.annotation.Excel;
import com.hw.common.core.web.domain.BaseEntity;
/**
* mes_base_attach_info
*
* @author Yinq
* @date 2024-01-26
*/
public class MesBaseAttachInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long attachId;
/**
*
*/
@Excel(name = "附件编号")
private String attachCode;
/**
*
*/
@Excel(name = "附件名称")
private String attachName;
/**
*
*/
@Excel(name = "附件类别")
private String attachType;
/**
*
*/
@Excel(name = "附件路径")
private String attachPath;
/**
*
*/
@Excel(name = "所属工序")
private Long processId;
/**
*
*/
@Excel(name = "激活标识")
private String activeFlag;
public void setAttachId(Long attachId) {
this.attachId = attachId;
}
public Long getAttachId() {
return attachId;
}
public void setAttachCode(String attachCode) {
this.attachCode = attachCode;
}
public String getAttachCode() {
return attachCode;
}
public void setAttachName(String attachName) {
this.attachName = attachName;
}
public String getAttachName() {
return attachName;
}
public void setAttachType(String attachType) {
this.attachType = attachType;
}
public String getAttachType() {
return attachType;
}
public void setAttachPath(String attachPath) {
this.attachPath = attachPath;
}
public String getAttachPath() {
return attachPath;
}
public void setProcessId(Long processId) {
this.processId = processId;
}
public Long getProcessId() {
return processId;
}
public void setActiveFlag(String activeFlag) {
this.activeFlag = activeFlag;
}
public String getActiveFlag() {
return activeFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("attachId", getAttachId())
.append("attachCode", getAttachCode())
.append("attachName", getAttachName())
.append("attachType", getAttachType())
.append("attachPath", getAttachPath())
.append("processId", getProcessId())
.append("activeFlag", getActiveFlag())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,56 @@
package com.hw.mes.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hw.common.core.annotation.Excel;
import com.hw.common.core.web.domain.BaseEntity;
/**
* mes_base_pallet_info
*
* @author Yinq
* @date 2024-01-26
*/
public class MesBasePalletInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 托盘ID */
private Long palletInfoId;
/** RFID编码 */
@Excel(name = "RFID编码")
private String palletInfoCode;
public void setPalletInfoId(Long palletInfoId)
{
this.palletInfoId = palletInfoId;
}
public Long getPalletInfoId()
{
return palletInfoId;
}
public void setPalletInfoCode(String palletInfoCode)
{
this.palletInfoCode = palletInfoCode;
}
public String getPalletInfoCode()
{
return palletInfoCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("palletInfoId", getPalletInfoId())
.append("palletInfoCode", getPalletInfoCode())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,131 @@
package com.hw.mes.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hw.common.core.annotation.Excel;
import com.hw.common.core.web.domain.BaseEntity;
/**
* mes_base_station_info
*
* @author Yinq
* @date 2024-01-26
*/
public class MesBaseStationInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long stationId;
/**
*
*/
@Excel(name = "工位编号")
private String stationCode;
/**
*
*/
@Excel(name = "工位名称")
private String stationName;
/**
*
*/
@Excel(name = "所属工序")
private Long processId;
/**
*
*/
@Excel(name = "楼层")
private Long floor;
/**
*
*/
@Excel(name = "单位生产时间")
private Long productionTime;
/**
*
*/
@Excel(name = "激活标识")
private String activeFlag;
public void setStationId(Long stationId) {
this.stationId = stationId;
}
public Long getStationId() {
return stationId;
}
public void setStationCode(String stationCode) {
this.stationCode = stationCode;
}
public String getStationCode() {
return stationCode;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getStationName() {
return stationName;
}
public void setProcessId(Long processId) {
this.processId = processId;
}
public Long getProcessId() {
return processId;
}
public void setFloor(Long floor) {
this.floor = floor;
}
public Long getFloor() {
return floor;
}
public void setProductionTime(Long productionTime) {
this.productionTime = productionTime;
}
public Long getProductionTime() {
return productionTime;
}
public void setActiveFlag(String activeFlag) {
this.activeFlag = activeFlag;
}
public String getActiveFlag() {
return activeFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("stationId", getStationId())
.append("stationCode", getStationCode())
.append("stationName", getStationName())
.append("processId", getProcessId())
.append("floor", getFloor())
.append("productionTime", getProductionTime())
.append("activeFlag", getActiveFlag())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,61 @@
package com.hw.mes.mapper;
import java.util.List;
import com.hw.mes.domain.MesBaseAttachInfo;
/**
* Mapper
*
* @author Yinq
* @date 2024-01-26
*/
public interface MesBaseAttachInfoMapper
{
/**
*
*
* @param attachId
* @return
*/
public MesBaseAttachInfo selectMesBaseAttachInfoByAttachId(Long attachId);
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
public List<MesBaseAttachInfo> selectMesBaseAttachInfoList(MesBaseAttachInfo mesBaseAttachInfo);
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
public int insertMesBaseAttachInfo(MesBaseAttachInfo mesBaseAttachInfo);
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
public int updateMesBaseAttachInfo(MesBaseAttachInfo mesBaseAttachInfo);
/**
*
*
* @param attachId
* @return
*/
public int deleteMesBaseAttachInfoByAttachId(Long attachId);
/**
*
*
* @param attachIds
* @return
*/
public int deleteMesBaseAttachInfoByAttachIds(Long[] attachIds);
}

@ -0,0 +1,61 @@
package com.hw.mes.mapper;
import java.util.List;
import com.hw.mes.domain.MesBasePalletInfo;
/**
* Mapper
*
* @author Yinq
* @date 2024-01-26
*/
public interface MesBasePalletInfoMapper
{
/**
*
*
* @param palletInfoId
* @return
*/
public MesBasePalletInfo selectMesBasePalletInfoByPalletInfoId(Long palletInfoId);
/**
*
*
* @param mesBasePalletInfo
* @return
*/
public List<MesBasePalletInfo> selectMesBasePalletInfoList(MesBasePalletInfo mesBasePalletInfo);
/**
*
*
* @param mesBasePalletInfo
* @return
*/
public int insertMesBasePalletInfo(MesBasePalletInfo mesBasePalletInfo);
/**
*
*
* @param mesBasePalletInfo
* @return
*/
public int updateMesBasePalletInfo(MesBasePalletInfo mesBasePalletInfo);
/**
*
*
* @param palletInfoId
* @return
*/
public int deleteMesBasePalletInfoByPalletInfoId(Long palletInfoId);
/**
*
*
* @param palletInfoIds
* @return
*/
public int deleteMesBasePalletInfoByPalletInfoIds(Long[] palletInfoIds);
}

@ -0,0 +1,61 @@
package com.hw.mes.mapper;
import java.util.List;
import com.hw.mes.domain.MesBaseStationInfo;
/**
* Mapper
*
* @author Yinq
* @date 2024-01-26
*/
public interface MesBaseStationInfoMapper
{
/**
*
*
* @param stationId
* @return
*/
public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId);
/**
*
*
* @param mesBaseStationInfo
* @return
*/
public List<MesBaseStationInfo> selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo);
/**
*
*
* @param mesBaseStationInfo
* @return
*/
public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo);
/**
*
*
* @param mesBaseStationInfo
* @return
*/
public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo);
/**
*
*
* @param stationId
* @return
*/
public int deleteMesBaseStationInfoByStationId(Long stationId);
/**
*
*
* @param stationIds
* @return
*/
public int deleteMesBaseStationInfoByStationIds(Long[] stationIds);
}

@ -0,0 +1,61 @@
package com.hw.mes.service;
import java.util.List;
import com.hw.mes.domain.MesBaseAttachInfo;
/**
* Service
*
* @author Yinq
* @date 2024-01-26
*/
public interface IMesBaseAttachInfoService
{
/**
*
*
* @param attachId
* @return
*/
public MesBaseAttachInfo selectMesBaseAttachInfoByAttachId(Long attachId);
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
public List<MesBaseAttachInfo> selectMesBaseAttachInfoList(MesBaseAttachInfo mesBaseAttachInfo);
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
public int insertMesBaseAttachInfo(MesBaseAttachInfo mesBaseAttachInfo);
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
public int updateMesBaseAttachInfo(MesBaseAttachInfo mesBaseAttachInfo);
/**
*
*
* @param attachIds
* @return
*/
public int deleteMesBaseAttachInfoByAttachIds(Long[] attachIds);
/**
*
*
* @param attachId
* @return
*/
public int deleteMesBaseAttachInfoByAttachId(Long attachId);
}

@ -0,0 +1,61 @@
package com.hw.mes.service;
import java.util.List;
import com.hw.mes.domain.MesBasePalletInfo;
/**
* Service
*
* @author Yinq
* @date 2024-01-26
*/
public interface IMesBasePalletInfoService
{
/**
*
*
* @param palletInfoId
* @return
*/
public MesBasePalletInfo selectMesBasePalletInfoByPalletInfoId(Long palletInfoId);
/**
*
*
* @param mesBasePalletInfo
* @return
*/
public List<MesBasePalletInfo> selectMesBasePalletInfoList(MesBasePalletInfo mesBasePalletInfo);
/**
*
*
* @param mesBasePalletInfo
* @return
*/
public int insertMesBasePalletInfo(MesBasePalletInfo mesBasePalletInfo);
/**
*
*
* @param mesBasePalletInfo
* @return
*/
public int updateMesBasePalletInfo(MesBasePalletInfo mesBasePalletInfo);
/**
*
*
* @param palletInfoIds
* @return
*/
public int deleteMesBasePalletInfoByPalletInfoIds(Long[] palletInfoIds);
/**
*
*
* @param palletInfoId
* @return
*/
public int deleteMesBasePalletInfoByPalletInfoId(Long palletInfoId);
}

@ -0,0 +1,61 @@
package com.hw.mes.service;
import java.util.List;
import com.hw.mes.domain.MesBaseStationInfo;
/**
* Service
*
* @author Yinq
* @date 2024-01-26
*/
public interface IMesBaseStationInfoService
{
/**
*
*
* @param stationId
* @return
*/
public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId);
/**
*
*
* @param mesBaseStationInfo
* @return
*/
public List<MesBaseStationInfo> selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo);
/**
*
*
* @param mesBaseStationInfo
* @return
*/
public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo);
/**
*
*
* @param mesBaseStationInfo
* @return
*/
public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo);
/**
*
*
* @param stationIds
* @return
*/
public int deleteMesBaseStationInfoByStationIds(Long[] stationIds);
/**
*
*
* @param stationId
* @return
*/
public int deleteMesBaseStationInfoByStationId(Long stationId);
}

@ -0,0 +1,99 @@
package com.hw.mes.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.mapper.MesBaseAttachInfoMapper;
import com.hw.mes.domain.MesBaseAttachInfo;
import com.hw.mes.service.IMesBaseAttachInfoService;
/**
* Service
*
* @author Yinq
* @date 2024-01-26
*/
@Service
public class MesBaseAttachInfoServiceImpl implements IMesBaseAttachInfoService
{
@Autowired
private MesBaseAttachInfoMapper mesBaseAttachInfoMapper;
/**
*
*
* @param attachId
* @return
*/
@Override
public MesBaseAttachInfo selectMesBaseAttachInfoByAttachId(Long attachId)
{
return mesBaseAttachInfoMapper.selectMesBaseAttachInfoByAttachId(attachId);
}
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
@Override
public List<MesBaseAttachInfo> selectMesBaseAttachInfoList(MesBaseAttachInfo mesBaseAttachInfo)
{
return mesBaseAttachInfoMapper.selectMesBaseAttachInfoList(mesBaseAttachInfo);
}
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
@Override
public int insertMesBaseAttachInfo(MesBaseAttachInfo mesBaseAttachInfo)
{
mesBaseAttachInfo.setCreateBy(SecurityUtils.getUsername());
mesBaseAttachInfo.setCreateTime(DateUtils.getNowDate());
return mesBaseAttachInfoMapper.insertMesBaseAttachInfo(mesBaseAttachInfo);
}
/**
*
*
* @param mesBaseAttachInfo
* @return
*/
@Override
public int updateMesBaseAttachInfo(MesBaseAttachInfo mesBaseAttachInfo)
{
mesBaseAttachInfo.setUpdateTime(DateUtils.getNowDate());
mesBaseAttachInfo.setUpdateBy(SecurityUtils.getUsername());
return mesBaseAttachInfoMapper.updateMesBaseAttachInfo(mesBaseAttachInfo);
}
/**
*
*
* @param attachIds
* @return
*/
@Override
public int deleteMesBaseAttachInfoByAttachIds(Long[] attachIds)
{
return mesBaseAttachInfoMapper.deleteMesBaseAttachInfoByAttachIds(attachIds);
}
/**
*
*
* @param attachId
* @return
*/
@Override
public int deleteMesBaseAttachInfoByAttachId(Long attachId)
{
return mesBaseAttachInfoMapper.deleteMesBaseAttachInfoByAttachId(attachId);
}
}

@ -0,0 +1,99 @@
package com.hw.mes.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.mapper.MesBasePalletInfoMapper;
import com.hw.mes.domain.MesBasePalletInfo;
import com.hw.mes.service.IMesBasePalletInfoService;
/**
* Service
*
* @author Yinq
* @date 2024-01-26
*/
@Service
public class MesBasePalletInfoServiceImpl implements IMesBasePalletInfoService
{
@Autowired
private MesBasePalletInfoMapper mesBasePalletInfoMapper;
/**
*
*
* @param palletInfoId
* @return
*/
@Override
public MesBasePalletInfo selectMesBasePalletInfoByPalletInfoId(Long palletInfoId)
{
return mesBasePalletInfoMapper.selectMesBasePalletInfoByPalletInfoId(palletInfoId);
}
/**
*
*
* @param mesBasePalletInfo
* @return
*/
@Override
public List<MesBasePalletInfo> selectMesBasePalletInfoList(MesBasePalletInfo mesBasePalletInfo)
{
return mesBasePalletInfoMapper.selectMesBasePalletInfoList(mesBasePalletInfo);
}
/**
*
*
* @param mesBasePalletInfo
* @return
*/
@Override
public int insertMesBasePalletInfo(MesBasePalletInfo mesBasePalletInfo)
{
mesBasePalletInfo.setCreateTime(DateUtils.getNowDate());
mesBasePalletInfo.setCreateBy(SecurityUtils.getUsername());
return mesBasePalletInfoMapper.insertMesBasePalletInfo(mesBasePalletInfo);
}
/**
*
*
* @param mesBasePalletInfo
* @return
*/
@Override
public int updateMesBasePalletInfo(MesBasePalletInfo mesBasePalletInfo)
{
mesBasePalletInfo.setUpdateTime(DateUtils.getNowDate());
mesBasePalletInfo.setUpdateBy(SecurityUtils.getUsername());
return mesBasePalletInfoMapper.updateMesBasePalletInfo(mesBasePalletInfo);
}
/**
*
*
* @param palletInfoIds
* @return
*/
@Override
public int deleteMesBasePalletInfoByPalletInfoIds(Long[] palletInfoIds)
{
return mesBasePalletInfoMapper.deleteMesBasePalletInfoByPalletInfoIds(palletInfoIds);
}
/**
*
*
* @param palletInfoId
* @return
*/
@Override
public int deleteMesBasePalletInfoByPalletInfoId(Long palletInfoId)
{
return mesBasePalletInfoMapper.deleteMesBasePalletInfoByPalletInfoId(palletInfoId);
}
}

@ -60,6 +60,7 @@ public class MesBaseRouteServiceImpl implements IMesBaseRouteService
public int insertMesBaseRoute(MesBaseRoute mesBaseRoute)
{
mesBaseRoute.setCreateTime(DateUtils.getNowDate());
mesBaseRoute.setCreateBy(SecurityUtils.getUsername());
int rows = mesBaseRouteMapper.insertMesBaseRoute(mesBaseRoute);
insertMesBaseRouteProcess(mesBaseRoute);
return rows;
@ -76,6 +77,7 @@ public class MesBaseRouteServiceImpl implements IMesBaseRouteService
public int updateMesBaseRoute(MesBaseRoute mesBaseRoute)
{
mesBaseRoute.setUpdateTime(DateUtils.getNowDate());
mesBaseRoute.setUpdateBy(SecurityUtils.getUsername());
mesBaseRouteMapper.deleteMesBaseRouteProcessByRouteId(mesBaseRoute.getRouteId());
insertMesBaseRouteProcess(mesBaseRoute);
return mesBaseRouteMapper.updateMesBaseRoute(mesBaseRoute);

@ -0,0 +1,99 @@
package com.hw.mes.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.mapper.MesBaseStationInfoMapper;
import com.hw.mes.domain.MesBaseStationInfo;
import com.hw.mes.service.IMesBaseStationInfoService;
/**
* Service
*
* @author Yinq
* @date 2024-01-26
*/
@Service
public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
{
@Autowired
private MesBaseStationInfoMapper mesBaseStationInfoMapper;
/**
*
*
* @param stationId
* @return
*/
@Override
public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId)
{
return mesBaseStationInfoMapper.selectMesBaseStationInfoByStationId(stationId);
}
/**
*
*
* @param mesBaseStationInfo
* @return
*/
@Override
public List<MesBaseStationInfo> selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo)
{
return mesBaseStationInfoMapper.selectMesBaseStationInfoList(mesBaseStationInfo);
}
/**
*
*
* @param mesBaseStationInfo
* @return
*/
@Override
public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo)
{
mesBaseStationInfo.setCreateTime(DateUtils.getNowDate());
mesBaseStationInfo.setCreateBy(SecurityUtils.getUsername());
return mesBaseStationInfoMapper.insertMesBaseStationInfo(mesBaseStationInfo);
}
/**
*
*
* @param mesBaseStationInfo
* @return
*/
@Override
public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo)
{
mesBaseStationInfo.setUpdateTime(DateUtils.getNowDate());
mesBaseStationInfo.setUpdateBy(SecurityUtils.getUsername());
return mesBaseStationInfoMapper.updateMesBaseStationInfo(mesBaseStationInfo);
}
/**
*
*
* @param stationIds
* @return
*/
@Override
public int deleteMesBaseStationInfoByStationIds(Long[] stationIds)
{
return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationIds(stationIds);
}
/**
*
*
* @param stationId
* @return
*/
@Override
public int deleteMesBaseStationInfoByStationId(Long stationId)
{
return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationId(stationId);
}
}

@ -2,6 +2,7 @@ package com.hw.mes.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.mapper.MesBaseSupplierInfoMapper;
@ -54,6 +55,7 @@ public class MesBaseSupplierInfoServiceImpl implements IMesBaseSupplierInfoServi
public int insertMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo)
{
mesBaseSupplierInfo.setCreateTime(DateUtils.getNowDate());
mesBaseSupplierInfo.setCreateBy(SecurityUtils.getUsername());
return mesBaseSupplierInfoMapper.insertMesBaseSupplierInfo(mesBaseSupplierInfo);
}
@ -67,6 +69,7 @@ public class MesBaseSupplierInfoServiceImpl implements IMesBaseSupplierInfoServi
public int updateMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo)
{
mesBaseSupplierInfo.setUpdateTime(DateUtils.getNowDate());
mesBaseSupplierInfo.setUpdateBy(SecurityUtils.getUsername());
return mesBaseSupplierInfoMapper.updateMesBaseSupplierInfo(mesBaseSupplierInfo);
}

@ -0,0 +1,117 @@
<?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.hw.mes.mapper.MesBaseAttachInfoMapper">
<resultMap type="MesBaseAttachInfo" id="MesBaseAttachInfoResult">
<result property="attachId" column="attach_id"/>
<result property="attachCode" column="attach_code"/>
<result property="attachName" column="attach_name"/>
<result property="attachType" column="attach_type"/>
<result property="attachPath" column="attach_path"/>
<result property="processId" column="process_id"/>
<result property="activeFlag" column="active_flag"/>
<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"/>
</resultMap>
<sql id="selectMesBaseAttachInfoVo">
select attach_id,
attach_code,
attach_name,
attach_type,
attach_path,
process_id,
active_flag,
remark,
create_by,
create_time,
update_by,
update_time
from mes_base_attach_info
</sql>
<select id="selectMesBaseAttachInfoList" parameterType="MesBaseAttachInfo" resultMap="MesBaseAttachInfoResult">
<include refid="selectMesBaseAttachInfoVo"/>
<where>
<if test="attachCode != null and attachCode != ''">and attach_code = #{attachCode}</if>
<if test="attachName != null and attachName != ''">and attach_name like concat('%', #{attachName}, '%')
</if>
<if test="attachType != null and attachType != ''">and attach_type = #{attachType}</if>
<if test="attachPath != null and attachPath != ''">and attach_path = #{attachPath}</if>
<if test="processId != null ">and process_id = #{processId}</if>
<if test="activeFlag != null and activeFlag != ''">and active_flag = #{activeFlag}</if>
</where>
</select>
<select id="selectMesBaseAttachInfoByAttachId" parameterType="Long" resultMap="MesBaseAttachInfoResult">
<include refid="selectMesBaseAttachInfoVo"/>
where attach_id = #{attachId}
</select>
<insert id="insertMesBaseAttachInfo" parameterType="MesBaseAttachInfo" useGeneratedKeys="true"
keyProperty="attachId">
insert into mes_base_attach_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="attachCode != null">attach_code,</if>
<if test="attachName != null and attachName != ''">attach_name,</if>
<if test="attachType != null and attachType != ''">attach_type,</if>
<if test="attachPath != null and attachPath != ''">attach_path,</if>
<if test="processId != null">process_id,</if>
<if test="activeFlag != null">active_flag,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="attachCode != null">#{attachCode},</if>
<if test="attachName != null and attachName != ''">#{attachName},</if>
<if test="attachType != null and attachType != ''">#{attachType},</if>
<if test="attachPath != null and attachPath != ''">#{attachPath},</if>
<if test="processId != null">#{processId},</if>
<if test="activeFlag != null">#{activeFlag},</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>
</trim>
</insert>
<update id="updateMesBaseAttachInfo" parameterType="MesBaseAttachInfo">
update mes_base_attach_info
<trim prefix="SET" suffixOverrides=",">
<if test="attachCode != null">attach_code = #{attachCode},</if>
<if test="attachName != null and attachName != ''">attach_name = #{attachName},</if>
<if test="attachType != null and attachType != ''">attach_type = #{attachType},</if>
<if test="attachPath != null and attachPath != ''">attach_path = #{attachPath},</if>
<if test="processId != null">process_id = #{processId},</if>
<if test="activeFlag != null">active_flag = #{activeFlag},</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>
</trim>
where attach_id = #{attachId}
</update>
<delete id="deleteMesBaseAttachInfoByAttachId" parameterType="Long">
delete
from mes_base_attach_info
where attach_id = #{attachId}
</delete>
<delete id="deleteMesBaseAttachInfoByAttachIds" parameterType="String">
delete from mes_base_attach_info where attach_id in
<foreach item="attachId" collection="array" open="(" separator="," close=")">
#{attachId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,80 @@
<?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.hw.mes.mapper.MesBasePalletInfoMapper">
<resultMap type="MesBasePalletInfo" id="MesBasePalletInfoResult">
<result property="palletInfoId" column="pallet_info_id"/>
<result property="palletInfoCode" column="pallet_info_code"/>
<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"/>
</resultMap>
<sql id="selectMesBasePalletInfoVo">
select pallet_info_id, pallet_info_code, remark, create_by, create_time, update_by, update_time
from mes_base_pallet_info
</sql>
<select id="selectMesBasePalletInfoList" parameterType="MesBasePalletInfo" resultMap="MesBasePalletInfoResult">
<include refid="selectMesBasePalletInfoVo"/>
<where>
<if test="palletInfoCode != null and palletInfoCode != ''">and pallet_info_code = #{palletInfoCode}</if>
</where>
</select>
<select id="selectMesBasePalletInfoByPalletInfoId" parameterType="Long" resultMap="MesBasePalletInfoResult">
<include refid="selectMesBasePalletInfoVo"/>
where pallet_info_id = #{palletInfoId}
</select>
<insert id="insertMesBasePalletInfo" parameterType="MesBasePalletInfo" useGeneratedKeys="true"
keyProperty="palletInfoId">
insert into mes_base_pallet_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="palletInfoCode != null and palletInfoCode != ''">pallet_info_code,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="palletInfoCode != null and palletInfoCode != ''">#{palletInfoCode},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateMesBasePalletInfo" parameterType="MesBasePalletInfo">
update mes_base_pallet_info
<trim prefix="SET" suffixOverrides=",">
<if test="palletInfoCode != null and palletInfoCode != ''">pallet_info_code = #{palletInfoCode},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null and createBy != ''">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>
</trim>
where pallet_info_id = #{palletInfoId}
</update>
<delete id="deleteMesBasePalletInfoByPalletInfoId" parameterType="Long">
delete
from mes_base_pallet_info
where pallet_info_id = #{palletInfoId}
</delete>
<delete id="deleteMesBasePalletInfoByPalletInfoIds" parameterType="String">
delete from mes_base_pallet_info where pallet_info_id in
<foreach item="palletInfoId" collection="array" open="(" separator="," close=")">
#{palletInfoId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,123 @@
<?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.hw.mes.mapper.MesBaseStationInfoMapper">
<resultMap type="MesBaseStationInfo" id="MesBaseStationInfoResult">
<result property="stationId" column="station_id"/>
<result property="stationCode" column="station_code"/>
<result property="stationName" column="station_name"/>
<result property="processId" column="process_id"/>
<result property="floor" column="floor"/>
<result property="productionTime" column="production_time"/>
<result property="activeFlag" column="active_flag"/>
<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"/>
</resultMap>
<sql id="selectMesBaseStationInfoVo">
select station_id,
station_code,
station_name,
process_id,
floor,
production_time,
active_flag,
remark,
create_by,
create_time,
update_by,
update_time
from mes_base_station_info
</sql>
<select id="selectMesBaseStationInfoList" parameterType="MesBaseStationInfo" resultMap="MesBaseStationInfoResult">
<include refid="selectMesBaseStationInfoVo"/>
<where>
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
<if test="stationName != null and stationName != ''">and station_name like concat('%', #{stationName},
'%')
</if>
<if test="processId != null ">and process_id = #{processId}</if>
<if test="floor != null ">and floor = #{floor}</if>
<if test="productionTime != null ">and production_time = #{productionTime}</if>
<if test="activeFlag != null and activeFlag != ''">and active_flag = #{activeFlag}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
<if test="createTime != null ">and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
<if test="updateTime != null ">and update_time = #{updateTime}</if>
</where>
</select>
<select id="selectMesBaseStationInfoByStationId" parameterType="Long" resultMap="MesBaseStationInfoResult">
<include refid="selectMesBaseStationInfoVo"/>
where station_id = #{stationId}
</select>
<insert id="insertMesBaseStationInfo" parameterType="MesBaseStationInfo" useGeneratedKeys="true"
keyProperty="stationId">
insert into mes_base_station_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stationCode != null">station_code,</if>
<if test="stationName != null and stationName != ''">station_name,</if>
<if test="processId != null">process_id,</if>
<if test="floor != null">floor,</if>
<if test="productionTime != null">production_time,</if>
<if test="activeFlag != null and activeFlag != ''">active_flag,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stationCode != null">#{stationCode},</if>
<if test="stationName != null and stationName != ''">#{stationName},</if>
<if test="processId != null">#{processId},</if>
<if test="floor != null">#{floor},</if>
<if test="productionTime != null">#{productionTime},</if>
<if test="activeFlag != null and activeFlag != ''">#{activeFlag},</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>
</trim>
</insert>
<update id="updateMesBaseStationInfo" parameterType="MesBaseStationInfo">
update mes_base_station_info
<trim prefix="SET" suffixOverrides=",">
<if test="stationCode != null">station_code = #{stationCode},</if>
<if test="stationName != null and stationName != ''">station_name = #{stationName},</if>
<if test="processId != null">process_id = #{processId},</if>
<if test="floor != null">floor = #{floor},</if>
<if test="productionTime != null">production_time = #{productionTime},</if>
<if test="activeFlag != null and activeFlag != ''">active_flag = #{activeFlag},</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>
</trim>
where station_id = #{stationId}
</update>
<delete id="deleteMesBaseStationInfoByStationId" parameterType="Long">
delete
from mes_base_station_info
where station_id = #{stationId}
</delete>
<delete id="deleteMesBaseStationInfoByStationIds" parameterType="String">
delete from mes_base_station_info where station_id in
<foreach item="stationId" collection="array" open="(" separator="," close=")">
#{stationId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询附件信息列表
export function listBaseAttachInfo(query) {
return request({
url: '/mes/baseAttachInfo/list',
method: 'get',
params: query
})
}
// 查询附件信息详细
export function getBaseAttachInfo(attachId) {
return request({
url: '/mes/baseAttachInfo/' + attachId,
method: 'get'
})
}
// 新增附件信息
export function addBaseAttachInfo(data) {
return request({
url: '/mes/baseAttachInfo',
method: 'post',
data: data
})
}
// 修改附件信息
export function updateBaseAttachInfo(data) {
return request({
url: '/mes/baseAttachInfo',
method: 'put',
data: data
})
}
// 删除附件信息
export function delBaseAttachInfo(attachId) {
return request({
url: '/mes/baseAttachInfo/' + attachId,
method: 'delete'
})
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询托盘信息列表
export function listBasePalletInfo(query) {
return request({
url: '/mes/basePalletInfo/list',
method: 'get',
params: query
})
}
// 查询托盘信息详细
export function getBasePalletInfo(palletInfoId) {
return request({
url: '/mes/basePalletInfo/' + palletInfoId,
method: 'get'
})
}
// 新增托盘信息
export function addBasePalletInfo(data) {
return request({
url: '/mes/basePalletInfo',
method: 'post',
data: data
})
}
// 修改托盘信息
export function updateBasePalletInfo(data) {
return request({
url: '/mes/basePalletInfo',
method: 'put',
data: data
})
}
// 删除托盘信息
export function delBasePalletInfo(palletInfoId) {
return request({
url: '/mes/basePalletInfo/' + palletInfoId,
method: 'delete'
})
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询工位信息列表
export function listBaseStationInfo(query) {
return request({
url: '/mes/baseStationInfo/list',
method: 'get',
params: query
})
}
// 查询工位信息详细
export function getBaseStationInfo(stationId) {
return request({
url: '/mes/baseStationInfo/' + stationId,
method: 'get'
})
}
// 新增工位信息
export function addBaseStationInfo(data) {
return request({
url: '/mes/baseStationInfo',
method: 'post',
data: data
})
}
// 修改工位信息
export function updateBaseStationInfo(data) {
return request({
url: '/mes/baseStationInfo',
method: 'put',
data: data
})
}
// 删除工位信息
export function delBaseStationInfo(stationId) {
return request({
url: '/mes/baseStationInfo/' + stationId,
method: 'delete'
})
}

@ -0,0 +1,357 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!-- <el-form-item label="附件编号" prop="attachCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.attachCode"-->
<!-- placeholder="请输入附件编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="附件名称" prop="attachName">
<el-input
v-model="queryParams.attachName"
placeholder="请输入附件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="附件类别" prop="attachType">
<el-select v-model="queryParams.attachType" placeholder="请选择附件类别" clearable>
<el-option
v-for="dict in dict.type.attach_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="所属工序" prop="processId">
<el-input
v-model="queryParams.processId"
placeholder="请输入所属工序"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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="['mes:baseAttachInfo: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="['mes:baseAttachInfo: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="['mes:baseAttachInfo: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="['mes:baseAttachInfo:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="baseAttachInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="attachId" v-if="columns[0].visible"/>
<el-table-column label="附件编号" align="center" prop="attachCode" v-if="columns[1].visible"/>
<el-table-column label="附件名称" align="center" prop="attachName" v-if="columns[2].visible"/>
<el-table-column label="附件类别" align="center" prop="attachType" v-if="columns[3].visible" >
<template slot-scope="scope">
<dict-tag :options="dict.type.attach_type" :value="scope.row.attachType"/>
</template>
</el-table-column>
<el-table-column label="附件路径" align="center" prop="attachPath" v-if="columns[4].visible"/>
<el-table-column label="所属工序" align="center" prop="processId" v-if="columns[5].visible"/>
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[6].visible"/>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[7].visible"/>
<el-table-column label="创建人" align="center" prop="createBy" v-if="columns[8].visible"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[9].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[10].visible"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[11].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<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="['mes:baseAttachInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:baseAttachInfo:remove']"
>删除</el-button>
</template>
</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="attachCode">
<el-input v-model="form.attachCode" placeholder="请输入附件编号" />
</el-form-item>
<el-form-item label="附件名称" prop="attachName">
<el-input v-model="form.attachName" placeholder="请输入附件名称" />
</el-form-item>
<el-form-item label="附件类别" prop="attachType">
<el-radio-group v-model="form.attachType">
<el-radio
v-for="dict in dict.type.attach_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="附件路径" prop="attachPath">
<el-input v-model="form.attachPath" placeholder="请输入附件路径" />
</el-form-item>
<el-form-item label="所属工序" prop="processId">
<el-input v-model="form.processId" placeholder="请输入所属工序" />
</el-form-item>
<el-form-item label="激活标识" prop="activeFlag">
<el-input v-model="form.activeFlag" placeholder="请输入激活标识" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" 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 { listBaseAttachInfo, getBaseAttachInfo, delBaseAttachInfo, addBaseAttachInfo, updateBaseAttachInfo } from "@/api/mes/baseAttachInfo";
export default {
name: "BaseAttachInfo",
dicts: ['attach_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
baseAttachInfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
attachCode: null,
attachName: null,
attachType: null,
attachPath: null,
processId: null,
activeFlag: null,
},
//
form: {},
//
rules: {
attachName: [
{ required: true, message: "附件名称不能为空", trigger: "blur" }
],
attachType: [
{ required: true, message: "附件类别不能为空", trigger: "change" }
],
attachPath: [
{ required: true, message: "附件路径不能为空", trigger: "blur" }
],
},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `附件编号`, visible: true },
{ key: 2, label: `附件名称`, visible: true },
{ key: 3, label: `附件类别`, visible: true },
{ key: 4, label: `附件路径`, visible: true },
{ key: 5, label: `所属工序`, visible: true },
{ key: 6, label: `激活标识`, visible: false },
{ key: 7, label: `备注`, visible: true },
{ key: 8, label: `创建人`, visible: false },
{ key: 9, label: `创建时间`, visible: true },
{ key: 10, label: `更新人`, visible: false },
{ key: 11, label: `更新时间`, visible: false },
],
};
},
created() {
this.getList();
},
methods: {
/** 查询附件信息列表 */
getList() {
this.loading = true;
listBaseAttachInfo(this.queryParams).then(response => {
this.baseAttachInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
attachId: null,
attachCode: null,
attachName: null,
attachType: null,
attachPath: null,
processId: null,
activeFlag: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.attachId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加附件信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const attachId = row.attachId || this.ids
getBaseAttachInfo(attachId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改附件信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.attachId != null) {
updateBaseAttachInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBaseAttachInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const attachIds = row.attachId || this.ids;
this.$modal.confirm('是否确认删除附件信息编号为"' + attachIds + '"的数据项?').then(function() {
return delBaseAttachInfo(attachIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/baseAttachInfo/export', {
...this.queryParams
}, `baseAttachInfo_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -0,0 +1,294 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="RFID编码" prop="palletInfoCode">
<el-input
v-model="queryParams.palletInfoCode"
placeholder="请输入RFID编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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="['mes:basePalletInfo: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="['mes:basePalletInfo: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="['mes:basePalletInfo: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="['mes:basePalletInfo:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="basePalletInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="托盘ID" align="center" prop="palletInfoId" v-if="columns[0].visible"/>
<el-table-column label="RFID编码" align="center" prop="palletInfoCode" v-if="columns[1].visible"/>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[2].visible"/>
<el-table-column label="创建人" align="center" prop="createBy" v-if="columns[3].visible"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[4].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[5].visible"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[6].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<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="['mes:basePalletInfo:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:basePalletInfo:remove']"
>删除
</el-button>
</template>
</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="90px">
<el-form-item label="RFID编码" prop="palletInfoCode">
<el-input v-model="form.palletInfoCode" placeholder="请输入RFID编码"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" 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 {
listBasePalletInfo,
getBasePalletInfo,
delBasePalletInfo,
addBasePalletInfo,
updateBasePalletInfo
} from "@/api/mes/basePalletInfo";
export default {
name: "BasePalletInfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
basePalletInfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
palletInfoCode: null,
},
//
form: {},
//
rules: {
palletInfoCode: [
{required: true, message: "RFID编码不能为空", trigger: "blur"}
],
createBy: [
{required: true, message: "创建人不能为空", trigger: "blur"}
],
},
columns: [
{key: 0, label: `托盘ID`, visible: true},
{key: 1, label: `RFID编码`, visible: true},
{key: 2, label: `备注`, visible: true},
{key: 3, label: `创建人`, visible: true},
{key: 4, label: `创建时间`, visible: true},
{key: 5, label: `更新人`, visible: true},
{key: 6, label: `更新时间`, visible: true},
],
};
},
created() {
this.getList();
},
methods: {
/** 查询托盘信息列表 */
getList() {
this.loading = true;
listBasePalletInfo(this.queryParams).then(response => {
this.basePalletInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
palletInfoId: null,
palletInfoCode: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.palletInfoId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加托盘信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const palletInfoId = row.palletInfoId || this.ids
getBasePalletInfo(palletInfoId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改托盘信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.palletInfoId != null) {
updateBasePalletInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBasePalletInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const palletInfoIds = row.palletInfoId || this.ids;
this.$modal.confirm('是否确认删除托盘信息编号为"' + palletInfoIds + '"的数据项?').then(function () {
return delBasePalletInfo(palletInfoIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/basePalletInfo/export', {
...this.queryParams
}, `basePalletInfo_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -192,8 +192,7 @@ import {
getBaseRoute,
delBaseRoute,
addBaseRoute,
updateBaseRoute,
findRouteList
updateBaseRoute
} from "@/api/mes/baseRoute";
import {findProcessList} from "@//api/mes/processInfo";

@ -0,0 +1,386 @@
<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="stationCode">
<el-input
v-model="queryParams.stationCode"
placeholder="请输入工位编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工位名称" prop="stationName">
<el-input
v-model="queryParams.stationName"
placeholder="请输入工位名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属工序" prop="processId">
<el-select v-model="queryParams.processId" filterable placeholder="请选择工序" clearable>
<el-option
v-for="item in processList"
:key="item.processId"
:label="item.processName"
:value="item.processId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="楼层" prop="floor">
<el-input
v-model="queryParams.floor"
placeholder="请输入楼层"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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="['mes:baseStationInfo: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="['mes:baseStationInfo: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="['mes:baseStationInfo: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="['mes:baseStationInfo:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="baseStationInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="stationId" v-if="columns[0].visible"/>
<el-table-column label="工位编号" align="center" prop="stationCode" v-if="columns[1].visible"/>
<el-table-column label="工位名称" align="center" prop="stationName" v-if="columns[2].visible"/>
<el-table-column label="所属工序" align="center" prop="processId" v-if="columns[3].visible"/>
<el-table-column label="楼层" align="center" prop="floor" v-if="columns[4].visible"/>
<el-table-column label="单位生产时间" align="center" prop="productionTime" v-if="columns[5].visible"/>
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[6].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.active_flag" :value="scope.row.activeFlag"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[7].visible"/>
<el-table-column label="创建人" align="center" prop="createBy" v-if="columns[8].visible"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[9].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[10].visible"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[11].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<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="['mes:baseStationInfo:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:baseStationInfo:remove']"
>删除
</el-button>
</template>
</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="100px">
<el-form-item label="工位编号" prop="stationCode">
<el-input v-model="form.stationCode" placeholder="请输入工位编号"/>
</el-form-item>
<el-form-item label="工位名称" prop="stationName">
<el-input v-model="form.stationName" placeholder="请输入工位名称"/>
</el-form-item>
<el-form-item label="所属工序" prop="processId">
<el-select v-model="form.processId" filterable placeholder="请选择工序" clearable>
<el-option
v-for="item in processList"
:key="item.processId"
:label="item.processName"
:value="item.processId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="楼层" prop="floor">
<el-input v-model="form.floor" placeholder="请输入楼层"/>
</el-form-item>
<el-form-item label="单位生产时间" prop="productionTime">
<el-input v-model="form.productionTime" placeholder="请输入单位生产时间"/>
</el-form-item>
<el-form-item label="激活标识" prop="activeFlag">
<el-radio-group v-model="form.activeFlag">
<el-radio
v-for="dict in dict.type.active_flag"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" 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 {
listBaseStationInfo,
getBaseStationInfo,
delBaseStationInfo,
addBaseStationInfo,
updateBaseStationInfo
} from "@/api/mes/baseStationInfo";
import {findProcessList} from "@//api/mes/processInfo";
export default {
name: "BaseStationInfo",
dicts: ['active_flag'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
baseStationInfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
stationCode: null,
stationName: null,
processId: null,
floor: null,
productionTime: null,
activeFlag: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
//
form: {},
//
rules: {
stationName: [
{required: true, message: "工位名称不能为空", trigger: "blur"}
],
activeFlag: [
{required: true, message: "激活标识不能为空", trigger: "change"}
],
},
columns: [
{key: 0, label: `主键标识`, visible: false},
{key: 1, label: `工位编号`, visible: true},
{key: 2, label: `工位名称`, visible: true},
{key: 3, label: `所属工序`, visible: true},
{key: 4, label: `楼层`, visible: true},
{key: 5, label: `单位生产时间`, visible: true},
{key: 6, label: `激活标识`, visible: false},
{key: 7, label: `备注`, visible: true},
{key: 8, label: `创建人`, visible: false},
{key: 9, label: `创建时间`, visible: false},
{key: 10, label: `更新人`, visible: false},
{key: 11, label: `更新时间`, visible: false},
],
//
processList: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询工位信息列表 */
getList() {
this.loading = true;
findProcessList(null).then(response => {
this.processList = response.data
})
listBaseStationInfo(this.queryParams).then(response => {
this.baseStationInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
stationId: null,
stationCode: null,
stationName: null,
processId: null,
floor: null,
productionTime: null,
activeFlag: '1',
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.stationId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工位信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const stationId = row.stationId || this.ids
getBaseStationInfo(stationId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改工位信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.stationId != null) {
updateBaseStationInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBaseStationInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const stationIds = row.stationId || this.ids;
this.$modal.confirm('是否确认删除工位信息编号为"' + stationIds + '"的数据项?').then(function () {
return delBaseStationInfo(stationIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/baseStationInfo/export', {
...this.queryParams
}, `baseStationInfo_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save