提交 28cdb542 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 部署微服务接口

上级 4f6069f5
*volumes
*target
.settings
*node_modules
*bin
*.project
*.classpath
*.factorypath
.history
.vscode
.idea
**.iml
*.jar
*.log
# 系统概览 iBiz4j Spring R7 dev
<?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>
<parent>
<artifactId>assetmanagement-app</artifactId>
<groupId>cn.ibizlab.assetmanagement</groupId>
<version>1.0.0.0</version>
</parent>
<artifactId>assetmanagement-app-assetmanagement</artifactId>
<name>Assetmanagement Gateway AssetManagement</name>
<description>Assetmanagement AssetManagement</description>
<dependencies>
<dependency>
<groupId>cn.ibizlab.assetmanagement</groupId>
<artifactId>assetmanagement-util</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<properties>
<docker.image.prefix>registry.cn-shanghai.aliyuncs.com/ibizsys</docker.image.prefix>
</properties>
<profiles>
<profile>
<id>assetmanagement</id>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<!--注意此次必须要放在此目录下才能被访问到 -->
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/**</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>exec-yarn-run-install</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<workingDirectory>../../app_AssetManagement</workingDirectory>
</configuration>
</execution>
<execution>
<id>exec-yarn-run-build</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>yarn</executable>
<arguments>
<argument>build</argument>
</arguments>
<workingDirectory>../../app_AssetManagement</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>assetmanagement-app-assetmanagement</finalName>
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
<mainClass>cn.ibizlab.assetmanagement.assetmanagement.AssetManagementApplication</mainClass>
<outputDirectory>../../</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<serverId>ibiz-dev</serverId>
<imageName>${docker.image.prefix}/${project.artifactId}:latest</imageName>
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>../../</directory>
<include>${project.artifactId}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
FROM openjdk:8-jre-alpine
ENV TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBIZ_SLEEP=0 \
JAVA_OPTS=""
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-app-assetmanagement.jar
EXPOSE 8080
ADD assetmanagement-app-assetmanagement.jar /assetmanagement-app-assetmanagement.jar
version: "3.2"
services:
assetmanagement-app-assetmanagement:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest
ports:
- "8080:8080"
networks:
- agent_network
deploy:
resources:
limits:
memory: 800M
reservations:
memory: 400M
mode: replicated
replicas: 1
volumes:
- "nfs:/app/file"
volumes:
nfs:
driver: local
driver_opts:
type: "nfs"
o: "addr=172.16.240.109,rw"
device: ":/nfs"
networks:
agent_network:
driver: overlay
attachable: true
package cn.ibizlab.assetmanagement.assetmanagement;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClientsConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import java.util.List;
@Slf4j
@Import({
FeignClientsConfiguration.class
})
@EnableDiscoveryClient
@Configuration
@EnableFeignClients(basePackages = {"cn.ibizlab.assetmanagement" })
@EnableZuulProxy
@ComponentScan(basePackages = {"cn.ibizlab.assetmanagement.assetmanagement","cn.ibizlab.assetmanagement.util"})
@MapperScan("cn.ibizlab.assetmanagement.*.mapper")
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
})
public class AssetManagementApplication extends WebMvcConfigurerAdapter{
public static void main(String[] args) {
SpringApplication.run(AssetManagementApplication.class,args);
}
@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
super.addArgumentResolvers(argumentResolvers);
argumentResolvers.add(new cn.ibizlab.assetmanagement.util.web.SearchContextHandlerMethodArgumentResolver());
}
}
package cn.ibizlab.assetmanagement.assetmanagement.config;
import cn.ibizlab.assetmanagement.util.security.AuthenticationEntryPoint;
import cn.ibizlab.assetmanagement.util.security.AuthorizationTokenFilter;
import cn.ibizlab.assetmanagement.util.service.AuthenticationUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.core.GrantedAuthorityDefaults;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.context.annotation.Profile;
import org.springframework.beans.factory.annotation.Qualifier;
@Profile("assetmanagement-prod")
@Configuration
@EnableWebSecurity
public class AssetManagementSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private AuthenticationEntryPoint unauthorizedHandler;
@Autowired
private AuthenticationUserService userDetailsService;
/**
* 自定义基于JWT的安全过滤器
*/
@Autowired
AuthorizationTokenFilter authenticationTokenFilter;
@Value("${ibiz.auth.path:v7/login}")
private String loginPath;
@Value("${ibiz.auth.logoutpath:v7/logout}")
private String logoutPath;
@Value("${ibiz.file.uploadpath:ibizutil/upload}")
private String uploadpath;
@Value("${ibiz.file.downloadpath:ibizutil/download}")
private String downloadpath;
@Value("${ibiz.file.previewpath:ibizutil/preview}")
private String previewpath;
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth
.userDetailsService(userDetailsService)
.passwordEncoder(passwordEncoderBean());
}
@Bean
GrantedAuthorityDefaults grantedAuthorityDefaults() {
// Remove the ROLE_ prefix
return new GrantedAuthorityDefaults("");
}
@Bean
public PasswordEncoder passwordEncoderBean() {
return new BCryptPasswordEncoder();
}
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity
// 禁用 CSRF
.csrf().disable()
// 授权异常
.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
// 不创建会话
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
// 过滤请求
.authorizeRequests()
.antMatchers(
HttpMethod.GET,
"/*.html",
"/**/*.html",
"/**/*.css",
"/**/*.js",
"/**/*.ico",
"/**/assets/**",
"/**/css/**",
"/**/fonts/**",
"/**/js/**",
"/**/img/**",
"/**/svg/**",
"/"
).permitAll()
//放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.GET,"/"+logoutPath).permitAll()
// 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll()
.antMatchers("/"+previewpath+"/**").permitAll()
// 所有请求都需要认证
.anyRequest().authenticated()
// 防止iframe 造成跨域
.and().headers().frameOptions().disable();
httpSecurity
.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
}
}
server:
port: 10325
#Log配置
logging:
level:
cn.ibizlab.assetmanagement: info
#zuul网关路由设置
zuul:
routes:
eamlocationstatemodel:
path: /eamlocationstatemodels/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamlocationtype:
path: /eamlocationtypes/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamlocation:
path: /eamlocations/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamlocationstate:
path: /eamlocationstates/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamlocationstatemodelline:
path: /eamlocationstatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /config/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
spring:
profiles:
include: sys ,nacos, assetmanagement-prod
application:
name: ibizassetmanagement-assetmanagement
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<property name="LOG_PATH" value="logs" />
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] %-40.40logger{39} : %msg%n" />
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="LOG_PATTERN2" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
<!-- 控制台输出 -->
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 按照每天生成日志文件 -->
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_PATH}/ibizassetmanagement-assetmanagement.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="Console" />
<appender-ref ref="file" />
</root>
</configuration>
<?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>
<parent>
<artifactId>assetmanagement</artifactId>
<groupId>cn.ibizlab.assetmanagement</groupId>
<version>1.0.0.0</version>
</parent>
<artifactId>assetmanagement-app</artifactId>
<name>Assetmanagement Application</name>
<description>Assetmanagement Application</description>
<packaging>pom</packaging>
<modules>
<module>assetmanagement-app-assetmanagement</module>
</modules>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
</dependencies>
</project>
<?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>
<parent>
<artifactId>assetmanagement</artifactId>
<groupId>cn.ibizlab.assetmanagement</groupId>
<version>1.0.0.0</version>
</parent>
<artifactId>assetmanagement-boot</artifactId>
<name>Assetmanagement Dev Monolithic Boot</name>
<description>Assetmanagement Boot</description>
<dependencies>
<dependency>
<groupId>cn.ibizlab.assetmanagement</groupId>
<artifactId>assetmanagement-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>cn.ibizlab.assetmanagement</groupId>
<artifactId>assetmanagement-provider-assetapi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>cn.ibizlab.assetmanagement</groupId>
<artifactId>assetmanagement-app-assetmanagement</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<!--由于boot是通过dependency来关联所有子项目,页面和配置等信息都存在与子项目中,
所以您在对boot进行打包前,需要先将子项目install到maven仓库,以确保boot可以正常引用所有完整的子项目-->
<profiles>
<profile>
<id>boot</id>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>assetmanagement</finalName>
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
<mainClass>cn.ibizlab.assetmanagement.DevBootApplication</mainClass>
<outputDirectory>../</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
version: "3.2"
services:
iBizAssetManagement-mysql:
image: mysql:5.7.20
volumes:
- $PWD/../../../../volumes/mysql/:/var/lib/mysql/
networks:
- agent_network
environment:
- TZ=Asia/Shanghai
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=a_LAB01_e85d8801c
ports:
- 3306:3306
command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8 --explicit_defaults_for_timestamp
networks:
agent_network:
attachable: true
version: "3.2"
services:
iBizAssetManagement-nacos:
image: nacos/nacos-server:latest
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname
- MODE=standalone
ports:
- "8848:8848"
networks:
- agent_network
networks:
agent_network:
attachable: true
version: "3.2"
services:
iBizAssetManagement-redis:
image: redis
ports:
- 6379:6379
environment:
- TZ=Asia/Shanghai
logging:
driver: "json-file"
command: redis-server
networks:
- agent_network
networks:
agent_network:
attachable: true
package cn.ibizlab.assetmanagement;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import java.util.List;
@Slf4j
@EnableDiscoveryClient
@Configuration
@EnableTransactionManagement
@EnableFeignClients(basePackages = {"cn.ibizlab.assetmanagement" })
@SpringBootApplication(exclude = {
})
@ComponentScan(basePackages = {"cn.ibizlab.assetmanagement"}
// ,excludeFilters={
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX,pattern="cn.ibizlab.assetmanagement.xxx.rest.xxx"),
// }
)
@Import({
org.springframework.cloud.openfeign.FeignClientsConfiguration.class
})
@EnableAsync
@EnableScheduling
public class DevBootApplication extends WebMvcConfigurerAdapter{
public static void main(String[] args) {
SpringApplication.run(DevBootApplication.class,args);
}
@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
super.addArgumentResolvers(argumentResolvers);
argumentResolvers.add(new cn.ibizlab.assetmanagement.util.web.SearchContextHandlerMethodArgumentResolver());
}
}
package cn.ibizlab.assetmanagement.config;
import cn.ibizlab.assetmanagement.util.security.AuthenticationEntryPoint;
import cn.ibizlab.assetmanagement.util.security.AuthorizationTokenFilter;
import cn.ibizlab.assetmanagement.util.service.AuthenticationUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.core.GrantedAuthorityDefaults;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.beans.factory.annotation.Qualifier;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private AuthenticationEntryPoint unauthorizedHandler;
@Autowired
private AuthenticationUserService userDetailsService;
/**
* 自定义基于JWT的安全过滤器
*/
@Autowired
AuthorizationTokenFilter authenticationTokenFilter;
@Value("${ibiz.auth.path:v7/login}")
private String loginPath;
@Value("${ibiz.auth.logoutpath:v7/logout}")
private String logoutPath;
@Value("${ibiz.file.uploadpath:ibizutil/upload}")
private String uploadpath;
@Value("${ibiz.file.downloadpath:ibizutil/download}")
private String downloadpath;
@Value("${ibiz.file.previewpath:ibizutil/preview}")
private String previewpath;
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth
.userDetailsService(userDetailsService)
.passwordEncoder(passwordEncoderBean());
}
@Bean
GrantedAuthorityDefaults grantedAuthorityDefaults() {
// Remove the ROLE_ prefix
return new GrantedAuthorityDefaults("");
}
@Bean
public PasswordEncoder passwordEncoderBean() {
return new BCryptPasswordEncoder();
}
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity
// 禁用 CSRF
.csrf().disable()
// 授权异常
.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
// 不创建会话
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
// 过滤请求
.authorizeRequests()
.antMatchers(
HttpMethod.GET,
"/*.html",
"/**/*.html",
"/**/*.css",
"/**/*.js",
"/**/*.ico",
"/**/assets/**",
"/**/css/**",
"/**/fonts/**",
"/**/js/**",
"/**/img/**",
"/",
"webjars/**",
"/swagger-resources/**",
"/v2/**"
).permitAll()
//放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.GET,"/"+logoutPath).permitAll()
// 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll()
.antMatchers("/"+previewpath+"/**").permitAll()
.anyRequest().authenticated()
// 防止iframe 造成跨域
.and().headers().frameOptions().disable();
httpSecurity
.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
}
}
server:
port: 8080
#zuul网关路由设置
zuul:
routes:
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /config/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
spring:
profiles:
include: sys ,nacos, assetmanagement-dev, assetapi-dev, dev
application:
name: ibizassetmanagement
main:
allow-bean-definition-overriding: true
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<property name="LOG_PATH" value="logs" />
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] %-40.40logger{39} : %msg%n" />
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="LOG_PATTERN2" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
<!-- 控制台输出 -->
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 按照每天生成日志文件 -->
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_PATH}/ibizassetmanagement.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="Console" />
<appender-ref ref="file" />
</root>
</configuration>
<?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>
<parent>
<artifactId>assetmanagement</artifactId>
<groupId>cn.ibizlab.assetmanagement</groupId>
<version>1.0.0.0</version>
</parent>
<artifactId>assetmanagement-core</artifactId>
<name>Assetmanagement Core</name>
<description>Assetmanagement Core</description>
<dependencies>
<dependency>
<groupId>cn.ibizlab.assetmanagement</groupId>
<artifactId>assetmanagement-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<!-- JBPM -->
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-flow-builder</artifactId>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-bpmn2</artifactId>
</dependency>
<!-- Drools -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-spring</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- MySQL数据库 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid阿里连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<!--MapStruct高性能属性映射工具-->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
</dependency>
<!--MongoDB-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<!--Liquibase数据库版本更新工具-->
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
<!--baomidou-jobs定时服务 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>jobs-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<properties>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
</properties>
<profiles>
<profile>
<id>diff</id>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.version}</version>
<executions>
<execution>
<id>prepare-newdb</id>
<configuration>
<changeLogFile>${project.basedir}/src/main/resources/liquibase/h2_table.xml</changeLogFile>
<driver>org.h2.Driver</driver>
<url>jdbc:h2:file:${project.build.directory}/db/new;MODE=mysql</url>
<username>root</username>
<dropFirst>true</dropFirst>
</configuration>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
<execution>
<id>prepare-olddb</id>
<configuration>
<changeLogFile>${project.basedir}/src/main/resources/liquibase/master_table.xml</changeLogFile>
<driver>org.h2.Driver</driver>
<url>jdbc:h2:file:${project.build.directory}/db/last;MODE=mysql</url>
<username>root</username>
<dropFirst>true</dropFirst>
</configuration>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
<execution>
<id>make-diff</id>
<configuration>
<changeLogFile>${project.basedir}/src/main/resources/liquibase/empty.xml</changeLogFile>
<diffChangeLogFile>${project.basedir}/src/main/resources/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<driver>org.h2.Driver</driver>
<url>jdbc:h2:file:${project.build.directory}/db/last;MODE=mysql</url>
<username>root</username>
<password></password>
<referenceUrl>jdbc:h2:file:${project.build.directory}/db/new;MODE=mysql</referenceUrl>
<referenceDriver>org.h2.Driver</referenceDriver>
<referenceUsername>root</referenceUsername>
<verbose>true</verbose>
<logging>debug</logging>
<contexts>!test</contexts>
<diffExcludeObjects>Index:.*,table:ibzfile,ibzuser,ibzdataaudit,ibzcfg,IBZFILE,IBZUSER,IBZDATAAUDIT,IBZCFG</diffExcludeObjects>
</configuration>
<phase>process-resources</phase>
<goals>
<goal>diff</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
package cn.ibizlab.assetmanagement.core.apply.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[维护申请]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMAPPLY",resultMap = "EAMApplyResultMap")
public class EAMApply extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 维护申请标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamapplyid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamapplyid")
@JsonProperty("eamapplyid")
private String eamapplyid;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 维护申请名称
*/
@TableField(value = "eamapplyname")
@JSONField(name = "eamapplyname")
@JsonProperty("eamapplyname")
private String eamapplyname;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 维护申请类型标识
*/
@TableField(value = "eamapplytypeid")
@JSONField(name = "eamapplytypeid")
@JsonProperty("eamapplytypeid")
private String eamapplytypeid;
/**
* 功能位置标识
*/
@TableField(value = "eamlocationid")
@JSONField(name = "eamlocationid")
@JsonProperty("eamlocationid")
private String eamlocationid;
/**
* 资产标识
*/
@TableField(value = "assetid")
@JSONField(name = "assetid")
@JsonProperty("assetid")
private String assetid;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyType eamapplytype;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMAsset asset;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.location.domain.EAMLocation eamlocation;
/**
* 设置 [维护申请名称]
*/
public void setEamapplyname(String eamapplyname){
this.eamapplyname = eamapplyname ;
this.modify("eamapplyname",eamapplyname);
}
/**
* 设置 [维护申请类型标识]
*/
public void setEamapplytypeid(String eamapplytypeid){
this.eamapplytypeid = eamapplytypeid ;
this.modify("eamapplytypeid",eamapplytypeid);
}
/**
* 设置 [功能位置标识]
*/
public void setEamlocationid(String eamlocationid){
this.eamlocationid = eamlocationid ;
this.modify("eamlocationid",eamlocationid);
}
/**
* 设置 [资产标识]
*/
public void setAssetid(String assetid){
this.assetid = assetid ;
this.modify("assetid",assetid);
}
}
package cn.ibizlab.assetmanagement.core.apply.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[维护申请状态]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMAPPLYSTATE",resultMap = "EAMApplyStateResultMap")
public class EAMApplyState extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 维护申请状态标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamapplystateid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamapplystateid")
@JsonProperty("eamapplystateid")
private String eamapplystateid;
/**
* 维护申请状态名称
*/
@TableField(value = "eamapplystatename")
@JSONField(name = "eamapplystatename")
@JsonProperty("eamapplystatename")
private String eamapplystatename;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 设置 [维护申请状态名称]
*/
public void setEamapplystatename(String eamapplystatename){
this.eamapplystatename = eamapplystatename ;
this.modify("eamapplystatename",eamapplystatename);
}
}
package cn.ibizlab.assetmanagement.core.apply.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[维护申请状态模型]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMAPPLYSTATEMODEL",resultMap = "EAMApplyStateModelResultMap")
public class EAMApplyStateModel extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 维护申请状态模型名称
*/
@TableField(value = "eamapplystatemodelname")
@JSONField(name = "eamapplystatemodelname")
@JsonProperty("eamapplystatemodelname")
private String eamapplystatemodelname;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 维护申请状态模型标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamapplystatemodelid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamapplystatemodelid")
@JsonProperty("eamapplystatemodelid")
private String eamapplystatemodelid;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 设置 [维护申请状态模型名称]
*/
public void setEamapplystatemodelname(String eamapplystatemodelname){
this.eamapplystatemodelname = eamapplystatemodelname ;
this.modify("eamapplystatemodelname",eamapplystatemodelname);
}
}
package cn.ibizlab.assetmanagement.core.apply.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[维护申请状态模型明细]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMAPPLYSTATEMODELLINE",resultMap = "EAMApplyStateModelLineResultMap")
public class EAMApplyStateModelLine extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 维护申请状态模型明细名称
*/
@TableField(value = "eamapplystatemodellinename")
@JSONField(name = "eamapplystatemodellinename")
@JsonProperty("eamapplystatemodellinename")
private String eamapplystatemodellinename;
/**
* 维护申请状态模型明细标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamapplystatemodellineid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamapplystatemodellineid")
@JsonProperty("eamapplystatemodellineid")
private String eamapplystatemodellineid;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 维护申请状态标识
*/
@TableField(value = "eamapplystateid")
@JSONField(name = "eamapplystateid")
@JsonProperty("eamapplystateid")
private String eamapplystateid;
/**
* 维护申请状态模型标识
*/
@TableField(value = "eamapplystatemodelid")
@JSONField(name = "eamapplystatemodelid")
@JsonProperty("eamapplystatemodelid")
private String eamapplystatemodelid;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModel eamapplystatemodel;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyState eamapplystate;
/**
* 设置 [维护申请状态模型明细名称]
*/
public void setEamapplystatemodellinename(String eamapplystatemodellinename){
this.eamapplystatemodellinename = eamapplystatemodellinename ;
this.modify("eamapplystatemodellinename",eamapplystatemodellinename);
}
/**
* 设置 [维护申请状态标识]
*/
public void setEamapplystateid(String eamapplystateid){
this.eamapplystateid = eamapplystateid ;
this.modify("eamapplystateid",eamapplystateid);
}
/**
* 设置 [维护申请状态模型标识]
*/
public void setEamapplystatemodelid(String eamapplystatemodelid){
this.eamapplystatemodelid = eamapplystatemodelid ;
this.modify("eamapplystatemodelid",eamapplystatemodelid);
}
}
package cn.ibizlab.assetmanagement.core.apply.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[维护申请类型]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMAPPLYTYPE",resultMap = "EAMApplyTypeResultMap")
public class EAMApplyType extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 维护申请类型标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamapplytypeid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamapplytypeid")
@JsonProperty("eamapplytypeid")
private String eamapplytypeid;
/**
* 维护申请类型名称
*/
@TableField(value = "eamapplytypename")
@JSONField(name = "eamapplytypename")
@JsonProperty("eamapplytypename")
private String eamapplytypename;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 维护申请状态模型标识
*/
@TableField(value = "eamapplystatemodelid")
@JSONField(name = "eamapplystatemodelid")
@JsonProperty("eamapplystatemodelid")
private String eamapplystatemodelid;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModel eamapplystatemodel;
/**
* 设置 [维护申请类型名称]
*/
public void setEamapplytypename(String eamapplytypename){
this.eamapplytypename = eamapplytypename ;
this.modify("eamapplytypename",eamapplytypename);
}
/**
* 设置 [维护申请状态模型标识]
*/
public void setEamapplystatemodelid(String eamapplystatemodelid){
this.eamapplystatemodelid = eamapplystatemodelid ;
this.modify("eamapplystatemodelid",eamapplystatemodelid);
}
}
package cn.ibizlab.assetmanagement.core.apply.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApply;
/**
* 关系型数据实体[EAMApply] 查询条件对象
*/
@Slf4j
@Data
public class EAMApplySearchContext extends QueryWrapperContext<EAMApply> {
private String n_eamapplyname_like;//[维护申请名称]
public void setN_eamapplyname_like(String n_eamapplyname_like) {
this.n_eamapplyname_like = n_eamapplyname_like;
if(!ObjectUtils.isEmpty(this.n_eamapplyname_like)){
this.getSearchCond().like("eamapplyname", n_eamapplyname_like);
}
}
private String n_eamapplytypeid_eq;//[维护申请类型标识]
public void setN_eamapplytypeid_eq(String n_eamapplytypeid_eq) {
this.n_eamapplytypeid_eq = n_eamapplytypeid_eq;
if(!ObjectUtils.isEmpty(this.n_eamapplytypeid_eq)){
this.getSearchCond().eq("eamapplytypeid", n_eamapplytypeid_eq);
}
}
private String n_eamlocationid_eq;//[功能位置标识]
public void setN_eamlocationid_eq(String n_eamlocationid_eq) {
this.n_eamlocationid_eq = n_eamlocationid_eq;
if(!ObjectUtils.isEmpty(this.n_eamlocationid_eq)){
this.getSearchCond().eq("eamlocationid", n_eamlocationid_eq);
}
}
private String n_assetid_eq;//[资产标识]
public void setN_assetid_eq(String n_assetid_eq) {
this.n_assetid_eq = n_assetid_eq;
if(!ObjectUtils.isEmpty(this.n_assetid_eq)){
this.getSearchCond().eq("assetid", n_assetid_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamapplyname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.apply.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModelLine;
/**
* 关系型数据实体[EAMApplyStateModelLine] 查询条件对象
*/
@Slf4j
@Data
public class EAMApplyStateModelLineSearchContext extends QueryWrapperContext<EAMApplyStateModelLine> {
private String n_eamapplystatemodellinename_like;//[维护申请状态模型明细名称]
public void setN_eamapplystatemodellinename_like(String n_eamapplystatemodellinename_like) {
this.n_eamapplystatemodellinename_like = n_eamapplystatemodellinename_like;
if(!ObjectUtils.isEmpty(this.n_eamapplystatemodellinename_like)){
this.getSearchCond().like("eamapplystatemodellinename", n_eamapplystatemodellinename_like);
}
}
private String n_eamapplystateid_eq;//[维护申请状态标识]
public void setN_eamapplystateid_eq(String n_eamapplystateid_eq) {
this.n_eamapplystateid_eq = n_eamapplystateid_eq;
if(!ObjectUtils.isEmpty(this.n_eamapplystateid_eq)){
this.getSearchCond().eq("eamapplystateid", n_eamapplystateid_eq);
}
}
private String n_eamapplystatemodelid_eq;//[维护申请状态模型标识]
public void setN_eamapplystatemodelid_eq(String n_eamapplystatemodelid_eq) {
this.n_eamapplystatemodelid_eq = n_eamapplystatemodelid_eq;
if(!ObjectUtils.isEmpty(this.n_eamapplystatemodelid_eq)){
this.getSearchCond().eq("eamapplystatemodelid", n_eamapplystatemodelid_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamapplystatemodellinename", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.apply.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModel;
/**
* 关系型数据实体[EAMApplyStateModel] 查询条件对象
*/
@Slf4j
@Data
public class EAMApplyStateModelSearchContext extends QueryWrapperContext<EAMApplyStateModel> {
private String n_eamapplystatemodelname_like;//[维护申请状态模型名称]
public void setN_eamapplystatemodelname_like(String n_eamapplystatemodelname_like) {
this.n_eamapplystatemodelname_like = n_eamapplystatemodelname_like;
if(!ObjectUtils.isEmpty(this.n_eamapplystatemodelname_like)){
this.getSearchCond().like("eamapplystatemodelname", n_eamapplystatemodelname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamapplystatemodelname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.apply.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyState;
/**
* 关系型数据实体[EAMApplyState] 查询条件对象
*/
@Slf4j
@Data
public class EAMApplyStateSearchContext extends QueryWrapperContext<EAMApplyState> {
private String n_eamapplystatename_like;//[维护申请状态名称]
public void setN_eamapplystatename_like(String n_eamapplystatename_like) {
this.n_eamapplystatename_like = n_eamapplystatename_like;
if(!ObjectUtils.isEmpty(this.n_eamapplystatename_like)){
this.getSearchCond().like("eamapplystatename", n_eamapplystatename_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamapplystatename", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.apply.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyType;
/**
* 关系型数据实体[EAMApplyType] 查询条件对象
*/
@Slf4j
@Data
public class EAMApplyTypeSearchContext extends QueryWrapperContext<EAMApplyType> {
private String n_eamapplytypename_like;//[维护申请类型名称]
public void setN_eamapplytypename_like(String n_eamapplytypename_like) {
this.n_eamapplytypename_like = n_eamapplytypename_like;
if(!ObjectUtils.isEmpty(this.n_eamapplytypename_like)){
this.getSearchCond().like("eamapplytypename", n_eamapplytypename_like);
}
}
private String n_eamapplystatemodelid_eq;//[维护申请状态模型标识]
public void setN_eamapplystatemodelid_eq(String n_eamapplystatemodelid_eq) {
this.n_eamapplystatemodelid_eq = n_eamapplystatemodelid_eq;
if(!ObjectUtils.isEmpty(this.n_eamapplystatemodelid_eq)){
this.getSearchCond().eq("eamapplystatemodelid", n_eamapplystatemodelid_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamapplytypename", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.apply.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApply;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplySearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMApplyMapper extends BaseMapper<EAMApply>{
Page<EAMApply> searchDefault(IPage page, @Param("srf") EAMApplySearchContext context, @Param("ew") Wrapper<EAMApply> wrapper) ;
@Override
EAMApply selectById(Serializable id);
@Override
int insert(EAMApply entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMApply entity);
@Override
int update(@Param(Constants.ENTITY) EAMApply entity, @Param("ew") Wrapper<EAMApply> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<EAMApply> selectByEamapplytypeid(@Param("eamapplytypeid") Serializable eamapplytypeid) ;
List<EAMApply> selectByAssetid(@Param("assetid") Serializable assetid) ;
List<EAMApply> selectByEamlocationid(@Param("eamlocationid") Serializable eamlocationid) ;
}
package cn.ibizlab.assetmanagement.core.apply.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyState;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMApplyStateMapper extends BaseMapper<EAMApplyState>{
Page<EAMApplyState> searchDefault(IPage page, @Param("srf") EAMApplyStateSearchContext context, @Param("ew") Wrapper<EAMApplyState> wrapper) ;
@Override
EAMApplyState selectById(Serializable id);
@Override
int insert(EAMApplyState entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMApplyState entity);
@Override
int update(@Param(Constants.ENTITY) EAMApplyState entity, @Param("ew") Wrapper<EAMApplyState> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.assetmanagement.core.apply.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModelLine;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateModelLineSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMApplyStateModelLineMapper extends BaseMapper<EAMApplyStateModelLine>{
Page<EAMApplyStateModelLine> searchDefault(IPage page, @Param("srf") EAMApplyStateModelLineSearchContext context, @Param("ew") Wrapper<EAMApplyStateModelLine> wrapper) ;
@Override
EAMApplyStateModelLine selectById(Serializable id);
@Override
int insert(EAMApplyStateModelLine entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMApplyStateModelLine entity);
@Override
int update(@Param(Constants.ENTITY) EAMApplyStateModelLine entity, @Param("ew") Wrapper<EAMApplyStateModelLine> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<EAMApplyStateModelLine> selectByEamapplystatemodelid(@Param("eamapplystatemodelid") Serializable eamapplystatemodelid) ;
List<EAMApplyStateModelLine> selectByEamapplystateid(@Param("eamapplystateid") Serializable eamapplystateid) ;
}
package cn.ibizlab.assetmanagement.core.apply.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModel;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateModelSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMApplyStateModelMapper extends BaseMapper<EAMApplyStateModel>{
Page<EAMApplyStateModel> searchDefault(IPage page, @Param("srf") EAMApplyStateModelSearchContext context, @Param("ew") Wrapper<EAMApplyStateModel> wrapper) ;
@Override
EAMApplyStateModel selectById(Serializable id);
@Override
int insert(EAMApplyStateModel entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMApplyStateModel entity);
@Override
int update(@Param(Constants.ENTITY) EAMApplyStateModel entity, @Param("ew") Wrapper<EAMApplyStateModel> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.assetmanagement.core.apply.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyType;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyTypeSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMApplyTypeMapper extends BaseMapper<EAMApplyType>{
Page<EAMApplyType> searchDefault(IPage page, @Param("srf") EAMApplyTypeSearchContext context, @Param("ew") Wrapper<EAMApplyType> wrapper) ;
@Override
EAMApplyType selectById(Serializable id);
@Override
int insert(EAMApplyType entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMApplyType entity);
@Override
int update(@Param(Constants.ENTITY) EAMApplyType entity, @Param("ew") Wrapper<EAMApplyType> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<EAMApplyType> selectByEamapplystatemodelid(@Param("eamapplystatemodelid") Serializable eamapplystatemodelid) ;
}
package cn.ibizlab.assetmanagement.core.apply.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApply;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplySearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMApply] 服务对象接口
*/
public interface IEAMApplyService extends IService<EAMApply>{
boolean create(EAMApply et) ;
void createBatch(List<EAMApply> list) ;
boolean update(EAMApply et) ;
void updateBatch(List<EAMApply> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMApply get(String key) ;
EAMApply getDraft(EAMApply et) ;
boolean checkKey(EAMApply et) ;
boolean save(EAMApply et) ;
void saveBatch(List<EAMApply> list) ;
Page<EAMApply> searchDefault(EAMApplySearchContext context) ;
List<EAMApply> selectByEamapplytypeid(String eamapplytypeid) ;
void removeByEamapplytypeid(String eamapplytypeid) ;
List<EAMApply> selectByAssetid(String assetid) ;
void removeByAssetid(String assetid) ;
List<EAMApply> selectByEamlocationid(String eamlocationid) ;
void removeByEamlocationid(String eamlocationid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMApply> getEamapplyByIds(List<String> ids) ;
List<EAMApply> getEamapplyByEntities(List<EAMApply> entities) ;
}
package cn.ibizlab.assetmanagement.core.apply.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModelLine;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateModelLineSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMApplyStateModelLine] 服务对象接口
*/
public interface IEAMApplyStateModelLineService extends IService<EAMApplyStateModelLine>{
boolean create(EAMApplyStateModelLine et) ;
void createBatch(List<EAMApplyStateModelLine> list) ;
boolean update(EAMApplyStateModelLine et) ;
void updateBatch(List<EAMApplyStateModelLine> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMApplyStateModelLine get(String key) ;
EAMApplyStateModelLine getDraft(EAMApplyStateModelLine et) ;
boolean checkKey(EAMApplyStateModelLine et) ;
boolean save(EAMApplyStateModelLine et) ;
void saveBatch(List<EAMApplyStateModelLine> list) ;
Page<EAMApplyStateModelLine> searchDefault(EAMApplyStateModelLineSearchContext context) ;
List<EAMApplyStateModelLine> selectByEamapplystatemodelid(String eamapplystatemodelid) ;
void removeByEamapplystatemodelid(String eamapplystatemodelid) ;
List<EAMApplyStateModelLine> selectByEamapplystateid(String eamapplystateid) ;
void removeByEamapplystateid(String eamapplystateid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMApplyStateModelLine> getEamapplystatemodellineByIds(List<String> ids) ;
List<EAMApplyStateModelLine> getEamapplystatemodellineByEntities(List<EAMApplyStateModelLine> entities) ;
}
package cn.ibizlab.assetmanagement.core.apply.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModel;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateModelSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMApplyStateModel] 服务对象接口
*/
public interface IEAMApplyStateModelService extends IService<EAMApplyStateModel>{
boolean create(EAMApplyStateModel et) ;
void createBatch(List<EAMApplyStateModel> list) ;
boolean update(EAMApplyStateModel et) ;
void updateBatch(List<EAMApplyStateModel> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMApplyStateModel get(String key) ;
EAMApplyStateModel getDraft(EAMApplyStateModel et) ;
boolean checkKey(EAMApplyStateModel et) ;
boolean save(EAMApplyStateModel et) ;
void saveBatch(List<EAMApplyStateModel> list) ;
Page<EAMApplyStateModel> searchDefault(EAMApplyStateModelSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMApplyStateModel> getEamapplystatemodelByIds(List<String> ids) ;
List<EAMApplyStateModel> getEamapplystatemodelByEntities(List<EAMApplyStateModel> entities) ;
}
package cn.ibizlab.assetmanagement.core.apply.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyState;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMApplyState] 服务对象接口
*/
public interface IEAMApplyStateService extends IService<EAMApplyState>{
boolean create(EAMApplyState et) ;
void createBatch(List<EAMApplyState> list) ;
boolean update(EAMApplyState et) ;
void updateBatch(List<EAMApplyState> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMApplyState get(String key) ;
EAMApplyState getDraft(EAMApplyState et) ;
boolean checkKey(EAMApplyState et) ;
boolean save(EAMApplyState et) ;
void saveBatch(List<EAMApplyState> list) ;
Page<EAMApplyState> searchDefault(EAMApplyStateSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMApplyState> getEamapplystateByIds(List<String> ids) ;
List<EAMApplyState> getEamapplystateByEntities(List<EAMApplyState> entities) ;
}
package cn.ibizlab.assetmanagement.core.apply.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyType;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyTypeSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMApplyType] 服务对象接口
*/
public interface IEAMApplyTypeService extends IService<EAMApplyType>{
boolean create(EAMApplyType et) ;
void createBatch(List<EAMApplyType> list) ;
boolean update(EAMApplyType et) ;
void updateBatch(List<EAMApplyType> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMApplyType get(String key) ;
EAMApplyType getDraft(EAMApplyType et) ;
boolean checkKey(EAMApplyType et) ;
boolean save(EAMApplyType et) ;
void saveBatch(List<EAMApplyType> list) ;
Page<EAMApplyType> searchDefault(EAMApplyTypeSearchContext context) ;
List<EAMApplyType> selectByEamapplystatemodelid(String eamapplystatemodelid) ;
void removeByEamapplystatemodelid(String eamapplystatemodelid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMApplyType> getEamapplytypeByIds(List<String> ids) ;
List<EAMApplyType> getEamapplytypeByEntities(List<EAMApplyType> entities) ;
}
package cn.ibizlab.assetmanagement.core.apply.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApply;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplySearchContext;
import cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.apply.mapper.EAMApplyMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[维护申请] 服务对象接口实现
*/
@Slf4j
@Service("EAMApplyServiceImpl")
public class EAMApplyServiceImpl extends ServiceImpl<EAMApplyMapper, EAMApply> implements IEAMApplyService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyTypeService eamapplytypeService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMAssetService eamassetService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.location.service.IEAMLocationService eamlocationService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMApply et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamapplyid()),et);
return true;
}
@Override
public void createBatch(List<EAMApply> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMApply et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamapplyid",et.getEamapplyid())))
return false;
CachedBeanCopier.copy(get(et.getEamapplyid()),et);
return true;
}
@Override
public void updateBatch(List<EAMApply> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMApply get(String key) {
EAMApply et = getById(key);
if(et==null){
et=new EAMApply();
et.setEamapplyid(key);
}
else{
}
return et;
}
@Override
public EAMApply getDraft(EAMApply et) {
return et;
}
@Override
public boolean checkKey(EAMApply et) {
return (!ObjectUtils.isEmpty(et.getEamapplyid()))&&(!Objects.isNull(this.getById(et.getEamapplyid())));
}
@Override
@Transactional
public boolean save(EAMApply et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(EAMApply et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMApply> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMApply> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<EAMApply> selectByEamapplytypeid(String eamapplytypeid) {
return baseMapper.selectByEamapplytypeid(eamapplytypeid);
}
@Override
public void removeByEamapplytypeid(String eamapplytypeid) {
this.remove(new QueryWrapper<EAMApply>().eq("eamapplytypeid",eamapplytypeid));
}
@Override
public List<EAMApply> selectByAssetid(String assetid) {
return baseMapper.selectByAssetid(assetid);
}
@Override
public void removeByAssetid(String assetid) {
this.remove(new QueryWrapper<EAMApply>().eq("assetid",assetid));
}
@Override
public List<EAMApply> selectByEamlocationid(String eamlocationid) {
return baseMapper.selectByEamlocationid(eamlocationid);
}
@Override
public void removeByEamlocationid(String eamlocationid) {
this.remove(new QueryWrapper<EAMApply>().eq("eamlocationid",eamlocationid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMApply> searchDefault(EAMApplySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMApply> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMApply>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMApply> getEamapplyByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMApply> getEamapplyByEntities(List<EAMApply> entities) {
List ids =new ArrayList();
for(EAMApply entity : entities){
Serializable id=entity.getEamapplyid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.apply.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModelLine;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateModelLineSearchContext;
import cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateModelLineService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.apply.mapper.EAMApplyStateModelLineMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[维护申请状态模型明细] 服务对象接口实现
*/
@Slf4j
@Service("EAMApplyStateModelLineServiceImpl")
public class EAMApplyStateModelLineServiceImpl extends ServiceImpl<EAMApplyStateModelLineMapper, EAMApplyStateModelLine> implements IEAMApplyStateModelLineService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateModelService eamapplystatemodelService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateService eamapplystateService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMApplyStateModelLine et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamapplystatemodellineid()),et);
return true;
}
@Override
public void createBatch(List<EAMApplyStateModelLine> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMApplyStateModelLine et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamapplystatemodellineid",et.getEamapplystatemodellineid())))
return false;
CachedBeanCopier.copy(get(et.getEamapplystatemodellineid()),et);
return true;
}
@Override
public void updateBatch(List<EAMApplyStateModelLine> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMApplyStateModelLine get(String key) {
EAMApplyStateModelLine et = getById(key);
if(et==null){
et=new EAMApplyStateModelLine();
et.setEamapplystatemodellineid(key);
}
else{
}
return et;
}
@Override
public EAMApplyStateModelLine getDraft(EAMApplyStateModelLine et) {
return et;
}
@Override
public boolean checkKey(EAMApplyStateModelLine et) {
return (!ObjectUtils.isEmpty(et.getEamapplystatemodellineid()))&&(!Objects.isNull(this.getById(et.getEamapplystatemodellineid())));
}
@Override
@Transactional
public boolean save(EAMApplyStateModelLine et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(EAMApplyStateModelLine et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMApplyStateModelLine> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMApplyStateModelLine> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<EAMApplyStateModelLine> selectByEamapplystatemodelid(String eamapplystatemodelid) {
return baseMapper.selectByEamapplystatemodelid(eamapplystatemodelid);
}
@Override
public void removeByEamapplystatemodelid(String eamapplystatemodelid) {
this.remove(new QueryWrapper<EAMApplyStateModelLine>().eq("eamapplystatemodelid",eamapplystatemodelid));
}
@Override
public List<EAMApplyStateModelLine> selectByEamapplystateid(String eamapplystateid) {
return baseMapper.selectByEamapplystateid(eamapplystateid);
}
@Override
public void removeByEamapplystateid(String eamapplystateid) {
this.remove(new QueryWrapper<EAMApplyStateModelLine>().eq("eamapplystateid",eamapplystateid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMApplyStateModelLine> searchDefault(EAMApplyStateModelLineSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMApplyStateModelLine> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMApplyStateModelLine>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMApplyStateModelLine> getEamapplystatemodellineByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMApplyStateModelLine> getEamapplystatemodellineByEntities(List<EAMApplyStateModelLine> entities) {
List ids =new ArrayList();
for(EAMApplyStateModelLine entity : entities){
Serializable id=entity.getEamapplystatemodellineid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.apply.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyStateModel;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateModelSearchContext;
import cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateModelService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.apply.mapper.EAMApplyStateModelMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[维护申请状态模型] 服务对象接口实现
*/
@Slf4j
@Service("EAMApplyStateModelServiceImpl")
public class EAMApplyStateModelServiceImpl extends ServiceImpl<EAMApplyStateModelMapper, EAMApplyStateModel> implements IEAMApplyStateModelService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateModelLineService eamapplystatemodellineService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyTypeService eamapplytypeService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMApplyStateModel et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamapplystatemodelid()),et);
return true;
}
@Override
public void createBatch(List<EAMApplyStateModel> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMApplyStateModel et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamapplystatemodelid",et.getEamapplystatemodelid())))
return false;
CachedBeanCopier.copy(get(et.getEamapplystatemodelid()),et);
return true;
}
@Override
public void updateBatch(List<EAMApplyStateModel> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMApplyStateModel get(String key) {
EAMApplyStateModel et = getById(key);
if(et==null){
et=new EAMApplyStateModel();
et.setEamapplystatemodelid(key);
}
else{
}
return et;
}
@Override
public EAMApplyStateModel getDraft(EAMApplyStateModel et) {
return et;
}
@Override
public boolean checkKey(EAMApplyStateModel et) {
return (!ObjectUtils.isEmpty(et.getEamapplystatemodelid()))&&(!Objects.isNull(this.getById(et.getEamapplystatemodelid())));
}
@Override
@Transactional
public boolean save(EAMApplyStateModel et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(EAMApplyStateModel et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMApplyStateModel> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMApplyStateModel> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMApplyStateModel> searchDefault(EAMApplyStateModelSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMApplyStateModel> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMApplyStateModel>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMApplyStateModel> getEamapplystatemodelByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMApplyStateModel> getEamapplystatemodelByEntities(List<EAMApplyStateModel> entities) {
List ids =new ArrayList();
for(EAMApplyStateModel entity : entities){
Serializable id=entity.getEamapplystatemodelid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.apply.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyState;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyStateSearchContext;
import cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.apply.mapper.EAMApplyStateMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[维护申请状态] 服务对象接口实现
*/
@Slf4j
@Service("EAMApplyStateServiceImpl")
public class EAMApplyStateServiceImpl extends ServiceImpl<EAMApplyStateMapper, EAMApplyState> implements IEAMApplyStateService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateModelLineService eamapplystatemodellineService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMApplyState et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamapplystateid()),et);
return true;
}
@Override
public void createBatch(List<EAMApplyState> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMApplyState et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamapplystateid",et.getEamapplystateid())))
return false;
CachedBeanCopier.copy(get(et.getEamapplystateid()),et);
return true;
}
@Override
public void updateBatch(List<EAMApplyState> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMApplyState get(String key) {
EAMApplyState et = getById(key);
if(et==null){
et=new EAMApplyState();
et.setEamapplystateid(key);
}
else{
}
return et;
}
@Override
public EAMApplyState getDraft(EAMApplyState et) {
return et;
}
@Override
public boolean checkKey(EAMApplyState et) {
return (!ObjectUtils.isEmpty(et.getEamapplystateid()))&&(!Objects.isNull(this.getById(et.getEamapplystateid())));
}
@Override
@Transactional
public boolean save(EAMApplyState et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(EAMApplyState et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMApplyState> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMApplyState> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMApplyState> searchDefault(EAMApplyStateSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMApplyState> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMApplyState>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMApplyState> getEamapplystateByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMApplyState> getEamapplystateByEntities(List<EAMApplyState> entities) {
List ids =new ArrayList();
for(EAMApplyState entity : entities){
Serializable id=entity.getEamapplystateid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.apply.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyType;
import cn.ibizlab.assetmanagement.core.apply.filter.EAMApplyTypeSearchContext;
import cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyTypeService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.apply.mapper.EAMApplyTypeMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[维护申请类型] 服务对象接口实现
*/
@Slf4j
@Service("EAMApplyTypeServiceImpl")
public class EAMApplyTypeServiceImpl extends ServiceImpl<EAMApplyTypeMapper, EAMApplyType> implements IEAMApplyTypeService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyService eamapplyService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.apply.service.IEAMApplyStateModelService eamapplystatemodelService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMApplyType et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamapplytypeid()),et);
return true;
}
@Override
public void createBatch(List<EAMApplyType> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMApplyType et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamapplytypeid",et.getEamapplytypeid())))
return false;
CachedBeanCopier.copy(get(et.getEamapplytypeid()),et);
return true;
}
@Override
public void updateBatch(List<EAMApplyType> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMApplyType get(String key) {
EAMApplyType et = getById(key);
if(et==null){
et=new EAMApplyType();
et.setEamapplytypeid(key);
}
else{
}
return et;
}
@Override
public EAMApplyType getDraft(EAMApplyType et) {
return et;
}
@Override
public boolean checkKey(EAMApplyType et) {
return (!ObjectUtils.isEmpty(et.getEamapplytypeid()))&&(!Objects.isNull(this.getById(et.getEamapplytypeid())));
}
@Override
@Transactional
public boolean save(EAMApplyType et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(EAMApplyType et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMApplyType> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMApplyType> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<EAMApplyType> selectByEamapplystatemodelid(String eamapplystatemodelid) {
return baseMapper.selectByEamapplystatemodelid(eamapplystatemodelid);
}
@Override
public void removeByEamapplystatemodelid(String eamapplystatemodelid) {
this.remove(new QueryWrapper<EAMApplyType>().eq("eamapplystatemodelid",eamapplystatemodelid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMApplyType> searchDefault(EAMApplyTypeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMApplyType> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMApplyType>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMApplyType> getEamapplytypeByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMApplyType> getEamapplytypeByEntities(List<EAMApplyType> entities) {
List ids =new ArrayList();
for(EAMApplyType entity : entities){
Serializable id=entity.getEamapplytypeid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[资产]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "ASSET",resultMap = "EAMAssetResultMap")
public class EAMAsset extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 资产标识
*/
@DEField(isKeyField=true)
@TableId(value= "assetid",type=IdType.ASSIGN_UUID)
@JSONField(name = "assetid")
@JsonProperty("assetid")
private String assetid;
/**
* 资产名称
*/
@TableField(value = "assetname")
@JSONField(name = "assetname")
@JsonProperty("assetname")
private String assetname;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 资产类型标识
*/
@TableField(value = "eamassettypeid")
@JSONField(name = "eamassettypeid")
@JsonProperty("eamassettypeid")
private String eamassettypeid;
/**
* 功能位置标识
*/
@TableField(value = "eamlocationid")
@JSONField(name = "eamlocationid")
@JsonProperty("eamlocationid")
private String eamlocationid;
/**
* 上级资产标识
*/
@TableField(value = "passetid")
@JSONField(name = "passetid")
@JsonProperty("passetid")
private String passetid;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetType eamassettype;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMAsset passet;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.location.domain.EAMLocation eamlocation;
/**
* 设置 [资产名称]
*/
public void setAssetname(String assetname){
this.assetname = assetname ;
this.modify("assetname",assetname);
}
/**
* 设置 [资产类型标识]
*/
public void setEamassettypeid(String eamassettypeid){
this.eamassettypeid = eamassettypeid ;
this.modify("eamassettypeid",eamassettypeid);
}
/**
* 设置 [功能位置标识]
*/
public void setEamlocationid(String eamlocationid){
this.eamlocationid = eamlocationid ;
this.modify("eamlocationid",eamlocationid);
}
/**
* 设置 [上级资产标识]
*/
public void setPassetid(String passetid){
this.passetid = passetid ;
this.modify("passetid",passetid);
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[资产状态]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMASSETSTATE",resultMap = "EAMAssetStateResultMap")
public class EAMAssetState extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 资产状态标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamassetstateid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamassetstateid")
@JsonProperty("eamassetstateid")
private String eamassetstateid;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 资产状态名称
*/
@TableField(value = "eamassetstatename")
@JSONField(name = "eamassetstatename")
@JsonProperty("eamassetstatename")
private String eamassetstatename;
/**
* 设置 [资产状态名称]
*/
public void setEamassetstatename(String eamassetstatename){
this.eamassetstatename = eamassetstatename ;
this.modify("eamassetstatename",eamassetstatename);
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[资产状态模型]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMASSETSTATEMODEL",resultMap = "EAMAssetStateModelResultMap")
public class EAMAssetStateModel extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 资产状态模型标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamassetstatemodelid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamassetstatemodelid")
@JsonProperty("eamassetstatemodelid")
private String eamassetstatemodelid;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 资产状态模型名称
*/
@TableField(value = "eamassetstatemodelname")
@JSONField(name = "eamassetstatemodelname")
@JsonProperty("eamassetstatemodelname")
private String eamassetstatemodelname;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 设置 [资产状态模型名称]
*/
public void setEamassetstatemodelname(String eamassetstatemodelname){
this.eamassetstatemodelname = eamassetstatemodelname ;
this.modify("eamassetstatemodelname",eamassetstatemodelname);
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[资产状态模型明细]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMASSETSTATEMODELLINE",resultMap = "EAMAssetStateModelLineResultMap")
public class EAMAssetStateModelLine extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 资产状态模型明细名称
*/
@TableField(value = "eamassetstatemodellinename")
@JSONField(name = "eamassetstatemodellinename")
@JsonProperty("eamassetstatemodellinename")
private String eamassetstatemodellinename;
/**
* 资产状态模型明细标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamassetstatemodellineid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamassetstatemodellineid")
@JsonProperty("eamassetstatemodellineid")
private String eamassetstatemodellineid;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 资产状态模型标识
*/
@TableField(value = "eamassetstatemodelid")
@JSONField(name = "eamassetstatemodelid")
@JsonProperty("eamassetstatemodelid")
private String eamassetstatemodelid;
/**
* 资产状态标识
*/
@TableField(value = "eamassetstateid")
@JSONField(name = "eamassetstateid")
@JsonProperty("eamassetstateid")
private String eamassetstateid;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetStateModel eamassetstatemodel;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetState eamassetstate;
/**
* 设置 [资产状态模型明细名称]
*/
public void setEamassetstatemodellinename(String eamassetstatemodellinename){
this.eamassetstatemodellinename = eamassetstatemodellinename ;
this.modify("eamassetstatemodellinename",eamassetstatemodellinename);
}
/**
* 设置 [资产状态模型标识]
*/
public void setEamassetstatemodelid(String eamassetstatemodelid){
this.eamassetstatemodelid = eamassetstatemodelid ;
this.modify("eamassetstatemodelid",eamassetstatemodelid);
}
/**
* 设置 [资产状态标识]
*/
public void setEamassetstateid(String eamassetstateid){
this.eamassetstateid = eamassetstateid ;
this.modify("eamassetstateid",eamassetstateid);
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[资产类型]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMASSETTYPE",resultMap = "EAMAssetTypeResultMap")
public class EAMAssetType extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 资产类型名称
*/
@TableField(value = "eamassettypename")
@JSONField(name = "eamassettypename")
@JsonProperty("eamassettypename")
private String eamassettypename;
/**
* 资产类型标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamassettypeid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamassettypeid")
@JsonProperty("eamassettypeid")
private String eamassettypeid;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 资产状态模型标识
*/
@TableField(value = "eamassetstatemodelid")
@JSONField(name = "eamassetstatemodelid")
@JsonProperty("eamassetstatemodelid")
private String eamassetstatemodelid;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetStateModel eamassetstatemodel;
/**
* 设置 [资产类型名称]
*/
public void setEamassettypename(String eamassettypename){
this.eamassettypename = eamassettypename ;
this.modify("eamassettypename",eamassettypename);
}
/**
* 设置 [资产状态模型标识]
*/
public void setEamassetstatemodelid(String eamassetstatemodelid){
this.eamassetstatemodelid = eamassetstatemodelid ;
this.modify("eamassetstatemodelid",eamassetstatemodelid);
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAsset;
/**
* 关系型数据实体[EAMAsset] 查询条件对象
*/
@Slf4j
@Data
public class EAMAssetSearchContext extends QueryWrapperContext<EAMAsset> {
private String n_assetname_like;//[资产名称]
public void setN_assetname_like(String n_assetname_like) {
this.n_assetname_like = n_assetname_like;
if(!ObjectUtils.isEmpty(this.n_assetname_like)){
this.getSearchCond().like("assetname", n_assetname_like);
}
}
private String n_eamassettypeid_eq;//[资产类型标识]
public void setN_eamassettypeid_eq(String n_eamassettypeid_eq) {
this.n_eamassettypeid_eq = n_eamassettypeid_eq;
if(!ObjectUtils.isEmpty(this.n_eamassettypeid_eq)){
this.getSearchCond().eq("eamassettypeid", n_eamassettypeid_eq);
}
}
private String n_eamlocationid_eq;//[功能位置标识]
public void setN_eamlocationid_eq(String n_eamlocationid_eq) {
this.n_eamlocationid_eq = n_eamlocationid_eq;
if(!ObjectUtils.isEmpty(this.n_eamlocationid_eq)){
this.getSearchCond().eq("eamlocationid", n_eamlocationid_eq);
}
}
private String n_passetid_eq;//[上级资产标识]
public void setN_passetid_eq(String n_passetid_eq) {
this.n_passetid_eq = n_passetid_eq;
if(!ObjectUtils.isEmpty(this.n_passetid_eq)){
this.getSearchCond().eq("passetid", n_passetid_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("assetname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetStateModelLine;
/**
* 关系型数据实体[EAMAssetStateModelLine] 查询条件对象
*/
@Slf4j
@Data
public class EAMAssetStateModelLineSearchContext extends QueryWrapperContext<EAMAssetStateModelLine> {
private String n_eamassetstatemodellinename_like;//[资产状态模型明细名称]
public void setN_eamassetstatemodellinename_like(String n_eamassetstatemodellinename_like) {
this.n_eamassetstatemodellinename_like = n_eamassetstatemodellinename_like;
if(!ObjectUtils.isEmpty(this.n_eamassetstatemodellinename_like)){
this.getSearchCond().like("eamassetstatemodellinename", n_eamassetstatemodellinename_like);
}
}
private String n_eamassetstatemodelid_eq;//[资产状态模型标识]
public void setN_eamassetstatemodelid_eq(String n_eamassetstatemodelid_eq) {
this.n_eamassetstatemodelid_eq = n_eamassetstatemodelid_eq;
if(!ObjectUtils.isEmpty(this.n_eamassetstatemodelid_eq)){
this.getSearchCond().eq("eamassetstatemodelid", n_eamassetstatemodelid_eq);
}
}
private String n_eamassetstateid_eq;//[资产状态标识]
public void setN_eamassetstateid_eq(String n_eamassetstateid_eq) {
this.n_eamassetstateid_eq = n_eamassetstateid_eq;
if(!ObjectUtils.isEmpty(this.n_eamassetstateid_eq)){
this.getSearchCond().eq("eamassetstateid", n_eamassetstateid_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamassetstatemodellinename", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetStateModel;
/**
* 关系型数据实体[EAMAssetStateModel] 查询条件对象
*/
@Slf4j
@Data
public class EAMAssetStateModelSearchContext extends QueryWrapperContext<EAMAssetStateModel> {
private String n_eamassetstatemodelname_like;//[资产状态模型名称]
public void setN_eamassetstatemodelname_like(String n_eamassetstatemodelname_like) {
this.n_eamassetstatemodelname_like = n_eamassetstatemodelname_like;
if(!ObjectUtils.isEmpty(this.n_eamassetstatemodelname_like)){
this.getSearchCond().like("eamassetstatemodelname", n_eamassetstatemodelname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamassetstatemodelname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetState;
/**
* 关系型数据实体[EAMAssetState] 查询条件对象
*/
@Slf4j
@Data
public class EAMAssetStateSearchContext extends QueryWrapperContext<EAMAssetState> {
private String n_eamassetstatename_like;//[资产状态名称]
public void setN_eamassetstatename_like(String n_eamassetstatename_like) {
this.n_eamassetstatename_like = n_eamassetstatename_like;
if(!ObjectUtils.isEmpty(this.n_eamassetstatename_like)){
this.getSearchCond().like("eamassetstatename", n_eamassetstatename_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamassetstatename", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetType;
/**
* 关系型数据实体[EAMAssetType] 查询条件对象
*/
@Slf4j
@Data
public class EAMAssetTypeSearchContext extends QueryWrapperContext<EAMAssetType> {
private String n_eamassettypename_like;//[资产类型名称]
public void setN_eamassettypename_like(String n_eamassettypename_like) {
this.n_eamassettypename_like = n_eamassettypename_like;
if(!ObjectUtils.isEmpty(this.n_eamassettypename_like)){
this.getSearchCond().like("eamassettypename", n_eamassettypename_like);
}
}
private String n_eamassetstatemodelid_eq;//[资产状态模型标识]
public void setN_eamassetstatemodelid_eq(String n_eamassetstatemodelid_eq) {
this.n_eamassetstatemodelid_eq = n_eamassetstatemodelid_eq;
if(!ObjectUtils.isEmpty(this.n_eamassetstatemodelid_eq)){
this.getSearchCond().eq("eamassetstatemodelid", n_eamassetstatemodelid_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamassettypename", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAsset;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMAssetSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMAssetMapper extends BaseMapper<EAMAsset>{
Page<EAMAsset> searchDefault(IPage page, @Param("srf") EAMAssetSearchContext context, @Param("ew") Wrapper<EAMAsset> wrapper) ;
@Override
EAMAsset selectById(Serializable id);
@Override
int insert(EAMAsset entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMAsset entity);
@Override
int update(@Param(Constants.ENTITY) EAMAsset entity, @Param("ew") Wrapper<EAMAsset> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<EAMAsset> selectByEamassettypeid(@Param("eamassettypeid") Serializable eamassettypeid) ;
List<EAMAsset> selectByPassetid(@Param("assetid") Serializable assetid) ;
List<EAMAsset> selectByEamlocationid(@Param("eamlocationid") Serializable eamlocationid) ;
}
package cn.ibizlab.assetmanagement.core.asset.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetState;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMAssetStateSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMAssetStateMapper extends BaseMapper<EAMAssetState>{
Page<EAMAssetState> searchDefault(IPage page, @Param("srf") EAMAssetStateSearchContext context, @Param("ew") Wrapper<EAMAssetState> wrapper) ;
@Override
EAMAssetState selectById(Serializable id);
@Override
int insert(EAMAssetState entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMAssetState entity);
@Override
int update(@Param(Constants.ENTITY) EAMAssetState entity, @Param("ew") Wrapper<EAMAssetState> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.assetmanagement.core.asset.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetStateModelLine;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMAssetStateModelLineSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMAssetStateModelLineMapper extends BaseMapper<EAMAssetStateModelLine>{
Page<EAMAssetStateModelLine> searchDefault(IPage page, @Param("srf") EAMAssetStateModelLineSearchContext context, @Param("ew") Wrapper<EAMAssetStateModelLine> wrapper) ;
@Override
EAMAssetStateModelLine selectById(Serializable id);
@Override
int insert(EAMAssetStateModelLine entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMAssetStateModelLine entity);
@Override
int update(@Param(Constants.ENTITY) EAMAssetStateModelLine entity, @Param("ew") Wrapper<EAMAssetStateModelLine> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<EAMAssetStateModelLine> selectByEamassetstatemodelid(@Param("eamassetstatemodelid") Serializable eamassetstatemodelid) ;
List<EAMAssetStateModelLine> selectByEamassetstateid(@Param("eamassetstateid") Serializable eamassetstateid) ;
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册