diff --git a/pom.xml b/pom.xml index a1bad42..a324261 100644 --- a/pom.xml +++ b/pom.xml @@ -199,6 +199,12 @@ <version>${ruoyi.version}</version> </dependency> + <dependency> + <groupId>com.ruoyi</groupId> + <artifactId>ruoyi-traceability</artifactId> + <version>${ruoyi.version}</version> + </dependency> + </dependencies> </dependencyManagement> @@ -209,6 +215,7 @@ <module>ruoyi-quartz</module> <module>ruoyi-generator</module> <module>ruoyi-common</module> + <module>ruoyi-traceability</module> </modules> <packaging>pom</packaging> 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 @@ <artifactId>ruoyi-generator</artifactId> </dependency> + <dependency> + <groupId>com.ruoyi</groupId> + <artifactId>ruoyi-traceability</artifactId> + </dependency> + </dependencies> <build> 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 @@ +<?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> \ 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<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)); + } +} 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<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)); + } +} 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<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); +} 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<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); +} 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<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); +} 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<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); +} 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<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); + } +} 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<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); + } +} 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 @@ +<?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> \ 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 @@ +<?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> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > +<head> + <th:block th:include="include :: header('新增读取记录')" /> + <th:block th:include="include :: datetimepicker-css" /> +</head> +<body class="white-bg"> + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-readRecord-add"> + + <div class="form-group"> + <label class="col-sm-3 control-label">资源号:</label> + <div class="col-sm-8"> + <input name="resource" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">设备编号:</label> + <div class="col-sm-8"> + <input name="equipId" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">位置编号:</label> + <div class="col-sm-8"> + <input name="positionId" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">天线编号:</label> + <div class="col-sm-8"> + <input name="ant" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">RFID条码:</label> + <div class="col-sm-8"> + <input name="rfidStr" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否成功:</label> + <div class="col-sm-8"> + <select name="isSuccess" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> + <!--<div class="form-group"> + <label class="col-sm-3 control-label">读取时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="readTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div>--> + </form> + </div> + <th:block th:include="include :: footer" /> + <th:block th:include="include :: datetimepicker-js" /> + <script th:inline="javascript"> + var prefix = ctx + "traceability/readRecord" + $("#form-readRecord-add").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/add", $('#form-readRecord-add').serialize()); + } + } + + $("input[name='readTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + </script> +</body> +</html> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > +<head> + <th:block th:include="include :: header('修改读取记录')" /> + <th:block th:include="include :: datetimepicker-css" /> +</head> +<body class="white-bg"> + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-readRecord-edit" th:object="${proReadrecord}"> + <input name="id" th:field="*{id}" type="hidden"> + <div class="form-group"> + <label class="col-sm-3 control-label">资源号:</label> + <div class="col-sm-8"> + <input name="resource" th:field="*{resource}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">设备编号:</label> + <div class="col-sm-8"> + <input name="equipId" th:field="*{equipId}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">位置编号:</label> + <div class="col-sm-8"> + <input name="positionId" th:field="*{positionId}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">天线编号:</label> + <div class="col-sm-8"> + <input name="ant" th:field="*{ant}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">RFID条码:</label> + <div class="col-sm-8"> + <input name="rfidStr" th:field="*{rfidStr}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否成功:</label> + <div class="col-sm-8"> + <select name="isSuccess" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isSuccess}"></option> + </select> + </div> + </div> + <!--<div class="form-group"> + <label class="col-sm-3 control-label">读取时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="readTime" th:value="${#dates.format(proReadrecord.readTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div>--> + </form> + </div> + <th:block th:include="include :: footer" /> + <th:block th:include="include :: datetimepicker-js" /> + <script th:inline="javascript"> + var prefix = ctx + "traceability/readRecord"; + $("#form-readRecord-edit").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/edit", $('#form-readRecord-edit').serialize()); + } + } + + $("input[name='readTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + </script> +</body> +</html> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +<head> + <th:block th:include="include :: header('读取记录列表')" /> +</head> +<body class="gray-bg"> + <div class="container-div"> + <div class="row"> + <div class="col-sm-12 search-collapse"> + <form id="formId"> + <div class="select-list"> + <ul> + <li> + <label>资源号:</label> + <input type="text" name="resource"/> + </li> + <li> + <label>位置编号:</label> + <input type="text" name="positionId"/> + </li> + <li> + <label>RFID条码:</label> + <input type="text" name="rfidStr"/> + </li> + <li> + <label>是否成功:</label> + <select name="isSuccess" th:with="type=${@dict.getType('is_flag')}"> + <option value="">所有</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </li> + <li class="select-time"> + <label>读取时间:</label> + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginReadTime]"/> + <span>-</span> + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endReadTime]"/> + </li> + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> + </li> + </ul> + </div> + </form> + </div> + + <div class="btn-group-sm" id="toolbar" role="group"> + <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="traceability:readRecord:add"> + <i class="fa fa-plus"></i> 添加 + </a> + <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="traceability:readRecord:edit"> + <i class="fa fa-edit"></i> 修改 + </a> + <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="traceability:readRecord:remove"> + <i class="fa fa-remove"></i> 删除 + </a> + <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="traceability:readRecord:export"> + <i class="fa fa-download"></i> 导出 + </a> + </div> + <div class="col-sm-12 select-table table-striped"> + <table id="bootstrap-table"></table> + </div> + </div> + </div> + <th:block th:include="include :: footer" /> + <script th:inline="javascript"> + var editFlag = [[${@permission.hasPermi('traceability:readRecord:edit')}]]; + var removeFlag = [[${@permission.hasPermi('traceability:readRecord:remove')}]]; + var isSuccessDatas = [[${@dict.getType('is_flag')}]]; + var prefix = ctx + "traceability/readRecord"; + + $(function() { + var options = { + url: prefix + "/list", + createUrl: prefix + "/add", + updateUrl: prefix + "/edit/{id}", + removeUrl: prefix + "/remove", + exportUrl: prefix + "/export", + modalName: "读取记录", + columns: [{ + checkbox: true + }, + { + field: 'id', + title: '主键标识', + visible: false + }, + { + field: 'machineId', + title: '机台编号', + visible: false + }, + { + field: 'resource', + title: '资源号' + }, + { + field: 'equipId', + title: '设备编号' + }, + { + field: 'positionId', + title: '位置编号' + }, + { + field: 'ant', + title: '天线编号' + }, + { + field: 'rfidStr', + title: 'RFID条码' + }, + { + field: 'isSuccess', + title: '是否成功', + formatter: function(value, row, index) { + return $.table.selectDictLabel(isSuccessDatas, value); + } + }, + { + field: 'readTime', + title: '读取时间' + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + </script> +</body> +</html> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > +<head> + <th:block th:include="include :: header('新增上料记录')" /> + <th:block th:include="include :: datetimepicker-css" /> +</head> +<body class="white-bg"> + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-upRecord-add"> + <div class="form-group"> + <label class="col-sm-3 control-label">设备编号:</label> + <div class="col-sm-8"> + <input name="machineId" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">资源编号:</label> + <div class="col-sm-8"> + <input name="resource" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">位置编号:</label> + <div class="col-sm-8"> + <input name="positionId" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">rfid条码:</label> + <div class="col-sm-8"> + <input name="rfidStr" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">SFC编码:</label> + <div class="col-sm-8"> + <input name="sfcStr" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">EA数量:</label> + <div class="col-sm-8"> + <input name="eaValue" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否生产:</label> + <div class="col-sm-8"> + <select name="isProduction" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否完工:</label> + <div class="col-sm-8"> + <select name="isFinish" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> + <!--<div class="form-group"> + <label class="col-sm-3 control-label">记录时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="recordTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">开始时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="beginTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">结束时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="endTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div>--> + </form> + </div> + <th:block th:include="include :: footer" /> + <th:block th:include="include :: datetimepicker-js" /> + <script th:inline="javascript"> + var prefix = ctx + "traceability/upRecord" + $("#form-upRecord-add").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/add", $('#form-upRecord-add').serialize()); + } + } + + $("input[name='recordTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='beginTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='endTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + </script> +</body> +</html> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > +<head> + <th:block th:include="include :: header('修改上料记录')" /> + <th:block th:include="include :: datetimepicker-css" /> +</head> +<body class="white-bg"> + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-upRecord-edit" th:object="${proUprecord}"> + <input name="id" th:field="*{id}" type="hidden"> + <div class="form-group"> + <label class="col-sm-3 control-label">设备编号:</label> + <div class="col-sm-8"> + <input name="machineId" th:field="*{machineId}" class="form-control" type="text" readonly> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">资源编号:</label> + <div class="col-sm-8"> + <input name="resource" th:field="*{resource}" class="form-control" type="text" readonly> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">位置编号:</label> + <div class="col-sm-8"> + <input name="positionId" th:field="*{positionId}" class="form-control" type="text" readonly> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">rfid条码:</label> + <div class="col-sm-8"> + <input name="rfidStr" th:field="*{rfidStr}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">SFC编码:</label> + <div class="col-sm-8"> + <input name="sfcStr" th:field="*{sfcStr}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">EA数量:</label> + <div class="col-sm-8"> + <input name="eaValue" th:field="*{eaValue}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否生产:</label> + <div class="col-sm-8"> + <select name="isProduction" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isProduction}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否完工:</label> + <div class="col-sm-8"> + <select name="isFinish" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isFinish}"></option> + </select> + </div> + </div> + <!--<div class="form-group"> + <label class="col-sm-3 control-label">记录时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="recordTime" th:value="${#dates.format(proUprecord.recordTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">开始时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="beginTime" th:value="${#dates.format(proUprecord.beginTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">结束时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="endTime" th:value="${#dates.format(proUprecord.endTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div>--> + </form> + </div> + <th:block th:include="include :: footer" /> + <th:block th:include="include :: datetimepicker-js" /> + <script th:inline="javascript"> + var prefix = ctx + "traceability/upRecord"; + $("#form-upRecord-edit").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/edit", $('#form-upRecord-edit').serialize()); + } + } + + /*$("input[name='recordTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='beginTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='endTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + });*/ + </script> +</body> +</html> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +<head> + <th:block th:include="include :: header('上料记录列表')" /> +</head> +<body class="gray-bg"> + <div class="container-div"> + <div class="row"> + <div class="col-sm-12 search-collapse"> + <form id="formId"> + <div class="select-list"> + <ul> + <li> + <label>资源编号:</label> + <input type="text" name="resource"/> + </li> + <li> + <label>位置编号:</label> + <input type="text" name="positionId"/> + </li> + <li> + <label>rfid条码:</label> + <input type="text" name="rfidStr"/> + </li> + <li> + <label>SFC编码:</label> + <input type="text" name="sfcStr"/> + </li> + <li> + <label>EA数量:</label> + <input type="text" name="eaValue"/> + </li> + <li> + <label>是否生产:</label> + <select name="isProduction" th:with="type=${@dict.getType('is_flag')}"> + <option value="">所有</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </li> + <li> + <label>是否完工:</label> + <select name="isFinish" th:with="type=${@dict.getType('is_flag')}"> + <option value="">所有</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </li> + <li> + <label>开始时间:</label> + <input type="text" class="time-input" placeholder="请选择开始时间" name="beginTime"/> + </li> + <li> + <label>结束时间:</label> + <input type="text" class="time-input" placeholder="请选择结束时间" name="endTime"/> + </li> + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> + </li> + </ul> + </div> + </form> + </div> + + <div class="btn-group-sm" id="toolbar" role="group"> + <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="traceability:upRecord:add"> + <i class="fa fa-plus"></i> 添加 + </a> + <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="traceability:upRecord:edit"> + <i class="fa fa-edit"></i> 修改 + </a> + <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="traceability:upRecord:remove"> + <i class="fa fa-remove"></i> 删除 + </a> + <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="traceability:upRecord:export"> + <i class="fa fa-download"></i> 导出 + </a> + </div> + <div class="col-sm-12 select-table table-striped"> + <table id="bootstrap-table"></table> + </div> + </div> + </div> + <th:block th:include="include :: footer" /> + <script th:inline="javascript"> + var editFlag = [[${@permission.hasPermi('traceability:upRecord:edit')}]]; + var removeFlag = [[${@permission.hasPermi('traceability:upRecord:remove')}]]; + var isProductionDatas = [[${@dict.getType('is_flag')}]]; + var isFinishDatas = [[${@dict.getType('is_flag')}]]; + var prefix = ctx + "traceability/upRecord"; + + $(function() { + var options = { + url: prefix + "/list", + createUrl: prefix + "/add", + updateUrl: prefix + "/edit/{id}", + removeUrl: prefix + "/remove", + exportUrl: prefix + "/export", + modalName: "上料记录", + columns: [{ + checkbox: true + }, + { + field: 'id', + title: '主键标识', + visible: false + }, + { + field: 'machineId', + title: '设备编号' + }, + { + field: 'resource', + title: '资源编号' + }, + { + field: 'positionId', + title: '位置编号' + }, + { + field: 'rfidStr', + title: 'rfid条码' + }, + { + field: 'sfcStr', + title: 'SFC编码' + }, + { + field: 'eaValue', + title: 'EA数量' + }, + { + field: 'isProduction', + title: '是否生产', + formatter: function(value, row, index) { + return $.table.selectDictLabel(isProductionDatas, value); + } + }, + { + field: 'isFinish', + title: '是否完工', + formatter: function(value, row, index) { + return $.table.selectDictLabel(isFinishDatas, value); + } + }, + { + field: 'recordTime', + title: '记录时间' + }, + { + field: 'beginTime', + title: '开始时间' + }, + { + field: 'endTime', + title: '结束时间' + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + </script> +</body> +</html> \ 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<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)); + } +} 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<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); +} 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<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); +} 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<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); + } +} 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 @@ +<?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> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > +<head> + <th:block th:include="include :: header('新增上料记录')" /> + <th:block th:include="include :: datetimepicker-css" /> +</head> +<body class="white-bg"> + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-upRecord-add"> + <div class="form-group"> + <label class="col-sm-3 control-label">设备编号:</label> + <div class="col-sm-8"> + <input name="machineId" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">资源编号:</label> + <div class="col-sm-8"> + <input name="resource" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">位置编号:</label> + <div class="col-sm-8"> + <input name="positionId" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">rfid条码:</label> + <div class="col-sm-8"> + <input name="rfidStr" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">SFC编码:</label> + <div class="col-sm-8"> + <input name="sfcStr" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">EA数量:</label> + <div class="col-sm-8"> + <input name="eaValue" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否生产:</label> + <div class="col-sm-8"> + <select name="isProduction" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否完工:</label> + <div class="col-sm-8"> + <select name="isFinish" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">记录时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="recordTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">开始时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="beginTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">结束时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="endTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + </form> + </div> + <th:block th:include="include :: footer" /> + <th:block th:include="include :: datetimepicker-js" /> + <script th:inline="javascript"> + var prefix = ctx + "traceability/upRecord" + $("#form-upRecord-add").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/add", $('#form-upRecord-add').serialize()); + } + } + + $("input[name='recordTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='beginTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='endTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + </script> +</body> +</html> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > +<head> + <th:block th:include="include :: header('修改上料记录')" /> + <th:block th:include="include :: datetimepicker-css" /> +</head> +<body class="white-bg"> + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-upRecord-edit" th:object="${proUprecord}"> + <input name="id" th:field="*{id}" type="hidden"> + <div class="form-group"> + <label class="col-sm-3 control-label">设备编号:</label> + <div class="col-sm-8"> + <input name="machineId" th:field="*{machineId}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">资源编号:</label> + <div class="col-sm-8"> + <input name="resource" th:field="*{resource}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">位置编号:</label> + <div class="col-sm-8"> + <input name="positionId" th:field="*{positionId}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">rfid条码:</label> + <div class="col-sm-8"> + <input name="rfidStr" th:field="*{rfidStr}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">SFC编码:</label> + <div class="col-sm-8"> + <input name="sfcStr" th:field="*{sfcStr}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">EA数量:</label> + <div class="col-sm-8"> + <input name="eaValue" th:field="*{eaValue}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否生产:</label> + <div class="col-sm-8"> + <select name="isProduction" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isProduction}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否完工:</label> + <div class="col-sm-8"> + <select name="isFinish" class="form-control m-b" th:with="type=${@dict.getType('is_flag')}"> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isFinish}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">记录时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="recordTime" th:value="${#dates.format(proUprecord.recordTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">开始时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="beginTime" th:value="${#dates.format(proUprecord.beginTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">结束时间:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="endTime" th:value="${#dates.format(proUprecord.endTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <span class="input-group-addon"><i class="fa fa-calendar"></i></span> + </div> + </div> + </div> + </form> + </div> + <th:block th:include="include :: footer" /> + <th:block th:include="include :: datetimepicker-js" /> + <script th:inline="javascript"> + var prefix = ctx + "traceability/upRecord"; + $("#form-upRecord-edit").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/edit", $('#form-upRecord-edit').serialize()); + } + } + + $("input[name='recordTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='beginTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='endTime']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + </script> +</body> +</html> \ 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 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +<head> + <th:block th:include="include :: header('上料记录列表')" /> +</head> +<body class="gray-bg"> + <div class="container-div"> + <div class="row"> + <div class="col-sm-12 search-collapse"> + <form id="formId"> + <div class="select-list"> + <ul> + <li> + <label>资源编号:</label> + <input type="text" name="resource"/> + </li> + <li> + <label>位置编号:</label> + <input type="text" name="positionId"/> + </li> + <li> + <label>rfid条码:</label> + <input type="text" name="rfidStr"/> + </li> + <li> + <label>SFC编码:</label> + <input type="text" name="sfcStr"/> + </li> + <li> + <label>EA数量:</label> + <input type="text" name="eaValue"/> + </li> + <li> + <label>是否生产:</label> + <select name="isProduction" th:with="type=${@dict.getType('is_flag')}"> + <option value="">所有</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </li> + <li> + <label>是否完工:</label> + <select name="isFinish" th:with="type=${@dict.getType('is_flag')}"> + <option value="">所有</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </li> + <li> + <label>开始时间:</label> + <input type="text" class="time-input" placeholder="请选择开始时间" name="beginTime"/> + </li> + <li> + <label>结束时间:</label> + <input type="text" class="time-input" placeholder="请选择结束时间" name="endTime"/> + </li> + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> + </li> + </ul> + </div> + </form> + </div> + + <div class="btn-group-sm" id="toolbar" role="group"> + <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="traceability:upRecord:add"> + <i class="fa fa-plus"></i> 添加 + </a> + <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="traceability:upRecord:edit"> + <i class="fa fa-edit"></i> 修改 + </a> + <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="traceability:upRecord:remove"> + <i class="fa fa-remove"></i> 删除 + </a> + <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="traceability:upRecord:export"> + <i class="fa fa-download"></i> 导出 + </a> + </div> + <div class="col-sm-12 select-table table-striped"> + <table id="bootstrap-table"></table> + </div> + </div> + </div> + <th:block th:include="include :: footer" /> + <script th:inline="javascript"> + var editFlag = [[${@permission.hasPermi('traceability:upRecord:edit')}]]; + var removeFlag = [[${@permission.hasPermi('traceability:upRecord:remove')}]]; + var isProductionDatas = [[${@dict.getType('is_flag')}]]; + var isFinishDatas = [[${@dict.getType('is_flag')}]]; + var prefix = ctx + "traceability/upRecord"; + + $(function() { + var options = { + url: prefix + "/list", + createUrl: prefix + "/add", + updateUrl: prefix + "/edit/{id}", + removeUrl: prefix + "/remove", + exportUrl: prefix + "/export", + modalName: "上料记录", + columns: [{ + checkbox: true + }, + { + field: 'id', + title: '主键标识', + visible: false + }, + { + field: 'machineId', + title: '设备编号' + }, + { + field: 'resource', + title: '资源编号' + }, + { + field: 'positionId', + title: '位置编号' + }, + { + field: 'rfidStr', + title: 'rfid条码' + }, + { + field: 'sfcStr', + title: 'SFC编码' + }, + { + field: 'eaValue', + title: 'EA数量' + }, + { + field: 'isProduction', + title: '是否生产', + formatter: function(value, row, index) { + return $.table.selectDictLabel(isProductionDatas, value); + } + }, + { + field: 'isFinish', + title: '是否完工', + formatter: function(value, row, index) { + return $.table.selectDictLabel(isFinishDatas, value); + } + }, + { + field: 'recordTime', + title: '记录时间' + }, + { + field: 'beginTime', + title: '开始时间' + }, + { + field: 'endTime', + title: '结束时间' + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + </script> +</body> +</html> \ No newline at end of file