Compare commits

..

No commits in common. "master" and "mt-qj-wms" have entirely different histories.

710 changed files with 2 additions and 55450 deletions

41
.gitignore vendored
View File

@ -1,41 +0,0 @@
# ---> Java
# Compiled class file
*.class
.idea/
*.iml
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# ---> Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

File diff suppressed because it is too large Load Diff

View File

View File

@ -1,39 +0,0 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /root/.docker
commands:
- docker build -t harbor.picaiba.com/wms/wms-cloud-api ./ && docker push harbor.picaiba.com/wms/wms-cloud-api
# - name: deploy
# image: docker:dind
# volumes:
# - name: dockersock
# path: /var/run/docker.sock
# commands:
# - docker service update mes_mes --force
# depends_on:
# - build
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: dockerconfig
host:
path: /root/.docker
trigger:
branch:
- develop
event:
- push

View File

View File

@ -1,3 +0,0 @@
# wms
仓库系统

View File

@ -1,452 +0,0 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<modules>
<module>wms-gateway</module>
<module>wms-core</module>
<module>wms-common</module>
<module>wms-passport</module>
<module>wms-upms</module>
<module>wms-empty</module>
<module>wms-basic</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
</parent>
<groupId>com.mt</groupId>
<artifactId>wms</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<name>wms-qj</name>
<description>wms</description>
<url>https://wms.picaiba.com</url>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profileActive>dev</profileActive>
<gateway.server.port>8080</gateway.server.port>
<spring.security.user.name>wms</spring.security.user.name>
<spring.security.user.password>wms</spring.security.user.password>
<!-- rabbitmq -->
<spring.rabbitmq.host>127.0.0.1</spring.rabbitmq.host>
<spring.rabbitmq.port>5672</spring.rabbitmq.port>
<spring.rabbitmq.username>guest</spring.rabbitmq.username>
<spring.rabbitmq.password>guest</spring.rabbitmq.password>
<!-- redis -->
<!-- <spring.redis.cluster.nodes>redis.picaiba.com:6380</spring.redis.cluster.nodes>
<spring.redis.host>redis.picaiba.com</spring.redis.host>
<spring.redis.port>6380</spring.redis.port>
<spring.redis.password><![CDATA["@WSXcde3"]]></spring.redis.password>
<spring.redis.database>5</spring.redis.database>-->
<!-- database -->
<!--<spring.datasource.url>jdbc:p6spy:mysql://localhost:30306/mt_wms_qj?characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false-->
<spring.datasource.url>jdbc:p6spy:mysql://localhost:30306/mt_wms_qj?characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false
</spring.datasource.url>
<spring.datasource.username>root</spring.datasource.username>
<spring.datasource.password>ABC.10086</spring.datasource.password>
<!-- <spring.datasource.password>1qaz@WSX3edc$RFV</spring.datasource.password>-->
<!-- email -->
<spring.mail.host>smtp.mxhichina.com</spring.mail.host>
<!-- #25 ssl 465 -->
<spring.mail.port>465</spring.mail.port>
<spring.mail.username>noreply@mt.com</spring.mail.username>
<spring.mail.password>noreply</spring.mail.password>
<!-- devtools -->
<spring.devtools.remote.secret>wms</spring.devtools.remote.secret>
<spring.devtools.remote.livereload.enabled>true</spring.devtools.remote.livereload.enabled>
<!-- 公共相关配置-->
<wms.common.uploadPath>/work/uploadFile/</wms.common.uploadPath>
<wms.common.webHost>http://127.0.0.1:8080</wms.common.webHost>
<wms.common.apiHost>http://127.0.0.1:8080</wms.common.apiHost>
<!-- 短信相关配置-->
<wms.sms.channel>aliyun</wms.sms.channel>
<wms.aliyun.sms.product>Dysmsapi</wms.aliyun.sms.product>
<wms.aliyun.sms.domain>dysmsapi.aliyuncs.com</wms.aliyun.sms.domain>
<wms.aliyun.sms.accessKeyId>202020202020</wms.aliyun.sms.accessKeyId>
<wms.aliyun.sms.accessKeySecret>202020202020</wms.aliyun.sms.accessKeySecret>
<wms.tencentcloud.secretId>202020202020</wms.tencentcloud.secretId>
<wms.tencentcloud.secretKey>202020202020</wms.tencentcloud.secretKey>
<wms.tencentcloud.sms.appId>202020202020</wms.tencentcloud.sms.appId>
<wms.tencentcloud.sms.appKey>202020202020</wms.tencentcloud.sms.appKey>
</properties>
</profile>
<profile>
<id>test</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<profileActive>test</profileActive>
<gateway.server.port>9090</gateway.server.port>
<spring.security.user.name>wms</spring.security.user.name>
<spring.security.user.password>wms</spring.security.user.password>
<!-- rabbitmq -->
<spring.rabbitmq.host>127.0.0.1</spring.rabbitmq.host>
<spring.rabbitmq.port>5672</spring.rabbitmq.port>
<spring.rabbitmq.username>wms</spring.rabbitmq.username>
<spring.rabbitmq.password>wms</spring.rabbitmq.password>
<!-- redis -->
<spring.redis.cluster.nodes>redis.picaiba.com:6380</spring.redis.cluster.nodes>
<spring.redis.host>redis.picaiba.com</spring.redis.host>
<spring.redis.port>6380</spring.redis.port>
<spring.redis.password><![CDATA["@WSXcde3"]]></spring.redis.password>
<spring.redis.database>10</spring.redis.database>
<!-- database -->
<spring.datasource.url>jdbc:p6spy:mysql://mysql.picaiba.com:30306/wms?characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false
</spring.datasource.url>
<spring.datasource.username>wms</spring.datasource.username>
<spring.datasource.password>1qaz@WS</spring.datasource.password>
<!-- email -->
<spring.mail.host>smtp.mxhichina.com</spring.mail.host>
<!-- #25 ssl 465 -->
<spring.mail.port>465</spring.mail.port>
<spring.mail.username>noreply@mt.com</spring.mail.username>
<spring.mail.password>noreply</spring.mail.password>
<!-- devtools -->
<spring.devtools.remote.secret>wms</spring.devtools.remote.secret>
<spring.devtools.remote.livereload.enabled>false</spring.devtools.remote.livereload.enabled>
<!-- 公共相关配置-->
<wms.common.uploadPath>/home/api/uploadFile/</wms.common.uploadPath>
<wms.common.webHost>https://wms.mt.com</wms.common.webHost>
<wms.common.apiHost>https://api.wms-test.mt.com</wms.common.apiHost>
<!-- 短信相关配置-->
<wms.sms.channel>aliyun</wms.sms.channel>
<wms.aliyun.sms.product>Dysmsapi</wms.aliyun.sms.product>
<wms.aliyun.sms.domain>dysmsapi.aliyuncs.com</wms.aliyun.sms.domain>
<wms.aliyun.sms.accessKeyId>202020202020</wms.aliyun.sms.accessKeyId>
<wms.aliyun.sms.accessKeySecret>202020202020</wms.aliyun.sms.accessKeySecret>
<wms.tencentcloud.secretId>202020202020</wms.tencentcloud.secretId>
<wms.tencentcloud.secretKey>202020202020</wms.tencentcloud.secretKey>
<wms.tencentcloud.sms.appId>202020202020</wms.tencentcloud.sms.appId>
<wms.tencentcloud.sms.appKey>202020202020</wms.tencentcloud.sms.appKey>
</properties>
</profile>
<profile>
<id>prod</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<profileActive>prod</profileActive>
<gateway.server.port>8090</gateway.server.port>
<spring.security.user.name>wms</spring.security.user.name>
<spring.security.user.password>wms</spring.security.user.password>
<!-- rabbitmq -->
<spring.rabbitmq.host>127.0.0.1</spring.rabbitmq.host>
<spring.rabbitmq.port>5672</spring.rabbitmq.port>
<spring.rabbitmq.username>wms</spring.rabbitmq.username>
<spring.rabbitmq.password>wms</spring.rabbitmq.password>
<!-- redis -->
<spring.redis.cluster.nodes>127.0.0.1:6379</spring.redis.cluster.nodes>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>2018</spring.redis.password>
<spring.redis.database>10</spring.redis.database>
<!-- database -->
<spring.datasource.url>jdbc:p6spy:mysql://localhost:3306/wms?characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false
</spring.datasource.url>
<spring.datasource.username>root</spring.datasource.username>
<spring.datasource.password>root</spring.datasource.password>
<!-- email -->
<spring.mail.host>smtp.mxhichina.com</spring.mail.host>
<!-- #25 ssl 465 -->
<spring.mail.port>465</spring.mail.port>
<spring.mail.username>noreply@mt.com</spring.mail.username>
<spring.mail.password>noreply</spring.mail.password>
<!-- devtools -->
<spring.devtools.remote.secret>wms</spring.devtools.remote.secret>
<spring.devtools.remote.livereload.enabled>false</spring.devtools.remote.livereload.enabled>
<!-- 公共相关配置-->
<wms.common.uploadPath>/home/api/uploadFile/</wms.common.uploadPath>
<wms.common.webHost>https://wms.mt.com</wms.common.webHost>
<wms.common.apiHost>https://api.wms.mt.com</wms.common.apiHost>
<!-- 短信相关配置-->
<wms.sms.channel>aliyun</wms.sms.channel>
<wms.aliyun.sms.product>Dysmsapi</wms.aliyun.sms.product>
<wms.aliyun.sms.domain>dysmsapi.aliyuncs.com</wms.aliyun.sms.domain>
<wms.aliyun.sms.accessKeyId>202020202020</wms.aliyun.sms.accessKeyId>
<wms.aliyun.sms.accessKeySecret>202020202020</wms.aliyun.sms.accessKeySecret>
<wms.tencentcloud.secretId>202020202020</wms.tencentcloud.secretId>
<wms.tencentcloud.secretKey>202020202020</wms.tencentcloud.secretKey>
<wms.tencentcloud.sms.appId>202020202020</wms.tencentcloud.sms.appId>
<wms.tencentcloud.sms.appKey>202020202020</wms.tencentcloud.sms.appKey>
</properties>
</profile>
</profiles>
<dependencies>
<!--配置文件处理器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!--测试依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<!--公共依赖-->
<properties>
<java.version>1.8</java.version>
<spring.profiles>dev</spring.profiles>
<spring-boot.version>2.0.4.RELEASE</spring-boot.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<spring-boot-admin.version>2.0.2</spring-boot-admin.version>
<!-- de.codecentric -->
<spring-boot-admin-server-ui-hystrix.version>1.5.7</spring-boot-admin-server-ui-hystrix.version>
<spring-boot-admin-server-ui-turbine.version>1.5.7</spring-boot-admin-server-ui-turbine.version>
<!-- swagger接口工具类 -->
<springfox-swagger2.version>2.9.2</springfox-swagger2.version>
<!-- wechat工具类 -->
<binarywang-weixin.version>3.7.0</binarywang-weixin.version>
<okhttp3.version>3.11.0</okhttp3.version>
<!-- SpringBoot集成mybatis框架 -->
<mybatis-plus.version>3.4.1</mybatis-plus.version>
<p6spy.version>3.9.0</p6spy.version>
<sharding-jdbc-core-spring-boot-starter.version>2.0.3</sharding-jdbc-core-spring-boot-starter.version>
<!-- fastjson -->
<fastjson.version>1.2.75</fastjson.version>
<!-- 阿里大鱼短信 -->
<aliyun-java-sdk-core.version>4.0.9</aliyun-java-sdk-core.version>
<aliyun-java-sdk-dysmsapi.version>1.1.0</aliyun-java-sdk-dysmsapi.version>
<tencentcloud-sdk-java.version>3.1.109</tencentcloud-sdk-java.version>
<!-- hutool工具类 -->
<hutool.version>4.1.21</hutool.version>
<!-- excel工具类 -->
<cn.afterturn.version>4.0.0</cn.afterturn.version>
<!-- pdf工具类 -->
<pdfbox.version>2.0.1</pdfbox.version>
<!-- 条形码转换工具类 -->
<barcode4j.version>2.0</barcode4j.version>
<!-- userAgent -->
<useragent.version>5.11</useragent.version>
<!-- redisson -->
<redisson.version>3.11.2</redisson.version>
<!-- jasperreports -->
<jasperreports.version>6.9.0</jasperreports.version>
<!-- idworker -->
<idworker.version>1.5.0</idworker.version>
<!-- thumbnailator -->
<thumbnailator.version>0.4.13</thumbnailator.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>Cairo-SR2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-dependencies</artifactId>
<version>${spring-boot-admin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-gateway</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-passport</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-upms</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-basic</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-empty</artifactId>
<version>${project.version}</version>
</dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>${p6spy.version}</version>
</dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.aspose.words</groupId>-->
<!-- <artifactId>aspose-words</artifactId>-->
<!-- <version>18.5</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${cn.afterturn.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${cn.afterturn.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasperreports.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>${jasperreports.version}</version>
</dependency>
<!-- id生成器 -->
<!-- https://mvnrepository.com/artifact/com.imadcn.framework/idworker -->
<dependency>
<groupId>com.imadcn.framework</groupId>
<artifactId>idworker</artifactId>
<version>${idworker.version}</version>
</dependency>
<!-- 图片处理工具:压缩、缩放、旋转、加水印等 -->
<!-- https://mvnrepository.com/artifact/net.coobird/thumbnailator -->
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>${thumbnailator.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<target>${java.version}</target>
<source>${java.version}</source>
<encoding>${project.build.sourceEncoding}</encoding>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<delimiters>@</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- 使用aliyun镜像 -->
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
</repository>
<repository>
<id>aliyun</id>
<name>aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
</project>

View File

@ -1,21 +0,0 @@
<?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>wms</artifactId>
<groupId>com.mt</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-basic</artifactId>
<dependencies>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,85 +0,0 @@
package com.mt.wms.basic.controller;
import com.mt.wms.basic.params.AlarmBaseParam;
import com.mt.wms.basic.params.AlarmBaseQueryParam;
import com.mt.wms.basic.service.AlarmBaseService;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.utils.IDGenerator;
import com.mt.wms.core.validator.groups.AddGroup;
import com.mt.wms.core.validator.groups.PageGroup;
import com.mt.wms.core.validator.groups.UpdateGroup;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.groups.Default;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/10/9 11:09
* @Version 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "alarmBase")
@Slf4j
@Api(value = "报警基础信息管理", tags = "报警基础信息管理", hidden = false)
public class AlarmBaseController extends BaseController {
@Autowired
private AlarmBaseService alarmBaseService;
@PostMapping(value = "get")
@ApiOperation(value = "获取报警基础信息")
private R<AlarmBaseVo> get(@Validated @RequestBody IdParam idParam) {
return alarmBaseService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取报警基础信息列表")
private R<List<AlarmBaseVo>> list(@Validated({Default.class}) @RequestBody AlarmBaseQueryParam alarmBaseQueryParam) {
return alarmBaseService.list(alarmBaseQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页报警基础信息")
private R<PageVo<AlarmBaseVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody AlarmBaseQueryParam alarmBaseQueryParam) {
return alarmBaseService.page(alarmBaseQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody AlarmBaseParam alarmBaseParam) {
return alarmBaseService.add(alarmBaseParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody AlarmBaseParam alarmBaseParam) {
return alarmBaseService.update(alarmBaseParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除报警基础信息")
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
return alarmBaseService.delete(idParam);
}
@PostMapping(value = "codeGenerator")
@ApiOperation(value = "编码生成")
private R<String> codeGenerator() {
return successful(IDGenerator.gen("BJ", "yyyyMMddHHmm", 2, "ALARMBASE_CODE"));
}
}

View File

@ -1,51 +0,0 @@
package com.mt.wms.basic.controller;
import com.mt.wms.basic.params.CommunicationQueryParam;
import com.mt.wms.basic.service.CommunicationService;
import com.mt.wms.basic.vo.CommunicationVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.validator.groups.PageGroup;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.groups.Default;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/18 10:34
* @Version 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "communication")
@Slf4j
@Api(value = "通讯日志管理", tags = "通讯日志管理", hidden = false)
public class CommunicationContrallor extends BaseController {
@Autowired
private CommunicationService communicationService;
@PostMapping(value = "get")
@ApiOperation(value = "获取报警基础信息")
private R<CommunicationVo> get(@Validated @RequestBody IdParam idParam) {
return communicationService.get(idParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页报警基础信息")
private R<PageVo<CommunicationVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody CommunicationQueryParam communicationQueryParam) {
return communicationService.page(communicationQueryParam);
}
}

View File

@ -1,89 +0,0 @@
package com.mt.wms.basic.controller;
import com.mt.wms.basic.params.AlarmBaseParam;
import com.mt.wms.basic.params.AlarmBaseQueryParam;
import com.mt.wms.basic.params.CraftInfoParam;
import com.mt.wms.basic.params.CraftInfoQueryParam;
import com.mt.wms.basic.service.AlarmBaseService;
import com.mt.wms.basic.service.CraftInfoService;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.basic.vo.CraftInfoVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.utils.IDGenerator;
import com.mt.wms.core.validator.groups.AddGroup;
import com.mt.wms.core.validator.groups.PageGroup;
import com.mt.wms.core.validator.groups.UpdateGroup;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.groups.Default;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/10/9 11:09
* @Version 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "craftInfo")
@Slf4j
@Api(value = "工艺基础信息管理", tags = "工艺基础信息管理", hidden = false)
public class CraftInfoController extends BaseController {
@Autowired
private CraftInfoService craftInfoService;
@PostMapping(value = "get")
@ApiOperation(value = "获取报警基础信息")
private R<CraftInfoVo> get(@Validated @RequestBody IdParam idParam) {
return craftInfoService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取报警基础信息列表")
private R<List<CraftInfoVo>> list(@Validated({Default.class}) @RequestBody CraftInfoQueryParam craftInfoQueryParam) {
return craftInfoService.list(craftInfoQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页报警基础信息")
private R<PageVo<CraftInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody CraftInfoQueryParam craftInfoQueryParam) {
return craftInfoService.page(craftInfoQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody CraftInfoParam craftInfoParam) {
return craftInfoService.add(craftInfoParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody CraftInfoParam craftInfoParam) {
return craftInfoService.update(craftInfoParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除报警基础信息")
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
return craftInfoService.delete(idParam);
}
@PostMapping(value = "codeGenerator")
@ApiOperation(value = "编码生成")
private R<String> codeGenerator() {
return successful(IDGenerator.gen("GY", "yyyyMMddHHmm", 2, "CRAFTINFO_CODE"));
}
}

View File

@ -1,86 +0,0 @@
package com.mt.wms.basic.controller;
import com.mt.wms.basic.params.KilnInfoParam;
import com.mt.wms.basic.params.KilnInfoQueryParam;
import com.mt.wms.basic.service.KilnInfoService;
import com.mt.wms.basic.vo.KilnInfoVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.dal.entity.KilnInfo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.utils.IDGenerator;
import com.mt.wms.core.validator.groups.AddGroup;
import com.mt.wms.core.validator.groups.PageGroup;
import com.mt.wms.core.validator.groups.UpdateGroup;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.groups.Default;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:56
* @Version 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "kilnInfo")
@Slf4j
@Api(value = "工业炉基础信息管理", tags = "工业炉基础信息管理", hidden = false)
public class KilnInfoController extends BaseController {
@Autowired
private KilnInfoService kilnInfoService;
@PostMapping(value = "get")
@ApiOperation(value = "获取工业炉信息")
private R<KilnInfoVo> get(@Validated @RequestBody IdParam idParam) {
return kilnInfoService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取工业炉列表")
private R<List<KilnInfoVo>> list(@Validated({Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) {
return kilnInfoService.list(kilnInfoQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页工业炉")
private R<PageVo<KilnInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody KilnInfoQueryParam kilnInfoQueryParam) {
return kilnInfoService.page(kilnInfoQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody KilnInfoParam kilnInfoParam) {
return kilnInfoService.add(kilnInfoParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody KilnInfoParam kilnInfoParam) {
return kilnInfoService.update(kilnInfoParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除")
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
return kilnInfoService.delete(idParam);
}
@PostMapping(value = "codeGenerator")
@ApiOperation(value = "编码生成")
private R<String> codeGenerator(){
return successful(IDGenerator.gen("YL", "yyyyMMddHHmm", 2, "KILN_CODE"));
}
}

View File

@ -1,85 +0,0 @@
package com.mt.wms.basic.controller;
import com.mt.wms.basic.params.LocationInfoParam;
import com.mt.wms.basic.params.LocationInfoQueryParam;
import com.mt.wms.basic.service.LocationInfoService;
import com.mt.wms.basic.vo.LocationInfoVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.utils.IDGenerator;
import com.mt.wms.core.validator.groups.AddGroup;
import com.mt.wms.core.validator.groups.PageGroup;
import com.mt.wms.core.validator.groups.UpdateGroup;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.groups.Default;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 13:03
* @Version 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "locationInfo")
@Slf4j
@Api(value = "库位基础信息管理", tags = "库位基础信息管理", hidden = false)
public class LocationInfoController extends BaseController {
@Autowired
private LocationInfoService locationInfoService;
@PostMapping(value = "get")
@ApiOperation(value = "获取库位信息")
private R<LocationInfoVo> get(@Validated @RequestBody IdParam idParam) {
return locationInfoService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取库位列表")
private R<List<LocationInfoVo>> list(@Validated({Default.class}) @RequestBody LocationInfoQueryParam locationInfoQueryParam) {
return locationInfoService.list(locationInfoQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页库位")
private R<PageVo<LocationInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody LocationInfoQueryParam locationInfoQueryParam) {
return locationInfoService.page(locationInfoQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody LocationInfoParam locationInfoParam) {
return locationInfoService.add(locationInfoParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody LocationInfoParam locationInfoParam) {
return locationInfoService.update(locationInfoParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除")
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
return locationInfoService.delete(idParam);
}
@PostMapping(value = "codeGenerator")
@ApiOperation(value = "编码生成")
private R<String> codeGenerator(){
return successful(IDGenerator.gen("KW", "yyyyMMddHHmm", 2, "LOCATION_CODE"));
}
}

View File

@ -1,101 +0,0 @@
package com.mt.wms.basic.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mt.wms.basic.params.VehicleParam;
import com.mt.wms.basic.params.VehicleQueryParam;
import com.mt.wms.basic.service.VehicleService;
import com.mt.wms.basic.vo.VehicleVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.dal.entity.VehicleInfo;
import com.mt.wms.core.dal.service.VehicleInfoServiceBiz;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.utils.IDGenerator;
import com.mt.wms.core.validator.groups.AddGroup;
import com.mt.wms.core.validator.groups.PageGroup;
import com.mt.wms.core.validator.groups.UpdateGroup;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.groups.Default;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 13:13
* @Version 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "vehicle")
@Slf4j
@Api(value = "车辆基础信息管理", tags = "车辆基础信息管理", hidden = false)
public class VehicleController extends BaseController {
@Autowired
private VehicleService vehicleService;
@Autowired
private VehicleInfoServiceBiz vehicleInfoServiceBiz;
@PostMapping(value = "get")
@ApiOperation(value = "获取车辆信息")
private R<VehicleVo> get(@Validated @RequestBody IdParam idParam) {
return vehicleService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取车辆列表")
private R<List<VehicleVo>> list(@Validated({Default.class}) @RequestBody VehicleQueryParam vehicleQueryParam) {
return vehicleService.list(vehicleQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页车辆")
private R<PageVo<VehicleVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody VehicleQueryParam vehicleQueryParam) {
return vehicleService.page(vehicleQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody VehicleParam vehicleParam) {
return vehicleService.add(vehicleParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody VehicleParam vehicleParam) {
return vehicleService.update(vehicleParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除")
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
return vehicleService.delete(idParam);
}
@PostMapping(value = "codeGenerator")
@ApiOperation(value = "编码生成")
private R<String> codeGenerator(){
return successful(IDGenerator.gen("CL", "yyyyMMddHHmm", 2, "VEHICLE_CODE"));
}
@PostMapping(value = "resetStatus")
@ApiOperation(value = "重置车辆状态")
private R<String> reset(){
List<VehicleInfo> vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper<VehicleInfo>().eq(VehicleInfo.STATUS, 1));
for (VehicleInfo vehicleInfo:vehicleInfoList
) {
vehicleInfo.setStatus(0);
vehicleInfoServiceBiz.updateById(vehicleInfo);
}
return successful("操作成功,车辆状态已重置为空闲!");
}
}

View File

@ -1,86 +0,0 @@
package com.mt.wms.basic.controller;
import com.mt.wms.basic.params.WarehouseParam;
import com.mt.wms.basic.params.WarehouseQueryParam;
import com.mt.wms.basic.service.WarehouseService;
import com.mt.wms.basic.vo.WarehouseVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.params.EnabledParam;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.utils.IDGenerator;
import com.mt.wms.core.validator.groups.AddGroup;
import com.mt.wms.core.validator.groups.PageGroup;
import com.mt.wms.core.validator.groups.UpdateGroup;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.groups.Default;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/9/28 17:00
* @Version 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "warehouse")
@Slf4j
@Api(value = "缓存区管理", tags = "缓存区管理", hidden = false)
public class WarehouseController extends BaseController {
@Autowired
private WarehouseService warehouseService;
@PostMapping(value = "get")
@ApiOperation(value = "获取缓存区")
private R<WarehouseVo> get(@Validated @RequestBody IdParam idParam) {
return warehouseService.get(idParam);
}
@PostMapping(value = "list")
@ApiOperation(value = "获取缓存区列表")
private R<List<WarehouseVo>> list(@Validated({Default.class}) @RequestBody WarehouseQueryParam warehouseQueryParam) {
return warehouseService.list(warehouseQueryParam);
}
@PostMapping(value = "page")
@ApiOperation(value = "获取分页缓存区")
private R<PageVo<WarehouseVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody WarehouseQueryParam warehouseQueryParam) {
return warehouseService.page(warehouseQueryParam);
}
@PostMapping(value = "add")
@ApiOperation(value = "新增")
private R<IdVo> add(@Validated({AddGroup.class, Default.class}) @RequestBody WarehouseParam warehouseParam) {
return warehouseService.add(warehouseParam);
}
@PostMapping(value = "update")
@ApiOperation(value = "更新")
private R<IdVo> update(@Validated({UpdateGroup.class, Default.class}) @RequestBody WarehouseParam warehouseParam) {
return warehouseService.update(warehouseParam);
}
@PostMapping(value = "delete")
@ApiOperation(value = "删除缓存区")
private R<IdVo> delete(@Validated @RequestBody IdParam idParam) {
return warehouseService.delete(idParam);
}
@PostMapping(value = "codeGenerator")
@ApiOperation(value = "编码生成")
private R<String> codeGenerator(){
return successful(IDGenerator.gen("HC", "yyyyMMddHHmm", 2, "WAREHOUSE_CODE"));
}
}

View File

@ -1,65 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/9/29 9:15
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "报警基础信息参数对象", description = "用于新增和更新报警基础信息")
public class AlarmBaseParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码",required = true, example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 报警类型
*/
@ApiModelProperty(value = "报警类型",required = true, example = "1")
@NotNull(message = "报警类型不能为空")
private String alarmClass;
/**
* 报警内容
*/
@ApiModelProperty(value = "报警内容",required = true, example = "1")
@NotNull(message = "报警类型不能为空")
private String alarmInfo;
/**
* 备注
*/
@ApiModelProperty(value = "备注",required = true, example = "1")
private String note;
/**
* 描述
*/
@ApiModelProperty(value = "描述",required = true, example = "1")
private String description;
}

View File

@ -1,31 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/9/29 9:36
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "报警基础信息查询参数", description = "用于查询报警基础信息")
public class AlarmBaseQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
/**
* 报警类型
*/
@ApiModelProperty(value = "报警类型",required = false, example = "1")
private String alarmClass;
}

View File

@ -1,31 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/18 10:13
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "通讯日志查询参数", description = "用于查询通讯日志")
public class CommunicationQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
/**
* 类型
*/
@ApiModelProperty(value = "类型",required = false, example = "1")
private Integer type;
}

View File

@ -1,53 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2022/1/25 21:34
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "工艺基础信息参数对象", description = "用于新增和更新工艺基础信息")
public class CraftInfoParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 工艺号
*/
@ApiModelProperty(value = "工艺号", example = "1")
@NotNull(message = "工艺号不能为空")
private String craftCode;
/**
* plc值
*/
@ApiModelProperty(value = "plc值", example = "1")
@NotNull(message = "plc值不能为空")
private Integer plcValue;
/**
* 说明
*/
@ApiModelProperty(value = "说明", example = "1")
private String content;
}

View File

@ -1,31 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2022/1/25 21:37
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "报警基础信息查询参数", description = "用于查询报警基础信息")
public class CraftInfoQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
/**
* 工艺号
*/
@ApiModelProperty(value = "工艺号",required = false, example = "1")
private String craftCode;
}

View File

@ -1,88 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:07
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "工业炉参数对象", description = "用于新增和更新工业炉信息")
public class KilnInfoParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
@NotNull(message = "名称不能为空")
private String kilnName;
/**
* 别名
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
@NotNull(message = "别名不能为空")
private String kilnAlias;
/**
* 设备类型存储数据字典编码修改为1加工炉2回火炉3氮化炉4清洗炉
*/
@ApiModelProperty(value = "设备类型存储数据字典编码修改为1加工炉2回火炉3氮化炉4清洗炉", example = "1")
@NotNull(message = "设备类型不能为空")
private Integer type;
/**
* 英文名
*/
@ApiModelProperty(value = "英文名", example = "1")
private String en;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 端口号
*/
@ApiModelProperty(value = "端口号", example = "8888")
private String portNumber;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -1,25 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:11
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "工业炉查询参数", description = "用于查询工业炉信息")
public class KilnInfoQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
}

View File

@ -1,70 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:47
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "库位参数对象", description = "用于新增和更新库位信息")
public class LocationInfoParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "库位名称", example = "1")
@NotNull(message = "名称不能为空")
private String locationName;
/**
* 别名
*/
@ApiModelProperty(value = "别名", example = "1")
@NotNull(message = "别名不能为空")
private String locationNameAlias;
/**
* 缓存区
*/
@ApiModelProperty(value = "缓存区id", example = "1")
private String warehouseId;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -1,25 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:06
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "库位查询参数", description = "用于查询库位信息")
public class LocationInfoQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
}

View File

@ -1,68 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/11/8 10:39
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "车辆参数对象", description = "用于新增和更新车辆信息")
public class VehicleParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
@NotNull(message = "名称不能为空")
private String vehicleName;
/**
* 规格
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
private String vehicleAlias;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -1,44 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/8 15:19
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "车辆查询参数", description = "用于查询车辆信息")
public class VehicleQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码",required = false, example = "1")
private String code;
/**
* 别名
*/
@ApiModelProperty(value = "别名",required = false, example = "1")
private String vehicleAlias;
/**
* 名称
*/
@ApiModelProperty(value = "名称",required = false, example = "1")
private String vehicleName;
}

View File

@ -1,88 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.base.BaseParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/9/27 14:54
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "缓存区参数对象", description = "用于新增和更新缓存区信息")
public class WarehouseParam extends BaseParam {
private static final long serialVersionUID = 1L;
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写",required = false, example = "1")
@NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码",required = true, example = "1")
@NotNull(message = "编码不能为空")
private String code;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称",required = true, example = "1")
@NotNull(message = "仓库名称不能为空")
private String warehouseName;
/**
* 规格
*/
@ApiModelProperty(value = "规格",required = true, example = "1")
private String spec;
/**
* 备注
*/
@ApiModelProperty(value = "备注",required = true, example = "1")
private String note;
/**
* 描述
*/
@ApiModelProperty(value = "描述",required = true, example = "1")
private String description;
/**
* 英文名称
*/
@ApiModelProperty(value = "英文名称",required = false, example = "1")
private String englishName;
/**
* 别名
*/
@ApiModelProperty(value = "英文名称",required = false, example = "1")
private String aliasName;
/**
* 库位数量
*/
@ApiModelProperty(value = "英文名称",required = true, example = "1")
private Integer number;
/**
* 状态 0初始化1已占用
*/
@ApiModelProperty(value = "状态",required = true, example = "1")
private Integer status;
}

View File

@ -1,34 +0,0 @@
package com.mt.wms.basic.params;
import com.mt.wms.core.params.BasePageParam;
import com.mt.wms.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/9/28 15:09
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "缓存区查询参数", description = "用于查询缓存区信息")
public class WarehouseQueryParam extends BasePageParam {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键",required = false, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码",required = false, example = "1")
private String code;
}

View File

@ -1,69 +0,0 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.AlarmBaseParam;
import com.mt.wms.basic.params.AlarmBaseQueryParam;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/10/9 10:46
* @Version 1.0
*/
public interface AlarmBaseService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<AlarmBaseVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param alarmBaseQueryParam xx查询参数
* @return xx列表
*/
R<List<AlarmBaseVo>> list(AlarmBaseQueryParam alarmBaseQueryParam);
/**
* 获取xx分页列表
*
* @param alarmBaseQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<AlarmBaseVo>> page(AlarmBaseQueryParam alarmBaseQueryParam);
/**
* 新增xx
*
* @param alarmBaseParam xx参数
* @return 主键
*/
R<IdVo> add(AlarmBaseParam alarmBaseParam);
/**
* 更新xx
*
* @param alarmBaseParam xx参数
* @return 主键
*/
R<IdVo> update(AlarmBaseParam alarmBaseParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -1,32 +0,0 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.CommunicationQueryParam;
import com.mt.wms.basic.vo.CommunicationVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/18 10:16
* @Version 1.0
*/
public interface CommunicationService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<CommunicationVo> get(IdParam idParam);
/**
* 获取xx分页列表
*
* @param kilnInfoQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<CommunicationVo>> page(CommunicationQueryParam kilnInfoQueryParam);
}

View File

@ -1,73 +0,0 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.AlarmBaseParam;
import com.mt.wms.basic.params.AlarmBaseQueryParam;
import com.mt.wms.basic.params.CraftInfoParam;
import com.mt.wms.basic.params.CraftInfoQueryParam;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.basic.vo.CraftInfoVo;
import com.mt.wms.core.dal.entity.CraftInfo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/10/9 10:46
* @Version 1.0
*/
public interface CraftInfoService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<CraftInfoVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param craftInfoQueryParam xx查询参数
* @return xx列表
*/
R<List<CraftInfoVo>> list(CraftInfoQueryParam craftInfoQueryParam);
/**
* 获取xx分页列表
*
* @param craftInfoQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<CraftInfoVo>> page(CraftInfoQueryParam craftInfoQueryParam);
/**
* 新增xx
*
* @param craftInfoParam xx参数
* @return 主键
*/
R<IdVo> add(CraftInfoParam craftInfoParam);
/**
* 更新xx
*
* @param craftInfoParam xx参数
* @return 主键
*/
R<IdVo> update(CraftInfoParam craftInfoParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -1,68 +0,0 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.KilnInfoParam;
import com.mt.wms.basic.params.KilnInfoQueryParam;
import com.mt.wms.basic.vo.KilnInfoVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:12
* @Version 1.0
*/
public interface KilnInfoService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<KilnInfoVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param kilnInfoQueryParam xx查询参数
* @return xx列表
*/
R<List<KilnInfoVo>> list(KilnInfoQueryParam kilnInfoQueryParam);
/**
* 获取xx分页列表
*
* @param kilnInfoQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<KilnInfoVo>> page(KilnInfoQueryParam kilnInfoQueryParam);
/**
* 新增xx
*
* @param kilnInfoParam xx参数
* @return 主键
*/
R<IdVo> add(KilnInfoParam kilnInfoParam);
/**
* 更新xx
*
* @param kilnInfoParam xx参数
* @return 主键
*/
R<IdVo> update(KilnInfoParam kilnInfoParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -1,68 +0,0 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.LocationInfoParam;
import com.mt.wms.basic.params.LocationInfoQueryParam;
import com.mt.wms.basic.vo.LocationInfoVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:10
* @Version 1.0
*/
public interface LocationInfoService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<LocationInfoVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param locationInfoQueryParam xx查询参数
* @return xx列表
*/
R<List<LocationInfoVo>> list(LocationInfoQueryParam locationInfoQueryParam);
/**
* 获取xx分页列表
*
* @param locationInfoQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<LocationInfoVo>> page(LocationInfoQueryParam locationInfoQueryParam);
/**
* 新增xx
*
* @param locationInfoParam xx参数
* @return 主键
*/
R<IdVo> add(LocationInfoParam locationInfoParam);
/**
* 更新xx
*
* @param locationInfoParam xx参数
* @return 主键
*/
R<IdVo> update(LocationInfoParam locationInfoParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -1,68 +0,0 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.VehicleParam;
import com.mt.wms.basic.params.VehicleQueryParam;
import com.mt.wms.basic.vo.VehicleVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:02
* @Version 1.0
*/
public interface VehicleService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<VehicleVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param vehicleQueryParam xx查询参数
* @return xx列表
*/
R<List<VehicleVo>> list(VehicleQueryParam vehicleQueryParam);
/**
* 获取xx分页列表
*
* @param vehicleQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<VehicleVo>> page(VehicleQueryParam vehicleQueryParam);
/**
* 新增xx
*
* @param vehicleParam xx参数
* @return 主键
*/
R<IdVo> add(VehicleParam vehicleParam);
/**
* 更新xx
*
* @param vehicleParam xx参数
* @return 主键
*/
R<IdVo> update(VehicleParam vehicleParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -1,70 +0,0 @@
package com.mt.wms.basic.service;
import com.mt.wms.basic.params.WarehouseParam;
import com.mt.wms.basic.params.WarehouseQueryParam;
import com.mt.wms.basic.vo.WarehouseVo;
import com.mt.wms.core.params.EnabledParam;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/9/28 15:36
* @Version 1.0
*/
public interface WarehouseService {
/**
* 获取xx
*
* @param idParam 主键参数
* @return xx
*/
R<WarehouseVo> get(IdParam idParam);
/**
* 获取xx列表
*
* @param warehouseQueryParam xx查询参数
* @return xx列表
*/
R<List<WarehouseVo>> list(WarehouseQueryParam warehouseQueryParam);
/**
* 获取xx分页列表
*
* @param warehouseQueryParam xx查询参数
* @return xx分页列表
*/
R<PageVo<WarehouseVo>> page(WarehouseQueryParam warehouseQueryParam);
/**
* 新增xx
*
* @param warehouseParam xx参数
* @return 主键
*/
R<IdVo> add(WarehouseParam warehouseParam);
/**
* 更新xx
*
* @param warehouseParam xx参数
* @return 主键
*/
R<IdVo> update(WarehouseParam warehouseParam);
/**
* 删除xx
*
* @param idParam 主键参数
* @return 主键
*/
R<IdVo> delete(IdParam idParam);
}

View File

@ -1,98 +0,0 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.wms.basic.params.AlarmBaseParam;
import com.mt.wms.basic.params.AlarmBaseQueryParam;
import com.mt.wms.basic.service.AlarmBaseService;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.AlarmBase;
import com.mt.wms.core.dal.entity.Warehouse;
import com.mt.wms.core.dal.service.AlarmBaseServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/10/9 10:49
* @Version 1.0
*/
@Service
@Transactional
public class AlarmBaseServiceImpl extends BaseService implements AlarmBaseService {
@Resource
private AlarmBaseServiceBiz alarmBaseServiceBiz;
@Override
public R<AlarmBaseVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
AlarmBase alarmBase = alarmBaseServiceBiz.getById(idParam.getId());
AlarmBaseVo alarmBaseVo = AlarmBaseVo.builder().build();
BeanUtils.copyProperties(alarmBase,alarmBaseVo);
return successful(alarmBaseVo);
}
@Override
public R<List<AlarmBaseVo>> list(AlarmBaseQueryParam alarmBaseQueryParam) {
QueryWrapper<AlarmBase> wrapper=new QueryWrapper<>();
wrapper.eq(AlarmBase.VALID,1);
List<AlarmBase> alarmBaseList = alarmBaseServiceBiz.list(wrapper);
List<AlarmBaseVo> alarmBaseVoList = com.mt.wms.core.utils.BeanUtils.copyList(alarmBaseList, AlarmBaseVo.class);
return successful(alarmBaseVoList);
}
@Override
public R<PageVo<AlarmBaseVo>> page(AlarmBaseQueryParam alarmBaseQueryParam) {
QueryWrapper<AlarmBase> wrapper=new QueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(alarmBaseQueryParam.getAlarmClass()),AlarmBase.ALARM_CLASS,alarmBaseQueryParam.getAlarmClass())
.orderByDesc(AlarmBase.CREATE_TIME);
Page<AlarmBase> page = alarmBaseServiceBiz.page(new Page<>(alarmBaseQueryParam.getCurrent(), alarmBaseQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page,AlarmBaseVo.class));
}
@Override
public R<IdVo> add(AlarmBaseParam alarmBaseParam) {
QueryWrapper<AlarmBase> wrapper=new QueryWrapper<>();
AlarmBase alarmBase=new AlarmBase();
BeanUtils.copyProperties(alarmBaseParam,alarmBase);
setCommonField(alarmBase);
alarmBaseServiceBiz.save(alarmBase);
return successful(IdVo.builder().id(alarmBase.getId()).build());
}
@Override
public R<IdVo> update(AlarmBaseParam alarmBaseParam) {
AlarmBase alarmBase = alarmBaseServiceBiz.getById(alarmBaseParam.getId());
if (!alarmBaseParam.getCode().equals(alarmBase.getCode())){
QueryWrapper<AlarmBase> wrapper=new QueryWrapper<>();
wrapper.eq(AlarmBase.CODE,alarmBaseParam.getCode());
wrapper.eq(AlarmBase.VALID,1);
Assert.eqZero(alarmBaseServiceBiz.count(wrapper),"报警编码已存在!");
}
AlarmBase updateAlarmBase=new AlarmBase();
BeanUtils.copyProperties(alarmBaseParam,updateAlarmBase);
setUpdateCommonField(updateAlarmBase);
alarmBaseServiceBiz.updateById(updateAlarmBase);
return successful(IdVo.builder().id(updateAlarmBase.getId()).build());
}
@Override
public R<IdVo> delete(IdParam idParam) {
alarmBaseServiceBiz.removeById(idParam.getId());
return successful(IdVo.builder().id(idParam.getId()).build());
}
}

View File

@ -1,51 +0,0 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.wms.basic.params.CommunicationQueryParam;
import com.mt.wms.basic.service.CommunicationService;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.basic.vo.CommunicationVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.CommunicationLog;
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.utils.StringUtils;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* @Author: liguanghao
* @Date: 2021/11/18 10:18
* @Version 1.0
*/
@Service
@Transactional
public class CommunicationServiceImpl extends BaseService implements CommunicationService {
@Resource
private CommunicationLogServiceBiz communicationLogServiceBiz;
@Override
public R<CommunicationVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
CommunicationLog communicationLog = communicationLogServiceBiz.getById(idParam.getId());
CommunicationVo communicationVo = CommunicationVo.builder().build();
BeanUtils.copyProperties(communicationLog,communicationVo);
return successful(communicationVo);
}
@Override
public R<PageVo<CommunicationVo>> page(CommunicationQueryParam communicationQueryParam) {
QueryWrapper<CommunicationLog> wrapper=new QueryWrapper<>();
wrapper.eq(CommunicationLog.VALID,1);
wrapper.eq(communicationQueryParam.getType()!=null,CommunicationLog.TYPE,communicationQueryParam.getType());
Page<CommunicationLog> page = communicationLogServiceBiz.page(new Page<>(communicationQueryParam.getCurrent(), communicationQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page,CommunicationVo.class));
}
}

View File

@ -1,97 +0,0 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.wms.basic.params.AlarmBaseParam;
import com.mt.wms.basic.params.AlarmBaseQueryParam;
import com.mt.wms.basic.params.CraftInfoParam;
import com.mt.wms.basic.params.CraftInfoQueryParam;
import com.mt.wms.basic.service.AlarmBaseService;
import com.mt.wms.basic.service.CraftInfoService;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.basic.vo.CraftInfoVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.AlarmBase;
import com.mt.wms.core.dal.entity.CraftInfo;
import com.mt.wms.core.dal.service.AlarmBaseServiceBiz;
import com.mt.wms.core.dal.service.CraftInfoServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/10/9 10:49
* @Version 1.0
*/
@Service
@Transactional
public class CraftInfoServiceImpl extends BaseService implements CraftInfoService {
@Resource
private CraftInfoServiceBiz craftInfoServiceBiz;
@Override
public R<CraftInfoVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
CraftInfo craftInfo = craftInfoServiceBiz.getById(idParam.getId());
CraftInfoVo craftInfoVo = CraftInfoVo.builder().build();
BeanUtils.copyProperties(craftInfo,craftInfoVo);
return successful(craftInfoVo);
}
@Override
public R<List<CraftInfoVo>> list(CraftInfoQueryParam craftInfoQueryParam) {
QueryWrapper<CraftInfo> wrapper=new QueryWrapper<>();
wrapper.eq(CraftInfo.VALID,1);
List<CraftInfo> craftInfoList = craftInfoServiceBiz.list(wrapper);
List<CraftInfoVo> craftInfoVoList = com.mt.wms.core.utils.BeanUtils.copyList(craftInfoList, CraftInfoVo.class);
return successful(craftInfoVoList);
}
@Override
public R<PageVo<CraftInfoVo>> page(CraftInfoQueryParam craftInfoQueryParam) {
QueryWrapper<CraftInfo> wrapper=new QueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(craftInfoQueryParam.getCraftCode()),CraftInfo.CRAFT_CODE,craftInfoQueryParam.getCraftCode())
.orderByAsc(CraftInfo.CREATE_TIME);
Page<CraftInfo> page = craftInfoServiceBiz.page(new Page<>(craftInfoQueryParam.getCurrent(), craftInfoQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page,CraftInfoVo.class));
}
@Override
public R<IdVo> add(CraftInfoParam craftInfoParam) {
QueryWrapper<CraftInfo> wrapper=new QueryWrapper<>();
CraftInfo craftInfo=new CraftInfo();
BeanUtils.copyProperties(craftInfoParam,craftInfo);
setCommonField(craftInfo);
craftInfoServiceBiz.save(craftInfo);
return successful(IdVo.builder().id(craftInfo.getId()).build());
}
@Override
public R<IdVo> update(CraftInfoParam craftInfoParam) {
CraftInfo craftInfo = craftInfoServiceBiz.getById(craftInfoParam.getId());
CraftInfo updateCraftInfo=new CraftInfo();
BeanUtils.copyProperties(craftInfoParam,updateCraftInfo);
setUpdateCommonField(updateCraftInfo);
craftInfoServiceBiz.updateById(updateCraftInfo);
return successful(IdVo.builder().id(updateCraftInfo.getId()).build());
}
@Override
public R<IdVo> delete(IdParam idParam) {
craftInfoServiceBiz.removeById(idParam.getId());
return successful(IdVo.builder().id(idParam.getId()).build());
}
}

View File

@ -1,94 +0,0 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.wms.basic.params.KilnInfoParam;
import com.mt.wms.basic.params.KilnInfoQueryParam;
import com.mt.wms.basic.service.KilnInfoService;
import com.mt.wms.basic.vo.KilnInfoVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.KilnInfo;
import com.mt.wms.core.dal.service.KilnInfoServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 12:16
* @Version 1.0
*/
@Service
@Transactional
public class KilnInfoServiceImpl extends BaseService implements KilnInfoService {
@Resource
private KilnInfoServiceBiz kilnInfoServiceBiz;
@Override
public R<KilnInfoVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(idParam.getId());
KilnInfoVo kilnInfoVo=KilnInfoVo.builder().build();
BeanUtils.copyProperties(kilnInfo,kilnInfoVo);
return successful(kilnInfoVo);
}
@Override
public R<List<KilnInfoVo>> list(KilnInfoQueryParam kilnInfoQueryParam) {
QueryWrapper<KilnInfo> wrapper=new QueryWrapper<>();
wrapper.eq(KilnInfo.VALID,1);
List<KilnInfo> kilnInfoList = kilnInfoServiceBiz.list(wrapper);
List<KilnInfoVo> kilnInfoVoList = com.mt.wms.core.utils.BeanUtils.copyList(kilnInfoList, KilnInfoVo.class);
return successful(kilnInfoVoList);
}
@Override
public R<PageVo<KilnInfoVo>> page(KilnInfoQueryParam kilnInfoQueryParam) {
QueryWrapper<KilnInfo> wrapper=new QueryWrapper<>();
wrapper.eq(KilnInfo.VALID,1);
Page<KilnInfo> page = kilnInfoServiceBiz.page(new Page<>(kilnInfoQueryParam.getCurrent(), kilnInfoQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page,KilnInfoVo.class));
}
@Override
public R<IdVo> add(KilnInfoParam kilnInfoParam) {
QueryWrapper<KilnInfo> wrapper=new QueryWrapper<>();
KilnInfo kilnInfo=new KilnInfo();
BeanUtils.copyProperties(kilnInfoParam,kilnInfo);
setCommonField(kilnInfo);
kilnInfoServiceBiz.save(kilnInfo);
return successful(IdVo.builder().id(kilnInfo.getId()).build());
}
@Override
public R<IdVo> update(KilnInfoParam kilnInfoParam) {
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnInfoParam.getId());
if (!kilnInfoParam.getKilnName().equals(kilnInfo.getKilnName())){
QueryWrapper<KilnInfo> wrapper=new QueryWrapper<>();
wrapper.eq(KilnInfo.KILN_NAME,kilnInfoParam.getKilnName());
wrapper.eq(KilnInfo.VALID,1);
Assert.eqZero(kilnInfoServiceBiz.count(wrapper),"车辆名称已存在!");
}
KilnInfo updatewKilnInfo=new KilnInfo();
BeanUtils.copyProperties(kilnInfoParam,updatewKilnInfo);
setUpdateCommonField(updatewKilnInfo);
kilnInfoServiceBiz.updateById(updatewKilnInfo);
return successful(IdVo.builder().id(updatewKilnInfo.getId()).build());
}
@Override
public R<IdVo> delete(IdParam idParam) {
kilnInfoServiceBiz.removeById(idParam.getId());
return successful(IdVo.builder().id(idParam.getId()).build());
}
}

