From 8b4208c07997d4892783c2ebe7a024ba1d4a987d Mon Sep 17 00:00:00 2001 From: wenjy Date: Wed, 9 Nov 2022 13:32:25 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E6=94=BE=E5=8D=B7=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E3=80=81=E8=AF=BB=E5=8F=96=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 7 + ruoyi-admin/pom.xml | 5 + .../src/main/resources/application.yml | 2 +- ruoyi-traceability/pom.xml | 31 +++ .../controller/ProReadrecordController.java | 127 ++++++++++++ .../controller/ProUprecordController.java | 127 ++++++++++++ .../traceability/domain/ProReadrecord.java | 149 ++++++++++++++ .../traceability/domain/ProUprecord.java | 191 ++++++++++++++++++ .../main/java/com/ruoyi/traceability/explain | 0 .../mapper/ProReadrecordMapper.java | 61 ++++++ .../mapper/ProUprecordMapper.java | 61 ++++++ .../service/IProReadrecordService.java | 61 ++++++ .../service/IProUprecordService.java | 61 ++++++ .../impl/ProReadrecordServiceImpl.java | 94 +++++++++ .../service/impl/ProUprecordServiceImpl.java | 94 +++++++++ .../src/main/resources/mapper/explain | 0 .../traceability/ProReadrecordMapper.xml | 89 ++++++++ .../mapper/traceability/ProUprecordMapper.xml | 105 ++++++++++ .../src/main/resources/templates/explain | 0 .../resources/templates/traceability/explain | 0 .../traceability/readRecord/add.html | 81 ++++++++ .../traceability/readRecord/edit.html | 81 ++++++++ .../traceability/readRecord/readRecord.html | 140 +++++++++++++ .../templates/traceability/upRecord/add.html | 124 ++++++++++++ .../templates/traceability/upRecord/edit.html | 125 ++++++++++++ .../traceability/upRecord/upRecord.html | 172 ++++++++++++++++ .../controller/ProUprecordController.java | 127 ++++++++++++ .../traceability/domain/ProUprecord.java | 191 ++++++++++++++++++ .../mapper/ProUprecordMapper.java | 61 ++++++ .../service/IProUprecordService.java | 61 ++++++ .../service/impl/ProUprecordServiceImpl.java | 94 +++++++++ .../mapper/traceability/ProUprecordMapper.xml | 105 ++++++++++ .../templates/traceability/upRecord/add.html | 124 ++++++++++++ .../templates/traceability/upRecord/edit.html | 125 ++++++++++++ .../traceability/upRecord/upRecord.html | 172 ++++++++++++++++ 35 files changed, 3047 insertions(+), 1 deletion(-) create mode 100644 ruoyi-traceability/pom.xml create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProReadrecordController.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProReadrecord.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProUprecord.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/explain create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProReadrecordMapper.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProReadrecordService.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProUprecordService.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProReadrecordServiceImpl.java create mode 100644 ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java create mode 100644 ruoyi-traceability/src/main/resources/mapper/explain create mode 100644 ruoyi-traceability/src/main/resources/mapper/traceability/ProReadrecordMapper.xml create mode 100644 ruoyi-traceability/src/main/resources/mapper/traceability/ProUprecordMapper.xml create mode 100644 ruoyi-traceability/src/main/resources/templates/explain create mode 100644 ruoyi-traceability/src/main/resources/templates/traceability/explain create mode 100644 ruoyi-traceability/src/main/resources/templates/traceability/readRecord/add.html create mode 100644 ruoyi-traceability/src/main/resources/templates/traceability/readRecord/edit.html create mode 100644 ruoyi-traceability/src/main/resources/templates/traceability/readRecord/readRecord.html create mode 100644 ruoyi-traceability/src/main/resources/templates/traceability/upRecord/add.html create mode 100644 ruoyi-traceability/src/main/resources/templates/traceability/upRecord/edit.html create mode 100644 ruoyi-traceability/src/main/resources/templates/traceability/upRecord/upRecord.html create mode 100644 src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java create mode 100644 src/main/java/com/ruoyi/traceability/domain/ProUprecord.java create mode 100644 src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java create mode 100644 src/main/java/com/ruoyi/traceability/service/IProUprecordService.java create mode 100644 src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java create mode 100644 src/main/resources/mapper/traceability/ProUprecordMapper.xml create mode 100644 src/main/resources/templates/traceability/upRecord/add.html create mode 100644 src/main/resources/templates/traceability/upRecord/edit.html create mode 100644 src/main/resources/templates/traceability/upRecord/upRecord.html diff --git a/pom.xml b/pom.xml index a1bad42..a324261 100644 --- a/pom.xml +++ b/pom.xml @@ -199,6 +199,12 @@ ${ruoyi.version} + + com.ruoyi + ruoyi-traceability + ${ruoyi.version} + + @@ -209,6 +215,7 @@ ruoyi-quartz ruoyi-generator ruoyi-common + ruoyi-traceability pom diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index e3b140c..8d59a83 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -67,6 +67,11 @@ ruoyi-generator + + com.ruoyi + ruoyi-traceability + + diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 856d29c..62becb7 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -16,7 +16,7 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为80 - port: 8011 + port: 6088 servlet: # 应用的访问路径 context-path: / diff --git a/ruoyi-traceability/pom.xml b/ruoyi-traceability/pom.xml new file mode 100644 index 0000000..5e45844 --- /dev/null +++ b/ruoyi-traceability/pom.xml @@ -0,0 +1,31 @@ + + + + ruoyi + com.ruoyi + 4.7.5 + + 4.0.0 + + ruoyi-traceability + + + 8 + 8 + + + + + com.ruoyi + ruoyi-common + + + + com.ruoyi + ruoyi-framework + + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProReadrecordController.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProReadrecordController.java new file mode 100644 index 0000000..15cd785 --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProReadrecordController.java @@ -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 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 list = proReadrecordService.selectProReadrecordList(proReadrecord); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java new file mode 100644 index 0000000..5823b6a --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java @@ -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 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 list = proUprecordService.selectProUprecordList(proUprecord); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProReadrecord.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProReadrecord.java new file mode 100644 index 0000000..ea7448d --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProReadrecord.java @@ -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(); + } +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProUprecord.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProUprecord.java new file mode 100644 index 0000000..7225279 --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/domain/ProUprecord.java @@ -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(); + } +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/explain b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/explain new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProReadrecordMapper.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProReadrecordMapper.java new file mode 100644 index 0000000..c273c7e --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProReadrecordMapper.java @@ -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 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); +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java new file mode 100644 index 0000000..b1cd47f --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java @@ -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 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); +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProReadrecordService.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProReadrecordService.java new file mode 100644 index 0000000..137c4d3 --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProReadrecordService.java @@ -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 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); +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProUprecordService.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProUprecordService.java new file mode 100644 index 0000000..938da25 --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/IProUprecordService.java @@ -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 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); +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProReadrecordServiceImpl.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProReadrecordServiceImpl.java new file mode 100644 index 0000000..84fc5b0 --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProReadrecordServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java new file mode 100644 index 0000000..a33d157 --- /dev/null +++ b/ruoyi-traceability/src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-traceability/src/main/resources/mapper/explain b/ruoyi-traceability/src/main/resources/mapper/explain new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-traceability/src/main/resources/mapper/traceability/ProReadrecordMapper.xml b/ruoyi-traceability/src/main/resources/mapper/traceability/ProReadrecordMapper.xml new file mode 100644 index 0000000..706afe4 --- /dev/null +++ b/ruoyi-traceability/src/main/resources/mapper/traceability/ProReadrecordMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + select id, machineId, resource, equipId, positionId, ant, rfidStr, is_success, readTime from pro_readrecord + + + + + + + + insert into pro_readrecord + + machineId, + resource, + equipId, + positionId, + ant, + rfidStr, + is_success, + readTime, + + + #{machineId}, + #{resource}, + #{equipId}, + #{positionId}, + #{ant}, + #{rfidStr}, + #{isSuccess}, + #{readTime}, + + + + + update pro_readrecord + + machineId = #{machineId}, + resource = #{resource}, + equipId = #{equipId}, + positionId = #{positionId}, + ant = #{ant}, + rfidStr = #{rfidStr}, + is_success = #{isSuccess}, + readTime = #{readTime}, + + where id = #{id} + + + + delete from pro_readrecord where id = #{id} + + + + delete from pro_readrecord where id in + + #{id} + + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/resources/mapper/traceability/ProUprecordMapper.xml b/ruoyi-traceability/src/main/resources/mapper/traceability/ProUprecordMapper.xml new file mode 100644 index 0000000..a618b2f --- /dev/null +++ b/ruoyi-traceability/src/main/resources/mapper/traceability/ProUprecordMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + select id, machineId, resource, positionId, rfidStr, sfcStr, eaValue, is_production, is_Finish, recordTime, begin_Time, end_Time from pro_uprecord + + + + + + + + insert into pro_uprecord + + machineId, + resource, + positionId, + rfidStr, + sfcStr, + eaValue, + is_production, + is_Finish, + recordTime, + begin_Time, + end_Time, + + + #{machineId}, + #{resource}, + #{positionId}, + #{rfidStr}, + #{sfcStr}, + #{eaValue}, + #{isProduction}, + #{isFinish}, + #{recordTime}, + #{beginTime}, + #{endTime}, + + + + + update pro_uprecord + + machineId = #{machineId}, + resource = #{resource}, + positionId = #{positionId}, + rfidStr = #{rfidStr}, + sfcStr = #{sfcStr}, + eaValue = #{eaValue}, + is_production = #{isProduction}, + is_Finish = #{isFinish}, + recordTime = #{recordTime}, + begin_Time = #{beginTime}, + end_Time = #{endTime}, + + where id = #{id} + + + + delete from pro_uprecord where id = #{id} + + + + delete from pro_uprecord where id in + + #{id} + + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/resources/templates/explain b/ruoyi-traceability/src/main/resources/templates/explain new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-traceability/src/main/resources/templates/traceability/explain b/ruoyi-traceability/src/main/resources/templates/traceability/explain new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/add.html b/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/add.html new file mode 100644 index 0000000..0f9694c --- /dev/null +++ b/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/add.html @@ -0,0 +1,81 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/edit.html b/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/edit.html new file mode 100644 index 0000000..e1b3ade --- /dev/null +++ b/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/edit.html @@ -0,0 +1,81 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/readRecord.html b/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/readRecord.html new file mode 100644 index 0000000..349c94f --- /dev/null +++ b/ruoyi-traceability/src/main/resources/templates/traceability/readRecord/readRecord.html @@ -0,0 +1,140 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/add.html b/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/add.html new file mode 100644 index 0000000..9ff45c0 --- /dev/null +++ b/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/add.html @@ -0,0 +1,124 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/edit.html b/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/edit.html new file mode 100644 index 0000000..584834d --- /dev/null +++ b/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/edit.html @@ -0,0 +1,125 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/upRecord.html b/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/upRecord.html new file mode 100644 index 0000000..50a8af4 --- /dev/null +++ b/ruoyi-traceability/src/main/resources/templates/traceability/upRecord/upRecord.html @@ -0,0 +1,172 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java b/src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java new file mode 100644 index 0000000..5823b6a --- /dev/null +++ b/src/main/java/com/ruoyi/traceability/controller/ProUprecordController.java @@ -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 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 list = proUprecordService.selectProUprecordList(proUprecord); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/src/main/java/com/ruoyi/traceability/domain/ProUprecord.java b/src/main/java/com/ruoyi/traceability/domain/ProUprecord.java new file mode 100644 index 0000000..7225279 --- /dev/null +++ b/src/main/java/com/ruoyi/traceability/domain/ProUprecord.java @@ -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(); + } +} diff --git a/src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java b/src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java new file mode 100644 index 0000000..b1cd47f --- /dev/null +++ b/src/main/java/com/ruoyi/traceability/mapper/ProUprecordMapper.java @@ -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 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); +} diff --git a/src/main/java/com/ruoyi/traceability/service/IProUprecordService.java b/src/main/java/com/ruoyi/traceability/service/IProUprecordService.java new file mode 100644 index 0000000..938da25 --- /dev/null +++ b/src/main/java/com/ruoyi/traceability/service/IProUprecordService.java @@ -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 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); +} diff --git a/src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java b/src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java new file mode 100644 index 0000000..a33d157 --- /dev/null +++ b/src/main/java/com/ruoyi/traceability/service/impl/ProUprecordServiceImpl.java @@ -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 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); + } +} diff --git a/src/main/resources/mapper/traceability/ProUprecordMapper.xml b/src/main/resources/mapper/traceability/ProUprecordMapper.xml new file mode 100644 index 0000000..a618b2f --- /dev/null +++ b/src/main/resources/mapper/traceability/ProUprecordMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + select id, machineId, resource, positionId, rfidStr, sfcStr, eaValue, is_production, is_Finish, recordTime, begin_Time, end_Time from pro_uprecord + + + + + + + + insert into pro_uprecord + + machineId, + resource, + positionId, + rfidStr, + sfcStr, + eaValue, + is_production, + is_Finish, + recordTime, + begin_Time, + end_Time, + + + #{machineId}, + #{resource}, + #{positionId}, + #{rfidStr}, + #{sfcStr}, + #{eaValue}, + #{isProduction}, + #{isFinish}, + #{recordTime}, + #{beginTime}, + #{endTime}, + + + + + update pro_uprecord + + machineId = #{machineId}, + resource = #{resource}, + positionId = #{positionId}, + rfidStr = #{rfidStr}, + sfcStr = #{sfcStr}, + eaValue = #{eaValue}, + is_production = #{isProduction}, + is_Finish = #{isFinish}, + recordTime = #{recordTime}, + begin_Time = #{beginTime}, + end_Time = #{endTime}, + + where id = #{id} + + + + delete from pro_uprecord where id = #{id} + + + + delete from pro_uprecord where id in + + #{id} + + + + \ No newline at end of file diff --git a/src/main/resources/templates/traceability/upRecord/add.html b/src/main/resources/templates/traceability/upRecord/add.html new file mode 100644 index 0000000..ad37db2 --- /dev/null +++ b/src/main/resources/templates/traceability/upRecord/add.html @@ -0,0 +1,124 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/traceability/upRecord/edit.html b/src/main/resources/templates/traceability/upRecord/edit.html new file mode 100644 index 0000000..2900911 --- /dev/null +++ b/src/main/resources/templates/traceability/upRecord/edit.html @@ -0,0 +1,125 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/traceability/upRecord/upRecord.html b/src/main/resources/templates/traceability/upRecord/upRecord.html new file mode 100644 index 0000000..50a8af4 --- /dev/null +++ b/src/main/resources/templates/traceability/upRecord/upRecord.html @@ -0,0 +1,172 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file