diff --git a/eladmin-system/pom.xml b/eladmin-system/pom.xml
index 366ac367..fce03dd9 100644
--- a/eladmin-system/pom.xml
+++ b/eladmin-system/pom.xml
@@ -39,6 +39,20 @@
2.6
+
+
+ com.uueo.itam.company
+ itam-company
+ 1.0.0
+
+
+
+
+ com.uueo.itam
+ itam-ticket
+ 1.0.0
+
+
org.springframework.boot
diff --git a/eladmin-system/src/main/java/me/zhengjie/AppRun.java b/eladmin-system/src/main/java/me/zhengjie/AppRun.java
index ed244064..2c1c0911 100644
--- a/eladmin-system/src/main/java/me/zhengjie/AppRun.java
+++ b/eladmin-system/src/main/java/me/zhengjie/AppRun.java
@@ -20,10 +20,14 @@ import me.zhengjie.annotation.rest.AnonymousGetMapping;
import me.zhengjie.utils.SpringContextHolder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScans;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RestController;
@@ -37,9 +41,12 @@ import org.springframework.web.bind.annotation.RestController;
@EnableAsync
@RestController
@Api(hidden = true)
-@SpringBootApplication
+//@ComponentScan({"me.zhengjie", "com.uueo"})
+@SpringBootApplication(scanBasePackages = {"me.zhengjie", "com.uueo.itam"})
@EnableTransactionManagement
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
+@EnableJpaRepositories(basePackages = {"me.zhengjie.**.repository","com.uueo.itam.**.repository"})
+@EntityScan(basePackages = {"me.zhengjie","com.uueo.itam"})
public class AppRun {
public static void main(String[] args) {
diff --git a/itam-ticket/pom.xml b/itam-ticket/pom.xml
new file mode 100644
index 00000000..4836d5e9
--- /dev/null
+++ b/itam-ticket/pom.xml
@@ -0,0 +1,26 @@
+
+
+
+ eladmin
+ me.zhengjie
+ 2.6
+
+ 4.0.0
+
+ com.uueo.itam
+ itam-ticket
+ 1.0.0
+ 工单管理
+
+
+
+ me.zhengjie
+ eladmin-logging
+ 2.6
+ compile
+
+
+
+
\ No newline at end of file
diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/Event.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/Event.java
new file mode 100644
index 00000000..abf7e3ac
--- /dev/null
+++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/Event.java
@@ -0,0 +1,103 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.uueo.itam.ticket.domain;
+
+import lombok.Data;
+import cn.hutool.core.bean.BeanUtil;
+import io.swagger.annotations.ApiModelProperty;
+import cn.hutool.core.bean.copier.CopyOptions;
+import javax.persistence.*;
+import javax.validation.constraints.*;
+import java.sql.Timestamp;
+import java.io.Serializable;
+
+/**
+* @website https://el-admin.vip
+* @description /
+* @author esinhee
+* @date 2021-01-19
+**/
+@Entity
+@Data
+@Table(name="itam_event")
+public class Event implements Serializable {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "eid")
+ @ApiModelProperty(value = "事件ID")
+ private Integer eid;
+
+ @Column(name = "etid")
+ @ApiModelProperty(value = "事件类型")
+ private Integer etid;
+
+ @Column(name = "grade")
+ @ApiModelProperty(value = "重要程度")
+ private Integer grade;
+
+ @Column(name = "content")
+ @ApiModelProperty(value = "详情描述")
+ private String content;
+
+ @Column(name = "kid")
+ @ApiModelProperty(value = "反馈科室")
+ private String kid;
+
+ @Column(name = "reportid")
+ @ApiModelProperty(value = "反馈人")
+ private String reportid;
+
+ @Column(name = "reporttime")
+ @ApiModelProperty(value = "反馈时间")
+ private Timestamp reporttime;
+
+ @Column(name = "recorderid")
+ @ApiModelProperty(value = "记录人")
+ private Integer recorderid;
+
+ @Column(name = "recordetime")
+ @ApiModelProperty(value = "记录时间")
+ private Timestamp recordetime;
+
+ @Column(name = "dealerid")
+ @ApiModelProperty(value = "处理人")
+ private Integer dealerid;
+
+ @Column(name = "dealtime")
+ @ApiModelProperty(value = "处理时间")
+ private Timestamp dealtime;
+
+ @Column(name = "updatetime")
+ @ApiModelProperty(value = "最后更新时间")
+ private Timestamp updatetime;
+
+ @Column(name = "dealflg")
+ @ApiModelProperty(value = "处理标识")
+ private Integer dealflg;
+
+ @Column(name = "relatedid")
+ @ApiModelProperty(value = "关联事件ID")
+ private Integer relatedid;
+
+ @Column(name = "bz")
+ @ApiModelProperty(value = "状态标识")
+ private Integer bz;
+
+ public void copy(Event source){
+ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+ }
+}
\ No newline at end of file
diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/EventType.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/EventType.java
new file mode 100644
index 00000000..622c3d46
--- /dev/null
+++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/EventType.java
@@ -0,0 +1,75 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.uueo.itam.ticket.domain;
+
+import lombok.Data;
+import cn.hutool.core.bean.BeanUtil;
+import io.swagger.annotations.ApiModelProperty;
+import cn.hutool.core.bean.copier.CopyOptions;
+
+import javax.persistence.*;
+import javax.validation.constraints.*;
+import java.io.Serializable;
+
+/**
+* @website https://el-admin.vip
+* @description /
+* @author esinhee
+* @date 2021-01-20
+**/
+@Entity
+@Data
+@Table(name="itam_event_type")
+public class EventType implements Serializable {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "id")
+ @ApiModelProperty(value = "id", hidden = true)
+ private Integer id;
+
+ @Column(name = "typename",nullable = false)
+ @NotBlank
+ @ApiModelProperty(value = "事件类型名称")
+ private String typename;
+
+ @Column(name = "parentid")
+ @ApiModelProperty(value = "parentid")
+ private Integer parentid;
+
+ @ApiModelProperty(value = "subCount", hidden = true)
+ private Integer subCount = 0;
+
+ @Column(name = "level")
+ @ApiModelProperty(value = "层级路径")
+ private String level;
+
+ @Column(name = "seq")
+ @ApiModelProperty(value = "层级")
+ private Integer seq;
+
+ @Column(name = "pinyin")
+ @ApiModelProperty(value = "拼音")
+ private String pinyin;
+
+ @Column(name = "bz")
+ @ApiModelProperty(value = "启用标识")
+ private Integer bz;
+
+ public void copy(EventType source){
+ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+ }
+}
\ No newline at end of file
diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/vo/EventTypeVo.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/vo/EventTypeVo.java
new file mode 100644
index 00000000..8808fa74
--- /dev/null
+++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/domain/vo/EventTypeVo.java
@@ -0,0 +1,30 @@
+package com.uueo.itam.ticket.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+public class EventTypeVo {
+
+ /** 事件类型名称 */
+ private String typename;
+
+ private Integer parentid;
+
+ /** 层级路径 */
+ private String level;
+
+ /** 层级 */
+ private Integer seq;
+
+ /** 拼音 */
+ private String pinyin;
+
+ /** 启用标识 */
+ private Integer bz;
+
+ private List children;
+}
diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventRepository.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventRepository.java
new file mode 100644
index 00000000..74619792
--- /dev/null
+++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventRepository.java
@@ -0,0 +1,28 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.uueo.itam.ticket.repository;
+
+import com.uueo.itam.ticket.domain.Event;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* @website https://el-admin.vip
+* @author esinhee
+* @date 2021-01-19
+**/
+public interface EventRepository extends JpaRepository, JpaSpecificationExecutor {
+}
\ No newline at end of file
diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventTypeRepository.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventTypeRepository.java
new file mode 100644
index 00000000..1b5d5739
--- /dev/null
+++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventTypeRepository.java
@@ -0,0 +1,44 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.uueo.itam.ticket.repository;
+
+import com.uueo.itam.ticket.domain.EventType;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+import java.util.List;
+
+/**
+* @website https://el-admin.vip
+* @author esinhee
+* @date 2021-01-20
+**/
+// 继承自JpaSpecificationExecutor,支持动态查询
+public interface EventTypeRepository extends JpaRepository, JpaSpecificationExecutor {
+
+ /**
+ * 根据parentid查询子项目
+ * @param parentid
+ * @return List
+ */
+ List findByParentid(int parentid);
+
+ /**
+ * 获取一级项目
+ * @return
+ */
+ List getByParentidIsNull();
+}
\ No newline at end of file
diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventController.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventController.java
new file mode 100644
index 00000000..2d00c559
--- /dev/null
+++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventController.java
@@ -0,0 +1,87 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package com.uueo.itam.ticket.rest;
+
+import me.zhengjie.annotation.Log;
+import com.uueo.itam.ticket.domain.Event;
+import com.uueo.itam.ticket.service.EventService;
+import com.uueo.itam.ticket.service.dto.EventQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import io.swagger.annotations.*;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @website https://el-admin.vip
+* @author esinhee
+* @date 2021-01-19
+**/
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "工单管理管理")
+@RequestMapping("/api/event")
+public class EventController {
+
+ private final EventService eventService;
+
+ @Log("导出数据")
+ @ApiOperation("导出数据")
+ @GetMapping(value = "/download")
+ @PreAuthorize("@el.check('event:list')")
+ public void download(HttpServletResponse response, EventQueryCriteria criteria) throws IOException {
+ eventService.download(eventService.queryAll(criteria), response);
+ }
+
+ @GetMapping
+ @Log("查询工单管理")
+ @ApiOperation("查询工单管理")
+ @PreAuthorize("@el.check('event:list')")
+ public ResponseEntity