View File

@ -1,96 +0,0 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.wms.basic.params.LocationInfoParam;
import com.mt.wms.basic.params.LocationInfoQueryParam;
import com.mt.wms.basic.service.LocationInfoService;
import com.mt.wms.basic.vo.LocationInfoVo;
import com.mt.wms.basic.vo.VehicleVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.Location;
import com.mt.wms.core.dal.entity.VehicleInfo;
import com.mt.wms.core.dal.service.LocationServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:13
* @Version 1.0
*/
@Service
@Transactional
public class LocationInfoServiceImpl extends BaseService implements LocationInfoService {
@Resource
private LocationServiceBiz locationServiceBiz;
@Override
public R<LocationInfoVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
Location location = locationServiceBiz.getById(idParam.getId());
LocationInfoVo locationInfoVo=LocationInfoVo.builder().build();
BeanUtils.copyProperties(location,locationInfoVo);
return successful(locationInfoVo);
}
@Override
public R<List<LocationInfoVo>> list(LocationInfoQueryParam locationInfoQueryParam) {
QueryWrapper<Location> wrapper=new QueryWrapper<>();
wrapper.eq(Location.VALID,1);
List<Location> locationList = locationServiceBiz.list(wrapper);
List<LocationInfoVo> locationInfoVoList = com.mt.wms.core.utils.BeanUtils.copyList(locationList, LocationInfoVo.class);
return successful(locationInfoVoList);
}
@Override
public R<PageVo<LocationInfoVo>> page(LocationInfoQueryParam locationInfoQueryParam) {
QueryWrapper<Location> wrapper=new QueryWrapper<>();
wrapper.eq(Location.VALID,1);
Page<Location> page = locationServiceBiz.page(new Page<>(locationInfoQueryParam.getCurrent(), locationInfoQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page,LocationInfoVo.class));
}
@Override
public R<IdVo> add(LocationInfoParam locationInfoParam) {
QueryWrapper<Location> wrapper=new QueryWrapper<>();
Location location=new Location();
BeanUtils.copyProperties(locationInfoParam,location);
setCommonField(location);
locationServiceBiz.save(location);
return successful(IdVo.builder().id(location.getId()).build());
}
@Override
public R<IdVo> update(LocationInfoParam locationInfoParam) {
Location location = locationServiceBiz.getById(locationInfoParam.getId());
if (!locationInfoParam.getCode().equals(location.getCode())){
QueryWrapper<Location> wrapper=new QueryWrapper<>();
wrapper.eq(Location.CODE,locationInfoParam.getCode());
wrapper.eq(Location.VALID,1);
Assert.eqZero(locationServiceBiz.count(wrapper),"库位编码已存在!");
}
Location updateLocation=new Location();
BeanUtils.copyProperties(locationInfoParam,updateLocation);
setUpdateCommonField(updateLocation);
locationServiceBiz.updateById(updateLocation);
return successful(IdVo.builder().id(updateLocation.getId()).build());
}
@Override
public R<IdVo> delete(IdParam idParam) {
locationServiceBiz.removeById(idParam.getId());
return successful(IdVo.builder().id(idParam.getId()).build());
}
}

