add - 放卷记录、读取记录
parent
d60e885aa9
commit
8b4208c079
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.5</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-traceability</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.traceability.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.traceability.domain.ProReadrecord;
|
||||
import com.ruoyi.traceability.service.IProReadrecordService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 读取记录Controller
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/traceability/readRecord")
|
||||
public class ProReadrecordController extends BaseController
|
||||
{
|
||||
private String prefix = "traceability/readRecord";
|
||||
|
||||
@Autowired
|
||||
private IProReadrecordService proReadrecordService;
|
||||
|
||||
@RequiresPermissions("traceability:readRecord:view")
|
||||
@GetMapping()
|
||||
public String readRecord()
|
||||
{
|
||||
return prefix + "/readRecord";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询读取记录列表
|
||||
*/
|
||||
@RequiresPermissions("traceability:readRecord:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ProReadrecord proReadrecord)
|
||||
{
|
||||
startPage();
|
||||
List<ProReadrecord> list = proReadrecordService.selectProReadrecordList(proReadrecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出读取记录列表
|
||||
*/
|
||||
@RequiresPermissions("traceability:readRecord:export")
|
||||
@Log(title = "读取记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ProReadrecord proReadrecord)
|
||||
{
|
||||
List<ProReadrecord> list = proReadrecordService.selectProReadrecordList(proReadrecord);
|
||||
ExcelUtil<ProReadrecord> util = new ExcelUtil<ProReadrecord>(ProReadrecord.class);
|
||||
return util.exportExcel(list, "读取记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增读取记录
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存读取记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:readRecord:add")
|
||||
@Log(title = "读取记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ProReadrecord proReadrecord)
|
||||
{
|
||||
return toAjax(proReadrecordService.insertProReadrecord(proReadrecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改读取记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:readRecord:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ProReadrecord proReadrecord = proReadrecordService.selectProReadrecordById(id);
|
||||
mmap.put("proReadrecord", proReadrecord);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存读取记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:readRecord:edit")
|
||||
@Log(title = "读取记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ProReadrecord proReadrecord)
|
||||
{
|
||||
return toAjax(proReadrecordService.updateProReadrecord(proReadrecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除读取记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:readRecord:remove")
|
||||
@Log(title = "读取记录", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(proReadrecordService.deleteProReadrecordByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.traceability.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
import com.ruoyi.traceability.service.IProUprecordService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 上料记录Controller
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/traceability/upRecord")
|
||||
public class ProUprecordController extends BaseController
|
||||
{
|
||||
private String prefix = "traceability/upRecord";
|
||||
|
||||
@Autowired
|
||||
private IProUprecordService proUprecordService;
|
||||
|
||||
@RequiresPermissions("traceability:upRecord:view")
|
||||
@GetMapping()
|
||||
public String upRecord()
|
||||
{
|
||||
return prefix + "/upRecord";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ProUprecord proUprecord)
|
||||
{
|
||||
startPage();
|
||||
List<ProUprecord> list = proUprecordService.selectProUprecordList(proUprecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出上料记录列表
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:export")
|
||||
@Log(title = "上料记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ProUprecord proUprecord)
|
||||
{
|
||||
List<ProUprecord> list = proUprecordService.selectProUprecordList(proUprecord);
|
||||
ExcelUtil<ProUprecord> util = new ExcelUtil<ProUprecord>(ProUprecord.class);
|
||||
return util.exportExcel(list, "上料记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:add")
|
||||
@Log(title = "上料记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ProUprecord proUprecord)
|
||||
{
|
||||
return toAjax(proUprecordService.insertProUprecord(proUprecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ProUprecord proUprecord = proUprecordService.selectProUprecordById(id);
|
||||
mmap.put("proUprecord", proUprecord);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:edit")
|
||||
@Log(title = "上料记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ProUprecord proUprecord)
|
||||
{
|
||||
return toAjax(proUprecordService.updateProUprecord(proUprecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:remove")
|
||||
@Log(title = "上料记录", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(proUprecordService.deleteProUprecordByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
package com.ruoyi.traceability.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;
|
||||
|
||||
/**
|
||||
* 读取记录对象 pro_readrecord
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public class ProReadrecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long id;
|
||||
|
||||
/** 机台编号 */
|
||||
@Excel(name = "机台编号")
|
||||
private Long machineId;
|
||||
|
||||
/** 资源号 */
|
||||
@Excel(name = "资源号")
|
||||
private String resource;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private Long equipId;
|
||||
|
||||
/** 位置编号 */
|
||||
@Excel(name = "位置编号")
|
||||
private Long positionId;
|
||||
|
||||
/** 天线编号 */
|
||||
@Excel(name = "天线编号")
|
||||
private Long ant;
|
||||
|
||||
/** RFID条码 */
|
||||
@Excel(name = "RFID条码")
|
||||
private String rfidStr;
|
||||
|
||||
/** 是否成功 */
|
||||
@Excel(name = "是否成功")
|
||||
private Long isSuccess;
|
||||
|
||||
/** 读取时间 */
|
||||
@Excel(name = "读取时间")
|
||||
private String readTime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setMachineId(Long machineId)
|
||||
{
|
||||
this.machineId = machineId;
|
||||
}
|
||||
|
||||
public Long getMachineId()
|
||||
{
|
||||
return machineId;
|
||||
}
|
||||
public void setResource(String resource)
|
||||
{
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
public String getResource()
|
||||
{
|
||||
return resource;
|
||||
}
|
||||
public void setEquipId(Long equipId)
|
||||
{
|
||||
this.equipId = equipId;
|
||||
}
|
||||
|
||||
public Long getEquipId()
|
||||
{
|
||||
return equipId;
|
||||
}
|
||||
public void setPositionId(Long positionId)
|
||||
{
|
||||
this.positionId = positionId;
|
||||
}
|
||||
|
||||
public Long getPositionId()
|
||||
{
|
||||
return positionId;
|
||||
}
|
||||
public void setAnt(Long ant)
|
||||
{
|
||||
this.ant = ant;
|
||||
}
|
||||
|
||||
public Long getAnt()
|
||||
{
|
||||
return ant;
|
||||
}
|
||||
public void setRfidStr(String rfidStr)
|
||||
{
|
||||
this.rfidStr = rfidStr;
|
||||
}
|
||||
|
||||
public String getRfidStr()
|
||||
{
|
||||
return rfidStr;
|
||||
}
|
||||
public void setIsSuccess(Long isSuccess)
|
||||
{
|
||||
this.isSuccess = isSuccess;
|
||||
}
|
||||
|
||||
public Long getIsSuccess()
|
||||
{
|
||||
return isSuccess;
|
||||
}
|
||||
public void setReadTime(String readTime)
|
||||
{
|
||||
this.readTime = readTime;
|
||||
}
|
||||
|
||||
public String getReadTime()
|
||||
{
|
||||
return readTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("machineId", getMachineId())
|
||||
.append("resource", getResource())
|
||||
.append("equipId", getEquipId())
|
||||
.append("positionId", getPositionId())
|
||||
.append("ant", getAnt())
|
||||
.append("rfidStr", getRfidStr())
|
||||
.append("isSuccess", getIsSuccess())
|
||||
.append("readTime", getReadTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
package com.ruoyi.traceability.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;
|
||||
|
||||
/**
|
||||
* 上料记录对象 pro_uprecord
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public class ProUprecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long id;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private Long machineId;
|
||||
|
||||
/** 资源编号 */
|
||||
@Excel(name = "资源编号")
|
||||
private String resource;
|
||||
|
||||
/** 位置编号 */
|
||||
@Excel(name = "位置编号")
|
||||
private Long positionId;
|
||||
|
||||
/** rfid条码 */
|
||||
@Excel(name = "rfid条码")
|
||||
private String rfidStr;
|
||||
|
||||
/** SFC编码 */
|
||||
@Excel(name = "SFC编码")
|
||||
private String sfcStr;
|
||||
|
||||
/** EA数量 */
|
||||
@Excel(name = "EA数量")
|
||||
private Long eaValue;
|
||||
|
||||
/** 是否生产 */
|
||||
@Excel(name = "是否生产")
|
||||
private Long isProduction;
|
||||
|
||||
/** 是否完工 */
|
||||
@Excel(name = "是否完工")
|
||||
private Long isFinish;
|
||||
|
||||
/** 记录时间 */
|
||||
@Excel(name = "记录时间")
|
||||
private String recordTime;
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String beginTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@Excel(name = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setMachineId(Long machineId)
|
||||
{
|
||||
this.machineId = machineId;
|
||||
}
|
||||
|
||||
public Long getMachineId()
|
||||
{
|
||||
return machineId;
|
||||
}
|
||||
public void setResource(String resource)
|
||||
{
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
public String getResource()
|
||||
{
|
||||
return resource;
|
||||
}
|
||||
public void setPositionId(Long positionId)
|
||||
{
|
||||
this.positionId = positionId;
|
||||
}
|
||||
|
||||
public Long getPositionId()
|
||||
{
|
||||
return positionId;
|
||||
}
|
||||
public void setRfidStr(String rfidStr)
|
||||
{
|
||||
this.rfidStr = rfidStr;
|
||||
}
|
||||
|
||||
public String getRfidStr()
|
||||
{
|
||||
return rfidStr;
|
||||
}
|
||||
public void setSfcStr(String sfcStr)
|
||||
{
|
||||
this.sfcStr = sfcStr;
|
||||
}
|
||||
|
||||
public String getSfcStr()
|
||||
{
|
||||
return sfcStr;
|
||||
}
|
||||
public void setEaValue(Long eaValue)
|
||||
{
|
||||
this.eaValue = eaValue;
|
||||
}
|
||||
|
||||
public Long getEaValue()
|
||||
{
|
||||
return eaValue;
|
||||
}
|
||||
public void setIsProduction(Long isProduction)
|
||||
{
|
||||
this.isProduction = isProduction;
|
||||
}
|
||||
|
||||
public Long getIsProduction()
|
||||
{
|
||||
return isProduction;
|
||||
}
|
||||
public void setIsFinish(Long isFinish)
|
||||
{
|
||||
this.isFinish = isFinish;
|
||||
}
|
||||
|
||||
public Long getIsFinish()
|
||||
{
|
||||
return isFinish;
|
||||
}
|
||||
public void setRecordTime(String recordTime)
|
||||
{
|
||||
this.recordTime = recordTime;
|
||||
}
|
||||
|
||||
public String getRecordTime()
|
||||
{
|
||||
return recordTime;
|
||||
}
|
||||
public void setBeginTime(String beginTime)
|
||||
{
|
||||
this.beginTime = beginTime;
|
||||
}
|
||||
|
||||
public String getBeginTime()
|
||||
{
|
||||
return beginTime;
|
||||
}
|
||||
public void setEndTime(String endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("machineId", getMachineId())
|
||||
.append("resource", getResource())
|
||||
.append("positionId", getPositionId())
|
||||
.append("rfidStr", getRfidStr())
|
||||
.append("sfcStr", getSfcStr())
|
||||
.append("eaValue", getEaValue())
|
||||
.append("isProduction", getIsProduction())
|
||||
.append("isFinish", getIsFinish())
|
||||
.append("recordTime", getRecordTime())
|
||||
.append("beginTime", getBeginTime())
|
||||
.append("endTime", getEndTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.traceability.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.traceability.domain.ProReadrecord;
|
||||
|
||||
/**
|
||||
* 读取记录Mapper接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public interface ProReadrecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询读取记录
|
||||
*
|
||||
* @param id 读取记录主键
|
||||
* @return 读取记录
|
||||
*/
|
||||
public ProReadrecord selectProReadrecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询读取记录列表
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 读取记录集合
|
||||
*/
|
||||
public List<ProReadrecord> selectProReadrecordList(ProReadrecord proReadrecord);
|
||||
|
||||
/**
|
||||
* 新增读取记录
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProReadrecord(ProReadrecord proReadrecord);
|
||||
|
||||
/**
|
||||
* 修改读取记录
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProReadrecord(ProReadrecord proReadrecord);
|
||||
|
||||
/**
|
||||
* 删除读取记录
|
||||
*
|
||||
* @param id 读取记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProReadrecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除读取记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProReadrecordByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.traceability.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
|
||||
/**
|
||||
* 上料记录Mapper接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public interface ProUprecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 上料记录
|
||||
*/
|
||||
public ProUprecord selectProUprecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 上料记录集合
|
||||
*/
|
||||
public List<ProUprecord> selectProUprecordList(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 删除上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除上料记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.traceability.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.traceability.domain.ProReadrecord;
|
||||
|
||||
/**
|
||||
* 读取记录Service接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public interface IProReadrecordService
|
||||
{
|
||||
/**
|
||||
* 查询读取记录
|
||||
*
|
||||
* @param id 读取记录主键
|
||||
* @return 读取记录
|
||||
*/
|
||||
public ProReadrecord selectProReadrecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询读取记录列表
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 读取记录集合
|
||||
*/
|
||||
public List<ProReadrecord> selectProReadrecordList(ProReadrecord proReadrecord);
|
||||
|
||||
/**
|
||||
* 新增读取记录
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProReadrecord(ProReadrecord proReadrecord);
|
||||
|
||||
/**
|
||||
* 修改读取记录
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProReadrecord(ProReadrecord proReadrecord);
|
||||
|
||||
/**
|
||||
* 批量删除读取记录
|
||||
*
|
||||
* @param ids 需要删除的读取记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProReadrecordByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除读取记录信息
|
||||
*
|
||||
* @param id 读取记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProReadrecordById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.traceability.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
|
||||
/**
|
||||
* 上料记录Service接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public interface IProUprecordService
|
||||
{
|
||||
/**
|
||||
* 查询上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 上料记录
|
||||
*/
|
||||
public ProUprecord selectProUprecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 上料记录集合
|
||||
*/
|
||||
public List<ProUprecord> selectProUprecordList(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 批量删除上料记录
|
||||
*
|
||||
* @param ids 需要删除的上料记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除上料记录信息
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordById(Long id);
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.ruoyi.traceability.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.traceability.mapper.ProReadrecordMapper;
|
||||
import com.ruoyi.traceability.domain.ProReadrecord;
|
||||
import com.ruoyi.traceability.service.IProReadrecordService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 读取记录Service业务层处理
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
@Service
|
||||
public class ProReadrecordServiceImpl implements IProReadrecordService
|
||||
{
|
||||
@Autowired
|
||||
private ProReadrecordMapper proReadrecordMapper;
|
||||
|
||||
/**
|
||||
* 查询读取记录
|
||||
*
|
||||
* @param id 读取记录主键
|
||||
* @return 读取记录
|
||||
*/
|
||||
@Override
|
||||
public ProReadrecord selectProReadrecordById(Long id)
|
||||
{
|
||||
return proReadrecordMapper.selectProReadrecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询读取记录列表
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 读取记录
|
||||
*/
|
||||
@Override
|
||||
public List<ProReadrecord> selectProReadrecordList(ProReadrecord proReadrecord)
|
||||
{
|
||||
return proReadrecordMapper.selectProReadrecordList(proReadrecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增读取记录
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProReadrecord(ProReadrecord proReadrecord)
|
||||
{
|
||||
return proReadrecordMapper.insertProReadrecord(proReadrecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改读取记录
|
||||
*
|
||||
* @param proReadrecord 读取记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProReadrecord(ProReadrecord proReadrecord)
|
||||
{
|
||||
return proReadrecordMapper.updateProReadrecord(proReadrecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除读取记录
|
||||
*
|
||||
* @param ids 需要删除的读取记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProReadrecordByIds(String ids)
|
||||
{
|
||||
return proReadrecordMapper.deleteProReadrecordByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除读取记录信息
|
||||
*
|
||||
* @param id 读取记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProReadrecordById(Long id)
|
||||
{
|
||||
return proReadrecordMapper.deleteProReadrecordById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.ruoyi.traceability.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.traceability.mapper.ProUprecordMapper;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
import com.ruoyi.traceability.service.IProUprecordService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 上料记录Service业务层处理
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
@Service
|
||||
public class ProUprecordServiceImpl implements IProUprecordService
|
||||
{
|
||||
@Autowired
|
||||
private ProUprecordMapper proUprecordMapper;
|
||||
|
||||
/**
|
||||
* 查询上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 上料记录
|
||||
*/
|
||||
@Override
|
||||
public ProUprecord selectProUprecordById(Long id)
|
||||
{
|
||||
return proUprecordMapper.selectProUprecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 上料记录
|
||||
*/
|
||||
@Override
|
||||
public List<ProUprecord> selectProUprecordList(ProUprecord proUprecord)
|
||||
{
|
||||
return proUprecordMapper.selectProUprecordList(proUprecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProUprecord(ProUprecord proUprecord)
|
||||
{
|
||||
return proUprecordMapper.insertProUprecord(proUprecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProUprecord(ProUprecord proUprecord)
|
||||
{
|
||||
return proUprecordMapper.updateProUprecord(proUprecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除上料记录
|
||||
*
|
||||
* @param ids 需要删除的上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProUprecordByIds(String ids)
|
||||
{
|
||||
return proUprecordMapper.deleteProUprecordByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除上料记录信息
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProUprecordById(Long id)
|
||||
{
|
||||
return proUprecordMapper.deleteProUprecordById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
<?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.ruoyi.traceability.mapper.ProReadrecordMapper">
|
||||
|
||||
<resultMap type="ProReadrecord" id="ProReadrecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="machineId" column="machineId" />
|
||||
<result property="resource" column="resource" />
|
||||
<result property="equipId" column="equipId" />
|
||||
<result property="positionId" column="positionId" />
|
||||
<result property="ant" column="ant" />
|
||||
<result property="rfidStr" column="rfidStr" />
|
||||
<result property="isSuccess" column="is_success" />
|
||||
<result property="readTime" column="readTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProReadrecordVo">
|
||||
select id, machineId, resource, equipId, positionId, ant, rfidStr, is_success, readTime from pro_readrecord
|
||||
</sql>
|
||||
|
||||
<select id="selectProReadrecordList" parameterType="ProReadrecord" resultMap="ProReadrecordResult">
|
||||
<include refid="selectProReadrecordVo"/>
|
||||
<where>
|
||||
<if test="resource != null and resource != ''"> and resource = #{resource}</if>
|
||||
<if test="positionId != null "> and positionId = #{positionId}</if>
|
||||
<if test="rfidStr != null and rfidStr != ''"> and rfidStr = #{rfidStr}</if>
|
||||
<if test="isSuccess != null "> and is_success = #{isSuccess}</if>
|
||||
<if test="params.beginReadTime != null and params.beginReadTime != '' and params.endReadTime != null and params.endReadTime != ''"> and readTime between #{params.beginReadTime} and #{params.endReadTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProReadrecordById" parameterType="Long" resultMap="ProReadrecordResult">
|
||||
<include refid="selectProReadrecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProReadrecord" parameterType="ProReadrecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pro_readrecord
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="machineId != null">machineId,</if>
|
||||
<if test="resource != null">resource,</if>
|
||||
<if test="equipId != null">equipId,</if>
|
||||
<if test="positionId != null">positionId,</if>
|
||||
<if test="ant != null">ant,</if>
|
||||
<if test="rfidStr != null">rfidStr,</if>
|
||||
<if test="isSuccess != null">is_success,</if>
|
||||
<if test="readTime != null">readTime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="machineId != null">#{machineId},</if>
|
||||
<if test="resource != null">#{resource},</if>
|
||||
<if test="equipId != null">#{equipId},</if>
|
||||
<if test="positionId != null">#{positionId},</if>
|
||||
<if test="ant != null">#{ant},</if>
|
||||
<if test="rfidStr != null">#{rfidStr},</if>
|
||||
<if test="isSuccess != null">#{isSuccess},</if>
|
||||
<if test="readTime != null">#{readTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProReadrecord" parameterType="ProReadrecord">
|
||||
update pro_readrecord
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="machineId != null">machineId = #{machineId},</if>
|
||||
<if test="resource != null">resource = #{resource},</if>
|
||||
<if test="equipId != null">equipId = #{equipId},</if>
|
||||
<if test="positionId != null">positionId = #{positionId},</if>
|
||||
<if test="ant != null">ant = #{ant},</if>
|
||||
<if test="rfidStr != null">rfidStr = #{rfidStr},</if>
|
||||
<if test="isSuccess != null">is_success = #{isSuccess},</if>
|
||||
<if test="readTime != null">readTime = #{readTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProReadrecordById" parameterType="Long">
|
||||
delete from pro_readrecord where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProReadrecordByIds" parameterType="String">
|
||||
delete from pro_readrecord where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,105 @@
|
||||
<?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.ruoyi.traceability.mapper.ProUprecordMapper">
|
||||
|
||||
<resultMap type="ProUprecord" id="ProUprecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="machineId" column="machineId" />
|
||||
<result property="resource" column="resource" />
|
||||
<result property="positionId" column="positionId" />
|
||||
<result property="rfidStr" column="rfidStr" />
|
||||
<result property="sfcStr" column="sfcStr" />
|
||||
<result property="eaValue" column="eaValue" />
|
||||
<result property="isProduction" column="is_production" />
|
||||
<result property="isFinish" column="is_Finish" />
|
||||
<result property="recordTime" column="recordTime" />
|
||||
<result property="beginTime" column="begin_Time" />
|
||||
<result property="endTime" column="end_Time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProUprecordVo">
|
||||
select id, machineId, resource, positionId, rfidStr, sfcStr, eaValue, is_production, is_Finish, recordTime, begin_Time, end_Time from pro_uprecord
|
||||
</sql>
|
||||
|
||||
<select id="selectProUprecordList" parameterType="ProUprecord" resultMap="ProUprecordResult">
|
||||
<include refid="selectProUprecordVo"/>
|
||||
<where>
|
||||
<if test="resource != null and resource != ''"> and resource = #{resource}</if>
|
||||
<if test="positionId != null "> and positionId = #{positionId}</if>
|
||||
<if test="rfidStr != null and rfidStr != ''"> and rfidStr like concat('%', #{rfidStr}, '%')</if>
|
||||
<if test="sfcStr != null and sfcStr != ''"> and sfcStr like concat('%', #{sfcStr}, '%')</if>
|
||||
<if test="eaValue != null "> and eaValue = #{eaValue}</if>
|
||||
<if test="isProduction != null "> and is_production = #{isProduction}</if>
|
||||
<if test="isFinish != null "> and is_Finish = #{isFinish}</if>
|
||||
<if test="beginTime != null and beginTime != ''"> and begin_Time >= #{beginTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and end_Time <= #{endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProUprecordById" parameterType="Long" resultMap="ProUprecordResult">
|
||||
<include refid="selectProUprecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProUprecord" parameterType="ProUprecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pro_uprecord
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="machineId != null">machineId,</if>
|
||||
<if test="resource != null">resource,</if>
|
||||
<if test="positionId != null">positionId,</if>
|
||||
<if test="rfidStr != null">rfidStr,</if>
|
||||
<if test="sfcStr != null">sfcStr,</if>
|
||||
<if test="eaValue != null">eaValue,</if>
|
||||
<if test="isProduction != null">is_production,</if>
|
||||
<if test="isFinish != null">is_Finish,</if>
|
||||
<if test="recordTime != null">recordTime,</if>
|
||||
<if test="beginTime != null">begin_Time,</if>
|
||||
<if test="endTime != null">end_Time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="machineId != null">#{machineId},</if>
|
||||
<if test="resource != null">#{resource},</if>
|
||||
<if test="positionId != null">#{positionId},</if>
|
||||
<if test="rfidStr != null">#{rfidStr},</if>
|
||||
<if test="sfcStr != null">#{sfcStr},</if>
|
||||
<if test="eaValue != null">#{eaValue},</if>
|
||||
<if test="isProduction != null">#{isProduction},</if>
|
||||
<if test="isFinish != null">#{isFinish},</if>
|
||||
<if test="recordTime != null">#{recordTime},</if>
|
||||
<if test="beginTime != null">#{beginTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProUprecord" parameterType="ProUprecord">
|
||||
update pro_uprecord
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="machineId != null">machineId = #{machineId},</if>
|
||||
<if test="resource != null">resource = #{resource},</if>
|
||||
<if test="positionId != null">positionId = #{positionId},</if>
|
||||
<if test="rfidStr != null">rfidStr = #{rfidStr},</if>
|
||||
<if test="sfcStr != null">sfcStr = #{sfcStr},</if>
|
||||
<if test="eaValue != null">eaValue = #{eaValue},</if>
|
||||
<if test="isProduction != null">is_production = #{isProduction},</if>
|
||||
<if test="isFinish != null">is_Finish = #{isFinish},</if>
|
||||
<if test="recordTime != null">recordTime = #{recordTime},</if>
|
||||
<if test="beginTime != null">begin_Time = #{beginTime},</if>
|
||||
<if test="endTime != null">end_Time = #{endTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProUprecordById" parameterType="Long">
|
||||
delete from pro_uprecord where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProUprecordByIds" parameterType="String">
|
||||
delete from pro_uprecord where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.traceability.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
import com.ruoyi.traceability.service.IProUprecordService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 上料记录Controller
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/traceability/upRecord")
|
||||
public class ProUprecordController extends BaseController
|
||||
{
|
||||
private String prefix = "traceability/upRecord";
|
||||
|
||||
@Autowired
|
||||
private IProUprecordService proUprecordService;
|
||||
|
||||
@RequiresPermissions("traceability:upRecord:view")
|
||||
@GetMapping()
|
||||
public String upRecord()
|
||||
{
|
||||
return prefix + "/upRecord";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ProUprecord proUprecord)
|
||||
{
|
||||
startPage();
|
||||
List<ProUprecord> list = proUprecordService.selectProUprecordList(proUprecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出上料记录列表
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:export")
|
||||
@Log(title = "上料记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ProUprecord proUprecord)
|
||||
{
|
||||
List<ProUprecord> list = proUprecordService.selectProUprecordList(proUprecord);
|
||||
ExcelUtil<ProUprecord> util = new ExcelUtil<ProUprecord>(ProUprecord.class);
|
||||
return util.exportExcel(list, "上料记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:add")
|
||||
@Log(title = "上料记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ProUprecord proUprecord)
|
||||
{
|
||||
return toAjax(proUprecordService.insertProUprecord(proUprecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ProUprecord proUprecord = proUprecordService.selectProUprecordById(id);
|
||||
mmap.put("proUprecord", proUprecord);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:edit")
|
||||
@Log(title = "上料记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ProUprecord proUprecord)
|
||||
{
|
||||
return toAjax(proUprecordService.updateProUprecord(proUprecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除上料记录
|
||||
*/
|
||||
@RequiresPermissions("traceability:upRecord:remove")
|
||||
@Log(title = "上料记录", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(proUprecordService.deleteProUprecordByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
package com.ruoyi.traceability.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;
|
||||
|
||||
/**
|
||||
* 上料记录对象 pro_uprecord
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public class ProUprecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long id;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private Long machineId;
|
||||
|
||||
/** 资源编号 */
|
||||
@Excel(name = "资源编号")
|
||||
private String resource;
|
||||
|
||||
/** 位置编号 */
|
||||
@Excel(name = "位置编号")
|
||||
private Long positionId;
|
||||
|
||||
/** rfid条码 */
|
||||
@Excel(name = "rfid条码")
|
||||
private String rfidStr;
|
||||
|
||||
/** SFC编码 */
|
||||
@Excel(name = "SFC编码")
|
||||
private String sfcStr;
|
||||
|
||||
/** EA数量 */
|
||||
@Excel(name = "EA数量")
|
||||
private Long eaValue;
|
||||
|
||||
/** 是否生产 */
|
||||
@Excel(name = "是否生产")
|
||||
private Long isProduction;
|
||||
|
||||
/** 是否完工 */
|
||||
@Excel(name = "是否完工")
|
||||
private Long isFinish;
|
||||
|
||||
/** 记录时间 */
|
||||
@Excel(name = "记录时间")
|
||||
private String recordTime;
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String beginTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@Excel(name = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setMachineId(Long machineId)
|
||||
{
|
||||
this.machineId = machineId;
|
||||
}
|
||||
|
||||
public Long getMachineId()
|
||||
{
|
||||
return machineId;
|
||||
}
|
||||
public void setResource(String resource)
|
||||
{
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
public String getResource()
|
||||
{
|
||||
return resource;
|
||||
}
|
||||
public void setPositionId(Long positionId)
|
||||
{
|
||||
this.positionId = positionId;
|
||||
}
|
||||
|
||||
public Long getPositionId()
|
||||
{
|
||||
return positionId;
|
||||
}
|
||||
public void setRfidStr(String rfidStr)
|
||||
{
|
||||
this.rfidStr = rfidStr;
|
||||
}
|
||||
|
||||
public String getRfidStr()
|
||||
{
|
||||
return rfidStr;
|
||||
}
|
||||
public void setSfcStr(String sfcStr)
|
||||
{
|
||||
this.sfcStr = sfcStr;
|
||||
}
|
||||
|
||||
public String getSfcStr()
|
||||
{
|
||||
return sfcStr;
|
||||
}
|
||||
public void setEaValue(Long eaValue)
|
||||
{
|
||||
this.eaValue = eaValue;
|
||||
}
|
||||
|
||||
public Long getEaValue()
|
||||
{
|
||||
return eaValue;
|
||||
}
|
||||
public void setIsProduction(Long isProduction)
|
||||
{
|
||||
this.isProduction = isProduction;
|
||||
}
|
||||
|
||||
public Long getIsProduction()
|
||||
{
|
||||
return isProduction;
|
||||
}
|
||||
public void setIsFinish(Long isFinish)
|
||||
{
|
||||
this.isFinish = isFinish;
|
||||
}
|
||||
|
||||
public Long getIsFinish()
|
||||
{
|
||||
return isFinish;
|
||||
}
|
||||
public void setRecordTime(String recordTime)
|
||||
{
|
||||
this.recordTime = recordTime;
|
||||
}
|
||||
|
||||
public String getRecordTime()
|
||||
{
|
||||
return recordTime;
|
||||
}
|
||||
public void setBeginTime(String beginTime)
|
||||
{
|
||||
this.beginTime = beginTime;
|
||||
}
|
||||
|
||||
public String getBeginTime()
|
||||
{
|
||||
return beginTime;
|
||||
}
|
||||
public void setEndTime(String endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("machineId", getMachineId())
|
||||
.append("resource", getResource())
|
||||
.append("positionId", getPositionId())
|
||||
.append("rfidStr", getRfidStr())
|
||||
.append("sfcStr", getSfcStr())
|
||||
.append("eaValue", getEaValue())
|
||||
.append("isProduction", getIsProduction())
|
||||
.append("isFinish", getIsFinish())
|
||||
.append("recordTime", getRecordTime())
|
||||
.append("beginTime", getBeginTime())
|
||||
.append("endTime", getEndTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.traceability.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
|
||||
/**
|
||||
* 上料记录Mapper接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public interface ProUprecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 上料记录
|
||||
*/
|
||||
public ProUprecord selectProUprecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 上料记录集合
|
||||
*/
|
||||
public List<ProUprecord> selectProUprecordList(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 删除上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除上料记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.traceability.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
|
||||
/**
|
||||
* 上料记录Service接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
public interface IProUprecordService
|
||||
{
|
||||
/**
|
||||
* 查询上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 上料记录
|
||||
*/
|
||||
public ProUprecord selectProUprecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 上料记录集合
|
||||
*/
|
||||
public List<ProUprecord> selectProUprecordList(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProUprecord(ProUprecord proUprecord);
|
||||
|
||||
/**
|
||||
* 批量删除上料记录
|
||||
*
|
||||
* @param ids 需要删除的上料记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除上料记录信息
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProUprecordById(Long id);
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.ruoyi.traceability.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.traceability.mapper.ProUprecordMapper;
|
||||
import com.ruoyi.traceability.domain.ProUprecord;
|
||||
import com.ruoyi.traceability.service.IProUprecordService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 上料记录Service业务层处理
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-11-09
|
||||
*/
|
||||
@Service
|
||||
public class ProUprecordServiceImpl implements IProUprecordService
|
||||
{
|
||||
@Autowired
|
||||
private ProUprecordMapper proUprecordMapper;
|
||||
|
||||
/**
|
||||
* 查询上料记录
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 上料记录
|
||||
*/
|
||||
@Override
|
||||
public ProUprecord selectProUprecordById(Long id)
|
||||
{
|
||||
return proUprecordMapper.selectProUprecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询上料记录列表
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 上料记录
|
||||
*/
|
||||
@Override
|
||||
public List<ProUprecord> selectProUprecordList(ProUprecord proUprecord)
|
||||
{
|
||||
return proUprecordMapper.selectProUprecordList(proUprecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProUprecord(ProUprecord proUprecord)
|
||||
{
|
||||
return proUprecordMapper.insertProUprecord(proUprecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改上料记录
|
||||
*
|
||||
* @param proUprecord 上料记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProUprecord(ProUprecord proUprecord)
|
||||
{
|
||||
return proUprecordMapper.updateProUprecord(proUprecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除上料记录
|
||||
*
|
||||
* @param ids 需要删除的上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProUprecordByIds(String ids)
|
||||
{
|
||||
return proUprecordMapper.deleteProUprecordByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除上料记录信息
|
||||
*
|
||||
* @param id 上料记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProUprecordById(Long id)
|
||||
{
|
||||
return proUprecordMapper.deleteProUprecordById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?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.ruoyi.traceability.mapper.ProUprecordMapper">
|
||||
|
||||
<resultMap type="ProUprecord" id="ProUprecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="machineId" column="machineId" />
|
||||
<result property="resource" column="resource" />
|
||||
<result property="positionId" column="positionId" />
|
||||
<result property="rfidStr" column="rfidStr" />
|
||||
<result property="sfcStr" column="sfcStr" />
|
||||
<result property="eaValue" column="eaValue" />
|
||||
<result property="isProduction" column="is_production" />
|
||||
<result property="isFinish" column="is_Finish" />
|
||||
<result property="recordTime" column="recordTime" />
|
||||
<result property="beginTime" column="begin_Time" />
|
||||
<result property="endTime" column="end_Time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProUprecordVo">
|
||||
select id, machineId, resource, positionId, rfidStr, sfcStr, eaValue, is_production, is_Finish, recordTime, begin_Time, end_Time from pro_uprecord
|
||||
</sql>
|
||||
|
||||
<select id="selectProUprecordList" parameterType="ProUprecord" resultMap="ProUprecordResult">
|
||||
<include refid="selectProUprecordVo"/>
|
||||
<where>
|
||||
<if test="resource != null and resource != ''"> and resource = #{resource}</if>
|
||||
<if test="positionId != null "> and positionId = #{positionId}</if>
|
||||
<if test="rfidStr != null and rfidStr != ''"> and rfidStr like concat('%', #{rfidStr}, '%')</if>
|
||||
<if test="sfcStr != null and sfcStr != ''"> and sfcStr like concat('%', #{sfcStr}, '%')</if>
|
||||
<if test="eaValue != null "> and eaValue = #{eaValue}</if>
|
||||
<if test="isProduction != null "> and is_production = #{isProduction}</if>
|
||||
<if test="isFinish != null "> and is_Finish = #{isFinish}</if>
|
||||
<if test="beginTime != null and beginTime != ''"> and begin_Time >= #{beginTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and end_Time <= #{endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProUprecordById" parameterType="Long" resultMap="ProUprecordResult">
|
||||
<include refid="selectProUprecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProUprecord" parameterType="ProUprecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pro_uprecord
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="machineId != null">machineId,</if>
|
||||
<if test="resource != null">resource,</if>
|
||||
<if test="positionId != null">positionId,</if>
|
||||
<if test="rfidStr != null">rfidStr,</if>
|
||||
<if test="sfcStr != null">sfcStr,</if>
|
||||
<if test="eaValue != null">eaValue,</if>
|
||||
<if test="isProduction != null">is_production,</if>
|
||||
<if test="isFinish != null">is_Finish,</if>
|
||||
<if test="recordTime != null">recordTime,</if>
|
||||
<if test="beginTime != null">begin_Time,</if>
|
||||
<if test="endTime != null">end_Time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="machineId != null">#{machineId},</if>
|
||||
<if test="resource != null">#{resource},</if>
|
||||
<if test="positionId != null">#{positionId},</if>
|
||||
<if test="rfidStr != null">#{rfidStr},</if>
|
||||
<if test="sfcStr != null">#{sfcStr},</if>
|
||||
<if test="eaValue != null">#{eaValue},</if>
|
||||
<if test="isProduction != null">#{isProduction},</if>
|
||||
<if test="isFinish != null">#{isFinish},</if>
|
||||
<if test="recordTime != null">#{recordTime},</if>
|
||||
<if test="beginTime != null">#{beginTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProUprecord" parameterType="ProUprecord">
|
||||
update pro_uprecord
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="machineId != null">machineId = #{machineId},</if>
|
||||
<if test="resource != null">resource = #{resource},</if>
|
||||
<if test="positionId != null">positionId = #{positionId},</if>
|
||||
<if test="rfidStr != null">rfidStr = #{rfidStr},</if>
|
||||
<if test="sfcStr != null">sfcStr = #{sfcStr},</if>
|
||||
<if test="eaValue != null">eaValue = #{eaValue},</if>
|
||||
<if test="isProduction != null">is_production = #{isProduction},</if>
|
||||
<if test="isFinish != null">is_Finish = #{isFinish},</if>
|
||||
<if test="recordTime != null">recordTime = #{recordTime},</if>
|
||||
<if test="beginTime != null">begin_Time = #{beginTime},</if>
|
||||
<if test="endTime != null">end_Time = #{endTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProUprecordById" parameterType="Long">
|
||||
delete from pro_uprecord where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProUprecordByIds" parameterType="String">
|
||||
delete from pro_uprecord where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue