wcs项目初始化
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.bas.port.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.bas.port.domain.WcsPort;
|
||||
import com.ruoyi.bas.port.service.IWcsPortService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 点位管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bas/port")
|
||||
public class WcsPortController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWcsPortService wcsPortService;
|
||||
|
||||
/**
|
||||
* 查询点位管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:port:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WcsPort wcsPort)
|
||||
{
|
||||
startPage();
|
||||
List<WcsPort> list = wcsPortService.selectWcsPortList(wcsPort);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出点位管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:port:export')")
|
||||
@Log(title = "点位管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WcsPort wcsPort)
|
||||
{
|
||||
List<WcsPort> list = wcsPortService.selectWcsPortList(wcsPort);
|
||||
ExcelUtil<WcsPort> util = new ExcelUtil<WcsPort>(WcsPort.class);
|
||||
util.exportExcel(response, list, "点位管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取点位管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:port:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(wcsPortService.selectWcsPortById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点位管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:port:add')")
|
||||
@Log(title = "点位管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WcsPort wcsPort)
|
||||
{
|
||||
return toAjax(wcsPortService.insertWcsPort(wcsPort));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点位管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:port:edit')")
|
||||
@Log(title = "点位管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WcsPort wcsPort)
|
||||
{
|
||||
return toAjax(wcsPortService.updateWcsPort(wcsPort));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点位管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:port:remove')")
|
||||
@Log(title = "点位管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(wcsPortService.deleteWcsPortByIds(ids));
|
||||
}
|
||||
}
|
||||
157
ruoyi-admin/src/main/java/com/ruoyi/bas/port/domain/WcsPort.java
Normal file
157
ruoyi-admin/src/main/java/com/ruoyi/bas/port/domain/WcsPort.java
Normal file
@@ -0,0 +1,157 @@
|
||||
package com.ruoyi.bas.port.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 点位管理对象 wcs_port
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public class WcsPort extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 点位编码 */
|
||||
@Excel(name = "点位编码")
|
||||
private String portCode;
|
||||
|
||||
/** 点位名称 */
|
||||
@Excel(name = "点位名称")
|
||||
private String portName;
|
||||
|
||||
/** 点位类型 */
|
||||
@Excel(name = "点位类型")
|
||||
private String portType;
|
||||
|
||||
/** 点位区域 */
|
||||
@Excel(name = "点位区域")
|
||||
private String portRegion;
|
||||
|
||||
/** 备用字段 */
|
||||
@Excel(name = "备用字段")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段 */
|
||||
@Excel(name = "备用字段")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段 */
|
||||
@Excel(name = "备用字段")
|
||||
private String spare3;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setPortCode(String portCode)
|
||||
{
|
||||
this.portCode = portCode;
|
||||
}
|
||||
|
||||
public String getPortCode()
|
||||
{
|
||||
return portCode;
|
||||
}
|
||||
|
||||
public void setPortName(String portName)
|
||||
{
|
||||
this.portName = portName;
|
||||
}
|
||||
|
||||
public String getPortName()
|
||||
{
|
||||
return portName;
|
||||
}
|
||||
|
||||
public void setPortType(String portType)
|
||||
{
|
||||
this.portType = portType;
|
||||
}
|
||||
|
||||
public String getPortType()
|
||||
{
|
||||
return portType;
|
||||
}
|
||||
|
||||
public void setPortRegion(String portRegion)
|
||||
{
|
||||
this.portRegion = portRegion;
|
||||
}
|
||||
|
||||
public String getPortRegion()
|
||||
{
|
||||
return portRegion;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("portCode", getPortCode())
|
||||
.append("portName", getPortName())
|
||||
.append("portType", getPortType())
|
||||
.append("portRegion", getPortRegion())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.bas.port.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.port.domain.WcsPort;
|
||||
|
||||
/**
|
||||
* 点位管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public interface WcsPortMapper
|
||||
{
|
||||
/**
|
||||
* 查询点位管理
|
||||
*
|
||||
* @param id 点位管理主键
|
||||
* @return 点位管理
|
||||
*/
|
||||
public WcsPort selectWcsPortById(Long id);
|
||||
|
||||
/**
|
||||
* 查询点位管理列表
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 点位管理集合
|
||||
*/
|
||||
public List<WcsPort> selectWcsPortList(WcsPort wcsPort);
|
||||
|
||||
/**
|
||||
* 新增点位管理
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWcsPort(WcsPort wcsPort);
|
||||
|
||||
/**
|
||||
* 修改点位管理
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWcsPort(WcsPort wcsPort);
|
||||
|
||||
/**
|
||||
* 删除点位管理
|
||||
*
|
||||
* @param id 点位管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPortById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除点位管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPortByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据code查询点位
|
||||
* @param point
|
||||
* @return
|
||||
*/
|
||||
WcsPort selectWcsPortByPortCode(String point);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.bas.port.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.port.domain.WcsPort;
|
||||
|
||||
/**
|
||||
* 点位管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public interface IWcsPortService
|
||||
{
|
||||
/**
|
||||
* 查询点位管理
|
||||
*
|
||||
* @param id 点位管理主键
|
||||
* @return 点位管理
|
||||
*/
|
||||
public WcsPort selectWcsPortById(Long id);
|
||||
|
||||
/**
|
||||
* 查询点位管理列表
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 点位管理集合
|
||||
*/
|
||||
public List<WcsPort> selectWcsPortList(WcsPort wcsPort);
|
||||
|
||||
/**
|
||||
* 新增点位管理
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWcsPort(WcsPort wcsPort);
|
||||
|
||||
/**
|
||||
* 修改点位管理
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWcsPort(WcsPort wcsPort);
|
||||
|
||||
/**
|
||||
* 批量删除点位管理
|
||||
*
|
||||
* @param ids 需要删除的点位管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPortByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除点位管理信息
|
||||
*
|
||||
* @param id 点位管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWcsPortById(Long id);
|
||||
|
||||
/**
|
||||
* 根据点位代码查询点位名称
|
||||
* @param startPoint
|
||||
* @return
|
||||
*/
|
||||
WcsPort selectWcsPortByPortCode(String startPoint);
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.bas.port.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.port.mapper.WcsPortMapper;
|
||||
import com.ruoyi.bas.port.domain.WcsPort;
|
||||
import com.ruoyi.bas.port.service.IWcsPortService;
|
||||
|
||||
/**
|
||||
* 点位管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
@Service
|
||||
public class WcsPortServiceImpl implements IWcsPortService
|
||||
{
|
||||
@Autowired
|
||||
private WcsPortMapper wcsPortMapper;
|
||||
|
||||
/**
|
||||
* 查询点位管理
|
||||
*
|
||||
* @param id 点位管理主键
|
||||
* @return 点位管理
|
||||
*/
|
||||
@Override
|
||||
public WcsPort selectWcsPortById(Long id)
|
||||
{
|
||||
return wcsPortMapper.selectWcsPortById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询点位管理列表
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 点位管理
|
||||
*/
|
||||
@Override
|
||||
public List<WcsPort> selectWcsPortList(WcsPort wcsPort)
|
||||
{
|
||||
return wcsPortMapper.selectWcsPortList(wcsPort);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点位管理
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWcsPort(WcsPort wcsPort)
|
||||
{
|
||||
return wcsPortMapper.insertWcsPort(wcsPort);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点位管理
|
||||
*
|
||||
* @param wcsPort 点位管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWcsPort(WcsPort wcsPort)
|
||||
{
|
||||
return wcsPortMapper.updateWcsPort(wcsPort);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除点位管理
|
||||
*
|
||||
* @param ids 需要删除的点位管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWcsPortByIds(Long[] ids)
|
||||
{
|
||||
return wcsPortMapper.deleteWcsPortByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点位管理信息
|
||||
*
|
||||
* @param id 点位管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWcsPortById(Long id)
|
||||
{
|
||||
return wcsPortMapper.deleteWcsPortById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WcsPort selectWcsPortByPortCode(String point) {
|
||||
return wcsPortMapper.selectWcsPortByPortCode(point);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user