View File

@ -1,96 +0,0 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.wms.basic.params.VehicleParam;
import com.mt.wms.basic.params.VehicleQueryParam;
import com.mt.wms.basic.service.VehicleService;
import com.mt.wms.basic.vo.AlarmBaseVo;
import com.mt.wms.basic.vo.VehicleVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.AlarmBase;
import com.mt.wms.core.dal.entity.VehicleInfo;
import com.mt.wms.core.dal.service.VehicleInfoServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:09
* @Version 1.0
*/
@Service
@Transactional
public class VehicleServiceImpl extends BaseService implements VehicleService {
@Resource
private VehicleInfoServiceBiz vehicleInfoServiceBiz;
@Override
public R<VehicleVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
VehicleInfo vehicleInfo = vehicleInfoServiceBiz.getById(idParam.getId());
VehicleVo vehicleVo=VehicleVo.builder().build();
BeanUtils.copyProperties(vehicleInfo,vehicleVo);
return successful(vehicleVo);
}
@Override
public R<List<VehicleVo>> list(VehicleQueryParam vehicleQueryParam) {
QueryWrapper<VehicleInfo> wrapper=new QueryWrapper<>();
wrapper.eq(VehicleInfo.VALID,1);
List<VehicleInfo> vehicleInfoList = vehicleInfoServiceBiz.list(wrapper);
List<VehicleVo> vehicleVoList = com.mt.wms.core.utils.BeanUtils.copyList(vehicleInfoList, VehicleVo.class);
return successful(vehicleVoList);
}
@Override
public R<PageVo<VehicleVo>> page(VehicleQueryParam vehicleQueryParam) {
QueryWrapper<VehicleInfo> wrapper=new QueryWrapper<>();
wrapper.eq(VehicleInfo.VALID,1);
Page<VehicleInfo> page = vehicleInfoServiceBiz.page(new Page<>(vehicleQueryParam.getCurrent(), vehicleQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page,VehicleVo.class));
}
@Override
public R<IdVo> add(VehicleParam vehicleParam) {
QueryWrapper<VehicleInfo> wrapper=new QueryWrapper<>();
VehicleInfo vehicleInfo=new VehicleInfo();
BeanUtils.copyProperties(vehicleParam,vehicleInfo);
setCommonField(vehicleInfo);
vehicleInfoServiceBiz.save(vehicleInfo);
return successful(IdVo.builder().id(vehicleInfo.getId()).build());
}
@Override
public R<IdVo> update(VehicleParam vehicleParam) {
VehicleInfo vehicleInfo = vehicleInfoServiceBiz.getById(vehicleParam.getId());
if (!vehicleParam.getCode().equals(vehicleInfo.getCode())){
QueryWrapper<VehicleInfo> wrapper=new QueryWrapper<>();
wrapper.eq(VehicleInfo.CODE,vehicleParam.getCode());
wrapper.eq(VehicleInfo.VALID,1);
Assert.eqZero(vehicleInfoServiceBiz.count(wrapper),"车辆编码已存在!");
}
VehicleInfo updateVehicleInfo=new VehicleInfo();
BeanUtils.copyProperties(vehicleParam,updateVehicleInfo);
setUpdateCommonField(updateVehicleInfo);
vehicleInfoServiceBiz.updateById(updateVehicleInfo);
return successful(IdVo.builder().id(updateVehicleInfo.getId()).build());
}
@Override
public R<IdVo> delete(IdParam idParam) {
vehicleInfoServiceBiz.removeById(idParam.getId());
return successful(IdVo.builder().id(idParam.getId()).build());
}
}

View File

@ -1,96 +0,0 @@
package com.mt.wms.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.wms.basic.params.WarehouseParam;
import com.mt.wms.basic.params.WarehouseQueryParam;
import com.mt.wms.basic.service.WarehouseService;
import com.mt.wms.basic.vo.WarehouseVo;
import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.Warehouse;
import com.mt.wms.core.dal.service.WarehouseServiceBiz;
import com.mt.wms.core.errorcode.ApiErrorCode;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: liguanghao
* @Date: 2021/9/28 15:45
* @Version 1.0
*/
@Service
@Transactional
public class WarehouseServiceImpl extends BaseService implements WarehouseService {
@Resource
private WarehouseServiceBiz warehouseServiceBiz;
@Override
public R<WarehouseVo> get(IdParam idParam) {
Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
Warehouse warehouse = warehouseServiceBiz.getById(idParam.getId());
WarehouseVo warehouseVo = WarehouseVo.builder().build();
BeanUtils.copyProperties(warehouse,warehouseVo);
return successful(warehouseVo);
}
@Override
public R<List<WarehouseVo>> list(WarehouseQueryParam warehouseQueryParam) {
QueryWrapper<Warehouse> wrapper=new QueryWrapper<>();
wrapper.eq(Warehouse.VALID,1);
List<Warehouse> warehouseList = warehouseServiceBiz.list(wrapper);
List<WarehouseVo> warehouseVoList = com.mt.wms.core.utils.BeanUtils.copyList(warehouseList, WarehouseVo.class);
return successful(warehouseVoList);
}
@Override
public R<PageVo<WarehouseVo>> page(WarehouseQueryParam warehouseQueryParam) {
QueryWrapper<Warehouse> wrapper=new QueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(warehouseQueryParam.getCode()),Warehouse.CODE,warehouseQueryParam.getCode())
.orderByDesc(Warehouse.CREATE_TIME);
Page<Warehouse> page = warehouseServiceBiz.page(new Page<>(warehouseQueryParam.getCurrent(), warehouseQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page,WarehouseVo.class));
}
@Override
public R<IdVo> add(WarehouseParam warehouseParam) {
QueryWrapper<Warehouse> wrapper=new QueryWrapper<>();
Warehouse warehouse=new Warehouse();
BeanUtils.copyProperties(warehouseParam,warehouse);
setCommonField(warehouse);
warehouseServiceBiz.save(warehouse);
return successful(IdVo.builder().id(warehouse.getId()).build());
}
@Override
public R<IdVo> update(WarehouseParam warehouseParam) {
Warehouse warehouse = warehouseServiceBiz.getById(warehouseParam.getId());
if (!warehouseParam.getCode().equals(warehouse.getCode())){
QueryWrapper<Warehouse> wrapper=new QueryWrapper<>();
wrapper.eq(Warehouse.CODE,warehouseParam.getCode());
wrapper.eq(Warehouse.VALID,1);
Assert.eqZero(warehouseServiceBiz.count(wrapper),"缓存区编码已存在!");
}
Warehouse updateWarehouse=new Warehouse();
BeanUtils.copyProperties(warehouseParam,updateWarehouse);
setUpdateCommonField(updateWarehouse);
warehouseServiceBiz.updateById(updateWarehouse);
return successful(IdVo.builder().id(updateWarehouse.getId()).build());
}
@Override
public R<IdVo> delete(IdParam idParam) {
warehouseServiceBiz.removeById(idParam.getId());
return successful(IdVo.builder().id(idParam.getId()).build());
}
}

View File

@ -1,61 +0,0 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.validator.groups.UpdateGroup;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/9/29 9:54
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "缓存区视图对象", description = "用于查询缓存区信息")
public class AlarmBaseVo extends BaseVo implements PageVo.ConvertVo{
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写", example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 报警类型
*/
@ApiModelProperty(value = "报警类型", example = "1")
private String alarmClass;
/**
* 报警内容
*/
@ApiModelProperty(value = "报警内容", example = "1")
private String alarmInfo;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "1")
private String note;
/**
* 描述
*/
@ApiModelProperty(value = "描述", example = "1")
private String description;
}

View File

@ -1,61 +0,0 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* @Author: liguanghao
* @Date: 2021/11/18 8:55
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "通讯日志视图对象", description = "用于查询通讯日志信息")
public class CommunicationVo extends BaseVo implements PageVo.ConvertVo {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写", example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 日志名称
*/
@ApiModelProperty(value = "日志名称", example = "1")
private String logName;
/**
* 内容
*/
@ApiModelProperty(value = "日志名称", example = "1")
private String content;
/**
* 类型
*/
@ApiModelProperty(value = "类型", example = "1")
private Integer type;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间", example = "1")
private LocalDateTime createTime;
}

View File

@ -1,55 +0,0 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2022/1/25 21:27
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "工艺信息视图对象", description = "用于查询工艺信息信息")
public class CraftInfoVo extends BaseVo implements PageVo.ConvertVo{
/**
* 主键自增
*/
@ApiModelProperty(value = "主键,更新时需要填写", example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 工艺号
*/
@ApiModelProperty(value = "工艺号", example = "1")
private String craftCode;
/**
* plc值
*/
@ApiModelProperty(value = "plc值", example = "1")
private Integer plcValue;
/**
* 状态
*/
@ApiModelProperty(value = "状态", example = "1")
private Integer status;
/**
* 说明
*/
@ApiModelProperty(value = "说明", example = "1")
private String content;
}

View File

@ -1,88 +0,0 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 11:21
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "工业炉视图对象", description = "用于查询工业炉信息")
public class KilnInfoVo extends BaseVo implements PageVo.ConvertVo {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键", required = true, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 类型存储数据字典编码修改为1加工炉2回火炉3氮化炉4清洗炉
*/
@ApiModelProperty(value = "类型存储数据字典编码修改为1加工炉2回火炉3氮化炉4清洗炉", example = "1")
private Integer type;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
private String kilnName;
/**
* 别名
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
private String kilnAlias;
/**
* 英文名
*/
@ApiModelProperty(value = "英文名", example = "1")
private String en;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 端口号
*/
@ApiModelProperty(value = "端口号", example = "8888")
private String portNumber;
/**
* 状态 0初始化1损坏
*/
@ApiModelProperty(value = "状态", example = "0")
private String status;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -1,69 +0,0 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/9 10:22
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "库位信息视图对象", description = "用于查询库位信息")
public class LocationInfoVo extends BaseVo implements PageVo.ConvertVo {
/**
* 主键自增
*/
@ApiModelProperty(value = "主键", required = true, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "仓库名称", example = "1")
private String locationName;
/**
* 别名
*/
@ApiModelProperty(value = "别名", example = "1")
private String locationNameAlias;
/**
* 状态
*/
@ApiModelProperty(value = "状态:0空闲1使用2不可用", example = "1")
private Integer status;
/**
* 缓存区
*/
@ApiModelProperty(value = "缓存区", example = "1")
private String warehouse;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
}

View File

@ -1,69 +0,0 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Author: liguanghao
* @Date: 2021/11/8 10:28
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "车辆视图对象", description = "用于查询车辆信息")
public class VehicleVo extends BaseVo implements PageVo.ConvertVo{
/**
* 主键自增
*/
@ApiModelProperty(value = "主键", required = true, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称", example = "1")
private String vehicleName;
/**
* 别名
*/
@ApiModelProperty(value = "缩写(别名)", example = "1")
private String vehicleAlias;
/**
* ip
*/
@ApiModelProperty(value = "ip", example = "192.168.0.1")
private String ip;
/**
* 备注
*/
@ApiModelProperty(value = "ip", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
/**
* 描述信息
*/
@ApiModelProperty(value = "车辆状态0-空闲1-占用", example = "1")
private Integer status;
}

View File

@ -1,83 +0,0 @@
package com.mt.wms.basic.vo;
import com.mt.wms.core.base.BaseVo;
import com.mt.wms.core.vo.PageVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @Author: liguanghao
* @Date: 2021/9/27 14:41
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@ApiModel(value = "缓存区视图对象", description = "用于查询缓存区信息")
public class WarehouseVo extends BaseVo implements PageVo.ConvertVo{
/**
* 主键自增
*/
@ApiModelProperty(value = "主键", required = true, example = "1")
private Long id;
/**
* 编码
*/
@ApiModelProperty(value = "编码", example = "1")
private String code;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称", example = "1")
private String warehouseName;
/**
* 规格
*/
@ApiModelProperty(value = "规格", example = "1")
private String spec;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "1")
private String note;
/**
* 描述信息
*/
@ApiModelProperty(value = "描述信息", example = "1")
private String description;
/**
* 英文名称
*/
@ApiModelProperty(value = "英文名称",example = "1")
private String englishName;
/**
* 别名
*/
@ApiModelProperty(value = "别名",example = "1")
private String aliasName;
/**
* 库位数量
*/
@ApiModelProperty(value = "库位数量",example = "1")
private Integer number;
/**
* 状态 0初始化1已占用
*/
@ApiModelProperty(value = "状态", example = "1")
private Integer status;
}

View File

@ -1,34 +0,0 @@
<?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>wms</artifactId>
<groupId>com.mt</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-common</artifactId>
<dependencies>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-core</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>${aliyun-java-sdk-core.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>${aliyun-java-sdk-dysmsapi.version}</version>
</dependency>
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,62 +0,0 @@
package com.mt.wms.common.controller;
import com.mt.wms.common.params.DownloadFileParam;
import com.mt.wms.common.params.UploadFileBase64Param;
import com.mt.wms.common.service.AttachmentService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author jiff
* @date 2021/01/12
* @since 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_COMMON + "attachment")
@Slf4j
@Api(value = "附件管理", tags = "附件管理", hidden = false)
public class AttachmentController extends BaseController {
@Autowired
private AttachmentService attachmentService;
@PostMapping(value = "uploadFile")
@ApiOperation(value = "上传文件", notes = "上传文件")
public R<List<SysFileVo>> uploadFile(@ApiParam(value = "文件类型", required = true) @NotEmpty(message = "文件类型编码不得为空") @RequestParam String typeCode) {
return attachmentService.uploadFile(typeCode);
}
@PostMapping("uploadFileBase64")
@ApiOperation(value = "文件上传(base64字符串方式)", notes = "文件上传")
public R<SysFileVo> uploadFileBase64(@Validated @RequestBody UploadFileBase64Param param) {
return attachmentService.uploadFileBase64(param);
}
@PostMapping("uploadFileFormData")
@ApiOperation(value = "文件上传(form表单形式)", notes = "文件上传")
public R<List<SysFileVo>> uploadFileFormData(@ApiParam(value = "文件类型", required = true) @NotEmpty(message = "文件类型编码不得为空") @RequestParam String typeCode, @ApiParam(value = "文件附件", required = true) @NotNull(message = "文件附件不能为空") @RequestParam("files") MultipartFile[] files) {
return attachmentService.uploadFileFormData(typeCode, files);
}
@GetMapping(value = "downloadFile")
@ApiOperation(value = "下载文件", notes = "下载文件")
public R<Object> downloadFile(@Validated DownloadFileParam param) {
return attachmentService.downloadFile(param);
}
}

View File

@ -1,49 +0,0 @@
package com.mt.wms.common.controller;
import com.mt.wms.common.service.CommonService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
@Api(value = "公共模块", tags = "公共模块")
@RestController
@RequestMapping(CommonConstant.API_MODULE_COMMON)
@Slf4j
@RequiredArgsConstructor
public class CommonController extends BaseController {
private final CommonService commonService;
@PostMapping(value = "downloadFile")
@ApiOperation(value = "获取附件下载地址", notes = "获取附件下载地址")
public R<SysFileVo> downloadFile(@Validated @RequestBody IdParam idParam) {
return successful(commonService.downloadFile(idParam.getId()));
}
@GetMapping(value = "downLoadFileUrl")
@ApiOperation(value = "文件的预览", notes = "文件的预览")
public R<Object> downloadFile(@Validated IdParam idParam, HttpServletResponse response) {
return commonService.downLoadFileUrl(idParam, response);
}
}

View File

@ -1,17 +0,0 @@
package com.mt.wms.common.mapper;
import org.springframework.stereotype.Repository;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
@Repository
public interface CommonMapper {
}

View File

@ -1,46 +0,0 @@
/*
* Copyright (c) 2020.
* http://www.ulabcare.com
*/
package com.mt.wms.common.params;
import com.mt.wms.core.base.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* 下载文件对象入参
*
* @author jiff
* @date 2021/01/12
* @since 1.0
**/
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
@ApiModel(value = "下载文件信息对象", description = "下载文件信息对象")
public class DownloadFileParam extends BaseParam {
@ApiModelProperty(value = "附件ID", example = "1")
@NotNull(message = "附件ID不能为空")
private Long attachmentId;
@ApiModelProperty(value = "下载方式: 0、预览1、下载", example = "0")
@NotNull(message = "下载方式不能为空")
private String type;
@ApiModelProperty(value = "下载文件自定义文件名", example = "报销发票")
private String fileName;
@ApiModelProperty(value = "压缩尺寸取值范围0.00--1.00),图片文件有效", example = "1")
private float scale = 1f;
@ApiModelProperty(value = "压缩质量取值范围0.00--1.00),图片文件有效", example = "1")
private float outputQuality = 1f;
}

View File

@ -1,38 +0,0 @@
package com.mt.wms.common.params;
import com.mt.wms.core.base.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
/**
* <p>
* 文件上传base64字符串方式
* </p>
*
* @author jiff
* @date 2021/01/12
* @since 1.0
**/
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
@ApiModel("文件上传base64字符串方式")
public class UploadFileBase64Param extends BaseParam {
@ApiModelProperty("文件类型编码")
@NotEmpty(message = "文件类型编码不能为空")
private String typeCode;
@ApiModelProperty("文件名")
@NotEmpty(message = "文件名不能为空")
private String fileName;
@ApiModelProperty("base64字符串")
@NotEmpty(message = "文件base64字符串不能为空")
private String fileBase64Str;
}

View File

@ -1,56 +0,0 @@
package com.mt.wms.common.service;
import com.mt.wms.common.params.DownloadFileParam;
import com.mt.wms.common.params.UploadFileBase64Param;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.R;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* @author jiff
* @date 2021/01/12
* @since 1.0
*/
public interface AttachmentService {
/**
* 文件上传(支持多文件上传)
*
* @param typeCode
* @return
*/
R<List<SysFileVo>> uploadFile(String typeCode);
/**
* 文件上传
*
* @param uploadFileBase64Param 上传文件对象
* @return
*/
R<SysFileVo> uploadFileBase64(UploadFileBase64Param uploadFileBase64Param);
/**
* 文件上传(form表单形式)
*
* @param typeCode
* @param files
* @return
*/
R<List<SysFileVo>> uploadFileFormData(String typeCode, MultipartFile[] files);
/**
* 文件下载下载方式: 0预览1下载
*
* @param downloadFileParam
* @return
*/
R<Object> downloadFile(DownloadFileParam downloadFileParam);
}

View File

@ -1,38 +0,0 @@
package com.mt.wms.common.service;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.R;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
public interface CommonService {
/**
* 获取附件下载地址
*
* @param fileId 附件ID
* @return 附件下载地址
*/
SysFileVo downloadFile(Long fileId);
/**
* 附件预览
*
* @param idParam 附件ID
* @return 附件下载地址
*/
R<Object> downLoadFileUrl(IdParam idParam, HttpServletResponse response);
}

View File

@ -1,231 +0,0 @@
package com.mt.wms.common.service.impl;
import com.mt.wms.common.params.DownloadFileParam;
import com.mt.wms.common.params.UploadFileBase64Param;
import com.mt.wms.common.service.AttachmentService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.config.CommonConfig;
import com.mt.wms.core.dal.entity.SysFile;
import com.mt.wms.core.dal.service.SysFileServiceBiz;
import com.mt.wms.core.utils.*;
import com.mt.wms.core.vo.R;
import lombok.extern.log4j.Log4j2;
import net.coobird.thumbnailator.Thumbnails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* @author jiff
* @date 2021/1/12
* @since 1.0
*/
@Log4j2
@Service
public class AttachmentServiceImpl extends BaseService implements AttachmentService {
@Autowired
private SysFileServiceBiz sysFileServiceBiz;
@Autowired
private CommonConfig commonConfig;
/**
* 文件上传(支持多文件上传)
*
* @param typeCode
* @return
*/
@Override
public R<List<SysFileVo>> uploadFile(String typeCode) {
//获取上传文件路径
String uploadPath = commonConfig.getUploadPath() + typeCode + "/";
log.debug("文件的上传路径:" + uploadPath);
File file = new File(uploadPath);
//判断文件是否存在不存在则创建
if (!file.exists()) {
file.mkdirs();
}
List<SysFile> fileList = new ArrayList<>();
//多文件上传
CommonsMultipartResolver crm = new CommonsMultipartResolver(getHttpServletRequest().getSession().getServletContext());
if (crm.isMultipart(getHttpServletRequest())) {
MultipartHttpServletRequest mRequest = (MultipartHttpServletRequest) (getHttpServletRequest());
Iterator<String> files = mRequest.getFileNames();
log.debug("多文件" + files.toString());
while (files.hasNext()) {
MultipartFile mFile = mRequest.getFile(files.next());
log.debug("文件" + mFile.toString());
// 文件名
String fileName = mFile.getOriginalFilename();
//新文件名
String newFileName = DateUtil.getCurrentDateTime() + RandomCodeGenerator.numericCode(4);
// 文件扩展名
String fileExtensionName = FileUtil.getExtensionName(fileName);
//上传文件的真实路径
String filePath = uploadPath + newFileName + "." + fileExtensionName;
File localPath = new File(filePath);
try {
mFile.transferTo(localPath);
//保存文件信息
SysFile sysFile = new SysFile();
sysFile.setTypeCode(typeCode);
sysFile.setFileUrl(filePath);
sysFile.setFileName(newFileName);
if (getLoginUser() != null) {
setCommonField(sysFile);
} else {
sysFile.setCreateTime(LocalDateTime.now());
sysFile.setCreator(1L);
sysFile.setCreatorName("system");
}
fileList.add(sysFile);
} catch (Exception e) {
e.printStackTrace();
log.error("文件上传失败:" + e.getMessage());
return R.failed("文件上传失败");
}
}
}
sysFileServiceBiz.saveBatch(fileList);
return R.ok(BeanUtils.copyList(fileList, SysFileVo.class));
}
/**
* 文件上传
*
* @param uploadFileBase64Param 上传文件对象
* @return
*/
@Override
public R<SysFileVo> uploadFileBase64(UploadFileBase64Param uploadFileBase64Param) {
return null;
}
/**
* 文件上传(form表单形式)
*
* @param typeCode
* @param files
* @return
*/
@Override
public R<List<SysFileVo>> uploadFileFormData(String typeCode, MultipartFile[] files) {
//获取上传文件路径
String uploadPath = commonConfig.getUploadPath() + typeCode + "/";
log.debug("文件的上传路径:" + uploadPath);
File file = new File(uploadPath);
//判断文件是否存在不存在则创建
if (!file.exists()) {
file.mkdirs();
}
List<SysFile> fileList = new ArrayList<>();
for (MultipartFile multipartFile : files) {
log.debug("上传文件" + multipartFile.toString());
// 文件名
String fileName = multipartFile.getOriginalFilename();
//新文件名
String newFileName = DateUtil.getCurrentDateTime() + RandomCodeGenerator.numericCode(4);
// 文件扩展名
String fileExtensionName = FileUtil.getExtensionName(fileName);
//上传文件的真实路径
String filePath = uploadPath + newFileName + "." + fileExtensionName;
File localPath = new File(filePath);
try {
multipartFile.transferTo(localPath);
//保存文件信息
SysFile sysFile = new SysFile();
sysFile.setTypeCode(typeCode);
sysFile.setFileUrl(filePath);
sysFile.setFileName(newFileName);
if (getLoginUser() != null) {
setCommonField(sysFile);
} else {
sysFile.setCreateTime(LocalDateTime.now());
sysFile.setCreator(1L);
sysFile.setCreatorName("system");
}
fileList.add(sysFile);
} catch (Exception e) {
e.printStackTrace();
log.error("文件上传失败:" + e.getMessage());
return R.failed("文件上传失败");
}
}
sysFileServiceBiz.saveBatch(fileList);
return R.ok(BeanUtils.copyList(fileList, SysFileVo.class));
}
/**
* 文件下载下载方式: 0预览1下载
*
* @param downloadFileParam
* @return
*/
@Override
public R<Object> downloadFile(DownloadFileParam downloadFileParam) {
//根据id获取附件信息
SysFile sysFile = sysFileServiceBiz.getById(downloadFileParam.getAttachmentId());
if (sysFile == null) {
return R.failed("文件不存在");
}
HttpServletResponse response = getHttpServletResponse();
// 文件路径
String path = sysFile.getFileUrl();
File file = new File(path);
String fileName = file.getName();
// 文件扩展名
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
try {
//判断下载方式是下载本地还是预览文件
if (downloadFileParam.getType().equals("1")) {
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename=" + new String((StringUtils.isEmpty(downloadFileParam.getFileName()) ? sysFile.getFileName() + "." + suffix : downloadFileParam.getFileName() + "." + suffix).getBytes(Charset.forName("GBK")), StandardCharsets.ISO_8859_1));
} else {
URL u = new URL("file:///" + path);
String contentType = u.openConnection().getContentType();
response.setContentType(contentType);
response.setHeader("Content-Disposition", "inline; filename=" + new String((StringUtils.isEmpty(downloadFileParam.getFileName()) ? sysFile.getFileName() + "." + suffix : downloadFileParam.getFileName() + "." + suffix).getBytes(Charset.forName("GBK")), StandardCharsets.ISO_8859_1));
}
//判断是否是图片格式
ServletOutputStream outputStream = response.getOutputStream();
if ("PNGpngJPGjpg".contains(suffix)) {
Thumbnails.of(file)
.scale(downloadFileParam.getScale())
.outputQuality(downloadFileParam.getOutputQuality())
.toOutputStream(outputStream);
} else {
FileInputStream inputStream = new FileInputStream(file);
byte[] buffer = new byte[1024];
int i = -1;
while ((i = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, i);
}
inputStream.close();
}
outputStream.flush();
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
log.error("下载文件失败:{}", e.getMessage());
return R.failed("下载文件失败");
}
return null;
}
}

View File

@ -1,101 +0,0 @@
package com.mt.wms.common.service.impl;
import com.mt.wms.common.mapper.CommonMapper;
import com.mt.wms.common.service.CommonService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.config.AliyunSmsConfig;
import com.mt.wms.core.config.CommonConfig;
import com.mt.wms.core.config.TencentCloudConfig;
import com.mt.wms.core.config.TencentCloudSmsConfig;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.vo.R;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class CommonServiceImpl extends BaseService implements CommonService {
private final CommonMapper mCommonMapper;
private final CommonConfig mCommonConfig;
private final AliyunSmsConfig mAliyunSmsConfig;
private final TencentCloudSmsConfig tencentCloudSmsConfig;
private final TencentCloudConfig tencentCloudConfig;
private final CommonConfig commonConfig;
/**
* 获取附件下载地址
*
* @param fileId 附件ID
* @return 附件下载地址
*/
@Override
public SysFileVo downloadFile(Long fileId) {
return new SysFileVo().setFileId(null).setFileName(null).setFileUrl(mCommonConfig.getApiHost() + "/common/" + "/home".replace(mCommonConfig.getUploadPath(), ""));
}
@Override
public R<Object> downLoadFileUrl(IdParam idParam, HttpServletResponse response) {
// 文件扩展名
String path = null;
File picFile = new File(path);
String fileName = picFile.getName();
try {
// 文件扩展名
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
URL u = new URL("file:///" + path);
String contentType = null;
contentType = u.openConnection().getContentType();
response.setContentType(contentType);
response.setHeader("Content-Disposition", "inline;filename=" + new String(("dw." + suffix).getBytes("GBK"), "ISO8859_1"));
ServletOutputStream outputStream = response.getOutputStream();
FileInputStream inputStream = new FileInputStream(picFile);
byte[] buffer = new byte[1024];
int i = -1;
while ((i = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, i);
}
outputStream.flush();
outputStream.close();
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
e.printStackTrace();
log.error("文件预览失败:" + e.getMessage());
return R.failed("文件预览失败");
}
return null;
}
}

View File

@ -1,35 +0,0 @@
package com.mt.wms.common.vo;
import com.mt.wms.core.base.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/8
* @since 1.0
*/
@ApiModel("文件对象")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
public class SysFileVo extends BaseVo {
@ApiModelProperty("文件ID")
private Long fileId;
@ApiModelProperty("文件名称")
private String fileName;
@ApiModelProperty("类型 1图片 2PDF")
private Integer fileType;
@ApiModelProperty("下载路径")
private String fileUrl;
}

View File

@ -1,6 +0,0 @@
<?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.mt.wms.common.mapper.CommonMapper">
</mapper>

View File

@ -1,219 +0,0 @@
<?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>wms</artifactId>
<groupId>com.mt</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-core</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp3.version}</version>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
</dependency>
<!--Lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<!-- commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!--文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<!-- pdf工具类 -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
<!-- pdf字体类 -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
<version>5.2.0</version>
</dependency>
<!-- pdf转图片 -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdfbox.version}</version>
</dependency>
<!-- pdf转图片工具类 -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>${pdfbox.version}</version>
</dependency>
<!-- 条形码转换工具 -->
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j-light</artifactId>
<version>${barcode4j.version}</version>
</dependency>
<!-- springfox-swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<scope>compile</scope>
</dependency>
<!-- dom4j -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</dependency>
<!-- hutool第三方工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- wechat -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>${binarywang-weixin.version}</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-pay</artifactId>
<version>${binarywang-weixin.version}</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-miniapp</artifactId>
<version>${binarywang-weixin.version}</version>
</dependency>
<!-- junit -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Excel工具包 -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>${cn.afterturn.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${cn.afterturn.version}</version>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- redisson用于分布式锁 -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>${redisson.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>${tencentcloud-sdk-java.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -1,24 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core;
import com.mt.wms.core.config.AutoConfiguration;
import org.springframework.context.annotation.Import;
import java.lang.annotation.*;
/**
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import(AutoConfiguration.class)
@Documented
@Inherited
public @interface EnableMesCore {
}

View File

@ -1,154 +0,0 @@
package com.mt.wms.core;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.mt.wms.core.utils.StringUtils;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* Created by FanYi on 2018-08-27 16:38.
**/
public class MyGenerator {
/**
* 数据库地址
*/
static String dbUrl = "jdbc:mysql://localhost:3306/mt_wms_qj";
static String userName = "root";
static String password = "123456";
/**
* 是否去掉生成实体的属性名前缀
*/
static String[] fieldPrefix = new String[]{"t_"};
/**
* 代码生成器
*
* @param include 需要包含的表名允许正则表达式
*/
private static void generateByTablesWithInjectConfig(String[] include) {
File file = new File("");
String path = file.getAbsolutePath();
// 全局配置
GlobalConfig config = new GlobalConfig();
// 开启 activeRecord 模式
config.setActiveRecord(true)
//生成目录
.setOutputDir(path + "/src/main/java")
//生成人
.setAuthor("mt")
// 是否覆盖文件
.setFileOverride(true)
// XML ResultMap
.setBaseResultMap(true)
// XML columList
.setBaseColumnList(true)
.setOpen(false)
// 自定义文件命名注意 %s 会自动填充表实体属性
.setMapperName("%sMapper")
.setXmlName("%sMapper")
.setServiceName("%sServiceBiz")
.setServiceImplName("%sServiceBizImpl");
// 数据源配置
DataSourceConfig dataSourceConfig = new DataSourceConfig();
dataSourceConfig.setDbType(DbType.MYSQL)
.setUrl(dbUrl)
.setUsername(userName)
.setPassword(password)
.setDriverName("com.mysql.jdbc.Driver");
// 策略配置
StrategyConfig strategyConfig = new StrategyConfig();
strategyConfig.setVersionFieldName("version")
.setLogicDeleteFieldName("valid")
.setCapitalMode(true)
.setChainModel(true)
.setEntityColumnConstant(true)
.setEnableSqlFilter(false)
.setNaming(NamingStrategy.underline_to_camel)
.setEntityLombokModel(true)
.setTablePrefix(fieldPrefix)
.setEntityTableFieldAnnotationEnable(true)
//修改替换成你需要的表名多个表名传数组
.setInclude(include);
// 包配置
PackageConfig packageConfig = new PackageConfig();
packageConfig.setParent("com.mt.wms.core.dal")
.setEntity("entity")
.setMapper("mapper")
.setService("service")
.setServiceImpl("service.impl")
.setXml("mapper");
//模板配置
TemplateConfig templateConfig = new TemplateConfig();
templateConfig.setController(null);
// 代码生成器
// AutoGenerator generator = new AutoGenerator();
MybatisPlusGenerator generator = new MybatisPlusGenerator();
generator.setExcludeTables("t_service");
generator.setGlobalConfig(config)
.setDataSource(dataSourceConfig)
.setStrategy(strategyConfig)
.setPackageInfo(packageConfig)
.setTemplate(templateConfig)
.execute();
}
@Test
public void generateCodeWithInjectConfigForAllTable() {
generateByTablesWithInjectConfig(new String[]{"t_question_answer"});
}
public static void main(String[] args) {
generateByTablesWithInjectConfig(new String[]{"t_goods[a-zA-Z0-9_]*"});
}
/**
*
*/
public static class MybatisPlusGenerator extends AutoGenerator {
/**
* 需要排除的表名允许正则表达式
*/
private String[] excludeTables = null;
@Override
protected ConfigBuilder pretreatmentConfigBuilder(ConfigBuilder config) {
super.pretreatmentConfigBuilder(config);
if (excludeTables != null && excludeTables.length > 0) {
List<String> excludeTableList = Arrays.stream(excludeTables).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
config.setTableInfoList(config.getTableInfoList().stream()
.filter(tableInfo -> {
boolean excludeFlag = false;
String tableName = tableInfo.getName();
for (String excludeTableName : excludeTableList) {
if (excludeTableName.equalsIgnoreCase(tableName) || Pattern.matches(excludeTableName, tableName)) {
excludeFlag = true;
break;
}
}
return !excludeFlag;
}).collect(Collectors.toList()));
}
return config;
}
public AutoGenerator setExcludeTables(String... excludeTables) {
this.excludeTables = excludeTables;
return this;
}
}
}

View File

@ -1,418 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.api;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.mt.wms.core.base.IErrorCode;
import com.mt.wms.core.exception.ApiException;
import java.util.Collection;
import java.util.Map;
/**
* 接口参数断言工具类
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public class Assert {
protected Assert() {
// to do noting
}
/**
* 断言参数等于0否则抛出错误消息
*
* @param num 断言参数
* @param errorCode 错误消息
*/
public static void eqZero(Integer num, IErrorCode errorCode) {
if (num == null || num != 0) {
Assert.fail(errorCode);
}
}
/**
* 断言参数等于0否则抛出错误消息
*
* @param num 断言参数
* @param message 错误消息
*/
public static void eqZero(Integer num, String message) {
if (num == null || num != 0) {
Assert.fail(message);
}
}
/**
* 断言参数小于0否则抛出错误消息
*
* @param num 断言参数
* @param errorCode 错误消息
*/
public static void ltZero(Integer num, IErrorCode errorCode) {
if (num == null || num >= 0) {
Assert.fail(errorCode);
}
}
/**
* 断言参数小于0否则抛出错误消息
*
* @param num 断言参数
* @param message 错误消息
*/
public static void ltZero(Integer num, String message) {
if (num == null || num >= 0) {
Assert.fail(message);
}
}
/**
* 断言小于等于0否则抛出错误消息
*
* @param num 断言参数
* @param errorCode 错误消息
*/
public static void leZero(Integer num, IErrorCode errorCode) {
if (num == null || num > 0) {
Assert.fail(errorCode);
}
}
/**
* 断言小于等于0否则抛出错误消息
*
* @param num 断言参数
* @param message 错误消息
*/
public static void leZero(Integer num, String message) {
if (num == null || num > 0) {
Assert.fail(message);
}
}
/**
* 断言参数大于0否则抛出错误消息
*
* @param num 断言参数
* @param errorCode 错误消息
*/
public static void gtZero(Integer num, IErrorCode errorCode) {
if (num == null || num <= 0) {
Assert.fail(errorCode);
}
}
/**
* 断言参数大于0否则抛出错误消息
*
* @param num 断言参数
* @param message 错误消息
*/
public static void gtZero(Integer num, String message) {
if (num == null || num <= 0) {
Assert.fail(message);
}
}
/**
* 断言大于等于0否则抛出错误消息
*
* @param num 断言参数
* @param errorCode 错误消息
*/
public static void geZero(Integer num, IErrorCode errorCode) {
if (num == null || num < 0) {
Assert.fail(errorCode);
}
}
/**
* 断言大于等于0否则抛出错误消息
*
* @param num 断言参数
* @param message 错误消息
*/
public static void geZero(Integer num, String message) {
if (num == null || num < 0) {
Assert.fail(message);
}
}
/**
* 断言num1大于num2否则抛出错误消息
*
* @param num1 断言参数1
* @param num2 断言参数2
* @param errorCode 错误消息
*/
public static void gt(Integer num1, Integer num2, IErrorCode errorCode) {
if (num1 <= num2) {
Assert.fail(errorCode);
}
}
/**
* 断言num1大于num2否则抛出错误消息
*
* @param num1 断言参数1
* @param num2 断言参数2
* @param message 错误消息
*/
public static void gt(Integer num1, Integer num2, String message) {
if (num1 <= num2) {
Assert.fail(message);
}
}
/**
* 断言num1大于等于num2否则抛出错误消息
*
* @param num1 断言参数1
* @param num2 断言参数2
* @param errorCode 错误消息
*/
public static void ge(Integer num1, Integer num2, IErrorCode errorCode) {
if (num1 < num2) {
Assert.fail(errorCode);
}
}
/**
* 断言num1大于等于num2否则抛出错误消息
*
* @param num1 断言参数1
* @param num2 断言参数2
* @param message 错误消息
*/
public static void ge(Integer num1, Integer num2, String message) {
if (num1 < num2) {
Assert.fail(message);
}
}
/**
* 断言obj1 eq obj2否则抛出错误消息
*
* @param obj1 断言参数1
* @param obj2 断言参数2
* @param errorCode 错误消息
*/
public static void eq(Object obj1, Object obj2, IErrorCode errorCode) {
if (!obj1.equals(obj2)) {
Assert.fail(errorCode);
}
}
/**
* 断言obj1 eq obj2否则抛出错误消息错误码统一为{@link IErrorCode#CODE_FAILED}
*
* @param obj1 断言参数1
* @param obj2 断言参数2
* @param message 错误消息
*/
public static void eq(Object obj1, Object obj2, String message) {
if (!obj1.equals(obj2)) {
Assert.fail(message);
}
}
/**
* 断言参数为true否则抛出错误消息
*
* @param condition 断言参数
* @param errorCode 错误消息
*/
public static void isTrue(boolean condition, IErrorCode errorCode) {
if (!condition) {
Assert.fail(errorCode);
}
}
/**
* 断言参数为false否则抛出错误消息
*
* @param condition 断言参数
* @param errorCode 错误消息
*/
public static void isFalse(boolean condition, IErrorCode errorCode) {
if (condition) {
Assert.fail(errorCode);
}
}
/**
* 断言给定的参数都为null否则抛出错误消息
*
* @param errorCode 错误消息
* @param conditions 断言参数
*/
public static void isNull(IErrorCode errorCode, Object... conditions) {
if (ObjectUtils.isNotNull(conditions)) {
Assert.fail(errorCode);
}
}
/**
* 断言给定的参数都不为null否则抛出错误消息
*
* @param errorCode 错误消息
* @param conditions 断言参数
*/
public static void notNull(IErrorCode errorCode, Object... conditions) {
if (ObjectUtils.isNull(conditions)) {
Assert.fail(errorCode);
}
}
/**
* 断言给定的参数都为null否则抛出错误消息错误码统一为{@link IErrorCode#CODE_FAILED}
*
* @param message 错误消息
* @param conditions 断言参数
*/
public static void isNull(String message, Object... conditions) {
if (ObjectUtils.isNotNull(conditions)) {
Assert.fail(message);
}
}
/**
* 断言给定的参数都不为null否则抛出错误消息错误码统一为{@link IErrorCode#CODE_FAILED}
*
* @param message 错误消息
* @param conditions 断言参数
*/
public static void notNull(String message, Object... conditions) {
if (ObjectUtils.isNull(conditions)) {
Assert.fail(message);
}
}
/**
* <p>
* 抛出失败消息
* </p>
*
* @param errorCode 异常错误码
*/
public static void fail(IErrorCode errorCode) {
throw new ApiException(errorCode);
}
/**
* 根据断言条件判断是否抛出错误消息
*
* @param condition 断言条件true则抛出错误消息否则正常执行
* @param errorCode 错误消息
*/
public static void fail(boolean condition, IErrorCode errorCode) {
if (condition) {
Assert.fail(errorCode);
}
}
/**
* <p>
* 抛出失败消息
* </p>
*
* @param message 错误消息
*/
public static void fail(String message) {
throw new ApiException(message);
}
/**
* 根据断言条件判断是否抛出错误消息
*
* @param condition 断言条件true则抛出错误消息否则正常执行
* @param message 错误消息
*/
public static void fail(boolean condition, String message) {
if (condition) {
Assert.fail(message);
}
}
/**
* 断言参数不为空否则抛出错误消息
*
* @param array 断言参数
* @param errorCode 错误消息
*/
public static void notEmpty(Object[] array, IErrorCode errorCode) {
if (ObjectUtils.isEmpty(array)) {
Assert.fail(errorCode);
}
}
/**
* 断言数组中的对象没有null元素否则抛出错误消息
*
* @param array 断言参数
* @param errorCode 错误消息
*/
public static void noNullElements(Object[] array, IErrorCode errorCode) {
if (array != null) {
for (Object element : array) {
if (element == null) {
Assert.fail(errorCode);
}
}
}
}
/**
* 断言参数不为空否则抛出错误消息
*
* @param collection 断言参数
* @param errorCode 错误消息
*/
public static void notEmpty(Collection<?> collection, IErrorCode errorCode) {
if (CollectionUtils.isNotEmpty(collection)) {
Assert.fail(errorCode);
}
}
/**
* 断言参数不为空否则抛出错误消息
*
* @param map 断言参数
* @param errorCode 错误消息
*/
public static void notEmpty(Map<?, ?> map, IErrorCode errorCode) {
if (ObjectUtils.isEmpty(map)) {
Assert.fail(errorCode);
}
}
/**
* 断言对象是给定类型的实例否则抛出错误消息
*
* @param type 断言类型
* @param obj 断言对象
* @param errorCode 错误消息
*/
public static void isInstanceOf(Class<?> type, Object obj, IErrorCode errorCode) {
Assert.notNull(errorCode, type);
if (!type.isInstance(obj)) {
Assert.fail(errorCode);
}
}
public static void isAssignable(Class<?> superType, Class<?> subType, IErrorCode errorCode) {
Assert.notNull(errorCode, superType);
if (subType == null || !superType.isAssignableFrom(subType)) {
Assert.fail(errorCode);
}
}
}

View File

@ -1,20 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
import org.springframework.web.bind.annotation.RestController;
/**
* 控制器基类
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
@RestController
public abstract class BaseController extends BaseSupport {
}

View File

@ -1,16 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
import java.io.Serializable;
/**
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public class BaseDto implements Serializable {
}

View File

@ -1,18 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
import java.io.Serializable;
/**
* 接口请求参数基类
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public class BaseParam implements Serializable {
}

View File

@ -1,18 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
/**
* 服务基类
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public abstract class BaseService extends BaseSupport {
}

View File

@ -1,268 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
import com.alibaba.fastjson.JSON;
import com.mt.wms.core.enums.WhetherEnum;
import com.mt.wms.core.dto.LoginUser;
import com.mt.wms.core.vo.R;
import lombok.Builder;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.core.NamedThreadLocal;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 接口支持基类
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public abstract class BaseSupport {
private static final ThreadLocal<LoginUser> loginUserHolder = new NamedThreadLocal<>("LoginUser");
/**
* 获取当前登录用户信息
*
* @return
*/
protected LoginUser getLoginUser() {
// 后续完善拦截器再使用该方式
// LoginUser loginUser = loginUserHolder.get();
// if (loginUser != null) {
// return loginUser;
// }
HttpSession session = getHttpServletRequest().getSession(false);
LoginUser loginUser = null;
if (session != null) {
String loginUserJson = (String) session.getAttribute(LoginUser.HTTP_HEADER_NAME);
if (StringUtils.isNotBlank(loginUserJson)) {
loginUser = JSON.parseObject(loginUserJson, LoginUser.class);
return loginUser;
}
}
return null;
}
/**
* 获取当前http请求对象
*
* @return
*/
protected HttpServletRequest getHttpServletRequest() {
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
}
/**
* 获取当前http响应对象
*
* @return
*/
protected HttpServletResponse getHttpServletResponse() {
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
}
/**
* <p>
* 请求成功
* </p>
*
* @param data 数据内容
* @param <T> 对象泛型
* @return
*/
protected <T> R<T> successful(T data) {
return R.ok(data);
}
/**
* <p>
* 请求成功
* </p>
*
* @param msg 提示内容
* @param data 数据内容
* @param <T> 对象泛型
* @return
*/
protected <T> R<T> successful(String msg, T data) {
return R.ok(msg, data);
}
/**
* <p>
* 请求成功
* </p>
* @param code 正确码
* @param msg 提示内容
* @param data 数据内容
* @param <T> 对象泛型
* @return
*/
protected <T> R<T> successful(int code,String msg, T data) {
return R.ok(code,msg, data);
}
/**
* <p>
* 请求失败
* </p>
*
* @param code 错误码
* @param msg 提示内容
* @param <T> 对象泛型
* @return
*/
protected <T> R<T> failed(int code, String msg) {
return R.failed(code, msg);
}
/**
* <p>
* 请求失败
* </p>
*
* @param msg 提示内容
* @param <T> 对象泛型
* @return
*/
protected <T> R<T> failed(String msg) {
return R.failed(msg);
}
/**
* <p>
* 请求失败
* </p>
*
* @param errorCode 请求错误码
* @param <T> 对象泛型
* @return
*/
protected <T> R<T> failed(IErrorCode errorCode) {
return R.failed(errorCode);
}
protected R<String> addResult(boolean status) {
return status ? successful("添加成功", null) : failed("添加失败");
}
protected R<String> editResult(boolean status) {
return status ? successful("修改成功", null) : failed("修改失败");
}
protected R<String> delResult(boolean status) {
return status ? successful("删除成功", null) : failed("删除失败");
}
protected R<String> enabledResult(boolean status) {
return status ? successful("已启用", null) : failed("已禁用");
}
/**
* 设置公共字段值一般用于创建新记录包含以下字段
*
* <p>
* {@link CommonField#enabled}<br>
* {@link CommonField#valid}<br>
* {@link CommonField#creator}<br>
* {@link CommonField#creatorName}<br>
* {@link CommonField#createTime}<br>
* {@link CommonField#updater}<br>
* {@link CommonField#updaterName}<br>
* {@link CommonField#updateTime}<br>
* </p>
*
* @param t 需要设置的对象
* @param ignoreProperties 忽略的字段
* @param <T>
*/
protected <T extends Serializable> T setCommonField(T t, String... ignoreProperties) {
CommonField commonField = CommonField.builder()
.enabled(WhetherEnum.YES.getValue())
.valid(WhetherEnum.YES.getValue())
.createTime(LocalDateTime.now())
.creator(getLoginUser().getUserId())
.creatorName(getLoginUser().getUserName())
.updateTime(LocalDateTime.now())
.updater(getLoginUser().getUserId())
.updaterName(getLoginUser().getUserName())
.build();
BeanUtils.copyProperties(commonField, t, ignoreProperties);
return t;
}
/**
* 设置更新的公共字段值一般用于更新记录包含以下字段
*
* <p>
* {@link CommonField#updater}<br>
* {@link CommonField#updaterName}<br>
* {@link CommonField#updateTime}<br>
* </p>
*
* @param t 需要设置的对象
* @param <T>
*/
protected <T extends Serializable> T setUpdateCommonField(T t) {
CommonField commonField = CommonField.builder()
.updater(getLoginUser().getUserId())
.updaterName(getLoginUser().getUserName())
.updateTime(LocalDateTime.now())
.build();
BeanUtils.copyProperties(commonField, t, "enabled", "valid");
return t;
}
@Data
@Builder
private static class CommonField implements Serializable {
/**
* 启用状态:0 停用1启用
*/
private Integer enabled;
/**
* 删除标志是否有效:1 可用 0不可用
*/
private Integer valid;
/**
* 创建人
*/
private Long creator;
/**
* 创建人
*/
private String creatorName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新人
*/
private Long updater;
/**
* 更新人
*/
private String updaterName;
/**
* 更新时间
*/
private LocalDateTime updateTime;
}
}

View File

@ -1,18 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
import java.io.Serializable;
/**
* 视图对象基类
*
* @author jiff
* @date 2018/11/7
* @since 1.0
*/
public class BaseVo implements Serializable {
}

View File

@ -1,41 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
import java.io.Serializable;
/**
* 枚举接口
*
* @param <T>
* @author jiff
* @date 2018/11/7
* @since 1.0
*/
public interface IEnum<T extends Serializable> {
/**
* 数据值
*
* @return 数据值
*/
T getValue();
/**
* 标签名
*
* @return 标签名
*/
String getLabel();
/**
* 备注对数据值进行详细说明
*
* @return 备注
*/
String getRemark();
}

View File

@ -1,63 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
/**
* api错误码定义
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public interface IErrorCode {
/**
* 成功
*/
int CODE_SUCCESSFUL = 0;
/**
* 失败
*/
int CODE_FAILED = 1;
/**
* 无效的请求参数
*/
int CODE_INVALID_PARAMETER = 2;
/**
* 数据未授权
*/
int CODE_FORBIDDEN_DATA = 9;
/**
* 用户已存在
*/
int CODE_USER_EXISTENT = 10;
/**
* 用户不存在
*/
int CODE_USER_NON_EXISTENT = 11;
/**
* 用户未登录
*/
int CODE_UNAUTHORIZED = 401;
/**
* 用户未授权
*/
int CODE_FORBIDDEN = 403;
/**
* 错误编码0成功 否则失败
*
* @return 错误码0成功 否则失败
*/
int getCode();
/**
* 错误描述
*
* @return 错误描述
*/
String getMsg();
}

