From 3544b0b9487c235387a91179d95669a66515399d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 30 九月 2026 16:05:16 +0800
Subject: [PATCH] feat(migration): 接入 5 个 cnas 模块骨架,补迁 ruoyi-common/ruoyi-system 缺失文件
---
ruoyi-common/src/main/java/com/ruoyi/common/constant/MenuJumpPathConstants.java | 40 +
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentLims.java | 42 +
ruoyi-common/src/main/java/com/ruoyi/common/utils/Md5Util.java | 68 +
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateImageUtil.java | 61 +
cnas-require/pom.xml | 75 +
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Custom.java | 68 +
cnas-manage/pom.xml | 63 +
ruoyi-common/src/main/java/com/ruoyi/common/utils/api/IfsApiUtils.java | 161 ++++
pom.xml | 73 +
ruoyi-common/src/main/java/com/ruoyi/common/constant/DeviceImpowerConstants.java | 65 +
ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java | 33
ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java | 19
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxCpUtils.java | 165 ++++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DepartmentLimsMapper.java | 27
ruoyi-system/src/main/resources/mapper/system/CustomMapper.xml | 14
ruoyi-system/src/main/resources/mapper/system/DepartmentLimsMapper.xml | 25
ruoyi-common/src/main/java/com/ruoyi/common/config/WechatProperty.java | 20
ruoyi-common/src/main/java/com/ruoyi/common/utils/GZipUtil.java | 61 +
ruoyi-system/src/main/resources/mapper/system/InformationNotificationMapper.xml | 27
cnas-personnel/pom.xml | 69 +
ruoyi-admin/pom.xml | 30
ruoyi-system/src/main/java/com/ruoyi/system/mapper/InformationNotificationMapper.java | 31
ruoyi-common/src/main/java/com/ruoyi/common/config/IfsProperties.java | 46 +
ruoyi-common/src/main/resources/ttf/signature.ttf | 0
cnas-device/pom.xml | 63 +
ruoyi-common/src/main/java/com/ruoyi/common/utils/ApplicationContextHolder.java | 52 +
ruoyi-common/pom.xml | 16
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentDto.java | 23
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java | 21
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CustomMapper.java | 18
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomServiceImpl.java | 62 +
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotificationDto.java | 10
cnas-process/pom.xml | 73 +
ruoyi-common/src/main/java/com/ruoyi/common/config/PersonnelProperties.java | 39
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotification.java | 68 +
ruoyi-common/src/main/java/com/ruoyi/common/constant/DictDataConstants.java | 24
ruoyi-common/src/main/java/com/ruoyi/common/utils/FileSaveUtil.java | 178 ++++
ruoyi-common/src/main/java/com/ruoyi/common/utils/SignatureImageUtil.java | 66 +
ruoyi-common/src/main/java/com/ruoyi/common/annotation/PersonalScope.java | 32
ruoyi-system/src/main/java/com/ruoyi/system/service/CustomService.java | 28
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InformationNotificationServiceImpl.java | 109 ++
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/ParameterEscaperUtil.java | 92 ++
ruoyi-system/src/main/java/com/ruoyi/system/service/InformationNotificationService.java | 40 +
ruoyi-common/src/main/java/com/ruoyi/common/utils/MyUtil.java | 17
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserVo.java | 12
ruoyi-common/src/main/java/com/ruoyi/common/enums/OrderType.java | 44 +
46 files changed, 2,370 insertions(+), 0 deletions(-)
diff --git a/cnas-device/pom.xml b/cnas-device/pom.xml
new file mode 100644
index 0000000..57cca77
--- /dev/null
+++ b/cnas-device/pom.xml
@@ -0,0 +1,63 @@
+<?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>3.9.2</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cnas-device</artifactId>
+
+ <description>
+ CNAS 璁惧妯″潡
+ </description>
+
+ <dependencies>
+ <!--涓氬姟妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>inspect-server</artifactId>
+ </dependency>
+
+ <!-- MyBatis-Plus -->
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-spring-boot4-starter</artifactId>
+ </dependency>
+
+ <!-- Excel 宸ュ叿 -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>easyexcel</artifactId>
+ </dependency>
+
+ <!-- hutool 宸ュ叿绫� -->
+ <dependency>
+ <groupId>cn.hutool</groupId>
+ <artifactId>hutool-all</artifactId>
+ </dependency>
+
+ <!-- fastjson v1 API 鍏煎鍖� -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ </dependency>
+
+ <!-- poi-tl锛歐ord 鎶ヨ〃妯℃澘濉厖 -->
+ <dependency>
+ <groupId>com.deepoove</groupId>
+ <artifactId>poi-tl</artifactId>
+ </dependency>
+
+ <!-- lombok -->
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/cnas-manage/pom.xml b/cnas-manage/pom.xml
new file mode 100644
index 0000000..c3c7032
--- /dev/null
+++ b/cnas-manage/pom.xml
@@ -0,0 +1,63 @@
+<?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>3.9.2</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cnas-manage</artifactId>
+
+ <description>
+ CNAS 绠$悊妯″潡
+ </description>
+
+ <dependencies>
+ <!--涓氬姟妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>inspect-server</artifactId>
+ </dependency>
+
+ <!-- MyBatis-Plus -->
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-spring-boot4-starter</artifactId>
+ </dependency>
+
+ <!-- Excel 宸ュ叿 -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>easyexcel</artifactId>
+ </dependency>
+
+ <!-- hutool 宸ュ叿绫� -->
+ <dependency>
+ <groupId>cn.hutool</groupId>
+ <artifactId>hutool-all</artifactId>
+ </dependency>
+
+ <!-- poi-tl锛歐ord 鎶ヨ〃妯℃澘濉厖 -->
+ <dependency>
+ <groupId>com.deepoove</groupId>
+ <artifactId>poi-tl</artifactId>
+ </dependency>
+
+ <!-- word 杞� pdf -->
+ <dependency>
+ <groupId>com.aspose</groupId>
+ <artifactId>aspose-words</artifactId>
+ </dependency>
+
+ <!-- lombok -->
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/cnas-personnel/pom.xml b/cnas-personnel/pom.xml
new file mode 100644
index 0000000..f629a1f
--- /dev/null
+++ b/cnas-personnel/pom.xml
@@ -0,0 +1,69 @@
+<?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>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi</artifactId>
+ <version>3.9.2</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cnas-personnel</artifactId>
+
+ <description>
+ CNAS 浜哄憳妯″潡
+ </description>
+
+ <dependencies>
+ <!-- 閫氱敤宸ュ叿-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi-common</artifactId>
+ </dependency>
+
+ <!-- 鏍稿績妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi-framework</artifactId>
+ </dependency>
+
+ <!-- 绯荤粺妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi-system</artifactId>
+ </dependency>
+
+ <!--涓氬姟妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>inspect-server</artifactId>
+ </dependency>
+
+ <!-- MyBatis-Plus -->
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-spring-boot4-starter</artifactId>
+ </dependency>
+
+ <!-- Excel 宸ュ叿 -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>easyexcel</artifactId>
+ </dependency>
+
+ <!-- poi-tl锛歐ord 鎶ヨ〃妯℃澘濉厖 -->
+ <dependency>
+ <groupId>com.deepoove</groupId>
+ <artifactId>poi-tl</artifactId>
+ </dependency>
+
+ <!-- lombok -->
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/cnas-process/pom.xml b/cnas-process/pom.xml
new file mode 100644
index 0000000..aa3fd40
--- /dev/null
+++ b/cnas-process/pom.xml
@@ -0,0 +1,73 @@
+<?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>3.9.2</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cnas-process</artifactId>
+
+ <description>
+ CNAS 杩囩▼妯″潡
+ </description>
+
+ <dependencies>
+ <!--涓氬姟妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>inspect-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-device</artifactId>
+ </dependency>
+
+ <!-- MyBatis-Plus -->
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-spring-boot4-starter</artifactId>
+ </dependency>
+
+ <!-- Excel 宸ュ叿 -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>easyexcel</artifactId>
+ </dependency>
+
+ <!-- hutool 宸ュ叿绫� -->
+ <dependency>
+ <groupId>cn.hutool</groupId>
+ <artifactId>hutool-all</artifactId>
+ </dependency>
+
+ <!-- fastjson v1 API 鍏煎鍖� -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ </dependency>
+
+ <!-- poi-tl锛歐ord 鎶ヨ〃妯℃澘濉厖 -->
+ <dependency>
+ <groupId>com.deepoove</groupId>
+ <artifactId>poi-tl</artifactId>
+ </dependency>
+
+ <!-- word 杞� pdf -->
+ <dependency>
+ <groupId>com.aspose</groupId>
+ <artifactId>aspose-words</artifactId>
+ </dependency>
+
+ <!-- lombok -->
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/cnas-require/pom.xml b/cnas-require/pom.xml
new file mode 100644
index 0000000..036afef
--- /dev/null
+++ b/cnas-require/pom.xml
@@ -0,0 +1,75 @@
+<?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>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi</artifactId>
+ <version>3.9.2</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>cnas-require</artifactId>
+
+ <description>
+ CNAS 瑕佹眰妯″潡
+ </description>
+
+ <dependencies>
+ <!-- 閫氱敤宸ュ叿-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi-common</artifactId>
+ </dependency>
+
+ <!-- 鏍稿績妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi-framework</artifactId>
+ </dependency>
+
+ <!--涓氬姟妯″潡-->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>inspect-server</artifactId>
+ </dependency>
+
+ <!-- MyBatis-Plus -->
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-spring-boot4-starter</artifactId>
+ </dependency>
+
+ <!-- Excel 宸ュ叿 -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>easyexcel</artifactId>
+ </dependency>
+
+ <!-- hutool 宸ュ叿绫� -->
+ <dependency>
+ <groupId>cn.hutool</groupId>
+ <artifactId>hutool-all</artifactId>
+ </dependency>
+
+ <!-- fastjson v1 API 鍏煎鍖� -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ </dependency>
+
+ <!-- poi-tl锛歐ord 鎶ヨ〃妯℃澘濉厖 -->
+ <dependency>
+ <groupId>com.deepoove</groupId>
+ <artifactId>poi-tl</artifactId>
+ </dependency>
+
+ <!-- lombok -->
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/pom.xml b/pom.xml
index e1c0a9a..bdee6b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,11 @@
<guava.version>33.6.0-jre</guava.version>
<commons.text.version>1.10.0</commons.text.version>
<swagger.annotations.version>2.2.52</swagger.annotations.version>
+ <poi.tl.version>1.12.2</poi.tl.version>
+ <fastjson.compat.version>2.0.23</fastjson.compat.version>
+ <weixin.version>4.1.0</weixin.version>
+ <aspose.words.version>15.12.0</aspose.words.version>
+ <itextpdf.version>5.0.6</itextpdf.version>
</properties>
<!-- 渚濊禆澹版槑 -->
@@ -263,6 +268,69 @@
<artifactId>performance-server</artifactId>
<version>${ruoyi.version}</version>
</dependency>
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-require</artifactId>
+ <version>${ruoyi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-manage</artifactId>
+ <version>${ruoyi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-device</artifactId>
+ <version>${ruoyi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-process</artifactId>
+ <version>${ruoyi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-personnel</artifactId>
+ <version>${ruoyi.version}</version>
+ </dependency>
+
+ <!-- poi-tl锛歐ord 鎶ヨ〃妯℃澘濉厖 -->
+ <dependency>
+ <groupId>com.deepoove</groupId>
+ <artifactId>poi-tl</artifactId>
+ <version>${poi.tl.version}</version>
+ </dependency>
+
+ <!-- fastjson v1 API 鍏煎鍖咃紙鐢� fastjson2 鎻愪緵 com.alibaba.fastjson.*锛� -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ <version>${fastjson.compat.version}</version>
+ </dependency>
+
+ <!-- 浼佷笟寰俊 -->
+ <dependency>
+ <groupId>com.github.binarywang</groupId>
+ <artifactId>weixin-java-cp</artifactId>
+ <version>${weixin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.binarywang</groupId>
+ <artifactId>weixin-java-common</artifactId>
+ <version>${weixin.version}</version>
+ </dependency>
+
+ <!-- word 杞� pdf -->
+ <dependency>
+ <groupId>com.aspose</groupId>
+ <artifactId>aspose-words</artifactId>
+ <version>${aspose.words.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.itextpdf</groupId>
+ <artifactId>itextpdf</artifactId>
+ <version>${itextpdf.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -277,6 +345,11 @@
<module>basic-server</module>
<module>inspect-server</module>
<module>performance-server</module>
+ <module>cnas-require</module>
+ <module>cnas-manage</module>
+ <module>cnas-device</module>
+ <module>cnas-process</module>
+ <module>cnas-personnel</module>
</modules>
<packaging>pom</packaging>
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 3c1ce14..78aeb2c 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -72,6 +72,36 @@
<artifactId>performance-server</artifactId>
</dependency>
+ <!-- CNAS 瑕佹眰 -->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-require</artifactId>
+ </dependency>
+
+ <!-- CNAS 绠$悊 -->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-manage</artifactId>
+ </dependency>
+
+ <!-- CNAS 璁惧 -->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-device</artifactId>
+ </dependency>
+
+ <!-- CNAS 杩囩▼ -->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-process</artifactId>
+ </dependency>
+
+ <!-- CNAS 浜哄憳 -->
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>cnas-personnel</artifactId>
+ </dependency>
+
</dependencies>
<build>
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index 1a57805..7268361 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -148,6 +148,22 @@
<artifactId>commons-text</artifactId>
</dependency>
+ <!-- fastjson v1 API 鍏煎鍖咃紙IfsApiUtils 绛変娇鐢� com.alibaba.fastjson.*锛� -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ </dependency>
+
+ <!-- 浼佷笟寰俊锛圵xCpUtils 浣跨敤锛� -->
+ <dependency>
+ <groupId>com.github.binarywang</groupId>
+ <artifactId>weixin-java-cp</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.github.binarywang</groupId>
+ <artifactId>weixin-java-common</artifactId>
+ </dependency>
+
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/PersonalScope.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/PersonalScope.java
new file mode 100644
index 0000000..6df29bc
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/PersonalScope.java
@@ -0,0 +1,32 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 浠呯湅鎴戞潈闄�
+ *
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface PersonalScope {
+
+ /**
+ * 鏉冮檺鏍囪瘑鍚嶇О
+ * @return
+ */
+ String permsName();
+
+ /**
+ * 瀵硅薄鍚嶇О
+ * @return
+ */
+ Class objectName();
+
+ /**
+ * 鍙傛暟鍚嶇О
+ * @return
+ */
+ String paramName();
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/IfsProperties.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/IfsProperties.java
new file mode 100644
index 0000000..451f163
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/IfsProperties.java
@@ -0,0 +1,46 @@
+package com.ruoyi.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author zhuo
+ * @Date 2024/9/29
+ */
+@Configuration
+@ConfigurationProperties(prefix = "ifs")
+@Data
+public class IfsProperties {
+
+ /**
+ * 鍩�
+ */
+ private String contract;
+
+ /**
+ * 绉橀挜-get
+ */
+ private String contractKeyGet;
+
+
+ /**
+ * 绉橀挜-post
+ */
+ private String contractKeyPost;
+
+ /**
+ * 80
+ */
+ private String custorder;
+
+ /**
+ * 8008
+ */
+ private String custorderPort;
+
+ /**
+ * 8081
+ */
+ private String erpServices;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/PersonnelProperties.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/PersonnelProperties.java
new file mode 100644
index 0000000..aab04a1
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/PersonnelProperties.java
@@ -0,0 +1,39 @@
+package com.ruoyi.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 浜轰簨绯荤粺api
+ *
+ * @Author zhuo
+ * @Date 2025/3/16
+ */
+@Configuration
+@ConfigurationProperties(prefix = "personnel")
+@Data
+public class PersonnelProperties {
+ /**
+ * 姝e紡鍦板潃
+ * */
+ private String code;
+ /**
+ * 瑁呭浜轰簨姝e紡搴�
+ * */
+ private String appId;
+ private String appSecret;
+
+ private String companies;
+
+ private String simple;
+
+ /**
+ * 浜哄憳瀵嗙爜鑾峰彇
+ * */
+ private String password;
+
+ private String department;
+
+ private String person;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/WechatProperty.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/WechatProperty.java
new file mode 100644
index 0000000..dce58be
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/WechatProperty.java
@@ -0,0 +1,20 @@
+package com.ruoyi.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ */
+@Configuration
+@ConfigurationProperties(prefix = "wechat")
+@Data
+public class WechatProperty {
+
+ /**
+ * 瑁呭鐢电紗锛氭姤妫�閫氱煡url
+ */
+ private String examiningUrl;
+
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/DeviceImpowerConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/DeviceImpowerConstants.java
new file mode 100644
index 0000000..1971195
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/DeviceImpowerConstants.java
@@ -0,0 +1,65 @@
+package com.ruoyi.common.constant;
+
+/**
+ * @Author zhuo
+ * @Date 2025/4/18
+ */
+public class DeviceImpowerConstants {
+
+ /**
+ * 鑰佸寲瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String AGING_MAINTENANCE_CONTENT = "aging_maintenance_content";
+
+ /**
+ * 鐢垫�ц兘瀹為獙瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String ELECTRICAL_MAINTENANCE_CONTENT = "electrical_maintenance_content";
+
+ /**
+ * 鐜瀹為獙瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String ENVIRONMENTAL_MAINTENANCE_CONTENT = "environmental_maintenance_content";
+
+ /**
+ * 鐕冪儳瀹為獙瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String BURN_MAINTENANCE_CONTENT = "burn_maintenance_content";
+
+ /**
+ * 娣风偧瀹為獙瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String MIXING_MAINTENANCE_CONTENT = "mixing_maintenance_content";
+
+ /**
+ * 妫�娴嬩腑蹇冪數鎬ц兘瀹為獙瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String CENTER_ELECTRICAL_MAINTENANCE_CONTENT = "center_electrical_maintenance_content";
+
+ /**
+ * 鎭掓俯浜岀淮鎶ゅ唴瀹�
+ */
+ public static final String TEMPERATURE2_MAINTENANCE_CONTENT = "temperature2_maintenance_content";
+
+
+ /**
+ * 鎭掓俯涓�缁存姢鍐呭
+ */
+ public static final String TEMPERATURE1_MAINTENANCE_CONTENT = "temperature1_maintenance_content";
+
+ /**
+ * 鍖栧瀹為獙瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String CHEMISTRY_MAINTENANCE_CONTENT = "chemistry_maintenance_content";
+
+ /**
+ * 鍒舵牱瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String SAMPLE_MAINTENANCE_CONTENT = "sample_maintenance_content";
+
+
+ /**
+ * 浣庢俯瀹為獙瀹ょ淮鎶ゅ唴瀹�
+ */
+ public static final String HYPOTHERMIA_MAINTENANCE_CONTENT = "hypothermia_maintenance_content";
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/DictDataConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/DictDataConstants.java
new file mode 100644
index 0000000..43d8fc5
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/DictDataConstants.java
@@ -0,0 +1,24 @@
+package com.ruoyi.common.constant;
+
+import lombok.Data;
+
+/**
+ * 瀛楀吀绫诲瀷
+ *
+ * @Author zhuo
+ * @Date 2025/2/25
+ */
+public class DictDataConstants {
+
+ // 妫�楠岀被鍨�(鍘熸潗鏂�)
+ public static final String CHECK_TYPE = "check_type";
+
+ // 妫�楠岀被鍨�(鎴愬搧)
+ public static final String CHECK_TYPE1 = "check_type1";
+
+ // 鏉ユ牱鏂瑰紡
+ public static final String FORM_TYPE = "form_type";
+
+ // 鏍峰搧鐘舵��
+ public static final String SAMPLE_STATUS_LIST = "sample_status_list";
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java
new file mode 100644
index 0000000..676efa1
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java
@@ -0,0 +1,19 @@
+package com.ruoyi.common.constant;
+
+/**
+ * 妫�楠岀被鍨�
+ *
+ * @Author zhuo
+ * @Date 2024/8/11
+ */
+public class InsOrderTypeConstants {
+ // 妫�楠岀被鍨�
+ public static final String SPOT_CHECK = "鎶芥";
+ // 濮旀墭妫�楠�
+ public static final String CUSTOMER_ORDERED = "Customer-ordered test";
+ // 杩涘巶妫�楠�
+ public static final String ENTER_THE_FACTORY = "杩涘巶妫�楠�";
+ // 瀛e害妫�楠�
+ public static final String QUARTERLY_TEST = "Quarterly inspection";
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/MenuJumpPathConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/MenuJumpPathConstants.java
new file mode 100644
index 0000000..50f5933
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/MenuJumpPathConstants.java
@@ -0,0 +1,40 @@
+package com.ruoyi.common.constant;
+
+/**
+ * 鑿滃崟璋冨噯璺緞
+ *
+ * @Author zhuo
+ * @Date 2025/3/14
+ */
+public class MenuJumpPathConstants {
+
+ /**
+ * 鎶ュ憡缂栧埗
+ */
+ public static final String REPORT_PREPARATION = "ReportPreparation";
+
+ /**
+ * 妫�楠屼换鍔″鏍�
+ */
+ public static final String INSPECTION_REVIEW = "InspectionReview";
+
+ /**
+ * 璐ㄩ噺鐩戞帶
+ */
+ public static final String QUALITY_MONITOR = "EnsureResultsValidity";
+
+ /**
+ * 璐ㄩ噺鐩戠潱
+ */
+ public static final String QUALITY_SUPERVISE = "QualityControlPlan";
+
+ /**
+ * 浜哄憳
+ */
+ public static final String DEVICE = "Device";
+
+ /**
+ * 璁惧
+ */
+ public static final String PERSONNEL = "PersonnelInfo";
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Custom.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Custom.java
new file mode 100644
index 0000000..2f2bf9b
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Custom.java
@@ -0,0 +1,68 @@
+package com.ruoyi.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName("custom")
+public class Custom implements Serializable {
+
+ @Schema(description = "涓婚敭")
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ @Schema(description = "瀹㈡埛鍚嶇О")
+ private String company;
+
+ @Schema(description = "鍗曚綅鍦板潃")
+ private String address;
+
+ @Schema(description = "鑱旂郴浜�")
+ private String contact;
+
+ @Schema(description = "宸ュ巶鍩�")
+ private String code;
+
+ @Schema(description = "瀹㈡埛缂栧彿")
+ private String code2;
+
+ @TableField(fill = FieldFill.INSERT)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private LocalDateTime createTime;
+
+ @Schema(description = "鍒涘缓鏃ユ湡")
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private LocalDateTime updateTime;
+
+ @Schema(description = "鍒涘缓鐢ㄦ埛")
+ @TableField(fill = FieldFill.INSERT)
+ private Integer createUser;
+
+ @Schema(description = "鏇存柊鐢ㄦ埛")
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private Integer updateUser;
+
+ @Schema(description = "瀹㈡埛鍗曚綅EN")
+ private String companyEn;
+
+ @Schema(description = "鍗曚綅鍦板潃EN")
+ private String addressEn;
+
+ @Schema(description = "鍔犳�ラ搴�")
+ private Integer num;
+
+ @Schema(description = "鍗曚綅鐢佃瘽")
+ private String phone;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentDto.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentDto.java
new file mode 100644
index 0000000..9fa947a
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentDto.java
@@ -0,0 +1,23 @@
+package com.ruoyi.common.core.domain.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class DepartmentDto {
+
+ private Integer id;
+
+ private String name;
+
+ private Integer userId;
+
+ private Integer fatherId;
+
+ private List<DepartmentDto> children;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentLims.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentLims.java
new file mode 100644
index 0000000..3a329f6
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/DepartmentLims.java
@@ -0,0 +1,42 @@
+package com.ruoyi.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * 閮ㄩ棬鏄庣粏
+ * @TableName department_lims
+ */
+@TableName(value ="department_lims")
+@Data
+public class DepartmentLims implements Serializable {
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ @Schema(description = "鍚嶇О")
+ private String name;
+
+ @Schema(description = "鐖剁骇id")
+ private Integer fatherId;
+
+ @TableField(fill = FieldFill.INSERT)
+ private Integer createUser;
+
+ @TableField(fill = FieldFill.INSERT)
+ private LocalDateTime createTime;
+
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private Integer updateUser;
+
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private LocalDateTime updateTime;
+
+ @TableField(exist = false)
+ private List<DepartmentLims> children;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotification.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotification.java
new file mode 100644
index 0000000..de3cf37
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotification.java
@@ -0,0 +1,68 @@
+package com.ruoyi.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 娑堟伅閫氱煡
+ * </p>
+ *
+ * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
+ * @since 2024-04-23 02:14:30
+ */
+@Getter
+@Setter
+@TableName("information_notification")
+@Schema(description = "娑堟伅閫氱煡")
+public class InformationNotification implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "涓婚敭ID")
+ @TableId(type = IdType.AUTO)
+ private Integer id;
+
+ @Schema(description = "鍒涘缓浜�")
+ private String createUser;
+
+ @Schema(description = "鏇存柊鏃堕棿")
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private LocalDateTime updateTime;
+
+ @Schema(description = "鍒涘缓鏃堕棿/鍙戦�佹椂闂�")
+ @TableField(fill = FieldFill.INSERT)
+ private LocalDateTime createTime;
+
+ @Schema(description = "寰呭姙銆佹帴鏀躲�佸鏍搞�佹壒鍑嗐�侀璀︽彁閱掋�侀�氱煡鍏憡")
+ private String messageType;
+
+ @Schema(description = "涓婚")
+ private String theme;
+
+ @Schema(description = "鍐呭")
+ private String content;
+
+ @Schema(description = "鍙戦�佷汉Id")
+ private Integer senderId;
+
+ @Schema(description = "鏀朵欢浜�")
+ private Integer consigneeId;
+
+ @Schema(description = "鏌ョ湅鐘舵�侊細宸茶锛屾湭璇�")
+ private Boolean viewStatus;
+
+ @Schema(description = "娑堟伅鐘舵�侊紙鎷掔粷銆佹帴鏀讹級锛堟牴鎹秷鎭被鍨嬪睍绀猴級")
+ private Boolean messageStatus;
+
+ @Schema(description = "璺宠浆璺緞")
+ private String jumpPath;
+
+ @Schema(description = "璺宠浆Id")
+ private String jumpId;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotificationDto.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotificationDto.java
new file mode 100644
index 0000000..7b6a694
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/InformationNotificationDto.java
@@ -0,0 +1,10 @@
+package com.ruoyi.common.core.domain.entity;
+
+import lombok.Data;
+
+@Data
+public class InformationNotificationDto extends InformationNotification{
+ private String senderUser;
+
+ private String consigneeUser;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/OrderType.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/OrderType.java
new file mode 100644
index 0000000..de83896
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/OrderType.java
@@ -0,0 +1,44 @@
+package com.ruoyi.common.enums;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum OrderType {
+
+ RAW("鍘熸潗鏂�","01raw"),
+ WG("澶栬喘鎴愬搧","02wg");
+
+ private String label,value;
+
+ public String getLabel() {
+ return label;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ OrderType(String label, String value) {
+ this.label = label;
+ this.value = value;
+ }
+
+ public static boolean validateValue(String value){
+ boolean flag = false;
+ for (OrderType orderType : OrderType.values()) {
+ if(StringUtils.isNotBlank(value)&&StringUtils.equals(orderType.getValue(),value)){
+ flag = true;
+ }
+ }
+ return flag;
+ }
+
+ public static String getLabelByValue(String value){
+ for (OrderType orderType : OrderType.values()) {
+ if(validateValue(value)&&StringUtils.equals(orderType.getValue(), value)){
+ return orderType.getLabel();
+ }
+ }
+ return "";
+ }
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ApplicationContextHolder.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ApplicationContextHolder.java
new file mode 100644
index 0000000..a610a15
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ApplicationContextHolder.java
@@ -0,0 +1,52 @@
+package com.ruoyi.common.utils;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Author: zhangxy
+ * @Date: 2021-05-24 16:29
+ */
+@Component
+public class ApplicationContextHolder implements ApplicationContextAware {
+ private static ApplicationContext applicationContext;
+
+ @Override
+ public void setApplicationContext(ApplicationContext ctx) throws BeansException {
+ applicationContext = ctx;
+ }
+
+ /**
+ * Get application context from everywhere
+ *
+ * @return
+ */
+ public static ApplicationContext getApplicationContext() {
+ return applicationContext;
+ }
+
+ /**
+ * Get bean by class
+ *
+ * @param clazz
+ * @param <T>
+ * @return
+ */
+ public static <T> T getBean(Class<T> clazz) {
+ return applicationContext.getBean(clazz);
+ }
+
+ /**
+ * Get bean by class name
+ *
+ * @param name
+ * @param <T>
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T getBean(String name) {
+ return (T) applicationContext.getBean(name);
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateImageUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateImageUtil.java
new file mode 100644
index 0000000..7fb91ee
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateImageUtil.java
@@ -0,0 +1,61 @@
+package com.ruoyi.common.utils;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.font.FontRenderContext;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * @Author zhuo
+ * @Date 2024/9/28
+ */
+public class DateImageUtil {
+
+ /**
+ * 鐢熸垚 褰撳墠鏃ユ湡鐨勭敾甯�
+ * @return
+ */
+ public static InputStream createDateImage(LocalDateTime date) {
+ int width = 80;
+ int height = 20;
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd");
+ if (date == null) {
+ date = LocalDateTime.now();
+ }
+ String s = date.format(formatter);
+
+ Font font = new Font("Serif", Font.BOLD, 10);
+ // 鍒涘缓涓�涓敾甯冿紙鑳屾櫙閫忔槑锛�
+ BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+ // 鑾峰彇鐢诲竷鐨勭敾绗�
+ Graphics2D g2 = (Graphics2D) bi.getGraphics();
+ // 寮�濮嬬粯鍥�
+ g2.setComposite(AlphaComposite.Src); // 纭繚缁樺浘鏃舵槸閫忔槑鑳屾櫙
+ g2.setBackground(new Color(0, 0, 0, 0)); // 鑳屾櫙鑹蹭负閫忔槑
+ g2.clearRect(0, 0, width, height);
+ g2.setPaint(new Color(0, 0, 0)); // 璁剧疆缁樺埗棰滆壊
+ FontRenderContext context = g2.getFontRenderContext();
+ Rectangle2D bounds = font.getStringBounds(s, context);
+ double x = (width - bounds.getWidth()) / 2;
+ double y = (height - bounds.getHeight()) / 2;
+ double ascent = -bounds.getY();
+ double baseY = y + ascent;
+ g2.drawString(s, (int) x, (int) baseY);
+ g2.dispose(); // 閲婃斁鐢荤瑪璧勬簮
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+
+ try {
+ ImageIO.write(bi, "png", os);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ return new ByteArrayInputStream(os.toByteArray());
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/FileSaveUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/FileSaveUtil.java
new file mode 100644
index 0000000..d8f0f1c
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/FileSaveUtil.java
@@ -0,0 +1,178 @@
+package com.ruoyi.common.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import org.springframework.util.FileSystemUtils;
+import org.springframework.util.ObjectUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import jakarta.annotation.PostConstruct;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Random;
+
+/**
+ * 淇濆瓨鏂囦欢宸ュ叿
+ */
+@Slf4j
+@Component
+public class FileSaveUtil {
+
+ // 鍙杫ml涓殑璺緞 + /
+ private static String FILE_PATH;
+
+ private static String WORD_URL_PATH;
+
+ private static String[] ALLOWED;
+
+ @Value("${file.path}")
+ private String file;
+
+ @Value("${wordUrl}")
+ private String wordUrl;
+
+ @Value("${file.allowed}")
+ private String[] allowed;
+
+ @PostConstruct
+ public void getFile() {
+ FILE_PATH = this.file;
+ }
+
+ @PostConstruct
+ public void getWordUrl(){
+ WORD_URL_PATH = this.wordUrl;
+ }
+
+ @PostConstruct
+ public void getAllowed(){
+ ALLOWED = this.allowed;
+ }
+
+ /**
+ * 瀛樺偍鏂囦欢涓诲嚱鏁�
+ * @param file 鏂囦欢浜岃繘鍒舵祦
+ * @return 杩斿洖鏂囦欢鍚嶇О鐢ㄤ簬瀛樺偍鏁版嵁搴�
+ */
+ public static String StoreFile(MultipartFile file) {
+ String originalFilename = file.getOriginalFilename();
+ // 鐢熸垚闅忔満鍚嶇О锛氭椂闂確闅忔満6浣嶆暟瀛�
+ String FileName = System.currentTimeMillis() + "_" + getNumber(6);
+ String suffix = null;
+ if (originalFilename != null) {
+ suffix = originalFilename.substring(originalFilename.lastIndexOf("."));
+ // 濡傛灉鍚庣紑鍚嶄笉閫氳繃鎶涘嚭寮傚父
+ if (!isFileAllowed(suffix)){
+ throw new RuntimeException(suffix);
+ }
+ }
+ // 鍚嶇О鎷兼帴
+ String fileName = FileName + suffix;
+ // 杩涜瀛樺偍
+ try {
+ storeFileWithFileName(file.getBytes(), fileName);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ return fileName;
+ }
+
+ public static Boolean DeleteFile(String fileName) {
+ if (ObjectUtils.isEmpty(fileName)) {
+ return false;
+ }
+ return FileSystemUtils.deleteRecursively(new File(FILE_PATH + "/" + fileName));
+ }
+ /**
+ * 瀛樺偍鏂囦欢鍑芥暟
+ * @param content 鏂囦欢浜岃繘鍒舵祦
+ * @param fileName 鏂囦欢鍚嶇О
+ */
+ private static void storeFileWithFileName(byte[] content, String fileName) {
+ // 瀛樺偍璺緞
+ String path = FILE_PATH + File.separatorChar;
+ // 鐩綍涓嶅瓨鍦ㄥ垯鍒涘缓
+ File file = new File(path);
+ if (!file.exists()) {
+ file.mkdirs();
+ }
+ // 寮�濮嬪瓨鍌�
+ try (FileOutputStream os = new FileOutputStream(path + fileName);
+ ByteArrayInputStream is = new ByteArrayInputStream(content)) {
+ is.transferTo(os);
+ } catch (IOException e) {
+ throw new RuntimeException("鏂囦欢瀛樺偍鏍煎紡寮傚父");
+ }
+ }
+
+ /**
+ * 鍒ゆ柇鏂囦欢鏄惁琚厑璁镐笂浼�
+ *
+ * @param fileName 鏂囦欢鍚�
+ * @return 鍏佽true, 鍚﹀垯false
+ */
+ private static boolean isFileAllowed(String fileName) {
+ // 鑾峰彇鍚庣紑鍚�
+ String suffixName = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
+ for (String allow : ALLOWED) {
+ if (allow.equals(suffixName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 淇濆瓨鏂囦欢鍒皐ord鏂囦欢澶归噷
+ * @param file
+ * @return
+ */
+ public static String uploadWordFile(MultipartFile file) {
+ String urlString;
+ String pathName;
+ String path;
+ try {
+ String contentType = file.getContentType();
+ if (contentType != null && contentType.startsWith("image/")) {
+ // 鏄浘鐗�
+ path = FILE_PATH;
+ } else {
+ // 鏄枃浠�
+ path = WORD_URL_PATH;
+ }
+ File realpath = new File(path);
+ if (!realpath.exists()) {
+ realpath.mkdirs();
+ }
+ pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "-" + file.getOriginalFilename();
+ urlString = realpath + "/" + pathName;
+ file.transferTo(new File(urlString));
+ return pathName;
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+
+
+ /**
+ * 鑾峰彇闅忔満鏁板瓧
+ * @param n 浣嶆暟
+ * @return 杩斿洖闅忔満鍊�
+ */
+ public static String getNumber(int n) {
+ char[] chars = "1234567890".toCharArray();
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < n; i++) {
+ char c = chars[new Random().nextInt(chars.length)];
+ sb.append(c);
+ }
+ return sb.toString();
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/GZipUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/GZipUtil.java
new file mode 100644
index 0000000..20a9da5
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/GZipUtil.java
@@ -0,0 +1,61 @@
+package com.ruoyi.common.utils;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * 鍘嬬缉瑙e帇宸ュ叿绫�
+ */
+public class GZipUtil {
+
+
+ /**
+ * 鍘嬬缉
+ * @param str
+ * @return
+ */
+ public static String compress(String str) {
+ if (str == null || str.trim().length() == 0) {
+ return null;
+ }
+
+ try (ByteArrayOutputStream out = new ByteArrayOutputStream();
+ GZIPOutputStream gzip = new GZIPOutputStream(out)) {
+ gzip.write(str.getBytes("utf-8"));
+ gzip.close();
+
+ return new String(out.toByteArray(), "iso-8859-1");
+ } catch (Exception e) {
+ throw new RuntimeException("鏁版嵁鍘嬬缉澶辫触");
+ }
+
+ }
+
+ /**
+ * 瑙e帇
+ * @param str
+ * @return
+ */
+ public static String uncompress(String str) {
+ if (str == null || str.trim().length() == 0) {
+ return null;
+ }
+
+ try (ByteArrayOutputStream out = new ByteArrayOutputStream();
+ ByteArrayInputStream in = new ByteArrayInputStream(str.getBytes("iso-8859-1"))){
+ GZIPInputStream ungzip = new GZIPInputStream(in);
+ byte[] buffer = new byte[1024];
+ int n;
+ while ((n = ungzip.read(buffer)) >= 0) {
+ out.write(buffer, 0, n);
+ }
+
+ return new String(out.toByteArray(), "utf-8");
+ } catch (Exception e) {
+ throw new RuntimeException("鏁版嵁瑙e帇澶辫触");
+ }
+
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java
new file mode 100644
index 0000000..a40ea33
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java
@@ -0,0 +1,33 @@
+package com.ruoyi.common.utils;
+
+import cn.hutool.core.date.DateUtil;
+
+import java.time.LocalDateTime;
+
+/**
+ * @Author zhuo
+ * @Date 2024/9/28
+ */
+public class LimsDateUtil {
+
+
+ /**
+ * 鏃ユ湡鏍煎紡鍒�26鍙锋湀浠藉姞涓�
+ * @param localDateTime
+ * @return
+ */
+ public static String resetDate(LocalDateTime localDateTime) {
+ // 鑾峰彇褰撳墠鏃�
+ int dayOfMonth = localDateTime.getDayOfMonth();
+
+ // 鍒ゆ柇鏄惁鏄�26鏃ュ強浠ヤ笂
+ if (dayOfMonth >= 26) {
+ // 鏈堜唤鍔�1
+ localDateTime = localDateTime.plusMonths(1);
+ }
+
+ // 鏍煎紡鍖栦负"yyMM"鏍煎紡
+ String formattedDate = DateUtil.format(localDateTime, "yyMM");
+ return formattedDate;
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/Md5Util.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/Md5Util.java
new file mode 100644
index 0000000..a56ecf1
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/Md5Util.java
@@ -0,0 +1,68 @@
+package com.ruoyi.common.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+/**
+ * @author cxf
+ */
+public class Md5Util {
+ /**
+ * 榛樿鐨勫瘑鐮佸瓧绗︿覆缁勫悎锛岀敤鏉ュ皢瀛楄妭杞崲鎴� 16 杩涘埗琛ㄧず鐨勫瓧绗�
+ */
+ protected static char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+ protected static MessageDigest messagedigest = null;
+
+ static {
+ try {
+ messagedigest = MessageDigest.getInstance("MD5");
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static String getFileMd5String(File file) throws IOException {
+ InputStream fis;
+ fis = new FileInputStream(file);
+ byte[] buffer = new byte[1024];
+ int numRead = 0;
+ while ((numRead = fis.read(buffer)) > 0) {
+ messagedigest.update(buffer, 0, numRead);
+ }
+ fis.close();
+ return bufferToHex(messagedigest.digest());
+ }
+
+ public static String getStringMd5(String str) {
+ byte[] buffer = str.getBytes();
+ messagedigest.update(buffer);
+ return bufferToHex(messagedigest.digest());
+ }
+
+ public static String bufferToHex(byte bytes[]) {
+ return bufferToHex(bytes, 0, bytes.length);
+ }
+
+ private static String bufferToHex(byte bytes[], int m, int n) {
+ StringBuffer stringbuffer = new StringBuffer(2 * n);
+ int k = m + n;
+ for (int l = m; l < k; l++) {
+ appendHexPair(bytes[l], stringbuffer);
+ }
+ return stringbuffer.toString();
+ }
+
+ private static void appendHexPair(byte bt, StringBuffer stringbuffer) {
+ // 鍙栧瓧鑺備腑楂� 4 浣嶇殑鏁板瓧杞崲
+ char c0 = hexDigits[(bt & 0xf0) >> 4];
+ // 涓洪�昏緫鍙崇Щ锛屽皢绗﹀彿浣嶄竴璧峰彸绉�,姝ゅ鏈彂鐜颁袱绉嶇鍙锋湁浣曚笉鍚�
+ // 鍙栧瓧鑺備腑浣� 4 浣嶇殑鏁板瓧杞崲
+ char c1 = hexDigits[bt & 0xf];
+ stringbuffer.append(c0);
+ stringbuffer.append(c1);
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/MyUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/MyUtil.java
new file mode 100644
index 0000000..bbf9da3
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/MyUtil.java
@@ -0,0 +1,17 @@
+package com.ruoyi.common.utils;
+
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Random;
+
+@Component
+public class MyUtil<T> {
+
+
+
+
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SignatureImageUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SignatureImageUtil.java
new file mode 100644
index 0000000..15365c4
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SignatureImageUtil.java
@@ -0,0 +1,66 @@
+package com.ruoyi.common.utils;
+
+import org.springframework.core.io.ClassPathResource;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.font.FontRenderContext;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.io.*;
+
+/**
+ * @Author zhuo
+ * @Date 2025/5/7
+ */
+public class SignatureImageUtil {
+
+ /**
+ * 鏍规嵁涓枃瀵煎嚭绛惧悕鍥剧墖
+ * @param text
+ * @return
+ * @throws IOException
+ * @throws FontFormatException
+ */
+ public static InputStream saveImageToFile(String text){
+ // 鑾峰彇瀛椾綋搴�
+ Font font = null;
+ try (InputStream is = new ClassPathResource("/ttf/signature.ttf").getInputStream()) {
+ font = Font.createFont(Font.TRUETYPE_FONT, is).deriveFont(50f);
+ } catch (FontFormatException | IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ int width = 100; // 鍥剧墖鐨勫搴�
+ int height = 50; // 鍥剧墖鐨勯珮搴�
+
+ BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = image.createGraphics();
+
+ g2d.setFont(font);
+
+ // 璁剧疆鏂囧瓧棰滆壊涓洪粦鑹�
+ g2d.setColor(Color.black);
+
+ // 璁剧疆鏂囧瓧鍦ㄥ浘鐗囦腑鐨勪綅缃�
+ FontRenderContext context = g2d.getFontRenderContext();
+ Rectangle2D bounds = font.getStringBounds(text, context);
+ double x = (width - bounds.getWidth()) / 2;
+ double y = (height - bounds.getHeight()) / 2;
+ double ascent = -bounds.getY();
+ double baseY = y + ascent;
+ g2d.drawString(text, (int) x, (int) baseY);
+ g2d.dispose();
+
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+
+ try {
+ ImageIO.write(image, "png", os);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ return new ByteArrayInputStream(os.toByteArray());
+ }
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/WxCpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/WxCpUtils.java
new file mode 100644
index 0000000..9651311
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/WxCpUtils.java
@@ -0,0 +1,165 @@
+package com.ruoyi.common.utils;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.json.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
+import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
+import me.chanjar.weixin.cp.bean.message.WxCpMessage;
+import me.chanjar.weixin.cp.bean.message.WxCpMessageSendResult;
+import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
+
+import java.io.*;
+import java.net.MalformedURLException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Base64;
+import java.util.List;
+
+/**
+ * @Author: chenxiangfeng
+ * @Date: 2021/7/20 10:35
+ */
+public class WxCpUtils {
+
+ public static final String CORP_ID = "wwa423654b975441ac";
+ public static final String CORP_SECRET = "snXq8qwA5tGu0YN1PlSDQqr6u9x3A0c_jQDmt8CN8Vs";
+ public static final Integer AGENT_ID = 1000515;
+
+ /**
+ * @param user 渚嬶細ZT-033268|ZT-028629锛屽涓腑闂寸敤|闅斿紑
+ * @param content 浼犳枃鏈唴瀹�
+ * @param imageFile 鍥剧墖
+ * @throws Exception
+ */
+ public static void inform(String user, String content, File imageFile) throws Exception {
+ WxCpDefaultConfigImpl config = new WxCpDefaultConfigImpl();
+ // 娉ㄥ唽鐨勪紒涓氫俊鎭�
+ config.setCorpId(CORP_ID);
+ config.setCorpSecret(CORP_SECRET);
+
+ WxCpServiceImpl wxCpService = new WxCpServiceImpl();
+ wxCpService.setWxCpConfigStorage(config);
+
+ WxCpMessage message;
+ WxCpMessageSendResult result;
+ // 鍙戦�佹枃鏈�
+ if (StringUtils.isNotBlank(content)) {
+ message = WxCpMessage.TEXT()
+ .content(content)
+ // 鐢ㄦ埛id
+ .toUser(user)
+ // 搴旂敤id
+ .agentId(AGENT_ID)
+ .build();
+ result = wxCpService.getMessageService().send(message);
+ }
+ // 鍙戦�佹枃浠�
+ if (imageFile != null) {
+ // 鑾峰彇鏂囦欢id
+ WxMediaUploadResult imgResult = wxCpService.getMediaService().upload("file", imageFile);
+ message = WxCpMessage.IMAGE()
+ .mediaId(imgResult.getMediaId())
+ // 鐢ㄦ埛id
+ .toUser(user)
+ // 搴旂敤id
+ .agentId(AGENT_ID)
+ .build();
+ result = wxCpService.getMessageService().send(message);
+ }
+ }
+
+ /**
+ * 鎺ㄩ�佺兢娑堟伅
+ *
+ * @param webHookList 浼佷笟寰俊鏈哄櫒浜哄湴鍧�
+ * @param file 鍥剧墖
+ * @throws Exception
+ */
+ public static void informWebHook(List<String> webHookList, File file) throws Exception {
+ JSONObject json = new JSONObject();
+ json.putOpt("msgtype", "image");
+ JSONObject image = new JSONObject();
+ image.putOpt("base64", getBase64(file));
+ image.putOpt("md5", getMd5(file));
+ json.putOpt("image", image);
+
+ webHookList.stream().forEach(webHook -> {
+ String result = HttpRequest.post(webHook)
+ .header("Content-Type", "application/json")
+ .body(json.toString())
+ .execute().body();
+ });
+ }
+
+ /**
+ * 鎺ㄩ�佺兢娑堟伅
+ *
+ * @param webHook 浼佷笟寰俊鏈哄櫒浜哄湴鍧�
+ * @param content 鏁版嵁
+ * @throws Exception
+ */
+ public static String informWebHook(String webHook, String content) {
+ return informWebHook(webHook, content,"text");
+ }
+
+ /**
+ * 鎺ㄩ�佺兢娑堟伅
+ *
+ * @param webHook 浼佷笟寰俊鏈哄櫒浜哄湴鍧�
+ * @param content 鏁版嵁
+ * @param msgType 娑堟伅绫诲瀷
+ * @throws Exception
+ */
+ public static String informWebHook(String webHook, String content,String msgType) {
+ JSONObject jsonObject = new JSONObject()
+ .accumulate("msgtype", msgType)
+ .accumulate(msgType, new JSONObject()
+ .accumulate("content", content));
+ return HttpRequest.post(webHook).header("Content-Type", "application/json").body(jsonObject.toString()).execute().body();
+ }
+
+ public static String getMd5(File file) {
+ String name = "";
+ try {
+ InputStream inputStream = new BufferedInputStream(new FileInputStream(file));
+ byte[] bytes = new byte[1024];
+ int len = 0;
+ MessageDigest messagedigest = MessageDigest.getInstance("MD5");
+ while ((len = inputStream.read(bytes)) > 0) {
+ messagedigest.update(bytes, 0, len);
+ }
+ name = Md5Util.bufferToHex(messagedigest.digest());
+ inputStream.close();
+ } catch (MalformedURLException e) {
+ } catch (IOException e) {
+ } catch (NoSuchAlgorithmException e) {
+ }
+ return name;
+
+ }
+
+ public static String getBase64(File file) {
+ FileInputStream inputStream = null;
+ String base64Str = "";
+ try {
+ inputStream = new FileInputStream(file);
+ Base64.Encoder encoder = Base64.getEncoder();
+ int available = inputStream.available();
+ byte[] bytes = new byte[available];
+ inputStream.read(bytes);
+ base64Str = encoder.encodeToString(bytes);
+ inputStream.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return base64Str;
+ }
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/api/IfsApiUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/api/IfsApiUtils.java
new file mode 100644
index 0000000..faa8155
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/api/IfsApiUtils.java
@@ -0,0 +1,161 @@
+package com.ruoyi.common.utils.api;
+
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ruoyi.common.core.domain.Result;
+import com.ruoyi.common.config.IfsProperties;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zhuo
+ * @Date 2024/9/29
+ */
+@Slf4j
+@AllArgsConstructor
+@Component
+public class IfsApiUtils {
+
+ private IfsProperties ifsProperties;
+
+
+ /**
+ * 鏌ヨ閲囪喘璁㈠崟鏈楠�
+ */
+ public List<Map<String, Object>> getInventory(String inAttr) {
+ if (isDisabled()) {
+ return java.util.Collections.emptyList();
+ }
+ String procedureName = "QUERY_POL_RECEIPT_STD";
+ JSONObject stockMap = getJsonObject(procedureName, inAttr);
+ String body = "";
+ ObjectMapper objectMapper = new ObjectMapper();
+ try {
+ Map map = objectMapper.readValue(body, Map.class);
+ List<Map<String, Object>> maps = objectMapper.readValue(JSONUtil.toJsonStr(map.get("LIST_INFO")), new TypeReference<List<Map<String, Object>>>() {
+ });
+ log.info("鑾峰彇閲囪喘璁㈠崟-->>" + maps);
+ return maps;
+ } catch (JsonProcessingException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+
+
+
+ /**
+ * 鐧昏閲囪喘妫�楠岀粨鏋淪TD
+ */
+ public Result getProcurementResults(String inAttr) {
+ return getResult("REGIST_INSPECTION_RESULTS_STD", inAttr, ifsProperties.getCustorder(), "鐧昏閲囪喘妫�楠岀粨鏋�-->");
+ }
+
+
+ /**
+ * 鍘熸潗鏂欐楠�-妫�楠屽悗绉诲簱
+ *
+ * @param inAttr
+ * @return
+ */
+ public Result moveReceipt(String inAttr) {
+ return getResult("MOVE_RECEIPT_STD", inAttr, ifsProperties.getCustorder(), "妫�楠屽悗绉诲簱-->");
+ }
+
+
+ /**
+ * 鍘熸潗鏂欐楠�-閲囪喘鎺ユ敹鏇存敼鎵瑰彿
+ *
+ * @param inAttr
+ * @return
+ */
+ public Result updateMoveReceiptLot(String inAttr) {
+ return getResult("MODIFY_PURCH_RECEIPT_LOT_STD", inAttr, ifsProperties.getCustorder(), "淇敼閲囪喘璁㈠崟鎵规鍙�-->");
+ }
+
+ /**
+ * 搴撳瓨鐗╂枡鎵规灞炴�ф柊澧炰慨鏀规帴鍙�
+ *
+ * @param inAttr
+ * @return
+ */
+ public Result importPartLotAttr(String inAttr) {
+ return getResult("IMPORT_PART_LOT_ATTR_STD", inAttr, ifsProperties.getCustorder(), "搴撳瓨鐗╂枡鎵规灞炴�ф柊澧炰慨鏀规帴鍙�-->");
+ }
+
+ /**
+ * 鏌ヨ搴撳瓨鏁版嵁
+ *
+ * @param inAttr
+ * @return
+ */
+ public Result getIfsStock(String inAttr) {
+ if (isDisabled()) {
+ return Result.success(java.util.Collections.singletonMap("LIST_INFO", java.util.Collections.emptyList()));
+ }
+ return getResult("QUERY_INVENTORY_INFO_STD", inAttr, ifsProperties.getCustorderPort(), "鏌ヨ搴撳瓨淇℃伅-->");
+ }
+
+
+ /**
+ * 閫氱敤鎺ュ彛
+ * @param procedureName 鏂规硶鍚�
+ * @param inAttr 浼犲弬
+ * @param url 鍦板潃
+ * @param image 娑堟伅
+ * @return
+ */
+ private Result<?> getResult(String procedureName, String inAttr, String url, String image) {
+ if (isDisabled()) {
+ return Result.success();
+ }
+ JSONObject stockMap = new JSONObject();
+ stockMap.put("procedureName", procedureName);
+ stockMap.put("contract", ifsProperties.getContract());
+ stockMap.put("contractKey", ifsProperties.getContractKeyPost());
+ stockMap.put("userId", "lims_user");
+ stockMap.put("inAttr", inAttr);
+ String body = "";
+ log.info(image + body);
+ ObjectMapper objectMapper = new ObjectMapper();
+ try {
+ Map map = objectMapper.readValue(body, Map.class);
+ String successFlag = map.get("SuccessFlag").toString();
+ if (Integer.valueOf(successFlag) == 1) {
+ return Result.success(map);
+ } else {
+ return Result.fail(map.get("ErrorMsg").toString());
+ }
+ } catch (JsonProcessingException e) {
+ e.printStackTrace();
+ return Result.fail(e.getMessage());
+ }
+ }
+
+ /**
+ * 鑾峰彇娣诲姞璇锋眰淇℃伅
+ * @param procedureName 缁撴瀯鍚嶇О
+ * @param inAttr 璇锋眰鍙傛暟
+ * @return
+ */
+ private JSONObject getJsonObject(String procedureName, String inAttr) {
+ JSONObject stockMap = new JSONObject();
+ stockMap.put("procedureName", procedureName);
+ stockMap.put("contract", ifsProperties.getContract());
+ stockMap.put("contractKey", ifsProperties.getContractKeyPost());
+ stockMap.put("userId", "lims_user");
+ stockMap.put("inAttr", inAttr);
+ return stockMap;
+ }
+
+ private boolean isDisabled() {
+ return true;
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/ParameterEscaperUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/ParameterEscaperUtil.java
new file mode 100644
index 0000000..1318508
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/ParameterEscaperUtil.java
@@ -0,0 +1,92 @@
+package com.ruoyi.common.utils.http;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 璇锋眰鍙傛暟鐗规畩瀛楃杞箟宸ュ叿绫�
+ * 鐢ㄤ簬澶勭悊HTTP璇锋眰鍙傛暟涓殑鐗规畩瀛楃锛岄槻姝SS鏀诲嚮鍜屽弬鏁拌В鏋愰敊璇�
+ */
+public class ParameterEscaperUtil {
+ // 鐗规畩瀛楃杞箟鏄犲皠琛�
+ private static final Map<Character, String> ESCAPE_MAP;
+ // 杞箟瀛楃鍙嶈浆鏄犲皠琛�
+ private static final Map<String, Character> UNESCAPE_MAP;
+
+ static {
+ // 鍒濆鍖栬浆涔夋槧灏�
+ ESCAPE_MAP = new HashMap<>();
+ ESCAPE_MAP.put('&', "&");
+ ESCAPE_MAP.put('<', "<");
+ ESCAPE_MAP.put('>', ">");
+ ESCAPE_MAP.put('"', """);
+ ESCAPE_MAP.put('\'', "'");
+ ESCAPE_MAP.put('/', "/");
+ ESCAPE_MAP.put('\\', "\");
+ ESCAPE_MAP.put(' ', "%20");
+ ESCAPE_MAP.put('?', "%3F");
+ ESCAPE_MAP.put('=', "%3D");
+ ESCAPE_MAP.put('+', "%2B");
+ ESCAPE_MAP.put('%', "%25");
+ ESCAPE_MAP.put('#', "%23");
+ ESCAPE_MAP.put(':', "%3A");
+ ESCAPE_MAP.put(';', "%3B");
+
+ // 鍒濆鍖栧弽杞箟鏄犲皠
+ UNESCAPE_MAP = new HashMap<>();
+ for (Map.Entry<Character, String> entry : ESCAPE_MAP.entrySet()) {
+ UNESCAPE_MAP.put(entry.getValue(), entry.getKey());
+ }
+ }
+
+ /**
+ * 杞箟璇锋眰鍙傛暟涓殑鐗规畩瀛楃
+ * @param input 鍘熷杈撳叆瀛楃涓�
+ * @return 杞箟鍚庣殑瀛楃涓�
+ */
+ public static String escape(String input) {
+ if (input == null || input.isEmpty()) {
+ return input;
+ }
+
+ StringBuilder sb = new StringBuilder();
+ for (char c : input.toCharArray()) {
+ // 濡傛灉鏄渶瑕佽浆涔夌殑瀛楃锛屽垯浣跨敤杞箟鍚庣殑瀛楃涓诧紝鍚﹀垯鐩存帴娣诲姞
+ String escaped = ESCAPE_MAP.get(c);
+ sb.append(escaped != null ? escaped : c);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * 鍙嶈浆涔夎姹傚弬鏁颁腑鐨勭壒娈婂瓧绗�
+ * @param input 杞箟鍚庣殑瀛楃涓�
+ * @return 鍘熷瀛楃涓�
+ */
+ public static String unescape(String input) {
+ if (input == null || input.isEmpty()) {
+ return input;
+ }
+
+ StringBuilder sb = new StringBuilder();
+ int i = 0;
+ while (i < input.length()) {
+ boolean found = false;
+ // 妫�鏌ユ槸鍚︽槸杞箟搴忓垪
+ for (String escapeSeq : UNESCAPE_MAP.keySet()) {
+ if (input.startsWith(escapeSeq, i)) {
+ sb.append(UNESCAPE_MAP.get(escapeSeq));
+ i += escapeSeq.length();
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ sb.append(input.charAt(i));
+ i++;
+ }
+ }
+ return sb.toString();
+ }
+}
+
\ No newline at end of file
diff --git a/ruoyi-common/src/main/resources/ttf/signature.ttf b/ruoyi-common/src/main/resources/ttf/signature.ttf
new file mode 100644
index 0000000..dd7cd59
--- /dev/null
+++ b/ruoyi-common/src/main/resources/ttf/signature.ttf
Binary files differ
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java
new file mode 100644
index 0000000..835fdd0
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java
@@ -0,0 +1,21 @@
+package com.ruoyi.system.domain.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @Author zhuo
+ * @Date 2025/2/20
+ */
+@Data
+public class SysRoleVo {
+
+ @Schema(description = "鏉冮檺鏍囪瘑")
+ private String perms;
+
+ @Schema(description = "鑿滃崟鍚嶇О")
+ private String menuName;
+
+ @Schema(description = "鏄惁浠呯湅鎴�, 0: 鍚�, 1:鏄�")
+ private Integer isRersonal;
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserVo.java
new file mode 100644
index 0000000..c22abdc
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/UserVo.java
@@ -0,0 +1,12 @@
+package com.ruoyi.system.domain.vo;
+
+import com.ruoyi.common.core.domain.entity.User;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+public class UserVo extends User {
+
+ @Schema(description = "閮ㄩ棬id")
+ private Long departId;
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CustomMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CustomMapper.java
new file mode 100644
index 0000000..71798e8
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CustomMapper.java
@@ -0,0 +1,18 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ruoyi.common.core.domain.entity.Custom;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+public interface CustomMapper extends BaseMapper<Custom> {
+
+ IPage<Custom> selectCustomPageList(IPage<Custom> page, @Param("ew") QueryWrapper<Custom> ew);
+
+ int delCustomById(Integer id);
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DepartmentLimsMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DepartmentLimsMapper.java
new file mode 100644
index 0000000..3e2a51e
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DepartmentLimsMapper.java
@@ -0,0 +1,27 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.common.core.domain.entity.DepartmentDto;
+import com.ruoyi.common.core.domain.entity.DepartmentLims;
+
+import java.util.List;
+
+/**
+* @author z1292
+* @description 閽堝琛ㄣ�恉epartment_lims(閮ㄩ棬鏄庣粏)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-05-22 14:08:17
+* @Entity com.yuanchu.mom.pojo.DepartmentLims
+*/
+public interface DepartmentLimsMapper extends BaseMapper<DepartmentLims> {
+
+ //鑾峰彇閮ㄩ棬鏍�
+ List<DepartmentDto> selectDepartment();
+
+ //鏍规嵁閮ㄩ棬id,鏌ヨ浠栫殑鎵�鏈夊瓙绫籭d
+ List<Integer> selectSonById(Integer id);
+
+}
+
+
+
+
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/InformationNotificationMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/InformationNotificationMapper.java
new file mode 100644
index 0000000..06a3ea9
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/InformationNotificationMapper.java
@@ -0,0 +1,31 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.core.domain.entity.InformationNotification;
+import com.ruoyi.common.core.domain.entity.InformationNotificationDto;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 娑堟伅閫氱煡 Mapper 鎺ュ彛
+ * </p>
+ *
+ * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
+ * @since 2024-04-23 02:14:30
+ */
+public interface InformationNotificationMapper extends BaseMapper<InformationNotification> {
+
+ IPage<InformationNotificationDto> getPage(Page page, String messageType, Integer userId);
+
+ /**
+ * 娑堟伅閫氱煡-婊氬姩鏌ヨ
+ *
+ * @param userId
+ * @return
+ */
+ IPage<InformationNotificationDto> msgRoll(Page page,@Param("userId") Integer userId);
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/CustomService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/CustomService.java
new file mode 100644
index 0000000..6ee01f2
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/CustomService.java
@@ -0,0 +1,28 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.entity.Custom;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恥ser(鐢ㄦ埛id)銆戠殑鏁版嵁搴撴搷浣淪ervice
+* @createDate 2024骞�3鏈�7鏃�09:21:59
+*/
+public interface CustomService extends IService<Custom> {
+
+ IPage<Custom> selectCustomPageList(IPage<Custom> page, Custom custom);
+
+ int delCustomById(Long id);
+
+ int addCustom(Custom custom);
+
+ int upCustom(Custom custom);
+
+ List<Custom> selectCustomEnum();
+
+ Custom getCustomId(String company);
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/InformationNotificationService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/InformationNotificationService.java
new file mode 100644
index 0000000..5bd76f2
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/InformationNotificationService.java
@@ -0,0 +1,40 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.entity.InformationNotification;
+import com.ruoyi.common.core.domain.entity.InformationNotificationDto;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 娑堟伅閫氱煡 鏈嶅姟绫�
+ * </p>
+ *
+ * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
+ * @since 2024-04-23 02:14:30
+ */
+public interface InformationNotificationService extends IService<InformationNotification> {
+
+ IPage<InformationNotificationDto> getPage(Page page, String messageType);
+
+ void markAllInformationReadOrDeleteAllReadMessages(Boolean isMarkAllInformationRead);
+
+ Boolean checkForUnreadData();
+
+ void triggerModificationStatusToRead(Integer id);
+
+ int addInformationNotification(InformationNotification informationNotification);
+
+ Map<String, Object> getNumberFourTypesMessagesHomePage();
+
+ /**
+ * 娑堟伅閫氱煡-婊氬姩鏌ヨ
+ *
+ * @return
+ */
+ IPage<InformationNotificationDto> msgRoll(Page page);
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomServiceImpl.java
new file mode 100644
index 0000000..44ee431
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomServiceImpl.java
@@ -0,0 +1,62 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.domain.entity.Custom;
+import com.ruoyi.common.utils.QueryWrappers;
+import com.ruoyi.system.mapper.CustomMapper;
+import com.ruoyi.system.service.CustomService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恜ower(鐢ㄦ埛id)銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
+* @createDate 2023-12-27 02:37:38
+*/
+@Service
+@AllArgsConstructor
+public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom>
+ implements CustomService {
+
+ private CustomMapper customMapper;
+
+ @Override
+ public IPage<Custom> selectCustomPageList(IPage<Custom> page, Custom custom) {
+ return customMapper.selectCustomPageList(page, QueryWrappers.queryWrappers(custom));
+ }
+
+ @Override
+ public int delCustomById(Long id) {
+ return customMapper.deleteById(id);
+ }
+
+ @Override
+ public int addCustom(Custom custom) {
+ return customMapper.insert(custom);
+ }
+
+ @Override
+ public int upCustom(Custom custom) {
+ return customMapper.updateById(custom);
+ }
+
+ @Override
+ public List<Custom> selectCustomEnum() {
+ return customMapper.selectList(Wrappers.<Custom>lambdaQuery().select(Custom::getId,Custom::getCompany));
+ }
+
+ @Override
+ public Custom getCustomId(String company) {
+ return customMapper.selectOne(Wrappers.<Custom>lambdaQuery().eq(Custom::getCompany, company).last("limit 1"));
+ }
+}
+
+
+
+
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InformationNotificationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InformationNotificationServiceImpl.java
new file mode 100644
index 0000000..c000c6f
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InformationNotificationServiceImpl.java
@@ -0,0 +1,109 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.domain.entity.InformationNotification;
+import com.ruoyi.common.core.domain.entity.InformationNotificationDto;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.mapper.InformationNotificationMapper;
+import com.ruoyi.system.service.InformationNotificationService;
+import org.springframework.stereotype.Service;
+
+import jakarta.annotation.Resource;
+import java.time.LocalDate;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 娑堟伅閫氱煡 鏈嶅姟瀹炵幇绫�
+ * </p>
+ *
+ * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
+ * @since 2024-04-23 02:14:30
+ */
+@Service
+public class InformationNotificationServiceImpl extends ServiceImpl<InformationNotificationMapper, InformationNotification> implements InformationNotificationService {
+
+ @Override
+ public IPage<InformationNotificationDto> getPage(Page page, String messageType) {
+ return baseMapper.getPage(page, messageType, SecurityUtils.getUserId().intValue());
+ }
+
+ @Override
+ public void markAllInformationReadOrDeleteAllReadMessages(Boolean isMarkAllInformationRead) {
+ if (isMarkAllInformationRead) {
+ baseMapper.update(new InformationNotification(), Wrappers.<InformationNotification>lambdaUpdate()
+ .set(InformationNotification::getViewStatus, true)
+ .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId().intValue()));
+ } else {
+ baseMapper.delete(Wrappers.<InformationNotification>lambdaUpdate()
+ .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId().intValue())
+ .eq(InformationNotification::getViewStatus, true));
+ }
+ }
+
+ @Override
+ public Boolean checkForUnreadData() {
+ Map<String, Integer> map1 = null;
+ try {
+ List<InformationNotification> informationNotifications = baseMapper.selectList(
+ Wrappers.<InformationNotification>lambdaQuery()
+ .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId().intValue())
+ .eq(InformationNotification::getViewStatus, false)
+ .last("limit 1"));
+ return !informationNotifications.isEmpty();
+ } catch (Exception e) {
+ }
+ return false;
+ }
+
+ @Override
+ public void triggerModificationStatusToRead(Integer id) {
+ baseMapper.update(new InformationNotification(), Wrappers.<InformationNotification>lambdaUpdate()
+ .eq(InformationNotification::getId, id)
+ .set(InformationNotification::getViewStatus, true));
+ }
+
+ @Override
+ public int addInformationNotification(InformationNotification informationNotification) {
+ informationNotification.setViewStatus(false);
+ return baseMapper.insert(informationNotification);
+ }
+
+ @Override
+ public Map<String, Object> getNumberFourTypesMessagesHomePage() {
+ Map<String, Object> map = new HashMap<>();
+ int userId = SecurityUtils.getUserId().intValue();
+ Long totalNumberOfMessages = baseMapper.selectCount(Wrappers.<InformationNotification>lambdaQuery()
+ .eq(InformationNotification::getConsigneeId, userId));
+ Long totalNumberOfReadMessages = baseMapper.selectCount(Wrappers.<InformationNotification>lambdaQuery()
+ .eq(InformationNotification::getConsigneeId, userId)
+ .eq(InformationNotification::getViewStatus, true));
+ LocalDate today = LocalDate.now();
+ LocalDate sevenDaysAgo = today.minusDays(7);
+ Long totalNumberOfMessagesInThePastSevenDays = baseMapper.selectCount(Wrappers.<InformationNotification>lambdaQuery()
+ .eq(InformationNotification::getConsigneeId, userId)
+ .between(InformationNotification::getCreateTime, today, sevenDaysAgo));
+ long remainingToDo = totalNumberOfMessages - totalNumberOfReadMessages;
+ map.put("totalNumberOfMessages", totalNumberOfMessages);
+ map.put("remainingToDo", remainingToDo);
+ map.put("totalNumberOfReadMessages", totalNumberOfReadMessages);
+ map.put("totalNumberOfMessagesInThePastSevenDays", totalNumberOfMessagesInThePastSevenDays);
+ return map;
+ }
+
+ /**
+ * 娑堟伅閫氱煡-婊氬姩鏌ヨ
+ *
+ * @return
+ */
+ @Override
+ public IPage<InformationNotificationDto> msgRoll(Page page) {
+ return baseMapper.msgRoll(page,SecurityUtils.getUserId().intValue());
+ }
+}
diff --git a/ruoyi-system/src/main/resources/mapper/system/CustomMapper.xml b/ruoyi-system/src/main/resources/mapper/system/CustomMapper.xml
new file mode 100644
index 0000000..b4f43ed
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/CustomMapper.xml
@@ -0,0 +1,14 @@
+<?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.system.mapper.CustomMapper">
+ <update id="delCustomById">
+ update user set is_custom = 0
+ where id = #{id}
+ </update>
+ <select id="selectCustomPageList" resultType="com.ruoyi.common.core.domain.entity.Custom">
+ select * from custom
+ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
+ ${ew.customSqlSegment}
+ </if>
+ </select>
+</mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/DepartmentLimsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/DepartmentLimsMapper.xml
new file mode 100644
index 0000000..48c7d39
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/DepartmentLimsMapper.xml
@@ -0,0 +1,25 @@
+<?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.system.mapper.DepartmentLimsMapper">
+
+
+ <select id="selectDepartment" resultType="com.ruoyi.common.core.domain.entity.DepartmentDto">
+ SELECT id, name, father_id
+ FROM department_lims
+ </select>
+
+ <select id="selectSonById" resultType="java.lang.Integer">
+ SELECT au.id
+ FROM (SELECT * FROM department_lims WHERE father_id IS NOT NULL) au,
+ (SELECT @father_id := #{id}) pd
+ WHERE FIND_IN_SET(father_id, @father_id) > 0
+ AND @father_id := concat(@father_id, ',', id)
+ UNION
+ SELECT id
+ FROM department_lims
+ WHERE id = #{id}
+ ORDER BY id
+ </select>
+</mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/InformationNotificationMapper.xml b/ruoyi-system/src/main/resources/mapper/system/InformationNotificationMapper.xml
new file mode 100644
index 0000000..e20a753
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/InformationNotificationMapper.xml
@@ -0,0 +1,27 @@
+<?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.system.mapper.InformationNotificationMapper">
+
+ <select id="getPage" resultType="com.ruoyi.common.core.domain.entity.InformationNotificationDto">
+ select i.*, u.name senderUser, u2.name consigneeUser
+ from information_notification i
+ left join user u on i.sender_id = u.id
+ left join user u2 on u2.id = i.consignee_id
+ where i.consignee_id = #{userId}
+ <if test="messageType != '' and messageType != null">
+ and i.message_type = #{messageType}
+ </if>
+ order by i.create_time desc
+ </select>
+
+ <select id="msgRoll" resultType="com.ruoyi.common.core.domain.entity.InformationNotificationDto">
+ select i.*, u.name senderUser, u2.name consigneeUser
+ from information_notification i
+ left join user u on i.sender_id = u.id
+ left join user u2 on u2.id = i.consignee_id
+ where i.consignee_id = #{userId}
+ and i.view_status = false
+ order by i.create_time desc
+ </select>
+
+</mapper>
--
Gitblit v1.9.3