add 代码生成标签记录

master
yinq 2 months ago
parent da4f8dd8c9
commit 62af5a8f17

@ -1,95 +1,6 @@
<p align="center">
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.9</h1>
<h4 align="center">基于SpringBoot+Vue前后端分离的Java快速开发框架</h4>
<p align="center">
<a href="https://gitee.com/y_project/RuoYi-Vue/stargazers"><img src="https://gitee.com/y_project/RuoYi-Vue/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/y_project/RuoYi-Vue"><img src="https://img.shields.io/badge/RuoYi-v3.8.9-brightgreen.svg"></a>
<a href="https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
</p>
## 平台简介
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
* 前端采用Vue、Element UI。
* 后端采用Spring Boot、Spring Security、Redis & Jwt。
* 权限认证使用Jwt支持多终端认证系统。
* 支持加载动态权限菜单,多方式轻松权限控制。
* 高效率开发,使用代码生成器可以一键生成前后端代码。
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Vue3),保持同步更新。
* 提供了单应用版本[RuoYi-Vue-fast](https://gitcode.com/yangzongzhuan/RuoYi-Vue-fast)Oracle版本[RuoYi-Vue-Oracle](https://gitcode.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)&nbsp;&nbsp;
## 内置功能
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
3. 岗位管理:配置系统用户所属担任职务。
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
7. 参数管理:对系统动态配置常用参数。
8. 通知公告:系统通知公告信息发布维护。
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成前后端代码的生成java、html、xml、sql支持CRUD下载 。
14. 系统接口根据业务代码自动生成相关的api接口文档。
15. 服务监控监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 缓存监控:对系统的缓存信息查询,命令统计等。
17. 在线构建器拖动表单元素生成相应的HTML代码。
18. 连接池监视监视当前系统数据库连接池状态可进行分析SQL找出系统性能瓶颈。
## 在线体验
- admin/admin123
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
演示地址http://vue.ruoyi.vip
文档地址http://doc.ruoyi.vip
## 演示图
<table>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
</tr>
</table>
## 若依前后端分离交流群
QQ群 [![加入QQ群](https://img.shields.io/badge/已满-937441-blue.svg)](https://jq.qq.com/?_wv=1027&k=5bVB1og) [![加入QQ群](https://img.shields.io/badge/已满-887144332-blue.svg)](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [![加入QQ群](https://img.shields.io/badge/已满-180251782-blue.svg)](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [![加入QQ群](https://img.shields.io/badge/已满-104180207-blue.svg)](https://jq.qq.com/?_wv=1027&k=51G72yr) [![加入QQ群](https://img.shields.io/badge/已满-186866453-blue.svg)](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [![加入QQ群](https://img.shields.io/badge/已满-201396349-blue.svg)](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [![加入QQ群](https://img.shields.io/badge/已满-101456076-blue.svg)](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [![加入QQ群](https://img.shields.io/badge/已满-101539465-blue.svg)](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [![加入QQ群](https://img.shields.io/badge/已满-264312783-blue.svg)](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [![加入QQ群](https://img.shields.io/badge/已满-167385320-blue.svg)](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [![加入QQ群](https://img.shields.io/badge/已满-104748341-blue.svg)](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [![加入QQ群](https://img.shields.io/badge/已满-160110482-blue.svg)](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [![加入QQ群](https://img.shields.io/badge/已满-170801498-blue.svg)](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [![加入QQ群](https://img.shields.io/badge/已满-108482800-blue.svg)](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [![加入QQ群](https://img.shields.io/badge/已满-101046199-blue.svg)](https://jq.qq.com/?_wv=1027&k=SpyH2875) [![加入QQ群](https://img.shields.io/badge/已满-136919097-blue.svg)](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [![加入QQ群](https://img.shields.io/badge/已满-143961921-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) [![加入QQ群](https://img.shields.io/badge/已满-174951577-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ZFAPAbp09S2ltvwrJzp7wGlbopsc0rwi&authKey=HB2cxpxP2yspk%2Bo3WKTBfktRCccVkU26cgi5B16u0KcAYrVu7sBaE7XSEqmMdFQp&noverify=0&group_code=174951577) [![加入QQ群](https://img.shields.io/badge/已满-161281055-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Fn2aF5IHpwsy8j6VlalNJK6qbwFLFHat&authKey=uyIT%2B97x2AXj3odyXpsSpVaPMC%2Bidw0LxG5MAtEqlrcBcWJUA%2FeS43rsF1Tg7IRJ&noverify=0&group_code=161281055) [![加入QQ群](https://img.shields.io/badge/已满-138988063-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=XIzkm_mV2xTsUtFxo63bmicYoDBA6Ifm&authKey=dDW%2F4qsmw3x9govoZY9w%2FoWAoC4wbHqGal%2BbqLzoS6VBarU8EBptIgPKN%2FviyC8j&noverify=0&group_code=138988063) [![加入QQ群](https://img.shields.io/badge/已满-151450850-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DkugnCg68PevlycJSKSwjhFqfIgrWWwR&authKey=pR1Pa5lPIeGF%2FFtIk6d%2FGB5qFi0EdvyErtpQXULzo03zbhopBHLWcuqdpwY241R%2F&noverify=0&group_code=151450850) [![加入QQ群](https://img.shields.io/badge/已满-224622315-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=F58bgRa-Dp-rsQJThiJqIYv8t4-lWfXh&authKey=UmUs4CVG5OPA1whvsa4uSespOvyd8%2FAr9olEGaWAfdLmfKQk%2FVBp2YU3u2xXXt76&noverify=0&group_code=224622315) [![加入QQ群](https://img.shields.io/badge/已满-287842588-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Nxb2EQ5qozWa218Wbs7zgBnjLSNk_tVT&authKey=obBKXj6SBKgrFTJZx0AqQnIYbNOvBB2kmgwWvGhzxR67RoRr84%2Bus5OadzMcdJl5&noverify=0&group_code=287842588) [![加入QQ群](https://img.shields.io/badge/已满-187944233-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=numtK1M_I4eVd2Gvg8qtbuL8JgX42qNh&authKey=giV9XWMaFZTY%2FqPlmWbkB9g3fi0Ev5CwEtT9Tgei0oUlFFCQLDp4ozWRiVIzubIm&noverify=0&group_code=187944233) [![加入QQ群](https://img.shields.io/badge/228578329-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G6r5KGCaa3pqdbUSXNIgYloyb8e0_L0D&authKey=4w8tF1eGW7%2FedWn%2FHAypQksdrML%2BDHolQSx7094Agm7Luakj9EbfPnSTxSi2T1LQ&noverify=0&group_code=228578329) 点击按钮入群。
海威标签数据库接口
前端采用Vue、Element UI。
后端采用Spring Boot、Spring Security、Redis & Jwt。
权限认证使用Jwt支持多终端认证系统。
支持加载动态权限菜单,多方式轻松权限控制。
高效率开发,使用代码生成器可以一键生成前后端代码。

@ -225,6 +225,12 @@
<version>${tagApi.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.shardingsphere</groupId>-->
<!-- <artifactId>shardingjdbcspringbootstarter</artifactId>-->
<!-- <version>4.0.0RC1</version>-->
<!-- </dependency>-->
</dependencies>
</dependencyManagement>

@ -1,7 +0,0 @@
package hw.tagApi;
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

@ -0,0 +1,98 @@
package hw.tagApi.service.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import hw.tagApi.common.annotation.Log;
import hw.tagApi.common.core.controller.BaseController;
import hw.tagApi.common.core.domain.AjaxResult;
import hw.tagApi.common.enums.BusinessType;
import hw.tagApi.service.domain.HwTagRecord;
import hw.tagApi.service.service.IHwTagRecordService;
import hw.tagApi.common.utils.poi.ExcelUtil;
import hw.tagApi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2025-04-15
*/
@RestController
@RequestMapping("/service/tagRecord")
public class HwTagRecordController extends BaseController {
@Autowired
private IHwTagRecordService hwTagRecordService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('service:tagRecord:list')")
@GetMapping("/list")
public TableDataInfo list(HwTagRecord hwTagRecord) {
startPage();
List<HwTagRecord> list = hwTagRecordService.selectHwTagRecordList(hwTagRecord);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('service:tagRecord:export')")
@Log(title = "标签记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, HwTagRecord hwTagRecord) {
List<HwTagRecord> list = hwTagRecordService.selectHwTagRecordList(hwTagRecord);
ExcelUtil<HwTagRecord> util = new ExcelUtil<HwTagRecord>(HwTagRecord.class);
util.exportExcel(response, list, "标签记录数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('service:tagRecord:query')")
@GetMapping(value = "/{rId}")
public AjaxResult getInfo(@PathVariable("rId") Long rId) {
return success(hwTagRecordService.selectHwTagRecordByRId(rId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('service:tagRecord:add')")
@Log(title = "标签记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody HwTagRecord hwTagRecord) {
return toAjax(hwTagRecordService.insertHwTagRecord(hwTagRecord));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('service:tagRecord:edit')")
@Log(title = "标签记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody HwTagRecord hwTagRecord) {
return toAjax(hwTagRecordService.updateHwTagRecord(hwTagRecord));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('service:tagRecord:remove')")
@Log(title = "标签记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{rIds}")
public AjaxResult remove(@PathVariable Long[] rIds) {
return toAjax(hwTagRecordService.deleteHwTagRecordByRIds(rIds));
}
}

@ -0,0 +1,24 @@
package hw.tagApi.service.controller;
import hw.tagApi.common.core.controller.BaseController;
import hw.tagApi.service.service.IHwTagRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* Controller
*
* @author Yinq
* @date 2025-04-15
*/
@RestController
@RequestMapping("/docs")
public class KDocsApiController extends BaseController {
@Autowired
private IHwTagRecordService hwTagRecordService;
}

@ -0,0 +1,269 @@
package hw.tagApi.service.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import hw.tagApi.common.annotation.Excel;
import hw.tagApi.common.core.domain.BaseEntity;
/**
* hw_tag_record
*
* @author Yinq
* @date 2025-04-15
*/
public class HwTagRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键标识,RID */
private Long rId;
/** TID */
@Excel(name = "TID")
private String tId;
/** EPC */
@Excel(name = "EPC")
private String epc;
/** 密码(预留字段) */
@Excel(name = "密码", readConverterExp = "预=留字段")
private String password;
/** 订单号LOT */
@Excel(name = "订单号LOT")
private String orderCode;
/** 批次编号,卷编号 */
@Excel(name = "批次编号,卷编号")
private String batchNumber;
/** 标签序号,序号 */
@Excel(name = "标签序号,序号")
private String tagSequence;
/** 总数量,本卷数量 */
@Excel(name = "总数量,本卷数量")
private Long totalQuantity;
/** 标签批次号(预留字段) */
@Excel(name = "标签批次号", readConverterExp = "预=留字段")
private String tagBatch;
/** 型号,导入提供 */
@Excel(name = "型号,导入提供")
private String modelCode;
/** 加工时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "加工时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date processingTime;
/** 操作人员编号,生产人员编号 */
@Excel(name = "操作人员编号,生产人员编号")
private String operatorId;
/** 数据状态标记 */
private Integer delFlag;
/** 预览字段1 */
@Excel(name = "预览字段1")
private String fields1;
/** 预览字段2 */
@Excel(name = "预览字段2")
private String fields2;
/** 预览字段3 */
@Excel(name = "预览字段3")
private String fields3;
public void setrId(Long rId)
{
this.rId = rId;
}
public Long getrId()
{
return rId;
}
public void settId(String tId)
{
this.tId = tId;
}
public String gettId()
{
return tId;
}
public void setEpc(String epc)
{
this.epc = epc;
}
public String getEpc()
{
return epc;
}
public void setPassword(String password)
{
this.password = password;
}
public String getPassword()
{
return password;
}
public void setOrderCode(String orderCode)
{
this.orderCode = orderCode;
}
public String getOrderCode()
{
return orderCode;
}
public void setBatchNumber(String batchNumber)
{
this.batchNumber = batchNumber;
}
public String getBatchNumber()
{
return batchNumber;
}
public void setTagSequence(String tagSequence)
{
this.tagSequence = tagSequence;
}
public String getTagSequence()
{
return tagSequence;
}
public void setTotalQuantity(Long totalQuantity)
{
this.totalQuantity = totalQuantity;
}
public Long getTotalQuantity()
{
return totalQuantity;
}
public void setTagBatch(String tagBatch)
{
this.tagBatch = tagBatch;
}
public String getTagBatch()
{
return tagBatch;
}
public void setModelCode(String modelCode)
{
this.modelCode = modelCode;
}
public String getModelCode()
{
return modelCode;
}
public void setProcessingTime(Date processingTime)
{
this.processingTime = processingTime;
}
public Date getProcessingTime()
{
return processingTime;
}
public void setOperatorId(String operatorId)
{
this.operatorId = operatorId;
}
public String getOperatorId()
{
return operatorId;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
public void setFields1(String fields1)
{
this.fields1 = fields1;
}
public String getFields1()
{
return fields1;
}
public void setFields2(String fields2)
{
this.fields2 = fields2;
}
public String getFields2()
{
return fields2;
}
public void setFields3(String fields3)
{
this.fields3 = fields3;
}
public String getFields3()
{
return fields3;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("rId", getrId())
.append("tId", gettId())
.append("epc", getEpc())
.append("password", getPassword())
.append("orderCode", getOrderCode())
.append("batchNumber", getBatchNumber())
.append("tagSequence", getTagSequence())
.append("totalQuantity", getTotalQuantity())
.append("tagBatch", getTagBatch())
.append("modelCode", getModelCode())
.append("processingTime", getProcessingTime())
.append("operatorId", getOperatorId())
.append("delFlag", getDelFlag())
.append("fields1", getFields1())
.append("fields2", getFields2())
.append("fields3", getFields3())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -0,0 +1,61 @@
package hw.tagApi.service.mapper;
import java.util.List;
import hw.tagApi.service.domain.HwTagRecord;
/**
* Mapper
*
* @author Yinq
* @date 2025-04-15
*/
public interface HwTagRecordMapper
{
/**
*
*
* @param rId
* @return
*/
public HwTagRecord selectHwTagRecordByRId(Long rId);
/**
*
*
* @param hwTagRecord
* @return
*/
public List<HwTagRecord> selectHwTagRecordList(HwTagRecord hwTagRecord);
/**
*
*
* @param hwTagRecord
* @return
*/
public int insertHwTagRecord(HwTagRecord hwTagRecord);
/**
*
*
* @param hwTagRecord
* @return
*/
public int updateHwTagRecord(HwTagRecord hwTagRecord);
/**
*
*
* @param rId
* @return
*/
public int deleteHwTagRecordByRId(Long rId);
/**
*
*
* @param rIds
* @return
*/
public int deleteHwTagRecordByRIds(Long[] rIds);
}

@ -0,0 +1,61 @@
package hw.tagApi.service.service;
import java.util.List;
import hw.tagApi.service.domain.HwTagRecord;
/**
* Service
*
* @author Yinq
* @date 2025-04-15
*/
public interface IHwTagRecordService
{
/**
*
*
* @param rId
* @return
*/
public HwTagRecord selectHwTagRecordByRId(Long rId);
/**
*
*
* @param hwTagRecord
* @return
*/
public List<HwTagRecord> selectHwTagRecordList(HwTagRecord hwTagRecord);
/**
*
*
* @param hwTagRecord
* @return
*/
public int insertHwTagRecord(HwTagRecord hwTagRecord);
/**
*
*
* @param hwTagRecord
* @return
*/
public int updateHwTagRecord(HwTagRecord hwTagRecord);
/**
*
*
* @param rIds
* @return
*/
public int deleteHwTagRecordByRIds(Long[] rIds);
/**
*
*
* @param rId
* @return
*/
public int deleteHwTagRecordByRId(Long rId);
}

@ -0,0 +1,96 @@
package hw.tagApi.service.service.impl;
import java.util.List;
import hw.tagApi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import hw.tagApi.service.mapper.HwTagRecordMapper;
import hw.tagApi.service.domain.HwTagRecord;
import hw.tagApi.service.service.IHwTagRecordService;
/**
* Service
*
* @author Yinq
* @date 2025-04-15
*/
@Service
public class HwTagRecordServiceImpl implements IHwTagRecordService
{
@Autowired
private HwTagRecordMapper hwTagRecordMapper;
/**
*
*
* @param rId
* @return
*/
@Override
public HwTagRecord selectHwTagRecordByRId(Long rId)
{
return hwTagRecordMapper.selectHwTagRecordByRId(rId);
}
/**
*
*
* @param hwTagRecord
* @return
*/
@Override
public List<HwTagRecord> selectHwTagRecordList(HwTagRecord hwTagRecord)
{
return hwTagRecordMapper.selectHwTagRecordList(hwTagRecord);
}
/**
*
*
* @param hwTagRecord
* @return
*/
@Override
public int insertHwTagRecord(HwTagRecord hwTagRecord)
{
hwTagRecord.setCreateTime(DateUtils.getNowDate());
return hwTagRecordMapper.insertHwTagRecord(hwTagRecord);
}
/**
*
*
* @param hwTagRecord
* @return
*/
@Override
public int updateHwTagRecord(HwTagRecord hwTagRecord)
{
hwTagRecord.setUpdateTime(DateUtils.getNowDate());
return hwTagRecordMapper.updateHwTagRecord(hwTagRecord);
}
/**
*
*
* @param rIds
* @return
*/
@Override
public int deleteHwTagRecordByRIds(Long[] rIds)
{
return hwTagRecordMapper.deleteHwTagRecordByRIds(rIds);
}
/**
*
*
* @param rId
* @return
*/
@Override
public int deleteHwTagRecordByRId(Long rId)
{
return hwTagRecordMapper.deleteHwTagRecordByRId(rId);
}
}

@ -0,0 +1,147 @@
<?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="hw.tagApi.service.mapper.HwTagRecordMapper">
<resultMap type="HwTagRecord" id="HwTagRecordResult">
<result property="rId" column="r_id" />
<result property="tId" column="t_id" />
<result property="epc" column="epc" />
<result property="password" column="password" />
<result property="orderCode" column="order_code" />
<result property="batchNumber" column="batch_number" />
<result property="tagSequence" column="tag_sequence" />
<result property="totalQuantity" column="total_quantity" />
<result property="tagBatch" column="tag_batch" />
<result property="modelCode" column="model_code" />
<result property="processingTime" column="processing_time" />
<result property="operatorId" column="operator_id" />
<result property="delFlag" column="del_flag" />
<result property="fields1" column="fields_1" />
<result property="fields2" column="fields_2" />
<result property="fields3" column="fields_3" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectHwTagRecordVo">
select r_id, t_id, epc, password, order_code, batch_number, tag_sequence, total_quantity, tag_batch, model_code, processing_time, operator_id, del_flag, fields_1, fields_2, fields_3, create_by, create_time, update_by, update_time, remark from hw_tag_record
</sql>
<select id="selectHwTagRecordList" parameterType="HwTagRecord" resultMap="HwTagRecordResult">
<include refid="selectHwTagRecordVo"/>
<where>
<if test="tId != null and tId != ''"> and t_id = #{tId}</if>
<if test="epc != null and epc != ''"> and epc = #{epc}</if>
<if test="password != null and password != ''"> and password = #{password}</if>
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
<if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if>
<if test="tagSequence != null and tagSequence != ''"> and tag_sequence = #{tagSequence}</if>
<if test="totalQuantity != null "> and total_quantity = #{totalQuantity}</if>
<if test="tagBatch != null and tagBatch != ''"> and tag_batch = #{tagBatch}</if>
<if test="modelCode != null and modelCode != ''"> and model_code = #{modelCode}</if>
<if test="params.beginProcessingTime != null and params.beginProcessingTime != '' and params.endProcessingTime != null and params.endProcessingTime != ''"> and processing_time between #{params.beginProcessingTime} and #{params.endProcessingTime}</if>
<if test="operatorId != null and operatorId != ''"> and operator_id = #{operatorId}</if>
<if test="fields1 != null and fields1 != ''"> and fields_1 = #{fields1}</if>
<if test="fields2 != null and fields2 != ''"> and fields_2 = #{fields2}</if>
<if test="fields3 != null and fields3 != ''"> and fields_3 = #{fields3}</if>
</where>
</select>
<select id="selectHwTagRecordByRId" parameterType="Long" resultMap="HwTagRecordResult">
<include refid="selectHwTagRecordVo"/>
where r_id = #{rId}
</select>
<insert id="insertHwTagRecord" parameterType="HwTagRecord">
insert into hw_tag_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="rId != null">r_id,</if>
<if test="tId != null and tId != ''">t_id,</if>
<if test="epc != null and epc != ''">epc,</if>
<if test="password != null">password,</if>
<if test="orderCode != null">order_code,</if>
<if test="batchNumber != null">batch_number,</if>
<if test="tagSequence != null">tag_sequence,</if>
<if test="totalQuantity != null">total_quantity,</if>
<if test="tagBatch != null">tag_batch,</if>
<if test="modelCode != null">model_code,</if>
<if test="processingTime != null">processing_time,</if>
<if test="operatorId != null">operator_id,</if>
<if test="delFlag != null">del_flag,</if>
<if test="fields1 != null">fields_1,</if>
<if test="fields2 != null">fields_2,</if>
<if test="fields3 != null">fields_3,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="rId != null">#{rId},</if>
<if test="tId != null and tId != ''">#{tId},</if>
<if test="epc != null and epc != ''">#{epc},</if>
<if test="password != null">#{password},</if>
<if test="orderCode != null">#{orderCode},</if>
<if test="batchNumber != null">#{batchNumber},</if>
<if test="tagSequence != null">#{tagSequence},</if>
<if test="totalQuantity != null">#{totalQuantity},</if>
<if test="tagBatch != null">#{tagBatch},</if>
<if test="modelCode != null">#{modelCode},</if>
<if test="processingTime != null">#{processingTime},</if>
<if test="operatorId != null">#{operatorId},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="fields1 != null">#{fields1},</if>
<if test="fields2 != null">#{fields2},</if>
<if test="fields3 != null">#{fields3},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateHwTagRecord" parameterType="HwTagRecord">
update hw_tag_record
<trim prefix="SET" suffixOverrides=",">
<if test="tId != null and tId != ''">t_id = #{tId},</if>
<if test="epc != null and epc != ''">epc = #{epc},</if>
<if test="password != null">password = #{password},</if>
<if test="orderCode != null">order_code = #{orderCode},</if>
<if test="batchNumber != null">batch_number = #{batchNumber},</if>
<if test="tagSequence != null">tag_sequence = #{tagSequence},</if>
<if test="totalQuantity != null">total_quantity = #{totalQuantity},</if>
<if test="tagBatch != null">tag_batch = #{tagBatch},</if>
<if test="modelCode != null">model_code = #{modelCode},</if>
<if test="processingTime != null">processing_time = #{processingTime},</if>
<if test="operatorId != null">operator_id = #{operatorId},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="fields1 != null">fields_1 = #{fields1},</if>
<if test="fields2 != null">fields_2 = #{fields2},</if>
<if test="fields3 != null">fields_3 = #{fields3},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where r_id = #{rId}
</update>
<delete id="deleteHwTagRecordByRId" parameterType="Long">
delete from hw_tag_record where r_id = #{rId}
</delete>
<delete id="deleteHwTagRecordByRIds" parameterType="String">
delete from hw_tag_record where r_id in
<foreach item="rId" collection="array" open="(" separator="," close=")">
#{rId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询标签记录列表
export function listTagRecord(query) {
return request({
url: '/service/tagRecord/list',
method: 'get',
params: query
})
}
// 查询标签记录详细
export function getTagRecord(rId) {
return request({
url: '/service/tagRecord/' + rId,
method: 'get'
})
}
// 新增标签记录
export function addTagRecord(data) {
return request({
url: '/service/tagRecord',
method: 'post',
data: data
})
}
// 修改标签记录
export function updateTagRecord(data) {
return request({
url: '/service/tagRecord',
method: 'put',
data: data
})
}
// 删除标签记录
export function delTagRecord(rId) {
return request({
url: '/service/tagRecord/' + rId,
method: 'delete'
})
}

@ -1,6 +1,6 @@
<template>
<div class="app-container home">
<el-row :gutter="20">
<!-- <el-row :gutter="20">
<el-col :sm="24" :lg="12" style="padding-left: 20px">
<h2>若依后台管理框架</h2>
<p>
@ -1013,7 +1013,7 @@
</div>
</el-card>
</el-col>
</el-row>
</el-row> -->
</div>
</template>

@ -0,0 +1,434 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="TID" prop="tId">
<el-input
v-model="queryParams.tId"
placeholder="请输入TID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="EPC" prop="epc">
<el-input
v-model="queryParams.epc"
placeholder="请输入EPC"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次编号" prop="batchNumber">
<el-input
v-model="queryParams.batchNumber"
placeholder="请输入批次编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="标签序号" prop="tagSequence">
<el-input
v-model="queryParams.tagSequence"
placeholder="请输入标签序号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="总数量" prop="totalQuantity">
<el-input
v-model="queryParams.totalQuantity"
placeholder="请输入总数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="标签批次号" prop="tagBatch">
<el-input
v-model="queryParams.tagBatch"
placeholder="请输入标签批次号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="型号" prop="modelCode">
<el-input
v-model="queryParams.modelCode"
placeholder="请输入型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="加工时间">
<el-date-picker
v-model="daterangeProcessingTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="操作人员编号" prop="operatorId">
<el-input
v-model="queryParams.operatorId"
placeholder="请输入操作人员编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['service:tagRecord:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['service:tagRecord:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['service:tagRecord:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['service:tagRecord:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tagRecordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识,RID" align="center" prop="rId" />
<el-table-column label="TID" align="center" prop="tId" />
<el-table-column label="EPC" align="center" prop="epc" />
<el-table-column label="密码" align="center" prop="password" />
<el-table-column label="订单号" align="center" prop="orderCode" />
<el-table-column label="批次编号" align="center" prop="batchNumber" />
<el-table-column label="标签序号" align="center" prop="tagSequence" />
<el-table-column label="总数量" align="center" prop="totalQuantity" />
<el-table-column label="标签批次号" align="center" prop="tagBatch" />
<el-table-column label="型号" align="center" prop="modelCode" />
<el-table-column label="加工时间" align="center" prop="processingTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.processingTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作人员编号" align="center" prop="operatorId" />
<el-table-column label="预览字段1" align="center" prop="fields1" />
<el-table-column label="预览字段2" align="center" prop="fields2" />
<el-table-column label="预览字段3" align="center" prop="fields3" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['service:tagRecord:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['service:tagRecord:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改标签记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="TID" prop="tId">
<el-input v-model="form.tId" placeholder="请输入TID" />
</el-form-item>
<el-form-item label="EPC" prop="epc">
<el-input v-model="form.epc" placeholder="请输入EPC" />
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input v-model="form.password" placeholder="请输入密码" />
</el-form-item>
<el-form-item label="订单号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入订单号" />
</el-form-item>
<el-form-item label="批次编号" prop="batchNumber">
<el-input v-model="form.batchNumber" placeholder="请输入批次编号" />
</el-form-item>
<el-form-item label="标签序号" prop="tagSequence">
<el-input v-model="form.tagSequence" placeholder="请输入标签序号" />
</el-form-item>
<el-form-item label="总数量" prop="totalQuantity">
<el-input v-model="form.totalQuantity" placeholder="请输入总数量" />
</el-form-item>
<el-form-item label="标签批次号" prop="tagBatch">
<el-input v-model="form.tagBatch" placeholder="请输入标签批次号" />
</el-form-item>
<el-form-item label="型号" prop="modelCode">
<el-input v-model="form.modelCode" placeholder="请输入型号" />
</el-form-item>
<el-form-item label="加工时间" prop="processingTime">
<el-date-picker clearable
v-model="form.processingTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择加工时间">
</el-date-picker>
</el-form-item>
<el-form-item label="操作人员编号" prop="operatorId">
<el-input v-model="form.operatorId" placeholder="请输入操作人员编号" />
</el-form-item>
<el-form-item label="数据状态标记" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入数据状态标记" />
</el-form-item>
<el-form-item label="预览字段1" prop="fields1">
<el-input v-model="form.fields1" placeholder="请输入预览字段1" />
</el-form-item>
<el-form-item label="预览字段2" prop="fields2">
<el-input v-model="form.fields2" placeholder="请输入预览字段2" />
</el-form-item>
<el-form-item label="预览字段3" prop="fields3">
<el-input v-model="form.fields3" placeholder="请输入预览字段3" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listTagRecord, getTagRecord, delTagRecord, addTagRecord, updateTagRecord } from "@/api/service/tagRecord";
export default {
name: "TagRecord",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tagRecordList: [],
//
title: "",
//
open: false,
//
daterangeProcessingTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
tId: null,
epc: null,
password: null,
orderCode: null,
batchNumber: null,
tagSequence: null,
totalQuantity: null,
tagBatch: null,
modelCode: null,
processingTime: null,
operatorId: null,
fields1: null,
fields2: null,
fields3: null,
},
//
form: {},
//
rules: {
tId: [
{ required: true, message: "TID不能为空", trigger: "blur" }
],
epc: [
{ required: true, message: "EPC不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询标签记录列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeProcessingTime && '' != this.daterangeProcessingTime) {
this.queryParams.params["beginProcessingTime"] = this.daterangeProcessingTime[0];
this.queryParams.params["endProcessingTime"] = this.daterangeProcessingTime[1];
}
listTagRecord(this.queryParams).then(response => {
this.tagRecordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
rId: null,
tId: null,
epc: null,
password: null,
orderCode: null,
batchNumber: null,
tagSequence: null,
totalQuantity: null,
tagBatch: null,
modelCode: null,
processingTime: null,
operatorId: null,
delFlag: null,
fields1: null,
fields2: null,
fields3: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeProcessingTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.rId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加标签记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const rId = row.rId || this.ids
getTagRecord(rId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改标签记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.rId != null) {
updateTagRecord(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTagRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const rIds = row.rId || this.ids;
this.$modal.confirm('是否确认删除标签记录编号为"' + rIds + '"的数据项?').then(function() {
return delTagRecord(rIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('service/tagRecord/export', {
...this.queryParams
}, `tagRecord_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -36,7 +36,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`,
target: `http://localhost:9000`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save