change - add工位、托盘、附件信息
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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>
|
||||||
@ -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…
Reference in New Issue