From a9617fc5716e1f394a09be70546fd4b72d9753e2 Mon Sep 17 00:00:00 2001 From: liuchuang Date: Tue, 10 Sep 2019 18:47:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE=E8=A1=A8?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/constant/EventIssueItemState.java | 26 ++-------- .../issue/service/impl/IssueServiceImpl.java | 6 ++- .../epdc/modules/item/dao/ItemDeptDao.java | 33 +++++++++++++ .../modules/item/entity/ItemDeptEntity.java | 49 +++++++++++++++++++ .../item/entity/ItemHandleProcessEntity.java | 7 +-- .../modules/item/service/ItemDeptService.java | 44 +++++++++++++++++ .../service/impl/ItemDeptServiceImpl.java | 45 +++++++++++++++++ 7 files changed, 179 insertions(+), 31 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDeptDao.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemDeptEntity.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemDeptService.java create mode 100644 esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemDeptServiceImpl.java diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/constant/EventIssueItemState.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/constant/EventIssueItemState.java index 3d79d38f2..623a396ec 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/constant/EventIssueItemState.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/constant/EventIssueItemState.java @@ -32,38 +32,18 @@ public interface EventIssueItemState { */ int ISSUE_CHANGE_TO_ITEM = 4; - /** - * 项目-待网格长处理 - */ - int ITEM_WAITING_GRID_HANDLE = 0; - /** - * 项目-待社区处理 - */ - int ITEM_WAITING_COMMUNITY_HANDLE = 5; - /** - * 项目-待街道党工委处理 - */ - int ITEM_WAITING_STREET_FIRST_HANDLE = 10; - /** - * 项目-待街道处理 - */ - int ITEM_WAITING_STREET_SECOND_HANDLE = 15; - /** - * 项目-待区直部门处理 - */ - int ITEM_WAITING_AREA_HANDLE = 20; /** * 项目-处理中 */ - int ITEM_HANDLING = 25; + int ITEM_HANDLING = 0; /** * 项目-关闭 */ - int ITEM_CLOSED= 30; + int ITEM_CLOSED= 5; /** * 项目-结案 */ - int ITEM_CLOSEING_CASE= 35; + int ITEM_CLOSEING_CASE= 10; /** * 议题处理-审核通过 diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java index b905e5180..0ab45d4e9 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java @@ -24,6 +24,7 @@ import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.commons.tools.constant.NumConstant; import com.elink.esua.epdc.commons.tools.exception.RenException; import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.DateUtils; import com.elink.esua.epdc.commons.tools.utils.Result; @@ -165,8 +166,9 @@ public class IssueServiceImpl extends BaseServiceImpl imp // 插入项目处理流程表 ItemHandleProcessEntity itemHandleProcessEntity = new ItemHandleProcessEntity(); itemHandleProcessEntity.setItemId(itemEntity.getId()); - itemHandleProcessEntity.setState(EventIssueItemState.ITEM_WAITING_GRID_HANDLE); + itemHandleProcessEntity.setState(EventIssueItemState.ITEM_HANDLING); itemHandleProcessEntity.setHandleAdvice(dto.getAdvice()); + itemHandleProcessEntity.setHandlerDeptId(SecurityUser.getDeptId()); itemHandleProcessService.insert(itemHandleProcessEntity); } return new Result(); @@ -271,7 +273,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp itemEntity.setIssueLongitude(issueEntity.getIssueLongitude()); itemEntity.setIssueLatitude(issueEntity.getIssueLatitude()); itemEntity.setFriendlyCommunityId(issueEntity.getFriendlyCommunityId()); - itemEntity.setItemState(EventIssueItemState.ITEM_WAITING_GRID_HANDLE); + itemEntity.setItemState(EventIssueItemState.ITEM_HANDLING); return itemEntity; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDeptDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDeptDao.java new file mode 100644 index 000000000..495f167de --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDeptDao.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.ItemDeptEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目部门关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-10 + */ +@Mapper +public interface ItemDeptDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemDeptEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemDeptEntity.java new file mode 100644 index 000000000..1ccce1412 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemDeptEntity.java @@ -0,0 +1,49 @@ +/** + * 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; + +/** + * 项目部门关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-10 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_item_dept") +public class ItemDeptEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 项目ID + */ + private String itemId; + + /** + * 部门ID + */ + private Long deptId; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemHandleProcessEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemHandleProcessEntity.java index 55a3bb424..c0fb0bdf8 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemHandleProcessEntity.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemHandleProcessEntity.java @@ -51,14 +51,9 @@ public class ItemHandleProcessEntity extends BaseEpdcEntity { */ private String handleAdvice; - /** - * 流转部门ID - */ - private String cycleDeptDi; - /** * 操作人部门ID */ - private String handlerDeptId; + private long handlerDeptId; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemDeptService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemDeptService.java new file mode 100644 index 000000000..241fa6b03 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemDeptService.java @@ -0,0 +1,44 @@ +/** + * 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.modules.item.entity.ItemDeptEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目部门关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-10 + */ +public interface ItemDeptService extends BaseService { + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-09-10 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemDeptServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemDeptServiceImpl.java new file mode 100644 index 000000000..ed0912852 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemDeptServiceImpl.java @@ -0,0 +1,45 @@ +/** + * 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.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.modules.item.dao.ItemDeptDao; +import com.elink.esua.epdc.modules.item.entity.ItemDeptEntity; +import com.elink.esua.epdc.modules.item.service.ItemDeptService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; + +/** + * 项目部门关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-10 + */ +@Service +public class ItemDeptServiceImpl extends BaseServiceImpl implements ItemDeptService { + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +}