项目初始化

This commit is contained in:
liuhanqing
2025-12-03 16:05:57 +08:00
commit 4b66b5bc44
871 changed files with 130415 additions and 0 deletions

View File

@@ -0,0 +1,104 @@
package com.ruoyi.device.ssj.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.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.service.IDeviceSsjService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 输送机Controller
*
* @author ruoyi
* @date 2025-07-04
*/
@RestController
@RequestMapping("/device/ssj")
public class DeviceSsjController extends BaseController
{
@Autowired
private IDeviceSsjService deviceSsjService;
/**
* 查询输送机列表
*/
@PreAuthorize("@ss.hasPermi('device:ssj:list')")
@GetMapping("/list")
public TableDataInfo list(DeviceSsj deviceSsj)
{
startPage();
List<DeviceSsj> list = deviceSsjService.selectDeviceSsjList(deviceSsj);
return getDataTable(list);
}
/**
* 导出输送机列表
*/
@PreAuthorize("@ss.hasPermi('device:ssj:export')")
@Log(title = "输送机", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DeviceSsj deviceSsj)
{
List<DeviceSsj> list = deviceSsjService.selectDeviceSsjList(deviceSsj);
ExcelUtil<DeviceSsj> util = new ExcelUtil<DeviceSsj>(DeviceSsj.class);
util.exportExcel(response, list, "输送机数据");
}
/**
* 获取输送机详细信息
*/
@PreAuthorize("@ss.hasPermi('device:ssj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(deviceSsjService.selectDeviceSsjById(id));
}
/**
* 新增输送机
*/
@PreAuthorize("@ss.hasPermi('device:ssj:add')")
@Log(title = "输送机", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DeviceSsj deviceSsj)
{
return toAjax(deviceSsjService.insertDeviceSsj(deviceSsj));
}
/**
* 修改输送机
*/
@PreAuthorize("@ss.hasPermi('device:ssj:edit')")
@Log(title = "输送机", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DeviceSsj deviceSsj)
{
return toAjax(deviceSsjService.updateDeviceSsj(deviceSsj));
}
/**
* 删除输送机
*/
@PreAuthorize("@ss.hasPermi('device:ssj:remove')")
@Log(title = "输送机", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(deviceSsjService.deleteDeviceSsjByIds(ids));
}
}

View File

@@ -0,0 +1,89 @@
package com.ruoyi.device.ssj.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
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;
/**
* 输送机对象 device_ssj
*
* @author ruoyi
* @date 2025-07-04
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DeviceSsj extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 设备唯一编码 */
@Excel(name = "设备唯一编码")
private String deviceCode ;
/** 设备名称 */
@Excel(name = "设备名称")
private String name ;
/** 类型 */
@Excel(name = "类型")
private String type;
/** 设备IP */
@Excel(name = "设备IP")
private String ipAddress;
/** PLC读取地址 */
@Excel(name = "PLC读取地址")
private String plcDbReadAddress;
/** 0-F 1-T */
@Excel(name = "0-F 1-T")
private String isActive;
/** PLC写入地址 */
@Excel(name = "PLC写入地址")
private String plcDbWriteAddress;
/** 入库请求 */
@Excel(name = "入库请求")
private int rkqq;
/** 空闲 */
@Excel(name = "空闲")
private int kx;
/** 到位 */
@Excel(name = "到位")
private int dw;
/** 条码 */
@Excel(name = "条码")
private String trayCode;
/** 任务号 */
@Excel(name = "任务号")
private int taskNo;
@Excel(name = "异常")
private int exception;
@Excel(name = "托盘尺寸")
private int traySize;
@Excel(name="允许放货")
private int allowPut;
@Excel(name="输送线模式 1-入库 2-出库")
private int model;
}

View File