View File

@ -1,58 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.base;
import java.util.List;
/**
* 树接口
*
* @param <T> 泛型参数
* @author jiff
* @date 2018/11/27
* @since 1.0
*/
public interface ITree<T extends ITree> {
/**
* 主键
*
* @return ID
*/
Long getId();
/**
* 父ID
*
* @return 父ID
*/
Long getParentId();
/**
* 获取子列表
*
* @return 子列表
*/
List<T> getChildren();
/**
* 设置子列表
*
* @param children 子列表
* @return 当前对象
*/
T setChildren(List<T> children);
/**
* 设置选中状态
*
* @param checked 选中状态true选中否则未选中
* @return 当前对象
*/
default T setChecked(boolean checked) {
return (T) this;
}
}

View File

@ -1,43 +0,0 @@
/*
* Copyright (c) 2020.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
/**
* @author jiff
* @date 2020-03-10
* @since 1.0
*/
@Component
@ConfigurationProperties(prefix = "wms.aliyun.sms")
@Data
@Validated
public class AliyunSmsConfig {
/**
* 开发者标识
*/
@NotEmpty
private String product;
@NotEmpty
private String domain;
/**
* 访问密钥ID
*/
@NotEmpty
private String accessKeyId;
/**
* 访问密钥
*/
@NotEmpty
private String accessKeySecret;
}

View File

@ -1,34 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import com.mt.wms.core.runner.MesApplicationRunner;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
@Configuration
@ComponentScan({"com.mt.wms.core.config", "com.mt.wms.core.handler", "com.mt.wms.core.dal.service", "com.mt.wms.core.service", "com.mt.wms.core.utils"})
public class AutoConfiguration {
/**
* springboot启动之后会调用{@link MesApplicationRunner#run(ApplicationArguments)}方法
*
* @param applicationContext
* @return
*/
@Bean
public ApplicationRunner lisApplicationRunner(ApplicationContext applicationContext) {
return new MesApplicationRunner(applicationContext);
}
}

View File

@ -1,46 +0,0 @@
/*
* Copyright (c) 2020.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
@Component
@ConfigurationProperties(prefix = "wms.common")
@Data
@Validated
public class CommonConfig {
/**
* 文件上传路径
*/
@NotEmpty
private String uploadPath;
/**
* 前端主机地址
*/
@NotEmpty
private String webHost;
/**
* 后端主机地址
*/
@NotEmpty
private String apiHost;
}

View File

@ -1,68 +0,0 @@
package com.mt.wms.core.config;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import java.io.IOException;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
/**
* @author shihairong
* @email <shihairong@zimonet.com>
* @description 针对Long型ID序列化超过16位后导致前端js处理丢失精度改成序列化成String
* @date 2020/12/31 11:37
*/
@Configuration
@ConditionalOnClass(ObjectMapper.class)
@AutoConfigureBefore(JacksonAutoConfiguration.class)
public class JacksonConfig {
@Bean
@Primary
@ConditionalOnMissingBean(ObjectMapper.class)
public ObjectMapper jacksonObjectMapper(Jackson2ObjectMapperBuilder builder) {
ObjectMapper objectMapper = builder.createXmlMapper(false).build();
SimpleModule simpleModule = new SimpleModule();
simpleModule.addDeserializer(LocalDateTime.class, new MesLocalDateTimeDeserializer());
simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
return objectMapper;
}
class MesLocalDateTimeDeserializer extends JsonDeserializer<LocalDateTime> {
@Override
public LocalDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
String text = jsonParser.getText();
if (text == null || text.length() == 0) {
return null;
}
if (text.length() > 10 && text.charAt(10) == 'T') {
if (text.endsWith("Z")) {
return LocalDateTime.ofInstant(Instant.parse(text), ZoneId.systemDefault());
}
}
return LocalDateTime.parse(text, DateTimeFormatter.ISO_LOCAL_DATE_TIME);
}
}
}

View File

@ -1,47 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
@Configuration
public class MybatisPlusConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
// 设置请求的页面大于最大页后操作 true调回到首页false 继续请求 默认false
// paginationInterceptor.setOverflow(false);
// 设置最大单页限制数量默认 500 -1 不受限制
paginationInterceptor.setLimit(500);
// 开启 count join 优化,只针对部分 left join
paginationInterceptor.setCountSqlParser(new JsqlParserCountOptimize(true));
return paginationInterceptor;
}
@Bean
public OptimisticLockerInterceptor optimisticLockerInterceptor() {
return new OptimisticLockerInterceptor();
}
@Bean
public MapperScannerConfigurer mapperScannerConfigurer() {
MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
scannerConfigurer.setBasePackage("com.mt.wms.**.mapper*");
return scannerConfigurer;
}
}

View File

