电子标签亮灯 灭灯逻辑
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.bas.tag.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.tag.domain.BasTag;
|
||||
import com.ruoyi.bas.tag.service.IBasTagService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 电子标签Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bas/tag")
|
||||
public class BasTagController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasTagService basTagService;
|
||||
|
||||
/**
|
||||
* 查询电子标签列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:tag:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasTag basTag)
|
||||
{
|
||||
startPage();
|
||||
List<BasTag> list = basTagService.selectBasTagList(basTag);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出电子标签列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:tag:export')")
|
||||
@Log(title = "电子标签", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasTag basTag)
|
||||
{
|
||||
List<BasTag> list = basTagService.selectBasTagList(basTag);
|
||||
ExcelUtil<BasTag> util = new ExcelUtil<BasTag>(BasTag.class);
|
||||
util.exportExcel(response, list, "电子标签数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电子标签详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:tag:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(basTagService.selectBasTagById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电子标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:tag:add')")
|
||||
@Log(title = "电子标签", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasTag basTag)
|
||||
{
|
||||
return toAjax(basTagService.insertBasTag(basTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电子标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:tag:edit')")
|
||||
@Log(title = "电子标签", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasTag basTag)
|
||||
{
|
||||
return toAjax(basTagService.updateBasTag(basTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电子标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:tag:remove')")
|
||||
@Log(title = "电子标签", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(basTagService.deleteBasTagByIds(ids));
|
||||
}
|
||||
}
|
||||
157
ruoyi-admin/src/main/java/com/ruoyi/bas/tag/domain/BasTag.java
Normal file
157
ruoyi-admin/src/main/java/com/ruoyi/bas/tag/domain/BasTag.java
Normal file
@@ -0,0 +1,157 @@
|
||||
package com.ruoyi.bas.tag.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;
|
||||
|
||||
/**
|
||||
* 电子标签对象 bas_tag
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class BasTag extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** ip地址 */
|
||||
@Excel(name = "ip地址")
|
||||
private String ip;
|
||||
|
||||
/** 拣选工位 */
|
||||
@Excel(name = "拣选工位")
|
||||
private String pickAdd;
|
||||
|
||||
/** 托盘码 */
|
||||
@Excel(name = "托盘码")
|
||||
private String trayCode;
|
||||
|
||||
/** 当前显示数量 */
|
||||
@Excel(name = "当前显示数量")
|
||||
private String curNum;
|
||||
|
||||
/** 下发完成 */
|
||||
@Excel(name = "下发完成")
|
||||
private String sendCompleted;
|
||||
|
||||
/** 备用1 */
|
||||
@Excel(name = "备用1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用2 */
|
||||
@Excel(name = "备用2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用3 */
|
||||
@Excel(name = "备用3")
|
||||
private String spare3;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setIp(String ip)
|
||||
{
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getIp()
|
||||
{
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setPickAdd(String pickAdd)
|
||||
{
|
||||
this.pickAdd = pickAdd;
|
||||
}
|
||||
|
||||
public String getPickAdd()
|
||||
{
|
||||
return pickAdd;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setCurNum(String curNum)
|
||||
{
|
||||
this.curNum = curNum;
|
||||
}
|
||||
|
||||
public String getCurNum()
|
||||
{
|
||||
return curNum;
|
||||
}
|
||||
|
||||
public void setSendCompleted(String sendCompleted)
|
||||
{
|
||||
this.sendCompleted = sendCompleted;
|
||||
}
|
||||
|
||||
public String getSendCompleted()
|
||||
{
|
||||
return sendCompleted;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("ip", getIp())
|
||||
.append("pickAdd", getPickAdd())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("curNum", getCurNum())
|
||||
.append("sendCompleted", getSendCompleted())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.tag.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.tag.domain.BasTag;
|
||||
|
||||
/**
|
||||
* 电子标签Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface BasTagMapper
|
||||
{
|
||||
/**
|
||||
* 查询电子标签
|
||||
*
|
||||
* @param id 电子标签主键
|
||||
* @return 电子标签
|
||||
*/
|
||||
public BasTag selectBasTagById(Long id);
|
||||
|
||||
/**
|
||||
* 查询电子标签列表
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 电子标签集合
|
||||
*/
|
||||
public List<BasTag> selectBasTagList(BasTag basTag);
|
||||
|
||||
/**
|
||||
* 新增电子标签
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasTag(BasTag basTag);
|
||||
|
||||
/**
|
||||
* 修改电子标签
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasTag(BasTag basTag);
|
||||
|
||||
/**
|
||||
* 删除电子标签
|
||||
*
|
||||
* @param id 电子标签主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasTagById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除电子标签
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasTagByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.tag.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.tag.domain.BasTag;
|
||||
|
||||
/**
|
||||
* 电子标签Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IBasTagService
|
||||
{
|
||||
/**
|
||||
* 查询电子标签
|
||||
*
|
||||
* @param id 电子标签主键
|
||||
* @return 电子标签
|
||||
*/
|
||||
public BasTag selectBasTagById(Long id);
|
||||
|
||||
/**
|
||||
* 查询电子标签列表
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 电子标签集合
|
||||
*/
|
||||
public List<BasTag> selectBasTagList(BasTag basTag);
|
||||
|
||||
/**
|
||||
* 新增电子标签
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasTag(BasTag basTag);
|
||||
|
||||
/**
|
||||
* 修改电子标签
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasTag(BasTag basTag);
|
||||
|
||||
/**
|
||||
* 批量删除电子标签
|
||||
*
|
||||
* @param ids 需要删除的电子标签主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasTagByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除电子标签信息
|
||||
*
|
||||
* @param id 电子标签主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasTagById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.bas.tag.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.tag.mapper.BasTagMapper;
|
||||
import com.ruoyi.bas.tag.domain.BasTag;
|
||||
import com.ruoyi.bas.tag.service.IBasTagService;
|
||||
|
||||
/**
|
||||
* 电子标签Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class BasTagServiceImpl implements IBasTagService
|
||||
{
|
||||
@Autowired
|
||||
private BasTagMapper basTagMapper;
|
||||
|
||||
/**
|
||||
* 查询电子标签
|
||||
*
|
||||
* @param id 电子标签主键
|
||||
* @return 电子标签
|
||||
*/
|
||||
@Override
|
||||
public BasTag selectBasTagById(Long id)
|
||||
{
|
||||
return basTagMapper.selectBasTagById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询电子标签列表
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 电子标签
|
||||
*/
|
||||
@Override
|
||||
public List<BasTag> selectBasTagList(BasTag basTag)
|
||||
{
|
||||
return basTagMapper.selectBasTagList(basTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电子标签
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasTag(BasTag basTag)
|
||||
{
|
||||
return basTagMapper.insertBasTag(basTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电子标签
|
||||
*
|
||||
* @param basTag 电子标签
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasTag(BasTag basTag)
|
||||
{
|
||||
return basTagMapper.updateBasTag(basTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除电子标签
|
||||
*
|
||||
* @param ids 需要删除的电子标签主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasTagByIds(Long[] ids)
|
||||
{
|
||||
return basTagMapper.deleteBasTagByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电子标签信息
|
||||
*
|
||||
* @param id 电子标签主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasTagById(Long id)
|
||||
{
|
||||
return basTagMapper.deleteBasTagById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user