diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml
index 3e58c660b..4580fb6f3 100644
--- a/yudao-dependencies/pom.xml
+++ b/yudao-dependencies/pom.xml
@@ -70,10 +70,13 @@
4.1.113.Final
1.2.5
0.6.9
+ 3.5.3
+
2.17.0
1.27.1
1.12.777
+ 2.41.33
1.0.8
1.7.8
4.6.0
@@ -589,6 +592,17 @@
${aws-java-sdk-s3.version}
+
+
+
+
+
+
+
+
+
+
+
com.xingyuv
spring-boot-starter-justauth
@@ -648,6 +662,16 @@
logback-classic
${logback.version}
+
+ com.google.zxing
+ core
+ ${qrcode.version}
+
+
+ com.google.zxing
+ javase
+ ${qrcode.version}
+
diff --git a/yudao-module-common/yudao-module-common-api/src/main/java/cn/iocoder/yudao/module/common/api/mold/enums/ErrorCodeConstants.java b/yudao-module-common/yudao-module-common-api/src/main/java/cn/iocoder/yudao/module/common/api/mold/enums/ErrorCodeConstants.java
new file mode 100644
index 000000000..f3b45ca0a
--- /dev/null
+++ b/yudao-module-common/yudao-module-common-api/src/main/java/cn/iocoder/yudao/module/common/api/mold/enums/ErrorCodeConstants.java
@@ -0,0 +1,16 @@
+package cn.iocoder.yudao.module.common.api.mold.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * ERP 错误码枚举类
+ *
+ * erp 系统,使用 1-030-000-000 段
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 二维码记录表(1-030-100-000) ==========
+ ErrorCode RECORD_NOT_EXISTS = new ErrorCode(1_003_000_000, "通用二维码记录不存在。");
+ ErrorCode FAILED_TO_REGENERATE = new ErrorCode(1_003_000_001, "重新生成二维码/条形码错误。");
+
+}
diff --git a/yudao-module-common/yudao-module-common-biz/pom.xml b/yudao-module-common/yudao-module-common-biz/pom.xml
index 418ad2281..6498dc13a 100644
--- a/yudao-module-common/yudao-module-common-biz/pom.xml
+++ b/yudao-module-common/yudao-module-common-biz/pom.xml
@@ -16,6 +16,12 @@
common 模块业务实现
+
+
+ cn.iocoder.boot
+ yudao-common
+
+
cn.iocoder.boot
@@ -56,6 +62,14 @@
cn.iocoder.boot
yudao-spring-boot-starter-excel
+
+ com.google.zxing
+ core
+
+
+ com.google.zxing
+ javase
+
\ No newline at end of file
diff --git a/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/controller/admin/mold/vo/MoldSaveReqVO.java b/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/controller/admin/mold/vo/MoldSaveReqVO.java
index cccc7028c..c6574a0b2 100644
--- a/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/controller/admin/mold/vo/MoldSaveReqVO.java
+++ b/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/controller/admin/mold/vo/MoldSaveReqVO.java
@@ -16,7 +16,7 @@ public class MoldSaveReqVO {
private Long id;
@Schema(description = "模具编码", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotEmpty(message = "模具编码不能为空")
+// @NotEmpty(message = "模具编码不能为空")
private String code;
@Schema(description = "模具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
diff --git a/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/controller/admin/qrcoderecord/QrcodeRecordController.java b/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/controller/admin/qrcoderecord/QrcodeRecordController.java
new file mode 100644
index 000000000..4223efcfe
--- /dev/null
+++ b/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/controller/admin/qrcoderecord/QrcodeRecordController.java
@@ -0,0 +1,122 @@
+package cn.iocoder.yudao.module.common.controller.admin.qrcoderecord;
+
+import cn.iocoder.yudao.module.common.controller.admin.qrcoderecord.vo.QrcodeRecordPageReqVO;
+import cn.iocoder.yudao.module.common.controller.admin.qrcoderecord.vo.QrcodeRecordRespVO;
+import cn.iocoder.yudao.module.common.controller.admin.qrcoderecord.vo.QrcodeRecordSaveReqVO;
+import cn.iocoder.yudao.module.common.dal.dataobject.qrcoderecord.QrcodeRecordDO;
+import cn.iocoder.yudao.module.common.service.qrcordrecord.QrcodeRecordService;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
+
+
+import java.util.*;
+import java.io.IOException;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+
+import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
+import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
+
+
+import javax.annotation.Resource;
+import javax.annotation.security.PermitAll;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+@Tag(name = "管理后台 - 通用二维码记录")
+@RestController
+@RequestMapping("/qrcode/record")
+@Validated
+public class QrcodeRecordController {
+
+ @Resource
+ private QrcodeRecordService qrcodeRecordService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建通用二维码记录")
+ @PreAuthorize("@ss.hasPermission('qrcode:record:create')")
+ public CommonResult createRecord(@Valid @RequestBody QrcodeRecordSaveReqVO createReqVO) {
+ return success(qrcodeRecordService.createRecord(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新通用二维码记录")
+ @PreAuthorize("@ss.hasPermission('qrcode:record:update')")
+ public CommonResult updateRecord(@Valid @RequestBody QrcodeRecordSaveReqVO updateReqVO) {
+ qrcodeRecordService.updateRecord(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除通用二维码记录")
+ @Parameter(name = "id", description = "编号", required = true)
+ @PreAuthorize("@ss.hasPermission('qrcode:record:delete')")
+ public CommonResult deleteRecord(@RequestParam("id") Long id) {
+ qrcodeRecordService.deleteRecord(id);
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得通用二维码记录")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ @PreAuthorize("@ss.hasPermission('qrcode:record:query')")
+ public CommonResult getRecord(@RequestParam("id") Long id) {
+ QrcodeRecordDO record = qrcodeRecordService.getRecord(id);
+ return success(BeanUtils.toBean(record, QrcodeRecordRespVO.class));
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得通用二维码记录分页")
+ @PreAuthorize("@ss.hasPermission('qrcode:record:query')")
+ public CommonResult> getRecordPage(@Valid QrcodeRecordPageReqVO pageReqVO) {
+ PageResult pageResult = qrcodeRecordService.getRecordPage(pageReqVO);
+ return success(BeanUtils.toBean(pageResult, QrcodeRecordRespVO.class));
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出通用二维码记录 Excel")
+ @PreAuthorize("@ss.hasPermission('qrcode:record:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportRecordExcel(@Valid QrcodeRecordPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = qrcodeRecordService.getRecordPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "通用二维码记录.xls", "数据", QrcodeRecordRespVO.class,
+ BeanUtils.toBean(list, QrcodeRecordRespVO.class));
+ }
+
+ //TODO 扫二维码拉起app端,仍需app拉起连接地址。
+// @GetMapping(value = "/scan", produces = "text/html;charset=UTF-8")
+// @Operation(summary = "扫二维码拉起app端 ")
+// @PermitAll
+// public void scan(@RequestParam("type") String type,
+// @RequestParam("id") Long id,
+// @RequestParam(required=false) String code,
+// HttpServletResponse response) throws IOException {
+// String html = qrcodeRecordService.buildScanTransitHtml(type, id,code);
+// response.setContentType("text/html;charset=UTF-8");
+// response.getWriter().write(html);
+// }
+
+
+ @GetMapping("/scan/resolve-id")
+ @Operation(summary = "扫二维码返回对应id ")
+ @PermitAll
+ public CommonResult