From 4c230b6f66a4e66df41351191e8453a2829decdd Mon Sep 17 00:00:00 2001 From: Jackwang Date: Sat, 3 Sep 2022 12:38:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=97=E5=B0=9A=E8=AF=89=E5=8A=9E-=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E6=89=A7=E6=B3=95=E8=AF=89=E6=B1=82=EF=BC=9B?= =?UTF-8?q?=E6=B0=91=E7=94=9F/=E5=8F=91=E5=B1=95=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ApiWorkItemController.java | 12 ++ .../esua/epdc/feign/WorkItemFeignClient.java | 10 ++ .../fallback/WorkItemFeignClientFallback.java | 5 + .../esua/epdc/service/WorkItemService.java | 9 + .../service/impl/WorkItemServiceImpl.java | 5 + .../elink/esua/epdc/dto/item/ItemLawDTO.java | 157 ++++++++++++++++ .../epdc/dto/item/form/ItemLawSubmitDTO.java | 168 ++++++++++++++++++ .../epdc/dto/item/form/SubmitItemFormDTO.java | 10 ++ .../item/controller/ItemLawController.java | 94 ++++++++++ .../item/controller/WorkItemController.java | 12 ++ .../epdc/modules/item/dao/ItemLawDao.java | 33 ++++ .../epdc/modules/item/entity/ItemEntity.java | 10 ++ .../modules/item/entity/ItemLawEntity.java | 126 +++++++++++++ .../epdc/modules/item/excel/ItemLawExcel.java | 107 +++++++++++ .../epdc/modules/item/redis/ItemLawRedis.java | 47 +++++ .../modules/item/service/ItemLawService.java | 106 +++++++++++ .../modules/item/service/ItemService.java | 9 + .../item/service/impl/ItemLawServiceImpl.java | 112 ++++++++++++ .../item/service/impl/ItemServiceImpl.java | 47 +++++ .../main/resources/mapper/item/ItemLawDao.xml | 34 ++++ 20 files changed, 1113 insertions(+) create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemLawDTO.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemLawSubmitDTO.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemLawController.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemLawDao.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemLawEntity.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemLawExcel.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemLawRedis.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemLawService.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemLawServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemLawDao.xml diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java index 8c0132dc7..26d4acdb8 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkItemController.java @@ -131,4 +131,16 @@ public class ApiWorkItemController { public Result> queryHandleCategories(EventDeptFormDTO formDto) { return workItemService.queryHandleCategories(formDto); } + + /** + * @describe: 工作端-执法诉求上报 + * @author wangtong + * @date 2022/9/3 10:10 + * @params [formDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping("submitLawItem") + public Result submitLawItem(@RequestBody ItemLawSubmitDTO formDto) { + return workItemService.submitLawItem(formDto); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java index 283252fbb..14a7259b8 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java @@ -121,4 +121,14 @@ public interface WorkItemFeignClient { **/ @GetMapping(value = "events/work/item/handleCategory", consumes = MediaType.APPLICATION_JSON_VALUE) Result> queryHandleCategories(EventDeptFormDTO formDto); + + /** + * @describe: 工作端-执法诉求上报 + * @author wangtong + * @date 2022/9/3 10:10 + * @params [formDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping(value = "events/work/item/submitLawItem", consumes = MediaType.APPLICATION_JSON_VALUE) + Result submitLawItem(ItemLawSubmitDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java index a4f5289d9..57b0321be 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java @@ -67,4 +67,9 @@ public class WorkItemFeignClientFallback implements WorkItemFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryHandleCategories",formDto); } + @Override + public Result submitLawItem(ItemLawSubmitDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "submitLawItem",formDto); + } + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkItemService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkItemService.java index 48b9a1f41..6ec09a22d 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkItemService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkItemService.java @@ -97,4 +97,13 @@ public interface WorkItemService { * @Date 2020/1/13 16:49 **/ Result> queryHandleCategories(EventDeptFormDTO formDto); + + /** + * @describe: 工作端-执法诉求上报 + * @author wangtong + * @date 2022/9/3 10:10 + * @params [formDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result submitLawItem(ItemLawSubmitDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java index 463c600f9..797707b67 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java @@ -81,4 +81,9 @@ public class WorkItemServiceImpl implements WorkItemService { return workItemFeignClient.queryHandleCategories(formDto); } + @Override + public Result submitLawItem(ItemLawSubmitDTO formDto) { + return workItemFeignClient.submitLawItem(formDto); + } + } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemLawDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemLawDTO.java new file mode 100644 index 000000000..fca1eab63 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemLawDTO.java @@ -0,0 +1,157 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto.item; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@Data +public class ItemLawDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 项目ID + */ + private String itemId; + + /** + * 事项名称 + */ + private String lawName; + + /** + * 诉求详情 + */ + private String lawContent; + + /** + * 主办单位 + */ + private String hostUnit; + + /** + * 协办单位 + */ + private String assistUnit; + + /** + * 有关需求 + */ + private String demand; + + /** + * 事项类型:0计划事项 1临时事项 + */ + private String lawType; + + /** + * 与部门是否沟通: 0已经沟通 1尚未沟通 + */ + private String isExchange; + + /** + * 召集人姓名 + */ + private String convenerName; + + /** + * 召集人职务 + */ + private String convenerJob; + + /** + * 召集人电话 + */ + private String convenerMobile; + + /** + * 联系人姓名 + */ + private String contactName; + + /** + * 联系人职务 + */ + private String contactJob; + + /** + * 联系人电话 + */ + private String contactMobile; + + /** + * 报到时间 + */ + private Date reportTime; + + /** + * 报到地点 + */ + private String reportAddress; + + /** + * 会议名称 + */ + private String meetingName; + + /** + * 删除标识 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemLawSubmitDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemLawSubmitDTO.java new file mode 100644 index 000000000..e2e0d4896 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/ItemLawSubmitDTO.java @@ -0,0 +1,168 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto.item.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@Data +public class ItemLawSubmitDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 项目ID + */ + private String itemId; + + /** + * 事项名称 + */ + @NotBlank(message = "事项名称不可为空") + private String lawName; + + /** + * 诉求详情 + */ + @NotBlank(message = "诉求详情不可为空") + private String lawContent; + + /** + * 主办单位 + */ + @NotBlank(message = "主办单位不可为空") + private String hostUnit; + + /** + * 协办单位 + */ + @NotBlank(message = "协办单位不可为空") + private String assistUnit; + + /** + * 有关需求 + */ + @NotBlank(message = "有关需求不可为空") + private String demand; + + /** + * 事项类型:0计划事项 1临时事项 + */ + @NotBlank(message = "事项类型不可为空") + private String lawType; + + /** + * 与部门是否沟通: 0已经沟通 1尚未沟通 + */ + @NotBlank(message = "是否沟通不可为空") + private String isExchange; + + /** + * 召集人姓名 + */ + @NotBlank(message = "召集人姓名不可为空") + private String convenerName; + + /** + * 召集人职务 + */ + @NotBlank(message = "召集人职务不可为空") + private String convenerJob; + + /** + * 召集人电话 + */ + @NotBlank(message = "召集人电话不可为空") + private String convenerMobile; + + /** + * 联系人姓名 + */ + @NotBlank(message = "联系人姓名不可为空") + private String contactName; + + /** + * 联系人职务 + */ + @NotBlank(message = "联系人职务不可为空") + private String contactJob; + + /** + * 联系人电话 + */ + @NotBlank(message = "联系人电话不可为空") + private String contactMobile; + + /** + * 报到时间 + */ + @NotNull(message = "报到时间不能为空") + private Date reportTime; + + /** + * 报到地点 + */ + @NotBlank(message = "报到地点不可为空") + private String reportAddress; + + /** + * 位置纬度 + */ + @NotNull(message = "纬度不能为空") + private Double issueLatitude; + + /** + * 位置经度 + */ + @NotNull(message = "经度不能为空") + private Double issueLongitude; + + /** + * 会议名称 + */ + @NotBlank(message = "会议名称不可为空") + private String meetingName; + + /** + * 语音 + */ + private String itemVoice; + + /** + * 图片 + */ + private List images; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/SubmitItemFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/SubmitItemFormDTO.java index 3b1a8bc41..077c434a2 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/SubmitItemFormDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/SubmitItemFormDTO.java @@ -104,6 +104,16 @@ public class SubmitItemFormDTO implements Serializable { @NotBlank(message = "是否公开不能为空") private String showFlag; + /** + * 语音 + */ + private String itemVoice; + + /** + * 联系人 + */ + private String contactName; + /** * 图片 */ diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemLawController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemLawController.java new file mode 100644 index 000000000..405915ae4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemLawController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.item.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.item.ItemLawDTO; +import com.elink.esua.epdc.modules.item.excel.ItemLawExcel; +import com.elink.esua.epdc.modules.item.service.ItemLawService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@RestController +@RequestMapping("itemlaw") +public class ItemLawController { + + @Autowired + private ItemLawService itemLawService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = itemLawService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ItemLawDTO data = itemLawService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ItemLawDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + itemLawService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ItemLawDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + itemLawService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + itemLawService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = itemLawService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ItemLawExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/WorkItemController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/WorkItemController.java index ca5185565..8bdc28222 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/WorkItemController.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/WorkItemController.java @@ -161,4 +161,16 @@ public class WorkItemController { public Result> queryHandleCategories(@RequestBody EventDeptFormDTO formDto) { return itemService.queryHandleCategories(formDto); } + + /** + * @describe: 工作端-执法诉求上报 + * @author wangtong + * @date 2022/9/3 10:10 + * @params [formDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("submitLawItem") + public Result submitLawItem(@RequestBody ItemLawSubmitDTO formDto) { + return itemService.submitLawItem(formDto); + } } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemLawDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemLawDao.java new file mode 100644 index 000000000..0b0c3aeb3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemLawDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.item.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.item.entity.ItemLawEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@Mapper +public interface ItemLawDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java index be0f01dd0..2228359d4 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemEntity.java @@ -225,4 +225,14 @@ public class ItemEntity extends BaseEpdcEntity { */ private String isPeople; + /** + * 语音 + */ + private String itemVoice; + + /** + * 联系人 + */ + private String contactName; + } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemLawEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemLawEntity.java new file mode 100644 index 000000000..1990a5dd4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemLawEntity.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.item.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_item_law") +public class ItemLawEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 项目ID + */ + private String itemId; + + /** + * 事项名称 + */ + private String lawName; + + /** + * 诉求详情 + */ + private String lawContent; + + /** + * 主办单位 + */ + private String hostUnit; + + /** + * 协办单位 + */ + private String assistUnit; + + /** + * 有关需求 + */ + private String demand; + + /** + * 事项类型:0计划事项 1临时事项 + */ + private String lawType; + + /** + * 与部门是否沟通: 0已经沟通 1尚未沟通 + */ + private String isExchange; + + /** + * 召集人姓名 + */ + private String convenerName; + + /** + * 召集人职务 + */ + private String convenerJob; + + /** + * 召集人电话 + */ + private String convenerMobile; + + /** + * 联系人姓名 + */ + private String contactName; + + /** + * 联系人职务 + */ + private String contactJob; + + /** + * 联系人电话 + */ + private String contactMobile; + + /** + * 报到时间 + */ + private Date reportTime; + + /** + * 报到地点 + */ + private String reportAddress; + + /** + * 会议名称 + */ + private String meetingName; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemLawExcel.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemLawExcel.java new file mode 100644 index 000000000..31ee8b1de --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemLawExcel.java @@ -0,0 +1,107 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.item.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@Data +public class ItemLawExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "项目ID") + private String itemId; + + @Excel(name = "事项名称") + private String lawName; + + @Excel(name = "诉求详情") + private String lawContent; + + @Excel(name = "主办单位") + private String hostUnit; + + @Excel(name = "协办单位") + private String assistUnit; + + @Excel(name = "有关需求") + private String demand; + + @Excel(name = "事项类型:0计划事项 1临时事项") + private String lawType; + + @Excel(name = "与部门是否沟通: 0已经沟通 1尚未沟通") + private String isExchange; + + @Excel(name = "召集人姓名") + private String convenerName; + + @Excel(name = "召集人职务") + private String convenerJob; + + @Excel(name = "召集人电话") + private String convenerMobile; + + @Excel(name = "联系人姓名") + private String contactName; + + @Excel(name = "联系人职务") + private String contactJob; + + @Excel(name = "联系人电话") + private String contactMobile; + + @Excel(name = "报到时间") + private Date reportTime; + + @Excel(name = "报到地点") + private String reportAddress; + + @Excel(name = "会议名称") + private String meetingName; + + @Excel(name = "删除标识 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemLawRedis.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemLawRedis.java new file mode 100644 index 000000000..5e01a59df --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemLawRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.item.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@Component +public class ItemLawRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemLawService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemLawService.java new file mode 100644 index 000000000..cfb673197 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemLawService.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.item.service; + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.item.ItemLawDTO; +import com.elink.esua.epdc.dto.item.form.ItemLawSubmitDTO; +import com.elink.esua.epdc.modules.item.entity.ItemLawEntity; + +import java.util.List; +import java.util.Map; + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +public interface ItemLawService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-09-03 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-09-03 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ItemLawDTO + * @author generator + * @date 2022-09-03 + */ + ItemLawDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-09-03 + */ + void save(ItemLawDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-09-03 + */ + void update(ItemLawDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-09-03 + */ + void delete(String[] ids); + + /** + * @describe: 保存执法诉求详情 + * @author wangtong + * @date 2022/9/3 11:38 + * @params [formDto] + * @return void + */ + void saveLawDetail(ItemLawSubmitDTO formDto); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java index 8c0f27a56..675941c78 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java @@ -472,4 +472,13 @@ public interface ItemService extends BaseService { * @return com.elink.esua.epdc.commons.tools.utils.Result> */ Result> getItemListByUserId(PeopleItemFormDTO formDto); + + /** + * @describe: 工作端-执法诉求上报 + * @author wangtong + * @date 2022/9/3 10:10 + * @params [formDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result submitLawItem(ItemLawSubmitDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemLawServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemLawServiceImpl.java new file mode 100644 index 000000000..c9e832e90 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemLawServiceImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.item.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.item.ItemLawDTO; +import com.elink.esua.epdc.dto.item.form.ItemLawSubmitDTO; +import com.elink.esua.epdc.modules.item.dao.ItemLawDao; +import com.elink.esua.epdc.modules.item.entity.ItemLawEntity; +import com.elink.esua.epdc.modules.item.redis.ItemLawRedis; +import com.elink.esua.epdc.modules.item.service.ItemLawService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 执法诉办详情 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2022-09-03 + */ +@Service +public class ItemLawServiceImpl extends BaseServiceImpl implements ItemLawService { + + @Autowired + private ItemLawRedis itemLawRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ItemLawDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ItemLawDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ItemLawDTO get(String id) { + ItemLawEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ItemLawDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ItemLawDTO dto) { + ItemLawEntity entity = ConvertUtils.sourceToTarget(dto, ItemLawEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ItemLawDTO dto) { + ItemLawEntity entity = ConvertUtils.sourceToTarget(dto, ItemLawEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveLawDetail(ItemLawSubmitDTO formDto) { + ItemLawEntity entity = ConvertUtils.sourceToTarget(formDto, ItemLawEntity.class); + insert(entity); + } + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java index 54f3a444b..511d78061 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java @@ -173,6 +173,9 @@ public class ItemServiceImpl extends BaseServiceImpl implem @Autowired private UserFeignClient userInfoFeignClient; + @Autowired + private ItemLawService itemLawService; + @Override public PageData page(Map params) { @@ -289,6 +292,50 @@ public class ItemServiceImpl extends BaseServiceImpl implem return new Result>().ok(data); } + @Override + @Transactional(rollbackFor = Exception.class) + public Result submitLawItem(ItemLawSubmitDTO formDto) { + UserDetail userDetail = SecurityUser.getUser(); + ItemEntity itemEntity = new ItemEntity(); + /** + * userID:zfsq+当前账户ID。 + * is_party_member:统一填0。 + * grid:"执法诉求"+街道名称 + * grid_ID:街道ID + */ + itemEntity.setUserId("zfsq"+userDetail.getId()); + itemEntity.setNickName(userDetail.getUsername()); + itemEntity.setIsPartyMember(YesOrNoEnum.NO.value()); + itemEntity.setMobile(userDetail.getMobile()); + itemEntity.setDistributeTime(new Date()); + itemEntity.setGrid("执法诉求"+userDetail.getDeptName()); + itemEntity.setGridId(userDetail.getDeptId()); + itemEntity.setItemContent(formDto.getLawContent()); + itemEntity.setItemVoice(formDto.getItemVoice()); + itemEntity.setIssueAddress(formDto.getReportAddress()); + itemEntity.setIssueLatitude(formDto.getIssueLatitude()); + itemEntity.setIssueLongitude(formDto.getIssueLongitude()); + itemEntity.setItemState(0);//处理中 + + itemEntity.setLastHandleTime(new Date()); + itemEntity.setCategoryCode("13"); + itemEntity.setCategoryFullName("其他"); + itemEntity.setFirstCategoryCode("13"); + itemEntity.setItemCode("PT" + System.currentTimeMillis());//项目编号 + itemEntity.setIsPeople("1");//诉求上报 + itemEntity.setPeopleFlag("2");//执法诉求 + baseDao.insert(itemEntity); + //插入项目部门关联表 + itemDeptService.savePeopleSubmitInfo(itemEntity); + // 保存图片 + imgService.saveImages(formDto.getImages(), itemEntity.getId(), ImageConstant.TYPE_IMAGE_BIZ_EVENTS); + //保存到执法诉求详情表 + formDto.setItemId(itemEntity.getId()); + itemLawService.saveLawDetail(formDto); + //todo bssb上报网格化平台 + return new Result(); + } + @Override public Result> getQuestionList(ItemByQuestionFormDTO formDto) { diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemLawDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemLawDao.xml new file mode 100644 index 000000000..eac3087cf --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemLawDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +