From 2b0a94e235cc33ec6dacc9eaa08c096ed5b820f6 Mon Sep 17 00:00:00 2001 From: esinhee Date: Tue, 2 Feb 2021 20:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B7=A5=E5=8D=95=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eladmin-system/pom.xml | 14 ++ .../src/main/java/me/zhengjie/AppRun.java | 9 +- itam-ticket/pom.xml | 26 +++ .../com/uueo/itam/ticket/domain/Event.java | 103 +++++++++++ .../uueo/itam/ticket/domain/EventType.java | 75 ++++++++ .../itam/ticket/domain/vo/EventTypeVo.java | 30 ++++ .../ticket/repository/EventRepository.java | 28 +++ .../repository/EventTypeRepository.java | 44 +++++ .../itam/ticket/rest/EventController.java | 87 +++++++++ .../itam/ticket/rest/EventTypeController.java | 116 ++++++++++++ .../itam/ticket/service/EventService.java | 83 +++++++++ .../itam/ticket/service/EventTypeService.java | 105 +++++++++++ .../itam/ticket/service/dto/EventDto.java | 75 ++++++++ .../service/dto/EventQueryCriteria.java | 33 ++++ .../itam/ticket/service/dto/EventTypeDto.java | 64 +++++++ .../service/dto/EventTypeQueryCriteria.java | 35 ++++ .../ticket/service/impl/EventServiceImpl.java | 117 ++++++++++++ .../service/impl/EventTypeServiceImpl.java | 168 ++++++++++++++++++ .../ticket/service/mapstruct/EventMapper.java | 32 ++++ .../service/mapstruct/EventTypeMapper.java | 32 ++++ pom.xml | 3 + 21 files changed, 1278 insertions(+), 1 deletion(-) create mode 100644 itam-ticket/pom.xml create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/domain/Event.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/domain/EventType.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/domain/vo/EventTypeVo.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventRepository.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/repository/EventTypeRepository.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventController.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventTypeController.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventService.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventTypeService.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventDto.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventQueryCriteria.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeDto.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeQueryCriteria.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventServiceImpl.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventTypeServiceImpl.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventMapper.java create mode 100644 itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventTypeMapper.java 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 query(EventQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(eventService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @PostMapping + @Log("新增工单管理") + @ApiOperation("新增工单管理") + @PreAuthorize("@el.check('event:add')") + public ResponseEntity create(@Validated @RequestBody Event resources){ + return new ResponseEntity<>(eventService.create(resources),HttpStatus.CREATED); + } + + @PutMapping + @Log("修改工单管理") + @ApiOperation("修改工单管理") + @PreAuthorize("@el.check('event:edit')") + public ResponseEntity update(@Validated @RequestBody Event resources){ + eventService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除工单管理") + @ApiOperation("删除工单管理") + @PreAuthorize("@el.check('event:del')") + @DeleteMapping + public ResponseEntity delete(@RequestBody Integer[] ids) { + eventService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventTypeController.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventTypeController.java new file mode 100644 index 00000000..5d961373 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/rest/EventTypeController.java @@ -0,0 +1,116 @@ +/* +* 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 cn.hutool.core.collection.CollectionUtil; +import com.uueo.itam.ticket.service.dto.EventTypeDto; +import me.zhengjie.annotation.Log; +import com.uueo.itam.ticket.domain.EventType; +import com.uueo.itam.ticket.service.EventTypeService; +import com.uueo.itam.ticket.service.dto.EventTypeQueryCriteria; +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 java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import javax.servlet.http.HttpServletResponse; + +/** +* @website https://el-admin.vip +* @author esinhee +* @date 2021-01-20 +**/ +@RestController +@RequiredArgsConstructor +@Api(tags = "事件类型管理") +@RequestMapping("/api/eventType") +public class EventTypeController { + + private final EventTypeService eventTypeService; + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('eventType:list')") + public void download(HttpServletResponse response, EventTypeQueryCriteria criteria) throws IOException { + eventTypeService.download(eventTypeService.queryAll(criteria), response); + } + + @ApiOperation("获取全部类型") + @GetMapping(value = "/lazy") + @Log("获取全部类型") + @PreAuthorize("@el.check('eventType:list')") + public ResponseEntity query(@RequestParam Integer pid) { + return new ResponseEntity<>(eventTypeService.getEventTypes(pid),HttpStatus.OK); + } + + @GetMapping + @Log("查询事件类型") + @ApiOperation("查询事件类型") + @PreAuthorize("@el.check('eventType:list')") + public ResponseEntity query(EventTypeQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(eventTypeService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @ApiOperation("根据ID查询上级目录") + @PostMapping("/superior") + @PreAuthorize("@el.check('eventType:list')") + public ResponseEntity getSuperior(@RequestBody List ids) { + Set etDtos = new LinkedHashSet<>(); + if (CollectionUtil.isNotEmpty(ids)) { + for (Integer id : ids) { + EventTypeDto etDto = eventTypeService.findById(id); + etDtos.addAll(eventTypeService.getSuperior(etDto, new ArrayList<>())); + } + return new ResponseEntity<>(eventTypeService.buildTree(new ArrayList<>(etDtos)),HttpStatus.OK); + } + return new ResponseEntity<>(eventTypeService.getEventTypes(null),HttpStatus.OK); + } + + @PostMapping + @Log("新增事件类型") + @ApiOperation("新增事件类型") + @PreAuthorize("@el.check('eventType:add')") + public ResponseEntity create(@Validated @RequestBody EventType resources){ + return new ResponseEntity<>(eventTypeService.create(resources),HttpStatus.CREATED); + } + + @PutMapping + @Log("修改事件类型") + @ApiOperation("修改事件类型") + @PreAuthorize("@el.check('eventType:edit')") + public ResponseEntity update(@Validated @RequestBody EventType resources){ + eventTypeService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除事件类型") + @ApiOperation("删除事件类型") + @PreAuthorize("@el.check('eventType:del')") + @DeleteMapping + public ResponseEntity delete(@RequestBody Integer[] ids) { + eventTypeService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventService.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventService.java new file mode 100644 index 00000000..52da4ca2 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventService.java @@ -0,0 +1,83 @@ +/* +* 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.service; + +import com.uueo.itam.ticket.domain.Event; +import com.uueo.itam.ticket.service.dto.EventDto; +import com.uueo.itam.ticket.service.dto.EventQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @website https://el-admin.vip +* @description 服务接口 +* @author esinhee +* @date 2021-01-19 +**/ +public interface EventService { + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(EventQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(EventQueryCriteria criteria); + + /** + * 根据ID查询 + * @param eid ID + * @return EventDto + */ + EventDto findById(Integer eid); + + /** + * 创建 + * @param resources / + * @return EventDto + */ + EventDto create(Event resources); + + /** + * 编辑 + * @param resources / + */ + void update(Event resources); + + /** + * 多选删除 + * @param ids / + */ + void deleteAll(Integer[] ids); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventTypeService.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventTypeService.java new file mode 100644 index 00000000..44b03064 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/EventTypeService.java @@ -0,0 +1,105 @@ +/* +* 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.service; + +import com.uueo.itam.ticket.domain.EventType; +import com.uueo.itam.ticket.service.dto.EventTypeDto; +import com.uueo.itam.ticket.service.dto.EventTypeQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @website https://el-admin.vip +* @description 服务接口 +* @author esinhee +* @date 2021-01-20 +**/ +public interface EventTypeService { + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(EventTypeQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(EventTypeQueryCriteria criteria); + + /** + * 根据ID查询 + * @param id ID + * @return EventTypeDto + */ + EventTypeDto findById(Integer id); + + /** + * 创建 + * @param resources / + * @return EventTypeDto + */ + EventTypeDto create(EventType resources); + + /** + * 编辑 + * @param resources / + */ + void update(EventType resources); + + /** + * 多选删除 + * @param ids / + */ + void deleteAll(Integer[] ids); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + /** + * 根据parentid获取子项目 + * @param parentid + * @return List + */ + List getEventTypes(Integer parentid); + + /** + * 获取上级事件类型 + * @param etDto + * @param objects + * @return + */ + List getSuperior(EventTypeDto etDto, List objects); + + /** + * 生成树形结构 + * @param ets + * @return + */ + List buildTree(List ets); +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventDto.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventDto.java new file mode 100644 index 00000000..2ebb8621 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventDto.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.service.dto; + +import lombok.Data; +import java.sql.Timestamp; +import java.io.Serializable; + +/** +* @website https://el-admin.vip +* @description / +* @author esinhee +* @date 2021-01-19 +**/ +@Data +public class EventDto implements Serializable { + + /** 事件ID */ + private Integer eid; + + /** 事件类型 */ + private Integer etid; + + /** 重要程度 */ + private Integer grade; + + /** 详情描述 */ + private String content; + + /** 反馈科室 */ + private String kid; + + /** 反馈人 */ + private String reportid; + + /** 反馈时间 */ + private Timestamp reporttime; + + /** 记录人 */ + private Integer recorderid; + + /** 记录时间 */ + private Timestamp recordetime; + + /** 处理人 */ + private Integer dealerid; + + /** 处理时间 */ + private Timestamp dealtime; + + /** 最后更新时间 */ + private Timestamp updatetime; + + /** 处理标识 */ + private Integer dealflg; + + /** 关联事件ID */ + private Integer relatedid; + + /** 状态标识 */ + private Integer bz; +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventQueryCriteria.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventQueryCriteria.java new file mode 100644 index 00000000..dbbceb51 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventQueryCriteria.java @@ -0,0 +1,33 @@ +/* +* 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.service.dto; + +import lombok.Data; +import java.util.List; +import me.zhengjie.annotation.Query; + +/** +* @website https://el-admin.vip +* @author esinhee +* @date 2021-01-19 +**/ +@Data +public class EventQueryCriteria{ + + /** 精确 */ + @Query + private Integer grade; +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeDto.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeDto.java new file mode 100644 index 00000000..df899ee1 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeDto.java @@ -0,0 +1,64 @@ +/* +* 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.service.dto; + +import lombok.Data; +import me.zhengjie.base.BaseDTO; + +import java.io.Serializable; +import java.util.List; + +/** +* @website https://el-admin.vip +* @description / +* @author esinhee +* @date 2021-01-20 +**/ +@Data +public class EventTypeDto extends BaseDTO implements Serializable { + + private Integer id; + + private List children; + + /** 事件类型名称 */ + private String typename; + + private Integer parentid; + + /** 子项数 */ + private Integer subCount; + + /** 层级路径 */ + private String level; + + /** 层级 */ + private Integer seq; + + /** 拼音 */ + private String pinyin; + + /** 启用标识 */ + private Integer bz; + + public Boolean getHasChildren() { + return subCount > 0; + } + + public Boolean getLeaf() { + return subCount <= 0; + } +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeQueryCriteria.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeQueryCriteria.java new file mode 100644 index 00000000..192620ea --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/dto/EventTypeQueryCriteria.java @@ -0,0 +1,35 @@ +/* +* 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.service.dto; + +import lombok.Data; +import java.util.List; +import me.zhengjie.annotation.Query; + +/** +* @website https://el-admin.vip +* @author esinhee +* @date 2021-01-20 +**/ +@Data +public class EventTypeQueryCriteria{ + + @Query(type = Query.Type.EQUAL, propName = "parentid") + private Boolean isPid; + + @Query + private Integer parentid; +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventServiceImpl.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventServiceImpl.java new file mode 100644 index 00000000..c6a846c5 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventServiceImpl.java @@ -0,0 +1,117 @@ +/* +* 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.service.impl; + +import com.uueo.itam.ticket.domain.Event; +import me.zhengjie.utils.ValidationUtil; +import me.zhengjie.utils.FileUtil; +import lombok.RequiredArgsConstructor; +import com.uueo.itam.ticket.repository.EventRepository; +import com.uueo.itam.ticket.service.EventService; +import com.uueo.itam.ticket.service.dto.EventDto; +import com.uueo.itam.ticket.service.dto.EventQueryCriteria; +import com.uueo.itam.ticket.service.mapstruct.EventMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import me.zhengjie.utils.PageUtil; +import me.zhengjie.utils.QueryHelp; +import java.util.List; +import java.util.Map; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; + +/** +* @website https://el-admin.vip +* @description 服务实现 +* @author esinhee +* @date 2021-01-19 +**/ +@Service +@RequiredArgsConstructor +public class EventServiceImpl implements EventService { + + private final EventRepository eventRepository; + private final EventMapper eventMapper; + + @Override + public Map queryAll(EventQueryCriteria criteria, Pageable pageable){ + Page page = eventRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); + return PageUtil.toPage(page.map(eventMapper::toDto)); + } + + @Override + public List queryAll(EventQueryCriteria criteria){ + return eventMapper.toDto(eventRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + } + + @Override + @Transactional + public EventDto findById(Integer eid) { + Event event = eventRepository.findById(eid).orElseGet(Event::new); + ValidationUtil.isNull(event.getEid(),"Event","eid",eid); + return eventMapper.toDto(event); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public EventDto create(Event resources) { + return eventMapper.toDto(eventRepository.save(resources)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Event resources) { + Event event = eventRepository.findById(resources.getEid()).orElseGet(Event::new); + ValidationUtil.isNull( event.getEid(),"Event","id",resources.getEid()); + event.copy(resources); + eventRepository.save(event); + } + + @Override + public void deleteAll(Integer[] ids) { + for (Integer eid : ids) { + eventRepository.deleteById(eid); + } + } + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (EventDto event : all) { + Map map = new LinkedHashMap<>(); + map.put("事件类型", event.getEtid()); + map.put("重要程度", event.getGrade()); + map.put("详情描述", event.getContent()); + map.put("反馈科室", event.getKid()); + map.put("反馈人", event.getReportid()); + map.put("反馈时间", event.getReporttime()); + map.put("记录人", event.getRecorderid()); + map.put("记录时间", event.getRecordetime()); + map.put("处理人", event.getDealerid()); + map.put("处理时间", event.getDealtime()); + map.put("最后更新时间", event.getUpdatetime()); + map.put("处理标识", event.getDealflg()); + map.put("关联事件ID", event.getRelatedid()); + map.put("状态标识", event.getBz()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventTypeServiceImpl.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventTypeServiceImpl.java new file mode 100644 index 00000000..24248577 --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/impl/EventTypeServiceImpl.java @@ -0,0 +1,168 @@ +/* +* 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.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import com.uueo.itam.ticket.domain.EventType; +import me.zhengjie.utils.ValidationUtil; +import me.zhengjie.utils.FileUtil; +import lombok.RequiredArgsConstructor; +import com.uueo.itam.ticket.repository.EventTypeRepository; +import com.uueo.itam.ticket.service.EventTypeService; +import com.uueo.itam.ticket.service.dto.EventTypeDto; +import com.uueo.itam.ticket.service.dto.EventTypeQueryCriteria; +import com.uueo.itam.ticket.service.mapstruct.EventTypeMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import me.zhengjie.utils.PageUtil; +import me.zhengjie.utils.QueryHelp; + +import java.util.*; +import java.io.IOException; +import java.util.stream.Collectors; +import javax.servlet.http.HttpServletResponse; + +/** +* @website https://el-admin.vip +* @description 服务实现 +* @author esinhee +* @date 2021-01-20 +**/ +@Service +@RequiredArgsConstructor +public class EventTypeServiceImpl implements EventTypeService { + + private final EventTypeRepository eventTypeRepository; + private final EventTypeMapper eventTypeMapper; + + @Override + public Map queryAll(EventTypeQueryCriteria criteria, Pageable pageable){ + /* + eventTypeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)) + 等效于 + eventTypeRepository.findAll(new Specification() { + @Override + Predicate toPredicate(Root root, CriteriaQuery query, CriteriaBuilder criteriaBuilder) { + return QueryHelp.getPredicate(root,criteria,criteriaBuilder); + } + }); + */ + if (ObjectUtil.isNull(criteria.getParentid())) { + criteria.setParentid(0); + } + + Page page = eventTypeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); + return PageUtil.toPage(page.map(eventTypeMapper::toDto)); + } + + @Override + public List queryAll(EventTypeQueryCriteria criteria){ + return eventTypeMapper.toDto(eventTypeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + } + + @Override + @Transactional + public EventTypeDto findById(Integer id) { + EventType eventType = eventTypeRepository.findById(id).orElseGet(EventType::new); + ValidationUtil.isNull(eventType.getId(),"EventType","id",id); + return eventTypeMapper.toDto(eventType); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public EventTypeDto create(EventType resources) { + return eventTypeMapper.toDto(eventTypeRepository.save(resources)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EventType resources) { + EventType eventType = eventTypeRepository.findById(resources.getId()).orElseGet(EventType::new); + ValidationUtil.isNull( eventType.getId(),"EventType","id",resources.getId()); + eventType.copy(resources); + eventTypeRepository.save(eventType); + } + + @Override + public void deleteAll(Integer[] ids) { + for (Integer id : ids) { + eventTypeRepository.deleteById(id); + } + } + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (EventTypeDto eventType : all) { + Map map = new LinkedHashMap<>(); + map.put("事件类型名称", eventType.getTypename()); + map.put(" parentid", eventType.getParentid()); + map.put("层级路径", eventType.getLevel()); + map.put("层级", eventType.getSeq()); + map.put("拼音", eventType.getPinyin()); + map.put("启用标识", eventType.getBz()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public List getEventTypes(Integer parentid) { + List et; + if (parentid != null || !parentid.equals(0)) { + et = eventTypeRepository.findByParentid(parentid); + } else { + et = eventTypeRepository.findByParentid(0); + } + return eventTypeMapper.toDto(et); + } + + @Override + public List getSuperior(EventTypeDto etDto, List ets) { + if (etDto.getParentid() == null || etDto.getParentid() == 0) { + ets.addAll(eventTypeRepository.findByParentid(0)); + return eventTypeMapper.toDto(ets); + } + ets.addAll(eventTypeRepository.findByParentid(etDto.getParentid())); + return getSuperior(findById(etDto.getParentid()), ets); + } + + @Override + public List buildTree(List ets) { + List trees = new ArrayList<>(); + Set ids = new HashSet<>(); + for (EventTypeDto et : ets) { + if (et.getParentid() == null || et.getParentid() == 0) { + trees.add(et); + } + for (EventTypeDto id : ets) { + if (id.getParentid().equals(et.getId())) { + if (et.getChildren() == null) { + et.setChildren(new ArrayList<>()); + } + et.getChildren().add(id); + ids.add(id.getId()); + } + } + } + if (trees.size() == 0) { + trees = ets.stream().filter(s -> !ids.contains(s.getId())).collect(Collectors.toList()); + } + return trees; + } +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventMapper.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventMapper.java new file mode 100644 index 00000000..0bc50ccc --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventMapper.java @@ -0,0 +1,32 @@ +/* +* 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.service.mapstruct; + +import me.zhengjie.base.BaseMapper; +import com.uueo.itam.ticket.domain.Event; +import com.uueo.itam.ticket.service.dto.EventDto; +import org.mapstruct.Mapper; +import org.mapstruct.ReportingPolicy; + +/** +* @website https://el-admin.vip +* @author esinhee +* @date 2021-01-19 +**/ +@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) +public interface EventMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventTypeMapper.java b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventTypeMapper.java new file mode 100644 index 00000000..3095640d --- /dev/null +++ b/itam-ticket/src/main/java/com/uueo/itam/ticket/service/mapstruct/EventTypeMapper.java @@ -0,0 +1,32 @@ +/* +* 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.service.mapstruct; + +import me.zhengjie.base.BaseMapper; +import com.uueo.itam.ticket.domain.EventType; +import com.uueo.itam.ticket.service.dto.EventTypeDto; +import org.mapstruct.Mapper; +import org.mapstruct.ReportingPolicy; + +/** +* @website https://el-admin.vip +* @author esinhee +* @date 2021-01-20 +**/ +@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) +public interface EventTypeMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index a69c5d0d..670b3027 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,9 @@ eladmin-system eladmin-tools eladmin-generator + itam-company + itam-task + itam-ticket EL-ADMIN 后台管理