@ -1,152 +0,0 @@
/*
* Copyright (c) 2019.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
import org.springframework.data.redis.core.RedisOperations;
import org.springframework.util.ReflectionUtils;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* redis客户端主要使用其分布式锁
*
* @author jiff
* @date 2019-08-25
* @since 1.0
*/
@Configuration
@ConditionalOnClass({Redisson.class, RedisOperations.class})
@AutoConfigureBefore(RedisAutoConfiguration.class)
@EnableConfigurationProperties({RedissonProperties.class, RedisProperties.class})
public class RedissonAutoConfiguration {
@Autowired
private RedissonProperties redissonProperties;
@Autowired
private RedisProperties redisProperties;
@Autowired
private ApplicationContext ctx;
@Bean(destroyMethod = "shutdown")
@ConditionalOnMissingBean(RedissonClient.class)
public RedissonClient redisson() throws IOException {
Config config = null;
Method clusterMethod = ReflectionUtils.findMethod(RedisProperties.class, "getCluster");
Method timeoutMethod = ReflectionUtils.findMethod(RedisProperties.class, "getTimeout");
Object timeoutValue = ReflectionUtils.invokeMethod(timeoutMethod, redisProperties);
int timeout;
if (null == timeoutValue) {
timeout = 0;
} else if (!(timeoutValue instanceof Integer)) {
Method millisMethod = ReflectionUtils.findMethod(timeoutValue.getClass(), "toMillis");
timeout = ((Long) ReflectionUtils.invokeMethod(millisMethod, timeoutValue)).intValue();
} else {
timeout = (Integer) timeoutValue;
}
if (redissonProperties.getConfig() != null) {
try {
InputStream is = getConfigStream();
config = Config.fromJSON(is);
} catch (IOException e) {
// trying next format
try {
InputStream is = getConfigStream();
config = Config.fromYAML(is);
} catch (IOException e1) {
throw new IllegalArgumentException("Can't parse config", e1);
}
}
} else if (redisProperties.getSentinel() != null) {
Method nodesMethod = ReflectionUtils.findMethod(RedisProperties.Sentinel.class, "getNodes");
Object nodesValue = ReflectionUtils.invokeMethod(nodesMethod, redisProperties.getSentinel());
String[] nodes;
if (nodesValue instanceof String) {
nodes = convert(Arrays.asList(((String) nodesValue).split(",")));
} else {
nodes = convert((List<String>) nodesValue);
}
config = new Config();
config.useSentinelServers()
.setMasterName(redisProperties.getSentinel().getMaster())
.addSentinelAddress(nodes)
.setDatabase(redisProperties.getDatabase())
.setConnectTimeout(timeout)
.setPassword(redisProperties.getPassword());
} else if (clusterMethod != null && ReflectionUtils.invokeMethod(clusterMethod, redisProperties) != null) {
Object clusterObject = ReflectionUtils.invokeMethod(clusterMethod, redisProperties);
Method nodesMethod = ReflectionUtils.findMethod(clusterObject.getClass(), "getNodes");
List<String> nodesObject = (List) ReflectionUtils.invokeMethod(nodesMethod, clusterObject);
String[] nodes = convert(nodesObject);
config = new Config();
config.useClusterServers()
.addNodeAddress(nodes)
.setConnectTimeout(timeout)
.setPassword(redisProperties.getPassword());
} else {
config = new Config();
String prefix = "redis://";
Method method = ReflectionUtils.findMethod(RedisProperties.class, "isSsl");
if (method != null && (Boolean) ReflectionUtils.invokeMethod(method, redisProperties)) {
prefix = "rediss://";
}
config.useSingleServer()
.setAddress(prefix + redisProperties.getHost() + ":" + redisProperties.getPort())
.setConnectTimeout(timeout)
.setDatabase(redisProperties.getDatabase())
.setPassword(redisProperties.getPassword());
}
return Redisson.create(config);
}
private String[] convert(List<String> nodesObject) {
List<String> nodes = new ArrayList<String>(nodesObject.size());
for (String node : nodesObject) {
if (!node.startsWith("redis://") && !node.startsWith("rediss://")) {
nodes.add("redis://" + node);
} else {
nodes.add(node);
}
}
return nodes.toArray(new String[nodes.size()]);
}
private InputStream getConfigStream() throws IOException {
Resource resource = ctx.getResource(redissonProperties.getConfig());
InputStream is = resource.getInputStream();
return is;
}
}

View File

@ -1,28 +0,0 @@
/*
* Copyright (c) 2019.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* @author jiff
* @date 2019-08-25
* @since 1.0
*/
@ConfigurationProperties(prefix = "spring.redis.redisson")
public class RedissonProperties {
private String config;
public String getConfig() {
return config;
}
public void setConfig(String config) {
this.config = config;
}
}

View File

@ -1,31 +0,0 @@
package com.mt.wms.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
/**
* <p>
* 腾讯云公共配置
* </p>
*
* @author Mr.ZhangShi
* @version 1.0
* @date 2020/8/10
*/
@Component
@ConfigurationProperties(prefix = "wms.tencentcloud")
@Data
public class TencentCloudConfig {
/**
* 账户id
*/
private String secretId;
/**
* 账户密钥
*/
private String secretKey;
}

View File

@ -1,31 +0,0 @@
package com.mt.wms.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
/**
* <p>
* 腾讯云短信配置
* </p>
*
* @author Mr.ZhangShi
* @version 1.0
* @date 2020/8/10
*/
@Component
@ConfigurationProperties(prefix = "wms.tencentcloud.sms")
@Data
public class TencentCloudSmsConfig{
/**
* 短信应用id
*/
private String appId;
/**
* 短信应用key
*/
private String appKey;
}

View File

@ -1,29 +0,0 @@
package com.mt.wms.core.config;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.MultipartConfigElement;
/**
* <p>
* </p>
*
* @author Mr.ZhangShi
* @date 2019/4/28
* @since 1.0
*/
@Configuration
public class UploadFileConfig {
@Bean
public MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
//文件最大 KB,MB
factory.setMaxFileSize("100MB");
/// 设置总上传数据总大小
factory.setMaxRequestSize("100MB");
return factory.createMultipartConfig();
}
}

View File

@ -1,38 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import org.hibernate.validator.HibernateValidator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;
/**
* 参数验证器配置可以配置验证模式是快速失败返回还是普通模式开发阶段先开启普通模式
*
* @author jiff
* @date 2018/11/6
* @since 1.0
*/
@Configuration
public class ValidatorConfig {
@Bean
public Validator validator() {
ValidatorFactory validatorFactory = Validation.byProvider(HibernateValidator.class)
.configure()
//failFasttrue 快速失败返回模式false 普通模式
.failFast(false)
// .addProperty("hibernate.validator.fail_fast", "true")
.buildValidatorFactory();
Validator validator = validatorFactory.getValidator();
return validator;
}
}

View File

@ -1,68 +0,0 @@
/*
* Copyright (c) 2020.
* http://www.ulabcare.com
*/
package com.mt.wms.core.config;
import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotNull;
/**
* @author jiff
* @date 2020-03-10
* @since 1.0
*/
@Component
@ConditionalOnProperty(prefix = "wms.wechat", name = {"ma.appId"})
@ConfigurationProperties(prefix = "wms.wechat")
@Data
@Validated
public class WxConfig {
private String mchId;
private String mchKey;
@NotNull
private WechatProperties ma;
@Data
public static class WechatProperties {
/**
* 应用ID
*/
private String appId;
/**
* 接口秘钥
*/
private String appSecret;
/**
* 微信公众号开发模式接口配置信息中的Token保持一致
*/
private String token;
/**
* 微信生成的 ASEKey
*/
private String aseKey;
/**
* 商户号
*/
private String mchId;
/**
* 商户秘钥
*/
private String mchKey;
/**
* 证书路径
*/
private String keyPath;
}
}

View File

@ -1,69 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.constants;
/**
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public interface CommonConstant {
/**
* 版本控制
*/
Integer VERSION = 0;
/**
* 默认密码
*/
String DEFAULT_PASSWORD = "123456";
/**
* 公共服务模块
*/
String API_MODULE_BASE = "api/";
/**
* 公共服务模块
*/
String API_MODULE_COMMON = API_MODULE_BASE + "common/";
/**
* 统一认证模块
*/
String API_MODULE_PASSPORT = API_MODULE_BASE + "passport/";
/**
* 管理模块
*/
String API_MODULE_MANAGER = API_MODULE_BASE + "manager/";
/**
* 用户管理模块
*/
String API_MODULE_UPMS = API_MODULE_BASE + "upms/";
/**
* 移动端模块
*/
String API_MODULE_MOBILE = API_MODULE_BASE + "mobile/";
/**
* 报表端模块
*/
String API_MODULE_REPORT = API_MODULE_BASE + "report/";
/**
* 基础信息模块
*/
String API_MODULE_BASIC = API_MODULE_BASE + "basic/";
/**
* 模块
*/
String API_MODULE_EMPTY = API_MODULE_BASE + "empty/";
}

View File

@ -1,19 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.constants;
/**
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public interface MessageQueueConstant {
String SMS_CODE = "sms_code";
String SMS_DINGTALK = "sms_dingtalk";
String LOGIN_LOG = "login_log";
String API_LOG = "api_log";
}

View File

@ -1,97 +0,0 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.mt.wms.core.constants;
import com.mt.wms.core.utils.StringUtils;
/**
* redis key 常量定义类为了防止key冲突第一个命名空间尽量定义在该类中
* <p>
* 建议使用命名空间格式设置key名称
* <p><pre>
* 1.1 key = 用途:业务限定:key
* 例如lock:order:xxx; sequence:order_no:xxx
* 1.2 key采用小写结构不采用驼峰格式中间利用下滑线(_)做连接例如user_nameuser_pass
* 1.3 key的长度限制在128字节之内既可以节省空间又可以加快查询速度
* </pre></p>
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public interface RedisConstant {
/**
* key命名空间分隔符{@value}
*/
String KEY_NAMESPACE_SEPARATOR = ":";
/**
* 分布式锁的key命名空间
*/
String LOCK_PREFIX = "lock:";
/**
* 短信的key命名空间{@value}
*/
String SMS_PREFIX = "sms";
/**
* 微信的key命名空间{@value}
*/
String WECHAT_PREFIX = "wechat";
/**
* 生成短信验证码键值
*
* @param mobile 手机号码
* @return key
*/
static String genSmsCodeKey(String mobile) {
return genKey(SMS_PREFIX, "code", mobile);
}
/**
* 生成微信oauthCode键值
*
* @param appId appId
* @param oauthCode oauthCode
* @return key
*/
static String genWechatOauthCodeKey(String appId, String oauthCode) {
return genKey(WECHAT_PREFIX, "oauth_code", appId, oauthCode);
}
/**
* 生成微信jsApiTicket键值
*
* @param appId appId
* @return key
*/
static String genWechatJsApiTicketKey(String appId) {
return genKey(WECHAT_PREFIX, "wechat_jsapi_ticket", appId);
}
/**
* 生成微信weChatAccessTokenCode键值
*
* @param appId appId
* @return key
*/
static String genWechatAccessTokenCodeKey(String appId) {
return genKey(WECHAT_PREFIX, "wechat_access_token", appId);
}
/**
* 生成redis键值
*
* @param keys 键值数组
* @return key0:key1:key2:keyN
*/
static String genKey(String... keys) {
return StringUtils.join(keys, KEY_NAMESPACE_SEPARATOR);
}
}

View File