@@ -0,0 +1,63 @@
package com.ruoyi.device.ssj.mapper;
import java.util.List;
import com.ruoyi.device.ssj.domain.DeviceSsj;
/**
* 输送机Mapper接口
*
* @author ruoyi
* @date 2025-07-04
*/
public interface DeviceSsjMapper
{
/**
* 查询输送机
*
* @param id 输送机主键
* @return 输送机
*/
public DeviceSsj selectDeviceSsjById(Long id);
/**
* 查询输送机列表
*
* @param deviceSsj 输送机
* @return 输送机集合
*/
public List<DeviceSsj> selectDeviceSsjList(DeviceSsj deviceSsj);
/**
* 新增输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int insertDeviceSsj(DeviceSsj deviceSsj);
/**
* 修改输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int updateDeviceSsj(DeviceSsj deviceSsj);
/**
* 删除输送机
*
* @param id 输送机主键
* @return 结果
*/
public int deleteDeviceSsjById(Long id);
/**
* 批量删除输送机
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDeviceSsjByIds(Long[] ids);
DeviceSsj selectSendData(Integer id);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.device.ssj.service;
import java.util.List;
import com.ruoyi.device.ssj.domain.DeviceSsj;
/**
* 输送机Service接口
*
* @author ruoyi
* @date 2025-07-04
*/
public interface IDeviceSsjService
{
/**
* 查询输送机
*
* @param id 输送机主键
* @return 输送机
*/
public DeviceSsj selectDeviceSsjById(Long id);
/**
* 查询输送机列表
*
* @param deviceSsj 输送机
* @return 输送机集合
*/
public List<DeviceSsj> selectDeviceSsjList(DeviceSsj deviceSsj);
/**
* 新增输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int insertDeviceSsj(DeviceSsj deviceSsj);
/**
* 修改输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int updateDeviceSsj(DeviceSsj deviceSsj);
/**
* 批量删除输送机
*
* @param ids 需要删除的输送机主键集合
* @return 结果
*/
public int deleteDeviceSsjByIds(Long[] ids);
/**
* 删除输送机信息
*
* @param id 输送机主键
* @return 结果
*/
public int deleteDeviceSsjById(Long id);
}

View File

@@ -0,0 +1,95 @@
package com.ruoyi.device.ssj.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.device.ssj.mapper.DeviceSsjMapper;
import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.service.IDeviceSsjService;
/**
* 输送机Service业务层处理
*
* @author ruoyi
* @date 2025-07-04
*/
@Service
public class DeviceSsjServiceImpl implements IDeviceSsjService
{
@Autowired
private DeviceSsjMapper deviceSsjMapper;
/**
* 查询输送机
*
* @param id 输送机主键
* @return 输送机
*/
@Override
public DeviceSsj selectDeviceSsjById(Long id)
{
return deviceSsjMapper.selectDeviceSsjById(id);
}
/**
* 查询输送机列表
*
* @param deviceSsj 输送机
* @return 输送机
*/
@Override
public List<DeviceSsj> selectDeviceSsjList(DeviceSsj deviceSsj)
{
return deviceSsjMapper.selectDeviceSsjList(deviceSsj);
}
/**
* 新增输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
@Override
public int insertDeviceSsj(DeviceSsj deviceSsj)
{
deviceSsj.setCreateTime(DateUtils.getNowDate());
return deviceSsjMapper.insertDeviceSsj(deviceSsj);
}
/**
* 修改输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
@Override
public int updateDeviceSsj(DeviceSsj deviceSsj)
{
return deviceSsjMapper.updateDeviceSsj(deviceSsj);
}
/**
* 批量删除输送机
*
* @param ids 需要删除的输送机主键
* @return 结果
*/
@Override
public int deleteDeviceSsjByIds(Long[] ids)
{
return deviceSsjMapper.deleteDeviceSsjByIds(ids);
}
/**
* 删除输送机信息
*
* @param id 输送机主键
* @return 结果
*/
@Override
public int deleteDeviceSsjById(Long id)
{
return deviceSsjMapper.deleteDeviceSsjById(id);
}
}