Commit aa7a47bc by 李苗

[add]创建model

1 parent 98eeb432
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
</project>
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="Vion-DevOps" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="vion-nexus" />
<option name="name" value="vion-nexus" />
<option name="url" value="http://maven.vionyun.com:8081/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="aliyun-nexus" />
<option name="name" value="aliyun-nexus" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration>
<fileset id="fileset" name="Spring Application Context" removed="false">
<file>file://$MODULE_DIR$/src/main/resources/application-dev.properties</file>
<file>file://$MODULE_DIR$/src/main/resources/application-pro.properties</file>
</fileset>
</configuration>
</facet>
</component>
</module>
\ No newline at end of file
<?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>
<groupId>org.example</groupId>
<artifactId>Vion-DevOps</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.8</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.20</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application-*.properties</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>6</source>
<target>6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package vion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import java.util.concurrent.CountDownLatch;
@SpringBootApplication
@EnableScheduling
public class Application implements CommandLineRunner {
public static void main(String[] args) {
try {
SpringApplication.run(Application.class, args);
new CountDownLatch(1).await();
} catch (Exception e) {
e.printStackTrace();
}
}
private final static Logger logger = LoggerFactory.getLogger(Application.class);
@Scheduled(fixedDelay=1000*60*10,initialDelay=1000)
public void startJob(){
try {
logger.info("启动");
logger.info("启动完成");
} catch (Exception e) {
e.printStackTrace();
// System.exit(-1);
}
}
@Override
public void run(String... args) throws Exception {
}
}
package vion.model;
import lombok.Data;
/**
* 门店地址信息
*/
@Data
public class Address {
private Integer id;//自增列
private Integer store_id;//门店编码(外键)
private String consignee_name;//收货名称
private String consignee_phone;//收货手机号
private String consignee_address;//收货地址
private String contract_name;//合同姓名
private String contract_phone;//合同手机号
private String contract_address;//合同地址
private String invoice_name ;//发票姓名
private String invoice_phone;//发票手机号
private String invoice_address;//发票地址
private String invoice_info;//开票信息
private String remark;//备注
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 工单操作记录
*/
@Data
public class Fault_log {
private Integer id;//自增列
private Integer store_id;//门店id(外键)
private Integer workorder_id;//工单id(外键)
private Integer operator;//操作者
private String content;//操作内容
private Date create_time;//创建时间
private String remark;//备注
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 文件信息
*/
@Data
public class File {
private Integer id;//自增列
private Integer store_id;//门店id(外键)
private Integer type;//文件类型(1图片 2文件)
private Integer source_type;//文件来源(项目、工单预处理,工单操作,巡检)
private Integer source_id;//文件来源id
private String name;//文件名称
private String url;//文件地址
private Date create_time;//创建时间
private String remark;//备注
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 巡检信息
*/
@Data
public class Inspect {
private Integer id;//自增列
private Integer store_id;//门店id(外键)
private Date inspect_date;//巡检日期
private Integer type;//巡检方式(0远程、1现场)
private Integer status;//状态(0进行中、1待审核、2已完成、3、驳回)
private Integer inspect_user;//巡检人
private Integer reviewer;//审核人
private Date audit_date;//审核日期
private Date finish_date;//完成日期
private Date create_time;//创建时间
private Date modify_time;//修改时间
private String remark;//备注
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 产品信息
*/
@Data
public class Product {
private Integer id;//自增列
private String material_no;//物料编号
private Integer store_id;//门店id(外键)
private String name;//产品名称
private Integer functionary;//产品型号
private Integer brand;//品牌
private Integer product_count;//订货数量
private Float product_price;//订货单价
private Float product_subtotal;//定后价小计(单价乘以数量)
private Float product_total_price;//订货总价
private Date create_time;//创建时间
private Date modify_time;//修改时间
private String remark;//备注
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 门店信息
*/
@Data
public class Store {
private Integer id;
private String storenum;
private String name ;// 门店名称
private String number;// 流水号
private String contract_code;//合同编码
private Float amount;// 合同金额
private Date orderdate;//签订日期
private String salesperson;//销售人
private Integer warranty_period;//质保期
private String customer_name;//客户姓名
private Integer product_type;//产品型号
private Integer implement_type;//实施类型:0纯供货、1供货+安装、3续保、4维修
private Integer project_state;//项目状态:0待确认、1进行中、2已完成、3挂起
private String contacts;//联系人(多个联系人逗号隔开)
private Integer create_user;//创建者
private Integer modify_user;//修改者
private Date create_time;//创建时间
private Date modify_time;//修改时间
private String remark;//备注
private Integer project_stage;//项目阶段
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 用户信息
*/
@Data
public class User {
private Integer id;
private String name;
private String password;
private Date create_time;
private String remark;
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 工单信息
*/
@Data
public class Work_order {
private Integer id;//自增列
private Integer store_id;//门店id(外键)
private Date repair_date;//报修日期
private Integer fault_type;//故障类型
private String fault_description;//故障说明
private Integer repair_people;//报修人
private String repair_phone;//报修人联系方式
private Integer status;//状态:0待确认1进行中2已完成3挂起
private Date solve_date;//解决日期
private Date fault_reason;//故障原因
private Integer solve_type;//解决措施:0产品BUG、1使用问题、2需求问题
private String solve_description;//解决故障描述
private Integer create_user;//创建者
private Integer current_user;//当前处理人
private Date create_time;//创建时间
private Date modify_time;//修改时间
private String remark;//备注
}
package vion.model;
import lombok.Data;
import java.util.Date;
/**
* 工单预处理信息
*/
@Data
public class Work_order_temp {
private Integer id;//自增列
private String store_name;//项目名称
private Date repair_date;//报修日期
private String fault_description;//故障说明
private String repair_people;//报修人
private String repair_phone;//联系方式
private Integer status;//状态(1待确认、2已确认)
private Integer operator;//操作人
private Date modify_time;//修改时间
private String remark;//备注
}
debug=false
################################## DATABASE ########################################
spring.datasource.url=jdbc:postgresql://192.168.9.6:5432/vioncount6.0heze20201109
spring.datasource.username=postgres
spring.datasource.password=vion
spring.datasource.driver-class-name=org.postgresql.Driver
server.port=8088
debug=false
################################## DATABASE ########################################
spring.datasource.url=jdbc:postgresql://192.168.9.6:5432/vioncount6.0heze20201109
spring.datasource.username=postgres
spring.datasource.password=vion
spring.datasource.driver-class-name=org.postgresql.Driver
server.port=8088
\ No newline at end of file
spring:
profiles:
active: dev
datasource:
driver-class-name: org.postgresql.Driver
aop:
proxy-target-class: true
messages:
encoding: UTF-8
basename: i18n/messages
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
<?xml version="1.0" encoding="UTF-8"?>
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
<configuration scan="true" scanPeriod="10 seconds">
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
<contextName>logback</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<property name="log.path" value="logs" />
<property name="pattern" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] [%thread] %logger{50} - %msg%n" />
<!--输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>info</level>
</filter>
<encoder>
<Pattern>%highlight(%-5level) %yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%thread] %green(%logger{50}) - %msg%n</Pattern>
<!-- 设置字符集 -->
</encoder>
</appender>
<!--输出到文件-->
<!-- 时间滚动输出 level为 DEBUG 日志 -->
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_debug.log</file>
<!--日志文件输出格式-->
<encoder>
<Pattern>${pattern}</Pattern>
<charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志归档 -->
<fileNamePattern>${log.path}/debug/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 INFO 日志 -->
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_info.log</file>
<!--日志文件输出格式-->
<encoder>
<Pattern>${pattern}</Pattern>
<charset>UTF-8</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info/info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 WARN 日志 -->
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_warn.log</file>
<!--日志文件输出格式-->
<encoder>
<Pattern>${pattern}</Pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/warn/warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>5</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录warn级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>warn</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_error.log</file>
<!--日志文件输出格式-->
<encoder>
<Pattern>${pattern}</Pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
以及指定<appender>。<logger>仅有一个name属性,
一个可选的level和一个可选的addtivity属性。
name:用来指定受此logger约束的某一个包或者具体的某一个类。
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
如果未设置此属性,那么当前logger将会继承上级的级别。
addtivity:是否向上级logger传递打印信息。默认是true。
-->
<!--<logger name="org.springframework.web" level="info"/>-->
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
<!--
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
-->
<!--
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
不能设置为INHERITED或者同义词NULL。默认是DEBUG
可以包含零个或多个元素,标识这个appender将会添加到这个logger。
-->
<logger name="jdbc.sqlonly" level="off">
</logger>
<logger name="jdbc.audit" level="off">
</logger>
<logger name="jdbc.resultset" level="debug">
</logger>
<logger name="jdbc.connection" level="off">
</logger>
<logger name="jdbc.sqltiming" level="debug">
</logger>
<root level="DEBUG">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="WARN_FILE" />
<appender-ref ref="ERROR_FILE" />
</root>
<!--生产环境:输出到文件-->
<!--<springProfile name="pro">-->
<!--<root level="info">-->
<!--<appender-ref ref="CONSOLE" />-->
<!--<appender-ref ref="DEBUG_FILE" />-->
<!--<appender-ref ref="INFO_FILE" />-->
<!--<appender-ref ref="ERROR_FILE" />-->
<!--<appender-ref ref="WARN_FILE" />-->
<!--</root>-->
<!--</springProfile>-->
</configuration>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!