@ -1,157 +0,0 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 报警基础表
* </p>
*
* @author mt
* @since 2021-11-18
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_alarm_base")
public class AlarmBase extends Model<AlarmBase> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 创建人id
*/
@TableField("creator_id")
private Integer creatorId;
/**
* 更新人id
*/
@TableField("updater_id")
private Integer updaterId;
/**
* 修改时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 版本号 默认为 1
*/
@TableField("version")
@Version
private String version;
/**
* 状态 0初始化
*/
@TableField("status")
private Integer status;
/**
* 内部编码
*/
@TableField("inter_code")
private String interCode;
/**
* 编码
*/
@TableField("code")
private String code;
/**
* 报警类型数据字典获取
*/
@TableField("alarm_class")
private String alarmClass;
/**
* 报警编码
*/
@TableField("alarm_code")
private String alarmCode;
/**
* 报警内容
*/
@TableField("alarm_info")
private String alarmInfo;
/**
* 描述信息
*/
@TableField("description")
private String description;
/**
* 备注
*/
@TableField("note")
private String note;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String CREATOR_ID = "creator_id";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
public static final String STATUS = "status";
public static final String INTER_CODE = "inter_code";
public static final String CODE = "code";
public static final String ALARM_CLASS = "alarm_class";
public static final String ALARM_CODE = "alarm_code";
public static final String ALARM_INFO = "alarm_info";
public static final String DESCRIPTION = "description";
public static final String NOTE = "note";
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -1,181 +0,0 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 报警信息
* </p>
*
* @author mt
* @since 2022-02-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_alarm_info")
public class AlarmInfo extends Model<AlarmInfo> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 创建人id
*/
@TableField("creator_id")
private Integer creatorId;
/**
* 更新人id
*/
@TableField("updater_id")
private Integer updaterId;
/**
* 修改时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 版本号 默认为 1
*/
@TableField("version")
@Version
private String version;
/**
* 状态 0初始化
*/
@TableField("status")
private Integer status;
/**
* 内部编码
*/
@TableField("inter_code")
private String interCode;
/**
* 编码
*/
@TableField("code")
private String code;
/**
* 设备id
*/
@TableField("equipment_id")
private Long equipmentId;
/**
* 设备名称
*/
@TableField("equipment_name")
private String equipmentName;
/**
* 报警类型 0工业炉1表示车辆依次类推
*/
@TableField("type")
private Integer type;
/**
* 报警编码
*/
@TableField("alarm_code")
private String alarmCode;
/**
* 报警内容
*/
@TableField("alarm_info")
private String alarmInfo;
/**
* 描述信息
*/
@TableField("description")
private String description;
/**
* 备注
*/
@TableField("note")
private String note;
/**
* 加工任务编码炉子报警时记录
*/
@TableField("task_code")
private String taskCode;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String CREATOR_ID = "creator_id";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
public static final String STATUS = "status";
public static final String INTER_CODE = "inter_code";
public static final String CODE = "code";
public static final String EQUIPMENT_ID = "equipment_id";
public static final String EQUIPMENT_NAME = "equipment_name";
public static final String TYPE = "type";
public static final String ALARM_CODE = "alarm_code";
public static final String ALARM_INFO = "alarm_info";
public static final String DESCRIPTION = "description";
public static final String NOTE = "note";
public static final String TASK_CODE = "task_code";
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -1,273 +0,0 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* apms推送检验结果表
* </p>
*
* @author mt
* @since 2022-01-05
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_apms_check_result")
public class ApmsCheckResult extends Model<ApmsCheckResult> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用2停止
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间入库时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 创建人id
*/
@TableField("creator_id")
private Integer creatorId;
/**
* 更新人id
*/
@TableField("updater_id")
private Integer updaterId;
/**
* 修改时间更具修改时间来判断下次执行顺序第一次修改时间和新增时间相同
*/
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 版本号 默认为 1
*/
@TableField("version")
@Version
private String version;
/**
* 生产单号
*/
@TableField("sheet_no")
private String sheetNo;
/**
* 标识卡号
*/
@TableField("iden_card_num")
private String idenCardNum;
/**
* 硬度检验结果待检验合格不合格返工作废
*/
@TableField("hardness")
private String hardness;
/**
* 金相检验结果合格不合格
*/
@TableField("metallography")
private String metallography;
/**
* 心部硬度检验值
*/
@TableField("heart_hardness")
private String heartHardness;
/**
* 备注特殊注释等
*/
@TableField("remake")
private String remake;
/**
* 硬度检验结果1
*/
@TableField("hardness_value_one")
private String hardnessValueOne;
/**
* 硬度检验结果2
*/
@TableField("hardness_value_two")
private String hardnessValueTwo;
/**
* 硬度检验结果3
*/
@TableField("hardness_value_three")
private String hardnessValueThree;
/**
* 金相检验渗碳淬火 渗碳层深度
*/
@TableField("metallography_stch_stccsd")
private Float metallographyStchStccsd;
/**
* 金相检验渗碳淬火 表面为马氏体残余奥氏体
*/
@TableField("metallography_stch_mstost")
private String metallographyStchMstost;
/**
* 金相检验渗碳淬火 细小颗粒状碳化物
*/
@TableField("metallography_stch_xxklzthw")
private String metallographyStchXxklzthw;
/**
* 金相检验渗碳淬火 心部为低碳马氏体加游离铁素体
*/
@TableField("metallography_stch_dtmstyltst")
private String metallographyStchDtmstyltst;
/**
* 金相检验整体淬火 基体为回火马氏体
*/
@TableField("metallography_ztch_hhmst")
private String metallographyZtchHhmst;
/**
* 金相检验整体淬火 基体为回火托式体
*/
@TableField("metallography_ztch_hhtst")
private String metallographyZtchHhtst;
/**
* 金相检验整体淬火 基体为回火素式体
*/
@TableField("metallography_ztch_hhsst")
private String metallographyZtchHhsst;
/**
* 金相检验氮化 表面亮白色的为氮化合物层深
*/
@TableField("metallography_dh_dhhwcs")
private Float metallographyDhDhhwcs;
/**
* 金相检验氮化 向内为扩散层深
*/
@TableField("metallography_dh_kscs")
private Float metallographyDhKscs;
/**
* 金相检验氮化 心部
*/
@TableField("metallography_dh_xb")
private String metallographyDhXb;
/**
* 金相检验表面淬火 表面为板条马氏体
*/
@TableField("metallography_bmch_btmst")
private String metallographyBmchBtmst;
/**
* 金相检验表面淬火 心部
*/
@TableField("metallography_bmch_xb")
private String metallographyBmchXb;
/**
* 金相检验 备注
*/
@TableField("metallography_bz")
private String metallographyBz;
/**
* 金相检验心部硬度 心部硬度检验结果
*/
@TableField("metallography_xbyd_xbydjyjg")
private Float metallographyXbydXbydjyjg;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String CREATOR_ID = "creator_id";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
public static final String SHEET_NO = "sheet_no";
public static final String IDEN_CARD_NUM = "iden_card_num";
public static final String HARDNESS = "hardness";
public static final String METALLOGRAPHY = "metallography";
public static final String HEART_HARDNESS = "heart_hardness";
public static final String REMAKE = "remake";
public static final String HARDNESS_VALUE_ONE = "hardness_value_one";
public static final String HARDNESS_VALUE_TWO = "hardness_value_two";
public static final String HARDNESS_VALUE_THREE = "hardness_value_three";
public static final String METALLOGRAPHY_STCH_STCCSD = "metallography_stch_stccsd";
public static final String METALLOGRAPHY_STCH_MSTOST = "metallography_stch_mstost";
public static final String METALLOGRAPHY_STCH_XXKLZTHW = "metallography_stch_xxklzthw";
public static final String METALLOGRAPHY_STCH_DTMSTYLTST = "metallography_stch_dtmstyltst";
public static final String METALLOGRAPHY_ZTCH_HHMST = "metallography_ztch_hhmst";
public static final String METALLOGRAPHY_ZTCH_HHTST = "metallography_ztch_hhtst";
public static final String METALLOGRAPHY_ZTCH_HHSST = "metallography_ztch_hhsst";
public static final String METALLOGRAPHY_DH_DHHWCS = "metallography_dh_dhhwcs";
public static final String METALLOGRAPHY_DH_KSCS = "metallography_dh_kscs";
public static final String METALLOGRAPHY_DH_XB = "metallography_dh_xb";
public static final String METALLOGRAPHY_BMCH_BTMST = "metallography_bmch_btmst";
public static final String METALLOGRAPHY_BMCH_XB = "metallography_bmch_xb";
public static final String METALLOGRAPHY_BZ = "metallography_bz";
public static final String METALLOGRAPHY_XBYD_XBYDJYJG = "metallography_xbyd_xbydjyjg";
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -1,372 +0,0 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 自动执行任务表
* </p>
*
* @author mt
* @since 2022-03-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_auto_exe_task")
public class AutoExeTask extends Model<AutoExeTask> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用2停止
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间入库时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 状态0新增1执行中2完成3 终止
*/
@TableField("status")
private Integer status;
/**
* 内部编码系统自动生成
*/
@TableField("inter_code")
private String interCode;
/**
* 工艺流程ID
*/
@TableField("process_flow_id")
private Long processFlowId;
/**
* 工艺流程名称
*/
@TableField("process_flow_name")
private String processFlowName;
/**
* 工艺类型1表示第一种工艺流程2表示第二种工艺流程
*/
@TableField("process_flow_type")
private Integer processFlowType;
/**
* 工艺号ID
*/
@TableField("craft_code_id")
private Long craftCodeId;
/**
* 工艺编码
*/
@TableField("craft_code")
private String craftCode;
/**
* 区域ID区分不同操作区域
*/
@TableField("warehouse_id")
private Long warehouseId;
/**
* 执行任务ID关联任务表t_curr_task
*/
@TableField("f_task_id")
private Long fTaskId;
/**
* 任务编码,子任务编码对应任务表t_curr_task中task_code编码
*/
@TableField("f_det_task_code")
private String fDetTaskCode;
/**
* 设备类型ID关联设备类型表t_equipment_type
*/
@TableField("f_equipment_type_id")
private Long fEquipmentTypeId;
/**
* 设备ID关联设备表t_kiln_info
*/
@TableField("f_equipment_id")
private Long fEquipmentId;
/**
* 设备名称炉子名称
*/
@TableField("f_equipment_name")
private String fEquipmentName;
/**
* 工艺号ID关联工艺号表t_craft_info
*/
@TableField("f_craft_code_id")
private Long fCraftCodeId;
/**
* 工艺号对应PLC值
*/
@TableField("f_plc_value")
private Integer fPlcValue;
/**
* 进炉运输状态0开始1运输中2运输完成
*/
@TableField("f_in_tran_status")
private Integer fInTranStatus;
/**
* 加工状态0加工开始1加工中2加工完成
*/
@TableField("f_pro_status")
private Integer fProStatus;
/**
* 出炉运输状态0开始1运输中2运输完成
*/
@TableField("f_out_tran_status")
private Integer fOutTranStatus;
/**
* 执行任务ID关联任务表t_curr_task
*/
@TableField("t_task_id")
private Long tTaskId;
/**
* 任务编码,子任务编码对应任务表t_curr_task中task_code编码
*/
@TableField("t_det_task_code")
private String tDetTaskCode;
/**
* 设备类型ID关联设备类型表t_equipment_type
*/
@TableField("t_equipment_type_id")
private Long tEquipmentTypeId;
/**
* 设备名称
*/
@TableField("t_equipment_name")
private String tEquipmentName;
/**
* 设备ID关联设备表t_kiln_info
*/
@TableField("t_equipment_id")
private Long tEquipmentId;
/**
* 工艺号ID关联工艺号表t_craft_info
*/
@TableField("t_craft_code_id")
private Long tCraftCodeId;
/**
* 工艺号对应PLC值
*/
@TableField("t_plc_value")
private Integer tPlcValue;
/**
* 进炉运输状态0开始1运输中2运输完成
*/
@TableField("t_in_tran_status")
private Integer tInTranStatus;
/**
* 加工状态0加工开始1加工中2加工完成
*/
@TableField("t_pro_status")
private Integer tProStatus;
/**
* 出炉运输状态0开始1运输中2运输完成
*/
@TableField("t_out_tran_status")
private Integer tOutTranStatus;
/**
* 执行任务ID关联任务表t_curr_task
*/
@TableField("th_task_id")
private Long thTaskId;
/**
* 任务编码,子任务编码对应任务表t_curr_task中task_code编码
*/
@TableField("th_det_task_code")
private String thDetTaskCode;
/**
* 设备类型ID关联设备类型表t_equipment_type
*/
@TableField("th_equipment_type_id")
private Long thEquipmentTypeId;
/**
* 设备名称
*/
@TableField("th_equipment_name")
private String thEquipmentName;
/**
* 设备ID关联设备表t_kiln_info
*/
@TableField("th_equipment_id")
private Long thEquipmentId;
/**
* 工艺号ID关联工艺号表t_craft_info
*/
@TableField("th_craft_code_id")
private Long thCraftCodeId;
/**
* 工艺号对应PLC值
*/
@TableField("th_plc_value")
private Integer thPlcValue;
/**
* 进炉运输状态0开始1运输中2运输完成
*/
@TableField("th_in_tran_status")
private Integer thInTranStatus;
/**
* 加工状态0加工开始1加工中2加工完成
*/
@TableField("th_pro_status")
private Integer thProStatus;
/**
* 出炉运输状态0开始1运输中2运输完成
*/
@TableField("th_out_tran_status")
private Integer thOutTranStatus;
/**
* 备注
*/
@TableField("content")
private String content;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String STATUS = "status";
public static final String INTER_CODE = "inter_code";
public static final String PROCESS_FLOW_ID = "process_flow_id";
public static final String PROCESS_FLOW_NAME = "process_flow_name";
public static final String PROCESS_FLOW_TYPE = "process_flow_type";
public static final String CRAFT_CODE_ID = "craft_code_id";
public static final String CRAFT_CODE = "craft_code";
public static final String WAREHOUSE_ID = "warehouse_id";
public static final String F_TASK_ID = "f_task_id";
public static final String F_DET_TASK_CODE = "f_det_task_code";
public static final String F_EQUIPMENT_TYPE_ID = "f_equipment_type_id";
public static final String F_EQUIPMENT_ID = "f_equipment_id";
public static final String F_EQUIPMENT_NAME = "f_equipment_name";
public static final String F_CRAFT_CODE_ID = "f_craft_code_id";
public static final String F_PLC_VALUE = "f_plc_value";
public static final String F_IN_TRAN_STATUS = "f_in_tran_status";
public static final String F_PRO_STATUS = "f_pro_status";
public static final String F_OUT_TRAN_STATUS = "f_out_tran_status";
public static final String T_TASK_ID = "t_task_id";
public static final String T_DET_TASK_CODE = "t_det_task_code";
public static final String T_EQUIPMENT_TYPE_ID = "t_equipment_type_id";
public static final String T_EQUIPMENT_NAME = "t_equipment_name";
public static final String T_EQUIPMENT_ID = "t_equipment_id";
public static final String T_CRAFT_CODE_ID = "t_craft_code_id";
public static final String T_PLC_VALUE = "t_plc_value";
public static final String T_IN_TRAN_STATUS = "t_in_tran_status";
public static final String T_PRO_STATUS = "t_pro_status";
public static final String T_OUT_TRAN_STATUS = "t_out_tran_status";
public static final String TH_TASK_ID = "th_task_id";
public static final String TH_DET_TASK_CODE = "th_det_task_code";
public static final String TH_EQUIPMENT_TYPE_ID = "th_equipment_type_id";
public static final String TH_EQUIPMENT_NAME = "th_equipment_name";
public static final String TH_EQUIPMENT_ID = "th_equipment_id";
public static final String TH_CRAFT_CODE_ID = "th_craft_code_id";
public static final String TH_PLC_VALUE = "th_plc_value";
public static final String TH_IN_TRAN_STATUS = "th_in_tran_status";
public static final String TH_PRO_STATUS = "th_pro_status";
public static final String TH_OUT_TRAN_STATUS = "th_out_tran_status";
public static final String CONTENT = "content";
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -1,348 +0,0 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 自动执行任务表
* </p>
*
* @author mt
* @since 2021-12-14
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_auto_exe_task_his")
public class AutoExeTaskHis extends Model<AutoExeTaskHis> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用2停止
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间入库时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 状态0新增1执行中2完成
*/
@TableField("status")
private Integer status;
/**
* 内部编码系统自动生成
*/
@TableField("inter_code")
private String interCode;
/**
* 工艺流程ID
*/
@TableField("process_flow_id")
private Long processFlowId;
/**
* 工艺流程名称
*/
@TableField("process_flow_name")
private String processFlowName;
/**
* 工艺类型1表示第一种工艺流程2表示第二种工艺流程
*/
@TableField("process_flow_type")
private Integer processFlowType;
/**
* 工艺号ID
*/
@TableField("craft_code_id")
private Long craftCodeId;
/**
* 工艺编码
*/
@TableField("craft_code")
private String craftCode;
/**
* 区域ID区分不同操作区域
*/
@TableField("warehouse_id")
private Long warehouseId;
/**
* 执行任务ID关联任务表t_curr_task
*/
@TableField("f_task_id")
private Long fTaskId;
/**
* 任务编码,子任务编码对应任务表t_curr_task中task_code编码
*/
@TableField("f_det_task_code")
private String fDetTaskCode;
/**
* 设备类型ID关联设备类型表t_equipment_type
*/
@TableField("f_equipment_type_id")
private Long fEquipmentTypeId;
/**
* 设备ID关联设备表t_kiln_info
*/
@TableField("f_equipment_id")
private Long fEquipmentId;
/**
* 工艺号ID关联工艺号表t_craft_info
*/
@TableField("f_craft_code_id")
private Long fCraftCodeId;
/**
* 工艺号对应PLC值
*/
@TableField("f_plc_value")
private Integer fPlcValue;
/**
* 进炉运输状态0开始1运输中2运输完成
*/
@TableField("f_in_tran_status")
private Integer fInTranStatus;
/**
* 加工状态0加工开始1加工中2加工完成
*/
@TableField("f_pro_status")
private Integer fProStatus;
/**
* 出炉运输状态0开始1运输中2运输完成
*/
@TableField("f_out_tran_status")
private Integer fOutTranStatus;
/**
* 执行任务ID关联任务表t_curr_task
*/
@TableField("t_task_id")
private Long tTaskId;
/**
* 任务编码,子任务编码对应任务表t_curr_task中task_code编码
*/
@TableField("t_det_task_code")
private String tDetTaskCode;
/**
* 设备类型ID关联设备类型表t_equipment_type
*/
@TableField("t_equipment_type_id")
private Long tEquipmentTypeId;
/**
* 设备ID关联设备表t_kiln_info
*/
@TableField("t_equipment_id")
private Long tEquipmentId;
/**
* 工艺号ID关联工艺号表t_craft_info
*/
@TableField("t_craft_code_id")
private Long tCraftCodeId;
/**
* 工艺号对应PLC值
*/
@TableField("t_plc_value")
private Integer tPlcValue;
/**
* 进炉运输状态0开始1运输中2运输完成
*/
@TableField("t_in_tran_status")
private Integer tInTranStatus;
/**
* 加工状态0加工开始1加工中2加工完成
*/
@TableField("t_pro_status")
private Integer tProStatus;
/**
* 出炉运输状态0开始1运输中2运输完成
*/
@TableField("t_out_tran_status")
private Integer tOutTranStatus;
/**
* 执行任务ID关联任务表t_curr_task
*/
@TableField("th_task_id")
private Long thTaskId;
/**
* 任务编码,子任务编码对应任务表t_curr_task中task_code编码
*/
@TableField("th_det_task_code")
private String thDetTaskCode;
/**
* 设备类型ID关联设备类型表t_equipment_type
*/
@TableField("th_equipment_type_id")
private Long thEquipmentTypeId;
/**
* 设备ID关联设备表t_kiln_info
*/
@TableField("th_equipment_id")
private Long thEquipmentId;
/**
* 工艺号ID关联工艺号表t_craft_info
*/
@TableField("th_craft_code_id")
private Long thCraftCodeId;
/**
* 工艺号对应PLC值
*/
@TableField("th_plc_value")
private Integer thPlcValue;
/**
* 进炉运输状态0开始1运输中2运输完成
*/
@TableField("th_in_tran_status")
private Integer thInTranStatus;
/**
* 加工状态0加工开始1加工中2加工完成
*/
@TableField("th_pro_status")
private Integer thProStatus;
/**
* 出炉运输状态0开始1运输中2运输完成
*/
@TableField("th_out_tran_status")
private Integer thOutTranStatus;
/**
* 备注
*/
@TableField("content")
private String content;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String STATUS = "status";
public static final String INTER_CODE = "inter_code";
public static final String PROCESS_FLOW_ID = "process_flow_id";
public static final String PROCESS_FLOW_NAME = "process_flow_name";
public static final String PROCESS_FLOW_TYPE = "process_flow_type";
public static final String CRAFT_CODE_ID = "craft_code_id";
public static final String CRAFT_CODE = "craft_code";
public static final String WAREHOUSE_ID = "warehouse_id";
public static final String F_TASK_ID = "f_task_id";
public static final String F_DET_TASK_CODE = "f_det_task_code";
public static final String F_EQUIPMENT_TYPE_ID = "f_equipment_type_id";
public static final String F_EQUIPMENT_ID = "f_equipment_id";
public static final String F_CRAFT_CODE_ID = "f_craft_code_id";
public static final String F_PLC_VALUE = "f_plc_value";
public static final String F_IN_TRAN_STATUS = "f_in_tran_status";
public static final String F_PRO_STATUS = "f_pro_status";
public static final String F_OUT_TRAN_STATUS = "f_out_tran_status";
public static final String T_TASK_ID = "t_task_id";
public static final String T_DET_TASK_CODE = "t_det_task_code";
public static final String T_EQUIPMENT_TYPE_ID = "t_equipment_type_id";
public static final String T_EQUIPMENT_ID = "t_equipment_id";
public static final String T_CRAFT_CODE_ID = "t_craft_code_id";
public static final String T_PLC_VALUE = "t_plc_value";
public static final String T_IN_TRAN_STATUS = "t_in_tran_status";
public static final String T_PRO_STATUS = "t_pro_status";
public static final String T_OUT_TRAN_STATUS = "t_out_tran_status";
public static final String TH_TASK_ID = "th_task_id";
public static final String TH_DET_TASK_CODE = "th_det_task_code";
public static final String TH_EQUIPMENT_TYPE_ID = "th_equipment_type_id";
public static final String TH_EQUIPMENT_ID = "th_equipment_id";
public static final String TH_CRAFT_CODE_ID = "th_craft_code_id";
public static final String TH_PLC_VALUE = "th_plc_value";
public static final String TH_IN_TRAN_STATUS = "th_in_tran_status";
public static final String TH_PRO_STATUS = "th_pro_status";
public static final String TH_OUT_TRAN_STATUS = "th_out_tran_status";
public static final String CONTENT = "content";
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -1,125 +0,0 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 通讯日志信息 包括wcs与wms apms与wms相互通讯
* </p>
*
* @author mt
* @since 2021-11-18
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_communication_log")
public class CommunicationLog extends Model<CommunicationLog> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用2停止
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间入库时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 创建人id
*/
@TableField("creator_id")
private Integer creatorId;
/**
* 更新人id
*/
@TableField("updater_id")
private Integer updaterId;
/**
* 修改时间更具修改时间来判断下次执行顺序第一次修改时间和新增时间相同
*/
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 版本号 默认为 1
*/
@TableField("version")
@Version
private String version;
/**
* 类型0wms To wcs日志1wcs to wms日志 2wms to apms日志 3apms to wms日志
*/
@TableField("type")
private Integer type;
/**
* 内部编码系统自动生成
*/
@TableField("code")
private String code;
/**
* 日志名称
*/
@TableField("log_name")
private String logName;
/**
* 内容
*/
@TableField("content")
private String content;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String CREATOR_ID = "creator_id";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
public static final String TYPE = "type";
public static final String CODE = "code";
public static final String LOG_NAME = "log_name";
public static final String CONTENT = "content";
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -1,137 +0,0 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 设备工艺信息
* </p>
*
* @author mt
* @since 2021-12-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_craft_info")
public class CraftInfo extends Model<CraftInfo> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用2停止
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间入库时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 创建人id
*/
@TableField("creator_id")
private Integer creatorId;
/**
* 更新人id
*/
@TableField("updater_id")
private Integer updaterId;
/**
* 修改时间更具修改时间来判断下次执行顺序第一次修改时间和新增时间相同
*/
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 版本号 默认为 1
*/
@TableField("version")
@Version
private String version;
/**
* 状态0可用1不可用
*/
@TableField("status")
private Integer status;
/**
* 内部编码系统自动生成
*/
@TableField("inter_code")
private String interCode;
/**
* 工艺号
*/
@TableField("craft_code")
private String craftCode;
/**
* 编码
*/
@TableField("code")
private String code;
/**
* 对应PLC值
*/
@TableField("plc_value")
private Integer plcValue;
/**
* 说明
*/
@TableField("content")
private String content;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String CREATOR_ID = "creator_id";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
public static final String STATUS = "status";
public static final String INTER_CODE = "inter_code";
public static final String CRAFT_CODE = "craft_code";
public static final String CODE = "code";
public static final String PLC_VALUE = "plc_value";
public static final String CONTENT = "content";
@Override
protected Serializable pkVal() {
return this.id;
}
}

Some files were not shown because too many files have changed in this diff Show More