优化
This commit is contained in:
@@ -1,212 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter</artifactId>
|
||||
<version>2.9.0</version>
|
||||
</parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-admin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>园区管理系统</description>
|
||||
<url>https://github.com/wms-org/wms-admin</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<modules>
|
||||
<module>wms-webapi</module>
|
||||
<module>wms-module-system</module>
|
||||
<module>wms-plugin</module>
|
||||
<module>wms-common</module>
|
||||
<module>wms-extension</module>
|
||||
</modules>
|
||||
<properties>
|
||||
<revision>3.6.0-SNAPSHOT</revision>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-webapi</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-module-system</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-common</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-plugin-schedule</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-plugin-generator</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
<version>1.5.5.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>1.5.5.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>29.0-jre</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>huawei-mirror</id>
|
||||
<name>HuaweiCloud Mirror</name>
|
||||
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ali-mirror</id>
|
||||
<name>AliYun Mirror</name>
|
||||
<url>https://maven.aliyun.com/repository/public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>huawei-mirror</id>
|
||||
<name>HuaweiCloud Mirror</name>
|
||||
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>ali-mirror</id>
|
||||
<name>AliYun Mirror</name>
|
||||
<url>https://maven.aliyun.com/repository/public/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<compilerArgument>-parameters</compilerArgument>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>apply</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<java>
|
||||
<removeUnusedImports />
|
||||
<eclipse>
|
||||
<file>.style/p3c-codestyle.xml</file>
|
||||
</eclipse>
|
||||
<licenseHeader>
|
||||
<file>.style/license-header</file>
|
||||
</licenseHeader>
|
||||
</java>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten-clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>sonar</id>
|
||||
<activation />
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||
<artifactId>sonar-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sonar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<sonar.projectKey>Charles7c_wms-admin</sonar.projectKey>
|
||||
<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
|
||||
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
||||
<sonar.organization>charles7c</sonar.organization>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
@@ -1,128 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-admin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-common</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<description>公共模块(存放公共工具类,公共配置等)</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>me.ahoo.cosid</groupId>
|
||||
<artifactId>cosid-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.ahoo.cosid</groupId>
|
||||
<artifactId>cosid-spring-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara.sms4j</groupId>
|
||||
<artifactId>sms4j-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara.x-file-storage</groupId>
|
||||
<artifactId>x-file-storage-spring</artifactId>
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
<version>1.12.780</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-extension-crud-mp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-auth-satoken</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-auth-justauth</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-cache-jetcache</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-extension-datapermission-mp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-messaging-websocket</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-messaging-mail</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-captcha-graphic</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-captcha-behavior</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-security-limiter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-security-crypto</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-security-mask</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-security-password</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-json-jackson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
<version>4.1.100.Final</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-admin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-extension</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>扩展模块(存放其他扩展模块)</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<modules>
|
||||
<module>wms-extension-schedule-server</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-extension</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-extension-schedule-server</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<description>任务调度服务端</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<properties>
|
||||
<snail-job.version>1.2.0</snail-job.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>snail-job-server-starter</artifactId>
|
||||
<version>${snail-job.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liquibase</groupId>
|
||||
<artifactId>liquibase-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-admin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-module-system</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<description>系统管理模块(存放系统管理相关业务功能,例如:部门管理、角色管理、用户管理等)</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -2,7 +2,6 @@ package top.wms.admin.fullWorkOrder.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.wms.admin.common.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -61,7 +61,8 @@ public class FullWorkOrderServiceImpl extends BaseServiceImpl<FullWorkOrderMappe
|
||||
|
||||
@Override
|
||||
public List<FullWorkOrderInfoDO> getFullWorkOrderInfos(Long fullWorkOrderId) {
|
||||
List<FullWorkOrderInfoDO> fullWorkOrderInfoDOS = fullWorkOrderInfoMapper.selectList(new QueryWrapper<FullWorkOrderInfoDO>().eq("full_work_order_id", fullWorkOrderId));
|
||||
List<FullWorkOrderInfoDO> fullWorkOrderInfoDOS = fullWorkOrderInfoMapper
|
||||
.selectList(new QueryWrapper<FullWorkOrderInfoDO>().eq("full_work_order_id", fullWorkOrderId));
|
||||
return fullWorkOrderInfoDOS;
|
||||
}
|
||||
}
|
||||
@@ -485,8 +485,7 @@ public class MaterialInfoServiceImpl extends BaseServiceImpl<MaterialInfoMapper,
|
||||
@Override
|
||||
public void downloadBatchImportTemplate(HttpServletResponse response) throws IOException {
|
||||
try {
|
||||
FileUploadUtils.download(response, ResourceUtil
|
||||
.getStream("templates/import/batch.xlsx"), "批次导入模板.xlsx");
|
||||
FileUploadUtils.download(response, ResourceUtil.getStream("templates/import/batch.xlsx"), "批次导入模板.xlsx");
|
||||
} catch (Exception e) {
|
||||
log.error("下载批次导入模板失败:", e);
|
||||
response.setCharacterEncoding(CharsetUtil.UTF_8);
|
||||
@@ -540,15 +539,13 @@ public class MaterialInfoServiceImpl extends BaseServiceImpl<MaterialInfoMapper,
|
||||
}
|
||||
|
||||
// 转换为MaterialInfoDO列表
|
||||
List<MaterialInfoDO> materialInfoDOS = batchImportRowReqs.stream()
|
||||
.map(row -> {
|
||||
List<MaterialInfoDO> materialInfoDOS = batchImportRowReqs.stream().map(row -> {
|
||||
MaterialInfoDO materialInfoDO = new MaterialInfoDO();
|
||||
materialInfoDO.setEncoding(row.getEncoding());
|
||||
materialInfoDO.setBatch(row.getBatch());
|
||||
materialInfoDO.setUpdateUser(UserContextHolder.getUserId());
|
||||
return materialInfoDO;
|
||||
})
|
||||
.toList();
|
||||
}).toList();
|
||||
|
||||
// 批量操作数据库集合
|
||||
try {
|
||||
|
||||
@@ -103,7 +103,8 @@ public class MaterialTypeServiceImpl extends BaseServiceImpl<MaterialTypeMapper,
|
||||
.anyMatch(typeName -> typeName != null && !seenTypeName.add(typeName));
|
||||
CheckUtils.throwIf(hasDuplicateTypeName, "存在重复品类名称,请检测数据");
|
||||
|
||||
materialTypeImportResp.setDuplicateNameRows(countExistByField(validRowList, MaterialTypeImportRowReq::getTypeName, MaterialTypeDO::getTypeName, false));
|
||||
materialTypeImportResp
|
||||
.setDuplicateNameRows(countExistByField(validRowList, MaterialTypeImportRowReq::getTypeName, MaterialTypeDO::getTypeName, false));
|
||||
|
||||
String importKey = UUID.fastUUID().toString(true);
|
||||
RedisUtils.set(CacheConstants.DATA_IMPORT_KEY + importKey, JSONUtil.toJsonStr(validRowList), Duration
|
||||
@@ -163,8 +164,7 @@ public class MaterialTypeServiceImpl extends BaseServiceImpl<MaterialTypeMapper,
|
||||
if (fieldValues.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
return (int)this.count(Wrappers.<MaterialTypeDO>lambdaQuery()
|
||||
.in(dbField, fieldValues));
|
||||
return (int)this.count(Wrappers.<MaterialTypeDO>lambdaQuery().in(dbField, fieldValues));
|
||||
}
|
||||
|
||||
private List<MaterialTypeImportRowReq> filterImportData(List<MaterialTypeImportRowReq> importRowList) {
|
||||
@@ -197,8 +197,7 @@ public class MaterialTypeServiceImpl extends BaseServiceImpl<MaterialTypeMapper,
|
||||
return SKIP.validate(req.getDuplicateTypeName(), row.getTypeName(), existTypeName);
|
||||
}
|
||||
|
||||
private void doImportMaterialType(List<MaterialTypeDO> insertList,
|
||||
List<MaterialTypeDO> updateList) {
|
||||
private void doImportMaterialType(List<MaterialTypeDO> insertList, List<MaterialTypeDO> updateList) {
|
||||
if (CollUtil.isNotEmpty(insertList)) {
|
||||
baseMapper.insertBatch(insertList);
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-admin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-plugin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>插件模块(存放代码生成、任务调度等扩展模块)</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-plugin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-plugin-generator</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<description>代码生成器插件</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
</project>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-plugin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-plugin-schedule</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<description>任务调度插件</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>snail-job-client-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>snail-job-client-retry-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>snail-job-client-job-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webflux</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.projectreactor.netty</groupId>
|
||||
<artifactId>reactor-netty-http</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,183 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-admin</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>wms-webapi</artifactId>
|
||||
<version>3.6.0-SNAPSHOT</version>
|
||||
<description>API 及打包部署模块</description>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.html</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<properties>
|
||||
<config-path>config/</config-path>
|
||||
<lib-path>lib/</lib-path>
|
||||
<bin-path>bin/</bin-path>
|
||||
<main-class>top.wms.admin.WmsAdminApplication</main-class>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-log-interceptor</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>tlog-core</artifactId>
|
||||
<groupId>com.yomahub</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>tlog-webflux</artifactId>
|
||||
<groupId>com.yomahub</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>tlog-feign</artifactId>
|
||||
<groupId>com.yomahub</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>tlog-okhttp</artifactId>
|
||||
<groupId>com.yomahub</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>tlog-resttemplate</artifactId>
|
||||
<groupId>com.yomahub</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>tlog-xxljob</artifactId>
|
||||
<groupId>com.yomahub</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-module-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-plugin-schedule</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>top.wms</groupId>
|
||||
<artifactId>wms-plugin-generator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liquibase</groupId>
|
||||
<artifactId>liquibase-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
<version>1.12.780</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fazecast</groupId>
|
||||
<artifactId>jSerialComm</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.websocket</groupId>
|
||||
<artifactId>jakarta.websocket-api</artifactId>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hikvision</groupId>
|
||||
<artifactId>MvCameraControlWrapper</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/Library/MvCameraControlWrapper.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/src/main/resources/lib/jna.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fazecast</groupId>
|
||||
<artifactId>jSerialComm</artifactId>
|
||||
<version>2.10.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.parent.name}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>${config-path}</exclude>
|
||||
<exclude>db/</exclude>
|
||||
<exclude>templates/</exclude>
|
||||
<exclude>logback-spring.xml</exclude>
|
||||
</excludes>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>${main-class}</mainClass>
|
||||
<classpathPrefix>../${lib-path}</classpathPrefix>
|
||||
<addClasspath>true</addClasspath>
|
||||
<useUniqueVersions>false</useUniqueVersions>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<Class-Path>../${config-path}</Class-Path>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
<outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/app/${lib-path}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources/${config-path}</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>db/</include>
|
||||
<include>templates/</include>
|
||||
<include>logback-spring.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<outputDirectory>${project.build.directory}/app/${config-path}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -31,7 +31,6 @@ import java.util.List;
|
||||
@CrudRequestMapping(value = "/fullWorkOrder/fullWorkOrder", api = {Api.PAGE, Api.ADD, Api.DELETE, Api.EXPORT})
|
||||
public class FullWorkOrderController extends BaseController<FullWorkOrderService, FullWorkOrderResp, FullWorkOrderResp, FullWorkOrderQuery, FullWorkOrderReq> {
|
||||
|
||||
|
||||
@PostMapping("/saveInfo")
|
||||
public R saveFullWorkOrderDetail(@RequestBody List<FullWorkOrderInfoReq> infos) {
|
||||
baseService.saveFullWorkOrderDetail(infos);
|
||||
|
||||
@@ -10,10 +10,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.starter.web.model.R;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@@ -54,9 +52,9 @@ public class AHDZCConnect {
|
||||
private ScheduledExecutorService executorService;
|
||||
|
||||
// todo 模拟数据生成
|
||||
// private ScheduledFuture<?> mockDataTask;
|
||||
// private final AtomicBoolean isMockDataRunning = new AtomicBoolean(false);
|
||||
// private final Random random = new Random();
|
||||
// private ScheduledFuture<?> mockDataTask;
|
||||
// private final AtomicBoolean isMockDataRunning = new AtomicBoolean(false);
|
||||
// private final Random random = new Random();
|
||||
|
||||
/**
|
||||
* 初始化并启动电子秤服务
|
||||
@@ -74,9 +72,9 @@ public class AHDZCConnect {
|
||||
ScaleService();
|
||||
start();
|
||||
|
||||
// todo 模拟数据生成
|
||||
// isMockDataRunning.set(true);
|
||||
// startMockData();
|
||||
// todo 模拟数据生成
|
||||
// isMockDataRunning.set(true);
|
||||
// startMockData();
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
@@ -337,8 +335,8 @@ public class AHDZCConnect {
|
||||
log.info("停止电子秤线程...");
|
||||
log.info("========================================");
|
||||
|
||||
// todo 模拟数据生成
|
||||
// stopMockData();
|
||||
// todo 模拟数据生成
|
||||
// stopMockData();
|
||||
|
||||
try {
|
||||
if (executorService != null && !executorService.isShutdown()) {
|
||||
@@ -360,32 +358,32 @@ public class AHDZCConnect {
|
||||
}
|
||||
|
||||
// todo 模拟数据生成
|
||||
// private void startMockData() {
|
||||
// if (executorService == null || executorService.isShutdown()) {
|
||||
// log.warn("[模拟数据] 线程池未初始化或已关闭");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// mockDataTask = executorService.scheduleAtFixedRate(() -> {
|
||||
// if (!isMockDataRunning.get()) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// ScaleWebSocketHandler.sendMessage(String.valueOf(random.nextInt(100) + 1));
|
||||
// log.debug("[模拟数据] 发送重量数据: 37.8");
|
||||
// } catch (Exception e) {
|
||||
// log.error("[模拟数据] 发送异常: {}", e.getMessage());
|
||||
// }
|
||||
// }, 0, 1, TimeUnit.SECONDS);
|
||||
// }
|
||||
//
|
||||
// private void stopMockData() {
|
||||
// if (mockDataTask != null && !mockDataTask.isCancelled()) {
|
||||
// mockDataTask.cancel(false);
|
||||
// mockDataTask = null;
|
||||
// }
|
||||
// isMockDataRunning.set(false);
|
||||
// }
|
||||
// private void startMockData() {
|
||||
// if (executorService == null || executorService.isShutdown()) {
|
||||
// log.warn("[模拟数据] 线程池未初始化或已关闭");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// mockDataTask = executorService.scheduleAtFixedRate(() -> {
|
||||
// if (!isMockDataRunning.get()) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// ScaleWebSocketHandler.sendMessage(String.valueOf(random.nextInt(100) + 1));
|
||||
// log.debug("[模拟数据] 发送重量数据: 37.8");
|
||||
// } catch (Exception e) {
|
||||
// log.error("[模拟数据] 发送异常: {}", e.getMessage());
|
||||
// }
|
||||
// }, 0, 1, TimeUnit.SECONDS);
|
||||
// }
|
||||
//
|
||||
// private void stopMockData() {
|
||||
// if (mockDataTask != null && !mockDataTask.isCancelled()) {
|
||||
// mockDataTask.cancel(false);
|
||||
// mockDataTask = null;
|
||||
// }
|
||||
// isMockDataRunning.set(false);
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package top.wms.admin.controller.ys;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.ptr.IntByReference;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -131,7 +130,7 @@ public class NetCommon {
|
||||
// 设置通道为1
|
||||
ChannelID = 1;
|
||||
//定时任务
|
||||
String strPicPath = req.getPicPath();
|
||||
String strPicPath = "";
|
||||
if (ObjectUtil.isNull(req)) {
|
||||
strPicPath = "E:\\img\\ys\\carousel";
|
||||
// 创建保存目录
|
||||
@@ -144,16 +143,17 @@ public class NetCommon {
|
||||
if (!picDir.exists()) {
|
||||
picDir.mkdir();
|
||||
}
|
||||
strPicPath = req.getPicPath();
|
||||
} else {
|
||||
File picDir = new File("E:\\img\\ys\\fullWorkOrder");
|
||||
if (!picDir.exists()) {
|
||||
picDir.mkdir();
|
||||
}
|
||||
strPicPath = req.getPicPath();
|
||||
}
|
||||
|
||||
// 使用NETDEV_CaptureNoPreview直接保存图片文件
|
||||
boolean bRet = netdevsdk.NETDEV_CaptureNoPreview(lpUserID, ChannelID, 0, strPicPath, 1);
|
||||
|
||||
if (bRet) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -54,6 +54,7 @@ class BaseFun {
|
||||
}
|
||||
String loadSDKLibrary = loadLibrary + "NetDEVSDK";
|
||||
|
||||
// String loadSDKLibrary = "D:\\wms\\wms-admin\\wms-webapi\\src\\main\\resources\\lib\\win64\\NetDEVSDK";
|
||||
log.info("Load SDK Library: " + loadSDKLibrary);
|
||||
return loadSDKLibrary;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,8 @@ public class ysNetController {
|
||||
boolean success = NetCommon.captureImage(req);
|
||||
if (success) {
|
||||
if (req.getType() == 1) {
|
||||
return R.ok("http://localhost:6609/file/ys/" + req.getBatch() + "/" + req.getEncoding() + "_" + l + ".jpg");
|
||||
return R.ok("http://localhost:6609/file/ys/" + req.getBatch() + "/" + req
|
||||
.getEncoding() + "_" + l + ".jpg");
|
||||
} else {
|
||||
return R.ok("http://localhost:6609/file/ys/fullWorkOrder/" + l + ".jpg");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user