From 45655d9c75168441fa75825fe3541e54a44f0fcf Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Nov 2021 16:45:59 +0800 Subject: [PATCH 001/170] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E3=80=81=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/SocietyOrgDTO.java | 141 +++++++++++++++++ .../controller/SocietyOrgController.java | 94 +++++++++++ .../java/com/epmet/dao/SocietyOrgDao.java | 33 ++++ .../com/epmet/entity/SocietyOrgEntity.java | 111 +++++++++++++ .../java/com/epmet/excel/SocietyOrgExcel.java | 98 ++++++++++++ .../com/epmet/service/SocietyOrgService.java | 95 ++++++++++++ .../service/impl/SocietyOrgServiceImpl.java | 100 ++++++++++++ .../main/resources/mapper/SocietyOrgDao.xml | 8 + .../main/java/com/epmet/dto/PlaceOrgDTO.java | 131 ++++++++++++++++ .../com/epmet/dto/PlacePatrolRecordDTO.java | 146 ++++++++++++++++++ .../epmet/dto/PlacePatrolReviewRecordDTO.java | 111 +++++++++++++ .../com/epmet/dto/PlacePatrolTeamDTO.java | 126 +++++++++++++++ .../epmet/dto/PlacePatrolTeamStaffDTO.java | 96 ++++++++++++ .../epmet/controller/PlaceOrgController.java | 94 +++++++++++ .../PlacePatrolRecordController.java | 94 +++++++++++ .../PlacePatrolReviewRecordController.java | 94 +++++++++++ .../controller/PlacePatrolTeamController.java | 94 +++++++++++ .../PlacePatrolTeamStaffController.java | 94 +++++++++++ .../main/java/com/epmet/dao/PlaceOrgDao.java | 33 ++++ .../com/epmet/dao/PlacePatrolRecordDao.java | 33 ++++ .../epmet/dao/PlacePatrolReviewRecordDao.java | 33 ++++ .../com/epmet/dao/PlacePatrolTeamDao.java | 33 ++++ .../epmet/dao/PlacePatrolTeamStaffDao.java | 33 ++++ .../java/com/epmet/entity/PlaceOrgEntity.java | 101 ++++++++++++ .../epmet/entity/PlacePatrolRecordEntity.java | 116 ++++++++++++++ .../entity/PlacePatrolReviewRecordEntity.java | 81 ++++++++++ .../epmet/entity/PlacePatrolTeamEntity.java | 96 ++++++++++++ .../entity/PlacePatrolTeamStaffEntity.java | 66 ++++++++ .../java/com/epmet/excel/PlaceOrgExcel.java | 89 +++++++++++ .../epmet/excel/PlacePatrolRecordExcel.java | 101 ++++++++++++ .../excel/PlacePatrolReviewRecordExcel.java | 80 ++++++++++ .../com/epmet/excel/PlacePatrolTeamExcel.java | 89 +++++++++++ .../excel/PlacePatrolTeamStaffExcel.java | 71 +++++++++ .../com/epmet/service/PlaceOrgService.java | 95 ++++++++++++ .../service/PlacePatrolRecordService.java | 95 ++++++++++++ .../PlacePatrolReviewRecordService.java | 95 ++++++++++++ .../epmet/service/PlacePatrolTeamService.java | 95 ++++++++++++ .../service/PlacePatrolTeamStaffService.java | 95 ++++++++++++ .../service/impl/PlaceOrgServiceImpl.java | 100 ++++++++++++ .../impl/PlacePatrolRecordServiceImpl.java | 100 ++++++++++++ .../PlacePatrolReviewRecordServiceImpl.java | 100 ++++++++++++ .../impl/PlacePatrolTeamServiceImpl.java | 100 ++++++++++++ .../impl/PlacePatrolTeamStaffServiceImpl.java | 100 ++++++++++++ .../src/main/resources/mapper/PlaceOrgDao.xml | 8 + .../resources/mapper/PlacePatrolRecordDao.xml | 8 + .../mapper/PlacePatrolReviewRecordDao.xml | 8 + .../resources/mapper/PlacePatrolTeamDao.xml | 8 + .../mapper/PlacePatrolTeamStaffDao.xml | 8 + 48 files changed, 3830 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java new file mode 100644 index 0000000000..3c7a60b93c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java @@ -0,0 +1,141 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class SocietyOrgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 社会组织名称 + */ + private String societyName; + + /** + * 服务事项 + */ + private String serviceMatters; + + /** + * 负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 起始服务时间 + */ + private Date serviceStartTime; + + /** + * 终止服务时间 + */ + private Date serviceEndTime; + + /** + * 绑定管理员[组织下录入的工作人员] + */ + private String adminStaffId; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 维度 + */ + private String dimension; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java new file mode 100644 index 0000000000..315b568a9d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.SocietyOrgDTO; +import com.epmet.excel.SocietyOrgExcel; +import com.epmet.service.SocietyOrgService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("societyorg") +public class SocietyOrgController { + + @Autowired + private SocietyOrgService societyOrgService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = societyOrgService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + SocietyOrgDTO data = societyOrgService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody SocietyOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + societyOrgService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody SocietyOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + societyOrgService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + societyOrgService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = societyOrgService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, SocietyOrgExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java new file mode 100644 index 0000000000..b46d6035d2 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.SocietyOrgEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface SocietyOrgDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java new file mode 100644 index 0000000000..9c0d086929 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("society_org") +public class SocietyOrgEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 社会组织名称 + */ + private String societyName; + + /** + * 服务事项 + */ + private String serviceMatters; + + /** + * 负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 起始服务时间 + */ + private Date serviceStartTime; + + /** + * 终止服务时间 + */ + private Date serviceEndTime; + + /** + * 绑定管理员[组织下录入的工作人员] + */ + private String adminStaffId; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 维度 + */ + private String dimension; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java new file mode 100644 index 0000000000..af8ddbe4c1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java @@ -0,0 +1,98 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class SocietyOrgExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "社会组织名称") + private String societyName; + + @Excel(name = "服务事项") + private String serviceMatters; + + @Excel(name = "负责人") + private String personInCharge; + + @Excel(name = "负责人电话") + private String mobile; + + @Excel(name = "起始服务时间") + private Date serviceStartTime; + + @Excel(name = "终止服务时间") + private Date serviceEndTime; + + @Excel(name = "绑定管理员[组织下录入的工作人员]") + private String adminStaffId; + + @Excel(name = "地址") + private String address; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "维度") + private String dimension; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java new file mode 100644 index 0000000000..da73dc29d0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.SocietyOrgDTO; +import com.epmet.entity.SocietyOrgEntity; + +import java.util.List; +import java.util.Map; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface SocietyOrgService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return SocietyOrgDTO + * @author generator + * @date 2021-11-18 + */ + SocietyOrgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(SocietyOrgDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(SocietyOrgDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java new file mode 100644 index 0000000000..235c8f1c53 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.SocietyOrgDao; +import com.epmet.dto.SocietyOrgDTO; +import com.epmet.entity.SocietyOrgEntity; +import com.epmet.service.SocietyOrgService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, SocietyOrgDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, SocietyOrgDTO.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 SocietyOrgDTO get(String id) { + SocietyOrgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, SocietyOrgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(SocietyOrgDTO dto) { + SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(SocietyOrgDTO dto) { + SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml new file mode 100644 index 0000000000..6583d6afc2 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java new file mode 100644 index 0000000000..bc61f843e8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java @@ -0,0 +1,131 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlaceOrgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVal; + + /** + * 场所名称 + */ + private String placeOrgName; + + /** + * 场所地址 + */ + private String address; + + /** + * 字典value,场所规模【 +0:10人以下 +1:10-20人 +2:21-40人 +3:41-100人 +4:100人以上】 + */ + private String scale; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java new file mode 100644 index 0000000000..592ff13956 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java @@ -0,0 +1,146 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlacsVal; + + /** + * 场所下的组织Id + */ + private String placeOrgId; + + /** + * 场所下分队(place_patrolteam)表Id + */ + private String placePatrolTeamId; + + /** + * 分队下检查人员Id,分号分隔 + */ + private String inspectors; + + /** + * 首次巡查时间 + */ + private Date firstTime; + + /** + * 隐患明细 + */ + private String detailed; + + /** + * 首次检查结果【0:合格 1:不合格】 + */ + private String firstResult; + + /** + * 拟复查时间 + */ + private Date reviewTime; + + /** + * 最终检查结果【0:合格 1:不合格】初始数据默认和首次检查结果相同 + */ + private String finalResult; + + /** + * 最新复查时间【初始数据默认和首次巡查时间相同】 + */ + private Date finalTime; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java new file mode 100644 index 0000000000..dbc2160e45 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolReviewRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查记录主(place_patrol_record)表Id + */ + private String placePatrolRecordId; + + /** + * 场所下分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 检查人员Id,逗号分隔 + */ + private String inspectors; + + /** + * 复查时间 + */ + private Date reviewTime; + + /** + * 复查隐患明细 + */ + private String detailed; + + /** + * 复查检查结果【0:合格 1:不合格】 + */ + private String reviewResult; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java new file mode 100644 index 0000000000..b80cd8509b --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 负责区域【网格Id 多个值逗号分隔】 + */ + private String gridIds; + + /** + * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 + */ + private String ninePlacsVals; + + /** + * 分队名称 + */ + private String teamName; + + /** + * 巡查计划 + */ + private String plan; + + /** + * 创建(建队)时间 + */ + private Date time; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java new file mode 100644 index 0000000000..48f69a5c4a --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java @@ -0,0 +1,96 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamStaffDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 成员姓名 + */ + private String name; + + /** + * 成员电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java new file mode 100644 index 0000000000..77fc0c7fc9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlaceOrgDTO; +import com.epmet.excel.PlaceOrgExcel; +import com.epmet.service.PlaceOrgService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placeorg") +public class PlaceOrgController { + + @Autowired + private PlaceOrgService placeOrgService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placeOrgService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlaceOrgDTO data = placeOrgService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlaceOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placeOrgService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlaceOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placeOrgService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placeOrgService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placeOrgService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlaceOrgExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java new file mode 100644 index 0000000000..35cbfad262 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolRecordDTO; +import com.epmet.excel.PlacePatrolRecordExcel; +import com.epmet.service.PlacePatrolRecordService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolrecord") +public class PlacePatrolRecordController { + + @Autowired + private PlacePatrolRecordService placePatrolRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolRecordDTO data = placePatrolRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java new file mode 100644 index 0000000000..a6caf1d1aa --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolReviewRecordDTO; +import com.epmet.excel.PlacePatrolReviewRecordExcel; +import com.epmet.service.PlacePatrolReviewRecordService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolreviewrecord") +public class PlacePatrolReviewRecordController { + + @Autowired + private PlacePatrolReviewRecordService placePatrolReviewRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolReviewRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolReviewRecordDTO data = placePatrolReviewRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolReviewRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolReviewRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolReviewRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolReviewRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolReviewRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolReviewRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolReviewRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java new file mode 100644 index 0000000000..29df2c1deb --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.excel.PlacePatrolTeamExcel; +import com.epmet.service.PlacePatrolTeamService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolteam") +public class PlacePatrolTeamController { + + @Autowired + private PlacePatrolTeamService placePatrolTeamService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolTeamService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolTeamDTO data = placePatrolTeamService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolTeamService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolTeamService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolTeamService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolTeamService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolTeamExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java new file mode 100644 index 0000000000..787d98981e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.excel.PlacePatrolTeamStaffExcel; +import com.epmet.service.PlacePatrolTeamStaffService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolteamstaff") +public class PlacePatrolTeamStaffController { + + @Autowired + private PlacePatrolTeamStaffService placePatrolTeamStaffService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolTeamStaffService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolTeamStaffDTO data = placePatrolTeamStaffService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolTeamStaffDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolTeamStaffService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolTeamStaffDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolTeamStaffService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolTeamStaffService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolTeamStaffService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolTeamStaffExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java new file mode 100644 index 0000000000..d25d485262 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlaceOrgEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlaceOrgDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java new file mode 100644 index 0000000000..8d501f16e9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java new file mode 100644 index 0000000000..6253e7afd2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolReviewRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolReviewRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java new file mode 100644 index 0000000000..7e19b451c1 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolTeamEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolTeamDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java new file mode 100644 index 0000000000..a8c180fee7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolTeamStaffEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolTeamStaffDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java new file mode 100644 index 0000000000..fbe92edea5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_org") +public class PlaceOrgEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVal; + + /** + * 场所名称 + */ + private String placeOrgName; + + /** + * 场所地址 + */ + private String address; + + /** + * 字典value,场所规模【 +0:10人以下 +1:10-20人 +2:21-40人 +3:41-100人 +4:100人以上】 + */ + private String scale; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java new file mode 100644 index 0000000000..b5a2c64dd2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java @@ -0,0 +1,116 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_record") +public class PlacePatrolRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlacsVal; + + /** + * 场所下的组织Id + */ + private String placeOrgId; + + /** + * 场所下分队(place_patrolteam)表Id + */ + private String placePatrolTeamId; + + /** + * 分队下检查人员Id,分号分隔 + */ + private String inspectors; + + /** + * 首次巡查时间 + */ + private Date firstTime; + + /** + * 隐患明细 + */ + private String detailed; + + /** + * 首次检查结果【0:合格 1:不合格】 + */ + private String firstResult; + + /** + * 拟复查时间 + */ + private Date reviewTime; + + /** + * 最终检查结果【0:合格 1:不合格】初始数据默认和首次检查结果相同 + */ + private String finalResult; + + /** + * 最新复查时间【初始数据默认和首次巡查时间相同】 + */ + private Date finalTime; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java new file mode 100644 index 0000000000..196794d147 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java @@ -0,0 +1,81 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_review_record") +public class PlacePatrolReviewRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查记录主(place_patrol_record)表Id + */ + private String placePatrolRecordId; + + /** + * 场所下分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 检查人员Id,逗号分隔 + */ + private String inspectors; + + /** + * 复查时间 + */ + private Date reviewTime; + + /** + * 复查隐患明细 + */ + private String detailed; + + /** + * 复查检查结果【0:合格 1:不合格】 + */ + private String reviewResult; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java new file mode 100644 index 0000000000..dce4701f43 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java @@ -0,0 +1,96 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_team") +public class PlacePatrolTeamEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 负责区域【网格Id 多个值逗号分隔】 + */ + private String gridIds; + + /** + * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 + */ + private String ninePlacsVals; + + /** + * 分队名称 + */ + private String teamName; + + /** + * 巡查计划 + */ + private String plan; + + /** + * 创建(建队)时间 + */ + private Date time; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java new file mode 100644 index 0000000000..f0012def21 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java @@ -0,0 +1,66 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_team_staff") +public class PlacePatrolTeamStaffEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 成员姓名 + */ + private String name; + + /** + * 成员电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java new file mode 100644 index 0000000000..83a6fb8792 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java @@ -0,0 +1,89 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlaceOrgExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "网格Id【场所区域】") + private String gridId; + + @Excel(name = "场所类型") + private String ninePlaceVal; + + @Excel(name = "场所名称") + private String placeOrgName; + + @Excel(name = "场所地址") + private String address; + + @Excel(name = "场所规模") + private String scale; + + @Excel(name = "场所负责人") + private String personInCharge; + + @Excel(name = "负责人电话") + private String mobile; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java new file mode 100644 index 0000000000..ccf1208aaa --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolRecordExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "网格Id【场所区域】") + private String gridId; + + @Excel(name = "场所类型【admin库sys_dict_data表九小场所value值】") + private String ninePlacsVal; + + @Excel(name = "场所下的组织Id") + private String placeOrgId; + + @Excel(name = "场所下分队(place_patrolteam)表Id") + private String placePatrolTeamId; + + @Excel(name = "分队下检查人员Id,分号分隔") + private String inspectors; + + @Excel(name = "首次巡查时间") + private Date firstTime; + + @Excel(name = "隐患明细") + private String detailed; + + @Excel(name = "首次检查结果【0:合格 1:不合格】") + private String firstResult; + + @Excel(name = "拟复查时间") + private Date reviewTime; + + @Excel(name = "最终检查结果【0:合格 1:不合格】初始数据默认和首次检查结果相同") + private String finalResult; + + @Excel(name = "最新复查时间【初始数据默认和首次巡查时间相同】") + private Date finalTime; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java new file mode 100644 index 0000000000..c98b265c27 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java @@ -0,0 +1,80 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolReviewRecordExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "巡查记录主(place_patrol_record)表Id") + private String placePatrolRecordId; + + @Excel(name = "场所下分队(place_patrol_team)表Id") + private String placePatrolTeamId; + + @Excel(name = "检查人员Id,逗号分隔") + private String inspectors; + + @Excel(name = "复查时间") + private Date reviewTime; + + @Excel(name = "复查隐患明细") + private String detailed; + + @Excel(name = "复查检查结果【0:合格 1:不合格】") + private String reviewResult; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java new file mode 100644 index 0000000000..b77fce4de4 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java @@ -0,0 +1,89 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "负责区域【网格Id 多个值逗号分隔】") + private String gridIds; + + @Excel(name = "负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】") + private String ninePlacsVals; + + @Excel(name = "分队名称") + private String teamName; + + @Excel(name = "巡查计划") + private String plan; + + @Excel(name = "创建(建队)时间") + private Date time; + + @Excel(name = "场所负责人") + private String personInCharge; + + @Excel(name = "负责人电话") + private String mobile; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java new file mode 100644 index 0000000000..db8c9c250a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java @@ -0,0 +1,71 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamStaffExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "巡查分队(place_patrol_team)表Id") + private String placePatrolTeamId; + + @Excel(name = "成员姓名") + private String name; + + @Excel(name = "成员电话") + private String mobile; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java new file mode 100644 index 0000000000..ba728dcca2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlaceOrgDTO; +import com.epmet.entity.PlaceOrgEntity; + +import java.util.List; +import java.util.Map; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlaceOrgService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlaceOrgDTO + * @author generator + * @date 2021-11-18 + */ + PlaceOrgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlaceOrgDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlaceOrgDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java new file mode 100644 index 0000000000..51d4885918 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolRecordDTO; +import com.epmet.entity.PlacePatrolRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolRecordDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java new file mode 100644 index 0000000000..ae73375c3a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolReviewRecordDTO; +import com.epmet.entity.PlacePatrolReviewRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolReviewRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolReviewRecordDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolReviewRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolReviewRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolReviewRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java new file mode 100644 index 0000000000..55b983e348 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.entity.PlacePatrolTeamEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolTeamService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolTeamDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolTeamDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolTeamDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolTeamDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java new file mode 100644 index 0000000000..e970167e66 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.entity.PlacePatrolTeamStaffEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolTeamStaffService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolTeamStaffDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolTeamStaffDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolTeamStaffDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolTeamStaffDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java new file mode 100644 index 0000000000..a6be788df8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlaceOrgDao; +import com.epmet.dto.PlaceOrgDTO; +import com.epmet.entity.PlaceOrgEntity; +import com.epmet.service.PlaceOrgService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlaceOrgServiceImpl extends BaseServiceImpl implements PlaceOrgService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlaceOrgDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlaceOrgDTO.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 PlaceOrgDTO get(String id) { + PlaceOrgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlaceOrgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlaceOrgDTO dto) { + PlaceOrgEntity entity = ConvertUtils.sourceToTarget(dto, PlaceOrgEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlaceOrgDTO dto) { + PlaceOrgEntity entity = ConvertUtils.sourceToTarget(dto, PlaceOrgEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java new file mode 100644 index 0000000000..6953888aac --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolRecordDao; +import com.epmet.dto.PlacePatrolRecordDTO; +import com.epmet.entity.PlacePatrolRecordEntity; +import com.epmet.service.PlacePatrolRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolRecordServiceImpl extends BaseServiceImpl implements PlacePatrolRecordService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolRecordDTO.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 PlacePatrolRecordDTO get(String id) { + PlacePatrolRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolRecordDTO dto) { + PlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolRecordDTO dto) { + PlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java new file mode 100644 index 0000000000..532bbc2545 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolReviewRecordDao; +import com.epmet.dto.PlacePatrolReviewRecordDTO; +import com.epmet.entity.PlacePatrolReviewRecordEntity; +import com.epmet.service.PlacePatrolReviewRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolReviewRecordServiceImpl extends BaseServiceImpl implements PlacePatrolReviewRecordService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolReviewRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolReviewRecordDTO.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 PlacePatrolReviewRecordDTO get(String id) { + PlacePatrolReviewRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolReviewRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolReviewRecordDTO dto) { + PlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolReviewRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolReviewRecordDTO dto) { + PlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolReviewRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java new file mode 100644 index 0000000000..e7696ba4f9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolTeamDao; +import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.entity.PlacePatrolTeamEntity; +import com.epmet.service.PlacePatrolTeamService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolTeamServiceImpl extends BaseServiceImpl implements PlacePatrolTeamService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolTeamDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolTeamDTO.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 PlacePatrolTeamDTO get(String id) { + PlacePatrolTeamEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolTeamDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolTeamDTO dto) { + PlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolTeamDTO dto) { + PlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java new file mode 100644 index 0000000000..c44ec42a76 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolTeamStaffDao; +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.entity.PlacePatrolTeamStaffEntity; +import com.epmet.service.PlacePatrolTeamStaffService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolTeamStaffServiceImpl extends BaseServiceImpl implements PlacePatrolTeamStaffService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolTeamStaffDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolTeamStaffDTO.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 PlacePatrolTeamStaffDTO get(String id) { + PlacePatrolTeamStaffEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolTeamStaffDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolTeamStaffDTO dto) { + PlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamStaffEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolTeamStaffDTO dto) { + PlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamStaffEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml new file mode 100644 index 0000000000..3fb8247c8b --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml new file mode 100644 index 0000000000..93cbf7d277 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml new file mode 100644 index 0000000000..bf558e052d --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml new file mode 100644 index 0000000000..2e889eb2dd --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml new file mode 100644 index 0000000000..26bebdb857 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 8e78d5c48ec0d4b8d3e41b41f05a1ee530392717 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Nov 2021 17:19:04 +0800 Subject: [PATCH 002/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddSocietyOrgFormDTO.java | 101 ++++++++++++++++++ .../controller/SocietyOrgController.java | 69 +++--------- .../com/epmet/service/SocietyOrgService.java | 68 +----------- .../service/impl/SocietyOrgServiceImpl.java | 70 +++--------- 4 files changed, 136 insertions(+), 172 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java new file mode 100644 index 0000000000..bc0555f95b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class AddSocietyOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 客户Id + */ + private String customerId; + /** + * 组织Id + */ + private String agencyId; + /** + * agency_id的所有上级 + */ + private String pids; + /** + * 社会组织名称 + */ + @NotBlank(message = "社会组织名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String societyName; + /** + * 服务事项 + */ + @NotBlank(message = "服务事项不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String serviceMatters; + /** + * 负责人 + */ + @NotBlank(message = "负责人名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String personInCharge; + /** + * 负责人电话 + */ + @NotBlank(message = "负责人电话不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String mobile; + /** + * 起始服务时间 + */ + @NotBlank(message = "起始服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private Date serviceStartTime; + /** + * 终止服务时间 + */ + @NotBlank(message = "终止服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private Date serviceEndTime; + /** + * 绑定管理员[组织下录入的工作人员] + */ + @NotBlank(message = "绑定管理员名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String adminStaffId; + /** + * 地址 + */ + private String address; + /** + * 经度 + */ + private String longitude; + /** + * 维度 + */ + private String dimension; + //token中userId + private String staffId; + + public interface Add {} + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java index 315b568a9d..0eb23cde7d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java @@ -17,23 +17,17 @@ package com.epmet.controller; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.SocietyOrgDTO; -import com.epmet.excel.SocietyOrgExcel; +import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.service.SocietyOrgService; 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; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** @@ -49,46 +43,17 @@ public class SocietyOrgController { @Autowired private SocietyOrgService societyOrgService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = societyOrgService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - SocietyOrgDTO data = societyOrgService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody SocietyOrgDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - societyOrgService.save(dto); + /** + * @Author sun + * @Description 新增社会组织 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddSocietyOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddSocietyOrgFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setStaffId(tokenDto.getUserId()); + societyOrgService.add(formDTO); return new Result(); } - @PutMapping - public Result update(@RequestBody SocietyOrgDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - societyOrgService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - societyOrgService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = societyOrgService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, SocietyOrgExcel.class); - } - } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java index da73dc29d0..846e07777f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java @@ -18,13 +18,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.SocietyOrgDTO; +import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.entity.SocietyOrgEntity; -import java.util.List; -import java.util.Map; - /** * 社会组织管理 * @@ -34,62 +30,8 @@ import java.util.Map; public interface SocietyOrgService extends BaseService { /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-11-18 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-11-18 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return SocietyOrgDTO - * @author generator - * @date 2021-11-18 - */ - SocietyOrgDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void save(SocietyOrgDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void update(SocietyOrgDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-11-18 - */ - void delete(String[] ids); + * @Author sun + * @Description 新增社会组织 + **/ + void add(AddSocietyOrgFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java index 235c8f1c53..5f2c284be2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java @@ -17,24 +17,19 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.SocietyOrgDao; -import com.epmet.dto.SocietyOrgDTO; +import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.entity.SocietyOrgEntity; import com.epmet.service.SocietyOrgService; -import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - /** * 社会组织管理 * @@ -43,58 +38,19 @@ import java.util.Map; */ @Service public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { + private static final Logger log = LoggerFactory.getLogger(SocietyOrgServiceImpl.class); - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, SocietyOrgDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, SocietyOrgDTO.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 SocietyOrgDTO get(String id) { - SocietyOrgEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, SocietyOrgDTO.class); - } - + /** + * @Author sun + * @Description 新增社会组织 + **/ @Override @Transactional(rollbackFor = Exception.class) - public void save(SocietyOrgDTO dto) { + public void add(AddSocietyOrgFormDTO dto) { SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getStaffId()); + entity.setPids(staffInfoCache.getAgencyPIds()); insert(entity); } - @Override - @Transactional(rollbackFor = Exception.class) - public void update(SocietyOrgDTO dto) { - SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - } \ No newline at end of file From 483046df86b754f3af6939b668bff6651ced2f03 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Nov 2021 17:19:43 +0800 Subject: [PATCH 003/170] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=EF=BC=8C=E5=85=9A=E7=BE=A4=E6=9C=8D=E5=8A=A1=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=87=AA=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/IcCommunitySelfOrganizationDTO.java | 136 +++++++++++++++++ ...CommunitySelfOrganizationPersonnelDTO.java | 91 +++++++++++ ...IcCommunitySelfOrganizationController.java | 94 ++++++++++++ ...tySelfOrganizationPersonnelController.java | 94 ++++++++++++ .../dao/IcCommunitySelfOrganizationDao.java | 33 ++++ ...CommunitySelfOrganizationPersonnelDao.java | 33 ++++ .../IcCommunitySelfOrganizationEntity.java | 106 +++++++++++++ ...munitySelfOrganizationPersonnelEntity.java | 61 ++++++++ .../IcCommunitySelfOrganizationExcel.java | 95 ++++++++++++ ...mmunitySelfOrganizationPersonnelExcel.java | 68 +++++++++ ...unitySelfOrganizationPersonnelService.java | 95 ++++++++++++ .../IcCommunitySelfOrganizationService.java | 95 ++++++++++++ ...ySelfOrganizationPersonnelServiceImpl.java | 100 +++++++++++++ ...cCommunitySelfOrganizationServiceImpl.java | 83 +++++++++++ .../mapper/IcCommunitySelfOrganizationDao.xml | 6 + ...cCommunitySelfOrganizationPersonnelDao.xml | 6 + .../dto/IcMatterAppointmentRecordDTO.java | 131 ++++++++++++++++ .../epmet/dto/IcPartyServiceCenterDTO.java | 141 ++++++++++++++++++ .../dto/IcPartyServiceCenterMatterDTO.java | 101 +++++++++++++ .../IcMatterAppointmentRecordController.java | 94 ++++++++++++ .../IcPartyServiceCenterController.java | 94 ++++++++++++ .../IcPartyServiceCenterMatterController.java | 94 ++++++++++++ .../dao/IcMatterAppointmentRecordDao.java | 33 ++++ .../epmet/dao/IcPartyServiceCenterDao.java | 33 ++++ .../dao/IcPartyServiceCenterMatterDao.java | 33 ++++ .../IcMatterAppointmentRecordEntity.java | 101 +++++++++++++ .../entity/IcPartyServiceCenterEntity.java | 111 ++++++++++++++ .../IcPartyServiceCenterMatterEntity.java | 71 +++++++++ .../excel/IcMatterAppointmentRecordExcel.java | 92 ++++++++++++ .../excel/IcPartyServiceCenterExcel.java | 98 ++++++++++++ .../IcPartyServiceCenterMatterExcel.java | 74 +++++++++ .../IcMatterAppointmentRecordService.java | 95 ++++++++++++ .../IcPartyServiceCenterMatterService.java | 95 ++++++++++++ .../service/IcPartyServiceCenterService.java | 95 ++++++++++++ .../IcMatterAppointmentRecordServiceImpl.java | 100 +++++++++++++ ...IcPartyServiceCenterMatterServiceImpl.java | 100 +++++++++++++ .../impl/IcPartyServiceCenterServiceImpl.java | 100 +++++++++++++ .../mapper/IcMatterAppointmentRecordDao.xml | 6 + .../mapper/IcPartyServiceCenterDao.xml | 6 + .../mapper/IcPartyServiceCenterMatterDao.xml | 6 + 40 files changed, 3100 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java new file mode 100644 index 0000000000..6be34cb9b8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java @@ -0,0 +1,136 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * 组织ID的父级 + */ + private String pid; + + /** + * org_id的所有上级 + */ + private String pids; + + /** + * 组织名称 + */ + private String organizationName; + + /** + * 组织人数 + */ + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 服务事项 + */ + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + private Date organizationCreatedTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java new file mode 100644 index 0000000000..1361539bce --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java @@ -0,0 +1,91 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 社区自组织ID + */ + private String orgId; + + /** + * 人员姓名 + */ + private String personName; + + /** + * 人员电话 + */ + private String personIphone; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java new file mode 100644 index 0000000000..acab1c9611 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.excel.IcCommunitySelfOrganizationExcel; +import com.epmet.service.IcCommunitySelfOrganizationService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("iccommunityselforganization") +public class IcCommunitySelfOrganizationController { + + @Autowired + private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icCommunitySelfOrganizationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcCommunitySelfOrganizationDTO data = icCommunitySelfOrganizationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcCommunitySelfOrganizationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcCommunitySelfOrganizationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icCommunitySelfOrganizationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icCommunitySelfOrganizationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.java new file mode 100644 index 0000000000..76a64ce4f0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.epmet.excel.IcCommunitySelfOrganizationPersonnelExcel; +import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("iccommunityselforganizationpersonnel") +public class IcCommunitySelfOrganizationPersonnelController { + + @Autowired + private IcCommunitySelfOrganizationPersonnelService icCommunitySelfOrganizationPersonnelService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icCommunitySelfOrganizationPersonnelService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcCommunitySelfOrganizationPersonnelDTO data = icCommunitySelfOrganizationPersonnelService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcCommunitySelfOrganizationPersonnelDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationPersonnelService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcCommunitySelfOrganizationPersonnelDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationPersonnelService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icCommunitySelfOrganizationPersonnelService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icCommunitySelfOrganizationPersonnelService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationPersonnelExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java new file mode 100644 index 0000000000..c046cfe956 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcCommunitySelfOrganizationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcCommunitySelfOrganizationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java new file mode 100644 index 0000000000..45a233840c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcCommunitySelfOrganizationPersonnelDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java new file mode 100644 index 0000000000..4d3515e7ff --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_community_self_organization") +public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * 组织ID的父级 + */ + private String pid; + + /** + * org_id的所有上级 + */ + private String pids; + + /** + * 组织名称 + */ + private String organizationName; + + /** + * 组织人数 + */ + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 服务事项 + */ + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + private Date organizationCreatedTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java new file mode 100644 index 0000000000..411429d430 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java @@ -0,0 +1,61 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_community_self_organization_personnel") +public class IcCommunitySelfOrganizationPersonnelEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 社区自组织ID + */ + private String orgId; + + /** + * 人员姓名 + */ + private String personName; + + /** + * 人员电话 + */ + private String personIphone; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java new file mode 100644 index 0000000000..7310a47279 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "组织ID") + private String orgId; + + @Excel(name = "组织类型,agency:组织,grid:网格") + private String orgType; + + @Excel(name = "组织ID的父级") + private String pid; + + @Excel(name = "org_id的所有上级") + private String pids; + + @Excel(name = "组织名称") + private String organizationName; + + @Excel(name = "组织人数") + private Integer organizationPersonCount; + + @Excel(name = "负责人姓名") + private String principalName; + + @Excel(name = "负责人电话") + private String principalPhone; + + @Excel(name = "服务事项") + private String serviceItem; + + @Excel(name = "社区自组织创建时间") + private Date organizationCreatedTime; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java new file mode 100644 index 0000000000..da9480bb66 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java @@ -0,0 +1,68 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationPersonnelExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "社区自组织ID") + private String orgId; + + @Excel(name = "人员姓名") + private String personName; + + @Excel(name = "人员电话") + private String personIphone; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java new file mode 100644 index 0000000000..c8265ba859 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; + +import java.util.List; +import java.util.Map; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcCommunitySelfOrganizationPersonnelService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcCommunitySelfOrganizationPersonnelDTO + * @author generator + * @date 2021-11-18 + */ + IcCommunitySelfOrganizationPersonnelDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcCommunitySelfOrganizationPersonnelDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcCommunitySelfOrganizationPersonnelDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java new file mode 100644 index 0000000000..353ed2e6d8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.entity.IcCommunitySelfOrganizationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcCommunitySelfOrganizationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcCommunitySelfOrganizationDTO + * @author generator + * @date 2021-11-18 + */ + IcCommunitySelfOrganizationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcCommunitySelfOrganizationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcCommunitySelfOrganizationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java new file mode 100644 index 0000000000..197cfc1d86 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcCommunitySelfOrganizationPersonnelDao; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; +import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcCommunitySelfOrganizationPersonnelServiceImpl extends BaseServiceImpl implements IcCommunitySelfOrganizationPersonnelService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcCommunitySelfOrganizationPersonnelDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcCommunitySelfOrganizationPersonnelDTO.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 IcCommunitySelfOrganizationPersonnelDTO get(String id) { + IcCommunitySelfOrganizationPersonnelEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcCommunitySelfOrganizationPersonnelDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcCommunitySelfOrganizationPersonnelDTO dto) { + IcCommunitySelfOrganizationPersonnelEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationPersonnelEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcCommunitySelfOrganizationPersonnelDTO dto) { + IcCommunitySelfOrganizationPersonnelEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationPersonnelEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java new file mode 100644 index 0000000000..5de7659620 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcCommunitySelfOrganizationDao; +import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.entity.IcCommunitySelfOrganizationEntity; +import com.epmet.service.IcCommunitySelfOrganizationService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl implements IcCommunitySelfOrganizationService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcCommunitySelfOrganizationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcCommunitySelfOrganizationDTO.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 IcCommunitySelfOrganizationDTO get(String id) { + IcCommunitySelfOrganizationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcCommunitySelfOrganizationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcCommunitySelfOrganizationDTO dto) { + IcCommunitySelfOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcCommunitySelfOrganizationDTO dto) { + IcCommunitySelfOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml new file mode 100644 index 0000000000..12c22d2fa6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml new file mode 100644 index 0000000000..91cf453a04 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java new file mode 100644 index 0000000000..27ee8af29b --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java @@ -0,0 +1,131 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcMatterAppointmentRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 事项ID + */ + private String matterId; + + /** + * 预约日期 + */ + private String appointmentDate; + + /** + * 预约人 + */ + private String appointmentName; + + /** + * 预约电话 + */ + private String appointmentPhone; + + /** + * 备注 + */ + private String remark; + + /** + * 预约状态【cancel:取消,appointing:预约中】 + */ + private String status; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 1,2,5 + */ + private String timeId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java new file mode 100644 index 0000000000..50430c31b5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java @@ -0,0 +1,141 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 中心名称 + */ + private String centerName; + + /** + * 办公电话 + */ + private String workPhone; + + /** + * 上午开始办公时间 + */ + private String amStartTime; + + /** + * 上午结束办公时间 + */ + private String amEndTime; + + /** + * 下午开始办公时间 + */ + private String pmStartTime; + + /** + * 下午结束办公时间 + */ + private String pmEndTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java new file mode 100644 index 0000000000..42b028df98 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterMatterDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 党群服务中心ID + */ + private String partyServiceCenterId; + + /** + * 事项名字 + */ + private String matterName; + + /** + * 预约类型,每天:everyDay,工作日:workDay,周末:weekend + */ + private String appointmentType; + + /** + * 可预约开始时间 + */ + private String startTime; + + /** + * 可预约结束时间 + */ + private String endTime; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 客户ID + */ + private String customerId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.java new file mode 100644 index 0000000000..848ab27ceb --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcMatterAppointmentRecordDTO; +import com.epmet.excel.IcMatterAppointmentRecordExcel; +import com.epmet.service.IcMatterAppointmentRecordService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icmatterappointmentrecord") +public class IcMatterAppointmentRecordController { + + @Autowired + private IcMatterAppointmentRecordService icMatterAppointmentRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icMatterAppointmentRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcMatterAppointmentRecordDTO data = icMatterAppointmentRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcMatterAppointmentRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icMatterAppointmentRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcMatterAppointmentRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icMatterAppointmentRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icMatterAppointmentRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icMatterAppointmentRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcMatterAppointmentRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java new file mode 100644 index 0000000000..dc9df26699 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.excel.IcPartyServiceCenterExcel; +import com.epmet.service.IcPartyServiceCenterService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icpartyservicecenter") +public class IcPartyServiceCenterController { + + @Autowired + private IcPartyServiceCenterService icPartyServiceCenterService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartyServiceCenterService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcPartyServiceCenterDTO data = icPartyServiceCenterService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcPartyServiceCenterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartyServiceCenterService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcPartyServiceCenterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPartyServiceCenterService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPartyServiceCenterService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartyServiceCenterService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyServiceCenterExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.java new file mode 100644 index 0000000000..affe64381a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import com.epmet.excel.IcPartyServiceCenterMatterExcel; +import com.epmet.service.IcPartyServiceCenterMatterService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icpartyservicecentermatter") +public class IcPartyServiceCenterMatterController { + + @Autowired + private IcPartyServiceCenterMatterService icPartyServiceCenterMatterService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartyServiceCenterMatterService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcPartyServiceCenterMatterDTO data = icPartyServiceCenterMatterService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcPartyServiceCenterMatterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartyServiceCenterMatterService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcPartyServiceCenterMatterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPartyServiceCenterMatterService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPartyServiceCenterMatterService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartyServiceCenterMatterService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyServiceCenterMatterExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java new file mode 100644 index 0000000000..98a08ee373 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcMatterAppointmentRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcMatterAppointmentRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java new file mode 100644 index 0000000000..0fa37f6146 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPartyServiceCenterEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPartyServiceCenterDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java new file mode 100644 index 0000000000..6001796620 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPartyServiceCenterMatterEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPartyServiceCenterMatterDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java new file mode 100644 index 0000000000..c7df20f0f7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_matter_appointment_record") +public class IcMatterAppointmentRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 事项ID + */ + private String matterId; + + /** + * 预约日期 + */ + private String appointmentDate; + + /** + * 预约人 + */ + private String appointmentName; + + /** + * 预约电话 + */ + private String appointmentPhone; + + /** + * 备注 + */ + private String remark; + + /** + * 预约状态【cancel:取消,appointing:预约中】 + */ + private String status; + + /** + * 1,2,5 + */ + private String timeId; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java new file mode 100644 index 0000000000..b2b422ff9e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_service_center") +public class IcPartyServiceCenterEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 中心名称 + */ + private String centerName; + + /** + * 办公电话 + */ + private String workPhone; + + /** + * 上午开始办公时间 + */ + private String amStartTime; + + /** + * 上午结束办公时间 + */ + private String amEndTime; + + /** + * 下午开始办公时间 + */ + private String pmStartTime; + + /** + * 下午结束办公时间 + */ + private String pmEndTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java new file mode 100644 index 0000000000..fd9f55fe13 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java @@ -0,0 +1,71 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_service_center_matter") +public class IcPartyServiceCenterMatterEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 党群服务中心ID + */ + private String partyServiceCenterId; + + /** + * 事项名字 + */ + private String matterName; + + /** + * 预约类型,每天:everyDay,工作日:workDay,周末:weekend + */ + private String appointmentType; + + /** + * 可预约开始时间 + */ + private String startTime; + + /** + * 可预约结束时间 + */ + private String endTime; + + /** + * 客户ID + */ + private String customerId; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java new file mode 100644 index 0000000000..ecbb00ee36 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java @@ -0,0 +1,92 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcMatterAppointmentRecordExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "") + private String customerId; + + @Excel(name = "组织ID") + private String orgId; + + @Excel(name = "组织类型,agency:组织,grid:网格") + private String orgType; + + @Excel(name = "") + private String pid; + + @Excel(name = "") + private String pids; + + @Excel(name = "事项ID") + private String matterId; + + @Excel(name = "预约日期") + private String appointmentDate; + + @Excel(name = "预约人") + private String appointmentName; + + @Excel(name = "预约电话") + private String appointmentPhone; + + @Excel(name = "备注") + private String remark; + + @Excel(name = "预约状态【cancel:取消,appointing:预约中】") + private String status; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "1,2,5") + private String timeId; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java new file mode 100644 index 0000000000..b1779eca45 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java @@ -0,0 +1,98 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "组织ID") + private String orgId; + + @Excel(name = "组织类型,agency:组织,grid:网格") + private String orgType; + + @Excel(name = "") + private String pid; + + @Excel(name = "") + private String pids; + + @Excel(name = "中心名称") + private String centerName; + + @Excel(name = "办公电话") + private String workPhone; + + @Excel(name = "上午开始办公时间") + private String amStartTime; + + @Excel(name = "上午结束办公时间") + private String amEndTime; + + @Excel(name = "下午开始办公时间") + private String pmStartTime; + + @Excel(name = "下午结束办公时间") + private String pmEndTime; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "地址") + private String address; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java new file mode 100644 index 0000000000..465f2f7493 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java @@ -0,0 +1,74 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterMatterExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "党群服务中心ID") + private String partyServiceCenterId; + + @Excel(name = "事项名字") + private String matterName; + + @Excel(name = "预约类型,每天:everyDay,工作日:workDay,周末:weekend") + private String appointmentType; + + @Excel(name = "可预约开始时间") + private String startTime; + + @Excel(name = "可预约结束时间") + private String endTime; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "客户ID") + private String customerId; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java new file mode 100644 index 0000000000..4f330654a9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcMatterAppointmentRecordDTO; +import com.epmet.entity.IcMatterAppointmentRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcMatterAppointmentRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcMatterAppointmentRecordDTO + * @author generator + * @date 2021-11-18 + */ + IcMatterAppointmentRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcMatterAppointmentRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcMatterAppointmentRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java new file mode 100644 index 0000000000..48a39b4b7e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import com.epmet.entity.IcPartyServiceCenterMatterEntity; + +import java.util.List; +import java.util.Map; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPartyServiceCenterMatterService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartyServiceCenterMatterDTO + * @author generator + * @date 2021-11-18 + */ + IcPartyServiceCenterMatterDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcPartyServiceCenterMatterDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcPartyServiceCenterMatterDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java new file mode 100644 index 0000000000..8da75be135 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.entity.IcPartyServiceCenterEntity; + +import java.util.List; +import java.util.Map; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPartyServiceCenterService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartyServiceCenterDTO + * @author generator + * @date 2021-11-18 + */ + IcPartyServiceCenterDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcPartyServiceCenterDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcPartyServiceCenterDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java new file mode 100644 index 0000000000..6878b736c3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcMatterAppointmentRecordDao; +import com.epmet.dto.IcMatterAppointmentRecordDTO; +import com.epmet.entity.IcMatterAppointmentRecordEntity; +import com.epmet.service.IcMatterAppointmentRecordService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcMatterAppointmentRecordServiceImpl extends BaseServiceImpl implements IcMatterAppointmentRecordService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcMatterAppointmentRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcMatterAppointmentRecordDTO.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 IcMatterAppointmentRecordDTO get(String id) { + IcMatterAppointmentRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcMatterAppointmentRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcMatterAppointmentRecordDTO dto) { + IcMatterAppointmentRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcMatterAppointmentRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcMatterAppointmentRecordDTO dto) { + IcMatterAppointmentRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcMatterAppointmentRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java new file mode 100644 index 0000000000..ac837eed29 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPartyServiceCenterMatterDao; +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import com.epmet.entity.IcPartyServiceCenterMatterEntity; +import com.epmet.service.IcPartyServiceCenterMatterService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartyServiceCenterMatterServiceImpl extends BaseServiceImpl implements IcPartyServiceCenterMatterService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartyServiceCenterMatterDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyServiceCenterMatterDTO.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 IcPartyServiceCenterMatterDTO get(String id) { + IcPartyServiceCenterMatterEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartyServiceCenterMatterDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyServiceCenterMatterDTO dto) { + IcPartyServiceCenterMatterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterMatterEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartyServiceCenterMatterDTO dto) { + IcPartyServiceCenterMatterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterMatterEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java new file mode 100644 index 0000000000..06978a4755 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPartyServiceCenterDao; +import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.entity.IcPartyServiceCenterEntity; +import com.epmet.service.IcPartyServiceCenterService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl implements IcPartyServiceCenterService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartyServiceCenterDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyServiceCenterDTO.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 IcPartyServiceCenterDTO get(String id) { + IcPartyServiceCenterEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartyServiceCenterDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyServiceCenterDTO dto) { + IcPartyServiceCenterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartyServiceCenterDTO dto) { + IcPartyServiceCenterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml new file mode 100644 index 0000000000..0602d34e44 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml new file mode 100644 index 0000000000..c309bcd54b --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml new file mode 100644 index 0000000000..4953af937a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 8d8a9cd94cc1e05c47fa477fe10d3c8173c63a28 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 08:30:40 +0800 Subject: [PATCH 004/170] =?UTF-8?q?dto,entity=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java | 2 +- .../entity/IcCommunitySelfOrganizationPersonnelEntity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java index 1361539bce..53c7196083 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java @@ -56,7 +56,7 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { /** * 人员电话 */ - private String personIphone; + private String personPhone; /** * diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java index 411429d430..66e4309b16 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java @@ -56,6 +56,6 @@ public class IcCommunitySelfOrganizationPersonnelEntity extends BaseEpmetEntity /** * 人员电话 */ - private String personIphone; + private String personPhone; } From 7d790f8e83591eecbc9659e43a18b0a3cd02657c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 09:40:01 +0800 Subject: [PATCH 005/170] emm --- .../AddCommunitySelfOrganizationFormDTO.java | 75 +++++++++++++++++++ .../IcCommunitySelfOrganizationConstant.java | 11 +++ ...IcCommunitySelfOrganizationController.java | 18 +++++ .../IcCommunitySelfOrganizationEntity.java | 7 +- .../IcCommunitySelfOrganizationService.java | 11 +++ ...cCommunitySelfOrganizationServiceImpl.java | 50 +++++++++++++ 6 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java new file mode 100644 index 0000000000..a0c1cb762d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -0,0 +1,75 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +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 zxc + * @DateTime 2021/11/18 5:32 下午 + * @DESC + */ +@Data +public class AddCommunitySelfOrganizationFormDTO implements Serializable { + + private static final long serialVersionUID = -4996925380900678065L; + + public interface AddCommunitySelfOrganizationForm{} + + /** + * 组织名称 + */ + @NotBlank(message = "organizationName不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String organizationName; + + /** + * 组织人数 + */ + @NotNull(message = "organizationPersonCount不能为空",groups = AddCommunitySelfOrganizationForm.class) + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + @NotBlank(message = "principalName不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String principalName; + + /** + * 负责人电话 + */ + @NotBlank(message = "principalPhone不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String principalPhone; + + /** + * 服务事项 + */ + @NotBlank(message = "serviceItem不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + private Date organizationCreatedTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String latitude; + + /** + * 社区自组织人员 + */ + private List organizationPersonnel; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java new file mode 100644 index 0000000000..ffd87124bf --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java @@ -0,0 +1,11 @@ +package com.epmet.constant; + +/** + * @Author zxc + * @DateTime 2021/11/19 8:39 上午 + * @DESC + */ +public interface IcCommunitySelfOrganizationConstant { + + String ORG_TYPE_AGENCY = "agency"; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index acab1c9611..3093b70b91 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -17,7 +17,10 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +29,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +95,18 @@ public class IcCommunitySelfOrganizationController { ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationExcel.class); } + /** + * @Description 添加社区自组织 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/19 8:33 上午 + */ + @PostMapping("addcommunityselforganization") + public Result addCommunitySelfOrganization(@LoginUser TokenDto tokenDto, @RequestBody AddCommunitySelfOrganizationFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AddCommunitySelfOrganizationFormDTO.AddCommunitySelfOrganizationForm.class); + icCommunitySelfOrganizationService.addCommunitySelfOrganization(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java index 4d3515e7ff..9e06cb48c3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -17,9 +17,12 @@ package com.epmet.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.EqualsAndHashCode; @@ -91,7 +94,9 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { /** * 社区自组织创建时间 */ - private Date organizationCreatedTime; + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date organizationCreatedTime; /** * 经度 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 353ed2e6d8..4133c7c103 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -19,7 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import java.util.List; @@ -92,4 +94,13 @@ public interface IcCommunitySelfOrganizationService extends BaseService implements IcCommunitySelfOrganizationService { + @Autowired + private IcCommunitySelfOrganizationPersonnelService personnelService; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -80,4 +95,39 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); + persons.forEach(p -> { + p.setCustomerId(customerId); + p.setOrgId(orgEntity.getId()); + }); + personnelService.insertBatch(persons); + } + } + } \ No newline at end of file From a863f7f0f4970c1dbdf0c04f3f155f90fa257fe1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 10:00:58 +0800 Subject: [PATCH 006/170] em --- .../epmet/entity/IcCommunitySelfOrganizationEntity.java | 2 -- .../impl/IcCommunitySelfOrganizationServiceImpl.java | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java index 9e06cb48c3..b66e6a0773 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -94,8 +94,6 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { /** * 社区自组织创建时间 */ - @TableField(fill = FieldFill.INSERT) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date organizationCreatedTime; /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 26f8b8d7e1..055a07533b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -27,7 +27,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.xml.crypto.Data; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; @@ -119,6 +121,13 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); From 4966fc2ef6bde490b28790fd35018afe66c1cc2a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 19 Nov 2021 10:14:22 +0800 Subject: [PATCH 007/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87CRU?= =?UTF-8?q?D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddSocietyOrgFormDTO.java | 13 ++- .../epmet/dto/form/EditSocietyOrgFormDTO.java | 92 +++++++++++++++++++ .../dto/form/GetListSocietyOrgFormDTO.java | 51 ++++++++++ .../result/GetListSocietyOrgResultDTO.java | 69 ++++++++++++++ .../controller/SocietyOrgController.java | 36 +++++++- .../java/com/epmet/dao/SocietyOrgDao.java | 12 ++- .../com/epmet/service/SocietyOrgService.java | 21 +++++ .../service/impl/SocietyOrgServiceImpl.java | 76 +++++++++++++++ .../main/resources/mapper/SocietyOrgDao.xml | 35 ++++++- 9 files changed, 397 insertions(+), 8 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java index bc0555f95b..5d80ef5c18 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java @@ -18,6 +18,7 @@ package com.epmet.dto.form; import lombok.Data; +import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -25,11 +26,9 @@ import java.util.Date; /** - * 社会组织管理 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 - */ + * @Author sun + * @Description 新增社会组织 + **/ @Data public class AddSocietyOrgFormDTO implements Serializable { @@ -50,21 +49,25 @@ public class AddSocietyOrgFormDTO implements Serializable { * 社会组织名称 */ @NotBlank(message = "社会组织名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 50, message = "社会组织名称不能超过50个字符",groups = {Add.class}) private String societyName; /** * 服务事项 */ @NotBlank(message = "服务事项不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 1000, message = "服务事项不能超过1000个字符",groups = {Add.class}) private String serviceMatters; /** * 负责人 */ @NotBlank(message = "负责人名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 20, message = "负责人名称不能超过20个字符",groups = {Add.class}) private String personInCharge; /** * 负责人电话 */ @NotBlank(message = "负责人电话不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 11, message = "负责人电话不能超过11个字符",groups = {Add.class}) private String mobile; /** * 起始服务时间 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java new file mode 100644 index 0000000000..e28bba50b5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java @@ -0,0 +1,92 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + + +/** + * @Author sun + * @Description 修改、删除社会组织 + **/ +@Data +public class EditSocietyOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 社会组织Id + */ + @NotBlank(message = "社会组织Id不能为空", groups = { Edit.class, Del.class }) + private String societyId; + /** + * 社会组织名称 + */ + @Length(max = 50, message = "社会组织名称不能超过50个字符",groups = {Edit.class}) + private String societyName; + /** + * 服务事项 + */ + @Length(max = 1000, message = "服务事项不能超过1000个字符",groups = {Edit.class}) + private String serviceMatters; + /** + * 负责人 + */ + @Length(max = 20, message = "负责人名称不能超过20个字符",groups = {Edit.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @Length(max = 11, message = "负责人电话不能超过11个字符",groups = {Edit.class}) + private String mobile; + /** + * 起始服务时间 + */ + private Date serviceStartTime; + /** + * 终止服务时间 + */ + private Date serviceEndTime; + /** + * 绑定管理员[组织下录入的工作人员] + */ + private String adminStaffId; + /** + * 地址 + */ + private String address; + /** + * 经度 + */ + private String longitude; + /** + * 维度 + */ + private String dimension; + //token中userId + private String staffId; + + public interface Edit {} + public interface Del {} + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java new file mode 100644 index 0000000000..d28f93fe7e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java @@ -0,0 +1,51 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; +import java.util.Date; + + +/** + * @Author sun + * @Description 社会组织列表查询 + **/ +@Data +public class GetListSocietyOrgFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //社会组织名称 + private String societyName; + //负责人 + private String personInCharge; + //负责人电话 + private String mobile; + //起始服务时间 + private Date serviceStartTime; + //终止服务时间 + private Date serviceEndTime; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java new file mode 100644 index 0000000000..1765350a6d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java @@ -0,0 +1,69 @@ +/** + * 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.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 社会组织列表查询 + **/ +@Data +public class GetListSocietyOrgResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + + @Data + public class SocietyOrgList{ + //所属组织Id + private String agencyId; + //社会组织Id + private String societyId; + //社会组织名称 + private String societyName; + //服务事项 + private String serviceMatters; + //负责人姓名 + private String personInCharge; + //负责人电话 + private String mobile; + //起始服务时间 + private String serviceStartTime; + //终止服务时间 + private String serviceEndTime; + //绑定管理员[组织下Id录入的工作人员] + private String adminStaffId; + //绑定管理员[组织下录入的工作人员]姓名 + private String adminStaffName; + //地址 + private String address; + //经度 + private String longitude; + //维度 + private String dimension; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java index 0eb23cde7d..7443423ece 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java @@ -22,6 +22,9 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.AddSocietyOrgFormDTO; +import com.epmet.dto.form.EditSocietyOrgFormDTO; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.service.SocietyOrgService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -39,7 +42,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("societyorg") public class SocietyOrgController { - + @Autowired private SocietyOrgService societyOrgService; @@ -56,4 +59,35 @@ public class SocietyOrgController { return new Result(); } + /** + * @Author sun + * @Description 修改社会组织 + **/ + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditSocietyOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditSocietyOrgFormDTO.Edit.class); + societyOrgService.edit(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 删除社会组织 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditSocietyOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditSocietyOrgFormDTO.Del.class); + societyOrgService.del(formDTO.getSocietyId()); + return new Result(); + } + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO) { + return new Result().ok(societyOrgService.getList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java index b46d6035d2..0c3f5cc4af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java @@ -18,9 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.entity.SocietyOrgEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 社会组织管理 * @@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface SocietyOrgDao extends BaseDao { - + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + List getList(GetListSocietyOrgFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java index 846e07777f..2acaa20c05 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java @@ -19,6 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.form.AddSocietyOrgFormDTO; +import com.epmet.dto.form.EditSocietyOrgFormDTO; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.entity.SocietyOrgEntity; /** @@ -34,4 +37,22 @@ public interface SocietyOrgService extends BaseService { * @Description 新增社会组织 **/ void add(AddSocietyOrgFormDTO dto); + + /** + * @Author sun + * @Description 修改社会组织 + **/ + void edit(EditSocietyOrgFormDTO formDTO); + + /** + * @Author sun + * @Description 删除社会组织 + **/ + void del(String societyId); + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java index 5f2c284be2..b2cb48717c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java @@ -18,17 +18,36 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.SocietyOrgDao; +import com.epmet.dto.ProjectStaffDTO; import com.epmet.dto.form.AddSocietyOrgFormDTO; +import com.epmet.dto.form.EditSocietyOrgFormDTO; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.form.UserIdsFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.StaffSinGridResultDTO; +import com.epmet.entity.ActInfoEntity; import com.epmet.entity.SocietyOrgEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.SocietyOrgService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; /** * 社会组织管理 @@ -39,6 +58,9 @@ import org.springframework.transaction.annotation.Transactional; @Service public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { private static final Logger log = LoggerFactory.getLogger(SocietyOrgServiceImpl.class); + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + /** * @Author sun @@ -53,4 +75,58 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl%s", formDTO.getSocietyId())); + } + entity = ConvertUtils.sourceToTarget(formDTO, SocietyOrgEntity.class); + baseDao.updateById(entity); + } + + /** + * @Author sun + * @Description 删除社会组织 + **/ + @Override + public void del(String societyId) { + if (baseDao.deleteById(societyId) < NumConstant.ONE) { + throw new RenException(String.format("修改社会组织信息删除失败,社会组织Id->%s", societyId)); + } + } + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + @Override + public GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO) { + GetListSocietyOrgResultDTO resultDTO = new GetListSocietyOrgResultDTO(); + //1.根据查询条件分页查询社会组织数据 + PageInfo result = + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); + if (CollectionUtils.isEmpty(result.getList())) { + return resultDTO; + } + resultDTO.setTotal((int) result.getTotal()); + //2.查询被绑定管理员信息 + UserIdsFormDTO dto = new UserIdsFormDTO(); + List staffIdList = result.getList().stream().map(GetListSocietyOrgResultDTO.SocietyOrgList::getAdminStaffId).collect(Collectors.toList()); + staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); + dto.setUserIds(staffIdList); + Result> listResult = epmetUserOpenFeignClient.getStaffInfoList(dto); + if (!listResult.success()) { + throw new RenException("获取工作人员基本信息失败......"); + } + result.getList().forEach(r -> listResult.getData().stream().filter(u -> r.getAdminStaffId().equals(u.getStaffId())).forEach(u -> r.setAdminStaffName(u.getStaffName()))); + resultDTO.setList(result.getList()); + + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml index 6583d6afc2..e2bac86f4b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml @@ -3,6 +3,39 @@ - + \ No newline at end of file From f4e872c3579aa07c90141dd68af554e7adb53699 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 19 Nov 2021 11:00:51 +0800 Subject: [PATCH 008/170] =?UTF-8?q?=E5=B1=85=E6=B0=91=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 1 + .../dto/form/demand/AddCategoryFormDTO.java | 31 ++++ .../form/demand/AddFirstCategoryFormDTO.java | 26 +++ .../form/demand/DemandDictPageFormDTO.java | 17 ++ .../epmet/dto/form/demand/StatusFormDTO.java | 20 +++ .../epmet/dto/form/demand/SubCodeFormDTO.java | 15 ++ .../epmet/dto/form/demand/UpdateFormDTO.java | 42 +++++ .../demand/UserDemandNameQueryFormDTO.java | 2 +- .../dto/result/demand/DemandPageResDTO.java | 21 +++ .../epmet/dto/result/demand/OptionDTO.java | 12 ++ .../IcResiDemandDictController.java | 121 +++++++++++--- .../com/epmet/dao/IcResiDemandDictDao.java | 22 +++ .../epmet/entity/IcResiDemandDictEntity.java | 11 +- .../service/IcResiDemandDictService.java | 51 +++--- .../impl/IcResiDemandDictServiceImpl.java | 154 +++++++++++++++--- .../resources/mapper/IcResiDemandDictDao.xml | 120 ++++++++++++++ 16 files changed, 595 insertions(+), 71 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index b57a5c8584..ac0d07f7be 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -82,6 +82,7 @@ public enum EpmetErrorCode { BUILDING_NAME_EXITED(8215,"楼栋名称已存在"), DOOR_NAME_EXITED(8216,"门牌号已存在"), NEIGHBOOR_NAME_EXITED(8217,"小区名称已存在"), + DEMAND_NAME_EXITED(8218, "分类名称已存在"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java new file mode 100644 index 0000000000..866a20bc6d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +public class AddCategoryFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "分类名称不能为空", groups = AddUserShowGroup.class) + @Length(max = 100, message = "分类名称最多输入100字", groups = AddUserShowGroup.class) + private String categoryName; + + @NotBlank(message = "请先选择一级分类", groups = AddUserShowGroup.class) + private String parentCategoryCode; + + @NotNull(message = "奖励积分不能为空", groups = AddUserShowGroup.class) + private Integer awardPoint; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java new file mode 100644 index 0000000000..b0a610d278 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class AddFirstCategoryFormDTO implements Serializable { + private static final long serialVersionUID = -9011014064624688518L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "分类名称不能为空", groups = AddUserShowGroup.class) + @Length(max = 20, message = "一级分类名称最多输入20字", groups = AddUserShowGroup.class) + private String categoryName; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java new file mode 100644 index 0000000000..3ff7d63c0b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class DemandDictPageFormDTO extends PageFormDTO implements Serializable { + public interface AddUserInternalGroup {} + + @NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class) + private String customerId; + + private String firstCategoryCode; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java new file mode 100644 index 0000000000..879d632cc7 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +public class StatusFormDTO implements Serializable { + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "categoryId不能为空", groups = AddUserInternalGroup.class) + private String categoryId; + + @NotNull(message = "usableFlag不能为空", groups = AddUserInternalGroup.class) + private Boolean usableFlag; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java new file mode 100644 index 0000000000..5fecd09258 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class SubCodeFormDTO implements Serializable { + public interface AddUserInternalGroup {} + @NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class) + private String customerId; + @NotBlank(message = "parentCategoryCode不能为空",groups = AddUserInternalGroup.class) + private String parentCategoryCode; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java new file mode 100644 index 0000000000..4929228f29 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +public class UpdateFormDTO implements Serializable { + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + public interface First extends CustomerClientShowGroup { + } + + public interface Two extends CustomerClientShowGroup { + } + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "categoryId不能为空", groups = AddUserInternalGroup.class) + private String categoryId; + + @NotNull(message = "等级不能为空", groups = AddUserInternalGroup.class) + private Integer level; + + + @NotBlank(message = "分类名称不能为空", groups = AddUserShowGroup.class) + @Length(max = 100, message = "分类名称最多输入100字", groups = First.class) + @Length(max = 20, message = "分类名称最多输入20字", groups = Two.class) + private String categoryName; + + @NotNull(message = "奖励积分不能为空", groups = Two.class) + private Integer awardPoint; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java index 3247482054..2a0141713f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java @@ -13,7 +13,7 @@ public class UserDemandNameQueryFormDTO implements Serializable { public interface AddUserInternalGroup {} - @NotBlank(message = "客户idbu不能为空",groups =AddUserInternalGroup.class) + @NotBlank(message = "客户id不能为空",groups =AddUserInternalGroup.class) private String customerId; @NotEmpty(message = "分类编码不能为空",groups =AddUserInternalGroup.class) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java new file mode 100644 index 0000000000..5b2a12c529 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result.demand; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +@Data +public class DemandPageResDTO implements Serializable { + private String customerId; + private String categoryId; + private String categoryCode; + private String parentCategoryCode; + private String categoryName; + private Integer level; + private Integer sort; + private BigDecimal awardPoint; + private Boolean usableFlag; + private List children; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java new file mode 100644 index 0000000000..c0cfd3b48d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.demand; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class OptionDTO implements Serializable { + private static final long serialVersionUID = -6722370308097497466L; + private String label; + private String value; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java index 13779cfe13..2b225c73dc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java @@ -18,23 +18,22 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.IcResiDemandDictDTO; -import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.service.IcResiDemandDictService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; -import java.util.Map; /** @@ -50,31 +49,73 @@ public class IcResiDemandDictController { @Autowired private IcResiDemandDictService icResiDemandDictService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icResiDemandDictService.page(params); - return new Result>().ok(page); + /** + * 分页列表查询 + * + * @param formDTO + * @return + */ + @PostMapping("pagelist") + public Result> page(@RequestBody DemandDictPageFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,DemandDictPageFormDTO.AddUserInternalGroup.class, PageFormDTO.AddUserInternalGroup.class); + PageData page = icResiDemandDictService.page(formDTO); + return new Result>().ok(page); } - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - IcResiDemandDictDTO data = icResiDemandDictService.get(id); - return new Result().ok(data); + /** + * 添加一级分类 + * @param formDTO + * @return + */ + @PostMapping("addfirst") + public Result addFirstCategory(@RequestBody AddFirstCategoryFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,AddFirstCategoryFormDTO.AddUserShowGroup.class,AddFirstCategoryFormDTO.AddUserInternalGroup.class); + icResiDemandDictService.addFirstCategory(formDTO); + return new Result(); } - @PostMapping - public Result save(@RequestBody IcResiDemandDictDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icResiDemandDictService.save(dto); + /** + * 新增二级分类 + * @param formDTO + * @return + */ + @PostMapping("addchild") + public Result addChild(@RequestBody AddCategoryFormDTO formDTO ){ + ValidatorUtils.validateEntity(formDTO,AddCategoryFormDTO.AddUserShowGroup.class,AddCategoryFormDTO.AddUserInternalGroup.class); + icResiDemandDictService.addChild(formDTO); return new Result(); } - @PutMapping - public Result update(@RequestBody IcResiDemandDictDTO dto){ + /** + * 修改分类 + * + * + * @param formDTO + * @return + */ + @PostMapping("update") + public Result update(@RequestBody UpdateFormDTO formDTO) { //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icResiDemandDictService.update(dto); + ValidatorUtils.validateEntity(formDTO, UpdateFormDTO.AddUserInternalGroup.class, UpdateFormDTO.AddUserShowGroup.class); + if (NumConstant.ONE == formDTO.getLevel()) { + ValidatorUtils.validateEntity(formDTO, UpdateFormDTO.First.class); + } else if (NumConstant.TWO == formDTO.getLevel()) { + ValidatorUtils.validateEntity(formDTO, UpdateFormDTO.Two.class); + } + icResiDemandDictService.update(formDTO); + return new Result(); + } + + /** + * 启用或禁用 + * + * @param formDTO + * @return + */ + @PostMapping("updatestatus") + public Result updateStatus(@RequestBody StatusFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,StatusFormDTO.AddUserInternalGroup.class); + icResiDemandDictService.updateStatus(formDTO); return new Result(); } @@ -102,4 +143,38 @@ public class IcResiDemandDictController { ValidatorUtils.validateEntity(formDTO,UserDemandNameQueryFormDTO.AddUserInternalGroup.class); return icResiDemandDictService.queryDemandNames(formDTO); } + + /** + * 居民需求查询条件:一级分类列表 0 + * 区域化党建单位:服务事项下拉框 1010 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("subcodelist") + public Result> querySubCodeList(@LoginUser TokenDto tokenDto, @RequestBody SubCodeFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,SubCodeFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icResiDemandDictService.querySubCodeList(formDTO)); + } + + + + + + + + + + + + + + + + + + + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java index 94fd335929..d58dce2d8a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java @@ -19,6 +19,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -38,4 +40,24 @@ public interface IcResiDemandDictDao extends BaseDao { List selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode); String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set codeSet); + + List selectByPCode(@Param("pcode") String pcode, @Param("customerId") String customerId); + + List pageSelect(@Param("customerId") String customerId, @Param("firstCategoryCode")String firstCategoryCode); + + List selectChild(@Param("customerId") String customerId, @Param("parentCode")String parentCode); + + int selectCountName(@Param("customerId") String customerId, + @Param("categoryName")String categoryName, + @Param("level")int level, + @Param("parentCode")String parentCode, + @Param("id")String id); + + Integer selectMaxCategoryCode(@Param("customerId") String customerId, + @Param("level") Integer level, + @Param("parentCode") String parentCode); + + Integer selectMaxSort(@Param("customerId") String customerId, + @Param("level") int level, + @Param("parentCode") String parentCode); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java index 5e01dd2b14..1b9a30b755 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java @@ -58,7 +58,7 @@ public class IcResiDemandDictEntity extends BaseEpmetEntity { /** * 级别 */ - private String level; + private Integer level; /** * 备注 @@ -70,4 +70,13 @@ public class IcResiDemandDictEntity extends BaseEpmetEntity { */ private Integer sort; + /** + * 奖励积分:只有二级分类才会配置,一级默认为0。11.17 + */ + private Integer awardPoint; + + /** + * 1可用,0不可用,11.17 + */ + private Boolean usableFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java index d41c4303ba..1df5be75af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java @@ -22,7 +22,9 @@ import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiDemandDictDTO; -import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import java.util.List; @@ -39,52 +41,46 @@ public interface IcResiDemandDictService extends BaseService * @author generator * @date 2021-10-27 */ - PageData page(Map params); + PageData page(DemandDictPageFormDTO formDTO); /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-10-27 + * 新增一级分类 + * @param formDTO */ - List list(Map params); + void addFirstCategory(AddFirstCategoryFormDTO formDTO); /** - * 单条查询 - * - * @param id - * @return IcResiDemandDictDTO - * @author generator - * @date 2021-10-27 + * 新增二级分类 + * @param formDTO */ - IcResiDemandDictDTO get(String id); + void addChild(AddCategoryFormDTO formDTO); + /** - * 默认保存 + * 默认查询 * - * @param dto - * @return void + * @param params + * @return java.util.List * @author generator * @date 2021-10-27 */ - void save(IcResiDemandDictDTO dto); + List list(Map params); + /** * 默认更新 * - * @param dto + * @param formDTO * @return void * @author generator * @date 2021-10-27 */ - void update(IcResiDemandDictDTO dto); + void update(UpdateFormDTO formDTO); /** * 批量删除 @@ -111,4 +107,13 @@ public interface IcResiDemandDictService extends BaseService queryDemandNames(UserDemandNameQueryFormDTO formDTO); + + List querySubCodeList(SubCodeFormDTO formDTO); + + /** + * 启用或禁用 + * + * @param formDTO + */ + void updateStatus(StatusFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index fb23a85fe8..fd30b41bd3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -18,18 +18,25 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcResiDemandDictDao; import com.epmet.dto.IcResiDemandDictDTO; -import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import com.epmet.service.IcResiDemandDictService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -44,18 +51,90 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-10-27 */ +@Slf4j @Service public class IcResiDemandDictServiceImpl extends BaseServiceImpl implements IcResiDemandDictService { + /** + * 分页查询 + * + * @param formDTO + * @return + */ @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, IcResiDemandDictDTO.class); + public PageData page(DemandDictPageFormDTO formDTO) { + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO.getCustomerId(),formDTO.getFirstCategoryCode())); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); } + /** + * 新增一级分类 + * @param formDTO + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void addFirstCategory(AddFirstCategoryFormDTO formDTO) { + if (checkCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), NumConstant.ONE, NumConstant.ZERO_STR,null) > NumConstant.ZERO) { + // 名称唯一 + throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); + } + + IcResiDemandDictEntity entity = new IcResiDemandDictEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setCategoryName(formDTO.getCategoryName()); + entity.setLevel(NumConstant.ONE); + entity.setParentCode(NumConstant.ZERO_STR); + entity.setAwardPoint(NumConstant.ZERO); + entity.setUsableFlag(true); + // 获取当前最大的排序号 + Integer maxSort = baseDao.selectMaxSort(formDTO.getCustomerId(), NumConstant.ONE,NumConstant.ZERO_STR); + entity.setSort(null == maxSort ? NumConstant.ZERO : maxSort + 1); + // 一级分类,直接获取最大的,然后+1 + Integer maxFirstCategoryCode = baseDao.selectMaxCategoryCode(formDTO.getCustomerId(),NumConstant.ONE,NumConstant.ZERO_STR); + entity.setCategoryCode(null == maxFirstCategoryCode ? "1001" : String.valueOf(maxFirstCategoryCode + 1)); + baseDao.insert(entity); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void addChild(AddCategoryFormDTO formDTO) { + if (checkCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), NumConstant.TWO, formDTO.getParentCategoryCode(),null) > NumConstant.ZERO) { + // 名称唯一 + throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); + } + + IcResiDemandDictEntity entity = new IcResiDemandDictEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setCategoryName(formDTO.getCategoryName()); + entity.setLevel(NumConstant.TWO); + entity.setParentCode(formDTO.getParentCategoryCode()); + entity.setAwardPoint(formDTO.getAwardPoint()); + entity.setUsableFlag(true); + // 获取当前最大的排序号 + Integer maxSort = baseDao.selectMaxSort(formDTO.getCustomerId(), NumConstant.TWO,formDTO.getParentCategoryCode()); + entity.setSort(null == maxSort ? NumConstant.ZERO : maxSort + 1); + // 二级分类,直接获取最大的,然后+1 + Integer maxCategoryCode = baseDao.selectMaxCategoryCode(formDTO.getCustomerId(),NumConstant.TWO,formDTO.getParentCategoryCode()); + entity.setCategoryCode(null == maxCategoryCode ? formDTO.getParentCategoryCode().concat("0001") : String.valueOf(maxCategoryCode + 1)); + baseDao.insert(entity); + } + + /** + * 校验名字是否存在 + * @param customerId + * @param categoryName + * @param level + * @param id + * @return + */ + public int checkCategoryName(String customerId,String categoryName,int level,String parentCategoryCode,String id){ + return baseDao.selectCountName(customerId,categoryName,level,parentCategoryCode,id); + } + + + + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); @@ -72,24 +151,26 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + // 名称唯一 + throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); + } + origin.setCategoryName(formDTO.getCategoryName()); + if (NumConstant.TWO == origin.getLevel()) { + origin.setAwardPoint(formDTO.getAwardPoint()); + } + updateById(origin); } @Override @@ -117,4 +198,31 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl().ok(baseDao.selectCategoryNames(formDTO.getCustomerId(),formDTO.getCodeSet())); } + @Override + public List querySubCodeList(SubCodeFormDTO formDTO) { + return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId()); + } + + @Override + public void updateStatus(StatusFormDTO formDTO) { + IcResiDemandDictEntity origin = baseDao.selectById(formDTO.getCategoryId()); + if (null == origin) { + log.error("category_id=" + formDTO.getCategoryId() + " 没有找到记录"); + return; + } + origin.setUsableFlag(formDTO.getUsableFlag()); + updateById(origin); + // 如果修改的是一级分类, 同步到二级 + if (NumConstant.ONE == origin.getLevel()) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(origin.getCategoryCode()), "PARENT_CODE", origin.getCategoryCode()); + List entityList = baseDao.selectList(wrapper); + for (IcResiDemandDictEntity sub : entityList) { + sub.setUsableFlag(formDTO.getUsableFlag()); + updateById(sub); + } + } + } + + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index ae0c5a1e7f..d9b7adb0ac 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -74,4 +74,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 0dddf8be6edea65860f99cf7ae182c30f2cfc480 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 11:16:20 +0800 Subject: [PATCH 009/170] =?UTF-8?q?errorCode=E6=96=87=E4=BB=B6=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index ac0d07f7be..0189e7690c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -135,6 +135,8 @@ public enum EpmetErrorCode { PATROL_REPEATED_SUBMIT_ERROR(8521, "巡查已结束,请勿重复提交"), PATROL_END_TIME_ERROR(8522, "巡查结束时间不能小于巡查开始时间"), TIME_FORMAT_ERROR(8523, "时间格式错误"), + // 社区自组织 + COMMUNITY_SELF_ORGANIZATION_REPART_ERROR(8524, "社区自组织名称已存在"), // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), From b345fa58a7801660eae442bb6306aed340020507 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 13:42:24 +0800 Subject: [PATCH 010/170] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EditCommunitySelfOrganizationFormDTO.java | 83 +++++++++++++++++++ ...IcCommunitySelfOrganizationController.java | 15 ++++ .../dao/IcCommunitySelfOrganizationDao.java | 5 +- ...CommunitySelfOrganizationPersonnelDao.java | 11 ++- ...unitySelfOrganizationPersonnelService.java | 8 ++ .../IcCommunitySelfOrganizationService.java | 10 +++ ...ySelfOrganizationPersonnelServiceImpl.java | 11 +++ ...cCommunitySelfOrganizationServiceImpl.java | 49 +++++++++++ .../mapper/IcCommunitySelfOrganizationDao.xml | 15 ++++ ...cCommunitySelfOrganizationPersonnelDao.xml | 4 + 10 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java new file mode 100644 index 0000000000..588843ba92 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java @@ -0,0 +1,83 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +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 zxc + * @DateTime 2021/11/18 5:32 下午 + * @DESC + */ +@Data +public class EditCommunitySelfOrganizationFormDTO implements Serializable { + + private static final long serialVersionUID = -4990925380900678065L; + + public interface EditCommunitySelfOrganizationForm{} + + /** + * 组织名称 + */ + @NotBlank(message = "organizationName不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String organizationName; + + /** + * 组织人数 + */ + @NotNull(message = "organizationPersonCount不能为空",groups = EditCommunitySelfOrganizationForm.class) + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + @NotBlank(message = "principalName不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String principalName; + + /** + * 负责人电话 + */ + @NotBlank(message = "principalPhone不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String principalPhone; + + /** + * 服务事项 + */ + @NotBlank(message = "serviceItem不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + @NotNull(message = "organizationCreatedTime不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String organizationCreatedTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String latitude; + + /** + * 社区自组织ID + */ + @NotBlank(message = "orgId不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String orgId; + + /** + * 社区自组织人员 + */ + private List organizationPersonnel; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 3093b70b91..c80950e2e0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; @@ -109,4 +110,18 @@ public class IcCommunitySelfOrganizationController { return new Result(); } + /** + * @Description 修改社区自组织 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/19 10:12 上午 + */ + @PostMapping("editcommunityselforganization") + public Result editCommunitySelfOrganization(@LoginUser TokenDto tokenDto, @RequestBody EditCommunitySelfOrganizationFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, EditCommunitySelfOrganizationFormDTO.EditCommunitySelfOrganizationForm.class); + icCommunitySelfOrganizationService.editCommunitySelfOrganization(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index c046cfe956..e1c0e16689 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import org.apache.ibatis.annotations.Mapper; @@ -29,5 +30,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcCommunitySelfOrganizationDao extends BaseDao { - + + void updateCommunitySelfOrganization(IcCommunitySelfOrganizationEntity formDTO); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java index 45a233840c..4bd2fde9f4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 社区自组织人员表 @@ -29,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcCommunitySelfOrganizationPersonnelDao extends BaseDao { - + + /** + * @Description 根据社区自组织ID删除 + * @param orgId + * @author zxc + * @date 2021/11/19 11:19 上午 + */ + void deleteByOrgId(@Param("orgId")String orgId); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java index c8265ba859..32d04687af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java @@ -92,4 +92,12 @@ public interface IcCommunitySelfOrganizationPersonnelService extends BaseService * @date 2021-11-18 */ void delete(String[] ids); + + /** + * @Description 根据社区自组织ID删除 + * @param orgId + * @author zxc + * @date 2021/11/19 11:18 上午 + */ + void deleteByOrgId(String orgId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 4133c7c103..530dbe671a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import java.util.List; @@ -103,4 +104,13 @@ public interface IcCommunitySelfOrganizationService extends BaseService l = new LambdaQueryWrapper<>(); + l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) + .eq(IcCommunitySelfOrganizationEntity::getCustomerId,customerId) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO); + IcCommunitySelfOrganizationEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_REPART_ERROR.getCode()); + } CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); if (null == staffInfo){ throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); @@ -139,4 +155,37 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); + l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) + .eq(IcCommunitySelfOrganizationEntity::getCustomerId,tokenDto.getCustomerId()) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO) + .ne(BaseEpmetEntity::getId,formDTO.getOrgId()); + IcCommunitySelfOrganizationEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_REPART_ERROR.getCode()); + } + IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(formDTO, IcCommunitySelfOrganizationEntity.class); + e.setOrganizationCreatedTime(DateUtils.stringToDate(formDTO.getOrganizationCreatedTime(),DATE_PATTERN)); + e.setUpdatedBy(tokenDto.getUserId()); + baseDao.updateCommunitySelfOrganization(e); + personnelService.deleteByOrgId(formDTO.getOrgId()); + if (CollectionUtils.isNotEmpty(formDTO.getOrganizationPersonnel())){ + List persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); + persons.forEach(p -> { + p.setOrgId(formDTO.getOrgId()); + p.setCustomerId(tokenDto.getCustomerId()); + }); + personnelService.insertBatch(persons); + } + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 12c22d2fa6..b7176f6859 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -3,4 +3,19 @@ + + UPDATE ic_community_self_organization + SET ORGANIZATION_NAME = #{organizationName}, + ORGANIZATION_PERSON_COUNT = #{organizationPersonCount}, + PRINCIPAL_NAME = #{principalName}, + PRINCIPAL_PHONE = #{principalPhone}, + SERVICE_ITEM = #{serviceItem}, + LONGITUDE = #{longitude}, + LATITUDE = #{latitude}, + ORGANIZATION_CREATED_TIME = #{organizationCreatedTime}, + UPDATED_TIME = NOW(), + UPDATED_BY = #{updatedBy} + WHERE DEL_FLAG = 0 + AND ID = #{orgId} + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml index 91cf453a04..40758ceeda 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml @@ -3,4 +3,8 @@ + + + DELETE FROM ic_community_self_organization_personnel WHERE ORG_ID = #{orgId} + \ No newline at end of file From 598561118315314b38f50b6b04319e3051868742 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 19 Nov 2021 13:54:21 +0800 Subject: [PATCH 011/170] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E4=B8=8B=E7=BB=84=E7=BB=87CRUD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/GetListSocietyOrgFormDTO.java | 2 + .../controller/SocietyOrgController.java | 1 + .../service/impl/SocietyOrgServiceImpl.java | 4 +- .../main/resources/mapper/SocietyOrgDao.xml | 8 +- .../epmet/dto/form/AddPlaceOrgFormDTO.java | 95 +++++++++++ .../epmet/dto/form/EditPlaceOrgFormDTO.java | 84 ++++++++++ .../dto/form/GetListPlaceOrgFormDTO.java | 56 +++++++ .../dto/result/GetListPlaceOrgResultDTO.java | 43 +++++ .../dto/result/PlaceOrgDetailResultDTO.java | 35 ++++ epmet-module/gov-org/gov-org-server/pom.xml | 6 + .../epmet/controller/PlaceOrgController.java | 98 +++++++----- .../main/java/com/epmet/dao/PlaceOrgDao.java | 12 +- .../com/epmet/service/PlaceOrgService.java | 80 +++------- .../service/impl/PlaceOrgServiceImpl.java | 151 ++++++++++++------ .../src/main/resources/mapper/PlaceOrgDao.xml | 40 ++++- 15 files changed, 561 insertions(+), 154 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlaceOrgFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlaceOrgFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java index d28f93fe7e..48272aa6a6 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java @@ -47,5 +47,7 @@ public class GetListSocietyOrgFormDTO implements Serializable { private Integer pageNo; //每页多少条 private Integer pageSize = 20; + //token中客户Id + private String customerId; } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java index 7443423ece..560e0bd76f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java @@ -87,6 +87,7 @@ public class SocietyOrgController { **/ @PostMapping("getlist") public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(societyOrgService.getList(formDTO)); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java index b2cb48717c..3b91521309 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java @@ -25,14 +25,12 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.SocietyOrgDao; -import com.epmet.dto.ProjectStaffDTO; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.form.UserIdsFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.dto.result.StaffSinGridResultDTO; -import com.epmet.entity.ActInfoEntity; import com.epmet.entity.SocietyOrgEntity; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.SocietyOrgService; @@ -45,7 +43,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -71,6 +68,7 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl + AND a.customer_id = #{customerId} + - AND society_name LIKE #{societyName} + AND society_name LIKE CONCAT('%', #{societyName}, '%') - AND person_in_charge LIKE #{personInCharge} + AND person_in_charge LIKE CONCAT('%', #{personInCharge}, '%') AND mobile = #{mobile} @@ -36,6 +39,7 @@ AND date_id #{serviceEndTime} + ORDER BY created_time DESC \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlaceOrgFormDTO.java new file mode 100644 index 0000000000..a3d56416c0 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlaceOrgFormDTO.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 新增九小场所下组织 + **/ +@Data +public class AddPlaceOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 客户Id + */ + private String customerId; + /** + * 组织Id + */ + private String agencyId; + /** + * agency_id的所有上级 + */ + private String pids; + /** + * 网格Id【场所区域】 + */ + @NotBlank(message = "场所区域不能为空", groups = {Add.class}) + private String gridId; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + @NotBlank(message = "场所类型不能为空", groups = {Add.class}) + private String ninePlaceVal; + /** + * 场所名称 + */ + @NotBlank(message = "场所名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "场所名称不能超过20个字符", groups = {Add.class}) + private String placeOrgName; + /** + * 场所地址 + */ + @NotBlank(message = "场所地址不能为空", groups = {Add.class}) + @Length(max = 100, message = "场所地址不能超过100个字符", groups = {Add.class}) + private String address; + /** + * 字典value,场所规模【0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + */ + @NotBlank(message = "场所规模不能为空", groups = {Add.class}) + private String scale; + /** + * 场所负责人 + */ + @NotBlank(message = "负责人名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Add.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @NotBlank(message = "负责人电话不能为空", groups = {Add.class}) + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {Add.class}) + private String mobile; + /** + * 备注 + */ + private String remarks; + //token中userId + private String staffId; + + public interface Add { } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlaceOrgFormDTO.java new file mode 100644 index 0000000000..d4863f9cb9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlaceOrgFormDTO.java @@ -0,0 +1,84 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 修改、删除九小场所下组织 + **/ +@Data +public class EditPlaceOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 场所Id + */ + @NotBlank(message = "场所Id不能为空", groups = {Edit.class, Del.class, Detail.class}) + private String placeOrgId; + /** + * 网格Id【场所区域】 + */ + private String gridId; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVal; + /** + * 场所名称 + */ + @Length(max = 20, message = "场所名称不能超过20个字符", groups = {Edit.class}) + private String placeOrgName; + /** + * 场所地址 + */ + @Length(max = 100, message = "场所地址不能超过100个字符", groups = {Edit.class}) + private String address; + /** + * 字典value,场所规模【0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + */ + private String scale; + /** + * 场所负责人 + */ + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Edit.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {Edit.class}) + private String mobile; + /** + * 备注 + */ + private String remarks; + + public interface Edit { } + + public interface Del { } + + public interface Detail { } + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java new file mode 100644 index 0000000000..b9db9d065e --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java @@ -0,0 +1,56 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ +@Data +public class GetListPlaceOrgFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //场所名称 + private String placeOrgName; + //联系电话 + private String mobile; + //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + private String scale; + //场所区域【网格Id】 + private String gridId; + //场所类型【九小场所Value值】 + private String ninePlacsVal; + //是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 + private Boolean isPage = true; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + //token中客户Id + private String customerId; + //场所Id + private String placeOrgId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java new file mode 100644 index 0000000000..963a972543 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ +@Data +public class GetListPlaceOrgResultDTO implements Serializable { + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + + @Data + public class PlaceOrgList { + //场所Id + private String placeOrgId; + //场所名称 + private String placeOrgName; + //场所区域Id + private String gridId; + //场所区域名称 + private String gridName; + //场所地址 + private String address; + //场所类型名称[九小场所Value值] + private String ninePlaceVal; + //场所类型名称[九小场所名称] + private String ninePlaceName; + //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + private String scale; + //负责人 + private String personInCharge; + //联系电话 + private String mobile; + } + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java new file mode 100644 index 0000000000..211c74097f --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ +@Data +public class PlaceOrgDetailResultDTO implements Serializable { + //场所Id + private String placeOrgId; + //场所名称 + private String placeOrgName; + //场所区域Id + private String gridId; + //场所区域名称 + private String gridName; + //场所地址 + private String address; + //场所类型名称[九小场所Value值] + private String ninePlaceVal; + //场所类型名称[九小场所名称] + private String ninePlaceName; + //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + private String scale; + //负责人 + private String personInCharge; + //联系电话 + private String mobile; + +} diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 5b9c7fbf37..7b2a84d8dd 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -119,6 +119,12 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + compile + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java index 77fc0c7fc9..dce1acdc07 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java @@ -17,23 +17,21 @@ package com.epmet.controller; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.PlaceOrgDTO; -import com.epmet.excel.PlaceOrgExcel; +import com.epmet.dto.form.AddPlaceOrgFormDTO; +import com.epmet.dto.form.EditPlaceOrgFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; import com.epmet.service.PlaceOrgService; 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; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** @@ -49,46 +47,60 @@ public class PlaceOrgController { @Autowired private PlaceOrgService placeOrgService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = placeOrgService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - PlaceOrgDTO data = placeOrgService.get(id); - return new Result().ok(data); + /** + * @Author sun + * @Description 新增九小场所下组织 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddPlaceOrgFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setStaffId(tokenDto.getUserId()); + placeOrgService.add(formDTO); + return new Result(); } - @PostMapping - public Result save(@RequestBody PlaceOrgDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - placeOrgService.save(dto); + /** + * @Author sun + * @Description 修改九小场所下组织 + **/ + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlaceOrgFormDTO.Edit.class); + placeOrgService.edit(formDTO); return new Result(); } - @PutMapping - public Result update(@RequestBody PlaceOrgDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - placeOrgService.update(dto); + /** + * @Author sun + * @Description 删除九小场所下组织 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlaceOrgFormDTO.Del.class); + placeOrgService.del(formDTO.getPlaceOrgId()); return new Result(); } - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - placeOrgService.delete(ids); - return new Result(); + /** + * @Author sun + * @Description 九小场所下组织详情 + **/ + @PostMapping("detail") + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EditPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlaceOrgFormDTO.Detail.class); + return new Result().ok(placeOrgService.detail(formDTO.getPlaceOrgId())); } - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = placeOrgService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, PlaceOrgExcel.class); + /** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlaceOrgFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result().ok(placeOrgService.getList(formDTO)); } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java index d25d485262..c379dde695 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java @@ -18,9 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; import com.epmet.entity.PlaceOrgEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 九小场所下组织管理 * @@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface PlaceOrgDao extends BaseDao { - + + /** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ + List getList(GetListPlaceOrgFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java index ba728dcca2..733ef7db48 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java @@ -18,13 +18,13 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.PlaceOrgDTO; +import com.epmet.dto.form.AddPlaceOrgFormDTO; +import com.epmet.dto.form.EditPlaceOrgFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; import com.epmet.entity.PlaceOrgEntity; -import java.util.List; -import java.util.Map; - /** * 九小场所下组织管理 * @@ -34,62 +34,32 @@ import java.util.Map; public interface PlaceOrgService extends BaseService { /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-11-18 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-11-18 - */ - List list(Map params); + * @Author sun + * @Description 新增九小场所下组织 + **/ + void add(AddPlaceOrgFormDTO formDTO); /** - * 单条查询 - * - * @param id - * @return PlaceOrgDTO - * @author generator - * @date 2021-11-18 - */ - PlaceOrgDTO get(String id); + * @Author sun + * @Description 修改九小场所下组织 + **/ + void edit(EditPlaceOrgFormDTO formDTO); /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void save(PlaceOrgDTO dto); + * @Author sun + * @Description 删除九小场所下组织 + **/ + void del(String placeOrgId); /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void update(PlaceOrgDTO dto); + * @Author sun + * @Description 九小场所下组织详情 + **/ + PlaceOrgDetailResultDTO detail(String placeOrgId); /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-11-18 - */ - void delete(String[] ids); + * @Author sun + * @Description 九小场所下组织列表查询 + **/ + GetListPlaceOrgResultDTO getList(GetListPlaceOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java index a6be788df8..927e5845f1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java @@ -17,23 +17,36 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.PlaceOrgDao; -import com.epmet.dto.PlaceOrgDTO; +import com.epmet.dto.form.AddPlaceOrgFormDTO; +import com.epmet.dto.form.EditPlaceOrgFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.form.UserIdsFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; +import com.epmet.dto.result.StaffSinGridResultDTO; import com.epmet.entity.PlaceOrgEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.PlaceOrgService; -import org.apache.commons.lang3.StringUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; -import java.util.Arrays; import java.util.List; -import java.util.Map; +import java.util.stream.Collectors; /** * 九小场所下组织管理 @@ -43,58 +56,98 @@ import java.util.Map; */ @Service public class PlaceOrgServiceImpl extends BaseServiceImpl implements PlaceOrgService { - - + private static final Logger log = LoggerFactory.getLogger(PlaceOrgServiceImpl.class); + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + + /** + * @Author sun + * @Description 新增九小场所下组织 + **/ @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, PlaceOrgDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, PlaceOrgDTO.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; + public void add(AddPlaceOrgFormDTO formDTO) { + PlaceOrgEntity entity = ConvertUtils.sourceToTarget(formDTO, PlaceOrgEntity.class); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + entity.setAgencyId(staffInfoCache.getAgencyId()); + entity.setPids(staffInfoCache.getAgencyPIds()); + insert(entity); } + /** + * @Author sun + * @Description 修改九小场所下组织 + **/ @Override - public PlaceOrgDTO get(String id) { - PlaceOrgEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, PlaceOrgDTO.class); + public void edit(EditPlaceOrgFormDTO formDTO) { + PlaceOrgEntity entity = baseDao.selectById(formDTO.getPlaceOrgId()); + if (null == entity) { + throw new RenException(String.format("修改九小场所下组织信息失败,场所信息不存在,场所Id->%s", formDTO.getPlaceOrgId())); + } + entity = ConvertUtils.sourceToTarget(formDTO, PlaceOrgEntity.class); + baseDao.updateById(entity); } + /** + * @Author sun + * @Description 删除九小场所下组织 + **/ @Override - @Transactional(rollbackFor = Exception.class) - public void save(PlaceOrgDTO dto) { - PlaceOrgEntity entity = ConvertUtils.sourceToTarget(dto, PlaceOrgEntity.class); - insert(entity); + public void del(String placeOrgId) { + if (baseDao.deleteById(placeOrgId) < NumConstant.ONE) { + throw new RenException(String.format("修改九小场所下组织信息删除失败,场所Id->%s", placeOrgId)); + } } + /** + * @Author sun + * @Description 九小场所下组织详情 + **/ @Override - @Transactional(rollbackFor = Exception.class) - public void update(PlaceOrgDTO dto) { - PlaceOrgEntity entity = ConvertUtils.sourceToTarget(dto, PlaceOrgEntity.class); - updateById(entity); + public PlaceOrgDetailResultDTO detail(String placeOrgId) { + PlaceOrgDetailResultDTO resultDTO = new PlaceOrgDetailResultDTO(); + //1.查询场所基础信息 + GetListPlaceOrgFormDTO dto = new GetListPlaceOrgFormDTO(); + dto.setPlaceOrgId(placeOrgId); + List result = baseDao.getList(dto); + if (CollectionUtils.isEmpty(result)) { + return resultDTO; + } + resultDTO = ConvertUtils.sourceToTarget(result.get(0), PlaceOrgDetailResultDTO.class); + //2.查询九小场所信息 + Result> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!result1.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + for (OptionResultDTO d : result1.getData()) { + if (d.getValue().equals(resultDTO.getNinePlaceVal())) { + resultDTO.setNinePlaceName(d.getLabel()); + } + } + return resultDTO; } + /** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); + public GetListPlaceOrgResultDTO getList(GetListPlaceOrgFormDTO formDTO) { + GetListPlaceOrgResultDTO resultDTO = new GetListPlaceOrgResultDTO(); + //1.根据查询条件分页查询场所数据 + PageInfo result = + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); + if (CollectionUtils.isEmpty(result.getList())) { + return resultDTO; + } + resultDTO.setTotal((int) result.getTotal()); + //2.查询九小场所信息 + Result> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!result1.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + result.getList().forEach(r -> result1.getData().stream().filter(u -> r.getNinePlaceVal().equals(u.getValue())).forEach(u -> r.setNinePlaceName(u.getLabel()))); + resultDTO.setList(result.getList()); + + return resultDTO; } - } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml index 3fb8247c8b..596106bf0c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml @@ -3,6 +3,44 @@ - + \ No newline at end of file From b4a37d272825f8fa7d1409d74cebaa705e383c84 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 19 Nov 2021 14:11:33 +0800 Subject: [PATCH 012/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E8=A1=A8=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{SocietyOrgDTO.java => IcSocietyOrgDTO.java} | 2 +- ...ntroller.java => IcSocietyOrgController.java} | 6 +++--- .../{SocietyOrgDao.java => IcSocietyOrgDao.java} | 4 ++-- ...etyOrgEntity.java => IcSocietyOrgEntity.java} | 2 +- ...cietyOrgExcel.java => IcSocietyOrgExcel.java} | 2 +- ...yOrgService.java => IcSocietyOrgService.java} | 4 ++-- ...iceImpl.java => IcSocietyOrgServiceImpl.java} | 16 ++++++++-------- .../{SocietyOrgDao.xml => IcSocietyOrgDao.xml} | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) rename epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/{SocietyOrgDTO.java => IcSocietyOrgDTO.java} (97%) rename epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/{SocietyOrgController.java => IcSocietyOrgController.java} (95%) rename epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/{SocietyOrgDao.java => IcSocietyOrgDao.java} (91%) rename epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/{SocietyOrgEntity.java => IcSocietyOrgEntity.java} (97%) rename epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/{SocietyOrgExcel.java => IcSocietyOrgExcel.java} (98%) rename epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/{SocietyOrgService.java => IcSocietyOrgService.java} (92%) rename epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/{SocietyOrgServiceImpl.java => IcSocietyOrgServiceImpl.java} (88%) rename epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/{SocietyOrgDao.xml => IcSocietyOrgDao.xml} (94%) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java similarity index 97% rename from epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java rename to epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java index 3c7a60b93c..36ffcbe8a0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class SocietyOrgDTO implements Serializable { +public class IcSocietyOrgDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java similarity index 95% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index 560e0bd76f..193e7ea4ed 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -25,7 +25,7 @@ import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; -import com.epmet.service.SocietyOrgService; +import com.epmet.service.IcSocietyOrgService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -41,10 +41,10 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("societyorg") -public class SocietyOrgController { +public class IcSocietyOrgController { @Autowired - private SocietyOrgService societyOrgService; + private IcSocietyOrgService societyOrgService; /** * @Author sun diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java similarity index 91% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java index 0c3f5cc4af..8008efafeb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java @@ -20,7 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; -import com.epmet.entity.SocietyOrgEntity; +import com.epmet.entity.IcSocietyOrgEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -32,7 +32,7 @@ import java.util.List; * @since v1.0.0 2021-11-18 */ @Mapper -public interface SocietyOrgDao extends BaseDao { +public interface IcSocietyOrgDao extends BaseDao { /** * @Author sun diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java similarity index 97% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java index 9c0d086929..e1abf636fe 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java @@ -34,7 +34,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("society_org") -public class SocietyOrgEntity extends BaseEpmetEntity { +public class IcSocietyOrgEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java similarity index 98% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java index af8ddbe4c1..4d9089fa35 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class SocietyOrgExcel { +public class IcSocietyOrgExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java similarity index 92% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java index 2acaa20c05..3890130256 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java @@ -22,7 +22,7 @@ import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; -import com.epmet.entity.SocietyOrgEntity; +import com.epmet.entity.IcSocietyOrgEntity; /** * 社会组织管理 @@ -30,7 +30,7 @@ import com.epmet.entity.SocietyOrgEntity; * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ -public interface SocietyOrgService extends BaseService { +public interface IcSocietyOrgService extends BaseService { /** * @Author sun diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java similarity index 88% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 3b91521309..b1e6ca4cf2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -24,16 +24,16 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dao.SocietyOrgDao; +import com.epmet.dao.IcSocietyOrgDao; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.form.UserIdsFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.dto.result.StaffSinGridResultDTO; -import com.epmet.entity.SocietyOrgEntity; +import com.epmet.entity.IcSocietyOrgEntity; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.service.SocietyOrgService; +import com.epmet.service.IcSocietyOrgService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.slf4j.Logger; @@ -53,8 +53,8 @@ import java.util.stream.Collectors; * @since v1.0.0 2021-11-18 */ @Service -public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { - private static final Logger log = LoggerFactory.getLogger(SocietyOrgServiceImpl.class); +public class IcSocietyOrgServiceImpl extends BaseServiceImpl implements IcSocietyOrgService { + private static final Logger log = LoggerFactory.getLogger(IcSocietyOrgServiceImpl.class); @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @@ -66,7 +66,7 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl%s", formDTO.getSocietyId())); } - entity = ConvertUtils.sourceToTarget(formDTO, SocietyOrgEntity.class); + entity = ConvertUtils.sourceToTarget(formDTO, IcSocietyOrgEntity.class); baseDao.updateById(entity); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml similarity index 94% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml rename to epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index e5331b725e..42adc123a2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -1,7 +1,7 @@ - + SELECT - USER_ID + distinct USER_ID FROM volunteer_info WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} + order by CREATED_TIME asc From ef81e99389de67b22cb5e5f4f7c3e8c20764c1c8 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 19 Nov 2021 14:36:00 +0800 Subject: [PATCH 014/170] =?UTF-8?q?=E5=85=9A=E5=91=98=E9=A3=8E=E9=87=87?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partymember/IcPartymemberStyleDTO.java | 102 ++++++++++++ .../IcPartymemberStyleImageDTO.java | 91 ++++++++++ .../form/PartyMemberStyleFormDTO.java | 23 +++ .../IcPartymemberStyleController.java | 103 ++++++++++++ .../IcPartymemberStyleImageController.java | 94 +++++++++++ .../dao/IcPartymemberStyleDao.java | 33 ++++ .../dao/IcPartymemberStyleImageDao.java | 33 ++++ .../entity/IcPartymemberStyleEntity.java | 63 +++++++ .../entity/IcPartymemberStyleImageEntity.java | 103 ++++++++++++ .../excel/IcPartymemberStyleExcel.java | 43 +++++ .../excel/IcPartymemberStyleImageExcel.java | 68 ++++++++ .../IcPartymemberStyleImageService.java | 113 +++++++++++++ .../service/IcPartymemberStyleService.java | 95 +++++++++++ .../IcPartymemberStyleImageServiceImpl.java | 137 +++++++++++++++ .../impl/IcPartymemberStyleServiceImpl.java | 156 ++++++++++++++++++ .../partymember/IcPartymemberStyleDao.xml | 22 +++ .../IcPartymemberStyleImageDao.xml | 21 +++ 17 files changed, 1300 insertions(+) create mode 100644 epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleDTO.java create mode 100644 epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleImageDTO.java create mode 100644 epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleImageController.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleDao.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleImageDao.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleEntity.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleImageEntity.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleExcel.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleImageExcel.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleImageService.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleImageServiceImpl.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleDao.xml create mode 100644 epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleImageDao.xml diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleDTO.java new file mode 100644 index 0000000000..1bfdc10d0b --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleDTO.java @@ -0,0 +1,102 @@ +/** + * 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.epmet.resi.partymember.dto.partymember; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartymemberStyleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 楼栋主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + private String gridName; + + /** + * 党员姓名 + */ + private String name; + + /** + * 主要事迹 + */ + private String mainDeed; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + private List imageList; + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleImageDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleImageDTO.java new file mode 100644 index 0000000000..0a39e3dc8e --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleImageDTO.java @@ -0,0 +1,91 @@ +/** + * 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.epmet.resi.partymember.dto.partymember; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartymemberStyleImageDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 党员风采ID + */ + private String styleId; + + /** + * 图片地址 + */ + private String imageUrl; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java new file mode 100644 index 0000000000..5b80fc1642 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/11/19 9:49 + */ +@NoArgsConstructor +@Data +public class PartyMemberStyleFormDTO implements Serializable { + private static final long serialVersionUID = 4743261460276449408L; + private String agencyId; + private String gridId; + private String name; + private String mainDeed; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java new file mode 100644 index 0000000000..4e11bc658d --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java @@ -0,0 +1,103 @@ +/** + * 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.epmet.modules.partymember.controller; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.modules.partymember.excel.IcPartymemberStyleExcel; +import com.epmet.modules.partymember.service.IcPartymemberStyleService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; +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; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icpartymemberstyle") +public class IcPartymemberStyleController { + + @Autowired + private IcPartymemberStyleService icPartymemberStyleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartymemberStyleService.page(params); + return new Result>().ok(page); + } + + @PostMapping("detail") + public Result get(@RequestBody IcPartymemberStyleDTO dto){ + IcPartymemberStyleDTO data = icPartymemberStyleService.get(dto.getId()); + return new Result().ok(data); + } + + @PostMapping("save") + public Result save(@RequestBody IcPartymemberStyleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartymemberStyleService.save(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody IcPartymemberStyleDTO dto){ + //效验数据 + icPartymemberStyleService.delete(dto.getId()); + return new Result(); + } + + @PostMapping("export") + public void export(@RequestBody PartyMemberStyleFormDTO formDTO, HttpServletResponse response) throws Exception { + List list = icPartymemberStyleService.search(formDTO).getList(); + AtomicInteger i = new AtomicInteger(NumConstant.ONE); + List result = list.stream().map(item -> { + IcPartymemberStyleExcel excel = new IcPartymemberStyleExcel(); + excel.setIndex(i.getAndIncrement()); + excel.setGridName(item.getGridName()); + excel.setName(item.getName()); + excel.setMainDeed(item.getMainDeed()); + return excel; + }).collect(Collectors.toList()); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartymemberStyleExcel.class); + } + + @PostMapping("list") + public Result> search(@RequestBody PartyMemberStyleFormDTO formDTO) { + return new Result>().ok(icPartymemberStyleService.search(formDTO)); + } + + + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleImageController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleImageController.java new file mode 100644 index 0000000000..cddd24d894 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleImageController.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.epmet.modules.partymember.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.partymember.excel.IcPartymemberStyleImageExcel; +import com.epmet.modules.partymember.service.IcPartymemberStyleImageService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleImageDTO; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icpartymemberstyleimage") +public class IcPartymemberStyleImageController { + + @Autowired + private IcPartymemberStyleImageService icPartymemberStyleImageService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartymemberStyleImageService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcPartymemberStyleImageDTO data = icPartymemberStyleImageService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcPartymemberStyleImageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartymemberStyleImageService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcPartymemberStyleImageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPartymemberStyleImageService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPartymemberStyleImageService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartymemberStyleImageService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartymemberStyleImageExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleDao.java new file mode 100644 index 0000000000..de5966a068 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleDao.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.epmet.modules.partymember.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPartymemberStyleDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleImageDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleImageDao.java new file mode 100644 index 0000000000..34a43a8bfc --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleImageDao.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.epmet.modules.partymember.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPartymemberStyleImageDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleEntity.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleEntity.java new file mode 100644 index 0000000000..ad3e4afe9e --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleEntity.java @@ -0,0 +1,63 @@ +/** + * 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.epmet.modules.partymember.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_partymember_style") +public class IcPartymemberStyleEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 党员姓名 + */ + private String name; + + /** + * 主要事迹 + */ + private String mainDeed; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleImageEntity.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleImageEntity.java new file mode 100644 index 0000000000..1da117a7b2 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleImageEntity.java @@ -0,0 +1,103 @@ +/** + * 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.epmet.modules.partymember.entity; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_partymember_style_image") +public class IcPartymemberStyleImageEntity { + + private static final long serialVersionUID = 1L; + /** + * id + */ + @TableId(type = IdType.UUID) + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 党员风采ID + */ + private String styleId; + + /** + * 图片地址 + */ + private String imageUrl; + + /** + * 排序 + */ + private Integer sort; + + /** + * 乐观锁 + */ + @TableField(fill = FieldFill.INSERT) + private Integer revision; + + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT) + private String createdBy; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdTime; + + /** + * 修改者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private String updatedBy; + + /** + * 修改时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updatedTime; + + /** + * 是否已删除(0-未删除,1-已删除) + */ + @TableField(fill = FieldFill.INSERT) + private String delFlag; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleExcel.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleExcel.java new file mode 100644 index 0000000000..a64decdd9c --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleExcel.java @@ -0,0 +1,43 @@ +/** + * 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.epmet.modules.partymember.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartymemberStyleExcel { + + @Excel(name = "序号") + private Integer index; + + @Excel(name = "党员姓名") + private String name; + + @Excel(name = "所属网格") + private String gridName; + + @Excel(name = "主要事迹") + private String mainDeed; +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleImageExcel.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleImageExcel.java new file mode 100644 index 0000000000..6b97049997 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleImageExcel.java @@ -0,0 +1,68 @@ +/** + * 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.epmet.modules.partymember.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartymemberStyleImageExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "党员风采ID") + private String styleId; + + @Excel(name = "图片地址") + private String imageUrl; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleImageService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleImageService.java new file mode 100644 index 0000000000..43e101ed26 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleImageService.java @@ -0,0 +1,113 @@ +/** + * 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.epmet.modules.partymember.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleImageDTO; + +import java.util.List; +import java.util.Map; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPartymemberStyleImageService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartymemberStyleImageDTO + * @author generator + * @date 2021-11-18 + */ + IcPartymemberStyleImageDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcPartymemberStyleImageDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcPartymemberStyleImageDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); + + /** + * 删除党员风采图片 + * @Param styleId + * @Return + * @Author zhaoqifeng + * @Date 2021/11/19 10:14 + */ + void deleteByStyleId(String styleId); + + /** + * 获取党员风采图片 + * @Param styleId + * @Return {@link List< String>} + * @Author zhaoqifeng + * @Date 2021/11/19 10:40 + */ + List getByStyleId(String styleId); +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java new file mode 100644 index 0000000000..ca58a11dc8 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.modules.partymember.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; + +import java.util.List; +import java.util.Map; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPartymemberStyleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartymemberStyleDTO + * @author generator + * @date 2021-11-18 + */ + IcPartymemberStyleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcPartymemberStyleDTO dto); + + /** + * 删除 + * + * @param id + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String id); + + /** + * 查询列表 + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2021/11/19 9:30 + */ + PageData search(PartyMemberStyleFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleImageServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleImageServiceImpl.java new file mode 100644 index 0000000000..8f0d323673 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleImageServiceImpl.java @@ -0,0 +1,137 @@ +/** + * 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.epmet.modules.partymember.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.modules.partymember.dao.IcPartymemberStyleImageDao; +import com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import com.epmet.modules.partymember.service.IcPartymemberStyleImageService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleImageDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartymemberStyleImageServiceImpl extends BaseServiceImpl implements IcPartymemberStyleImageService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartymemberStyleImageDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartymemberStyleImageDTO.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 IcPartymemberStyleImageDTO get(String id) { + IcPartymemberStyleImageEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartymemberStyleImageDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartymemberStyleImageDTO dto) { + IcPartymemberStyleImageEntity entity = ConvertUtils.sourceToTarget(dto, IcPartymemberStyleImageEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartymemberStyleImageDTO dto) { + IcPartymemberStyleImageEntity entity = ConvertUtils.sourceToTarget(dto, IcPartymemberStyleImageEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 删除党员风采图片 + * + * @param styleId + * @Param styleId + * @Return + * @Author zhaoqifeng + * @Date 2021/11/19 10:14 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByStyleId(String styleId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartymemberStyleImageEntity::getStyleId, styleId); + baseDao.delete(wrapper); + } + + /** + * 获取党员风采图片 + * + * @param styleId + * @Param styleId + * @Return {@link List< String>} + * @Author zhaoqifeng + * @Date 2021/11/19 10:40 + */ + @Override + public List getByStyleId(String styleId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartymemberStyleImageEntity::getStyleId, styleId); + wrapper.orderByAsc(IcPartymemberStyleImageEntity::getSort); + List list = baseDao.selectList(wrapper); + return list.stream().map(IcPartymemberStyleImageEntity::getImageUrl).collect(Collectors.toList()); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java new file mode 100644 index 0000000000..654da767d8 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java @@ -0,0 +1,156 @@ +/** + * 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.epmet.modules.partymember.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.modules.partymember.dao.IcPartymemberStyleDao; +import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; +import com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import com.epmet.modules.partymember.service.IcPartymemberStyleImageService; +import com.epmet.modules.partymember.service.IcPartymemberStyleService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartymemberStyleServiceImpl extends BaseServiceImpl implements IcPartymemberStyleService { + + @Resource + private IcPartymemberStyleImageService icPartymemberStyleImageService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartymemberStyleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartymemberStyleDTO.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 IcPartymemberStyleDTO get(String id) { + IcPartymemberStyleEntity entity = baseDao.selectById(id); + IcPartymemberStyleDTO dto = ConvertUtils.sourceToTarget(entity, IcPartymemberStyleDTO.class); + dto.setImageList(icPartymemberStyleImageService.getByStyleId(id)); + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartymemberStyleDTO dto) { + IcPartymemberStyleEntity entity = ConvertUtils.sourceToTarget(dto, IcPartymemberStyleEntity.class); + if (StringUtils.isBlank(entity.getId())) { + insert(entity); + } else { + updateById(entity); + } + //删除原有的照片 + icPartymemberStyleImageService.deleteByStyleId(entity.getId()); + //保存新的照片 + if (CollectionUtils.isNotEmpty(dto.getImageList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getImageList().stream().map(item -> { + IcPartymemberStyleImageEntity e = new IcPartymemberStyleImageEntity(); + e.setStyleId(entity.getId()); + e.setImageUrl(item); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + icPartymemberStyleImageService.insertBatch(list); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String id) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteById(id); + } + + /** + * 查询列表 + * + * @param formDTO + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2021/11/19 9:30 + */ + @Override + public PageData search(PartyMemberStyleFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + //分页查询 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartymemberStyleEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getGridId()), IcPartymemberStyleEntity::getGridId, formDTO.getGridId()); + wrapper.like(StringUtils.isNotBlank(formDTO.getName()), IcPartymemberStyleEntity::getName, formDTO.getName()); + wrapper.like(StringUtils.isNotBlank(formDTO.getMainDeed()), IcPartymemberStyleEntity::getMainDeed, formDTO.getMainDeed()); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartymemberStyleDTO.class); + PageInfo pageInfo = new PageInfo<>(dtoList); + //设置网格名 + dtoList.forEach(item -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); + item.setGridName(gridInfo.getGridName()); + }); + return new PageData<>(dtoList, pageInfo.getTotal()); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleDao.xml new file mode 100644 index 0000000000..a8375fe173 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleImageDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleImageDao.xml new file mode 100644 index 0000000000..308d34d1e6 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleImageDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 93d1e3d8db81ee12afd02ca76bdba830125750e7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 19 Nov 2021 15:33:02 +0800 Subject: [PATCH 015/170] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/demand/ServiceQueryFormDTO.java | 11 ++++++++++ .../controller/ResiVolunteerController.java | 5 +++-- .../epmet/service/VolunteerInfoService.java | 2 +- .../impl/VolunteerInfoServiceImpl.java | 20 ++++++++++++++----- 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java new file mode 100644 index 0000000000..20fa5e4539 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ServiceQueryFormDTO implements Serializable { + private static final long serialVersionUID = -2738313255838176318L; + private String serviceName; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java index 63515d7cb5..e144e9c11f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO; import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO; import com.epmet.dto.result.demand.OptionDTO; @@ -121,7 +122,7 @@ public class ResiVolunteerController { * @return */ @PostMapping("listprofile") - public Result> queryListVolunteer(@LoginUser TokenDto tokenDto){ - return new Result>().ok(volunteerInfoService.queryListVolunteer(tokenDto.getCustomerId())); + public Result> queryListVolunteer(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){ + return new Result>().ok(volunteerInfoService.queryListVolunteer(tokenDto.getCustomerId(),formDTO.getServiceName())); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java index 356bb04154..850c4367de 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java @@ -93,5 +93,5 @@ public interface VolunteerInfoService extends BaseService { * @param customerId * @return */ - List queryListVolunteer(String customerId); + List queryListVolunteer(String customerId,String userRealName); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index c1fa369d7b..a0ac541131 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -51,6 +51,7 @@ import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.HeartUserInfoService; import com.epmet.service.VolunteerInfoService; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -228,7 +229,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl queryListVolunteer(String customerId) { + public List queryListVolunteer(String customerId, String userRealName) { List resultList = new ArrayList<>(); List userIds = baseDao.selectVolunteerIds(customerId); if (CollectionUtils.isEmpty(userIds)) { @@ -239,10 +240,19 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl userMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, Function.identity())); for (String userId : userIds) { if (userMap.containsKey(userId)) { - OptionDTO optionDTO = new OptionDTO(); - optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); - optionDTO.setValue(userId); - resultList.add(optionDTO); + if (StringUtils.isNoneBlank(userRealName)) { + if (userMap.get(userId).getRealName().contains(userRealName)) { + OptionDTO optionDTO = new OptionDTO(); + optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); + optionDTO.setValue(userId); + resultList.add(optionDTO); + } + } else { + OptionDTO optionDTO = new OptionDTO(); + optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); + optionDTO.setValue(userId); + resultList.add(optionDTO); + } } } } From eb47aaf630e59a51e023b340538f0ede87659ce3 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 19 Nov 2021 15:50:17 +0800 Subject: [PATCH 016/170] =?UTF-8?q?=E8=81=94=E5=BB=BA=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=92=8C=E6=B4=BB=E5=8A=A8=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcPartyActivityDTO.java | 142 +++++++++++++++++ .../java/com/epmet/dto/IcPartyUnitDTO.java | 146 ++++++++++++++++++ .../controller/IcPartyActivityController.java | 94 +++++++++++ .../controller/IcPartyUnitController.java | 94 +++++++++++ .../com/epmet/dao/IcPartyActivityDao.java | 33 ++++ .../java/com/epmet/dao/IcPartyUnitDao.java | 33 ++++ .../epmet/entity/IcPartyActivityEntity.java | 111 +++++++++++++ .../com/epmet/entity/IcPartyUnitEntity.java | 116 ++++++++++++++ .../com/epmet/excel/IcPartyActivityExcel.java | 98 ++++++++++++ .../com/epmet/excel/IcPartyUnitExcel.java | 101 ++++++++++++ .../com/epmet/redis/IcPartyActivityRedis.java | 47 ++++++ .../com/epmet/redis/IcPartyUnitRedis.java | 47 ++++++ .../epmet/service/IcPartyActivityService.java | 95 ++++++++++++ .../com/epmet/service/IcPartyUnitService.java | 95 ++++++++++++ .../impl/IcPartyActivityServiceImpl.java | 104 +++++++++++++ .../service/impl/IcPartyUnitServiceImpl.java | 104 +++++++++++++ .../resources/mapper/IcPartyActivityDao.xml | 31 ++++ .../main/resources/mapper/IcPartyUnitDao.xml | 32 ++++ 18 files changed, 1523 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java new file mode 100644 index 0000000000..01b4d30ae7 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -0,0 +1,142 @@ +/** + * 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.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcPartyActivityDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织的所有上级 + */ + private String pids; + + /** + * 单位ID + */ + private String unitId; + + /** + * 服务事项 + */ + private String serviceMatter; + + /** + * 活动标题 + */ + private String title; + + /** + * 活动目标 + */ + private String target; + + /** + * 活动内容 + */ + private String content; + + /** + * 服务人数 + */ + private Integer peopleCount; + + /** + * 活动时间 + */ + private Date activityTime; + + /** + * 活动地址 + */ + private String address; + + /** + * 活动地址经度 + */ + private String longitude; + + /** + * 活动地址纬度 + */ + private String latitude; + + /** + * 活动结果 + */ + private String result; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java new file mode 100644 index 0000000000..aba783f5bb --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java @@ -0,0 +1,146 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcPartyUnitDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * + */ + private String pids; + + /** + * 单位名称 + */ + private String unitName; + + /** + * 分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他 + */ + private String type; + + /** + * 服务事项 多选逗号隔开 + */ + private String serviceMatter; + + /** + * 联系人 + */ + private String contact; + + /** + * 联系电话 + */ + private String contactMobile; + + /** + * 在职党员数 + */ + private Integer memberCount; + + /** + * 地址 + */ + private String address; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + /** + * 群众满意度 + */ + private String satisfaction; + + /** + * 备注 + */ + private String remark; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java new file mode 100644 index 0000000000..8ff6cd8da4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.IcPartyActivityDTO; +import com.epmet.excel.IcPartyActivityExcel; +import com.epmet.service.IcPartyActivityService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@RestController +@RequestMapping("icpartyactivity") +public class IcPartyActivityController { + + @Autowired + private IcPartyActivityService icPartyActivityService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartyActivityService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcPartyActivityDTO data = icPartyActivityService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcPartyActivityDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartyActivityService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcPartyActivityDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPartyActivityService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPartyActivityService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartyActivityService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyActivityExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java new file mode 100644 index 0000000000..08a1dce987 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.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.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.excel.IcPartyUnitExcel; +import com.epmet.service.IcPartyUnitService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@RestController +@RequestMapping("icpartyunit") +public class IcPartyUnitController { + + @Autowired + private IcPartyUnitService icPartyUnitService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartyUnitService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcPartyUnitDTO data = icPartyUnitService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcPartyUnitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartyUnitService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcPartyUnitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPartyUnitService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPartyUnitService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartyUnitService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyUnitExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java new file mode 100644 index 0000000000..c596572fee --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPartyActivityEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcPartyActivityDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java new file mode 100644 index 0000000000..05d78b6bc5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPartyUnitEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcPartyUnitDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java new file mode 100644 index 0000000000..529bb4f34a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_activity") +public class IcPartyActivityEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织的所有上级 + */ + private String pids; + + /** + * 单位ID + */ + private String unitId; + + /** + * 服务事项 + */ + private String serviceMatter; + + /** + * 活动标题 + */ + private String title; + + /** + * 活动目标 + */ + private String target; + + /** + * 活动内容 + */ + private String content; + + /** + * 服务人数 + */ + private Integer peopleCount; + + /** + * 活动时间 + */ + private Date activityTime; + + /** + * 活动地址 + */ + private String address; + + /** + * 活动地址经度 + */ + private String longitude; + + /** + * 活动地址纬度 + */ + private String latitude; + + /** + * 活动结果 + */ + private String result; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java new file mode 100644 index 0000000000..70061e6edb --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java @@ -0,0 +1,116 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_unit") +public class IcPartyUnitEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * + */ + private String pids; + + /** + * 单位名称 + */ + private String unitName; + + /** + * 分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他 + */ + private String type; + + /** + * 服务事项 多选逗号隔开 + */ + private String serviceMatter; + + /** + * 联系人 + */ + private String contact; + + /** + * 联系电话 + */ + private String contactMobile; + + /** + * 在职党员数 + */ + private Integer memberCount; + + /** + * 地址 + */ + private String address; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + /** + * 群众满意度 + */ + private String satisfaction; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java new file mode 100644 index 0000000000..4dd9c4d87c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java @@ -0,0 +1,98 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcPartyActivityExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "组织ID") + private String agencyId; + + @Excel(name = "组织的所有上级") + private String pids; + + @Excel(name = "单位ID") + private String unitId; + + @Excel(name = "服务事项") + private String serviceMatter; + + @Excel(name = "活动标题") + private String title; + + @Excel(name = "活动目标") + private String target; + + @Excel(name = "活动内容") + private String content; + + @Excel(name = "服务人数") + private Integer peopleCount; + + @Excel(name = "活动时间") + private Date activityTime; + + @Excel(name = "活动地址") + private String address; + + @Excel(name = "活动地址经度") + private String longitude; + + @Excel(name = "活动地址纬度") + private String latitude; + + @Excel(name = "活动结果") + private String result; + + @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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java new file mode 100644 index 0000000000..ace9eff6b0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcPartyUnitExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "组织ID") + private String agencyId; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "") + private String pids; + + @Excel(name = "单位名称") + private String unitName; + + @Excel(name = "分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他") + private String type; + + @Excel(name = "服务事项 多选逗号隔开") + private String serviceMatter; + + @Excel(name = "联系人") + private String contact; + + @Excel(name = "联系电话") + private String contactMobile; + + @Excel(name = "在职党员数") + private Integer memberCount; + + @Excel(name = "地址") + private String address; + + @Excel(name = "中心位置经度") + private String longitude; + + @Excel(name = "中心位置纬度") + private String latitude; + + @Excel(name = "群众满意度") + private String satisfaction; + + @Excel(name = "备注") + private String remark; + + @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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java new file mode 100644 index 0000000000..c2ead1498b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.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.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Component +public class IcPartyActivityRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java new file mode 100644 index 0000000000..83113e7903 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.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.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Component +public class IcPartyUnitRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java new file mode 100644 index 0000000000..ec667538cb --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPartyActivityDTO; +import com.epmet.entity.IcPartyActivityEntity; + +import java.util.List; +import java.util.Map; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +public interface IcPartyActivityService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartyActivityDTO + * @author generator + * @date 2021-11-19 + */ + IcPartyActivityDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + void save(IcPartyActivityDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + void update(IcPartyActivityDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-19 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java new file mode 100644 index 0000000000..4e665d6cd8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.entity.IcPartyUnitEntity; + +import java.util.List; +import java.util.Map; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +public interface IcPartyUnitService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartyUnitDTO + * @author generator + * @date 2021-11-19 + */ + IcPartyUnitDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + void save(IcPartyUnitDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + void update(IcPartyUnitDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-19 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java new file mode 100644 index 0000000000..ec245f544a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPartyActivityDao; +import com.epmet.dto.IcPartyActivityDTO; +import com.epmet.entity.IcPartyActivityEntity; +import com.epmet.redis.IcPartyActivityRedis; +import com.epmet.service.IcPartyActivityService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Service +public class IcPartyActivityServiceImpl extends BaseServiceImpl implements IcPartyActivityService { + + @Autowired + private IcPartyActivityRedis icPartyActivityRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartyActivityDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyActivityDTO.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 IcPartyActivityDTO get(String id) { + IcPartyActivityEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyActivityDTO dto) { + IcPartyActivityEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyActivityEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartyActivityDTO dto) { + IcPartyActivityEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyActivityEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java new file mode 100644 index 0000000000..ad00d1ae9e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPartyUnitDao; +import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.entity.IcPartyUnitEntity; +import com.epmet.redis.IcPartyUnitRedis; +import com.epmet.service.IcPartyUnitService; +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 generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Service +public class IcPartyUnitServiceImpl extends BaseServiceImpl implements IcPartyUnitService { + + @Autowired + private IcPartyUnitRedis icPartyUnitRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartyUnitDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyUnitDTO.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 IcPartyUnitDTO get(String id) { + IcPartyUnitEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartyUnitDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyUnitDTO dto) { + IcPartyUnitEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartyUnitDTO dto) { + IcPartyUnitEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml new file mode 100644 index 0000000000..fd84685f0e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml new file mode 100644 index 0000000000..83d6f64699 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From e41feb36691263073c3acf5f8a2334ffc533fb39 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 19 Nov 2021 16:09:29 +0800 Subject: [PATCH 017/170] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E4=B8=8B=E5=88=86=E9=98=9F=E7=AE=A1=E7=90=86CRUD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/AddPlacePatrolTeamFormDTO.java | 124 +++++++++ .../dto/form/EditPlacePatrolTeamFormDTO.java | 107 ++++++++ .../form/GetListPlacePatrolTeamFormDTO.java | 54 ++++ .../dto/result/GetListPlaceOrgResultDTO.java | 26 +- .../GetListPlacePatrolTeamResultDTO.java | 19 ++ .../PlacePatrolTeamDetailResultDTO.java | 38 +++ .../controller/PlacePatrolTeamController.java | 96 ++++--- .../main/java/com/epmet/dao/PlaceOrgDao.java | 3 +- .../com/epmet/dao/PlacePatrolTeamDao.java | 11 +- .../epmet/dao/PlacePatrolTeamStaffDao.java | 17 +- .../epmet/service/PlacePatrolTeamService.java | 75 ++---- .../service/PlacePatrolTeamStaffService.java | 6 + .../service/impl/PlaceOrgServiceImpl.java | 10 +- .../impl/PlacePatrolTeamServiceImpl.java | 247 ++++++++++++++---- .../impl/PlacePatrolTeamStaffServiceImpl.java | 9 + .../src/main/resources/mapper/PlaceOrgDao.xml | 2 +- .../resources/mapper/PlacePatrolTeamDao.xml | 39 ++- .../mapper/PlacePatrolTeamStaffDao.xml | 17 ++ 18 files changed, 731 insertions(+), 169 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java new file mode 100644 index 0000000000..672fee597f --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java @@ -0,0 +1,124 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ +@Data +public class AddPlacePatrolTeamFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + @NotBlank(message = "场所区域不能为空", groups = {Add.class}) + private String gridId; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + @NotBlank(message = "场所类型不能为空", groups = {Add.class}) + private String ninePlaceVal; + + /** + * 分队名称 + */ + @NotBlank(message = "分队名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "分队名称不能超过20个字符", groups = {Add.class}) + private String teamName; + + /** + * 巡查计划 + */ + @NotBlank(message = "巡查计划不能为空", groups = {Add.class}) + @Length(max = 200, message = "巡查计划不能超过200个字符", groups = {Add.class}) + private String plan; + + /** + * 创建(建队)时间 + */ + @NotBlank(message = "创建时间不能为空", groups = {Add.class}) + private Date time; + + /** + * 场所负责人 + */ + @NotBlank(message = "负责人名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Add.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @NotBlank(message = "负责人电话不能为空", groups = {Add.class}) + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {Add.class}) + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 分队成员信息 + */ + @Valid + @NotEmpty(message = "成员列表不能为空") + private List memberList; + + //token中userId + private String staffId; + + public interface Add { } + + @Data + public class Member { + //姓名 + private String name; + //联系电话 + private String mobile; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java new file mode 100644 index 0000000000..90d154008b --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.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.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * @Author sun + * @Description 修改、删除九小场所巡查分队人员管理 + **/ +@Data +public class EditPlacePatrolTeamFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 分队Id + */ + @NotBlank(message = "分队Id不能为空", groups = {Edit.class, Del.class, Detail.class}) + private String teamId; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVal; + + /** + * 分队名称 + */ + @Length(max = 20, message = "分队名称不能超过20个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String teamName; + + /** + * 巡查计划 + */ + @Length(max = 200, message = "巡查计划不能超过200个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String plan; + + /** + * 创建(建队)时间 + */ + private Date time; + + /** + * 场所负责人 + */ + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 分队成员信息 + */ + private List memberList; + + public interface Edit { + } + + public interface Del { + } + + public interface Detail { + } + + @Data + public class Member { + //姓名 + private String name; + //联系电话 + private String mobile; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java new file mode 100644 index 0000000000..8660cf90e3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java @@ -0,0 +1,54 @@ +/** + * 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.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ +@Data +public class GetListPlacePatrolTeamFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //负责人 + private String personInCharge; + //联系电话 + private String mobile; + //场所区域【网格Id】 + private String gridId; + //场所类型【九小场所Value值】 + private String ninePlacsVal; + //是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 + private Boolean isPage = true; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + //token中客户Id + private String customerId; + //场所Id + private String teamId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java index 963a972543..2111d8ef30 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java @@ -14,30 +14,6 @@ public class GetListPlaceOrgResultDTO implements Serializable { //集合总条数 private Integer total; //社会组织信息 - private List list; - - @Data - public class PlaceOrgList { - //场所Id - private String placeOrgId; - //场所名称 - private String placeOrgName; - //场所区域Id - private String gridId; - //场所区域名称 - private String gridName; - //场所地址 - private String address; - //场所类型名称[九小场所Value值] - private String ninePlaceVal; - //场所类型名称[九小场所名称] - private String ninePlaceName; - //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 - private String scale; - //负责人 - private String personInCharge; - //联系电话 - private String mobile; - } + private List list; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java new file mode 100644 index 0000000000..b2ce9018f6 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ +@Data +public class GetListPlacePatrolTeamResultDTO implements Serializable { + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java new file mode 100644 index 0000000000..acbbbbda57 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java @@ -0,0 +1,38 @@ +package com.epmet.dto.result; + +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ +@Data +public class PlacePatrolTeamDetailResultDTO implements Serializable { + //分队Id + private String teamId; + //场所名称 + private String teamName; + //场所区域Id + private String gridIds; + //场所区域名称 + private String gridNames; + //场所类型名称[九小场所Value值] + private String ninePlaceVals; + //场所类型名称[九小场所名称] + private String ninePlaceNames; + //负责人 + private String personInCharge; + //联系电话 + private String mobile; + //监查计划 + private String plan; + //创建时间 + private String time; + //分队成员信息 + private List memberList; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java index 29df2c1deb..5333ab234f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java @@ -17,23 +17,21 @@ package com.epmet.controller; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.PlacePatrolTeamDTO; -import com.epmet.excel.PlacePatrolTeamExcel; +import com.epmet.dto.form.AddPlacePatrolTeamFormDTO; +import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; import com.epmet.service.PlacePatrolTeamService; 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; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** @@ -49,46 +47,60 @@ public class PlacePatrolTeamController { @Autowired private PlacePatrolTeamService placePatrolTeamService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = placePatrolTeamService.page(params); - return new Result>().ok(page); - } - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - PlacePatrolTeamDTO data = placePatrolTeamService.get(id); - return new Result().ok(data); + /** + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddPlacePatrolTeamFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setStaffId(tokenDto.getUserId()); + placePatrolTeamService.add(formDTO); + return new Result(); } - @PostMapping - public Result save(@RequestBody PlacePatrolTeamDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - placePatrolTeamService.save(dto); + /** + * @Author sun + * @Description 修改九小场所巡查分队人员管理 + **/ + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Edit.class); + placePatrolTeamService.edit(formDTO); return new Result(); } - @PutMapping - public Result update(@RequestBody PlacePatrolTeamDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - placePatrolTeamService.update(dto); + /** + * @Author sun + * @Description 删除九小场所巡查分队人员管理 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Del.class); + placePatrolTeamService.del(formDTO.getTeamId()); return new Result(); } - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - placePatrolTeamService.delete(ids); - return new Result(); + /** + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ + @PostMapping("detail") + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Detail.class); + return new Result().ok(placePatrolTeamService.detail(formDTO.getTeamId())); } - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = placePatrolTeamService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolTeamExcel.class); + /** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolTeamFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result().ok(placePatrolTeamService.getList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java index c379dde695..0f396158c1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.GetListPlaceOrgFormDTO; import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; import com.epmet.entity.PlaceOrgEntity; import org.apache.ibatis.annotations.Mapper; @@ -38,6 +39,6 @@ public interface PlaceOrgDao extends BaseDao { * @Author sun * @Description 九小场所下组织列表查询 **/ - List getList(GetListPlaceOrgFormDTO formDTO); + List getList(GetListPlaceOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java index 7e19b451c1..6af5ca74fb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java @@ -18,9 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; import com.epmet.entity.PlacePatrolTeamEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 场所分队管理 * @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface PlacePatrolTeamDao extends BaseDao { - + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ + List getList(GetListPlacePatrolTeamFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java index a8c180fee7..2009cff9ca 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.PlacePatrolTeamStaffDTO; import com.epmet.entity.PlacePatrolTeamStaffEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 场所分队下人员管理 @@ -29,5 +33,16 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface PlacePatrolTeamStaffDao extends BaseDao { - + + /** + * @Author sun + * @Description 删除分队下成员信息 + **/ + int delByTeamId(@Param("teamId") String teamId); + + /** + * @Author sun + * @Description 删除分队下成员信息 + **/ + List getByTeamId(@Param("teamId") String teamId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java index 55b983e348..4e2884ecb9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java @@ -20,6 +20,11 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.dto.form.AddPlacePatrolTeamFormDTO; +import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; import com.epmet.entity.PlacePatrolTeamEntity; import java.util.List; @@ -34,62 +39,32 @@ import java.util.Map; public interface PlacePatrolTeamService extends BaseService { /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-11-18 - */ - PageData page(Map params); + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ + void add(AddPlacePatrolTeamFormDTO formDTO); /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-11-18 - */ - List list(Map params); + * @Author sun + * @Description 修改九小场所巡查分队人员管理 + **/ + void edit(EditPlacePatrolTeamFormDTO formDTO); /** - * 单条查询 - * - * @param id - * @return PlacePatrolTeamDTO - * @author generator - * @date 2021-11-18 - */ - PlacePatrolTeamDTO get(String id); + * @Author sun + * @Description 删除九小场所巡查分队人员管理 + **/ + void del(String teamId); /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void save(PlacePatrolTeamDTO dto); + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ + PlacePatrolTeamDetailResultDTO detail(String teamId); /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void update(PlacePatrolTeamDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-11-18 - */ - void delete(String[] ids); + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ + GetListPlacePatrolTeamResultDTO getList(GetListPlacePatrolTeamFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java index e970167e66..e124aadd1b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java @@ -92,4 +92,10 @@ public interface PlacePatrolTeamStaffService extends BaseService%s", placeOrgId)); @@ -108,11 +112,11 @@ public class PlaceOrgServiceImpl extends BaseServiceImpl result = baseDao.getList(dto); + List result = baseDao.getList(dto); if (CollectionUtils.isEmpty(result)) { return resultDTO; } - resultDTO = ConvertUtils.sourceToTarget(result.get(0), PlaceOrgDetailResultDTO.class); + resultDTO = result.get(0); //2.查询九小场所信息 Result> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); if (!result1.success()) { @@ -134,7 +138,7 @@ public class PlaceOrgServiceImpl extends BaseServiceImpl result = + PageInfo result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); if (CollectionUtils.isEmpty(result.getList())) { return resultDTO; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java index e7696ba4f9..1b331bdefb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java @@ -17,23 +17,45 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.CustomerGridDao; import com.epmet.dao.PlacePatrolTeamDao; -import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.dto.CustomerGridDTO; +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.dto.form.AddPlacePatrolTeamFormDTO; +import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; +import com.epmet.entity.PlaceOrgEntity; import com.epmet.entity.PlacePatrolTeamEntity; +import com.epmet.entity.PlacePatrolTeamStaffEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.PlacePatrolTeamService; -import org.apache.commons.lang3.StringUtils; +import com.epmet.service.PlacePatrolTeamStaffService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.ibatis.annotations.Param; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; -import java.util.Map; +import java.util.stream.Collectors; /** * 场所分队管理 @@ -43,58 +65,195 @@ import java.util.Map; */ @Service public class PlacePatrolTeamServiceImpl extends BaseServiceImpl implements PlacePatrolTeamService { + private static final Logger log = LoggerFactory.getLogger(PlacePatrolTeamServiceImpl.class); + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + @Autowired + private PlacePatrolTeamStaffService placePatrolTeamStaffService; + @Autowired + private CustomerGridDao customerGridDao; - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, PlacePatrolTeamDTO.class); - } - + /** + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, PlacePatrolTeamDTO.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); + @Transactional(rollbackFor = Exception.class) + public void add(AddPlacePatrolTeamFormDTO formDTO) { + //1.分队主表新增数据 + PlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(formDTO, PlacePatrolTeamEntity.class); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + entity.setAgencyId(staffInfoCache.getAgencyId()); + entity.setPids(staffInfoCache.getAgencyPIds()); + insert(entity); + //2.分队成员表新增数据 + List entityList = new ArrayList<>(); + formDTO.getMemberList().forEach(m -> { + PlacePatrolTeamStaffEntity entity1 = new PlacePatrolTeamStaffEntity(); + entity1.setCustomerId(formDTO.getCustomerId()); + entity1.setPlacePatrolTeamId(entity.getId()); + entity1.setName(m.getName()); + entity1.setMobile(m.getMobile()); + entityList.add(entity1); + }); + placePatrolTeamStaffService.insertBatch(entityList); - return wrapper; } + /** + * @Author sun + * @Description 修改九小场所巡查分队人员管理数据 + **/ @Override - public PlacePatrolTeamDTO get(String id) { - PlacePatrolTeamEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, PlacePatrolTeamDTO.class); + @Transactional(rollbackFor = Exception.class) + public void edit(EditPlacePatrolTeamFormDTO formDTO) { + //1.修改分队主表信息 + PlacePatrolTeamEntity entity = baseDao.selectById(formDTO.getTeamId()); + if (null == entity) { + throw new RenException(String.format("修改九小场所下巡查分队人员信息失败,分队信息不存在,分队Id->%s", formDTO.getTeamId())); + } + entity = ConvertUtils.sourceToTarget(formDTO, PlacePatrolTeamEntity.class); + baseDao.updateById(entity); + //2.全删全增分队成员字表数据 + List entityList = new ArrayList<>(); + for (EditPlacePatrolTeamFormDTO.Member m : formDTO.getMemberList()) { + PlacePatrolTeamStaffEntity entity1 = new PlacePatrolTeamStaffEntity(); + entity1.setCustomerId(entity.getCustomerId()); + entity1.setPlacePatrolTeamId(entity.getId()); + entity1.setName(m.getName()); + entity1.setMobile(m.getMobile()); + entityList.add(entity1); + } + placePatrolTeamStaffService.delByTeamId(formDTO.getTeamId()); + placePatrolTeamStaffService.insertBatch(entityList); + } + /** + * @Author sun + * @Description 删除九小场所巡查分队人员管理数据 + **/ @Override @Transactional(rollbackFor = Exception.class) - public void save(PlacePatrolTeamDTO dto) { - PlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamEntity.class); - insert(entity); + public void del(String teamId) { + //1.删除分队主表数据 + if (baseDao.deleteById(teamId) < NumConstant.ONE) { + throw new RenException(String.format("修改九小场所下组织信息删除失败,场所Id->%s", teamId)); + } + //2.删除分队成员字表数据 + placePatrolTeamStaffService.delByTeamId(teamId); } + /** + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ @Override - @Transactional(rollbackFor = Exception.class) - public void update(PlacePatrolTeamDTO dto) { - PlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamEntity.class); - updateById(entity); + public PlacePatrolTeamDetailResultDTO detail(String teamId) { + PlacePatrolTeamDetailResultDTO resultDTO = new PlacePatrolTeamDetailResultDTO(); + //1.查询场所基础信息 + GetListPlacePatrolTeamFormDTO dto = new GetListPlacePatrolTeamFormDTO(); + dto.setTeamId(teamId); + List result = baseDao.getList(dto); + if (CollectionUtils.isEmpty(result)) { + return resultDTO; + } + resultDTO = result.get(0); + + //2.查询网格信息 + List gridIds = new ArrayList<>(); + for (String str : resultDTO.getGridIds().split(",")) { + gridIds.add(str); + } + gridIds = gridIds.stream().distinct().collect(Collectors.toList()); + List gridList = customerGridDao.selectGridListByIds(gridIds); + + //3.查询九小场所信息 + Result> nineList = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!nineList.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + + //4.分别封装网格。九小场所数据 + //网格 + StringBuffer gridNames = new StringBuffer(""); + for (String str : resultDTO.getGridIds().split(",")) { + gridList.forEach(r -> { + if (str.equals(r.getGridName())) { + gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + } + }); + } + resultDTO.setGridNames(gridNames.toString()); + //九小场所 + StringBuffer ninePlaceNames = new StringBuffer(""); + for (String str : resultDTO.getNinePlaceVals().split(",")) { + nineList.getData().forEach(r -> { + if (str.equals(r.getValue())) { + ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + } + }); + } + resultDTO.setNinePlaceNames(ninePlaceNames.toString()); + + return resultDTO; } + /** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); + public GetListPlacePatrolTeamResultDTO getList(GetListPlacePatrolTeamFormDTO formDTO) { + GetListPlacePatrolTeamResultDTO resultDTO = new GetListPlacePatrolTeamResultDTO(); + //1.根据条件查询分队及成员数据 + PageInfo result = + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); + if (CollectionUtils.isEmpty(result.getList())) { + return resultDTO; + } + resultDTO.setTotal((int) result.getTotal()); + + //2.查询网格信息 + List gridIds = new ArrayList<>(); + for (PlacePatrolTeamDetailResultDTO dto : result.getList()) { + for (String str : dto.getGridIds().split(",")) { + gridIds.add(str); + } + } + gridIds = gridIds.stream().distinct().collect(Collectors.toList()); + List gridList = customerGridDao.selectGridListByIds(gridIds); + + //3.查询九小场所信息 + Result> nineList = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!nineList.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + + //4.封装网格、九小场所数据 + for (PlacePatrolTeamDetailResultDTO dto : result.getList()) { + StringBuffer gridNames = new StringBuffer(""); + for (String str : dto.getGridIds().split(",")) { + gridList.forEach(r -> { + if (str.equals(r.getGridName())) { + gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + } + }); + } + dto.setGridNames(gridNames.toString()); + StringBuffer ninePlaceNames = new StringBuffer(""); + for (String str : dto.getNinePlaceVals().split(",")) { + nineList.getData().forEach(r -> { + if (str.equals(r.getValue())) { + ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + } + }); + } + dto.setNinePlaceNames(ninePlaceNames.toString()); + } + + resultDTO.setList(result.getList()); + return resultDTO; } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java index c44ec42a76..e707539673 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java @@ -97,4 +97,13 @@ public class PlacePatrolTeamStaffServiceImpl extends BaseServiceImpl - SELECT a.id placeOrgId, a.grid_id gridId, diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml index 2e889eb2dd..f74ff293e1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml @@ -3,6 +3,43 @@ - + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml index 26bebdb857..1c8abde218 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml @@ -3,6 +3,23 @@ + + DELETE + FROM + ic_place_patrol_team_staff + WHERE + place_patrol_team_id = #{teamId} + + \ No newline at end of file From 4bc3e61cd7597c8974c1274cec5ba9deb0d59810 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 16:11:45 +0800 Subject: [PATCH 018/170] =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommunitySelfOrganizationListFormDTO.java | 49 ++++++++++ .../CommunitySelfOrganizationListDTO.java | 89 +++++++++++++++++++ ...ommunitySelfOrganizationListResultDTO.java | 28 ++++++ ...IcCommunitySelfOrganizationController.java | 15 ++++ .../dao/IcCommunitySelfOrganizationDao.java | 19 ++++ .../IcCommunitySelfOrganizationService.java | 11 +++ ...cCommunitySelfOrganizationServiceImpl.java | 34 +++++++ .../mapper/IcCommunitySelfOrganizationDao.xml | 50 +++++++++++ 8 files changed, 295 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java new file mode 100644 index 0000000000..c70e2a7055 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java @@ -0,0 +1,49 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/19 1:47 下午 + * @DESC + */ +@Data +public class CommunitySelfOrganizationListFormDTO implements Serializable { + + private static final long serialVersionUID = 4202083250504143469L; + + public interface CommunitySelfOrganizationListForm{} + + /** + * 社区自组织名 + */ + private String organizationName; + + /** + * 开始时间 + */ + private String startTime; + + /** + * 结束时间 + */ + private String endTime; + + @NotNull(message = "pageNo不能为空",groups = CommunitySelfOrganizationListForm.class) + private Integer pageNo; + + @NotNull(message = "pageSize不能为空",groups = CommunitySelfOrganizationListForm.class) + private Integer pageSize; + + /** + * 是否分页,默认true分页 + */ + private Boolean isPage = true; + + private String customerId; + private String agencyId; + private Integer ranking; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java new file mode 100644 index 0000000000..47b2c02df8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -0,0 +1,89 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/19 1:47 下午 + * @DESC + */ +@Data +public class CommunitySelfOrganizationListDTO implements Serializable { + + private static final long serialVersionUID = 3208034033470533749L; + + /** + * 排序 + */ + private Integer sort; + + /** + * 社区自组织人数 + */ + private Integer organizationPersonCount; + + /** + * 社区自组织名字 + */ + private String organizationName; + + /** + * 服务事项 + */ + private String serviceItem; + + /** + * 负责人 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 自组织创办时间 + */ + private String organizationCreatedTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 社区自组织ID + */ + private String orgId; + + /** + * 社区自组织人员 + */ + private List organizationPersonnel; + + public CommunitySelfOrganizationListDTO() { + this.sort = NumConstant.ZERO; + this.organizationPersonCount = NumConstant.ZERO; + this.organizationName = ""; + this.serviceItem = ""; + this.principalName = ""; + this.principalPhone = ""; + this.organizationCreatedTime = ""; + this.longitude = ""; + this.latitude = ""; + this.orgId = ""; + this.organizationPersonnel = new ArrayList<>(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java new file mode 100644 index 0000000000..c8cb3375fd --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/19 1:47 下午 + * @DESC + */ +@Data +public class CommunitySelfOrganizationListResultDTO implements Serializable { + + private static final long serialVersionUID = 3208034033470533749L; + + private Integer total; + + private List list; + + public CommunitySelfOrganizationListResultDTO() { + this.total = NumConstant.ZERO; + this.list = new ArrayList<>(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index c80950e2e0..f805d75a72 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -30,7 +30,9 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; @@ -124,4 +126,17 @@ public class IcCommunitySelfOrganizationController { return new Result(); } + /** + * @Description 查询社区自组织列表 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/19 1:59 下午 + */ + @PostMapping("communityselforganizationlist") + public Result communitySelfOrganizationList(@LoginUser TokenDto tokenDto,@RequestBody CommunitySelfOrganizationListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, CommunitySelfOrganizationListFormDTO.CommunitySelfOrganizationListForm.class); + return new Result().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index e1c0e16689..b205741829 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -18,9 +18,14 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 社区自组织表 @@ -31,6 +36,20 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface IcCommunitySelfOrganizationDao extends BaseDao { + /** + * @Description 自组织修改 + * @param formDTO + * @author zxc + * @date 2021/11/19 2:04 下午 + */ void updateCommunitySelfOrganization(IcCommunitySelfOrganizationEntity formDTO); + /** + * @Description 查询社区自组织列表 + * @param formDTO + * @author zxc + * @date 2021/11/19 2:05 下午 + */ + List selectCommunitySelfOrganizationList(CommunitySelfOrganizationListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 530dbe671a..7de1d51965 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -22,7 +22,9 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import java.util.List; @@ -113,4 +115,13 @@ public interface IcCommunitySelfOrganizationService extends BaseService objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); + result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); + if (CollectionUtils.isNotEmpty(objectPageInfo.getList())){ + objectPageInfo.getList().forEach(l -> { + l.setSort(i[NumConstant.ZERO]); + i[NumConstant.ZERO]++; + }); + result.setList(objectPageInfo.getList()); + } + return result; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index b7176f6859..ddcb270c64 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -3,6 +3,7 @@ + UPDATE ic_community_self_organization SET ORGANIZATION_NAME = #{organizationName}, @@ -18,4 +19,53 @@ WHERE DEL_FLAG = 0 AND ID = #{orgId} + + + + + + + + + + + + + + + \ No newline at end of file From ea91adbc2a4345a11ec4a22887229007f1f85273 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 16:12:45 +0800 Subject: [PATCH 019/170] =?UTF-8?q?emm=CB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index ddcb270c64..7867751848 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -30,6 +30,7 @@ + From a3d7835d1fb2f98bb12911fb2771b407090840e8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 19 Nov 2021 16:26:17 +0800 Subject: [PATCH 020/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/IcUserDemandOperateLogDTO.java | 106 +++++++++++ .../com/epmet/dto/IcUserDemandRecDTO.java | 177 ++++++++++++++++++ .../dto/IcUserDemandSatisfactionDTO.java | 102 ++++++++++ .../com/epmet/dto/IcUserDemandServiceDTO.java | 106 +++++++++++ .../dto/form/demand/ServiceQueryFormDTO.java | 13 ++ .../controller/IcSocietyOrgController.java | 16 ++ .../controller/IcUserDemandRecController.java | 41 ++++ .../java/com/epmet/dao/IcSocietyOrgDao.java | 9 + .../epmet/dao/IcUserDemandOperateLogDao.java | 33 ++++ .../com/epmet/dao/IcUserDemandRecDao.java | 33 ++++ .../dao/IcUserDemandSatisfactionDao.java | 33 ++++ .../com/epmet/dao/IcUserDemandServiceDao.java | 33 ++++ .../entity/IcUserDemandOperateLogEntity.java | 76 ++++++++ .../epmet/entity/IcUserDemandRecEntity.java | 147 +++++++++++++++ .../IcUserDemandSatisfactionEntity.java | 72 +++++++ .../entity/IcUserDemandServiceEntity.java | 76 ++++++++ .../epmet/service/IcSocietyOrgService.java | 11 ++ .../epmet/service/IcUserDemandRecService.java | 95 ++++++++++ .../service/impl/IcSocietyOrgServiceImpl.java | 34 +++- .../impl/IcUserDemandRecServiceImpl.java | 99 ++++++++++ .../main/resources/mapper/IcSocietyOrgDao.xml | 12 ++ .../mapper/IcUserDemandOperateLogDao.xml | 24 +++ .../resources/mapper/IcUserDemandRecDao.xml | 38 ++++ .../mapper/IcUserDemandSatisfactionDao.xml | 23 +++ .../mapper/IcUserDemandServiceDao.xml | 24 +++ 25 files changed, 1432 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java new file mode 100644 index 0000000000..cf0247b2e9 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民需求操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandOperateLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前操作用户id + */ + private String userId; + + /** + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish;评价:evaluate; + */ + private String actionCode; + + /** + * 操作时间 + */ + private Date operateTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * + */ + private String userName; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java new file mode 100644 index 0000000000..2b000acc9c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java @@ -0,0 +1,177 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandRecDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + /** + * 二级需求分类编码 + */ + private String categoryCode; + + /** + * 父级需求分类编码 + */ + private String parentCode; + + /** + * 需求内容1000字 + */ + private String content; + + /** + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + private String reportType; + + /** + * 上报人姓名 + */ + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + private String reportUserMobile; + + /** + * 自身上报时存储居民端用户id + */ + private String reportUserId; + + /** + * 上报时间 + */ + private Date reportTime; + + /** + * 希望服务时间 + */ + private Date wantServiceTime; + + /** + * 小程序用户自己上报:mini_resi;居民信息录入的居民:ic_resi_user + */ + private String demandUserType; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + private String demandUserId; + + /** + * 需求人姓名 + */ + private String demandUserName; + + /** + * 需求人联系电话 + */ + private String demandUserMobile; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + private String status; + + /** + * 完成结果:已解决 resolved,未解决 unresolved + + */ + private String finishResult; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 + */ + private Integer evaluateFlag; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java new file mode 100644 index 0000000000..c28b702723 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java @@ -0,0 +1,102 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 居民需求评价记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandSatisfactionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,居民需求评价表 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前评价用户id,可以是小程序里用户id,也可以是工作端帮忙录入需求的人 + */ + private String userId; + + /** + * 评价时间 + */ + private Date evaluateTime; + + /** + * 得分可为半星 + */ + private BigDecimal score; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java new file mode 100644 index 0000000000..e3196e2b02 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民需求服务记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandServiceDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 志愿者:居民端爱心互助的志愿者userId; + */ + private String serverId; + + /** + * 实际服务开始时间 + */ + private Date serviceStartTime; + + /** + * 实际服务结束时间 + */ + private Date serviceEndTime; + + /** + * 完成情况 + */ + private String finishDesc; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java index 20fa5e4539..472d78f58c 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java @@ -2,10 +2,23 @@ package com.epmet.dto.form.demand; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; @Data public class ServiceQueryFormDTO implements Serializable { private static final long serialVersionUID = -2738313255838176318L; + + public interface DemandId { + } + + private String serviceName; + + + @NotBlank(message = "需求id不能为空", groups = DemandId.class) + private String demandRecId; + + + private String customerId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index 193e7ea4ed..909f961b56 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -24,7 +24,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.service.IcSocietyOrgService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -32,6 +34,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * 社会组织管理 @@ -91,4 +95,16 @@ public class IcSocietyOrgController { return new Result().ok(societyOrgService.getList(formDTO)); } + /** + * 需求指派,选择社会组织,调用此接口 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("servicelist") + public Result> queryServiceList(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.DemandId.class); + return new Result>().ok(societyOrgService.queryServiceList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java new file mode 100644 index 0000000000..3288a45a7d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -0,0 +1,41 @@ +/** + * 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.epmet.controller; + +import com.epmet.service.IcUserDemandRecService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@RestController +@RequestMapping("icuserdemandrec") +public class IcUserDemandRecController { + + @Autowired + private IcUserDemandRecService icUserDemandRecService; + + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java index 8008efafeb..0b4016b19d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java @@ -20,8 +20,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -40,4 +42,11 @@ public interface IcSocietyOrgDao extends BaseDao { **/ List getList(GetListSocietyOrgFormDTO formDTO); + /** + * 需求指派,选择社会组织,调用此接口 + * + * @param agencyIds + * @return + */ + List selectListByAgencyId(@Param("agencyIds")List agencyIds); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java new file mode 100644 index 0000000000..178e0482b9 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserDemandOperateLogEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民需求操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcUserDemandOperateLogDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java new file mode 100644 index 0000000000..1d21b7fe2e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserDemandRecEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcUserDemandRecDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java new file mode 100644 index 0000000000..4c32bc9045 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserDemandSatisfactionEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民需求评价记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcUserDemandSatisfactionDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java new file mode 100644 index 0000000000..7ed924bdcd --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserDemandServiceEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民需求服务记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcUserDemandServiceDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java new file mode 100644 index 0000000000..416cf17f53 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java @@ -0,0 +1,76 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民需求操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_operate_log") +public class IcUserDemandOperateLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前操作用户id + */ + private String userId; + + /** + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish;评价:evaluate; + */ + private String actionCode; + + /** + * 操作时间 + */ + private Date operateTime; + + /** + * + */ + private String userName; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java new file mode 100644 index 0000000000..10499a8b9f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java @@ -0,0 +1,147 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_rec") +public class IcUserDemandRecEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + /** + * 二级需求分类编码 + */ + private String categoryCode; + + /** + * 父级需求分类编码 + */ + private String parentCode; + + /** + * 需求内容1000字 + */ + private String content; + + /** + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + private String reportType; + + /** + * 上报人姓名 + */ + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + private String reportUserMobile; + + /** + * 自身上报时存储居民端用户id + */ + private String reportUserId; + + /** + * 上报时间 + */ + private Date reportTime; + + /** + * 希望服务时间 + */ + private Date wantServiceTime; + + /** + * 小程序用户自己上报:mini_resi;居民信息录入的居民:ic_resi_user + */ + private String demandUserType; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + private String demandUserId; + + /** + * 需求人姓名 + */ + private String demandUserName; + + /** + * 需求人联系电话 + */ + private String demandUserMobile; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + private String status; + + /** + * 完成结果:已解决 resolved,未解决 unresolved + + */ + private String finishResult; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 + */ + private Integer evaluateFlag; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java new file mode 100644 index 0000000000..bae8aaaff0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java @@ -0,0 +1,72 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 居民需求评价记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_satisfaction") +public class IcUserDemandSatisfactionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前评价用户id,可以是小程序里用户id,也可以是工作端帮忙录入需求的人 + */ + private String userId; + + /** + * 评价时间 + */ + private Date evaluateTime; + + /** + * 得分可为半星 + */ + private BigDecimal score; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java new file mode 100644 index 0000000000..b2b95ec5d4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java @@ -0,0 +1,76 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民需求服务记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_service") +public class IcUserDemandServiceEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 志愿者:居民端爱心互助的志愿者userId; + */ + private String serverId; + + /** + * 实际服务开始时间 + */ + private Date serviceStartTime; + + /** + * 实际服务结束时间 + */ + private Date serviceEndTime; + + /** + * 完成情况 + */ + private String finishDesc; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java index 3890130256..f61eec5b94 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java @@ -21,9 +21,13 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; +import java.util.List; + /** * 社会组织管理 * @@ -55,4 +59,11 @@ public interface IcSocietyOrgService extends BaseService { * @Description 社会组织列表查询 **/ GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO); + + /** + * 需求指派,选择社会组织,调用此接口 + * @param formDTO + * @return + */ + List queryServiceList(ServiceQueryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java new file mode 100644 index 0000000000..7e54904e77 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcUserDemandRecDTO; +import com.epmet.entity.IcUserDemandRecEntity; + +import java.util.List; +import java.util.Map; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +public interface IcUserDemandRecService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcUserDemandRecDTO + * @author generator + * @date 2021-11-19 + */ + IcUserDemandRecDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + void save(IcUserDemandRecDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + void update(IcUserDemandRecDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-19 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index b1e6ca4cf2..5feaf8cf13 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -19,21 +19,26 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcSocietyOrgDao; +import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.form.UserIdsFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.dto.result.StaffSinGridResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.IcSocietyOrgService; +import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.slf4j.Logger; @@ -42,7 +47,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @@ -57,7 +65,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { + List resultList=new ArrayList<>(); + IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); + if(null==icUserDemandRecDTO|| StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ + return resultList; + } + List agencyIds=new ArrayList<>(); + if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ + agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); + }else{ + agencyIds.add(icUserDemandRecDTO.getGridPids()); + } + resultList=baseDao.selectListByAgencyId(agencyIds); + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java new file mode 100644 index 0000000000..fe94978a7a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcUserDemandRecDao; +import com.epmet.dto.IcUserDemandRecDTO; +import com.epmet.entity.IcUserDemandRecEntity; +import com.epmet.service.IcUserDemandRecService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Service +public class IcUserDemandRecServiceImpl extends BaseServiceImpl implements IcUserDemandRecService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcUserDemandRecDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcUserDemandRecDTO.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 IcUserDemandRecDTO get(String id) { + IcUserDemandRecEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcUserDemandRecDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcUserDemandRecDTO dto) { + IcUserDemandRecEntity entity = ConvertUtils.sourceToTarget(dto, IcUserDemandRecEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcUserDemandRecDTO dto) { + IcUserDemandRecEntity entity = ConvertUtils.sourceToTarget(dto, IcUserDemandRecEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index 42adc123a2..d10acf0de1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -42,4 +42,16 @@ ORDER BY created_time DESC + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml new file mode 100644 index 0000000000..0d1b2c9f14 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml new file mode 100644 index 0000000000..3f62cd300d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml new file mode 100644 index 0000000000..08d7883eb1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml new file mode 100644 index 0000000000..b615ea90be --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From ef7d22175dc6f8290dc5bfaf4e5b0e3a87809612 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 19 Nov 2021 16:27:35 +0800 Subject: [PATCH 021/170] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=A1=A8=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{PlaceOrgDTO.java => IcPlaceOrgDTO.java} | 2 +- ...rdDTO.java => IcPlacePatrolRecordDTO.java} | 2 +- ...java => IcPlacePatrolReviewRecordDTO.java} | 2 +- ...TeamDTO.java => IcPlacePatrolTeamDTO.java} | 2 +- ...TO.java => IcPlacePatrolTeamStaffDTO.java} | 2 +- .../PlacePatrolTeamDetailResultDTO.java | 4 +- ...troller.java => IcPlaceOrgController.java} | 6 +-- ...ava => IcPlacePatrolRecordController.java} | 30 +++++++------- ... IcPlacePatrolReviewRecordController.java} | 30 +++++++------- ....java => IcPlacePatrolTeamController.java} | 6 +-- ... => IcPlacePatrolTeamStaffController.java} | 30 +++++++------- .../{PlaceOrgDao.java => IcPlaceOrgDao.java} | 5 +-- ...rdDao.java => IcPlacePatrolRecordDao.java} | 4 +- ...java => IcPlacePatrolReviewRecordDao.java} | 4 +- ...TeamDao.java => IcPlacePatrolTeamDao.java} | 4 +- ...ao.java => IcPlacePatrolTeamStaffDao.java} | 8 ++-- ...ceOrgEntity.java => IcPlaceOrgEntity.java} | 2 +- ...ty.java => IcPlacePatrolRecordEntity.java} | 2 +- ...a => IcPlacePatrolReviewRecordEntity.java} | 2 +- ...tity.java => IcPlacePatrolTeamEntity.java} | 2 +- ...java => IcPlacePatrolTeamStaffEntity.java} | 2 +- ...laceOrgExcel.java => IcPlaceOrgExcel.java} | 2 +- ...cel.java => IcPlacePatrolRecordExcel.java} | 2 +- ...va => IcPlacePatrolReviewRecordExcel.java} | 2 +- ...Excel.java => IcPlacePatrolTeamExcel.java} | 2 +- ....java => IcPlacePatrolTeamStaffExcel.java} | 2 +- ...OrgService.java => IcPlaceOrgService.java} | 4 +- ...e.java => IcPlacePatrolRecordService.java} | 16 ++++---- ... => IcPlacePatrolReviewRecordService.java} | 16 ++++---- ...ice.java => IcPlacePatrolTeamService.java} | 9 +---- ...ava => IcPlacePatrolTeamStaffService.java} | 16 ++++---- ...ceImpl.java => IcPlaceOrgServiceImpl.java} | 20 ++++------ ...va => IcPlacePatrolRecordServiceImpl.java} | 40 +++++++++---------- ...IcPlacePatrolReviewRecordServiceImpl.java} | 40 +++++++++---------- ...java => IcPlacePatrolTeamServiceImpl.java} | 36 +++++++---------- ...=> IcPlacePatrolTeamStaffServiceImpl.java} | 40 +++++++++---------- .../{PlaceOrgDao.xml => IcPlaceOrgDao.xml} | 4 +- ...cordDao.xml => IcPlacePatrolRecordDao.xml} | 2 +- ...o.xml => IcPlacePatrolReviewRecordDao.xml} | 2 +- ...olTeamDao.xml => IcPlacePatrolTeamDao.xml} | 4 +- ...fDao.xml => IcPlacePatrolTeamStaffDao.xml} | 4 +- 41 files changed, 199 insertions(+), 215 deletions(-) rename epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/{PlaceOrgDTO.java => IcPlaceOrgDTO.java} (97%) rename epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/{PlacePatrolRecordDTO.java => IcPlacePatrolRecordDTO.java} (97%) rename epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/{PlacePatrolReviewRecordDTO.java => IcPlacePatrolReviewRecordDTO.java} (96%) rename epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/{PlacePatrolTeamDTO.java => IcPlacePatrolTeamDTO.java} (97%) rename epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/{PlacePatrolTeamStaffDTO.java => IcPlacePatrolTeamStaffDTO.java} (96%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/{PlaceOrgController.java => IcPlaceOrgController.java} (96%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/{PlacePatrolRecordController.java => IcPlacePatrolRecordController.java} (69%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/{PlacePatrolReviewRecordController.java => IcPlacePatrolReviewRecordController.java} (68%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/{PlacePatrolTeamController.java => IcPlacePatrolTeamController.java} (96%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/{PlacePatrolTeamStaffController.java => IcPlacePatrolTeamStaffController.java} (69%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/{PlaceOrgDao.java => IcPlaceOrgDao.java} (88%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/{PlacePatrolRecordDao.java => IcPlacePatrolRecordDao.java} (87%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/{PlacePatrolReviewRecordDao.java => IcPlacePatrolReviewRecordDao.java} (86%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/{PlacePatrolTeamDao.java => IcPlacePatrolTeamDao.java} (90%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/{PlacePatrolTeamStaffDao.java => IcPlacePatrolTeamStaffDao.java} (81%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/{PlaceOrgEntity.java => IcPlaceOrgEntity.java} (97%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/{PlacePatrolRecordEntity.java => IcPlacePatrolRecordEntity.java} (97%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/{PlacePatrolReviewRecordEntity.java => IcPlacePatrolReviewRecordEntity.java} (96%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/{PlacePatrolTeamEntity.java => IcPlacePatrolTeamEntity.java} (96%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/{PlacePatrolTeamStaffEntity.java => IcPlacePatrolTeamStaffEntity.java} (95%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/{PlaceOrgExcel.java => IcPlaceOrgExcel.java} (98%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/{PlacePatrolRecordExcel.java => IcPlacePatrolRecordExcel.java} (98%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/{PlacePatrolReviewRecordExcel.java => IcPlacePatrolReviewRecordExcel.java} (97%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/{PlacePatrolTeamExcel.java => IcPlacePatrolTeamExcel.java} (98%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/{PlacePatrolTeamStaffExcel.java => IcPlacePatrolTeamStaffExcel.java} (97%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/{PlaceOrgService.java => IcPlaceOrgService.java} (93%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/{PlacePatrolRecordService.java => IcPlacePatrolRecordService.java} (80%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/{PlacePatrolReviewRecordService.java => IcPlacePatrolReviewRecordService.java} (78%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/{PlacePatrolTeamService.java => IcPlacePatrolTeamService.java} (88%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/{PlacePatrolTeamStaffService.java => IcPlacePatrolTeamStaffService.java} (80%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/{PlaceOrgServiceImpl.java => IcPlaceOrgServiceImpl.java} (88%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/{PlacePatrolRecordServiceImpl.java => IcPlacePatrolRecordServiceImpl.java} (59%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/{PlacePatrolReviewRecordServiceImpl.java => IcPlacePatrolReviewRecordServiceImpl.java} (56%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/{PlacePatrolTeamServiceImpl.java => IcPlacePatrolTeamServiceImpl.java} (87%) rename epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/{PlacePatrolTeamStaffServiceImpl.java => IcPlacePatrolTeamStaffServiceImpl.java} (60%) rename epmet-module/gov-org/gov-org-server/src/main/resources/mapper/{PlaceOrgDao.xml => IcPlaceOrgDao.xml} (94%) rename epmet-module/gov-org/gov-org-server/src/main/resources/mapper/{PlacePatrolRecordDao.xml => IcPlacePatrolRecordDao.xml} (69%) rename epmet-module/gov-org/gov-org-server/src/main/resources/mapper/{PlacePatrolReviewRecordDao.xml => IcPlacePatrolReviewRecordDao.xml} (67%) rename epmet-module/gov-org/gov-org-server/src/main/resources/mapper/{PlacePatrolTeamDao.xml => IcPlacePatrolTeamDao.xml} (93%) rename epmet-module/gov-org/gov-org-server/src/main/resources/mapper/{PlacePatrolTeamStaffDao.xml => IcPlacePatrolTeamStaffDao.xml} (77%) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java similarity index 97% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java index bc61f843e8..f836ce406f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlaceOrgDTO implements Serializable { +public class IcPlaceOrgDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java similarity index 97% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java index 592ff13956..62f6f491e2 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolRecordDTO implements Serializable { +public class IcPlacePatrolRecordDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java similarity index 96% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java index dbc2160e45..d93e3928c7 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolReviewRecordDTO implements Serializable { +public class IcPlacePatrolReviewRecordDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java similarity index 97% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java index b80cd8509b..6a3816fc29 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamDTO implements Serializable { +public class IcPlacePatrolTeamDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java similarity index 96% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java index 48f69a5c4a..36eb03ac3a 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamStaffDTO implements Serializable { +public class IcPlacePatrolTeamStaffDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java index acbbbbda57..6869a2fb75 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java @@ -1,6 +1,6 @@ package com.epmet.dto.result; -import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; import lombok.Data; import java.io.Serializable; @@ -33,6 +33,6 @@ public class PlacePatrolTeamDetailResultDTO implements Serializable { //创建时间 private String time; //分队成员信息 - private List memberList; + private List memberList; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java similarity index 96% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java index dce1acdc07..413c721b89 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java @@ -26,7 +26,7 @@ import com.epmet.dto.form.EditPlaceOrgFormDTO; import com.epmet.dto.form.GetListPlaceOrgFormDTO; import com.epmet.dto.result.GetListPlaceOrgResultDTO; import com.epmet.dto.result.PlaceOrgDetailResultDTO; -import com.epmet.service.PlaceOrgService; +import com.epmet.service.IcPlaceOrgService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -42,10 +42,10 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("placeorg") -public class PlaceOrgController { +public class IcPlaceOrgController { @Autowired - private PlaceOrgService placeOrgService; + private IcPlaceOrgService placeOrgService; /** * @Author sun diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java similarity index 69% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java index 35cbfad262..5c80607590 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java @@ -25,9 +25,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.PlacePatrolRecordDTO; -import com.epmet.excel.PlacePatrolRecordExcel; -import com.epmet.service.PlacePatrolRecordService; +import com.epmet.dto.IcPlacePatrolRecordDTO; +import com.epmet.excel.IcPlacePatrolRecordExcel; +import com.epmet.service.IcPlacePatrolRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -44,25 +44,25 @@ import java.util.Map; */ @RestController @RequestMapping("placepatrolrecord") -public class PlacePatrolRecordController { +public class IcPlacePatrolRecordController { @Autowired - private PlacePatrolRecordService placePatrolRecordService; + private IcPlacePatrolRecordService placePatrolRecordService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = placePatrolRecordService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = placePatrolRecordService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - PlacePatrolRecordDTO data = placePatrolRecordService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + IcPlacePatrolRecordDTO data = placePatrolRecordService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody PlacePatrolRecordDTO dto){ + public Result save(@RequestBody IcPlacePatrolRecordDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); placePatrolRecordService.save(dto); @@ -70,7 +70,7 @@ public class PlacePatrolRecordController { } @PutMapping - public Result update(@RequestBody PlacePatrolRecordDTO dto){ + public Result update(@RequestBody IcPlacePatrolRecordDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); placePatrolRecordService.update(dto); @@ -87,8 +87,8 @@ public class PlacePatrolRecordController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = placePatrolRecordService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolRecordExcel.class); + List list = placePatrolRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPlacePatrolRecordExcel.class); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java similarity index 68% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java index a6caf1d1aa..7e174799d3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java @@ -25,9 +25,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.PlacePatrolReviewRecordDTO; -import com.epmet.excel.PlacePatrolReviewRecordExcel; -import com.epmet.service.PlacePatrolReviewRecordService; +import com.epmet.dto.IcPlacePatrolReviewRecordDTO; +import com.epmet.excel.IcPlacePatrolReviewRecordExcel; +import com.epmet.service.IcPlacePatrolReviewRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -44,25 +44,25 @@ import java.util.Map; */ @RestController @RequestMapping("placepatrolreviewrecord") -public class PlacePatrolReviewRecordController { +public class IcPlacePatrolReviewRecordController { @Autowired - private PlacePatrolReviewRecordService placePatrolReviewRecordService; + private IcPlacePatrolReviewRecordService placePatrolReviewRecordService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = placePatrolReviewRecordService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = placePatrolReviewRecordService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - PlacePatrolReviewRecordDTO data = placePatrolReviewRecordService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + IcPlacePatrolReviewRecordDTO data = placePatrolReviewRecordService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody PlacePatrolReviewRecordDTO dto){ + public Result save(@RequestBody IcPlacePatrolReviewRecordDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); placePatrolReviewRecordService.save(dto); @@ -70,7 +70,7 @@ public class PlacePatrolReviewRecordController { } @PutMapping - public Result update(@RequestBody PlacePatrolReviewRecordDTO dto){ + public Result update(@RequestBody IcPlacePatrolReviewRecordDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); placePatrolReviewRecordService.update(dto); @@ -87,8 +87,8 @@ public class PlacePatrolReviewRecordController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = placePatrolReviewRecordService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolReviewRecordExcel.class); + List list = placePatrolReviewRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPlacePatrolReviewRecordExcel.class); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java similarity index 96% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java index 5333ab234f..c87c8d771c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java @@ -26,7 +26,7 @@ import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; -import com.epmet.service.PlacePatrolTeamService; +import com.epmet.service.IcPlacePatrolTeamService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -42,10 +42,10 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("placepatrolteam") -public class PlacePatrolTeamController { +public class IcPlacePatrolTeamController { @Autowired - private PlacePatrolTeamService placePatrolTeamService; + private IcPlacePatrolTeamService placePatrolTeamService; /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamStaffController.java similarity index 69% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamStaffController.java index 787d98981e..0ed87c6e42 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamStaffController.java @@ -25,9 +25,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.PlacePatrolTeamStaffDTO; -import com.epmet.excel.PlacePatrolTeamStaffExcel; -import com.epmet.service.PlacePatrolTeamStaffService; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.excel.IcPlacePatrolTeamStaffExcel; +import com.epmet.service.IcPlacePatrolTeamStaffService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -44,25 +44,25 @@ import java.util.Map; */ @RestController @RequestMapping("placepatrolteamstaff") -public class PlacePatrolTeamStaffController { +public class IcPlacePatrolTeamStaffController { @Autowired - private PlacePatrolTeamStaffService placePatrolTeamStaffService; + private IcPlacePatrolTeamStaffService placePatrolTeamStaffService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = placePatrolTeamStaffService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = placePatrolTeamStaffService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - PlacePatrolTeamStaffDTO data = placePatrolTeamStaffService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + IcPlacePatrolTeamStaffDTO data = placePatrolTeamStaffService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody PlacePatrolTeamStaffDTO dto){ + public Result save(@RequestBody IcPlacePatrolTeamStaffDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); placePatrolTeamStaffService.save(dto); @@ -70,7 +70,7 @@ public class PlacePatrolTeamStaffController { } @PutMapping - public Result update(@RequestBody PlacePatrolTeamStaffDTO dto){ + public Result update(@RequestBody IcPlacePatrolTeamStaffDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); placePatrolTeamStaffService.update(dto); @@ -87,8 +87,8 @@ public class PlacePatrolTeamStaffController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = placePatrolTeamStaffService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolTeamStaffExcel.class); + List list = placePatrolTeamStaffService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPlacePatrolTeamStaffExcel.class); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java similarity index 88% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java index 0f396158c1..a3c5c667bd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java @@ -19,9 +19,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.GetListPlaceOrgFormDTO; -import com.epmet.dto.result.GetListPlaceOrgResultDTO; import com.epmet.dto.result.PlaceOrgDetailResultDTO; -import com.epmet.entity.PlaceOrgEntity; +import com.epmet.entity.IcPlaceOrgEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -33,7 +32,7 @@ import java.util.List; * @since v1.0.0 2021-11-18 */ @Mapper -public interface PlaceOrgDao extends BaseDao { +public interface IcPlaceOrgDao extends BaseDao { /** * @Author sun diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolRecordDao.java similarity index 87% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolRecordDao.java index 8d501f16e9..9d2f51de8c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolRecordDao.java @@ -18,7 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PlacePatrolRecordEntity; +import com.epmet.entity.IcPlacePatrolRecordEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -28,6 +28,6 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2021-11-18 */ @Mapper -public interface PlacePatrolRecordDao extends BaseDao { +public interface IcPlacePatrolRecordDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolReviewRecordDao.java similarity index 86% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolReviewRecordDao.java index 6253e7afd2..8c7fb0703e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolReviewRecordDao.java @@ -18,7 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PlacePatrolReviewRecordEntity; +import com.epmet.entity.IcPlacePatrolReviewRecordEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -28,6 +28,6 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2021-11-18 */ @Mapper -public interface PlacePatrolReviewRecordDao extends BaseDao { +public interface IcPlacePatrolReviewRecordDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamDao.java similarity index 90% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamDao.java index 6af5ca74fb..d53d0f24e8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamDao.java @@ -20,7 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; -import com.epmet.entity.PlacePatrolTeamEntity; +import com.epmet.entity.IcPlacePatrolTeamEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -32,7 +32,7 @@ import java.util.List; * @since v1.0.0 2021-11-18 */ @Mapper -public interface PlacePatrolTeamDao extends BaseDao { +public interface IcPlacePatrolTeamDao extends BaseDao { /** * @Author sun diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java similarity index 81% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java index 2009cff9ca..c5af8a717f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java @@ -18,8 +18,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.PlacePatrolTeamStaffDTO; -import com.epmet.entity.PlacePatrolTeamStaffEntity; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -32,7 +32,7 @@ import java.util.List; * @since v1.0.0 2021-11-18 */ @Mapper -public interface PlacePatrolTeamStaffDao extends BaseDao { +public interface IcPlacePatrolTeamStaffDao extends BaseDao { /** * @Author sun @@ -44,5 +44,5 @@ public interface PlacePatrolTeamStaffDao extends BaseDao getByTeamId(@Param("teamId") String teamId); + List getByTeamId(@Param("teamId") String teamId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java similarity index 97% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java index fbe92edea5..4908c96964 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java @@ -34,7 +34,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("place_org") -public class PlaceOrgEntity extends BaseEpmetEntity { +public class IcPlaceOrgEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java similarity index 97% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java index b5a2c64dd2..2431776acb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java @@ -34,7 +34,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("place_patrol_record") -public class PlacePatrolRecordEntity extends BaseEpmetEntity { +public class IcPlacePatrolRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java similarity index 96% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java index 196794d147..3da195adb9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java @@ -34,7 +34,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("place_patrol_review_record") -public class PlacePatrolReviewRecordEntity extends BaseEpmetEntity { +public class IcPlacePatrolReviewRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java similarity index 96% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java index dce4701f43..ea5adbde0d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java @@ -34,7 +34,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("place_patrol_team") -public class PlacePatrolTeamEntity extends BaseEpmetEntity { +public class IcPlacePatrolTeamEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java similarity index 95% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java index f0012def21..0a469ee82c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java @@ -34,7 +34,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("place_patrol_team_staff") -public class PlacePatrolTeamStaffEntity extends BaseEpmetEntity { +public class IcPlacePatrolTeamStaffEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlaceOrgExcel.java similarity index 98% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlaceOrgExcel.java index 83a6fb8792..4647a3e9b9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlaceOrgExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlaceOrgExcel { +public class IcPlaceOrgExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java similarity index 98% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java index ccf1208aaa..7404ed6a42 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolRecordExcel { +public class IcPlacePatrolRecordExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolReviewRecordExcel.java similarity index 97% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolReviewRecordExcel.java index c98b265c27..3a997045a3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolReviewRecordExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolReviewRecordExcel { +public class IcPlacePatrolReviewRecordExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java similarity index 98% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java index b77fce4de4..b690216b1e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamExcel { +public class IcPlacePatrolTeamExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamStaffExcel.java similarity index 97% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamStaffExcel.java index db8c9c250a..99e1641231 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamStaffExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamStaffExcel { +public class IcPlacePatrolTeamStaffExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java similarity index 93% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java index 733ef7db48..e8fed58f7a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java @@ -23,7 +23,7 @@ import com.epmet.dto.form.EditPlaceOrgFormDTO; import com.epmet.dto.form.GetListPlaceOrgFormDTO; import com.epmet.dto.result.GetListPlaceOrgResultDTO; import com.epmet.dto.result.PlaceOrgDetailResultDTO; -import com.epmet.entity.PlaceOrgEntity; +import com.epmet.entity.IcPlaceOrgEntity; /** * 九小场所下组织管理 @@ -31,7 +31,7 @@ import com.epmet.entity.PlaceOrgEntity; * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ -public interface PlaceOrgService extends BaseService { +public interface IcPlaceOrgService extends BaseService { /** * @Author sun diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java similarity index 80% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java index 51d4885918..3c0ed4b02c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java @@ -19,8 +19,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.PlacePatrolRecordDTO; -import com.epmet.entity.PlacePatrolRecordEntity; +import com.epmet.dto.IcPlacePatrolRecordDTO; +import com.epmet.entity.IcPlacePatrolRecordEntity; import java.util.List; import java.util.Map; @@ -31,7 +31,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ -public interface PlacePatrolRecordService extends BaseService { +public interface IcPlacePatrolRecordService extends BaseService { /** * 默认分页 @@ -41,7 +41,7 @@ public interface PlacePatrolRecordService extends BaseService page(Map params); + PageData page(Map params); /** * 默认查询 @@ -51,7 +51,7 @@ public interface PlacePatrolRecordService extends BaseService list(Map params); + List list(Map params); /** * 单条查询 @@ -61,7 +61,7 @@ public interface PlacePatrolRecordService extends BaseService { +public interface IcPlacePatrolReviewRecordService extends BaseService { /** * 默认分页 @@ -41,7 +41,7 @@ public interface PlacePatrolReviewRecordService extends BaseService page(Map params); + PageData page(Map params); /** * 默认查询 @@ -51,7 +51,7 @@ public interface PlacePatrolReviewRecordService extends BaseService list(Map params); + List list(Map params); /** * 单条查询 @@ -61,7 +61,7 @@ public interface PlacePatrolReviewRecordService extends BaseService { +public interface IcPlacePatrolTeamService extends BaseService { /** * @Author sun diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamStaffService.java similarity index 80% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamStaffService.java index e124aadd1b..ec3fea917a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamStaffService.java @@ -19,8 +19,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.PlacePatrolTeamStaffDTO; -import com.epmet.entity.PlacePatrolTeamStaffEntity; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; import java.util.List; import java.util.Map; @@ -31,7 +31,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ -public interface PlacePatrolTeamStaffService extends BaseService { +public interface IcPlacePatrolTeamStaffService extends BaseService { /** * 默认分页 @@ -41,7 +41,7 @@ public interface PlacePatrolTeamStaffService extends BaseService page(Map params); + PageData page(Map params); /** * 默认查询 @@ -51,7 +51,7 @@ public interface PlacePatrolTeamStaffService extends BaseService list(Map params); + List list(Map params); /** * 单条查询 @@ -61,7 +61,7 @@ public interface PlacePatrolTeamStaffService extends BaseService implements PlaceOrgService { - private static final Logger log = LoggerFactory.getLogger(PlaceOrgServiceImpl.class); +public class IcPlaceOrgServiceImpl extends BaseServiceImpl implements IcPlaceOrgService { + private static final Logger log = LoggerFactory.getLogger(IcPlaceOrgServiceImpl.class); @Autowired private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; @@ -68,7 +64,7 @@ public class PlaceOrgServiceImpl extends BaseServiceImpl%s", formDTO.getPlaceOrgId())); } - entity = ConvertUtils.sourceToTarget(formDTO, PlaceOrgEntity.class); + entity = ConvertUtils.sourceToTarget(formDTO, IcPlaceOrgEntity.class); baseDao.updateById(entity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java similarity index 59% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java index 6953888aac..1f1eae6568 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java @@ -23,10 +23,10 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.dao.PlacePatrolRecordDao; -import com.epmet.dto.PlacePatrolRecordDTO; -import com.epmet.entity.PlacePatrolRecordEntity; -import com.epmet.service.PlacePatrolRecordService; +import com.epmet.dao.IcPlacePatrolRecordDao; +import com.epmet.dto.IcPlacePatrolRecordDTO; +import com.epmet.entity.IcPlacePatrolRecordEntity; +import com.epmet.service.IcPlacePatrolRecordService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -42,51 +42,51 @@ import java.util.Map; * @since v1.0.0 2021-11-18 */ @Service -public class PlacePatrolRecordServiceImpl extends BaseServiceImpl implements PlacePatrolRecordService { +public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl implements IcPlacePatrolRecordService { @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, PlacePatrolRecordDTO.class); + return getPageData(page, IcPlacePatrolRecordDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, PlacePatrolRecordDTO.class); + return ConvertUtils.sourceToTarget(entityList, IcPlacePatrolRecordDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public PlacePatrolRecordDTO get(String id) { - PlacePatrolRecordEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, PlacePatrolRecordDTO.class); + public IcPlacePatrolRecordDTO get(String id) { + IcPlacePatrolRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPlacePatrolRecordDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(PlacePatrolRecordDTO dto) { - PlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolRecordEntity.class); + public void save(IcPlacePatrolRecordDTO dto) { + IcPlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcPlacePatrolRecordEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(PlacePatrolRecordDTO dto) { - PlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolRecordEntity.class); + public void update(IcPlacePatrolRecordDTO dto) { + IcPlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcPlacePatrolRecordEntity.class); updateById(entity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java similarity index 56% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java index 532bbc2545..8f42a76201 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java @@ -23,10 +23,10 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.dao.PlacePatrolReviewRecordDao; -import com.epmet.dto.PlacePatrolReviewRecordDTO; -import com.epmet.entity.PlacePatrolReviewRecordEntity; -import com.epmet.service.PlacePatrolReviewRecordService; +import com.epmet.dao.IcPlacePatrolReviewRecordDao; +import com.epmet.dto.IcPlacePatrolReviewRecordDTO; +import com.epmet.entity.IcPlacePatrolReviewRecordEntity; +import com.epmet.service.IcPlacePatrolReviewRecordService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -42,51 +42,51 @@ import java.util.Map; * @since v1.0.0 2021-11-18 */ @Service -public class PlacePatrolReviewRecordServiceImpl extends BaseServiceImpl implements PlacePatrolReviewRecordService { +public class IcPlacePatrolReviewRecordServiceImpl extends BaseServiceImpl implements IcPlacePatrolReviewRecordService { @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, PlacePatrolReviewRecordDTO.class); + return getPageData(page, IcPlacePatrolReviewRecordDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, PlacePatrolReviewRecordDTO.class); + return ConvertUtils.sourceToTarget(entityList, IcPlacePatrolReviewRecordDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public PlacePatrolReviewRecordDTO get(String id) { - PlacePatrolReviewRecordEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, PlacePatrolReviewRecordDTO.class); + public IcPlacePatrolReviewRecordDTO get(String id) { + IcPlacePatrolReviewRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPlacePatrolReviewRecordDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(PlacePatrolReviewRecordDTO dto) { - PlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolReviewRecordEntity.class); + public void save(IcPlacePatrolReviewRecordDTO dto) { + IcPlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcPlacePatrolReviewRecordEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(PlacePatrolReviewRecordDTO dto) { - PlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolReviewRecordEntity.class); + public void update(IcPlacePatrolReviewRecordDTO dto) { + IcPlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcPlacePatrolReviewRecordEntity.class); updateById(entity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java similarity index 87% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index 1b331bdefb..465468314c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -26,26 +26,20 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.CustomerGridDao; -import com.epmet.dao.PlacePatrolTeamDao; +import com.epmet.dao.IcPlacePatrolTeamDao; import com.epmet.dto.CustomerGridDTO; -import com.epmet.dto.PlacePatrolTeamStaffDTO; import com.epmet.dto.form.AddPlacePatrolTeamFormDTO; import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; -import com.epmet.dto.form.GetListPlaceOrgFormDTO; import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; -import com.epmet.dto.result.GetListPlaceOrgResultDTO; import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; -import com.epmet.dto.result.PlaceOrgDetailResultDTO; import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; -import com.epmet.entity.PlaceOrgEntity; -import com.epmet.entity.PlacePatrolTeamEntity; -import com.epmet.entity.PlacePatrolTeamStaffEntity; +import com.epmet.entity.IcPlacePatrolTeamEntity; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; import com.epmet.feign.EpmetAdminOpenFeignClient; -import com.epmet.service.PlacePatrolTeamService; -import com.epmet.service.PlacePatrolTeamStaffService; +import com.epmet.service.IcPlacePatrolTeamService; +import com.epmet.service.IcPlacePatrolTeamStaffService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import org.apache.ibatis.annotations.Param; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -64,12 +58,12 @@ import java.util.stream.Collectors; * @since v1.0.0 2021-11-18 */ @Service -public class PlacePatrolTeamServiceImpl extends BaseServiceImpl implements PlacePatrolTeamService { - private static final Logger log = LoggerFactory.getLogger(PlacePatrolTeamServiceImpl.class); +public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl implements IcPlacePatrolTeamService { + private static final Logger log = LoggerFactory.getLogger(IcPlacePatrolTeamServiceImpl.class); @Autowired private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; @Autowired - private PlacePatrolTeamStaffService placePatrolTeamStaffService; + private IcPlacePatrolTeamStaffService placePatrolTeamStaffService; @Autowired private CustomerGridDao customerGridDao; @@ -81,15 +75,15 @@ public class PlacePatrolTeamServiceImpl extends BaseServiceImpl entityList = new ArrayList<>(); + List entityList = new ArrayList<>(); formDTO.getMemberList().forEach(m -> { - PlacePatrolTeamStaffEntity entity1 = new PlacePatrolTeamStaffEntity(); + IcPlacePatrolTeamStaffEntity entity1 = new IcPlacePatrolTeamStaffEntity(); entity1.setCustomerId(formDTO.getCustomerId()); entity1.setPlacePatrolTeamId(entity.getId()); entity1.setName(m.getName()); @@ -108,16 +102,16 @@ public class PlacePatrolTeamServiceImpl extends BaseServiceImpl%s", formDTO.getTeamId())); } - entity = ConvertUtils.sourceToTarget(formDTO, PlacePatrolTeamEntity.class); + entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolTeamEntity.class); baseDao.updateById(entity); //2.全删全增分队成员字表数据 - List entityList = new ArrayList<>(); + List entityList = new ArrayList<>(); for (EditPlacePatrolTeamFormDTO.Member m : formDTO.getMemberList()) { - PlacePatrolTeamStaffEntity entity1 = new PlacePatrolTeamStaffEntity(); + IcPlacePatrolTeamStaffEntity entity1 = new IcPlacePatrolTeamStaffEntity(); entity1.setCustomerId(entity.getCustomerId()); entity1.setPlacePatrolTeamId(entity.getId()); entity1.setName(m.getName()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java similarity index 60% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java index e707539673..21e1733726 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java @@ -23,10 +23,10 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.dao.PlacePatrolTeamStaffDao; -import com.epmet.dto.PlacePatrolTeamStaffDTO; -import com.epmet.entity.PlacePatrolTeamStaffEntity; -import com.epmet.service.PlacePatrolTeamStaffService; +import com.epmet.dao.IcPlacePatrolTeamStaffDao; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; +import com.epmet.service.IcPlacePatrolTeamStaffService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -42,51 +42,51 @@ import java.util.Map; * @since v1.0.0 2021-11-18 */ @Service -public class PlacePatrolTeamStaffServiceImpl extends BaseServiceImpl implements PlacePatrolTeamStaffService { +public class IcPlacePatrolTeamStaffServiceImpl extends BaseServiceImpl implements IcPlacePatrolTeamStaffService { @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, PlacePatrolTeamStaffDTO.class); + return getPageData(page, IcPlacePatrolTeamStaffDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, PlacePatrolTeamStaffDTO.class); + return ConvertUtils.sourceToTarget(entityList, IcPlacePatrolTeamStaffDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public PlacePatrolTeamStaffDTO get(String id) { - PlacePatrolTeamStaffEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, PlacePatrolTeamStaffDTO.class); + public IcPlacePatrolTeamStaffDTO get(String id) { + IcPlacePatrolTeamStaffEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPlacePatrolTeamStaffDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(PlacePatrolTeamStaffDTO dto) { - PlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamStaffEntity.class); + public void save(IcPlacePatrolTeamStaffDTO dto) { + IcPlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, IcPlacePatrolTeamStaffEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(PlacePatrolTeamStaffDTO dto) { - PlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamStaffEntity.class); + public void update(IcPlacePatrolTeamStaffDTO dto) { + IcPlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, IcPlacePatrolTeamStaffEntity.class); updateById(entity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml similarity index 94% rename from epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml rename to epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml index 7eae07e789..4d04a72530 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml @@ -1,7 +1,7 @@ - + SELECT diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml similarity index 77% rename from epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml rename to epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml index 1c8abde218..5e63b8ee6d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml @@ -1,7 +1,7 @@ - + DELETE @@ -11,7 +11,7 @@ place_patrol_team_id = #{teamId} - SELECT * FROM From 2acf90aade4e314cec41d840054ca5d6f385ee6c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 17:21:55 +0800 Subject: [PATCH 022/170] emm --- .../DelCommunitySelfOrganizationFormDTO.java | 22 +++++++++++++++++++ ...IcCommunitySelfOrganizationController.java | 14 ++++++++++++ .../IcCommunitySelfOrganizationService.java | 10 +++++++++ ...cCommunitySelfOrganizationServiceImpl.java | 13 +++++++++++ ...cCommunitySelfOrganizationPersonnelDao.xml | 4 ++-- 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java new file mode 100644 index 0000000000..67ee078676 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/19 4:19 下午 + * @DESC + */ +@Data +public class DelCommunitySelfOrganizationFormDTO implements Serializable { + + private static final long serialVersionUID = 789228513283561471L; + + public interface DelCommunitySelfOrganizationForm{} + + @NotBlank(message = "orgId不能为空",groups = DelCommunitySelfOrganizationForm.class) + private String orgId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index f805d75a72..d006f4cc07 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -31,6 +31,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; @@ -139,4 +140,17 @@ public class IcCommunitySelfOrganizationController { return new Result().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO)); } + /** + * @Description 社区自组织删除 + * @param formDTO + * @author zxc + * @date 2021/11/19 4:22 下午 + */ + @PostMapping("delcommunityselforganization") + public Result delCommunitySelfOrganization(@RequestBody DelCommunitySelfOrganizationFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, DelCommunitySelfOrganizationFormDTO.DelCommunitySelfOrganizationForm.class); + icCommunitySelfOrganizationService.delCommunitySelfOrganization(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 7de1d51965..273006cd50 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; @@ -124,4 +125,13 @@ public interface IcCommunitySelfOrganizationService extends BaseService - + DELETE FROM ic_community_self_organization_personnel WHERE ORG_ID = #{orgId} - + \ No newline at end of file From 821383e3f638605a1efc42a34622f7855ed1b7c3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 19 Nov 2021 17:40:57 +0800 Subject: [PATCH 023/170] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...IcCommunitySelfOrganizationController.java | 19 +++++++++-- .../dao/IcCommunitySelfOrganizationDao.java | 5 ++- .../java/com/epmet/dao/IcSocietyOrgDao.java | 2 +- .../IcCommunitySelfOrganizationService.java | 11 +++++++ ...cCommunitySelfOrganizationServiceImpl.java | 33 +++++++++++++++---- .../service/impl/IcSocietyOrgServiceImpl.java | 2 +- .../mapper/IcCommunitySelfOrganizationDao.xml | 15 +++++++++ .../main/resources/mapper/IcSocietyOrgDao.xml | 3 ++ 8 files changed, 78 insertions(+), 12 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index f805d75a72..db5347343f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -20,19 +20,20 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; @@ -139,4 +140,18 @@ public class IcCommunitySelfOrganizationController { return new Result().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO)); } + /** + * 需求指派,选择社区自组织,调用此接口 + * 返回需求所属社区下的 组织 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("servicelist") + public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.DemandId.class); + return new Result>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index b205741829..4f9eaafc16 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -19,8 +19,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; -import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -52,4 +52,7 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao selectCommunitySelfOrganizationList(CommunitySelfOrganizationListFormDTO formDTO); + List selectListByAgencyId(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("orgName") String orgName); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java index 0b4016b19d..70b96f7474 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java @@ -48,5 +48,5 @@ public interface IcSocietyOrgDao extends BaseDao { * @param agencyIds * @return */ - List selectListByAgencyId(@Param("agencyIds")List agencyIds); + List selectListByAgencyId(@Param("agencyIds")List agencyIds,@Param("societyName")String societyName); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 7de1d51965..b389335642 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -24,7 +24,9 @@ import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import java.util.List; @@ -124,4 +126,13 @@ public interface IcCommunitySelfOrganizationService extends BaseService queryServiceList(ServiceQueryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index c06af3f0dc..105988ba56 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -15,21 +16,23 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.validator.PhoneValidatorUtils; import com.epmet.constant.IcCommunitySelfOrganizationConstant; import com.epmet.dao.IcCommunitySelfOrganizationDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; import com.epmet.service.IcCommunitySelfOrganizationService; +import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.collections4.CollectionUtils; @@ -38,11 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.xml.crypto.Data; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN; @@ -57,6 +56,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl page(Map params) { @@ -222,4 +223,22 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { + List resultList=new ArrayList<>(); + IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); + if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getAgencyId())){ + return resultList; + } + resultList=baseDao.selectListByAgencyId(formDTO.getCustomerId(),icUserDemandRecDTO.getAgencyId(),formDTO.getServiceName()); + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 5feaf8cf13..7f197b140c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -155,7 +155,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl ORDER BY so.ORGANIZATION_CREATED_TIME DESC + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index d10acf0de1..86795b1c8c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -52,6 +52,9 @@ WHERE del_flag = '0' and AGENCY_ID=#{agencyId} + + and society_name concat('%',#{societyName},'%') + \ No newline at end of file From 2c0cde139aee1d8132a4e631ed3385cc4fe2c625 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 19 Nov 2021 17:44:15 +0800 Subject: [PATCH 024/170] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcCommunitySelfOrganizationController.java | 3 +++ .../com/epmet/service/IcCommunitySelfOrganizationService.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index f5291bb1e5..07850adb8f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -30,8 +30,11 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 2d3a15da49..d9b536b625 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -23,8 +23,11 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import java.util.List; From 01d096f5d0b5d4d264674e560cee6359f67f85da Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 19 Nov 2021 17:56:13 +0800 Subject: [PATCH 025/170] =?UTF-8?q?=E8=81=94=E5=BB=BA=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=92=8C=E6=B4=BB=E5=8A=A8=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/EpmetAdminOpenFeignClient.java | 12 ++++ .../EpmetAdminOpenFeignClientFallback.java | 7 ++- .../controller/SysDictDataController.java | 12 ++++ .../com/epmet/service/SysDictDataService.java | 4 +- .../service/impl/SysDictDataServiceImpl.java | 7 ++- .../commons/tools/enums/DictTypeEnum.java | 55 +++++++++++++++++++ .../java/com/epmet/dto/IcPartyUnitDTO.java | 8 +-- .../com/epmet/dto/form/PartyUnitFormDTO.java | 26 +++++++++ .../epmet-heart/epmet-heart-server/pom.xml | 6 ++ .../controller/IcPartyUnitController.java | 9 +-- .../com/epmet/entity/IcPartyUnitEntity.java | 5 -- .../com/epmet/service/IcPartyUnitService.java | 5 +- .../service/impl/IcPartyUnitServiceImpl.java | 40 ++++++++++---- 13 files changed, 164 insertions(+), 32 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java index 9faf6cabaf..e28914d26f 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java @@ -6,9 +6,11 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import java.util.List; +import java.util.Map; @FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class) //@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class, url = "localhost:8082") @@ -72,4 +74,14 @@ public interface EpmetAdminOpenFeignClient { */ @PostMapping("/sys/dict/data/relationship") Result> getRelationshipOption(); + + /** + * 字典数据查询通用接口 + * @Param dictType + * @Return {@link Result< Map < String, String>>} + * @Author zhaoqifeng + * @Date 2021/11/19 17:36 + */ + @PostMapping("/sys/dict/data/dictMap/{dictType}") + Result> dictMap(@PathVariable("dictType") String dictType); } diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java index 6ba1f8bee7..fec84ab1fd 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java @@ -6,9 +6,9 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.EpmetAdminOpenFeignClient; -import org.springframework.stereotype.Component; import java.util.List; +import java.util.Map; //@Component public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignClient { @@ -41,4 +41,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli public Result> getRelationshipOption() { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRelationshipOption", null); } + + @Override + public Result> dictMap(String dictType) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "dictMap", dictType); + } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java index 18e0437551..1424f480ed 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java @@ -150,4 +150,16 @@ public class SysDictDataController { return new Result>().ok(sysDictDataService.dictList(formDTO.getDictType())); } + /** + * 字典数据查询通用接口 + * @Param dictType + * @Return {@link Result< Map< String, String>>} + * @Author zhaoqifeng + * @Date 2021/11/19 17:36 + */ + @PostMapping("dictMap/{dictType}") + public Result> dictMap(@PathVariable("dictType") String dictType) { + return new Result>().ok(sysDictDataService.dictMap(dictType)); + } + } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java index 0d64ee0d8c..9109cfdc86 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java @@ -9,7 +9,6 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.dto.form.DictListFormDTO; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; @@ -85,4 +84,7 @@ public interface SysDictDataService extends BaseService { * @Author sun */ List dictList(String dictType); + + + Map dictMap(String dictType); } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java index 468fb764c7..d3c61d6c16 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java @@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.dto.form.DictListFormDTO; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; @@ -212,4 +211,10 @@ public class SysDictDataServiceImpl extends BaseServiceImpl dictMap(String dictType) { + List resultDTOList = baseDao.selectDictList(dictType); + return resultDTOList.stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel)); + } + } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java new file mode 100644 index 0000000000..fc40fcae64 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -0,0 +1,55 @@ +package com.epmet.commons.tools.enums; + +/** + * @author Administrator + */ +public enum DictTypeEnum { + /** + * 环境变量枚举 + */ + UN_KNOWN("un_know", "暂不清楚", 0), + NINE_SMALL_PLACES("nine_small_places", "九小场所", 1), + EDUCATION("education", "文化程度", 2), + NATION("nation", "民族", 3), + RELATIONSHIP("relationship", "与户主关系", 4), + HOUSE("house", "住房性质", 5), + SCALE("scale", "人员规模", 6), + PARTY_UNIT_TYPE("party_unit_type", "联建单位分类", 7), + GENDER("gender", "性别", 8), + ; + + private final String code; + private final String name; + private final Integer sort; + + + + DictTypeEnum(String code, String name, Integer sort) { + this.code = code; + this.name = name; + this.sort = sort; + } + + public static DictTypeEnum getEnum(String code) { + DictTypeEnum[] values = DictTypeEnum.values(); + for (DictTypeEnum value : values) { + if (value.getCode().equals(code)) { + return value; + } + } + return DictTypeEnum.UN_KNOWN; + } + + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public Integer getSort(){ + return sort; + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java index aba783f5bb..f004a954ed 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -48,11 +49,6 @@ public class IcPartyUnitDTO implements Serializable { */ private String agencyId; - /** - * 网格ID - */ - private String gridId; - /** * */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java new file mode 100644 index 0000000000..683cee2803 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/11/19 16:19 + */ +@NoArgsConstructor +@Data +public class PartyUnitFormDTO implements Serializable { + + private static final long serialVersionUID = 1256798619648265622L; + private String agencyId; + private String unitName; + private String serviceMatter; + private String type; + private String contact; + private String contactMobile; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index b5b36b0ee1..648896a0c9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -82,6 +82,12 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + compile + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 08a1dce987..4221fed0e3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -23,9 +23,10 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.excel.IcPartyUnitExcel; import com.epmet.service.IcPartyUnitService; import org.springframework.beans.factory.annotation.Autowired; @@ -49,9 +50,9 @@ public class IcPartyUnitController { @Autowired private IcPartyUnitService icPartyUnitService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icPartyUnitService.page(params); + @GetMapping("list") + public Result> search(@RequestBody PartyUnitFormDTO formDTO){ + PageData page = icPartyUnitService.search(formDTO); return new Result>().ok(page); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java index 70061e6edb..f789736b80 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java @@ -48,11 +48,6 @@ public class IcPartyUnitEntity extends BaseEpmetEntity { */ private String agencyId; - /** - * 网格ID - */ - private String gridId; - /** * */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index 4e665d6cd8..aa0bc8ba85 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.entity.IcPartyUnitEntity; import java.util.List; @@ -36,12 +37,12 @@ public interface IcPartyUnitService extends BaseService { /** * 默认分页 * - * @param params + * @param formDTO * @return PageData * @author generator * @date 2021-11-19 */ - PageData page(Map params); + PageData search(PartyUnitFormDTO formDTO); /** * 默认查询 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index ad00d1ae9e..dcca7d0d2a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -17,22 +17,27 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcPartyUnitDao; import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.entity.IcPartyUnitEntity; -import com.epmet.redis.IcPartyUnitRedis; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.IcPartyUnitService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; 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 javax.annotation.Resource; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -46,16 +51,27 @@ import java.util.Map; @Service public class IcPartyUnitServiceImpl extends BaseServiceImpl implements IcPartyUnitService { - @Autowired - private IcPartyUnitRedis icPartyUnitRedis; + @Resource + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, IcPartyUnitDTO.class); + public PageData search(PartyUnitFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getType()), IcPartyUnitEntity::getType, formDTO.getType()); + wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact()); + wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); + Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); + dtoList.forEach(item -> { + item.setType(unitTypeMap.getData().get(item.getType())); + }); + PageInfo pageInfo = new PageInfo<>(dtoList); + return new PageData<>(dtoList, pageInfo.getTotal()); } @Override From 19a32e59e5affa0e57b425d7461323eaeb0f92ed Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 08:58:04 +0800 Subject: [PATCH 026/170] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcCommunitySelfOrganizationServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 27edde0cc5..8187ca6fd2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -164,6 +164,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl Date: Mon, 22 Nov 2021 09:27:03 +0800 Subject: [PATCH 027/170] =?UTF-8?q?errorCode=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/exception/EpmetErrorCode.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 0189e7690c..37034958e9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -137,6 +137,10 @@ public enum EpmetErrorCode { TIME_FORMAT_ERROR(8523, "时间格式错误"), // 社区自组织 COMMUNITY_SELF_ORGANIZATION_REPART_ERROR(8524, "社区自组织名称已存在"), + + // 党群服务中心 + PARTY_SERVICE_CENTER_ERROR(8525, "党群服务中心名称已存在"), + // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), From 1759dbb674463edcd575067addbfd2fca785ff08 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Nov 2021 09:57:09 +0800 Subject: [PATCH 028/170] =?UTF-8?q?=E6=8C=87=E6=B4=BE=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/demand/SubCodeFormDTO.java | 2 ++ .../controller/IcPartyUnitController.java | 18 ++++++++++ .../java/com/epmet/dao/IcPartyUnitDao.java | 15 +++++++- .../com/epmet/dao/IcResiDemandDictDao.java | 4 ++- .../java/com/epmet/dao/IcSocietyOrgDao.java | 2 +- .../com/epmet/service/IcPartyUnitService.java | 12 +++++++ .../service/impl/IcPartyUnitServiceImpl.java | 34 +++++++++++++++++++ .../impl/IcResiDemandDictServiceImpl.java | 2 +- .../service/impl/IcSocietyOrgServiceImpl.java | 2 +- .../main/resources/mapper/IcPartyUnitDao.xml | 17 ++++++++++ .../resources/mapper/IcResiDemandDictDao.xml | 3 ++ .../main/resources/mapper/IcSocietyOrgDao.xml | 1 + 12 files changed, 107 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java index 5fecd09258..d7952fd53a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java @@ -12,4 +12,6 @@ public class SubCodeFormDTO implements Serializable { private String customerId; @NotBlank(message = "parentCategoryCode不能为空",groups = AddUserInternalGroup.class) private String parentCategoryCode; + + private String categoryName; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 4221fed0e3..4b7f3aa7a0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -27,6 +29,8 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcPartyUnitExcel; import com.epmet.service.IcPartyUnitService; import org.springframework.beans.factory.annotation.Autowired; @@ -92,4 +96,18 @@ public class IcPartyUnitController { ExcelUtils.exportExcelToTarget(response, null, list, IcPartyUnitExcel.class); } + /** + * 需求指派,选择区域化党建单位,调用此接口 + * 返回需求所属组织线上的数据 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("servicelist") + public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.DemandId.class); + return new Result>().ok(icPartyUnitService.queryServiceList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index 05d78b6bc5..caf1f6336c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 联建单位 @@ -29,5 +33,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcPartyUnitDao extends BaseDao { - + + /** + * 需求指派,选择区域化党建单位,调用此接口 + * @param agencyIds + * @param unitName + * @return + */ + List selectListByAgencyId(@Param("agencyIds") List agencyIds, + @Param("unitName") String unitName, + @Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java index d58dce2d8a..90c35d1689 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java @@ -41,7 +41,9 @@ public interface IcResiDemandDictDao extends BaseDao { String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set codeSet); - List selectByPCode(@Param("pcode") String pcode, @Param("customerId") String customerId); + List selectByPCode(@Param("pcode") String pcode, + @Param("customerId") String customerId, + @Param("categoryName")String categoryName); List pageSelect(@Param("customerId") String customerId, @Param("firstCategoryCode")String firstCategoryCode); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java index 70b96f7474..f86799747a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java @@ -48,5 +48,5 @@ public interface IcSocietyOrgDao extends BaseDao { * @param agencyIds * @return */ - List selectListByAgencyId(@Param("agencyIds")List agencyIds,@Param("societyName")String societyName); + List selectListByAgencyId(@Param("agencyIds")List agencyIds,@Param("societyName")String societyName,@Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index aa0bc8ba85..103885739d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import java.util.List; @@ -93,4 +95,14 @@ public interface IcPartyUnitService extends BaseService { * @date 2021-11-19 */ void delete(String[] ids); + + /** + * 需求指派,选择区域化党建单位,调用此接口 + * 返回需求所属组织线上的数据 + * + * @param formDTO + * @param formDTO + * @return + */ + List queryServiceList(ServiceQueryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index dcca7d0d2a..732f1404b0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -21,23 +21,30 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcPartyUnitDao; import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.IcPartyUnitService; +import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; 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 javax.annotation.Resource; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -53,6 +60,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl search(PartyUnitFormDTO formDTO) { @@ -117,4 +127,28 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { + List resultList=new ArrayList<>(); + IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); + if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ + return resultList; + } + List agencyIds=new ArrayList<>(); + if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ + agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); + }else{ + agencyIds.add(icUserDemandRecDTO.getGridPids()); + } + resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index fd30b41bd3..ad73266116 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -200,7 +200,7 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl querySubCodeList(SubCodeFormDTO formDTO) { - return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId()); + return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId(),formDTO.getCategoryName()); } @Override diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 7f197b140c..d96c09ea5c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -155,7 +155,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index d9b7adb0ac..ad86fe5a27 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -84,6 +84,9 @@ m.DEL_FLAG = '0' AND m.CUSTOMER_ID = #{customerId} and m.PARENT_CODE = #{pcode} + + and m.category_name like concat('%',#{categoryName},'%') + order by m.sort asc diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index 86795b1c8c..c487fbcccd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -51,6 +51,7 @@ ic_society_org WHERE del_flag = '0' + and CUSTOMER_ID=#{customerId} and AGENCY_ID=#{agencyId} and society_name concat('%',#{societyName},'%') From 7e50856ea7a2049197ea1f51d5c27d8bd4757f1b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 10:09:30 +0800 Subject: [PATCH 029/170] =?UTF-8?q?=E5=85=9A=E7=BE=A4=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/AddPartyServiceCenterFormDTO.java | 80 +++++++++++++++++++ .../constant/PartyServiceCenterConstant.java | 12 +++ .../IcPartyServiceCenterController.java | 17 ++++ .../service/IcPartyServiceCenterService.java | 11 +++ .../impl/IcPartyServiceCenterServiceImpl.java | 61 ++++++++++++++ 5 files changed, 181 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPartyServiceCenterFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPartyServiceCenterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPartyServiceCenterFormDTO.java new file mode 100644 index 0000000000..2c122705c7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPartyServiceCenterFormDTO.java @@ -0,0 +1,80 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/22 9:05 上午 + * @DESC + */ +@Data +public class AddPartyServiceCenterFormDTO implements Serializable { + + private static final long serialVersionUID = -230856877756036529L; + + public interface AddPartyServiceCenterForm{} + + /** + * 中心名称 + */ + @NotBlank(message = "centerName不能为空",groups = AddPartyServiceCenterForm.class) + private String centerName; + + /** + * 社区地址 + */ + @NotBlank(message = "address不能为空",groups = AddPartyServiceCenterForm.class) + private String address; + + /** + * 办公电话 + */ + @NotBlank(message = "workPhone不能为空",groups = AddPartyServiceCenterForm.class) + private String workPhone; + + /** + * 上午开始时间 + */ + @NotBlank(message = "amStartTime不能为空",groups = AddPartyServiceCenterForm.class) + private String amStartTime; + + /** + * 上午结束时间 + */ + @NotBlank(message = "amEndTime不能为空",groups = AddPartyServiceCenterForm.class) + private String amEndTime; + + /** + * 下午开始时间 + */ + @NotBlank(message = "pmStartTime不能为空",groups = AddPartyServiceCenterForm.class) + private String pmStartTime; + + /** + * 下午结束时间 + */ + @NotBlank(message = "pmEndTime不能为空",groups = AddPartyServiceCenterForm.class) + private String pmEndTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = AddPartyServiceCenterForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = AddPartyServiceCenterForm.class) + private String latitude; + + /** + * 可预约事项 + */ + private List matterList; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java new file mode 100644 index 0000000000..818c2921b4 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java @@ -0,0 +1,12 @@ +package com.epmet.constant; + +/** + * @Author zxc + * @DateTime 2021/11/22 9:29 上午 + * @DESC + */ +public interface PartyServiceCenterConstant { + + String ORG_TYPE_AGENCY = "agency"; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index dc9df26699..724415a894 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.dto.form.AddPartyServiceCenterFormDTO; import com.epmet.excel.IcPartyServiceCenterExcel; import com.epmet.service.IcPartyServiceCenterService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +94,18 @@ public class IcPartyServiceCenterController { ExcelUtils.exportExcelToTarget(response, null, list, IcPartyServiceCenterExcel.class); } + /** + * @Description 新增党群服务中心 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 9:13 上午 + */ + @PostMapping("addpartyservicecenter") + public Result addPartyServiceCenter(@RequestBody AddPartyServiceCenterFormDTO formDTO, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, AddPartyServiceCenterFormDTO.AddPartyServiceCenterForm.class); + icPartyServiceCenterService.addPartyServiceCenter(formDTO,tokenDto); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java index 8da75be135..85bd8b9c8e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java @@ -19,7 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.dto.form.AddPartyServiceCenterFormDTO; import com.epmet.entity.IcPartyServiceCenterEntity; import java.util.List; @@ -92,4 +94,13 @@ public interface IcPartyServiceCenterService extends BaseService implements IcPartyServiceCenterService { + @Autowired + private IcPartyServiceCenterMatterService matterService; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -97,4 +115,47 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); + l.eq(IcPartyServiceCenterEntity::getCenterName,formDTO.getCenterName()) + .eq(IcPartyServiceCenterEntity::getCustomerId,customerId) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO); + IcPartyServiceCenterEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.PARTY_SERVICE_CENTER_ERROR.getCode()); + } + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); + if (null == staffInfo){ + throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); + } + IcPartyServiceCenterEntity centerEntity = ConvertUtils.sourceToTarget(formDTO, IcPartyServiceCenterEntity.class); + centerEntity.setCustomerId(customerId); + centerEntity.setOrgId(staffInfo.getAgencyId()); + centerEntity.setOrgType(PartyServiceCenterConstant.ORG_TYPE_AGENCY); + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + if (null == agencyInfo){ + throw new RenException(String.format("查询组织信息失败%s",staffInfo.getAgencyId())); + } + centerEntity.setPid(agencyInfo.getPid()); + centerEntity.setPids(agencyInfo.getPids()); + baseDao.insert(centerEntity); + if (CollectionUtils.isNotEmpty(formDTO.getMatterList())){ + List matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); + matters.forEach(m -> { + m.setCustomerId(customerId); + m.setPartyServiceCenterId(centerEntity.getId()); + }); + matterService.insertBatch(matters); + } + } + } \ No newline at end of file From 51876107d476a1eb9f0465b1820a11c7f6f94fe1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 10:41:20 +0800 Subject: [PATCH 030/170] edit --- ...ySelfOrganizationPersonnelServiceImpl.java | 1 + .../form/EditPartyServiceCenterFormDTO.java | 86 +++++++++++++++++++ .../IcPartyServiceCenterController.java | 15 ++++ .../dao/IcPartyServiceCenterMatterDao.java | 9 ++ .../IcPartyServiceCenterMatterService.java | 8 ++ .../service/IcPartyServiceCenterService.java | 11 +++ ...IcPartyServiceCenterMatterServiceImpl.java | 12 +++ .../impl/IcPartyServiceCenterServiceImpl.java | 33 +++++++ .../mapper/IcPartyServiceCenterMatterDao.xml | 7 ++ 9 files changed, 182 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java index 36693811b5..15b759def7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java @@ -103,6 +103,7 @@ public class IcCommunitySelfOrganizationPersonnelServiceImpl extends BaseService * @author zxc * @date 2021/11/19 11:19 上午 */ + @Transactional(rollbackFor = Exception.class) @Override public void deleteByOrgId(String orgId) { baseDao.deleteByOrgId(orgId); diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java new file mode 100644 index 0000000000..1bdb9886c3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java @@ -0,0 +1,86 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/22 9:05 上午 + * @DESC + */ +@Data +public class EditPartyServiceCenterFormDTO implements Serializable { + + private static final long serialVersionUID = -231856877756036529L; + + public interface EditPartyServiceCenterForm{} + + /** + * 中心名称 + */ + @NotBlank(message = "centerName不能为空",groups = EditPartyServiceCenterForm.class) + private String centerName; + + /** + * 社区地址 + */ + @NotBlank(message = "address不能为空",groups = EditPartyServiceCenterForm.class) + private String address; + + /** + * 办公电话 + */ + @NotBlank(message = "workPhone不能为空",groups = EditPartyServiceCenterForm.class) + private String workPhone; + + /** + * 上午开始时间 + */ + @NotBlank(message = "amStartTime不能为空",groups = EditPartyServiceCenterForm.class) + private String amStartTime; + + /** + * 上午结束时间 + */ + @NotBlank(message = "amEndTime不能为空",groups = EditPartyServiceCenterForm.class) + private String amEndTime; + + /** + * 下午开始时间 + */ + @NotBlank(message = "pmStartTime不能为空",groups = EditPartyServiceCenterForm.class) + private String pmStartTime; + + /** + * 下午结束时间 + */ + @NotBlank(message = "pmEndTime不能为空",groups = EditPartyServiceCenterForm.class) + private String pmEndTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = EditPartyServiceCenterForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = EditPartyServiceCenterForm.class) + private String latitude; + + /** + * 党群服务中心ID + */ + @NotBlank(message = "partyServiceCenterId不能为空",groups = EditPartyServiceCenterForm.class) + private String partyServiceCenterId; + + /** + * 可预约事项 + */ + private List matterList; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 724415a894..602de7eb8e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcPartyServiceCenterDTO; import com.epmet.dto.form.AddPartyServiceCenterFormDTO; +import com.epmet.dto.form.EditPartyServiceCenterFormDTO; import com.epmet.excel.IcPartyServiceCenterExcel; import com.epmet.service.IcPartyServiceCenterService; import org.springframework.beans.factory.annotation.Autowired; @@ -108,4 +109,18 @@ public class IcPartyServiceCenterController { return new Result(); } + /** + * @Description 修改党群服务中心 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 10:21 上午 + */ + @PostMapping("editpartyservicecenter") + public Result editPartyServiceCenter(@RequestBody EditPartyServiceCenterFormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, EditPartyServiceCenterFormDTO.EditPartyServiceCenterForm.class); + icPartyServiceCenterService.editPartyServiceCenter(formDTO,tokenDto); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java index 6001796620..42b765e40c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcPartyServiceCenterMatterEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 党群服务中心可预约事项表 @@ -29,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcPartyServiceCenterMatterDao extends BaseDao { + + /** + * @Description 根据党群服务中心删除事项 + * @param partyServiceCenterId + * @author zxc + * @date 2021/11/22 10:29 上午 + */ + void deleteMattersByPartyServiceCenterId(@Param("partyServiceCenterId") String partyServiceCenterId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java index 48a39b4b7e..cc977a17c5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java @@ -92,4 +92,12 @@ public interface IcPartyServiceCenterMatterService extends BaseService l = new LambdaQueryWrapper<>(); + l.eq(IcPartyServiceCenterEntity::getCenterName,formDTO.getCenterName()) + .eq(IcPartyServiceCenterEntity::getCustomerId,tokenDto.getCustomerId()) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO) + .ne(BaseEpmetEntity::getId,formDTO.getPartyServiceCenterId()); + IcPartyServiceCenterEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.PARTY_SERVICE_CENTER_ERROR.getCode()); + } + IcPartyServiceCenterEntity centerEntity = ConvertUtils.sourceToTarget(formDTO, IcPartyServiceCenterEntity.class); + centerEntity.setId(formDTO.getPartyServiceCenterId()); + baseDao.updateById(centerEntity); + matterService.deleteMattersByPartyServiceCenterId(formDTO.getPartyServiceCenterId()); + if (CollectionUtils.isNotEmpty(formDTO.getMatterList())){ + List matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); + matters.forEach(m -> { + m.setCustomerId(tokenDto.getCustomerId()); + m.setPartyServiceCenterId(formDTO.getPartyServiceCenterId()); + }); + matterService.insertBatch(matters); + } + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml index 4953af937a..f765126687 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml @@ -3,4 +3,11 @@ + + + DELETE FROM ic_party_service_center_matter + WHERE DEL_FLAG = 0 + AND PARTY_SERVICE_CENTER_ID = #{partyServiceCenterId} + + \ No newline at end of file From e777635ea7e3cbc5867e84fd89a7aff3ef920639 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Nov 2021 10:47:51 +0800 Subject: [PATCH 031/170] =?UTF-8?q?=E9=9C=80=E6=B1=82=E4=BA=BA=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/DemandUserFormDTO.java | 26 +++++++++++++++++++ .../epmet/dto/result/DemandUserResDTO.java | 14 ++++++++++ .../controller/IcResiUserController.java | 11 ++++++++ .../java/com/epmet/dao/IcResiUserDao.java | 11 ++++++++ .../com/epmet/service/IcResiUserService.java | 2 ++ .../service/impl/IcResiUserServiceImpl.java | 5 ++++ .../main/resources/mapper/IcResiUserDao.xml | 23 ++++++++++++++++ 7 files changed, 92 insertions(+) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DemandUserFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DemandUserFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DemandUserFormDTO.java new file mode 100644 index 0000000000..27e59a526d --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DemandUserFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class DemandUserFormDTO implements Serializable { + public interface InternalGroup { + } + +// public interface GridIdGroup extends CustomerClientShowGroup { +// } + + @NotBlank(message = "工作人员所属组织id不能为空", groups = InternalGroup.class) + private String agencyId; + +// @NotBlank(message = "请先选择所属网格", groups = GridIdGroup.class) + private String gridId; + + + private String name; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java new file mode 100644 index 0000000000..f2bad106a8 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java @@ -0,0 +1,14 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class DemandUserResDTO implements Serializable { + private String icResiUserId; + private String name; + private String mobile; + private String label; + private String gridId; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 7f95af3d76..610cac5665 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -660,4 +660,15 @@ public class IcResiUserController { return new Result>>().ok(icResiUserService.getHomeUserCategoryCount(formDTO.getBuildId())); } + /** + * @LoginUser TokenDto tokenDto, + * 新增需求,需求人列表:展示当前工作人员所属组织+页面已选择所属网格 下的居民列表 + * @param formDTO + * @return + */ + @PostMapping("demandusers") + public Result> queryDemandUsers(@RequestBody DemandUserFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, DemandUserFormDTO.InternalGroup.class); + return new Result>().ok(icResiUserService.queryDemandUsers(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index 9897d01be7..186928372a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.ResiUserQueryValueDTO; +import com.epmet.dto.result.DemandUserResDTO; import com.epmet.dto.result.IcFormResColumnDTO; import com.epmet.dto.result.PersonDataResultDTO; import com.epmet.dto.result.SearchByNameResultDTO; @@ -145,4 +146,14 @@ public interface IcResiUserDao extends BaseDao { Map selectPersonType(@Param("columns")List columns,@Param("customerId")String customerId, @Param("tableName")String tableName,@Param("userId")String userId); + /** + * + * @param agencyId + * @param gridId + * @param name + * @return + */ + List selectDemandUsers(@Param("agencyId") String agencyId, + @Param("gridId")String gridId, + @Param("name")String name); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 52e256105c..1a6ab3bf66 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -139,4 +139,6 @@ public interface IcResiUserService extends BaseService { * @return */ List listFormItems(String customerId, String formCode); + + List queryDemandUsers(DemandUserFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index f82bcf97dc..d4f7b5f078 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -840,4 +840,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> result = operCustomizeOpenFeignClient.listItems(form); return getResultDataOrThrowsException(result, ServiceConstant.OPER_CUSTOMIZE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "查询表单相关信息失败", null); } + + @Override + public List queryDemandUsers(DemandUserFormDTO formDTO) { + return baseDao.selectDemandUsers(formDTO.getAgencyId(),formDTO.getGridId(),formDTO.getName()); + } } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 712e78ed81..1b41be654f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -271,4 +271,27 @@ AND IC_RESI_USER = #{userId} + + + From 89d0d24f0561f096847d47f3e35fe077d839aeca Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Nov 2021 10:59:19 +0800 Subject: [PATCH 032/170] =?UTF-8?q?=E6=94=B9=E4=B8=AA=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IcUserDemandRecController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 3288a45a7d..a478048bda 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController; * @since v1.0.0 2021-11-19 */ @RestController -@RequestMapping("icuserdemandrec") +@RequestMapping("userdemand") public class IcUserDemandRecController { @Autowired From e92ed449e525df6a1fd97dcd79bb033bbda982c2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 13:49:41 +0800 Subject: [PATCH 033/170] errorcode --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index a470c0122a..01815fd23c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -140,6 +140,8 @@ public enum EpmetErrorCode { // 党群服务中心 PARTY_SERVICE_CENTER_ERROR(8525, "党群服务中心名称已存在"), + // 删除可预约事项存在预约记录时提示 + MATTER_EXISTS_APPOINTMENT_ERROR(8526, "尚有未履行的预约存在,请确认后操作"), // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), From 3eab228fd683bb5aa6d5b92d0ce4819482a13bc2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 13:56:00 +0800 Subject: [PATCH 034/170] del --- .../com/epmet/dto/form/DelMatterFormDTO.java | 25 +++++++++++++++++ .../IcPartyServiceCenterController.java | 13 +++++++++ .../service/IcPartyServiceCenterService.java | 9 +++++++ .../impl/IcPartyServiceCenterServiceImpl.java | 27 ++++++++++++++++++- 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DelMatterFormDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DelMatterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DelMatterFormDTO.java new file mode 100644 index 0000000000..2c45e104b5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DelMatterFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 11:11 上午 + * @DESC + */ +@Data +public class DelMatterFormDTO implements Serializable { + + private static final long serialVersionUID = -5351894549285626126L; + + public interface DelMatterForm{} + + /** + * 事项ID + */ + @NotBlank(message = "matterId不能为空",groups = DelMatterForm.class) + private String matterId; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 602de7eb8e..5dd5ed3ec8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcPartyServiceCenterDTO; import com.epmet.dto.form.AddPartyServiceCenterFormDTO; +import com.epmet.dto.form.DelMatterFormDTO; import com.epmet.dto.form.EditPartyServiceCenterFormDTO; import com.epmet.excel.IcPartyServiceCenterExcel; import com.epmet.service.IcPartyServiceCenterService; @@ -123,4 +124,16 @@ public class IcPartyServiceCenterController { return new Result(); } + /** + * @Description 事项删除 + * @param formDTO + * @author zxc + * @date 2021/11/22 1:25 下午 + */ + @PostMapping("delmatter") + public Result delMatter(@RequestBody DelMatterFormDTO formDTO){ + icPartyServiceCenterService.delMatter(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java index b6ce7dd42f..6bd8096149 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyServiceCenterDTO; import com.epmet.dto.form.AddPartyServiceCenterFormDTO; +import com.epmet.dto.form.DelMatterFormDTO; import com.epmet.dto.form.EditPartyServiceCenterFormDTO; import com.epmet.entity.IcPartyServiceCenterEntity; @@ -114,4 +115,12 @@ public interface IcPartyServiceCenterService extends BaseService page(Map params) { @@ -161,6 +167,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); matters.forEach(m -> { @@ -191,4 +197,23 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl re = new LambdaQueryWrapper<>(); + re.eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO). + eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()). + ge(IcMatterAppointmentRecordEntity::getAppointmentDate, LocalDate.now()); + List appointmentRecords = matterAppointmentRecordDao.selectList(re); + if (CollectionUtils.isNotEmpty(appointmentRecords)){ + throw new RenException(EpmetErrorCode.MATTER_EXISTS_APPOINTMENT_ERROR.getCode()); + } + matterService.deleteById(formDTO.getMatterId()); + } + } \ No newline at end of file From f8a1d8f219cb4e35a3f1ef65da592b4b15527804 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 13:57:46 +0800 Subject: [PATCH 035/170] del --- .../com/epmet/controller/IcPartyServiceCenterController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 5dd5ed3ec8..10c8405c0d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -132,6 +132,7 @@ public class IcPartyServiceCenterController { */ @PostMapping("delmatter") public Result delMatter(@RequestBody DelMatterFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, DelMatterFormDTO.DelMatterForm.class); icPartyServiceCenterService.delMatter(formDTO); return new Result(); } From ab85110bb3a7abfd7f4236356566837db6910eb6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Nov 2021 14:37:59 +0800 Subject: [PATCH 036/170] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/IcUserDemandOperateLogDTO.java | 9 +- .../com/epmet/dto/IcUserDemandRecDTO.java | 5 +- .../dto/form/demand/DemandAddFromDTO.java | 113 ++++++++++++++++++ .../epmet/dto/form/demand/DemandRecId.java | 10 ++ .../form/demand/UserDemandPageFormDTO.java | 78 ++++++++++++ .../dto/result/demand/DemandRecResultDTO.java | 44 +++++++ .../epmet/constant/UserDemandConstant.java | 38 ++++++ .../controller/IcUserDemandRecController.java | 36 ++++++ .../entity/IcUserDemandOperateLogEntity.java | 7 +- .../epmet/entity/IcUserDemandRecEntity.java | 3 +- .../epmet/service/IcUserDemandRecService.java | 14 +++ .../impl/IcUserDemandRecServiceImpl.java | 66 ++++++++++ 12 files changed, 407 insertions(+), 16 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java index cf0247b2e9..3acb6a0510 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -59,7 +60,7 @@ public class IcUserDemandOperateLogDTO implements Serializable { private String userId; /** - * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish;评价:evaluate; + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish; */ private String actionCode; @@ -98,9 +99,5 @@ public class IcUserDemandOperateLogDTO implements Serializable { */ private Date updatedTime; - /** - * - */ - private String userName; } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java index 2b000acc9c..b070d80073 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -142,7 +143,7 @@ public class IcUserDemandRecDTO implements Serializable { /** * 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 */ - private Integer evaluateFlag; + private Boolean evaluateFlag; /** * 删除标识:0.未删除 1.已删除 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java new file mode 100644 index 0000000000..125550e413 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java @@ -0,0 +1,113 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + +@Data +public class DemandAddFromDTO implements Serializable { + + private static final long serialVersionUID = 1589287946950749226L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + private String customerId; + private String currentUserId; + + + /** + * 网格id + */ + @NotBlank(message = "所属网格不能为空",groups = AddUserShowGroup.class) + private String gridId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + + + + /** + * 二级需求分类编码 + */ + @NotBlank(message = "需求类型不能为空",groups = AddUserShowGroup.class) + private String categoryCode; + + /** + * 父级需求分类编码 + */ + @NotBlank(message = "需求类型不能为空",groups = AddUserShowGroup.class) + private String parentCode; + + /** + * 需求内容1000字 + */ + @NotBlank(message = "需求类型不能为空",groups = AddUserShowGroup.class) + private String content; + + /** + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + @NotBlank(message = "上报类型不能为空",groups = AddUserShowGroup.class) + private String reportType; + + /** + * 上报人姓名 + */ + @NotBlank(message = "上报人不能为空",groups = AddUserShowGroup.class) + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + @NotBlank(message = "上报人联系方式不能为空",groups = AddUserShowGroup.class) + private String reportUserMobile; + + /** + * 上报时间 + */ + @NotNull(message = "上报时间不能为空",groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date reportTime; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) + private String demandUserId; + + /** + * 需求人姓名 + */ + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) + private String demandUserName; + + /** + * 需求人联系电话 + */ + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) + private String demandUserMobile; + + /** + * 希望服务时间 + */ + @NotNull(message = "服务时间不能为空",groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date wantServiceTime; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java new file mode 100644 index 0000000000..7fdf7a29c5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java @@ -0,0 +1,10 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class DemandRecId implements Serializable { + private String demandRecId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java new file mode 100644 index 0000000000..9d6115243e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -0,0 +1,78 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { + + private String customerId; + private String currentStaffId; + private String gridPids; + + + /** + * 网格id + */ + private String gridId; + + + + /** + * 分类的编码 + */ + private String categoryCode; + + /** + * 分类的级别 + */ + private Integer level; + + + + /** + * 需求人姓名 + */ + private String demandUserName; + + /** + * 上报时间开始 + */ + private Date reportStartTime; + + /** + * 上报时间截止 + */ + private Date reportEndTime; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + private String status; + + + + + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 服务方id + */ + private String serverId; + + /** + * 希望服务时间开始 + */ + private Date wantServiceStartTime; + + /** + * 希望截止 + */ + private Date wantServiceEndTime; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java new file mode 100644 index 0000000000..7cd8eff5b3 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -0,0 +1,44 @@ +package com.epmet.dto.result.demand; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +@Data +public class DemandRecResultDTO implements Serializable { + private static final long serialVersionUID = 1140730681599839420L; + + private String demandRecId; + @JsonIgnore + private String gridId; + private String gridName; + + @JsonIgnore + private String categoryCode; + @JsonIgnore + private String parentCode; + private String categoryName; + private String content; + private String reportType; + private String reportUserName; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date reportTime; + + private String demandUserName; + + @JsonIgnore + private String serviceType; + @JsonIgnore + private String serverId; + + private String serviceName; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private String wantServiceTime; + private String status; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java new file mode 100644 index 0000000000..5354245351 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java @@ -0,0 +1,38 @@ +package com.epmet.constant; + +public interface UserDemandConstant { + + + /** + * 小程序用户自己上报:mini_resi;居民信息录入的居民:ic_resi_user + */ + String MINI_RESI = "mini_resi"; + String IC_RESI_USER = "ic_resi_user"; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + String PENDING = "pending"; + String CANCELED = "canceled"; + String ASSIGNED = "assigned"; + String HAVE_ORDER = "have_order"; + String FINISHED = "finished"; + + + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + String STAFF="staff"; + String RESI="resi"; + + + /** + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish;; + */ + String CREATE="create"; + String CANCEL="cancel"; + String ASSIGN="assign"; + String TAKE_ORDER="take_order"; + String FINISH="finish"; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index a478048bda..415968cb92 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -17,8 +17,19 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.demand.DemandAddFromDTO; +import com.epmet.dto.form.demand.DemandRecId; +import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.service.IcUserDemandRecService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -37,5 +48,30 @@ public class IcUserDemandRecController { private IcUserDemandRecService icUserDemandRecService; + /** + * 新增需求 + * + * @param tokenDto + * @param fromDTO + * @return + */ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){ + fromDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.AddUserShowGroup.class); + return new Result().ok(icUserDemandRecService.add(fromDTO)); + } + + /** + * 列表查询 分页 + * @param tokenDto + * @param formDTO + * @return + */ + public Result> pageList(@LoginUser TokenDto tokenDto, @RequestBody UserDemandPageFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentStaffId(tokenDto.getUserId()); + return new Result>().ok(icUserDemandRecService.pageList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java index 416cf17f53..9b6afa0aea 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java @@ -59,7 +59,7 @@ public class IcUserDemandOperateLogEntity extends BaseEpmetEntity { private String userId; /** - * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish;评价:evaluate; + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish; */ private String actionCode; @@ -68,9 +68,4 @@ public class IcUserDemandOperateLogEntity extends BaseEpmetEntity { */ private Date operateTime; - /** - * - */ - private String userName; - } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java index 10499a8b9f..5979d780ed 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java @@ -18,7 +18,6 @@ package com.epmet.entity; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; @@ -142,6 +141,6 @@ public class IcUserDemandRecEntity extends BaseEpmetEntity { /** * 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 */ - private Integer evaluateFlag; + private Boolean evaluateFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 7e54904e77..2d969e1d46 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -20,6 +20,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcUserDemandRecDTO; +import com.epmet.dto.form.demand.DemandAddFromDTO; +import com.epmet.dto.form.demand.DemandRecId; +import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.entity.IcUserDemandRecEntity; import java.util.List; @@ -92,4 +96,14 @@ public interface IcUserDemandRecService extends BaseService pageList(UserDemandPageFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index fe94978a7a..352b5e82f2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -21,17 +21,34 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.UserDemandConstant; +import com.epmet.dao.IcUserDemandOperateLogDao; import com.epmet.dao.IcUserDemandRecDao; +import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.IcUserDemandRecDTO; +import com.epmet.dto.form.CustomerGridFormDTO; +import com.epmet.dto.form.demand.DemandAddFromDTO; +import com.epmet.dto.form.demand.DemandRecId; +import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.result.demand.DemandRecResultDTO; +import com.epmet.entity.IcUserDemandOperateLogEntity; import com.epmet.entity.IcUserDemandRecEntity; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcUserDemandRecService; 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.Date; import java.util.List; import java.util.Map; @@ -43,6 +60,11 @@ import java.util.Map; */ @Service public class IcUserDemandRecServiceImpl extends BaseServiceImpl implements IcUserDemandRecService { + @Autowired + private IcUserDemandOperateLogDao operateLogDao; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Override public PageData page(Map params) { @@ -96,4 +118,48 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl gridInfoRes=govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO); + if(!gridInfoRes.success()||null==gridInfoRes.getData()){ + throw new RenException("查询网格信息失败"); + } + IcUserDemandRecEntity insertEntity=ConvertUtils.sourceToTarget(fromDTO,IcUserDemandRecEntity.class); + insertEntity.setAgencyId(gridInfoRes.getData().getPid()); + insertEntity.setGridPids(gridInfoRes.getData().getPids()); + insertEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER); + insertEntity.setStatus(UserDemandConstant.PENDING); + insertEntity.setEvaluateFlag(false); + baseDao.insert(insertEntity); + IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(fromDTO.getCustomerId()); + logEntity.setDemandRecId(insertEntity.getId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(fromDTO.getCurrentUserId()); + logEntity.setActionCode(UserDemandConstant.CREATE); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + DemandRecId resultDto=new DemandRecId(); + resultDto.setDemandRecId(insertEntity.getId()); + return resultDto; + } + + @Override + public PageData pageList(UserDemandPageFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getCurrentStaffId()); + String gridPids=staffInfoCacheResult.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfoCacheResult.getAgencyId()); + formDTO.setGridPids(formDTO.getGridPids()); + // todo + return null; + } + } \ No newline at end of file From fe4897944e98c5ada158f1fb4d2973f4b93182dd Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 15:36:05 +0800 Subject: [PATCH 037/170] =?UTF-8?q?=E9=A2=84=E7=BA=A6+=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/MatterListDTO.java | 41 +++++++++++ .../epmet/dto/form/AppointmentFormDTO.java | 54 ++++++++++++++ .../form/PartyServiceCenterListFormDTO.java | 20 +++++ .../PartyServiceCenterListResultDTO.java | 73 +++++++++++++++++++ .../constant/PartyServiceCenterConstant.java | 3 + .../IcPartyServiceCenterController.java | 31 +++++++- .../epmet/dao/IcPartyServiceCenterDao.java | 14 +++- .../service/IcPartyServiceCenterService.java | 23 +++++- .../impl/IcPartyServiceCenterServiceImpl.java | 68 ++++++++++++++++- .../mapper/IcPartyServiceCenterDao.xml | 35 +++++++++ 10 files changed, 352 insertions(+), 10 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/PartyServiceCenterListFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java new file mode 100644 index 0000000000..21c56927e2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:41 下午 + * @DESC + */ +@Data +public class MatterListDTO implements Serializable { + + private static final long serialVersionUID = 493404409015559029L; + + private Integer sort; + + /** + * 事项名 + */ + private String matterName; + + /** + * 事项ID + */ + private String matterId; + + /** + * 可预约时间 + */ + private String allowTime; + + public MatterListDTO() { + this.sort = NumConstant.ZERO; + this.matterName = ""; + this.matterId = ""; + this.allowTime = ""; + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java new file mode 100644 index 0000000000..a1caadfd14 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java @@ -0,0 +1,54 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:00 下午 + * @DESC + */ +@Data +public class AppointmentFormDTO implements Serializable { + + private static final long serialVersionUID = -7113952715343314153L; + + public interface AppointmentForm{} + + /** + * 事项ID + */ + @NotBlank(message = "matterId不能为空",groups = AppointmentForm.class) + private String matterId; + + /** + * 预约日期 + */ + @NotBlank(message = "appointmentDate不能为空",groups = AppointmentForm.class) + private String appointmentDate; + + /** + * 预约编号 + */ + @NotBlank(message = "timeId不能为空",groups = AppointmentForm.class) + private String timeId; + + /** + * 预约人 + */ + @NotBlank(message = "appointmentName不能为空",groups = AppointmentForm.class) + private String appointmentName; + + /** + * 预约电话 + */ + @NotBlank(message = "appointmentPhone不能为空",groups = AppointmentForm.class) + private String appointmentPhone; + + /** + * 备注 + */ + private String remark; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/PartyServiceCenterListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/PartyServiceCenterListFormDTO.java new file mode 100644 index 0000000000..1014b844cc --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/PartyServiceCenterListFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:37 下午 + * @DESC + */ +@Data +public class PartyServiceCenterListFormDTO implements Serializable { + + private static final long serialVersionUID = -6620725991593811931L; + + private String orgId; + + private String orgType; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java new file mode 100644 index 0000000000..7f99cedc12 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java @@ -0,0 +1,73 @@ +package com.epmet.dto.result; + +import com.epmet.dto.MatterListDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:38 下午 + * @DESC + */ +@Data +public class PartyServiceCenterListResultDTO implements Serializable { + + private static final long serialVersionUID = -5977663317819468536L; + + /** + * 中心名称 + */ + private String centerName; + + /** + * 党群服务中心ID + */ + private String partyServiceCenterId; + + /** + * 社区地址 + */ + private String address; + + /** + * 办公电话 + */ + private String workPhone; + + /** + * 上午工作时间 + */ + private String amWorkTime; + + /** + * 下午工作时间 + */ + private String pmWorkTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + private List matterList; + + public PartyServiceCenterListResultDTO() { + this.centerName = ""; + this.partyServiceCenterId = ""; + this.address = ""; + this.workPhone = ""; + this.amWorkTime = ""; + this.pmWorkTime = ""; + this.longitude = ""; + this.latitude = ""; + this.matterList = new ArrayList<>(); + } +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java index 818c2921b4..ced0df2da5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java @@ -9,4 +9,7 @@ public interface PartyServiceCenterConstant { String ORG_TYPE_AGENCY = "agency"; + String APPOINTMENT_STATUS_APPOINTING = "appointing"; + String APPOINTMENT_STATUS_CANCEL = "cancel"; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 10c8405c0d..36d24538bb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -28,9 +28,8 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcPartyServiceCenterDTO; -import com.epmet.dto.form.AddPartyServiceCenterFormDTO; -import com.epmet.dto.form.DelMatterFormDTO; -import com.epmet.dto.form.EditPartyServiceCenterFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.excel.IcPartyServiceCenterExcel; import com.epmet.service.IcPartyServiceCenterService; import org.springframework.beans.factory.annotation.Autowired; @@ -137,4 +136,30 @@ public class IcPartyServiceCenterController { return new Result(); } + /** + * @Description 预约 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 2:06 下午 + */ + @PostMapping("appointment") + public Result appointment(@RequestBody AppointmentFormDTO formDTO, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, AppointmentFormDTO.AppointmentForm.class); + icPartyServiceCenterService.appointment(formDTO,tokenDto); + return new Result(); + } + + /** + * @Description 党群服务中心列表 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 2:47 下午 + */ + @PostMapping("partyservicecenterlist") + public Result> partyServiceCenterList(@RequestBody PartyServiceCenterListFormDTO formDTO, @LoginUser TokenDto tokenDto){ + return new Result>().ok(icPartyServiceCenterService.partyServiceCenterList(formDTO,tokenDto)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java index 0fa37f6146..b85d2086f0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcPartyServiceCenterEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党群服务中心 @@ -29,5 +33,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcPartyServiceCenterDao extends BaseDao { - + + /** + * @Description 查询党群服务中心列表 + * @param orgId + * @author zxc + * @date 2021/11/22 2:51 下午 + */ + List partyServiceCenterList(@Param("orgId")String orgId); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java index 6bd8096149..5d87eae23b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java @@ -21,9 +21,8 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyServiceCenterDTO; -import com.epmet.dto.form.AddPartyServiceCenterFormDTO; -import com.epmet.dto.form.DelMatterFormDTO; -import com.epmet.dto.form.EditPartyServiceCenterFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcPartyServiceCenterEntity; import java.util.List; @@ -123,4 +122,22 @@ public interface IcPartyServiceCenterService extends BaseService partyServiceCenterList(PartyServiceCenterListFormDTO formDTO,TokenDto tokenDto); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 88d951c062..657547e503 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -33,13 +33,13 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.PartyServiceCenterConstant; import com.epmet.dao.IcMatterAppointmentRecordDao; import com.epmet.dao.IcPartyServiceCenterDao; import com.epmet.dto.IcPartyServiceCenterDTO; -import com.epmet.dto.form.AddPartyServiceCenterFormDTO; -import com.epmet.dto.form.DelMatterFormDTO; -import com.epmet.dto.form.EditPartyServiceCenterFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcMatterAppointmentRecordEntity; import com.epmet.entity.IcPartyServiceCenterEntity; import com.epmet.entity.IcPartyServiceCenterMatterEntity; @@ -56,6 +56,8 @@ import java.util.Arrays; import java.util.List; import java.util.Map; +import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN; + /** * 党群服务中心 * @@ -216,4 +218,64 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl partyServiceCenterList(PartyServiceCenterListFormDTO formDTO, TokenDto tokenDto) { + if (StringUtils.isBlank(formDTO.getOrgId())){ + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); + } + formDTO.setOrgId(staffInfo.getAgencyId()); + } + List result = baseDao.partyServiceCenterList(formDTO.getOrgId()); + if (CollectionUtils.isNotEmpty(result)){ + result.forEach(r -> { + if (CollectionUtils.isNotEmpty(r.getMatterList())){ + final Integer[] sort = {NumConstant.ONE}; + r.getMatterList().forEach(m -> { + m.setSort(sort[NumConstant.ZERO]++); + }); + } + }); + } + return result; + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml index c309bcd54b..db25c15da0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -3,4 +3,39 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file From 238d5d253b22fe6058990437340efee79d3c04a6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Nov 2021 16:14:40 +0800 Subject: [PATCH 038/170] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/TimeDTO.java | 22 ++++++ .../IcPartyServiceCenterController.java | 3 +- .../impl/IcPartyServiceCenterServiceImpl.java | 70 ++++++++++++++++++- 3 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java new file mode 100644 index 0000000000..00b01c30fe --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 3:56 下午 + * @DESC + */ +@Data +public class TimeDTO implements Serializable { + + private static final long serialVersionUID = -3290964095027429971L; + + private String timeId; + + private Boolean isAppointment = true; + + private String time; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 36d24538bb..7f7bf3aced 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -36,8 +36,7 @@ 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; +import java.util.*; /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 657547e503..4d304befe6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -38,6 +38,7 @@ import com.epmet.constant.PartyServiceCenterConstant; import com.epmet.dao.IcMatterAppointmentRecordDao; import com.epmet.dao.IcPartyServiceCenterDao; import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.dto.TimeDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcMatterAppointmentRecordEntity; @@ -51,10 +52,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.time.LocalDate; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN; @@ -278,4 +279,67 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl getTimeList(String start,String end,Integer interval){ + List result = new ArrayList<>(); + List intervalTimeList = getIntervalTimeList(start, end, interval); + Integer sort = NumConstant.ONE; + for (int i = NumConstant.ZERO; i < intervalTimeList.size(); i++) { + if (i + NumConstant.ONE >= intervalTimeList.size()){ + return result; + } + TimeDTO timeDTO = new TimeDTO(); + timeDTO.setTime(intervalTimeList.get(i) + "-" + intervalTimeList.get(i + NumConstant.ONE)); + timeDTO.setTimeId(String.valueOf(sort++)); + result.add(timeDTO); + } + return result; + } + + /** + * @Description 获取固定时间段之间固定时间的集合 + * @param start 开始时间 + * @param end 结束时间 + * @param interval 间隔时间 + * @author zxc + * @date 2021/11/22 3:48 下午 + */ + public List getIntervalTimeList(String start,String end,Integer interval) { + Date startDate = convertStringToDate("HH:mm", start); + Date endDate = convertStringToDate("HH:mm", end); + List list = new ArrayList<>(); + while (startDate.getTime() <= endDate.getTime()) { + list.add(convertDateToString("HH:mm", startDate)); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.MINUTE, interval); + if (calendar.getTime().getTime() > endDate.getTime()) { + if (!startDate.equals(endDate)) { + list.add(convertDateToString("HH:mm", endDate)); + } + startDate = calendar.getTime(); + } else { + startDate = calendar.getTime(); + } + + } + return list; + } + + + public Date convertStringToDate(String format, String dateStr) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); + try { + Date date = simpleDateFormat.parse(dateStr); + return date; + } catch (ParseException e) { + e.printStackTrace(); + } + return null; + } + + public String convertDateToString(String format, Date date) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); + return simpleDateFormat.format(date); + } + } \ No newline at end of file From c322e56b04d89e10869fcef733ef08ed7f62df38 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Nov 2021 16:34:28 +0800 Subject: [PATCH 039/170] test --- .../dto/form/demand/ServiceQueryFormDTO.java | 21 +++++++++++------ ...IcCommunitySelfOrganizationController.java | 3 ++- .../controller/IcPartyUnitController.java | 3 ++- .../controller/IcSocietyOrgController.java | 3 ++- .../dao/IcCommunitySelfOrganizationDao.java | 2 +- .../java/com/epmet/dao/IcSocietyOrgDao.java | 5 +++- ...cCommunitySelfOrganizationServiceImpl.java | 17 ++++++++++---- .../service/impl/IcSocietyOrgServiceImpl.java | 20 ++++++++-------- .../mapper/IcCommunitySelfOrganizationDao.xml | 23 ++++++++++--------- .../main/resources/mapper/IcSocietyOrgDao.xml | 10 +++++--- .../epmet/dto/result/DemandUserResDTO.java | 7 +++--- .../epmet/feign/EpmetUserOpenFeignClient.java | 4 ++-- .../main/resources/mapper/IcResiUserDao.xml | 9 ++++---- 13 files changed, 77 insertions(+), 50 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java index 472d78f58c..1b581426e2 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java @@ -8,17 +8,24 @@ import java.io.Serializable; @Data public class ServiceQueryFormDTO implements Serializable { private static final long serialVersionUID = -2738313255838176318L; + public interface AddUserInternalGroup {} - public interface DemandId { - } - - + public interface SocietyOrgInternalGroup {} + /** + * 前端入参 + */ private String serviceName; + // 社会组织的:query_demand 新增需求:add_demand + @NotBlank(message = "新增需求:add_demand;列表查询:query_demand",groups = SocietyOrgInternalGroup.class) + private String queryPurpose; - @NotBlank(message = "需求id不能为空", groups = DemandId.class) - private String demandRecId; + // 以下参数从token中获取 + @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class) + private String staffId; + @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) + private String customerId; + private String demandRecId; - private String customerId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 07850adb8f..0a52e569ff 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -165,7 +165,8 @@ public class IcCommunitySelfOrganizationController { @PostMapping("servicelist") public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); - ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.DemandId.class); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class); return new Result>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 4b7f3aa7a0..8184cbbe09 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -107,7 +107,8 @@ public class IcPartyUnitController { @PostMapping("servicelist") public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); - ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.DemandId.class); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class); return new Result>().ok(icPartyUnitService.queryServiceList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index 909f961b56..e34a042862 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -104,7 +104,8 @@ public class IcSocietyOrgController { @PostMapping("servicelist") public Result> queryServiceList(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); - ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.DemandId.class); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class,ServiceQueryFormDTO.SocietyOrgInternalGroup.class); return new Result>().ok(societyOrgService.queryServiceList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index 4f9eaafc16..3fee0e0a71 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -53,6 +53,6 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao selectCommunitySelfOrganizationList(CommunitySelfOrganizationListFormDTO formDTO); List selectListByAgencyId(@Param("customerId") String customerId, - @Param("agencyId") String agencyId, + @Param("agencyIds") List agencyIds, @Param("orgName") String orgName); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java index f86799747a..0772af28de 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java @@ -48,5 +48,8 @@ public interface IcSocietyOrgDao extends BaseDao { * @param agencyIds * @return */ - List selectListByAgencyId(@Param("agencyIds")List agencyIds,@Param("societyName")String societyName,@Param("customerId")String customerId); + List selectListByAgencyId(@Param("agencyIds")List agencyIds, + @Param("societyName")String societyName, + @Param("customerId")String customerId, + @Param("queryPurpose")String queryPurpose); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 8187ca6fd2..402d184668 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -7,6 +7,7 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; @@ -20,7 +21,6 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IcCommunitySelfOrganizationConstant; import com.epmet.dao.IcCommunitySelfOrganizationDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; -import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; @@ -248,11 +248,18 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { List resultList=new ArrayList<>(); - IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); - if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getAgencyId())){ - return resultList; + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { + throw new RenException("工作人员所属组织信息查询异常"); } - resultList=baseDao.selectListByAgencyId(formDTO.getCustomerId(),icUserDemandRecDTO.getAgencyId(),formDTO.getServiceName()); + List agencyIds=new ArrayList<>(); + if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { + if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){ + agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); + } + } + agencyIds.add(staffInfoCacheResult.getAgencyId()); + resultList=baseDao.selectListByAgencyId(formDTO.getCustomerId(),agencyIds,formDTO.getServiceName()); return resultList; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index d96c09ea5c..1acdcba831 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -26,7 +26,6 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcSocietyOrgDao; -import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; @@ -41,13 +40,13 @@ import com.epmet.service.IcSocietyOrgService; import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; import java.util.ArrayList; import java.util.Arrays; @@ -145,17 +144,18 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { List resultList=new ArrayList<>(); - IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); - if(null==icUserDemandRecDTO|| StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ - return resultList; + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { + throw new RenException("工作人员所属组织信息查询异常"); } List agencyIds=new ArrayList<>(); - if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ - agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); - }else{ - agencyIds.add(icUserDemandRecDTO.getGridPids()); + if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { + if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){ + agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); + } } - resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); + agencyIds.add(staffInfoCacheResult.getAgencyId()); + resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId(),formDTO.getQueryPurpose()); return resultList; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index bcbaf62616..b893795104 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -72,16 +72,17 @@ \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index c487fbcccd..51e42c8402 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -53,9 +53,13 @@ del_flag = '0' and CUSTOMER_ID=#{customerId} and AGENCY_ID=#{agencyId} - - and society_name concat('%',#{societyName},'%') - + + and SERVICE_START_TIME <= NOW() + and SERVICE_END_TIME >= NOW() + + + and society_name like concat('%',#{societyName},'%') + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java index f2bad106a8..da8e6cfd07 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java @@ -6,9 +6,10 @@ import java.io.Serializable; @Data public class DemandUserResDTO implements Serializable { - private String icResiUserId; - private String name; - private String mobile; + private String demandUserId; + private String demandUserName; + private String demandUserMobile; private String label; private String gridId; + private String idCard; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 5637b6b765..3dcf542b80 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -23,8 +23,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) public interface EpmetUserOpenFeignClient { /** diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 1b41be654f..311a451e20 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -275,11 +275,12 @@ + SELECT + a.id placePatrolRecordId, + a.agency_id agencyId, + a.grid_id gridId, + b.grid_name gridName, + a.place_org_id placeOrgId, + c.place_org_name placeOrgName, + a.place_patrol_team_id placePatrolTeamId, + d.team_name placePatrolTeamName, + a.nine_placs_val ninePlaceVal, + a.inspectors inspectors, + a.first_time firstTime, + a.first_result firstResult, + a.detailed detailed, + a.review_time reviewTime, + a.final_time finalTime, + a.final_result finalResult + FROM + ic_place_patrol_record a + LEFT JOIN customer_grid b ON a.grid_id = b.id + LEFT JOIN ic_place_org c ON a.place_org_id = c.id + LEFT JOIN ic_place_patrol_team d ON a.place_patrol_team_id = d.id + WHERE + a.del_flag = '0' + AND a.customer_id = '' + + AND a.customer_id = #{customerId} + + + AND a.grid_id = #{gridId} + + + AND a.nine_place_val = #{ninePlacsVal} + + + AND a.place_org_id IN (select id from ic_place_org where place_org_name like concat('%', #{placeOrgName}, '%')) + + ORDER BY + a.created_time DESC + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolReviewRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolReviewRecordDao.xml index 4151b45687..5151dfe91b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolReviewRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolReviewRecordDao.xml @@ -3,6 +3,43 @@ + + UPDATE + ic_place_patrol_review_record + SET + del_flag = '1', + updated_by = #{staffId}, + updated_time = NOW() + WHERE + place_patrol_record_id = #{placePatrolRecordId} + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml index 5e63b8ee6d..7dddc8e731 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml @@ -22,4 +22,18 @@ ORDER BY created_time DESC + + \ No newline at end of file From fa76c7b17547f240807d9e2152b50ee26fd70d39 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Nov 2021 10:19:20 +0800 Subject: [PATCH 043/170] =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 4 + .../epmet/dto/form/demand/AssignFormDTO.java | 31 ++++ .../dto/form/demand/DemandAddFromDTO.java | 4 +- .../dto/form/demand/FinishStaffFromDTO.java | 48 +++++ .../dto/form/demand/StaffCancelFormDTO.java | 17 ++ .../form/demand/UserDemandPageFormDTO.java | 13 +- .../dto/result/demand/DemandRecResultDTO.java | 16 +- .../controller/IcUserDemandRecController.java | 57 +++++- .../com/epmet/dao/IcUserDemandRecDao.java | 8 +- .../com/epmet/dao/IcUserDemandServiceDao.java | 3 +- .../epmet/service/IcUserDemandRecService.java | 27 ++- .../impl/IcUserDemandRecServiceImpl.java | 172 +++++++++++++++++- .../resources/mapper/IcUserDemandRecDao.xml | 61 ++++++- .../mapper/IcUserDemandServiceDao.xml | 7 +- 14 files changed, 438 insertions(+), 30 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 01815fd23c..7f54dd2bb8 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -83,6 +83,10 @@ public enum EpmetErrorCode { DOOR_NAME_EXITED(8216,"门牌号已存在"), NEIGHBOOR_NAME_EXITED(8217,"小区名称已存在"), DEMAND_NAME_EXITED(8218, "分类名称已存在"), + DEMAND_CAN_NOT_CANCEL(8219, "需求已完成,不可取消"), + DEMAND_CAN_NOT_ASSIGN(8220, "当前状态,不可指派"), + DEMAND_CAN_NOT_FINISH(8221, "当前状态,不能评价"), + DEMAND_FINISHED(8222,"需求已完成"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java new file mode 100644 index 0000000000..b24a505a5f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class AssignFormDTO implements Serializable { + private static final long serialVersionUID = -8844710824469349121L; + + public interface AddUserInternalGroup { + } + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + @NotBlank(message = "需求id不能为空", groups = AddUserInternalGroup.class) + private String demandRecId; + @NotBlank(message = "服务方类型不能为空", groups = AddUserShowGroup.class) + private String serviceType; + @NotBlank(message = "服务方不能为空", groups = AddUserShowGroup.class) + private String serverId; + + + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java index 125550e413..8e1afc8143 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form.demand; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import org.hibernate.validator.constraints.Length; import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; @@ -58,7 +59,8 @@ public class DemandAddFromDTO implements Serializable { /** * 需求内容1000字 */ - @NotBlank(message = "需求类型不能为空",groups = AddUserShowGroup.class) + @NotBlank(message = "需求内容不能为空",groups = AddUserShowGroup.class) + @Length(max = 1000,message = "需求内容至多输入1000字",groups = AddUserShowGroup.class) private String content; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java new file mode 100644 index 0000000000..8213529326 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class FinishStaffFromDTO implements Serializable { + private static final long serialVersionUID = 591380873862126679L; + + public interface AddUserInternalGroup { + } + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + @NotBlank(message = "需求id不能为空", groups = AddUserInternalGroup.class) + private String demandRecId; + + @NotBlank(message = "服务方不能为空", groups = AddUserShowGroup.class) + private String serverId; + + @NotNull(message = "实际服务开始不能为空", groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date serviceStartTime; + + @NotNull(message = "实际服务结束不能为空", groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date serviceEndTime; + + @NotBlank(message = "完成结果不能为空", groups = AddUserShowGroup.class) + private String finishResult; + private String finishDesc; + + @NotNull(message = "得分不能为空", groups = AddUserShowGroup.class) + private BigDecimal score; + + + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java new file mode 100644 index 0000000000..09d920f55c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class StaffCancelFormDTO { + public interface AddUserInternalGroup {} + @NotBlank(message = "需求id不能为空",groups = AddUserInternalGroup.class) + private String demandRecId; + + @NotBlank(message = "userId不能为空", groups =AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index 9d6115243e..265a88b5f1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form.demand; import com.epmet.commons.tools.dto.form.PageFormDTO; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; @@ -41,12 +42,14 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { /** * 上报时间开始 */ - private Date reportStartTime; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date reportStartDate; /** * 上报时间截止 */ - private Date reportEndTime; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date reportEndDate; /** * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished @@ -69,10 +72,12 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { /** * 希望服务时间开始 */ - private Date wantServiceStartTime; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date wantServiceStartDate; /** * 希望截止 */ - private Date wantServiceEndTime; + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date wantServiceEndDate; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index 7cd8eff5b3..a1cba4b0a5 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -19,26 +19,30 @@ public class DemandRecResultDTO implements Serializable { @JsonIgnore private String categoryCode; - @JsonIgnore - private String parentCode; private String categoryName; + + private String content; + + private String reportType; private String reportUserName; - - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date reportTime; + private String demandUser; private String demandUserName; + private String demandUserMobile; @JsonIgnore private String serviceType; @JsonIgnore private String serverId; - private String serviceName; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private String wantServiceTime; private String status; + private String statusName; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 022ec5580f..4bac4aeefb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -23,10 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.UserDemandConstant; -import com.epmet.dto.form.demand.DemandAddFromDTO; -import com.epmet.dto.form.demand.DemandRecId; -import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.service.*; @@ -108,9 +105,61 @@ public class IcUserDemandRecController { * @param formDTO * @return */ + @PostMapping("pagelist") public Result> pageList(@LoginUser TokenDto tokenDto, @RequestBody UserDemandPageFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCurrentStaffId(tokenDto.getUserId()); return new Result>().ok(icUserDemandRecService.pageList(formDTO)); } + + + /** + * 取消,未完成之前都可以取消 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("cancel") + public Result cancel(@LoginUser TokenDto tokenDto,@RequestBody StaffCancelFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,StaffCancelFormDTO.AddUserInternalGroup.class); + icUserDemandRecService.cancel(formDTO); + return new Result(); + } + + + /** + * 指派 + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + * 待处理+已派单才可以指派 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("assign") + public Result assign(@LoginUser TokenDto tokenDto,@RequestBody AssignFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,AssignFormDTO.AddUserShowGroup.class,AssignFormDTO.AddUserInternalGroup.class); + icUserDemandRecService.assign(formDTO); + return new Result(); + } + + /** + * 完成并评价 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("finish") + public Result finish(@LoginUser TokenDto tokenDto,@RequestBody FinishStaffFromDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,FinishStaffFromDTO.AddUserShowGroup.class,FinishStaffFromDTO.AddUserInternalGroup.class); + icUserDemandRecService.finish(formDTO); + return new Result(); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index 1d21b7fe2e..12bc2f68b4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -18,9 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.entity.IcUserDemandRecEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 居民需求记录表 * @@ -29,5 +33,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcUserDemandRecDao extends BaseDao { - + + + List pageSelect(UserDemandPageFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java index 7ed924bdcd..5f9adffb87 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java @@ -29,5 +29,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcUserDemandServiceDao extends BaseDao { - + + IcUserDemandServiceEntity selectByRecId(String demandRecId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 2d969e1d46..e963ac94df 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -20,9 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcUserDemandRecDTO; -import com.epmet.dto.form.demand.DemandAddFromDTO; -import com.epmet.dto.form.demand.DemandRecId; -import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.entity.IcUserDemandRecEntity; @@ -106,4 +104,27 @@ public interface IcUserDemandRecService extends BaseService pageList(UserDemandPageFormDTO formDTO); + + /** + * 未完成之前都可以取消 + * + * @param formDTO + */ + void cancel(StaffCancelFormDTO formDTO); + + /** + * 指派 + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + * 待处理+已派单才可以指派 + * + * @param formDTO + * @return + */ + void assign(AssignFormDTO formDTO); + + /** + * 完成并评价 + * @param formDTO + */ + void finish(FinishStaffFromDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 352b5e82f2..d76ba00374 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; @@ -31,17 +32,22 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.constant.UserDemandConstant; import com.epmet.dao.IcUserDemandOperateLogDao; import com.epmet.dao.IcUserDemandRecDao; +import com.epmet.dao.IcUserDemandSatisfactionDao; +import com.epmet.dao.IcUserDemandServiceDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.CustomerGridFormDTO; -import com.epmet.dto.form.demand.DemandAddFromDTO; -import com.epmet.dto.form.demand.DemandRecId; -import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.entity.IcUserDemandOperateLogEntity; import com.epmet.entity.IcUserDemandRecEntity; +import com.epmet.entity.IcUserDemandSatisfactionEntity; +import com.epmet.entity.IcUserDemandServiceEntity; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcUserDemandRecService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -63,6 +69,10 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl pageList(UserDemandPageFormDTO formDTO) { - CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getCurrentStaffId()); - String gridPids=staffInfoCacheResult.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfoCacheResult.getAgencyId()); - formDTO.setGridPids(formDTO.getGridPids()); - // todo - return null; + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getCurrentStaffId()); + if (null == staffInfo) { + throw new RenException("工作人员所属组织信息查询异常"); + } + if (StringUtils.isBlank(staffInfo.getAgencyPIds())) { + formDTO.setGridPids(staffInfo.getAgencyId()); + } else { + if (staffInfo.getAgencyPIds().contains(StrConstant.COLON)) { + formDTO.setGridPids(staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId())); + } + } + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO)); + List list=pageInfo.getList(); + if(CollectionUtils.isNotEmpty(list)){ + /*for(){ + + }*/ + } + return new PageData<>(list, pageInfo.getTotal()); + } + + /** + * 未完成之前都可以取消 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void cancel(StaffCancelFormDTO formDTO) { + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity) { + throw new RenException("需求不存在"); + } + if (UserDemandConstant.FINISH.equals(entity.getStatus())) { + //需求已完成,不可取消 + throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getCode(),EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getMsg()); + } + //1、修改主表 + //置为取消状态、设置取消时间 + entity.setStatus(UserDemandConstant.CANCELED); + entity.setCancelTime(new Date()); + baseDao.updateById(entity); + //2、插入操作日志 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setActionCode(UserDemandConstant.CANCEL); + logEntity.setOperateTime(entity.getCancelTime()); + operateLogDao.insert(logEntity); + } + + /** + * 指派 + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + * 待处理+已派单才可以指派 + * + * @param formDTO + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void assign(AssignFormDTO formDTO) { + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity) { + throw new RenException("需求不存在"); + } + if (!UserDemandConstant.PENDING.equals(entity.getStatus()) && !UserDemandConstant.ASSIGNED.equals(entity.getStatus())) { + //待处理+已派单才可以指派 + throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_ASSIGN.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_ASSIGN.getMsg()); + } + //1、修改主表 + //置为已派单 + entity.setStatus(UserDemandConstant.ASSIGNED); + baseDao.updateById(entity); + //2、插入操作日志 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setActionCode(UserDemandConstant.ASSIGN); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + //3、插入或更新服务记录 + IcUserDemandServiceEntity serviceEntity=ConvertUtils.sourceToTarget(formDTO,IcUserDemandServiceEntity.class); + IcUserDemandServiceEntity origin=demandServiceDao.selectByRecId(formDTO.getDemandRecId()); + if (null == origin) { + demandServiceDao.insert(serviceEntity); + }else{ + serviceEntity.setId(origin.getId()); + serviceEntity.setUpdatedBy(formDTO.getUserId()); + demandServiceDao.updateById(serviceEntity); + } + + } + + /** + * 完成并评价 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void finish(FinishStaffFromDTO formDTO) { + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity) { + throw new RenException("需求不存在"); + } + if (UserDemandConstant.PENDING.equals(entity.getStatus()) ||UserDemandConstant.CANCELED.equals(entity.getStatus())) { + //待处理或者已取消的不能评价 + throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getMsg()); + } + if(UserDemandConstant.FINISHED.equals(entity.getStatus()) ){ + //已经完成 + throw new RenException(EpmetErrorCode.DEMAND_FINISHED.getCode(), EpmetErrorCode.DEMAND_FINISHED.getMsg()); + } + //1、修改主表 + entity.setStatus(UserDemandConstant.FINISHED); + entity.setFinishResult(formDTO.getFinishResult()); + entity.setEvaluateFlag(true); + baseDao.updateById(entity); + + //2、插入操作日志 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setActionCode(UserDemandConstant.FINISH); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + + //3、更新服务记录 + IcUserDemandServiceEntity serviceEntity=demandServiceDao.selectById(formDTO.getServerId()); + serviceEntity.setServiceStartTime(formDTO.getServiceStartTime()); + serviceEntity.setServiceEndTime(formDTO.getServiceEndTime()); + serviceEntity.setFinishDesc(formDTO.getFinishDesc()); + demandServiceDao.updateById(serviceEntity); + + //4、插入评价 + IcUserDemandSatisfactionEntity satisfactionEntity=new IcUserDemandSatisfactionEntity(); + satisfactionEntity.setCustomerId(formDTO.getCustomerId()); + satisfactionEntity.setDemandRecId(formDTO.getDemandRecId()); + satisfactionEntity.setUserType(UserDemandConstant.STAFF); + satisfactionEntity.setUserId(formDTO.getUserId()); + satisfactionEntity.setEvaluateTime(logEntity.getOperateTime()); + satisfactionEntity.setScore(formDTO.getScore()); + demandSatisfactionDao.insert(satisfactionEntity); } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 3f62cd300d..90a203098b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -34,5 +34,64 @@ - + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml index b615ea90be..219f457444 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml @@ -20,5 +20,10 @@ - + \ No newline at end of file From 7cdf34fb4667d4e04aa0f879ed78c5fd039571e8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 23 Nov 2021 10:35:51 +0800 Subject: [PATCH 044/170] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=AE=B5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/AppointmentTimeFormDTO.java | 31 ++++++++++++++ .../dto/result/AppointmentTimeResultDTO.java | 34 ++++++++++++++++ .../IcPartyServiceCenterController.java | 13 ++++++ .../service/IcPartyServiceCenterService.java | 9 +++++ .../impl/IcPartyServiceCenterServiceImpl.java | 40 +++++++++++++++++++ 5 files changed, 127 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentTimeFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentTimeResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentTimeFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentTimeFormDTO.java new file mode 100644 index 0000000000..241aba3802 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentTimeFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/23 9:57 上午 + * @DESC + */ +@Data +public class AppointmentTimeFormDTO implements Serializable { + + private static final long serialVersionUID = -3645075481936669437L; + + public interface AppointmentTimeForm{} + + /** + * 事项ID + */ + @NotBlank(message = "matterId不能为空",groups = AppointmentTimeForm.class) + private String matterId; + + /** + * 日期,默认当天 + */ + @NotBlank(message = "date不能为空",groups = AppointmentTimeForm.class) + private String date; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentTimeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentTimeResultDTO.java new file mode 100644 index 0000000000..b37e4e913a --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentTimeResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.result; + +import com.epmet.dto.TimeDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/23 9:55 上午 + * @DESC + */ +@Data +public class AppointmentTimeResultDTO implements Serializable { + + private static final long serialVersionUID = 8724962797702659712L; + + /** + * 预约类型【每天:everyDay,工作日:workDay,周末:weekend】 + */ + private String appointmentType; + + /** + * 时间段 + */ + private List timeDetail; + + public AppointmentTimeResultDTO() { + this.appointmentType = ""; + this.timeDetail = new ArrayList<>(); + } +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 7f7bf3aced..21ba97eb2d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcPartyServiceCenterDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.AppointmentTimeResultDTO; import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.excel.IcPartyServiceCenterExcel; import com.epmet.service.IcPartyServiceCenterService; @@ -161,4 +162,16 @@ public class IcPartyServiceCenterController { return new Result>().ok(icPartyServiceCenterService.partyServiceCenterList(formDTO,tokenDto)); } + /** + * @Description 【党群服务中心】点击预约按钮时,查询可选时间 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:02 上午 + */ + @PostMapping("appointmenttime") + public Result appointmentTime(@RequestBody AppointmentTimeFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AppointmentTimeFormDTO.AppointmentTimeForm.class); + return new Result().ok(icPartyServiceCenterService.appointmentTime(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java index 5d87eae23b..d10c13d00f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyServiceCenterDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.AppointmentTimeResultDTO; import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcPartyServiceCenterEntity; @@ -140,4 +141,12 @@ public interface IcPartyServiceCenterService extends BaseService partyServiceCenterList(PartyServiceCenterListFormDTO formDTO,TokenDto tokenDto); + /** + * @Description 【党群服务中心】点击预约按钮时,查询可选时间 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:02 上午 + */ + AppointmentTimeResultDTO appointmentTime(AppointmentTimeFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 4d304befe6..87bdaf0cf3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.dao.IcPartyServiceCenterDao; import com.epmet.dto.IcPartyServiceCenterDTO; import com.epmet.dto.TimeDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.AppointmentTimeResultDTO; import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcMatterAppointmentRecordEntity; import com.epmet.entity.IcPartyServiceCenterEntity; @@ -279,6 +280,45 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); + l.eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()) + .eq(IcMatterAppointmentRecordEntity::getAppointmentDate,formDTO.getDate()) + .eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO); + List records = matterAppointmentRecordDao.selectList(l); + List timeList = getTimeList(matter.getStartTime(), matter.getEndTime(), NumConstant.THIRTY); + if (CollectionUtils.isEmpty(records)){ + result.setTimeDetail(timeList); + return result; + } + records.forEach(r -> { + String[] split = r.getTimeId().split(","); + for (String s : split) { + for (TimeDTO t : timeList) { + if (s.equals(t.getTimeId())){ + t.setIsAppointment(false); + continue; + } + } + } + }); + result.setTimeDetail(timeList); + return result; + } + public List getTimeList(String start,String end,Integer interval){ List result = new ArrayList<>(); List intervalTimeList = getIntervalTimeList(start, end, interval); From 8e5cb0cf3f3954e44457993d9d4a6bedd8545acd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Nov 2021 10:42:15 +0800 Subject: [PATCH 045/170] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddSocietyOrgFormDTO.java | 5 +- .../epmet/dto/form/EditSocietyOrgFormDTO.java | 3 + .../result/GetListSocietyOrgResultDTO.java | 10 ++- .../dto/result/SocietyOrgListResultDTO.java | 61 +++++++++++++++++++ .../controller/IcSocietyOrgController.java | 2 +- .../java/com/epmet/dao/IcSocietyOrgDao.java | 3 +- .../com/epmet/entity/IcSocietyOrgEntity.java | 2 +- .../service/impl/IcSocietyOrgServiceImpl.java | 14 +++-- .../main/resources/mapper/IcSocietyOrgDao.xml | 8 +-- .../dto/form/AddPlacePatrolRecordFormDTO.java | 4 +- .../AddPlacePatrolReviewRecordFormDTO.java | 3 +- .../dto/form/AddPlacePatrolTeamFormDTO.java | 3 +- .../EditPlacePatrolReviewRecordFormDTO.java | 2 + .../dto/form/EditPlacePatrolTeamFormDTO.java | 2 + .../com/epmet/entity/IcPlaceOrgEntity.java | 2 +- .../entity/IcPlacePatrolRecordEntity.java | 2 +- .../IcPlacePatrolReviewRecordEntity.java | 2 +- .../epmet/entity/IcPlacePatrolTeamEntity.java | 2 +- .../entity/IcPlacePatrolTeamStaffEntity.java | 2 +- .../service/impl/IcPlaceOrgServiceImpl.java | 1 + .../IcPlacePatrolReviewRecordServiceImpl.java | 1 + .../impl/IcPlacePatrolTeamServiceImpl.java | 1 + .../epmet/feign/EpmetUserOpenFeignClient.java | 4 +- 23 files changed, 111 insertions(+), 28 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java index 5d80ef5c18..c839c78a78 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -72,12 +73,12 @@ public class AddSocietyOrgFormDTO implements Serializable { /** * 起始服务时间 */ - @NotBlank(message = "起始服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceStartTime; /** * 终止服务时间 */ - @NotBlank(message = "终止服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceEndTime; /** * 绑定管理员[组织下录入的工作人员] diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java index e28bba50b5..83c1523800 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -62,10 +63,12 @@ public class EditSocietyOrgFormDTO implements Serializable { /** * 起始服务时间 */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceStartTime; /** * 终止服务时间 */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceEndTime; /** * 绑定管理员[组织下录入的工作人员] diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java index 1765350a6d..a7139bdc1d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java @@ -17,9 +17,11 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; +import java.util.Date; import java.util.List; /** @@ -34,7 +36,7 @@ public class GetListSocietyOrgResultDTO implements Serializable { //集合总条数 private Integer total; //社会组织信息 - private List list; + private List list; @Data public class SocietyOrgList{ @@ -51,9 +53,11 @@ public class GetListSocietyOrgResultDTO implements Serializable { //负责人电话 private String mobile; //起始服务时间 - private String serviceStartTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date serviceStartTime; //终止服务时间 - private String serviceEndTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date serviceEndTime; //绑定管理员[组织下Id录入的工作人员] private String adminStaffId; //绑定管理员[组织下录入的工作人员]姓名 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java new file mode 100644 index 0000000000..30b23d3ed6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java @@ -0,0 +1,61 @@ +/** + * 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.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 社会组织列表查询 + **/ +@Data +public class SocietyOrgListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //所属组织Id + private String agencyId; + //社会组织Id + private String societyId; + //社会组织名称 + private String societyName; + //服务事项 + private String serviceMatters; + //负责人姓名 + private String personInCharge; + //负责人电话 + private String mobile; + //起始服务时间 + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + //private Date serviceStartTime; + private String serviceStartTime; + //终止服务时间 + private String serviceEndTime; + //绑定管理员[组织下Id录入的工作人员] + private String adminStaffId; + //绑定管理员[组织下录入的工作人员]姓名 + private String adminStaffName = ""; + //地址 + private String address; + //经度 + private String longitude; + //维度 + private String dimension; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index e34a042862..0b97210715 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -57,7 +57,7 @@ public class IcSocietyOrgController { @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddSocietyOrgFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddSocietyOrgFormDTO.Add.class); - formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); societyOrgService.add(formDTO); return new Result(); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java index 0772af28de..2a435d7d9f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.SocietyOrgListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; import org.apache.ibatis.annotations.Mapper; @@ -40,7 +41,7 @@ public interface IcSocietyOrgDao extends BaseDao { * @Author sun * @Description 社会组织列表查询 **/ - List getList(GetListSocietyOrgFormDTO formDTO); + List getList(GetListSocietyOrgFormDTO formDTO); /** * 需求指派,选择社会组织,调用此接口 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java index e1abf636fe..3c564349cb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java @@ -33,7 +33,7 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("society_org") +@TableName("ic_society_org") public class IcSocietyOrgEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 1acdcba831..2376a88150 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -32,6 +32,7 @@ import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.form.UserIdsFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.SocietyOrgListResultDTO; import com.epmet.dto.result.StaffSinGridResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; @@ -92,6 +93,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl%s", formDTO.getSocietyId())); } entity = ConvertUtils.sourceToTarget(formDTO, IcSocietyOrgEntity.class); + entity.setId(formDTO.getSocietyId()); baseDao.updateById(entity); } @@ -114,7 +116,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl result = + PageInfo result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); if (CollectionUtils.isEmpty(result.getList())) { return resultDTO; @@ -122,7 +124,7 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl staffIdList = result.getList().stream().map(GetListSocietyOrgResultDTO.SocietyOrgList::getAdminStaffId).collect(Collectors.toList()); + List staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList()); staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); dto.setUserIds(staffIdList); Result> listResult = epmetUserOpenFeignClient.getStaffInfoList(dto); @@ -143,19 +145,19 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { - List resultList=new ArrayList<>(); + List resultList = new ArrayList<>(); CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { throw new RenException("工作人员所属组织信息查询异常"); } - List agencyIds=new ArrayList<>(); + List agencyIds = new ArrayList<>(); if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { - if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){ + if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) { agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); } } agencyIds.add(staffInfoCacheResult.getAgencyId()); - resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId(),formDTO.getQueryPurpose()); + resultList = baseDao.selectListByAgencyId(agencyIds, formDTO.getServiceName(), formDTO.getCustomerId(), formDTO.getQueryPurpose()); return resultList; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index 51e42c8402..4c91e2e3e7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -3,7 +3,7 @@ - SELECT agency_id agencyId, id societyId, @@ -22,7 +22,7 @@ WHERE del_flag = '0' - AND a.customer_id = #{customerId} + AND customer_id = #{customerId} AND society_name LIKE CONCAT('%', #{societyName}, '%') @@ -34,10 +34,10 @@ AND mobile = #{mobile} - AND date_id =]]> #{serviceStartTime} + AND service_start_time =]]> #{serviceStartTime} - AND date_id #{serviceEndTime} + AND service_end_time #{serviceEndTime} ORDER BY created_time DESC diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java index 51396f47b7..cb8b6b2724 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -80,7 +81,7 @@ public class AddPlacePatrolRecordFormDTO implements Serializable { /** * 首次巡查时间 */ - @NotBlank(message = "首次巡查时间不能为空", groups = {Add.class}) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date firstTime; /** @@ -99,6 +100,7 @@ public class AddPlacePatrolRecordFormDTO implements Serializable { /** * 拟复查时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date reviewTime; /** diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolReviewRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolReviewRecordFormDTO.java index ba2fc30592..fefc67e2ea 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolReviewRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolReviewRecordFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -59,7 +60,7 @@ public class AddPlacePatrolReviewRecordFormDTO implements Serializable { /** * 复查时间 */ - @NotBlank(message = "复查时间不能为空", groups = {Add.class}) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date reviewTime; /** diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java index c3f4ed0d06..b4767e0315 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -80,7 +81,7 @@ public class AddPlacePatrolTeamFormDTO implements Serializable { /** * 创建(建队)时间 */ - @NotBlank(message = "创建时间不能为空", groups = {Add.class}) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date time; /** diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolReviewRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolReviewRecordFormDTO.java index fbdd4047b9..0ceff8ebab 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolReviewRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolReviewRecordFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -53,6 +54,7 @@ public class EditPlacePatrolReviewRecordFormDTO implements Serializable { /** * 复查时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date reviewTime; /** diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java index 0da30dfdce..8036d2dd12 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -64,6 +65,7 @@ public class EditPlacePatrolTeamFormDTO implements Serializable { /** * 创建(建队)时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date time; /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java index 4908c96964..65540a28b1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java @@ -33,7 +33,7 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_org") +@TableName("ic_place_org") public class IcPlaceOrgEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java index 2431776acb..8e3c7d1d16 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java @@ -33,7 +33,7 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_record") +@TableName("ic_place_patrol_record") public class IcPlacePatrolRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java index 3da195adb9..dd492d7dfa 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java @@ -33,7 +33,7 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_review_record") +@TableName("ic_place_patrol_review_record") public class IcPlacePatrolReviewRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java index ea5adbde0d..3b3ca9f73e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java @@ -33,7 +33,7 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_team") +@TableName("ic_place_patrol_team") public class IcPlacePatrolTeamEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java index 0a469ee82c..fc16a6dc42 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java @@ -33,7 +33,7 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_team_staff") +@TableName("ic_place_patrol_team_staff") public class IcPlacePatrolTeamStaffEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java index 35c0a5352e..6deb307424 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java @@ -83,6 +83,7 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl%s", formDTO.getPlaceOrgId())); } entity = ConvertUtils.sourceToTarget(formDTO, IcPlaceOrgEntity.class); + entity.setId(formDTO.getPlaceOrgId()); baseDao.updateById(entity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java index 0a5f0f1c41..58978e1b7f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java @@ -101,6 +101,7 @@ public class IcPlacePatrolReviewRecordServiceImpl extends BaseServiceImpl%s", formDTO.getPlacePatrolReviewRecordId())); } entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolReviewRecordEntity.class); + entity.setId(formDTO.getPlacePatrolReviewRecordId()); baseDao.updateById(entity); //2.复查记录修改了复查时间或复查结果时对应修改巡查记录数据最新巡查时间和结果 if (StringUtils.isNotEmpty(formDTO.getReviewResult()) || StringUtils.isNotEmpty(formDTO.getReviewTime().toString())) { diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index 465468314c..f1725fb469 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -107,6 +107,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl%s", formDTO.getTeamId())); } entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolTeamEntity.class); + entity.setId(formDTO.getTeamId()); baseDao.updateById(entity); //2.全删全增分队成员字表数据 List entityList = new ArrayList<>(); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 3dcf542b80..5637b6b765 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -23,8 +23,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") -//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) public interface EpmetUserOpenFeignClient { /** From 3ec7bf5dc24fe69862f3a9d99dd2247e1a8124ce Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Nov 2021 11:19:03 +0800 Subject: [PATCH 046/170] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=BB=9F=E4=B8=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java | 2 +- .../src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java | 2 +- .../main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java | 2 +- .../com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java | 2 +- .../com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java | 2 +- .../main/java/com/epmet/controller/IcPlaceOrgController.java | 2 +- .../com/epmet/controller/IcPlacePatrolRecordController.java | 2 +- .../epmet/controller/IcPlacePatrolReviewRecordController.java | 2 +- .../com/epmet/controller/IcPlacePatrolTeamController.java | 2 +- .../main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java | 2 +- .../main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java | 2 +- .../main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java | 2 +- .../src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java | 2 +- .../java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java | 4 ++-- .../service/impl/IcPlacePatrolReviewRecordServiceImpl.java | 2 +- .../com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java index 62f6f491e2..519ec4f1a4 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java @@ -61,7 +61,7 @@ public class IcPlacePatrolRecordDTO implements Serializable { /** * 场所类型【admin库sys_dict_data表九小场所value值】 */ - private String ninePlacsVal; + private String ninePlaceVal; /** * 场所下的组织Id diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java index 6a3816fc29..7e4531f0a4 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java @@ -61,7 +61,7 @@ public class IcPlacePatrolTeamDTO implements Serializable { /** * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 */ - private String ninePlacsVals; + private String ninePlaceVals; /** * 分队名称 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java index b9db9d065e..c45a197ab8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java @@ -40,7 +40,7 @@ public class GetListPlaceOrgFormDTO implements Serializable { //场所区域【网格Id】 private String gridId; //场所类型【九小场所Value值】 - private String ninePlacsVal; + private String ninePlaceVal; //是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 private Boolean isPage = true; //页码 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java index a043750c6f..b839d432b6 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java @@ -38,7 +38,7 @@ public class GetListPlacePatrolRecordFormDTO implements Serializable { //场所区域【网格Id】 private String gridId; //场所类型【九小场所Value值】 - private String ninePlacsVal; + private String ninePlaceVal; //最终检查结果【0:合格 1:不合格】 private String finalResult; //页码 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java index 8660cf90e3..4b01a8b484 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java @@ -38,7 +38,7 @@ public class GetListPlacePatrolTeamFormDTO implements Serializable { //场所区域【网格Id】 private String gridId; //场所类型【九小场所Value值】 - private String ninePlacsVal; + private String ninePlaceVal; //是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 private Boolean isPage = true; //页码 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java index 413c721b89..238b6ed595 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java @@ -54,7 +54,7 @@ public class IcPlaceOrgController { @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlaceOrgFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddPlaceOrgFormDTO.Add.class); - formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); placeOrgService.add(formDTO); return new Result(); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java index 0f57a4bad0..9ef1e21e5d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java @@ -54,7 +54,7 @@ public class IcPlacePatrolRecordController { @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolRecordFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddPlacePatrolRecordFormDTO.Add.class); - formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); placePatrolRecordService.add(formDTO); return new Result(); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java index 9583e8a178..5f0f36c750 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java @@ -54,7 +54,7 @@ public class IcPlacePatrolReviewRecordController { @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolReviewRecordFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddPlacePatrolReviewRecordFormDTO.Add.class); - formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setCustomerId(tokenDto.getCustomerId()); placePatrolReviewRecordService.add(formDTO); return new Result(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java index c87c8d771c..6d62a5f951 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java @@ -55,7 +55,7 @@ public class IcPlacePatrolTeamController { @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolTeamFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddPlacePatrolTeamFormDTO.Add.class); - formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); placePatrolTeamService.add(formDTO); return new Result(); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java index 8e3c7d1d16..3b6995b09c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java @@ -61,7 +61,7 @@ public class IcPlacePatrolRecordEntity extends BaseEpmetEntity { /** * 场所类型【admin库sys_dict_data表九小场所value值】 */ - private String ninePlacsVal; + private String ninePlaceVal; /** * 场所下的组织Id diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java index 3b3ca9f73e..85b37ddd64 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java @@ -61,7 +61,7 @@ public class IcPlacePatrolTeamEntity extends BaseEpmetEntity { /** * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 */ - private String ninePlacsVals; + private String ninePlaceVals; /** * 分队名称 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java index 7404ed6a42..423f7b845e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java @@ -47,7 +47,7 @@ public class IcPlacePatrolRecordExcel { private String gridId; @Excel(name = "场所类型【admin库sys_dict_data表九小场所value值】") - private String ninePlacsVal; + private String ninePlaceVal; @Excel(name = "场所下的组织Id") private String placeOrgId; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java index b690216b1e..1e5da44cfa 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java @@ -47,7 +47,7 @@ public class IcPlacePatrolTeamExcel { private String gridIds; @Excel(name = "负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】") - private String ninePlacsVals; + private String ninePlaceVals; @Excel(name = "分队名称") private String teamName; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java index 6deb307424..f3dbe0bf65 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java @@ -80,7 +80,7 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl%s", formDTO.getPlaceOrgId())); + throw new RenException(String.format("修改九小场所下场所信息失败,场所不存在,场所Id->%s", formDTO.getPlaceOrgId())); } entity = ConvertUtils.sourceToTarget(formDTO, IcPlaceOrgEntity.class); entity.setId(formDTO.getPlaceOrgId()); @@ -95,7 +95,7 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl%s", placeOrgId)); + throw new RenException(String.format("删除九小场所下场所信息失败,场所Id->%s", placeOrgId)); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java index 58978e1b7f..ae5463de04 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java @@ -98,7 +98,7 @@ public class IcPlacePatrolReviewRecordServiceImpl extends BaseServiceImpl%s", formDTO.getPlacePatrolReviewRecordId())); + throw new RenException(String.format("修改巡查复查记录信息失败,复查记录不存在,复查记录Id->%s", formDTO.getPlacePatrolReviewRecordId())); } entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolReviewRecordEntity.class); entity.setId(formDTO.getPlacePatrolReviewRecordId()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index f1725fb469..4a73f3b5e0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -133,7 +133,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl%s", teamId)); + throw new RenException(String.format("删除九小场所下分队信息失败,分队Id->%s", teamId)); } //2.删除分队成员字表数据 placePatrolTeamStaffService.delByTeamId(teamId); From 2b94e2cf96e9f34f0cc1382fb467a09e2110d27e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Nov 2021 13:21:09 +0800 Subject: [PATCH 047/170] =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 2 + .../dto/form/demand/DemandAddFromDTO.java | 5 + .../dto/result/demand/DemandRecResultDTO.java | 17 +- .../epmet/constant/UserDemandConstant.java | 9 ++ .../controller/IcUserDemandRecController.java | 14 ++ .../com/epmet/dao/IcResiDemandDictDao.java | 3 + .../service/IcResiDemandDictService.java | 23 +-- .../epmet/service/IcUserDemandRecService.java | 4 +- .../impl/IcResiDemandDictServiceImpl.java | 24 +-- .../impl/IcUserDemandRecServiceImpl.java | 146 ++++++++++++++++-- .../resources/mapper/IcResiDemandDictDao.xml | 20 +++ .../resources/mapper/IcUserDemandRecDao.xml | 34 ++-- .../com/epmet/dto/IcResiDemandDictDTO.java | 107 ------------- 13 files changed, 238 insertions(+), 170 deletions(-) delete mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiDemandDictDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 7f54dd2bb8..ff22940cb5 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -87,6 +87,8 @@ public enum EpmetErrorCode { DEMAND_CAN_NOT_ASSIGN(8220, "当前状态,不可指派"), DEMAND_CAN_NOT_FINISH(8221, "当前状态,不能评价"), DEMAND_FINISHED(8222,"需求已完成"), + DEMAND_CAN_NOT_UPDATE(8223,"当前状态,不可更新需求"), + DEMAND_NOT_EXITS(8224,"需求不存在"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java index 8e1afc8143..6f968aad8a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java @@ -20,6 +20,11 @@ public class DemandAddFromDTO implements Serializable { public interface AddUserShowGroup extends CustomerClientShowGroup { } + public interface UpdateInternalGroup { + } + + @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) + private String demandRecId; private String customerId; private String currentUserId; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index a1cba4b0a5..c695a5d026 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -22,27 +22,34 @@ public class DemandRecResultDTO implements Serializable { private String categoryName; - private String content; - + //社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help private String reportType; + private String reportTypeName; + + private String content; private String reportUserName; @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date reportTime; - + private String demandUserId; private String demandUser; private String demandUserName; private String demandUserMobile; - @JsonIgnore + //@JsonIgnore private String serviceType; - @JsonIgnore private String serverId; + //@JsonIgnore private String serviceName; + private String serviceShowName; @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private String wantServiceTime; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ private String status; private String statusName; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java index 1f6bd0b578..c28768b30f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java @@ -9,6 +9,13 @@ public interface UserDemandConstant { String MINI_RESI = "mini_resi"; String IC_RESI_USER = "ic_resi_user"; + /** + * 上报类型:社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + String COMMUNITY_REPORT="community"; + String BUILDING_CAPTION_REPORT="building_caption"; + String PARTY_REPORT="party"; + String SELF_HELP_REPORT="self_help"; /** * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished */ @@ -29,8 +36,10 @@ public interface UserDemandConstant { /** * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish;; + * 更新需求:update */ String CREATE="create"; + String UPDATE="update"; String CANCEL="cancel"; String ASSIGN="assign"; String TAKE_ORDER="take_order"; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 4bac4aeefb..5bd3a3d2a8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -98,6 +98,20 @@ public class IcUserDemandRecController { return new Result().ok(icUserDemandRecService.add(fromDTO)); } + /** + * 更新需求 + * 只有待处理的才可以编辑 + * + * @param tokenDto + * @param fromDTO + * @return + */ + @PostMapping("update") + public Result update(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){ + fromDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.UpdateInternalGroup.class,DemandAddFromDTO.AddUserShowGroup.class); + return new Result().ok(icUserDemandRecService.update(fromDTO)); + } /** * 列表查询 分页 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java index 90c35d1689..cf2625d680 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java @@ -62,4 +62,7 @@ public interface IcResiDemandDictDao extends BaseDao { Integer selectMaxSort(@Param("customerId") String customerId, @Param("level") int level, @Param("parentCode") String parentCode); + + List selectSecondCodes(@Param("customerId") String customerId, @Param("cateogryCodes") List categoryCodes); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java index 1df5be75af..3836539181 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java @@ -21,14 +21,12 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IcResiDemandDictDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandPageResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import java.util.List; -import java.util.Map; /** * 居民需求字典表 @@ -42,7 +40,6 @@ public interface IcResiDemandDictService extends BaseService * @author generator * @date 2021-10-27 */ @@ -60,18 +57,6 @@ public interface IcResiDemandDictService extends BaseService - * @author generator - * @date 2021-10-27 - */ - List list(Map params); - - /** * 默认更新 * @@ -116,4 +101,12 @@ public interface IcResiDemandDictService extends BaseService listByCodes(String customerId, List categoryCodes); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index e963ac94df..a0b3799d4e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -76,14 +76,14 @@ public interface IcUserDemandRecService extends BaseService list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, IcResiDemandDictDTO.class); - } - private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); @@ -224,5 +212,17 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl listByCodes(String customerId, List categoryCodes) { + return baseDao.selectSecondCodes(customerId,categoryCodes); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index d76ba00374..d0b1d60a1a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -38,12 +38,13 @@ import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.CustomerGridFormDTO; import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.AllGridsByUserIdResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.demand.DemandRecResultDTO; -import com.epmet.entity.IcUserDemandOperateLogEntity; -import com.epmet.entity.IcUserDemandRecEntity; -import com.epmet.entity.IcUserDemandSatisfactionEntity; -import com.epmet.entity.IcUserDemandServiceEntity; +import com.epmet.entity.*; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.service.IcResiDemandDictService; import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -53,10 +54,9 @@ 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.Date; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; /** * 居民需求记录表 @@ -74,6 +74,10 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl gridInfoRes=govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO); + if(!gridInfoRes.success()||null==gridInfoRes.getData()){ + throw new RenException("查询网格信息失败"); + } + IcUserDemandRecEntity updateEntity=ConvertUtils.sourceToTarget(dto,IcUserDemandRecEntity.class); + updateEntity.setAgencyId(gridInfoRes.getData().getPid()); + updateEntity.setGridPids(gridInfoRes.getData().getPids()); + updateEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER); + updateEntity.setStatus(UserDemandConstant.PENDING); + updateEntity.setEvaluateFlag(false); + updateEntity.setId(dto.getDemandRecId()); + baseDao.updateById(updateEntity); + + IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(dto.getCustomerId()); + logEntity.setDemandRecId(dto.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(dto.getCurrentUserId()); + logEntity.setActionCode(UserDemandConstant.UPDATE); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + DemandRecId resultDto=new DemandRecId(); + resultDto.setDemandRecId(updateEntity.getId()); + return resultDto; } @Override @@ -180,9 +216,87 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl baseDao.pageSelect(formDTO)); List list=pageInfo.getList(); if(CollectionUtils.isNotEmpty(list)){ - /*for(){ + //1、查询网格信息 + List gridIds=list.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList()); + Result> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds); + List gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); + Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity())); - }*/ + //2、查询分类名称 + List categoryCodes=list.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList()); + List dictList=demandDictService.listByCodes(formDTO.getCustomerId(),categoryCodes); + Map dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName)); + + //3、查询志愿者 + // 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + List userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList()); + Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if(CollectionUtils.isEmpty(userIdList)||!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ + throw new RenException("查询志愿者信息异常"); + } + Map userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName)); + + for(DemandRecResultDTO res:list){ + if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) { + res.setGridName(gridInfoMap.get(res.getGridId()).getGridName()); + } + + if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) { + res.setCategoryName(dictMap.get(res.getCategoryCode())); + } + + if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) { + res.setServiceName(userInfoMap.get(res.getServerId())); + } + //社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + switch(res.getReportType()){ + case UserDemandConstant.COMMUNITY_REPORT : + res.setReportTypeName("社区帮办"); + break; + case UserDemandConstant.BUILDING_CAPTION_REPORT : + res.setReportTypeName("楼长帮办"); + break; + case UserDemandConstant.PARTY_REPORT : + res.setReportTypeName("党员帮办"); + break; + case UserDemandConstant.SELF_HELP_REPORT : + res.setReportTypeName("自身上报"); + break; + } + //待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + switch(res.getStatus()){ + case UserDemandConstant.PENDING : + res.setStatusName("待处理"); + break; + case UserDemandConstant.CANCELED : + res.setStatusName("已取消"); + break; + case UserDemandConstant.ASSIGNED : + res.setStatusName("已指派"); + break; + case UserDemandConstant.HAVE_ORDER : + res.setStatusName("已接单"); + break; + case UserDemandConstant.FINISHED : + res.setStatusName("已完成"); + break; + } + //服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + switch(res.getServiceType()){ + case UserDemandConstant.VOLUNTEER : + res.setServiceShowName(res.getServiceName().concat("(志愿者)")); + break; + case UserDemandConstant.SOCIAL_ORG : + res.setServiceShowName(res.getServiceName().concat("(社会组织)")); + break; + case UserDemandConstant.COMMUNITY_ORG : + res.setServiceShowName(res.getServiceName().concat("(社区自组织")); + break; + case UserDemandConstant.PARTY_UNIT : + res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)")); + break; + } + } } return new PageData<>(list, pageInfo.getTotal()); } @@ -197,7 +311,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 90a203098b..c7126c7070 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -37,20 +37,28 @@ + SELECT + ar.APPOINTMENT_NAME, + ar.APPOINTMENT_PHONE, + ar.REMARK, + ar.TIME_ID, + cm.MATTER_NAME + FROM ic_matter_appointment_record ar + LEFT JOIN ic_party_service_center_matter cm ON (cm.ID = ar.MATTER_ID AND cm.DEL_FLAG = 0) + WHERE ar.DEL_FLAG = 0 + AND ar.MATTER_ID = #{matterId} + AND ar.APPOINTMENT_DATE = #{date} + AND ar.`STATUS` = 'appointing' + \ No newline at end of file From 706f12873ce87fd9895028b8ff66570c5be94814 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 23 Nov 2021 14:59:49 +0800 Subject: [PATCH 051/170] emm --- .../commons/tools/exception/EpmetErrorCode.java | 3 +++ .../impl/IcPartyServiceCenterServiceImpl.java | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index ff22940cb5..f7bef02d54 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -149,6 +149,9 @@ public enum EpmetErrorCode { // 删除可预约事项存在预约记录时提示 MATTER_EXISTS_APPOINTMENT_ERROR(8526, "尚有未履行的预约存在,请确认后操作"), + // 预约某事项在某时间段存在记录时 + APPOINTMENT_TIME_ERROR(8527, "该时间段已被预约,请选择其他时间段"), + // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 03344c2a5e..382e65c112 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -231,8 +231,21 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); + l.eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()) + .eq(IcMatterAppointmentRecordEntity::getAppointmentDate,formDTO.getAppointmentDate()) + .eq(IcMatterAppointmentRecordEntity::getStatus,PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING) + .eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO); + List records = matterAppointmentRecordDao.selectList(l); + if (CollectionUtils.isNotEmpty(records)){ + List timeIds = new ArrayList<>(); + records.forEach(r -> { + timeIds.addAll(Arrays.asList(r.getTimeId().split(","))); + }); + if (timeIds.retainAll(Arrays.asList(formDTO.getTimeId().split(",")))){ + throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); + } + } CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); if (null == staffInfo){ throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); From fa7191126705c87ef93469bc779045d76ab06d38 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Nov 2021 15:33:56 +0800 Subject: [PATCH 052/170] ceshi xia --- .../commons/tools/exception/EpmetErrorCode.java | 1 + .../epmet/dto/form/demand/DemandAddFromDTO.java | 4 ++-- .../dto/result/demand/DemandRecResultDTO.java | 1 + .../controller/IcUserDemandRecController.java | 4 ++++ .../impl/IcResiDemandDictServiceImpl.java | 3 +++ .../impl/IcUserDemandRecServiceImpl.java | 17 +++++++++++------ .../resources/mapper/IcUserDemandRecDao.xml | 11 +++++++---- 7 files changed, 29 insertions(+), 12 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index ff22940cb5..1b0c172046 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -89,6 +89,7 @@ public enum EpmetErrorCode { DEMAND_FINISHED(8222,"需求已完成"), DEMAND_CAN_NOT_UPDATE(8223,"当前状态,不可更新需求"), DEMAND_NOT_EXITS(8224,"需求不存在"), + DEMAND_SERVICE_NOT_EXITS(8225,"服务记录不存在"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java index 6f968aad8a..f3a1c9ae0c 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java @@ -52,13 +52,13 @@ public class DemandAddFromDTO implements Serializable { /** * 二级需求分类编码 */ - @NotBlank(message = "需求类型不能为空",groups = AddUserShowGroup.class) + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) private String categoryCode; /** * 父级需求分类编码 */ - @NotBlank(message = "需求类型不能为空",groups = AddUserShowGroup.class) + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) private String parentCode; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index 85b3b7342e..fd606dc31f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -69,6 +69,7 @@ public class DemandRecResultDTO implements Serializable { /** 服务情况********************************************************************/ /** 服务情况********************************************************************/ /** 服务情况********************************************************************/ + private String serviceId; /** * 志愿者的姓名 * 社会组织名 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 5bd3a3d2a8..bc517fc654 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -27,6 +27,7 @@ import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.service.*; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -42,6 +43,7 @@ import java.util.List; * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-19 */ +@Slf4j @RestController @RequestMapping("userdemand") public class IcUserDemandRecController { @@ -94,6 +96,7 @@ public class IcUserDemandRecController { @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){ fromDTO.setCustomerId(tokenDto.getCustomerId()); + fromDTO.setCurrentUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.AddUserShowGroup.class); return new Result().ok(icUserDemandRecService.add(fromDTO)); } @@ -109,6 +112,7 @@ public class IcUserDemandRecController { @PostMapping("update") public Result update(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){ fromDTO.setCustomerId(tokenDto.getCustomerId()); + fromDTO.setCurrentUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.UpdateInternalGroup.class,DemandAddFromDTO.AddUserShowGroup.class); return new Result().ok(icUserDemandRecService.update(fromDTO)); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index 98830181ae..4fd9a2b193 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -97,6 +97,9 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl NumConstant.ZERO) { // 名称唯一 throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index d0b1d60a1a..6b2e6de95d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -229,13 +229,15 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList()); - Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); - if(CollectionUtils.isEmpty(userIdList)||!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ - throw new RenException("查询志愿者信息异常"); + Map userInfoMap=new HashMap<>(); + List userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toList()); + if(CollectionUtils.isNotEmpty(userIdList)){ + Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ + throw new RenException("查询志愿者信息异常"); + } + userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName)); } - Map userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName)); - for(DemandRecResultDTO res:list){ if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) { res.setGridName(gridInfoMap.get(res.getGridId()).getGridName()); @@ -416,6 +418,9 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') #{wantServiceEndDate} + order by r.WANT_SERVICE_TIME desc,r.CREATED_TIME asc \ No newline at end of file From 75d366a4798f379e256418e8317df792a38b403e Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 23 Nov 2021 16:00:38 +0800 Subject: [PATCH 053/170] =?UTF-8?q?=E8=81=94=E5=BB=BA=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=92=8C=E6=B4=BB=E5=8A=A8=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/PartyUnitFormDTO.java | 1 + .../controller/IcPartyActivityController.java | 21 +++++-- .../controller/IcPartyUnitController.java | 27 +++++++-- .../com/epmet/excel/IcPartyActivityExcel.java | 58 ++----------------- .../com/epmet/excel/IcPartyUnitExcel.java | 53 ++--------------- .../epmet/service/IcPartyActivityService.java | 5 +- .../com/epmet/service/IcPartyUnitService.java | 5 +- .../impl/IcPartyActivityServiceImpl.java | 23 +++++++- .../service/impl/IcPartyUnitServiceImpl.java | 45 +++++++++++--- 9 files changed, 112 insertions(+), 126 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java index 683cee2803..cf7841d93e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java @@ -15,6 +15,7 @@ import java.io.Serializable; public class PartyUnitFormDTO implements Serializable { private static final long serialVersionUID = 1256798619648265622L; + private String customerId; private String agencyId; private String unitName; private String serviceMatter; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 85fb59ec7b..05c8e2d10a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -32,7 +32,8 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; /** @@ -75,9 +76,19 @@ public class IcPartyActivityController { } @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = icPartyActivityService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, IcPartyActivityExcel.class); + public void export(@RequestBody PartyActivityFormDTO formDTO, HttpServletResponse response) throws Exception { + List list = icPartyActivityService.list(formDTO); + AtomicInteger i = new AtomicInteger(0); + List excelList = list.stream().map(item -> { + IcPartyActivityExcel excel = new IcPartyActivityExcel(); + excel.setIndex(i.getAndIncrement()); + excel.setUnitName(item.getUnitName()); + excel.setTitle(item.getTitle()); + excel.setAddress(item.getAddress()); + excel.setPeopleCount(item.getPeopleCount()); + excel.setActivityTime(item.getActivityTime()); + return excel; + }).collect(Collectors.toList()); + ExcelUtils.exportExcelToTarget(response, null, excelList, IcPartyActivityExcel.class); } - } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 3a8fcf0142..1daacc73c7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -37,7 +37,8 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; /** @@ -54,7 +55,8 @@ public class IcPartyUnitController { private IcPartyUnitService icPartyUnitService; @PostMapping("list") - public Result> search(@RequestBody PartyUnitFormDTO formDTO){ + public Result> search(@LoginUser TokenDto tokenDto, @RequestBody PartyUnitFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); PageData page = icPartyUnitService.search(formDTO); return new Result>().ok(page); } @@ -83,9 +85,24 @@ public class IcPartyUnitController { } @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = icPartyUnitService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, IcPartyUnitExcel.class); + public void export(@RequestBody PartyUnitFormDTO formDTO, HttpServletResponse response) throws Exception { + List list = icPartyUnitService.list(formDTO); + AtomicInteger i = new AtomicInteger(0); + List excelList = list.stream().map(item -> { + IcPartyUnitExcel excel = new IcPartyUnitExcel(); + excel.setIndex(i.getAndIncrement()); + excel.setUnitName(item.getUnitName()); + excel.setContact(item.getContact()); + excel.setContactMobile(item.getContactMobile()); + excel.setType(item.getType()); + excel.setMemberCount(item.getMemberCount()); + excel.setRemark(item.getRemark()); + excel.setSatisfaction(item.getSatisfaction()); + excel.setServiceMatter(String.join(String.valueOf((char)10), item.getServiceMatterList())); + return excel; + }).collect(Collectors.toList()); + + ExcelUtils.exportExcelToTarget(response, null, excelList, IcPartyUnitExcel.class); } /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java index 4dd9c4d87c..f2b54f5a36 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java @@ -31,32 +31,17 @@ import java.util.Date; @Data public class IcPartyActivityExcel { - @Excel(name = "主键") - private String id; + @Excel(name = "序号") + private Integer index; - @Excel(name = "客户id") - private String customerId; - - @Excel(name = "组织ID") - private String agencyId; - - @Excel(name = "组织的所有上级") - private String pids; - - @Excel(name = "单位ID") - private String unitId; - - @Excel(name = "服务事项") - private String serviceMatter; + @Excel(name = "单位名称") + private String unitName; @Excel(name = "活动标题") private String title; - @Excel(name = "活动目标") - private String target; - - @Excel(name = "活动内容") - private String content; + @Excel(name = "活动地址") + private String address; @Excel(name = "服务人数") private Integer peopleCount; @@ -64,35 +49,4 @@ public class IcPartyActivityExcel { @Excel(name = "活动时间") private Date activityTime; - @Excel(name = "活动地址") - private String address; - - @Excel(name = "活动地址经度") - private String longitude; - - @Excel(name = "活动地址纬度") - private String latitude; - - @Excel(name = "活动结果") - private String result; - - @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; - - } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java index ace9eff6b0..652542ef62 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java @@ -20,8 +20,6 @@ package com.epmet.excel; import cn.afterturn.easypoi.excel.annotation.Excel; import lombok.Data; -import java.util.Date; - /** * 联建单位 * @@ -31,28 +29,16 @@ import java.util.Date; @Data public class IcPartyUnitExcel { - @Excel(name = "主键") - private String id; - - @Excel(name = "客户id") - private String customerId; - - @Excel(name = "组织ID") - private String agencyId; - - @Excel(name = "网格ID") - private String gridId; - - @Excel(name = "") - private String pids; + @Excel(name = "序号") + private Integer index; @Excel(name = "单位名称") private String unitName; - @Excel(name = "分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他") + @Excel(name = "分类") private String type; - @Excel(name = "服务事项 多选逗号隔开") + @Excel(name = "服务事项") private String serviceMatter; @Excel(name = "联系人") @@ -61,41 +47,12 @@ public class IcPartyUnitExcel { @Excel(name = "联系电话") private String contactMobile; - @Excel(name = "在职党员数") + @Excel(name = "在职党员") private Integer memberCount; - @Excel(name = "地址") - private String address; - - @Excel(name = "中心位置经度") - private String longitude; - - @Excel(name = "中心位置纬度") - private String latitude; - @Excel(name = "群众满意度") private String satisfaction; @Excel(name = "备注") private String remark; - - @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; - - } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java index def86c6c60..322201808e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java @@ -24,7 +24,6 @@ import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.entity.IcPartyActivityEntity; import java.util.List; -import java.util.Map; /** * 联建活动 @@ -47,12 +46,12 @@ public interface IcPartyActivityService extends BaseService * @author generator * @date 2021-11-19 */ - List list(Map params); + List list(PartyActivityFormDTO formDTO); /** * 单条查询 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index de50d62319..c0bde53fb9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -26,7 +26,6 @@ import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import java.util.List; -import java.util.Map; /** * 联建单位 @@ -49,12 +48,12 @@ public interface IcPartyUnitService extends BaseService { /** * 默认查询 * - * @param params + * @param formDTO * @return java.util.List * @author generator * @date 2021-11-19 */ - List list(Map params); + List list(PartyUnitFormDTO formDTO); /** * 单条查询 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index bbf89dc290..2d3c6c81b2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -83,10 +83,27 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(PartyActivityFormDTO formDTO) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcPartyActivityEntity::getUnitId, formDTO.getUnitId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyActivityEntity::getServiceMatter, formDTO.getServiceMatter()); + wrapper.like(StringUtils.isNotBlank(formDTO.getTitle()), IcPartyActivityEntity::getTitle, formDTO.getTitle()); + wrapper.between(IcPartyActivityEntity::getActivityTime, formDTO.getStartTime(), formDTO.getEndTime()); + wrapper.orderByDesc(IcPartyActivityEntity::getUpdatedTime); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartyActivityDTO.class); + + IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); + unitDTO.setAgencyId(formDTO.getAgencyId()); + if (CollectionUtils.isNotEmpty(dtoList)) { + Map option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + dtoList.forEach(dto -> { + dto.setUnitName(option.get(dto.getUnitId())); + }); + } - return ConvertUtils.sourceToTarget(entityList, IcPartyActivityDTO.class); + return dtoList; } private QueryWrapper getWrapper(Map params){ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 7de26379e3..4c28cbbe90 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -33,16 +33,17 @@ import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.IcPartyUnitService; +import com.epmet.service.IcResiDemandDictService; import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -61,8 +62,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list = baseDao.selectList(wrapper); List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); + SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); + codeFormDTO.setCustomerId(formDTO.getCustomerId()); + codeFormDTO.setParentCategoryCode("1010"); + Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); dtoList.forEach(item -> { item.setType(unitTypeMap.getData().get(item.getType())); - //TODO 服务事项 if (StringUtils.isNotBlank(item.getServiceMatter())) { List matters = Arrays.asList(item.getServiceMatter().split(StrConstant.COMMA)); + item.setServiceMatterList(matters.stream().map(categoryMap::get).collect(Collectors.toList())); + } else { + item.setServiceMatterList(new ArrayList<>()); } }); PageInfo pageInfo = new PageInfo<>(dtoList); @@ -91,10 +100,32 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, IcPartyUnitDTO.class); + public List list(PartyUnitFormDTO formDTO) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getType()), IcPartyUnitEntity::getType, formDTO.getType()); + wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact()); + wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); + wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); + Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); + SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); + codeFormDTO.setCustomerId(formDTO.getCustomerId()); + codeFormDTO.setParentCategoryCode("1010"); + Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + dtoList.forEach(item -> { + item.setType(unitTypeMap.getData().get(item.getType())); + if (StringUtils.isNotBlank(item.getServiceMatter())) { + List matters = Arrays.asList(item.getServiceMatter().split(StrConstant.COMMA)); + item.setServiceMatterList(matters.stream().map(categoryMap::get).collect(Collectors.toList())); + } else { + item.setServiceMatterList(new ArrayList<>()); + } + }); + return dtoList; } private QueryWrapper getWrapper(Map params){ From 1a80dc2dbfe3fbafa80b91e81caca2fc1b47baab Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 23 Nov 2021 16:27:41 +0800 Subject: [PATCH 054/170] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 2 ++ .../form/EditPartyServiceCenterFormDTO.java | 7 ++++- .../AppointmentExistRecordResultDTO.java | 28 +++++++++++++++++++ .../dao/IcMatterAppointmentRecordDao.java | 9 ++++++ .../impl/IcPartyServiceCenterServiceImpl.java | 19 ++++++++++++- .../mapper/IcMatterAppointmentRecordDao.xml | 16 +++++++++++ 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentExistRecordResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 9035d81861..c65750548c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -153,6 +153,8 @@ public enum EpmetErrorCode { // 预约某事项在某时间段存在记录时 APPOINTMENT_TIME_ERROR(8527, "该时间段已被预约,请选择其他时间段"), + APPOINTMENT_ERROR(8528, "%s尚有未履行的预约存在,请确认后操作"), + // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java index 1bdb9886c3..d292fa6ae2 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java @@ -80,7 +80,12 @@ public class EditPartyServiceCenterFormDTO implements Serializable { private String partyServiceCenterId; /** - * 可预约事项 + * 新增的可预约事项 */ private List matterList; + + /** + * 要删除的事项 + */ + private List delMatterList; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentExistRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentExistRecordResultDTO.java new file mode 100644 index 0000000000..ffb4d74c20 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentExistRecordResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/23 10:45 上午 + * @DESC + */ +@Data +public class AppointmentExistRecordResultDTO implements Serializable { + + private static final long serialVersionUID = 6651436509788141940L; + + /** + * 事项名 + */ + private String matterName; + + private String matterId; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java index f8c02d5429..f349032024 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.AppointmentExistRecordResultDTO; import com.epmet.dto.result.AppointmentRecordResultDTO; import com.epmet.entity.IcMatterAppointmentRecordEntity; import org.apache.ibatis.annotations.Mapper; @@ -43,4 +44,12 @@ public interface IcMatterAppointmentRecordDao extends BaseDao appointmentRecord(@Param("matterId")String matterId,@Param("date")String date); + /** + * @Description 查询事项是不是存在预约记录 + * @param matterIds + * @author zxc + * @date 2021/11/23 3:48 下午 + */ + List appointmentExistRecord(@Param("matterIds")List matterIds); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 382e65c112..6fd12822f0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -39,6 +39,7 @@ import com.epmet.dao.IcPartyServiceCenterDao; import com.epmet.dto.IcPartyServiceCenterDTO; import com.epmet.dto.TimeDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.AppointmentExistRecordResultDTO; import com.epmet.dto.result.AppointmentRecordResultDTO; import com.epmet.dto.result.AppointmentTimeResultDTO; import com.epmet.dto.result.PartyServiceCenterListResultDTO; @@ -200,6 +201,22 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl delMatterList = formDTO.getDelMatterList(); + List existRecord = matterAppointmentRecordDao.appointmentExistRecord(delMatterList); + if (CollectionUtils.isNotEmpty(existRecord)){ + StringBuffer sb = new StringBuffer(); + existRecord.forEach(e -> { + sb.append(e.getMatterName()).append(","); + }); + String copywriter = sb.toString().substring(NumConstant.ZERO, sb.length() - NumConstant.ONE); + EpmetErrorCode.APPOINTMENT_ERROR.setMsg(String.format(EpmetErrorCode.APPOINTMENT_ERROR.getMsg(),copywriter)); + throw new RenException(EpmetErrorCode.APPOINTMENT_ERROR.getCode()); + }else { + matterService.deleteBatchIds(delMatterList); + } + } } /** @@ -242,7 +259,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl { timeIds.addAll(Arrays.asList(r.getTimeId().split(","))); }); - if (timeIds.retainAll(Arrays.asList(formDTO.getTimeId().split(",")))){ + if (timeIds.containsAll(Arrays.asList(formDTO.getTimeId().split(",")))){ throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml index c77ebceca6..0cdf818653 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -18,4 +18,20 @@ AND ar.APPOINTMENT_DATE = #{date} AND ar.`STATUS` = 'appointing' + + + \ No newline at end of file From 21a6d87dd5e154f109cb1e0689559f6cb33008a6 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Nov 2021 17:08:26 +0800 Subject: [PATCH 055/170] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/AddPlacePatrolTeamFormDTO.java | 4 ++-- .../dto/form/EditPlacePatrolTeamFormDTO.java | 7 ++++++- ...GetListPlacePatrolReviewRecordFormDTO.java | 2 +- .../IcPlacePatrolTeamController.java | 3 ++- .../epmet/dao/IcPlacePatrolTeamStaffDao.java | 6 ++++++ .../service/IcPlacePatrolTeamService.java | 2 +- .../IcPlacePatrolTeamStaffService.java | 6 ++++++ .../impl/IcPlacePatrolRecordServiceImpl.java | 21 ++++++++++++++++--- .../IcPlacePatrolReviewRecordServiceImpl.java | 4 ++-- .../impl/IcPlacePatrolTeamServiceImpl.java | 11 +++++----- .../IcPlacePatrolTeamStaffServiceImpl.java | 13 ++++++++++++ .../main/resources/mapper/IcPlaceOrgDao.xml | 6 +++--- .../mapper/IcPlacePatrolRecordDao.xml | 10 +++++---- .../resources/mapper/IcPlacePatrolTeamDao.xml | 6 +++--- .../mapper/IcPlacePatrolTeamStaffDao.xml | 11 ++++++++++ 15 files changed, 86 insertions(+), 26 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java index b4767e0315..a0ece62eb1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java @@ -106,7 +106,7 @@ public class AddPlacePatrolTeamFormDTO implements Serializable { * 分队成员信息 */ @Valid - @NotEmpty(message = "成员列表不能为空") + @NotEmpty(message = "成员列表不能为空", groups = {Add.class}) private List memberList; //token中userId @@ -115,7 +115,7 @@ public class AddPlacePatrolTeamFormDTO implements Serializable { public interface Add { } @Data - public class Member { + public static class Member { //姓名 private String name; //联系电话 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java index 8036d2dd12..4509c6f443 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java @@ -35,6 +35,11 @@ import java.util.List; public class EditPlacePatrolTeamFormDTO implements Serializable { private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; /** * 分队Id */ @@ -99,7 +104,7 @@ public class EditPlacePatrolTeamFormDTO implements Serializable { } @Data - public class Member { + public static class Member { //姓名 private String name; //联系电话 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java index 596bad17d4..225962bb89 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java @@ -32,9 +32,9 @@ import java.io.Serializable; public class GetListPlacePatrolReviewRecordFormDTO implements Serializable { private static final long serialVersionUID = 1L; //巡查记录Id + @NotBlank(message = "巡查记录Id不能为空", groups = {GetData.class}) private String placePatrolRecordId; //复查记录Id - @NotBlank(message = "复查记录Id不能为空", groups = {GetData.class}) private String placePatrolReviewRecordId; //页码 @Min(1) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java index 6d62a5f951..815505c2e9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java @@ -68,6 +68,7 @@ public class IcPlacePatrolTeamController { @PostMapping("edit") public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Edit.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); placePatrolTeamService.edit(formDTO); return new Result(); } @@ -79,7 +80,7 @@ public class IcPlacePatrolTeamController { @PostMapping("del") public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Del.class); - placePatrolTeamService.del(formDTO.getTeamId()); + placePatrolTeamService.del(tokenDto.getUserId(), formDTO.getTeamId()); return new Result(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java index 56dee8582f..8f8df8c9dd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java @@ -51,4 +51,10 @@ public interface IcPlacePatrolTeamStaffDao extends BaseDao selectByTeamIds(@Param("teamIds") List teamIds); + + /** + * @Author sun + * @Description 逻辑删除分队成员子表数据 + **/ + int upByTeamId(@Param("staffId") String staffId, @Param("teamId") String teamId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamService.java index 2c17403e80..6ec9cf1a96 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamService.java @@ -49,7 +49,7 @@ public interface IcPlacePatrolTeamService extends BaseService getList(String teamId); + + /** + * @Author sun + * @Description 逻辑删除分队成员子表数据 + **/ + void upByTeamId(String staffId, String teamId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java index ab8d20776f..7cbc07b966 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java @@ -112,7 +112,7 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl result = baseDao.getList(dto); @@ -127,12 +127,27 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl teamIds = new ArrayList<>(); + teamIds.add(resultDTO.getPlacePatrolTeamId()); + List teamDTOList = icPlacePatrolTeamStaffDao.selectByTeamIds(teamIds); + + //4.封装九小场所、分队成员数据 for (OptionResultDTO n : nineList.getData()){ if(resultDTO.getNinePlaceVal().equals(n.getValue())){ resultDTO.setNinePlaceName(n.getLabel()); } } + //分队成员 + StringBuffer inspectorsNames = new StringBuffer(""); + for (String str : resultDTO.getInspectors().split(",")) { + teamDTOList.forEach(r -> { + if (str.equals(r.getId())) { + inspectorsNames.append("".equals(inspectorsNames.toString().trim()) ? r.getName() : "," + r.getName()); + } + }); + } + resultDTO.setInspectorsNames(inspectorsNames.toString()); return resultDTO; } @@ -175,7 +190,7 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl { if (str.equals(r.getId())) { - inspectorsNames.append("".equals(inspectorsNames) ? r.getName() : "," + r.getName()); + inspectorsNames.append("".equals(inspectorsNames.toString().trim()) ? r.getName() : "," + r.getName()); } }); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java index ae5463de04..7341c0012a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java @@ -153,7 +153,7 @@ public class IcPlacePatrolReviewRecordServiceImpl extends BaseServiceImpl { if (str.equals(r.getId())) { - inspectorsNames.append("".equals(inspectorsNames) ? r.getName() : "," + r.getName()); + inspectorsNames.append("".equals(inspectorsNames.toString().trim()) ? r.getName() : "," + r.getName()); } }); } @@ -189,7 +189,7 @@ public class IcPlacePatrolReviewRecordServiceImpl extends BaseServiceImpl { if (str.equals(r.getId())) { - inspectorsNames.append("".equals(inspectorsNames) ? r.getName() : "," + r.getName()); + inspectorsNames.append("".equals(inspectorsNames.toString().trim()) ? r.getName() : "," + r.getName()); } }); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index 4a73f3b5e0..c3e5ff7fa5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -119,6 +119,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl%s", teamId)); } - //2.删除分队成员字表数据 - placePatrolTeamStaffService.delByTeamId(teamId); + //2.逻辑删除分队成员字表数据 + placePatrolTeamStaffService.upByTeamId(staffId, teamId); } /** @@ -174,7 +175,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { - if (str.equals(r.getGridName())) { + if (str.equals(r.getId())) { gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); } }); @@ -230,7 +231,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { - if (str.equals(r.getGridName())) { + if (str.equals(r.getId())) { gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); } }); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java index f8ca6fc890..8f26db929e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java @@ -48,9 +48,22 @@ public class IcPlacePatrolTeamStaffServiceImpl extends BaseServiceImpl getList(String teamId) { return baseDao.getByTeamId(teamId); } + /** + * @Author sun + * @Description 逻辑删除分队成员子表数据 + **/ + @Override + public void upByTeamId(String staffId, String teamId) { + baseDao.upByTeamId(staffId, teamId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml index 4d04a72530..27514baefe 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml @@ -8,7 +8,7 @@ a.id placeOrgId, a.grid_id gridId, b.grid_name gridName, - a.nine_place_val ninePlaceVale, + a.nine_place_val ninePlaceVal, a.place_org_name placeOrgName, a.address address, a.scale scale, @@ -28,8 +28,8 @@ AND a.grid_id = #{gridId} - - AND a.nine_place_val = #{ninePlacsVal} + + AND a.nine_place_val = #{ninePlaceVal} AND a.place_org_name LIKE CONCAT('%', #{placeOrgName}, '%') diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml index efde00da1e..597a62e186 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml @@ -13,7 +13,7 @@ c.place_org_name placeOrgName, a.place_patrol_team_id placePatrolTeamId, d.team_name placePatrolTeamName, - a.nine_placs_val ninePlaceVal, + a.nine_place_val ninePlaceVal, a.inspectors inspectors, a.first_time firstTime, a.first_result firstResult, @@ -28,15 +28,17 @@ LEFT JOIN ic_place_patrol_team d ON a.place_patrol_team_id = d.id WHERE a.del_flag = '0' - AND a.customer_id = '' + + AND a.id = #{placePatrolRecordId} + AND a.customer_id = #{customerId} AND a.grid_id = #{gridId} - - AND a.nine_place_val = #{ninePlacsVal} + + AND a.nine_place_val = #{ninePlaceVal} AND a.place_org_id IN (select id from ic_place_org where place_org_name like concat('%', #{placeOrgName}, '%')) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml index 99bbcb7886..a218d4f050 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml @@ -6,7 +6,7 @@ - + @@ -30,8 +30,8 @@ AND grid_ids LIKE CONCAT('%', #{gridId}, '%') - - AND nine_placs_vals LIKE CONCAT('%', #{ninePlacsVal}, '%') + + AND nine_place_vals LIKE CONCAT('%', #{ninePlaceVal}, '%') AND person_in_charge LIKE CONCAT('%', #{personInCharge}, '%') diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml index 7dddc8e731..06d8285f21 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml @@ -36,4 +36,15 @@ place_patrol_team_id ASC + + UPDATE + ic_place_patrol_team_staff + SET + del_flag = '1', + updated_by = #{staffId}, + updated_time = NOW() + WHERE + place_patrol_team_id = #{teamId} + + \ No newline at end of file From 212f8eacb4a7d16c4a1041e222c100bbba575dda Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Nov 2021 17:47:31 +0800 Subject: [PATCH 056/170] =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=A0=B9=E4=B9=8B=E5=89=8D=E4=B8=80?= =?UTF-8?q?=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcSocietyOrgDTO.java | 2 +- .../src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java | 2 +- .../src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java | 2 +- .../java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java | 2 +- .../main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java | 2 +- .../src/main/java/com/epmet/entity/IcSocietyOrgEntity.java | 2 +- .../src/main/java/com/epmet/excel/IcSocietyOrgExcel.java | 2 +- .../src/main/resources/mapper/IcSocietyOrgDao.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java index 36ffcbe8a0..898b01df9d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java @@ -101,7 +101,7 @@ public class IcSocietyOrgDTO implements Serializable { /** * 维度 */ - private String dimension; + private String latitude; /** * 备注 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java index c839c78a78..a1a12c71e6 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java @@ -96,7 +96,7 @@ public class AddSocietyOrgFormDTO implements Serializable { /** * 维度 */ - private String dimension; + private String latitude; //token中userId private String staffId; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java index 83c1523800..2acad633c0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java @@ -85,7 +85,7 @@ public class EditSocietyOrgFormDTO implements Serializable { /** * 维度 */ - private String dimension; + private String latitude; //token中userId private String staffId; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java index a7139bdc1d..376078ab10 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java @@ -67,7 +67,7 @@ public class GetListSocietyOrgResultDTO implements Serializable { //经度 private String longitude; //维度 - private String dimension; + private String latitude; } } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java index 30b23d3ed6..277238e78d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java @@ -56,6 +56,6 @@ public class SocietyOrgListResultDTO implements Serializable { //经度 private String longitude; //维度 - private String dimension; + private String latitude; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java index 3c564349cb..569156783f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java @@ -101,7 +101,7 @@ public class IcSocietyOrgEntity extends BaseEpmetEntity { /** * 维度 */ - private String dimension; + private String latitude; /** * 备注 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java index 4d9089fa35..5f3d464dfb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java @@ -71,7 +71,7 @@ public class IcSocietyOrgExcel { private String longitude; @Excel(name = "维度") - private String dimension; + private String latitude; @Excel(name = "备注") private String remarks; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index 4c91e2e3e7..a4685af4ce 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -16,7 +16,7 @@ admin_staff_id adminStaffId, address address, longitude longitude, - dimension dimension + latitude latitude FROM ic_society_org WHERE From fb03c0a29781932feb6b25f4e1c8762cd6d83069 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Nov 2021 18:02:41 +0800 Subject: [PATCH 057/170] outputStream --- .../epmet/commons/tools/utils/ExcelUtils.java | 2 +- .../screen/ScreenProjectController.java | 2 +- .../controller/IcResiUserController.java | 227 +----------------- 3 files changed, 8 insertions(+), 223 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java index 6dae6eb249..754cdf012d 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java @@ -121,7 +121,7 @@ public class ExcelUtils { out.flush(); out.close(); } - public static OutputStream getOutputStream(String fileName, HttpServletResponse response) throws Exception { + public static OutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws Exception { fileName = URLEncoder.encode(fileName, "UTF-8"); response.setContentType("application/vnd.ms-excel"); response.setCharacterEncoding("utf8"); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java index 98cda05a2b..5b9e5c314d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java @@ -268,7 +268,7 @@ public class ScreenProjectController { //String template = this.getClass().getResource(templatePath).getPath(); String fileName = "项目统计.xlsx"; - excelWriter = EasyExcel.write(ExcelUtils.getOutputStream(fileName, response)).withTemplate(inputStream).build(); + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response)).withTemplate(inputStream).build(); WriteSheet writeSheet = EasyExcel.writerSheet().build(); excelWriter.fill(mapData, writeSheet); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 127beb5828..1887feab08 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -17,15 +17,10 @@ package com.epmet.controller; -import cn.afterturn.easypoi.excel.ExcelExportUtil; -import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelWriter; -import com.alibaba.excel.enums.WriteDirectionEnum; import com.alibaba.excel.write.metadata.WriteSheet; -import com.alibaba.excel.write.metadata.fill.FillConfig; import com.alibaba.excel.write.metadata.fill.FillWrapper; -import com.alibaba.fastjson.JSON; import com.epmet.commons.rocketmq.messages.IcResiUserAddMQMsg; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; @@ -40,12 +35,11 @@ import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.IpUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.constant.IcResiUserConstant; import com.epmet.constant.SystemMessageType; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; @@ -62,20 +56,20 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.poi.ss.usermodel.Workbook; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; -import java.io.*; -import java.net.URLEncoder; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; -import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -234,155 +228,6 @@ public class IcResiUserController { return new Result().ok(icResiUserService.queryIcResiDetail(pageFormDTO)); } - /** - * desc :备用 easypoi - * - * @param customerId - * @param pageFormDTO - * @param response - * @throws Exception - */ - @RequestMapping(value = "/exportExcel2") - public void exportExcel(@RequestHeader String customerId, @LoginUser TokenDto tokenDto, @RequestBody IcResiUserPageFormDTO pageFormDTO, HttpServletResponse response) throws Exception { - //tokenDto.setUserId("9e37adcce6472152e6508a19d3683e02"); - CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); - String staffOrgPath = null; - if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { - staffOrgPath = staffInfoCacheResult.getAgencyPIds().concat(":").concat(staffInfoCacheResult.getAgencyId()); - } else { - staffOrgPath = staffInfoCacheResult.getAgencyId(); - } - pageFormDTO.setCustomerId(customerId); - pageFormDTO.setPageFlag(false); - CustomerFormResultDTO resiFormItems = getResiFormAddItems(pageFormDTO.getCustomerId()); - - Map> otherSheetItems = buildItemMap(resiFormItems); - - Map> resiMainList = null;//icResiUserService.getDataForExport(otherSheetItems.get(IcResiUserConstant.IC_RESI_USER), IcResiUserConstant.IC_RESI_USER, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); - //resiMainList = (List>)JSON.parse("[{\"IS_BDHJ\":\"1\",\"IS_SPECIAL\":\"1\",\"IS_XFRY\":\"0\",\"REMARKS\":\"beizhu\",\"IS_PARTY\":\"1\",\"icResiUserId\":\"yzmtest2\",\"HOME_ID\":\"中海国际社区一里城1号楼1单元101\",\"HOUSE_TYPE\":\"平房\",\"UNIT_NAME\":\"1单元\",\"GRID_ID\":\"市北区-市北区第三网格3\",\"IS_DB\":\"0\",\"GENDER\":\"男\",\"BIRTHDAY\":\"2021-10-04\",\"IS_VETERANS\":\"0\",\"IS_MB\":\"0\",\"IS_UNEMPLOYED\":\"0\",\"DEMAND_NAME\":null,\"IS_KC\":\"0\",\"IS_ENSURE_HOUSE\":\"0\",\"IS_SD\":\"0\",\"NAME\":\"尹作梅\",\"RDSJ\":null,\"IS_VOLUNTEER\":\"1\",\"GRID_ID_VALUE\":\"e74829ffc43d5470eba6b5e060c11e63\",\"IS_SZ\":\"0\",\"IS_CJ\":\"0\",\"HOME_ID_VALUE\":\"200\",\"DEMAND_CATEGORY_IDS\":null,\"VILLAGE_NAME\":\"中海国际社区一里城\",\"IS_DBH\":\"0\",\"IS_SN\":\"0\",\"BUILD_NAME\":\"1号楼\",\"IS_YLFN\":\"0\",\"IS_UNITED_FRONT\":\"0\",\"ID_CARD\":\"371325199310260529\",\"MOBILE\":\"15764229697\",\"IS_OLD_PEOPLE\":\"0\",\"DOOR_NAME\":\"101\"},{\"IS_SPECIAL\":\"1\",\"IS_XFRY\":\"0\",\"REMARKS\":\"beizhu\",\"IS_PARTY\":\"1\",\"icResiUserId\":\"yzmtest\",\"HOME_ID\":\"中海国际社区一里城1号楼1单元101\",\"HOUSE_TYPE\":\"平房\",\"UNIT_NAME\":\"1单元\",\"GRID_ID\":\"市北区-市北区第三网格3\",\"IS_DB\":\"0\",\"GENDER\":\"男\",\"BIRTHDAY\":\"2021-10-04\",\"IS_VETERANS\":\"0\",\"IS_MB\":\"0\",\"IS_UNEMPLOYED\":\"0\",\"DEMAND_NAME\":\"心理咨询\",\"IS_KC\":\"0\",\"IS_ENSURE_HOUSE\":\"0\",\"IS_SD\":\"0\",\"NAME\":\"尹作梅\",\"RDSJ\":\"2021-10-28 00:00:00\",\"IS_VOLUNTEER\":\"1\",\"GRID_ID_VALUE\":\"e74829ffc43d5470eba6b5e060c11e63\",\"IS_SZ\":\"0\",\"IS_CJ\":\"0\",\"HOME_ID_VALUE\":\"200\",\"DEMAND_CATEGORY_IDS\":\"10180002\",\"VILLAGE_NAME\":\"中海国际社区一里城\",\"IS_DBH\":\"0\",\"IS_SN\":\"0\",\"BUILD_NAME\":\"1号楼\",\"IS_YLFN\":\"0\",\"IS_UNITED_FRONT\":\"0\",\"ID_CARD\":\"371325199310260529\",\"MOBILE\":\"15764229697\",\"IS_OLD_PEOPLE\":\"0\",\"DOOR_NAME\":\"101\"}]"); - log.info("resiMainList:{}", JSON.toJSONString(resiMainList)); - String templatePath = "excel/ic_resi_info_cid.xls"; - TemplateExportParams params = new TemplateExportParams(templatePath, true); - - Map> sheetMap = new HashMap<>(); - Map mapData = new HashMap<>(); - mapData.put("list", resiMainList.values()); - System.out.println("===resiMainList===" + " " + JSON.toJSONString(resiMainList.values())); - sheetMap.put(0, mapData); - AtomicInteger n = new AtomicInteger(); - for (FormItemResult item : resiFormItems.getItemList()) { - //如果 childGroup是空 或者是主表 则跳过 继续下次循环 - if (item.getChildGroup() == null || IcResiUserConstant.IC_RESI_USER.equals(item.getChildGroup().getTableName())) { - continue; - } - String tableName = item.getChildGroup().getTableName(); - - Map itemMap1 = otherSheetItems.get(tableName); - Map> resiChildMap = null;//icResiUserService.getDataForExport(itemMap1, tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); - //resiChildMap.forEach((key, value) -> value.putAll(resiMainList.get(key))); - - Map mapData2 = new HashMap<>(); - mapData2.put("list", resiChildMap.values()); - System.out.println("===resiChildMap===" + tableName + " " + JSON.toJSONString(resiChildMap.values())); - sheetMap.put(n.incrementAndGet(), mapData2); - - - } - - Workbook workbook = ExcelExportUtil.exportExcel(sheetMap, params); - workbook.setActiveSheet(0); - workbook.write(getOutputStream("居民基本信息.xls", response)); - } - - @RequestMapping(value = "/exportExcel3") - public void exportExcelByEasyExcel3(@RequestHeader String customerId,@LoginUser TokenDto tokenDto, @RequestBody IcResiUserPageFormDTO pageFormDTO, HttpServletResponse response) throws Exception { - //tokenDto.setUserId("9e37adcce6472152e6508a19d3683e02"); - CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); - String staffOrgPath = null; - if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { - staffOrgPath = staffInfoCacheResult.getAgencyPIds().concat(":").concat(staffInfoCacheResult.getAgencyId()); - } else { - staffOrgPath = staffInfoCacheResult.getAgencyId(); - } - pageFormDTO.setCustomerId(customerId); - pageFormDTO.setPageFlag(false); - CustomerFormResultDTO resiFormItems = getResiFormAddItems(pageFormDTO.getCustomerId()); - Map> otherSheetItems = buildItemMap(resiFormItems); - - /*List resiFormAllItems = getResiFormAllItems(pageFormDTO.getCustomerId()); - resiFormAllItems.stream().collect(Collectors.groupingBy(e ->e.get));*/ - - //获取模版文件 - File file = getExportTemplateFile(customerId); - ExcelWriter excelWriter = EasyExcel.write(getOutputStream("居民基本信息.xlsx", response)).withTemplate(file).build(); - - FillConfig fillConfig = FillConfig.builder().direction(WriteDirectionEnum.VERTICAL).build(); - IcResiUserTableEnum tableEnums = IcResiUserTableEnum.getObjectByTableName(IcResiUserConstant.IC_RESI_USER); - WriteSheet fistSheet = EasyExcel.writerSheet(tableEnums.getSheetNo()).build(); - - pageFormDTO.setPageSize(NumConstant.FIVE_HUNDRED); - pageFormDTO.setPageNo(NumConstant.ONE); - //子表是否停止查询 - Set stopSearchSet = new HashSet<>(); - Map childTableWriteSheetMap = new HashMap<>(); - Map> resiMainTableMap = null; - do { - resiMainTableMap = null;//icResiUserService.getDataForExport(otherSheetItems.get(IcResiUserConstant.IC_RESI_USER), IcResiUserConstant.IC_RESI_USER, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); - //如果 返回的条数小于每页显示的数 则退出查询 - if (resiMainTableMap.keySet().size() < pageFormDTO.getPageSize()) { - stopSearchSet.add(IcResiUserConstant.IC_RESI_USER); - } - //写入数据 - excelWriter.fill(new FillWrapper("t1", resiMainTableMap.values()), fillConfig, fistSheet); - pageFormDTO.setPageNo(pageFormDTO.getPageNo() + 1); - //重置数据 - resiMainTableMap.clear(); - } while (!stopSearchSet.contains(IcResiUserConstant.IC_RESI_USER)); - - //子表数据写入 - AtomicInteger n = new AtomicInteger(); - for (FormItemResult item : resiFormItems.getItemList()) { - - //如果 childGroup是空 或者是主表 则跳过 继续下次循环 - if (item.getChildGroup() == null || IcResiUserConstant.IC_RESI_USER.equals(item.getChildGroup().getTableName())) { - continue; - } - String tableName = item.getChildGroup().getTableName(); - pageFormDTO.setPageNo(NumConstant.ONE); - //循环一次 写入每个sheet - do { - //如果包含则说明子表的数据 已经查询完毕 无需再继续查询了 - boolean contains = stopSearchSet.contains(tableName); - if (contains) { - continue; - } - Map itemMap1 = otherSheetItems.get(tableName); - Map> resiChildMap = null;//icResiUserService.getDataForExport(itemMap1, tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); - //如果 返回的条数小于每页显示的数 则退出查询 - if (resiChildMap.keySet().size() < pageFormDTO.getPageSize()) { - stopSearchSet.add(tableName); - } - tableEnums = IcResiUserTableEnum.getObjectByTableName(tableName); - if (tableEnums == null) { - continue; - } - //构建新的sheet - WriteSheet childWriteSheet = childTableWriteSheetMap.get(tableName); - if (childWriteSheet == null) { - childWriteSheet = EasyExcel.writerSheet(tableEnums.getSheetNo()).build(); - } - childTableWriteSheetMap.put(tableName, childWriteSheet); - //写入数据 - excelWriter.fill(new FillWrapper("t" + (tableEnums.getSheetNo() + NumConstant.ONE), resiChildMap.values()), childWriteSheet); - pageFormDTO.setPageNo(pageFormDTO.getPageNo() + NumConstant.ONE); - //重置数据 - resiChildMap.clear(); - } while (!stopSearchSet.contains(tableName)); - } - - excelWriter.finish(); - } - /** * desc: 导出居民信息 * @@ -412,7 +257,7 @@ public class IcResiUserController { File file = getExportTemplateFile(customerId); ExcelWriter excelWriter = null; try { - excelWriter = EasyExcel.write(getOutputStream("居民基本信息.xlsx", response)).withTemplate(file).build(); + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("居民基本信息.xlsx", response)).withTemplate(file).build(); //子表是否停止查询 Set stopSearchSet = new HashSet<>(); @@ -519,66 +364,6 @@ public class IcResiUserController { return file; } - @NotNull - private Map> buildItemMap(CustomerFormResultDTO resiFormItems) { - Map> otherSheetItems = new HashMap<>(); - - //主表的 - for (FormItemResult formItemResult : resiFormItems.getItemList()) { - if (StringUtils.isBlank(formItemResult.getColumnName())) { - continue; - } - - Map itemMap = otherSheetItems.getOrDefault(formItemResult.getTableName(), new HashMap<>()); - otherSheetItems.putIfAbsent(formItemResult.getTableName(), itemMap); - if (formItemResult.getItemType().equals("checkbox") || formItemResult.getItemType().equals("select") || formItemResult.getItemType().equals("radio")) { - itemMap.put(formItemResult.getColumnName().concat(formItemResult.getColumnNum() == 0 ? "" : formItemResult.getColumnNum().toString()), formItemResult); - } - if (formItemResult.getChildGroup() != null) { - itemMap = otherSheetItems.getOrDefault(formItemResult.getChildGroup().getTableName(), new HashMap<>()); - otherSheetItems.putIfAbsent(formItemResult.getChildGroup().getTableName(), itemMap); - for (FormItemResult2 item2 : formItemResult.getChildGroup().getItemList()) { - if (StringUtils.isBlank(item2.getColumnName())) { - continue; - } - - if ("checkbox".equals(item2.getItemType()) || "select".equals(item2.getItemType()) || "radio".equals(item2.getItemType())) { - itemMap.put(item2.getColumnName().concat(item2.getColumnNum() == 0 ? "" : item2.getColumnNum().toString()), ConvertUtils.sourceToTarget(item2, FormItemResult.class)); - } - } - - } - } - //其他sheet - - for (FormGroupDTO groupItem : resiFormItems.getGroupList()) { - if (groupItem.getItemList() == null) { - continue; - } - Map itemMap = otherSheetItems.getOrDefault(groupItem.getTableName(), new HashMap<>()); - otherSheetItems.putIfAbsent(groupItem.getTableName(), itemMap); - for (FormItemResult2 formItemResult2 : groupItem.getItemList()) { - if (StringUtils.isBlank(formItemResult2.getColumnName())) { - continue; - } - if ("checkbox".equals(formItemResult2.getItemType()) || "select".equals(formItemResult2.getItemType()) || "radio".equals(formItemResult2.getItemType())) { - itemMap.put(formItemResult2.getColumnName().concat(formItemResult2.getColumnNum() == 0 ? "" : formItemResult2.getColumnNum().toString()), ConvertUtils.sourceToTarget(formItemResult2, FormItemResult.class)); - } - } - } - return otherSheetItems; - } - - private static OutputStream getOutputStream(String fileName, HttpServletResponse response) throws Exception { - fileName = URLEncoder.encode(fileName, "UTF-8"); - response.setContentType("application/vnd.ms-excel"); - response.setCharacterEncoding("utf8"); - response.setHeader("Content-Disposition", "attachment;filename=" + fileName); - response.addHeader("Access-Control-Expose-Headers", "Content-disposition"); - - return response.getOutputStream(); - } - /** * excel导入居民基本信息 * From e86f1f4edd14ae5ed7f94a34bec03d81b7c15348 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Nov 2021 18:14:03 +0800 Subject: [PATCH 058/170] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcResiUserController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 1887feab08..901ecec74f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -238,7 +238,8 @@ public class IcResiUserController { * @return void * @author LiuJanJun * @date 2021/11/19 4:24 下午 - * @remark:分页批量导出 + * @remark:分页批量导出 oss目录在 各个环境对应的前缀文件夹/file-template/resi-template/客户ID.xlsx, + * 如果某个客户需要更新模版 则替换掉上面的模版文件;然后 更新缓存里的值或者删除也行 再导出就会下载新的模版了 */ @RequestMapping(value = "/exportExcel") public void exportExcelByEasyExcel(@RequestHeader String customerId,@LoginUser TokenDto tokenDto, @RequestBody IcResiUserPageFormDTO pageFormDTO, HttpServletResponse response) throws Exception { From 630b65dc350d31c50adeeea912939cdfa9488b9f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 09:13:47 +0800 Subject: [PATCH 059/170] =?UTF-8?q?=E5=88=97=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/dto/result/OptionResultDTO.java | 1 + .../dto/form/demand/ServiceQueryFormDTO.java | 2 -- .../dto/result/demand/DemandRecResultDTO.java | 1 + ...cCommunitySelfOrganizationServiceImpl.java | 3 +++ .../service/impl/IcPartyUnitServiceImpl.java | 27 ++++++++++++------- .../service/impl/IcSocietyOrgServiceImpl.java | 3 +++ .../impl/IcUserDemandRecServiceImpl.java | 8 +++--- .../resources/mapper/IcResiDemandDictDao.xml | 7 +++-- .../resources/mapper/IcUserDemandRecDao.xml | 1 + 9 files changed, 35 insertions(+), 18 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java index 158b59fb55..9ffd3efccb 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java @@ -15,6 +15,7 @@ public class OptionResultDTO implements Serializable { private static final long serialVersionUID = 8618231166600518980L; private String label; private String value; + private String pValue; private String sysDictDataId; private List children; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java index 142b081d80..74d3ca3c7f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java @@ -39,6 +39,4 @@ public class ServiceQueryFormDTO implements Serializable { @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) private String customerId; - private String demandRecId; - } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index fd606dc31f..454bee4277 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -17,6 +17,7 @@ public class DemandRecResultDTO implements Serializable { @JsonIgnore private String gridId; private String gridName; + private String agencyId; @JsonIgnore private String categoryCode; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 402d184668..f99b3133df 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -256,6 +256,9 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { - List resultList=new ArrayList<>(); - IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); - if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ - return resultList; + List resultList = new ArrayList<>(); + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { + throw new RenException("工作人员所属组织信息查询异常"); } - List agencyIds=new ArrayList<>(); - if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ - agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); - }else{ - agencyIds.add(icUserDemandRecDTO.getGridPids()); + List agencyIds = new ArrayList<>(); + if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { + if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) { + agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); + }else{ + //当前用户属于第二级组织的人,不会有: + agencyIds.add(staffInfoCacheResult.getAgencyPIds()); + } } + agencyIds.add(staffInfoCacheResult.getAgencyId()); resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); return resultList; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 2376a88150..2ad6055c20 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -154,6 +154,9 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl pageInfo= PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO)); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index f0917a69af..73409e2869 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -23,6 +23,7 @@ + @@ -31,7 +32,8 @@ SELECT CUSTOMER_ID AS customerId, CATEGORY_CODE AS "value", - CATEGORY_NAME AS "label" + CATEGORY_NAME AS "label", + PARENT_CODE as pValue FROM ic_resi_demand_dict WHERE @@ -45,7 +47,8 @@ SELECT CUSTOMER_ID AS customerId, CATEGORY_CODE AS "value", - CATEGORY_NAME AS "label" + CATEGORY_NAME AS "label", + PARENT_CODE as pValue FROM ic_resi_demand_dict WHERE diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 7fd7542258..60adf0da0e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -39,6 +39,7 @@ SELECT r.ID as demandRecId, r.GRID_ID as gridId, + r.agency_id as agencyId, r.CATEGORY_CODE as categoryCode, r.CONTENT, r.REPORT_TYPE as reportType, From b5dad7a41b22e4a19e68ab34ca5e28faba870186 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 09:19:02 +0800 Subject: [PATCH 060/170] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java | 4 ++++ .../java/com/epmet/controller/IcSocietyOrgController.java | 1 + .../java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java | 2 ++ .../src/main/resources/mapper/IcSocietyOrgDao.xml | 3 +++ .../main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java | 4 ++++ .../com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java | 4 ++++ .../com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java | 4 ++++ .../main/java/com/epmet/controller/IcPlaceOrgController.java | 1 + .../com/epmet/controller/IcPlacePatrolRecordController.java | 1 + .../com/epmet/controller/IcPlacePatrolTeamController.java | 1 + .../java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java | 2 ++ .../epmet/service/impl/IcPlacePatrolRecordServiceImpl.java | 2 ++ .../com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java | 2 ++ .../src/main/resources/mapper/IcPlaceOrgDao.xml | 3 +++ .../src/main/resources/mapper/IcPlacePatrolRecordDao.xml | 3 +++ .../src/main/resources/mapper/IcPlacePatrolTeamDao.xml | 3 +++ 16 files changed, 40 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java index 48272aa6a6..72b328af78 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java @@ -49,5 +49,9 @@ public class GetListSocietyOrgFormDTO implements Serializable { private Integer pageSize = 20; //token中客户Id private String customerId; + //token中userId + private String staffId; + //token中userId所属组织的pid + private String pids; } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index 0b97210715..1ee342120d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -92,6 +92,7 @@ public class IcSocietyOrgController { @PostMapping("getlist") public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); return new Result().ok(societyOrgService.getList(formDTO)); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 2ad6055c20..2c18383a39 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -115,6 +115,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index a4685af4ce..530744c278 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -24,6 +24,9 @@ AND customer_id = #{customerId} + + AND pids LIKE CONCAT('%', #{pids}, '%') + AND society_name LIKE CONCAT('%', #{societyName}, '%') diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java index c45a197ab8..1e7e26e85f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java @@ -52,5 +52,9 @@ public class GetListPlaceOrgFormDTO implements Serializable { private String customerId; //场所Id private String placeOrgId; + //token中userId + private String staffId; + //token中userId所属组织的pid + private String pids; } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java index b839d432b6..479e81969d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java @@ -50,5 +50,9 @@ public class GetListPlacePatrolRecordFormDTO implements Serializable { private String customerId; //巡查记录Id private String placePatrolRecordId; + //token中userId + private String staffId; + //token中userId所属组织的pid + private String pids; } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java index 4b01a8b484..c5ee8ceea8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java @@ -50,5 +50,9 @@ public class GetListPlacePatrolTeamFormDTO implements Serializable { private String customerId; //场所Id private String teamId; + //token中userId + private String staffId; + //token中userId所属组织的pid + private String pids; } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java index 238b6ed595..2d152c21c6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java @@ -99,6 +99,7 @@ public class IcPlaceOrgController { @PostMapping("getlist") public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlaceOrgFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); return new Result().ok(placeOrgService.getList(formDTO)); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java index 9ef1e21e5d..0d2c02a3d6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java @@ -88,6 +88,7 @@ public class IcPlacePatrolRecordController { @PostMapping("getlist") public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolRecordFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); return new Result().ok(placePatrolRecordService.getList(formDTO)); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java index 815505c2e9..23013c9f02 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java @@ -101,6 +101,7 @@ public class IcPlacePatrolTeamController { @PostMapping("getlist") public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolTeamFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); return new Result().ok(placePatrolTeamService.getList(formDTO)); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java index f3dbe0bf65..ffe5684be5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java @@ -134,6 +134,8 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java index 7cbc07b966..2b205e9ae6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java @@ -159,6 +159,8 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index c3e5ff7fa5..b48d8a1bc2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -202,6 +202,8 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml index 27514baefe..600a80ee7f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml @@ -25,6 +25,9 @@ AND a.customer_id = #{customerId} + + AND a.pids LIKE CONCAT('%', #{pids}, '%') + AND a.grid_id = #{gridId} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml index 597a62e186..d0c33f3471 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml @@ -34,6 +34,9 @@ AND a.customer_id = #{customerId} + + AND a.pids LIKE CONCAT('%', #{pids}, '%') + AND a.grid_id = #{gridId} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml index a218d4f050..3475fce30b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml @@ -27,6 +27,9 @@ AND customer_id = #{customerId} + + AND pids LIKE CONCAT('%', #{pids}, '%') + AND grid_ids LIKE CONCAT('%', #{gridId}, '%') From acf82ec7a26f558d535563d875258487034cab9e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 09:37:13 +0800 Subject: [PATCH 061/170] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/demand/DemandRecResultDTO.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index 454bee4277..c2031ddb5a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -39,7 +39,7 @@ public class DemandRecResultDTO implements Serializable { private String demandUserMobile; @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") - private String wantServiceTime; + private Date wantServiceTime; /** * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished @@ -56,6 +56,7 @@ public class DemandRecResultDTO implements Serializable { /** * 取消时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date cancelTime; /** From e2eb6343c3ec0f4e102df23ac0ef50a3fb5f85cd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 09:41:02 +0800 Subject: [PATCH 062/170] =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=88=86=E9=98=9F?= =?UTF-8?q?=E4=B8=8B=E6=88=90=E5=91=98=E6=89=8B=E6=9C=BA=E5=8F=B7=E5=94=AF?= =?UTF-8?q?=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcPlacePatrolTeamServiceImpl.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index b48d8a1bc2..5b59178fa9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -48,7 +48,9 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -74,6 +76,14 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl map = new HashMap<>(); + formDTO.getMemberList().forEach(m -> { + if(map.containsKey(m.getMobile())){ + throw new RenException(String.format("新增巡查人员管理失败,分队下人员手机号重复,重复手机号->%s", m.getMobile())); + } + map.put(m.getMobile(),m.getName()); + }); //1.分队主表新增数据 IcPlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolTeamEntity.class); CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); @@ -101,6 +111,14 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl map = new HashMap<>(); + formDTO.getMemberList().forEach(m -> { + if(map.containsKey(m.getMobile())){ + throw new RenException(String.format("修改巡查人员管理失败,分队下人员手机号重复,重复手机号->%s", m.getMobile())); + } + map.put(m.getMobile(),m.getName()); + }); //1.修改分队主表信息 IcPlacePatrolTeamEntity entity = baseDao.selectById(formDTO.getTeamId()); if (null == entity) { From a2b688a360646d057f47cb053f10e919204f9c9d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 24 Nov 2021 09:55:09 +0800 Subject: [PATCH 063/170] export --- ...IcCommunitySelfOrganizationController.java | 7 +++++ .../ExportCommunitySelfOrganizationExcel.java | 31 +++++++++++++++++++ ...cCommunitySelfOrganizationServiceImpl.java | 27 +++++++++++----- 3 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 0a52e569ff..0b6b831aff 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -35,6 +35,7 @@ import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.excel.ExportCommunitySelfOrganizationExcel; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; @@ -100,6 +101,12 @@ public class IcCommunitySelfOrganizationController { ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationExcel.class); } + @PostMapping("exportcommunityselforganization") + public void exportCommunitySelfOrganization(HttpServletResponse response,@LoginUser TokenDto tokenDto,@RequestBody CommunitySelfOrganizationListFormDTO formDTO) throws Exception { + CommunitySelfOrganizationListResultDTO resultDTO = icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO); + ExcelUtils.exportExcelToTarget(response, null, resultDTO.getList(), ExportCommunitySelfOrganizationExcel.class); + } + /** * @Description 添加社区自组织 * @param tokenDto diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java new file mode 100644 index 0000000000..d8020a3345 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java @@ -0,0 +1,31 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.CellStyler; +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +@Data +public class ExportCommunitySelfOrganizationExcel { + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "组织名称", width = 40) + private String organizationName; + + @Excel(name = "组织人数", width = 20) + private Integer organizationPersonCount; + + @Excel(name = "负责人姓名", width = 20) + private String principalName; + + @Excel(name = "负责人电话", width = 20) + private String principalPhone; + + @Excel(name = "服务事项", width = 60) + private String serviceItem; + + @Excel(name = "社区自组织创建时间", width = 20) + private String organizationCreatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index f99b3133df..fcc0448fe4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -43,6 +43,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN; @@ -213,14 +214,26 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); - result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); - if (CollectionUtils.isNotEmpty(objectPageInfo.getList())){ - objectPageInfo.getList().forEach(l -> { - l.setSort(i[NumConstant.ZERO]); - i[NumConstant.ZERO]++; + if (formDTO.getIsPage()){ + PageInfo objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); + result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); + if (CollectionUtils.isNotEmpty(objectPageInfo.getList())){ + objectPageInfo.getList().forEach(l -> { + l.setSort(i[NumConstant.ZERO]); + i[NumConstant.ZERO]++; + }); + result.setList(objectPageInfo.getList()); + } + return result; + } + List resultDTOs = baseDao.selectCommunitySelfOrganizationList(formDTO); + if (CollectionUtils.isNotEmpty(resultDTOs)){ + result.setTotal(resultDTOs.size()); + AtomicReference sort = new AtomicReference<>(NumConstant.ONE); + resultDTOs.forEach(r -> { + r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); }); - result.setList(objectPageInfo.getList()); + result.setList(resultDTOs); } return result; } From a8a161b8bdedb89da3eff7da0dd6b3499248386b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 24 Nov 2021 10:02:26 +0800 Subject: [PATCH 064/170] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/IcCommunitySelfOrganizationDao.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index b893795104..9b7eeca58d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -54,7 +54,6 @@ so.LATITUDE AS latitude, so.ID as orgId FROM ic_community_self_organization so -# LEFT JOIN ic_community_self_organization_personnel op ON (op.ORG_ID = so.ID AND op.DEL_FLAG = 0) WHERE so.DEL_FLAG = 0 AND so.ORG_ID = #{agencyId} AND so.CUSTOMER_ID = #{customerId} @@ -62,10 +61,10 @@ AND so.ORGANIZATION_NAME LIKE CONCAT('%',#{organizationName},'%') - AND DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y%m%d') = ]]> #{startTime} + AND so.ORGANIZATION_CREATED_TIME = ]]> #{startTime} - AND DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y%m%d') #{endTime} + AND so.ORGANIZATION_CREATED_TIME #{endTime} ORDER BY so.ORGANIZATION_CREATED_TIME DESC From b746f788b23b9aacd5532a84389349d4dc8d4fdf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 10:16:05 +0800 Subject: [PATCH 065/170] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E4=BA=BA=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7+gridId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/demand/DemandRecResultDTO.java | 3 ++- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index c2031ddb5a..c9f0542de6 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -14,7 +14,7 @@ public class DemandRecResultDTO implements Serializable { private static final long serialVersionUID = 1140730681599839420L; private String demandRecId; - @JsonIgnore + //@JsonIgnore private String gridId; private String gridName; private String agencyId; @@ -31,6 +31,7 @@ public class DemandRecResultDTO implements Serializable { private String content; private String reportUserName; + private String reportUserMobile; @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date reportTime; private String demandUserId; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 60adf0da0e..6459d02269 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -45,6 +45,7 @@ r.REPORT_TYPE as reportType, r.REPORT_TIME as reportTime, r.REPORT_USER_NAME as reportUserName, + r.REPORT_USER_MOBILE as reportUserMobile, r.`STATUS` as status, r.DEMAND_USER_ID as demandUserId, r.DEMAND_USER_NAME as demandUserName, From 2f15711e169218d6bc163e3b2132cf939007c6f2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 10:37:23 +0800 Subject: [PATCH 066/170] categoryCode --- .../java/com/epmet/dto/result/demand/DemandRecResultDTO.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index c9f0542de6..82942d0637 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -1,7 +1,6 @@ package com.epmet.dto.result.demand; import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -19,7 +18,7 @@ public class DemandRecResultDTO implements Serializable { private String gridName; private String agencyId; - @JsonIgnore + //@JsonIgnore private String categoryCode; private String categoryName; From 336502a81d368f7336c4404e184669a0e2d60a61 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 10:38:06 +0800 Subject: [PATCH 067/170] categoryCode --- .../java/com/epmet/dto/result/demand/DemandRecResultDTO.java | 1 + .../src/main/resources/mapper/IcUserDemandRecDao.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index 82942d0637..afb1939d34 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -20,6 +20,7 @@ public class DemandRecResultDTO implements Serializable { //@JsonIgnore private String categoryCode; + private String parentCode; private String categoryName; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 6459d02269..33d471906e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -41,6 +41,7 @@ r.GRID_ID as gridId, r.agency_id as agencyId, r.CATEGORY_CODE as categoryCode, + r.PARENT_CODE as parentCode, r.CONTENT, r.REPORT_TYPE as reportType, r.REPORT_TIME as reportTime, From 02bb9ab12e2b87310641140f1407d7dea0c108c8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 10:40:35 +0800 Subject: [PATCH 068/170] tongyi --- .../epmet/dto/result/demand/DemandRecResultDTO.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index afb1939d34..d1eac19bff 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -32,14 +32,14 @@ public class DemandRecResultDTO implements Serializable { private String content; private String reportUserName; private String reportUserMobile; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date reportTime; private String demandUserId; private String demandUser; private String demandUserName; private String demandUserMobile; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date wantServiceTime; /** @@ -57,7 +57,7 @@ public class DemandRecResultDTO implements Serializable { /** * 取消时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date cancelTime; /** @@ -100,13 +100,13 @@ public class DemandRecResultDTO implements Serializable { /** * 实际服务开始时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date serviceStartTime; /** * 实际服务结束时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date serviceEndTime; /** From 04bacf83f7c7c0aad833703a91b2ba8d79c48240 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 24 Nov 2021 10:57:04 +0800 Subject: [PATCH 069/170] emm --- .../tools/exception/EpmetErrorCode.java | 2 + .../AddCommunitySelfOrganizationFormDTO.java | 2 +- ...cCommunitySelfOrganizationServiceImpl.java | 37 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index c65750548c..075ee8d15c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -155,6 +155,8 @@ public enum EpmetErrorCode { APPOINTMENT_ERROR(8528, "%s尚有未履行的预约存在,请确认后操作"), + EXISTS_SAME_PHONE_ERROR(8529, "%s存在重复"), + // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java index a0c1cb762d..a9e6cd450e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -54,7 +54,7 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { /** * 社区自组织创建时间 */ - private Date organizationCreatedTime; + private String organizationCreatedTime; /** * 经度 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index fcc0448fe4..0121cb1a5c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -44,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.*; import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN; @@ -120,6 +121,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); + Map> groupPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone)); + List phones = new ArrayList<>(); + groupPhone.forEach((k,v) -> { + if (v.size() > NumConstant.ONE){ + phones.add(k); + } + }); + if (CollectionUtils.isNotEmpty(phones)){ + StringBuffer sb = new StringBuffer(); + phones.forEach(p -> { + sb.append(p).append(","); + }); + String copywriter = sb.toString().substring(NumConstant.ZERO, sb.length() - NumConstant.ONE); + EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.setMsg(String.format(EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.getMsg(),copywriter)); + throw new RenException(EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.getCode()); + } persons.forEach(p -> { p.setCustomerId(customerId); p.setOrgId(orgEntity.getId()); @@ -171,6 +190,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); @@ -189,6 +209,22 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); + Map> groupPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone)); + List phones = new ArrayList<>(); + groupPhone.forEach((k,v) -> { + if (v.size() > NumConstant.ONE){ + phones.add(k); + } + }); + if (CollectionUtils.isNotEmpty(phones)){ + StringBuffer sb = new StringBuffer(); + phones.forEach(p -> { + sb.append(p).append(","); + }); + String copywriter = sb.toString().substring(NumConstant.ZERO, sb.length() - NumConstant.ONE); + EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.setMsg(String.format(EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.getMsg(),copywriter)); + throw new RenException(EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.getCode()); + } persons.forEach(p -> { p.setOrgId(formDTO.getOrgId()); p.setCustomerId(tokenDto.getCustomerId()); @@ -245,6 +281,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl Date: Wed, 24 Nov 2021 11:05:38 +0800 Subject: [PATCH 070/170] emm --- .../IcCommunitySelfOrganizationController.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 0b6b831aff..a772108b44 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -101,12 +101,22 @@ public class IcCommunitySelfOrganizationController { ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationExcel.class); } + /** + * @Description 导出 社区自组织查询列表 + * @param response + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/24 10:59 上午 + */ @PostMapping("exportcommunityselforganization") public void exportCommunitySelfOrganization(HttpServletResponse response,@LoginUser TokenDto tokenDto,@RequestBody CommunitySelfOrganizationListFormDTO formDTO) throws Exception { CommunitySelfOrganizationListResultDTO resultDTO = icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO); ExcelUtils.exportExcelToTarget(response, null, resultDTO.getList(), ExportCommunitySelfOrganizationExcel.class); } + //@PostMapping("importcommunityselforganization") + /** * @Description 添加社区自组织 * @param tokenDto From 7cfe2cba90cbc36266d9a8616ac804c646e5d666 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 11:10:48 +0800 Subject: [PATCH 071/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/utils/ExcelPoiUtils.java | 276 ++++++++++++++++++ .../commons/tools/utils/ExcelVerifyInfo.java | 31 ++ .../controller/IcSocietyOrgController.java | 66 ++++- .../com/epmet/excel/IcSocietyOrgExcel.java | 34 +-- .../epmet/service/IcSocietyOrgService.java | 8 + .../service/impl/IcSocietyOrgServiceImpl.java | 6 + 6 files changed, 398 insertions(+), 23 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelVerifyInfo.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java new file mode 100644 index 0000000000..3ea8472867 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelPoiUtils.java @@ -0,0 +1,276 @@ +package com.epmet.commons.tools.utils; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URLEncoder; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; + +public class ExcelPoiUtils { + /** + * excel 导出 + * + * @param list 数据列表 + * @param fileName 导出时的excel名称 + * @param response + */ + public static void exportExcel(List> list, String fileName, HttpServletResponse response) throws IOException { + defaultExport(list, fileName, response); + } + + /** + * 默认的 excel 导出 + * + * @param list 数据列表 + * @param fileName 导出时的excel名称 + * @param response + */ + private static void defaultExport(List> list, String fileName, HttpServletResponse response) throws IOException { + //把数据添加到excel表格中 + Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); + downLoadExcel(fileName, response, workbook); + } + + /** + * excel 导出 + * + * @param list 数据列表 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param response + * @param exportParams 导出参数(标题、sheet名称、是否创建表头,表格类型) + */ + private static void defaultExport(List list, Class pojoClass, String fileName, HttpServletResponse response, ExportParams exportParams) throws IOException { + //把数据添加到excel表格中 + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list); + downLoadExcel(fileName, response, workbook); + } + + /** + * excel 导出 + * + * @param list 数据列表 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param exportParams 导出参数(标题、sheet名称、是否创建表头,表格类型) + * @param response + */ + public static void exportExcel(List list, Class pojoClass, String fileName, ExportParams exportParams, HttpServletResponse response) throws IOException { + defaultExport(list, pojoClass, fileName, response, exportParams); + } + + /** + * excel 导出 + * + * @param list 数据列表 + * @param title 表格内数据标题 + * @param sheetName sheet名称 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param response + */ + public static void exportExcel(List list, String title, String sheetName, Class pojoClass, String fileName, HttpServletResponse response) throws IOException { + defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName, ExcelType.XSSF)); + } + + + + /** + * excel 导出 + * + * @param list 数据列表 + * @param title 表格内数据标题 + * @param sheetName sheet名称 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param isCreateHeader 是否创建表头 + * @param response + */ + public static void exportExcel(List list, String title, String sheetName, Class pojoClass, String fileName, boolean isCreateHeader, HttpServletResponse response) throws IOException { + ExportParams exportParams = new ExportParams(title, sheetName, ExcelType.XSSF); + exportParams.setCreateHeadRows(isCreateHeader); + defaultExport(list, pojoClass, fileName, response, exportParams); + } + /** + * 根据模板生成excel后导出 + * @param templatePath 模板路径 + * @param map 数据集合 + * @param fileName 文件名 + * @param response + * @throws IOException + */ + public static void exportExcel(TemplateExportParams templatePath, Map map, String fileName, HttpServletResponse response) throws IOException { + Workbook workbook = ExcelExportUtil.exportExcel(templatePath, map); + downLoadExcel(fileName, response, workbook); + } + + + /** + * excel下载 + * + * @param fileName 下载时的文件名称 + * @param response + * @param workbook excel数据 + */ + private static void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) throws IOException { + try { + response.setCharacterEncoding("UTF-8"); + response.setHeader("content-Type", "application/vnd.ms-excel"); + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName + ".xlsx", "UTF-8")); + workbook.write(response.getOutputStream()); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + + + /** + * excel 导入 + * + * @param file excel文件 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(MultipartFile file, Class pojoClass) throws IOException { + return importExcel(file, 1, 1, pojoClass); + } + + /** + * excel 导入 + * + * @param filePath excel文件路径 + * @param titleRows 表格内数据标题行 + * @param headerRows 表头行 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(String filePath, Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (StringUtils.isBlank(filePath)) { + return null; + } + ImportParams params = new ImportParams(); + params.setTitleRows(titleRows); + params.setHeadRows(headerRows); + params.setNeedSave(true); + params.setSaveUrl("/tmp/excel/"); + try { + return ExcelImportUtil.importExcel(new File(filePath), pojoClass, params); + } catch (NoSuchElementException e) { + throw new IOException("模板不能为空"); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + + /** + * excel 导入 + * + * @param file 上传的文件 + * @param titleRows 表格内数据标题行 + * @param headerRows 表头行 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(MultipartFile file, Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (file == null) { + return null; + } + try { + return importExcel(file.getInputStream(), titleRows, headerRows, pojoClass); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + /** + * excel 导入 + * + * @param inputStream 文件输入流 + * @param titleRows 表格内数据标题行 + * @param headerRows 表头行 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(InputStream inputStream, Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (inputStream == null) { + return null; + } + ImportParams params = new ImportParams(); + params.setTitleRows(titleRows); + params.setHeadRows(headerRows); + params.setSaveUrl("/tmp/excel/"); + params.setNeedSave(true); + try { + return ExcelImportUtil.importExcel(inputStream, pojoClass, params); + } catch (NoSuchElementException e) { + throw new IOException("excel文件不能为空"); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + /** + * excel 导入,有错误信息 + * + * @param file 上传的文件 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static ExcelImportResult importExcelMore(MultipartFile file,Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (file == null) { + return null; + } + try { + return importExcelMore(file.getInputStream(), titleRows, headerRows, pojoClass); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + /** + * excel 导入 + * + * @param inputStream 文件输入流 + * @param pojoClass pojo类型 + * @param + * @return + */ + private static ExcelImportResult importExcelMore(InputStream inputStream,Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (inputStream == null) { + return null; + } + ImportParams params = new ImportParams(); + params.setTitleRows(titleRows);//表格内数据标题行 + params.setHeadRows(headerRows);//表头行 + params.setSaveUrl("/tmp/excel/"); + params.setNeedSave(true); + params.setNeedVerify(true); + try { + return ExcelImportUtil.importExcelMore(inputStream, pojoClass, params); + } catch (NoSuchElementException e) { + throw new IOException("excel文件不能为空"); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelVerifyInfo.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelVerifyInfo.java new file mode 100644 index 0000000000..a00bb8bbf4 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelVerifyInfo.java @@ -0,0 +1,31 @@ +package com.epmet.commons.tools.utils; + +import cn.afterturn.easypoi.handler.inter.IExcelDataModel; +import cn.afterturn.easypoi.handler.inter.IExcelModel; + +public class ExcelVerifyInfo implements IExcelModel, IExcelDataModel { + + private String errorMsg; + + private int rowNum; + + @Override + public Integer getRowNum() { + return rowNum; + } + + @Override + public void setRowNum(Integer rowNum) { + this.rowNum = rowNum; + } + + @Override + public String getErrorMsg() { + return errorMsg; + } + + @Override + public void setErrorMsg(String errorMsg) { + this.errorMsg = errorMsg; + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index 1ee342120d..c514dd870e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -17,24 +17,36 @@ package com.epmet.controller; +import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelPoiUtils; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.excel.IcSocietyOrgExcel; import com.epmet.service.IcSocietyOrgService; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; /** @@ -43,6 +55,7 @@ import java.util.List; * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ +@Slf4j @RestController @RequestMapping("societyorg") public class IcSocietyOrgController { @@ -109,4 +122,49 @@ public class IcSocietyOrgController { ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class,ServiceQueryFormDTO.SocietyOrgInternalGroup.class); return new Result>().ok(societyOrgService.queryServiceList(formDTO)); } + + /** + * @Author sun + * @Description 九小场所下组织列表导出 + **/ + @GetMapping("export") + public void export(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO, HttpServletResponse response) throws Exception { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + GetListSocietyOrgResultDTO list = societyOrgService.getList(formDTO); + ExcelUtils.exportExcelToTarget(response, null, list.getList(), IcSocietyOrgExcel.class); + } + + /** + * @Author sun + * @Description 九小场所下组织列表导入---咱不能使用 程序未开发 + **/ + @PostMapping("import") + public Result importExcel(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file) throws IOException { + + ExcelImportResult importResult = ExcelPoiUtils.importExcelMore(file, 0, 1, IcSocietyOrgExcel.class); + List failList = importResult.getFailList(); + + //存放错误数据行号 + List numList = new ArrayList<>(); + if (!CollectionUtils.isEmpty(failList)) { + for (IcSocietyOrgExcel entity : failList) { + log.error("第{}行,{}", entity.getRowNum(), entity.getErrorMsg());//打印失败的行 和失败的信息 + numList.add(entity.getRowNum()); + } + //return new Result().error(8001,failList.get(0).getErrorMsg()); + } + List result = importResult.getList(); + + List resultList = societyOrgService.importExcel(tokenDTO.getCustomerId(), result, tokenDTO.getUserId(), numList); + String str = String.format("共%s条,成功导入%s条。", numList.size() + result.size(), numList.size() + result.size() - resultList.size()); + if (resultList.size() > NumConstant.ZERO) { + Collections.sort(resultList); + String subList = resultList.stream().map(String::valueOf).collect(Collectors.joining("、")); + log.warn(str + "第" + subList + "行未成功!"); + return new Result().error(9999, str + "第" + subList + "行未成功!"); + } + return new Result().ok(str); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java index 5f3d464dfb..bfcebe6e8d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java @@ -18,8 +18,12 @@ package com.epmet.excel; import cn.afterturn.easypoi.excel.annotation.Excel; +import com.epmet.commons.tools.utils.ExcelVerifyInfo; import lombok.Data; +import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; import java.util.Date; /** @@ -29,7 +33,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class IcSocietyOrgExcel { +public class IcSocietyOrgExcel extends ExcelVerifyInfo implements Serializable { @Excel(name = "唯一标识") private String id; @@ -44,21 +48,31 @@ public class IcSocietyOrgExcel { private String pids; @Excel(name = "社会组织名称") + @NotBlank(message = "不能为空") + @Length(max=50,message = "不能超过50个字") private String societyName; @Excel(name = "服务事项") + @NotBlank(message = "不能为空") + @Length(max=1000,message = "不能超过1000个字") private String serviceMatters; @Excel(name = "负责人") + @NotBlank(message = "不能为空") + @Length(max=20,message = "不能超过20个字") private String personInCharge; @Excel(name = "负责人电话") + @NotBlank(message = "不能为空") + @Length(max=11,message = "不能超过11个字") private String mobile; @Excel(name = "起始服务时间") + @NotBlank(message = "不能为空") private Date serviceStartTime; @Excel(name = "终止服务时间") + @NotBlank(message = "不能为空") private Date serviceEndTime; @Excel(name = "绑定管理员[组织下录入的工作人员]") @@ -76,23 +90,5 @@ public class IcSocietyOrgExcel { @Excel(name = "备注") private String remarks; - @Excel(name = "删除标识:0.未删除 1.已删除") - private Integer 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; - } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java index f61eec5b94..0c5841b04a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java @@ -25,6 +25,7 @@ import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; +import com.epmet.excel.IcSocietyOrgExcel; import java.util.List; @@ -66,4 +67,11 @@ public interface IcSocietyOrgService extends BaseService { * @return */ List queryServiceList(ServiceQueryFormDTO formDTO); + + /** + * @Author sun + * @Description 九小场所下组织列表导入 + **/ + List importExcel(String customerId, List result, String userId, List numList); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 2c18383a39..ff8f95e7dd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -36,6 +36,7 @@ import com.epmet.dto.result.SocietyOrgListResultDTO; import com.epmet.dto.result.StaffSinGridResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; +import com.epmet.excel.IcSocietyOrgExcel; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.IcSocietyOrgService; import com.epmet.service.IcUserDemandRecService; @@ -166,4 +167,9 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl importExcel(String customerId, List result, String userId, List numList) { + return numList; + } + } \ No newline at end of file From daeb2917009f7d9c75a2c6b31f5131c14bebe3d3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 13:28:30 +0800 Subject: [PATCH 072/170] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E9=9C=80=E6=B1=82=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcResiDemandDictDao.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index 73409e2869..6b49401adf 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -205,13 +205,16 @@ SELECT d.CATEGORY_CODE, d.PARENT_CODE, - concat( p.CATEGORY_NAME, '-', d.CATEGORY_NAME ) AS CATEGORY_NAME + ( + case when d.level='1' then d.category_name + when d.level='2' then concat( p.CATEGORY_NAME, '-', d.CATEGORY_NAME ) + end + )AS CATEGORY_NAME FROM ic_resi_demand_dict d LEFT JOIN ic_resi_demand_dict p ON ( d.PARENT_CODE = p.CATEGORY_CODE AND p.CUSTOMER_ID = #{customerId} ) WHERE d.DEL_FLAG = '0' - AND d.`LEVEL` = '2' AND d.CUSTOMER_ID = #{customerId} and d.category_code in From 3178a9ec86e1d295254eb69ad45918004b7bef7d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 14:17:01 +0800 Subject: [PATCH 073/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=A8=8B=E5=BA=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/SocietyOrgListResultDTO.java | 2 ++ .../controller/IcSocietyOrgController.java | 1 + .../com/epmet/excel/IcSocietyOrgExcel.java | 27 +++++------------ .../service/impl/IcSocietyOrgServiceImpl.java | 29 +++++++++++++------ 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java index 277238e78d..1650882b84 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java @@ -31,6 +31,8 @@ public class SocietyOrgListResultDTO implements Serializable { //所属组织Id private String agencyId; + //所属组织名称 + private String agencyName; //社会组织Id private String societyId; //社会组织名称 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index c514dd870e..f8e8ef5405 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -131,6 +131,7 @@ public class IcSocietyOrgController { public void export(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO, HttpServletResponse response) throws Exception { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); + formDTO.setIsPage(false); GetListSocietyOrgResultDTO list = societyOrgService.getList(formDTO); ExcelUtils.exportExcelToTarget(response, null, list.getList(), IcSocietyOrgExcel.class); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java index bfcebe6e8d..35fff240d9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java @@ -19,6 +19,7 @@ package com.epmet.excel; import cn.afterturn.easypoi.excel.annotation.Excel; import com.epmet.commons.tools.utils.ExcelVerifyInfo; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -35,17 +36,9 @@ import java.util.Date; @Data public class IcSocietyOrgExcel extends ExcelVerifyInfo implements Serializable { - @Excel(name = "唯一标识") - private String id; - - @Excel(name = "客户Id") - private String customerId; - - @Excel(name = "组织Id") - private String agencyId; - - @Excel(name = "agency_id的所有上级") - private String pids; + @Excel(name = "组织名称") + @NotBlank(message = "不能为空") + private String agencyName; @Excel(name = "社会组织名称") @NotBlank(message = "不能为空") @@ -69,14 +62,14 @@ public class IcSocietyOrgExcel extends ExcelVerifyInfo implements Serializable { @Excel(name = "起始服务时间") @NotBlank(message = "不能为空") - private Date serviceStartTime; + private String serviceStartTime; @Excel(name = "终止服务时间") @NotBlank(message = "不能为空") - private Date serviceEndTime; + private String serviceEndTime; - @Excel(name = "绑定管理员[组织下录入的工作人员]") - private String adminStaffId; + @Excel(name = "管理员姓名") + private String adminStaffName; @Excel(name = "地址") private String address; @@ -87,8 +80,4 @@ public class IcSocietyOrgExcel extends ExcelVerifyInfo implements Serializable { @Excel(name = "维度") private String latitude; - @Excel(name = "备注") - private String remarks; - - } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index ff8f95e7dd..1c6822e1c2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -26,18 +26,14 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcSocietyOrgDao; -import com.epmet.dto.form.AddSocietyOrgFormDTO; -import com.epmet.dto.form.EditSocietyOrgFormDTO; -import com.epmet.dto.form.GetListSocietyOrgFormDTO; -import com.epmet.dto.form.UserIdsFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.result.GetListSocietyOrgResultDTO; -import com.epmet.dto.result.SocietyOrgListResultDTO; -import com.epmet.dto.result.StaffSinGridResultDTO; +import com.epmet.dto.result.*; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; import com.epmet.excel.IcSocietyOrgExcel; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcSocietyOrgService; import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; @@ -68,6 +64,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl result = - PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); if (CollectionUtils.isEmpty(result.getList())) { return resultDTO; } resultDTO.setTotal((int) result.getTotal()); + //2.查询被绑定管理员信息 UserIdsFormDTO dto = new UserIdsFormDTO(); List staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList()); @@ -135,8 +134,20 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl listResult.getData().stream().filter(u -> r.getAdminStaffId().equals(u.getStaffId())).forEach(u -> r.setAdminStaffName(u.getStaffName()))); - resultDTO.setList(result.getList()); + //3.查询被绑定管理员信息 + OrgInfoFormDTO org = new OrgInfoFormDTO(); + List orgIds = result.getList().stream().map(SocietyOrgListResultDTO::getAgencyId).collect(Collectors.toList()); + orgIds = orgIds.stream().distinct().collect(Collectors.toList()); + org.setOrgIds(orgIds); + org.setOrgType("agency"); + Result> orgResult = govOrgOpenFeignClient.selectOrgInfo(org); + if (!orgResult.success()) { + throw new RenException("获取组织基础信息失败......"); + } + result.getList().forEach(r -> orgResult.getData().stream().filter(u -> r.getAgencyId().equals(u.getOrgId())).forEach(u -> r.setAgencyName(u.getOrgName()))); + + resultDTO.setList(result.getList()); return resultDTO; } From 708ebde9b52a21d36937c7225b8b878c06b27b14 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 14:23:37 +0800 Subject: [PATCH 074/170] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java | 4 +++- .../main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java | 2 +- .../com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java | 2 +- .../epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java | 2 +- .../com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java index 72b328af78..9d43e05bae 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java @@ -44,9 +44,11 @@ public class GetListSocietyOrgFormDTO implements Serializable { private Date serviceEndTime; //页码 @Min(1) - private Integer pageNo; + private Integer pageNo = 1; //每页多少条 private Integer pageSize = 20; + //是否分页(是:true 否:false) + private Boolean isPage = true; //token中客户Id private String customerId; //token中userId diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java index 1e7e26e85f..4725a8b32d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java @@ -45,7 +45,7 @@ public class GetListPlaceOrgFormDTO implements Serializable { private Boolean isPage = true; //页码 @Min(1) - private Integer pageNo; + private Integer pageNo = 1; //每页多少条 private Integer pageSize = 20; //token中客户Id diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java index 479e81969d..f176bca7ba 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java @@ -43,7 +43,7 @@ public class GetListPlacePatrolRecordFormDTO implements Serializable { private String finalResult; //页码 @Min(1) - private Integer pageNo; + private Integer pageNo = 1; //每页多少条 private Integer pageSize = 20; //token中客户Id diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java index 225962bb89..a4f0eeae0a 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java @@ -38,7 +38,7 @@ public class GetListPlacePatrolReviewRecordFormDTO implements Serializable { private String placePatrolReviewRecordId; //页码 @Min(1) - private Integer pageNo; + private Integer pageNo = 1; //每页多少条 private Integer pageSize = 20; //token中客户Id diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java index c5ee8ceea8..381a085107 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java @@ -43,7 +43,7 @@ public class GetListPlacePatrolTeamFormDTO implements Serializable { private Boolean isPage = true; //页码 @Min(1) - private Integer pageNo; + private Integer pageNo = 1; //每页多少条 private Integer pageSize = 20; //token中客户Id From 0fa85a975c1a379e7b36a2f61fe71b413ac5ed4a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 14:33:49 +0800 Subject: [PATCH 075/170] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E5=85=A5=E5=8F=82?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java index 9d43e05bae..c04a76dc77 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java @@ -21,7 +21,6 @@ import lombok.Data; import javax.validation.constraints.Min; import java.io.Serializable; -import java.util.Date; /** @@ -39,9 +38,9 @@ public class GetListSocietyOrgFormDTO implements Serializable { //负责人电话 private String mobile; //起始服务时间 - private Date serviceStartTime; + private String serviceStartTime; //终止服务时间 - private Date serviceEndTime; + private String serviceEndTime; //页码 @Min(1) private Integer pageNo = 1; From 507ffbad6df5e8cd0ffdf8fd370700a7861b7b84 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 15:08:49 +0800 Subject: [PATCH 076/170] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=94=B9=E4=B8=BApos?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcSocietyOrgController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index f8e8ef5405..de9749676a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -127,7 +127,7 @@ public class IcSocietyOrgController { * @Author sun * @Description 九小场所下组织列表导出 **/ - @GetMapping("export") + @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO, HttpServletResponse response) throws Exception { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); From 7f05e224f40a0a0331df6181ac4836629dac1a5e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 15:22:37 +0800 Subject: [PATCH 077/170] =?UTF-8?q?=E5=AE=8C=E6=88=90id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/demand/FinishStaffFromDTO.java | 4 ++-- .../com/epmet/service/impl/IcUserDemandRecServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java index 8213529326..06ca8a93fc 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java @@ -21,8 +21,8 @@ public class FinishStaffFromDTO implements Serializable { @NotBlank(message = "需求id不能为空", groups = AddUserInternalGroup.class) private String demandRecId; - @NotBlank(message = "服务方不能为空", groups = AddUserShowGroup.class) - private String serverId; + @NotBlank(message = "服务id不能为空", groups = AddUserShowGroup.class) + private String serviceId; @NotNull(message = "实际服务开始不能为空", groups = AddUserShowGroup.class) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 47e2fee2f6..677fcb64b1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -417,7 +417,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl Date: Wed, 24 Nov 2021 16:16:58 +0800 Subject: [PATCH 078/170] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E8=A1=A8value=E5=AF=B9=E5=BA=94label=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/PlaceOrgDetailResultDTO.java | 2 ++ .../service/impl/IcPlaceOrgServiceImpl.java | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java index 211c74097f..866f1cc981 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java @@ -27,6 +27,8 @@ public class PlaceOrgDetailResultDTO implements Serializable { private String ninePlaceName; //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 private String scale; + //场所规模名称【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + private String scaleName; //负责人 private String personInCharge; //联系电话 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java index ffe5684be5..1a0e071404 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; @@ -44,6 +45,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; +import java.util.Map; /** * 九小场所下组织管理 @@ -114,6 +116,7 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); if (!result1.success()) { @@ -124,6 +127,11 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode()); + resultDTO.setScaleName(unitTypeMap.getData().get(resultDTO.getScale())); + return resultDTO; } @@ -143,14 +151,21 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); if (!result1.success()) { throw new RenException("获取九小场所基本信息失败......"); } result.getList().forEach(r -> result1.getData().stream().filter(u -> r.getNinePlaceVal().equals(u.getValue())).forEach(u -> r.setNinePlaceName(u.getLabel()))); - resultDTO.setList(result.getList()); + //3.人员规模字典表赋值 + Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode()); + result.getList().forEach(item -> { + item.setScaleName(unitTypeMap.getData().get(item.getScale())); + }); + + resultDTO.setList(result.getList()); return resultDTO; } } \ No newline at end of file From af23c1a534549ecad4ff072df792d17504dd25cd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 16:21:42 +0800 Subject: [PATCH 079/170] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcPlacePatrolTeamServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index 5b59178fa9..c16b575230 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -194,7 +194,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getId())) { - gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + gridNames.append("".equals(gridNames.toString().trim()) ? r.getGridName() : "," + r.getGridName()); } }); } @@ -204,7 +204,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getValue())) { - ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + ninePlaceNames.append("".equals(ninePlaceNames.toString().trim()) ? r.getLabel() : "," + r.getLabel()); } }); } @@ -252,7 +252,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getId())) { - gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + gridNames.append("".equals(gridNames.toString().trim()) ? r.getGridName() : "," + r.getGridName()); } }); } @@ -261,7 +261,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getValue())) { - ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + ninePlaceNames.append("".equals(ninePlaceNames.toString().trim()) ? r.getLabel() : "," + r.getLabel()); } }); } From dde6df3f22f9f753433c5d3b8bed4ea45d473ca2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 16:39:46 +0800 Subject: [PATCH 080/170] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6key?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/demand/UserDemandPageFormDTO.java | 8 ++++---- .../main/resources/mapper/IcUserDemandRecDao.xml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index 265a88b5f1..82dd913b31 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -43,13 +43,13 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { * 上报时间开始 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date reportStartDate; + private Date reportStartTime; /** * 上报时间截止 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date reportEndDate; + private Date reportEndTime; /** * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished @@ -73,11 +73,11 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { * 希望服务时间开始 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date wantServiceStartDate; + private Date wantServiceStartTime; /** * 希望截止 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date wantServiceEndDate; + private Date wantServiceEndTime; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 33d471906e..72ac018284 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -93,11 +93,11 @@ and r.DEMAND_USER_NAME like concat('%',#{demandUserName},'%') - - AND DATE_FORMAT(r.REPORT_TIME,'%Y-%m-%d') = ]]> #{reportStartDate} + + AND DATE_FORMAT(r.REPORT_TIME,'%Y-%m-%d') = ]]> #{reportStartTime} - - AND DATE_FORMAT(r.REPORT_TIME,'%Y-%m-%d') #{reportEndDate} + + AND DATE_FORMAT(r.REPORT_TIME,'%Y-%m-%d') #{reportEndTime} and r.STATUS=#{status} @@ -108,11 +108,11 @@ and s.SERVER_ID=#{serverId} - - AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') = ]]> #{wantServiceStartDate} + + AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') = ]]> #{wantServiceStartTime} - - AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') #{wantServiceEndDate} + + AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') #{wantServiceEndTime} order by r.WANT_SERVICE_TIME desc,r.CREATED_TIME asc From 711a4501e37f1ee13fcd5043c9fcc2ae8517a744 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 16:53:51 +0800 Subject: [PATCH 081/170] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6key?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/demand/UserDemandPageFormDTO.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index 82dd913b31..58816c7a77 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -1,6 +1,7 @@ package com.epmet.dto.form.demand; import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -42,12 +43,14 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { /** * 上报时间开始 */ + @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") private Date reportStartTime; /** * 上报时间截止 */ + @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") private Date reportEndTime; @@ -72,12 +75,14 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { /** * 希望服务时间开始 */ + @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") private Date wantServiceStartTime; /** * 希望截止 */ + @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") private Date wantServiceEndTime; } From 6e3cac38972384d85bc679903aa9c5ec9acb35e0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 16:55:05 +0800 Subject: [PATCH 082/170] =?UTF-8?q?url=E5=A4=A7=E5=B0=8F=E5=86=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/feign/EpmetAdminOpenFeignClient.java | 2 +- .../EpmetAdminOpenFeignClientFallback.java | 14 +++++++------- .../epmet/controller/SysDictDataController.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java index e28914d26f..bb8d12f49c 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java @@ -82,6 +82,6 @@ public interface EpmetAdminOpenFeignClient { * @Author zhaoqifeng * @Date 2021/11/19 17:36 */ - @PostMapping("/sys/dict/data/dictMap/{dictType}") + @PostMapping("/sys/dict/data/dictmap/{dictType}") Result> dictMap(@PathVariable("dictType") String dictType); } diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java index fec84ab1fd..139514d1f5 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java @@ -14,36 +14,36 @@ import java.util.Map; public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignClient { @Override public Result> list() { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "list", null); + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "list", null); } @Override public Result> getEducationOption() { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getEducationOption", null); + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getEducationOption", null); } @Override public Result> getHouseOption() { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getHouseOption", null); + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getHouseOption", null); } @Override public Result> getNationOption() { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getNationOption", null); + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getNationOption", null); } @Override public Result> getNineSmallPlacesOption() { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getNineSmallPlacesOption", null); + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getNineSmallPlacesOption", null); } @Override public Result> getRelationshipOption() { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRelationshipOption", null); + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getRelationshipOption", null); } @Override public Result> dictMap(String dictType) { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "dictMap", dictType); + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictMap", dictType); } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java index 1424f480ed..aff54e6e09 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java @@ -157,7 +157,7 @@ public class SysDictDataController { * @Author zhaoqifeng * @Date 2021/11/19 17:36 */ - @PostMapping("dictMap/{dictType}") + @PostMapping("dictmap/{dictType}") public Result> dictMap(@PathVariable("dictType") String dictType) { return new Result>().ok(sysDictDataService.dictMap(dictType)); } From 1775b1aa42989c6eb4f095c53d4882674314690d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 17:07:42 +0800 Subject: [PATCH 083/170] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/demand/UserDemandPageFormDTO.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index 58816c7a77..2f8bb4b401 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -43,16 +43,12 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { /** * 上报时间开始 */ - @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date reportStartTime; + private String reportStartTime; /** * 上报时间截止 */ - @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date reportEndTime; + private String reportEndTime; /** * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished @@ -75,14 +71,10 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { /** * 希望服务时间开始 */ - @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date wantServiceStartTime; + private String wantServiceStartTime; /** * 希望截止 */ - @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date wantServiceEndTime; + private String wantServiceEndTime; } From 03cee50707ba3f5f39d5369ab7fe9b8353aa4316 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 17:08:47 +0800 Subject: [PATCH 084/170] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index 2f8bb4b401..a574bb3100 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -1,12 +1,9 @@ package com.epmet.dto.form.demand; import com.epmet.commons.tools.dto.form.PageFormDTO; -import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; -import java.util.Date; @Data public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { From 73d4f5f0ace18aaffacc894f1ec294b3a0ef5c82 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 17:32:41 +0800 Subject: [PATCH 085/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=88=9D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcSocietyOrgController.java | 3 +- .../epmet/service/IcSocietyOrgService.java | 3 +- .../service/impl/IcSocietyOrgServiceImpl.java | 66 +++++++++++++++++-- .../dto/result/GetListPlaceOrgResultDTO.java | 5 +- .../GetListPlacePatrolRecordResultDTO.java | 5 +- ...tListPlacePatrolReviewRecordResultDTO.java | 5 +- .../GetListPlacePatrolTeamResultDTO.java | 5 +- .../PlacePatrolTeamDetailResultDTO.java | 3 +- .../epmet/dto/form/GetByRealNamesFormDTO.java | 26 ++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 7 ++ .../EpmetUserOpenFeignClientFallback.java | 5 ++ .../controller/CustomerStaffController.java | 9 +++ .../java/com/epmet/dao/CustomerStaffDao.java | 6 ++ .../epmet/service/CustomerStaffService.java | 6 ++ .../impl/CustomerStaffServiceImpl.java | 9 +++ .../resources/mapper/CustomerStaffDao.xml | 26 ++++++++ 16 files changed, 174 insertions(+), 15 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetByRealNamesFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index de9749676a..3fe71d8b60 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -43,6 +43,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.text.ParseException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -141,7 +142,7 @@ public class IcSocietyOrgController { * @Description 九小场所下组织列表导入---咱不能使用 程序未开发 **/ @PostMapping("import") - public Result importExcel(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file) throws IOException { + public Result importExcel(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file) throws IOException, ParseException { ExcelImportResult importResult = ExcelPoiUtils.importExcelMore(file, 0, 1, IcSocietyOrgExcel.class); List failList = importResult.getFailList(); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java index 0c5841b04a..f2646de029 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java @@ -27,6 +27,7 @@ import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; import com.epmet.excel.IcSocietyOrgExcel; +import java.text.ParseException; import java.util.List; /** @@ -72,6 +73,6 @@ public interface IcSocietyOrgService extends BaseService { * @Author sun * @Description 九小场所下组织列表导入 **/ - List importExcel(String customerId, List result, String userId, List numList); + List importExcel(String customerId, List list, String staffId, List numList) throws ParseException; } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 1c6822e1c2..4e37c4cd50 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -26,6 +26,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcSocietyOrgDao; +import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.*; @@ -46,9 +47,9 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; import java.util.stream.Collectors; /** @@ -179,7 +180,64 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl importExcel(String customerId, List result, String userId, List numList) { + public List importExcel(String customerId, List list, String staffId, List numList) throws ParseException { + //1.数据校验 只允许导入当前组织下社会组织 + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(customerId, staffId); + //组织名称不一样的数据舍弃 + Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + IcSocietyOrgExcel obj = iterator.next(); + if (!obj.getAgencyName().trim().equals(staffInfoCache.getAgencyName())) { + numList.add(obj.getRowNum()); + iterator.remove(); + } + } + if(CollectionUtils.isEmpty(list)){ + return numList; + } + + //2.查询绑定的管理员信息 + Set staffNames = list.stream().map(item -> item.getAdminStaffName().trim()).collect(Collectors.toSet()); + GetByRealNamesFormDTO dto = new GetByRealNamesFormDTO(); + dto.setCustomerId(customerId); + dto.setRealNames(staffNames); + Result> staffResult = epmetUserOpenFeignClient.getByRealNames(dto); + if (!staffResult.success()) { + throw new RenException("获取工作人员基础信息失败......"); + } + Map map = staffResult.getData().stream().collect(Collectors.toMap(CustomerStaffDTO::getRealName, CustomerStaffDTO::getUserId)); + + //3.遍历封装有效数据 + List houseEntityList = new ArrayList<>(); + Iterator iterator1 = list.iterator(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + while (iterator1.hasNext()) { + IcSocietyOrgExcel icHouseExcel = iterator1.next(); + IcSocietyOrgEntity entity = new IcSocietyOrgEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(staffInfoCache.getAgencyId()); + entity.setPids(staffInfoCache.getAgencyPIds()); + entity.setSocietyName(icHouseExcel.getSocietyName()); + entity.setServiceMatters(icHouseExcel.getServiceMatters()); + entity.setPersonInCharge(icHouseExcel.getPersonInCharge()); + entity.setMobile(icHouseExcel.getMobile()); + entity.setServiceStartTime(sdf.parse(icHouseExcel.getServiceStartTime())); + entity.setServiceEndTime(sdf.parse(icHouseExcel.getServiceEndTime())); + entity.setAdminStaffId(map.containsKey(icHouseExcel.getAdminStaffName().trim())?map.get(icHouseExcel.getAdminStaffName().trim()):""); + if ("".equals(entity.getAdminStaffId())) { + numList.add(icHouseExcel.getRowNum()); + iterator1.remove(); + continue; + } + entity.setAddress(icHouseExcel.getAddress()); + entity.setLongitude(icHouseExcel.getLongitude()); + entity.setLatitude(icHouseExcel.getLatitude()); + houseEntityList.add(entity); + } + + //3.批量保存数据 + insertBatch(houseEntityList); + return numList; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java index 2111d8ef30..ffa2b18b74 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -12,8 +13,8 @@ import java.util.List; @Data public class GetListPlaceOrgResultDTO implements Serializable { //集合总条数 - private Integer total; + private Integer total = 0; //社会组织信息 - private List list; + private List list = new ArrayList<>(); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolRecordResultDTO.java index 0ef22dfa52..1531ab2901 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolRecordResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolRecordResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -12,8 +13,8 @@ import java.util.List; @Data public class GetListPlacePatrolRecordResultDTO implements Serializable { //集合总条数 - private Integer total; + private Integer total = 0; //社会组织信息 - private List list; + private List list = new ArrayList<>(); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolReviewRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolReviewRecordResultDTO.java index 9caca08bd1..08b9fe2461 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolReviewRecordResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolReviewRecordResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -12,8 +13,8 @@ import java.util.List; @Data public class GetListPlacePatrolReviewRecordResultDTO implements Serializable { //集合总条数 - private Integer total; + private Integer total = 0; //社会组织信息 - private List list; + private List list = new ArrayList<>(); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java index b2ce9018f6..e7dac5b53d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -12,8 +13,8 @@ import java.util.List; @Data public class GetListPlacePatrolTeamResultDTO implements Serializable { //集合总条数 - private Integer total; + private Integer total = 0; //社会组织信息 - private List list; + private List list = new ArrayList<>(); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java index 6869a2fb75..57ef081c5e 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java @@ -4,6 +4,7 @@ import com.epmet.dto.IcPlacePatrolTeamStaffDTO; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -33,6 +34,6 @@ public class PlacePatrolTeamDetailResultDTO implements Serializable { //创建时间 private String time; //分队成员信息 - private List memberList; + private List memberList = new ArrayList<>(); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetByRealNamesFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetByRealNamesFormDTO.java new file mode 100644 index 0000000000..80719e6737 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GetByRealNamesFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Set; + +/** + * @Author sun + * @Description 根据工作人员姓名批量查询基础信息数据 + **/ +@NoArgsConstructor +@Data +public class GetByRealNamesFormDTO implements Serializable { + + private static final long serialVersionUID = -5220529162950147825L; + /** + * 客户Id + */ + private String customerId; + /** + * 工作人员姓名集合 + */ + private Set realNames; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 5637b6b765..6bf9a4466e 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -653,4 +653,11 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/icresiuser/categorycount") Result>> getHomeUserCategoryCount(@RequestBody IcResiUserDTO formDTO); + + /** + * @Author sun + * @Description 根据工作人员姓名批量查询基础信息数据 + **/ + @GetMapping(value = "epmetuser/customerstaff/getbyrealnames") + Result> getByRealNames(@RequestBody GetByRealNamesFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index e339f2e83b..0a4d2c41d4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -474,4 +474,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result>> getHomeUserCategoryCount(IcResiUserDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getHomeUserCategoryCount", formDTO); } + + @Override + public Result> getByRealNames(GetByRealNamesFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getByRealNames", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java index 7aae42adea..256bbf7810 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java @@ -446,5 +446,14 @@ public class CustomerStaffController { return new Result(); } + /** + * @Author sun + * @Description 根据工作人员姓名批量查询基础信息数据 + **/ + @PostMapping(value = "getbyrealnames") + public Result> getByRealNames(@RequestBody GetByRealNamesFormDTO formDTO) { + return new Result>().ok(customerStaffService.getByRealNames(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java index 97e4bf7424..d0ce82f757 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java @@ -215,4 +215,10 @@ public interface CustomerStaffDao extends BaseDao { List listDTOS(@Param("customerId") String customerId, @Param("realName") String realName, @Param("mobile") String mobile, @Param("userIds") List userIds); List selectStaffRoles(@Param("userId") String userId,@Param("customerId") String customerId); + + /** + * @Author sun + * @Description 根据工作人员姓名批量查询基础信息数据 + **/ + List getByRealNames(GetByRealNamesFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java index bd4e8aae97..08916bfcc8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java @@ -335,4 +335,10 @@ public interface CustomerStaffService extends BaseService { * @author sun */ void enableStaff(EnableStaffFormDTO fromDTO); + + /** + * @Author sun + * @Description 根据工作人员姓名批量查询基础信息数据 + **/ + List getByRealNames(GetByRealNamesFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 8c880d86cd..03914fcd93 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -784,4 +784,13 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl getByRealNames(GetByRealNamesFormDTO formDTO) { + return baseDao.getByRealNames(formDTO); + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 4448cb0566..37c1b545c0 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -426,4 +426,30 @@ and sr.STAFF_ID=#{userId} ) + + + From 6fcd4bd7ad55303ef17cb71322a328b845aaa0a5 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 24 Nov 2021 18:23:24 +0800 Subject: [PATCH 086/170] =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/ScreenExtractServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 74af482075..d2f8f87352 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -358,7 +358,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { //dateId不为空,只计算当天存在评价记录的项目,更新项目对应的得分。 screenProjectSettleService.updateProjectSatisfactionScore(customerId,dateId,null); }catch(Exception e){ - log.error("群众不满得分更新失败"); + log.error("群众不满得分更新失败,msg:{}", e); } } From 417cf42ecfa1838f42730d40fd633f54f6243c82 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Nov 2021 08:59:53 +0800 Subject: [PATCH 087/170] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcSocietyOrgDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml index 530744c278..46f1475d7d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -48,8 +48,8 @@ + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 6bf9a4466e..4e9b5f9d0e 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -658,6 +658,6 @@ public interface EpmetUserOpenFeignClient { * @Author sun * @Description 根据工作人员姓名批量查询基础信息数据 **/ - @GetMapping(value = "epmetuser/customerstaff/getbyrealnames") + @PostMapping(value = "epmetuser/customerstaff/getbyrealnames") Result> getByRealNames(@RequestBody GetByRealNamesFormDTO formDTO); } From e62829c4b639b6aea6a59dde881d20c402c4e8b6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 25 Nov 2021 10:05:41 +0800 Subject: [PATCH 093/170] =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 2 + .../AddCommunitySelfOrganizationFormDTO.java | 2 - .../EditCommunitySelfOrganizationFormDTO.java | 2 - ...IcCommunitySelfOrganizationController.java | 31 +++++-- .../dao/IcCommunitySelfOrganizationDao.java | 9 ++ .../ImportCommunitySelfOrganization.java | 40 +++++++++ .../ImportCommunitySelfOrganizationSon.java | 20 +++++ .../IcCommunitySelfOrganizationService.java | 13 +++ ...cCommunitySelfOrganizationServiceImpl.java | 83 +++++++++++++++++++ .../mapper/IcCommunitySelfOrganizationDao.xml | 13 +++ 10 files changed, 206 insertions(+), 9 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganizationSon.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 075ee8d15c..a63db7b080 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -157,6 +157,8 @@ public enum EpmetErrorCode { EXISTS_SAME_PHONE_ERROR(8529, "%s存在重复"), + COMMUNITY_SELF_ORGANIZATION_LIST_REPART_ERROR(8530, "%s社区自组织名称已存在"), + // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java index a9e6cd450e..302f3d08a4 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -59,13 +59,11 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { /** * 经度 */ - @NotBlank(message = "longitude不能为空",groups = AddCommunitySelfOrganizationForm.class) private String longitude; /** * 纬度 */ - @NotBlank(message = "latitude不能为空",groups = AddCommunitySelfOrganizationForm.class) private String latitude; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java index 588843ba92..cade96113f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java @@ -61,13 +61,11 @@ public class EditCommunitySelfOrganizationFormDTO implements Serializable { /** * 经度 */ - @NotBlank(message = "longitude不能为空",groups = EditCommunitySelfOrganizationForm.class) private String longitude; /** * 纬度 */ - @NotBlank(message = "latitude不能为空",groups = EditCommunitySelfOrganizationForm.class) private String latitude; /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index a772108b44..7578334f2c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -28,18 +29,17 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; -import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; -import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; -import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; -import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.ExportCommunitySelfOrganizationExcel; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; +import org.apache.commons.io.FilenameUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -115,7 +115,28 @@ public class IcCommunitySelfOrganizationController { ExcelUtils.exportExcelToTarget(response, null, resultDTO.getList(), ExportCommunitySelfOrganizationExcel.class); } - //@PostMapping("importcommunityselforganization") + /** + * @Description 导入 + * @param tokenDto + * @param response + * @param file + * @author zxc + * @date 2021/11/25 9:03 上午 + */ + @PostMapping("importcommunityselforganization") + public Result importCommunitySelfOrganization(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new RenException("请上传文件"); + } + + // 校验文件类型 + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + if (!"xls".equals(extension) && !"xlsx".equals(extension)) { + throw new RenException("文件类型不匹配"); + } + icCommunitySelfOrganizationService.importCommunitySelfOrganization(tokenDto, response, file); + return new Result(); + } /** * @Description 添加社区自组织 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index 3fee0e0a71..efc9881b2a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -55,4 +55,13 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao selectListByAgencyId(@Param("customerId") String customerId, @Param("agencyIds") List agencyIds, @Param("orgName") String orgName); + + /** + * @Description 根据名字查询存在的自组织 + * @param names + * @author zxc + * @date 2021/11/25 9:07 上午 + */ + List selectOrgByOrgName(@Param("names")List names, @Param("customerId") String customerId); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java new file mode 100644 index 0000000000..2a9995be2a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java @@ -0,0 +1,40 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import cn.afterturn.easypoi.excel.annotation.ExcelCollection; +import com.epmet.commons.tools.utils.ExcelVerifyInfo; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/24 4:34 下午 + * @DESC + */ +@Data +public class ImportCommunitySelfOrganization extends ExcelVerifyInfo { + + @Excel(name = "组织名称", needMerge = true) + private String organizationName; + + @Excel(name = "组织人数", needMerge = true) + private Integer organizationPersonCount; + + @Excel(name = "服务事项", needMerge = true) + private String serviceItem; + + @Excel(name = "负责人", needMerge = true) + private String principalName; + + @Excel(name = "联系电话", needMerge = true) + private String principalPhone; + + @Excel(name = "创建时间", needMerge = true) + private Date organizationCreatedTime; + + @ExcelCollection(name = "组织成员") + private List persons; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganizationSon.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganizationSon.java new file mode 100644 index 0000000000..7fb44af70e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganizationSon.java @@ -0,0 +1,20 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2021/11/24 4:46 下午 + * @DESC + */ +@Data +public class ImportCommunitySelfOrganizationSon { + + @Excel(name = "姓名") + private String personName; + + @Excel(name = "电话") + private String personPhone; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index d9b536b625..4445d2f82b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -29,7 +29,10 @@ import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -145,4 +148,14 @@ public interface IcCommunitySelfOrganizationService extends BaseService queryServiceList(ServiceQueryFormDTO formDTO); + + /** + * @Description 导入 + * @param tokenDto + * @param response + * @param file + * @author zxc + * @date 2021/11/25 9:03 上午 + */ + void importCommunitySelfOrganization(TokenDto tokenDto, HttpServletResponse response, MultipartFile file) throws IOException; } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 0121cb1a5c..267ef87956 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.impl; +import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -18,6 +19,7 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.constant.IcCommunitySelfOrganizationConstant; import com.epmet.dao.IcCommunitySelfOrganizationDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; @@ -31,6 +33,7 @@ import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; +import com.epmet.excel.ImportCommunitySelfOrganization; import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; import com.epmet.service.IcCommunitySelfOrganizationService; import com.epmet.service.IcUserDemandRecService; @@ -41,7 +44,10 @@ 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 org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -316,4 +322,81 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl testExcelImportResult = ExcelPoiUtils.importExcelMore(file, 0, 2, ImportCommunitySelfOrganization.class); + List list = testExcelImportResult.getList(); + if (CollectionUtils.isNotEmpty(list)){ + String customerId = tokenDto.getCustomerId(); + List existsNames = baseDao.selectOrgByOrgName(list.stream().map(m -> m.getOrganizationName()).collect(Collectors.toList()), customerId); + Map> groupByName = list.stream().collect(Collectors.groupingBy(ImportCommunitySelfOrganization::getOrganizationName)); + groupByName.forEach((k,v) -> { + if (v.size() > NumConstant.ONE){ + existsNames.add(k); + } + }); + List repeatName = existsNames.stream().distinct().collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(repeatName)){ + StringBuffer sb = new StringBuffer(); + repeatName.forEach(p -> { + sb.append(p).append(","); + }); + String copywriter = sb.toString().substring(NumConstant.ZERO, sb.length() - NumConstant.ONE); + EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_LIST_REPART_ERROR.setMsg(String.format(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_LIST_REPART_ERROR.getMsg(),copywriter)); + throw new RenException(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_LIST_REPART_ERROR.getCode()); + } + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); + if (null == staffInfo){ + throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); + } + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + if (null == agencyInfo){ + throw new RenException(String.format("查询组织信息失败%s",staffInfo.getAgencyId())); + } + list.forEach(l -> { + IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(l, IcCommunitySelfOrganizationEntity.class); + e.setCustomerId(customerId); + e.setOrgId(staffInfo.getAgencyId()); + e.setOrgType(IcCommunitySelfOrganizationConstant.ORG_TYPE_AGENCY); + e.setPid(agencyInfo.getPid()); + e.setPids(agencyInfo.getPids()); + e.setOrganizationCreatedTime(l.getOrganizationCreatedTime()); + baseDao.insert(e); + if (CollectionUtils.isNotEmpty(l.getPersons())){ + List persons = ConvertUtils.sourceToTarget(l.getPersons(), IcCommunitySelfOrganizationPersonnelEntity.class); + Map> groupByPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone)); + List phones = new ArrayList<>(); + groupByPhone.forEach((k,v) -> { + if (v.size() > NumConstant.ONE){ + phones.add(k); + } + }); + if (CollectionUtils.isNotEmpty(phones)){ + StringBuffer sb = new StringBuffer(); + phones.forEach(p -> { + sb.append(p).append(","); + }); + String copywriter = sb.toString().substring(NumConstant.ZERO, sb.length() - NumConstant.ONE); + EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.setMsg(String.format(EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.getMsg(),copywriter)); + throw new RenException(EpmetErrorCode.EXISTS_SAME_PHONE_ERROR.getCode()); + } + persons.forEach(p -> { + p.setCustomerId(customerId); + p.setOrgId(e.getId()); + }); + personnelService.insertBatch(persons); + } + }); + } + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 9b7eeca58d..aff4bf4c67 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -84,4 +84,17 @@ + + + \ No newline at end of file From 929bc542277c29d9ac337519809b2e417a169b0e Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 25 Nov 2021 10:11:53 +0800 Subject: [PATCH 094/170] =?UTF-8?q?agencyId=E4=BB=8E=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcPartyUnitDTO.java | 8 ++++++++ .../epmet/controller/IcPartyActivityController.java | 6 ++++-- .../com/epmet/controller/IcPartyUnitController.java | 5 +++-- .../com/epmet/service/IcPartyActivityService.java | 3 ++- .../java/com/epmet/service/IcPartyUnitService.java | 3 ++- .../service/impl/IcPartyActivityServiceImpl.java | 13 ++++++++----- .../epmet/service/impl/IcPartyUnitServiceImpl.java | 10 +++++----- .../controller/IcPartymemberStyleController.java | 6 ++++-- .../service/IcPartymemberStyleService.java | 3 ++- .../service/impl/IcPartymemberStyleServiceImpl.java | 9 ++++++++- 10 files changed, 46 insertions(+), 20 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java index 7fdc5d38a4..1782ddf316 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java @@ -17,8 +17,10 @@ package com.epmet.dto; +import com.epmet.commons.tools.validator.group.AddGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.Date; import java.util.List; @@ -58,11 +60,13 @@ public class IcPartyUnitDTO implements Serializable { /** * 单位名称 */ + @NotBlank(message = "单位名称不能为空",groups = AddGroup.class) private String unitName; /** * 分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他 */ + @NotBlank(message = "分类不能为空",groups = AddGroup.class) private String type; /** @@ -75,11 +79,13 @@ public class IcPartyUnitDTO implements Serializable { /** * 联系人 */ + @NotBlank(message = "联系人不能为空",groups = AddGroup.class) private String contact; /** * 联系电话 */ + @NotBlank(message = "联系电话不能为空",groups = AddGroup.class) private String contactMobile; /** @@ -95,11 +101,13 @@ public class IcPartyUnitDTO implements Serializable { /** * 中心位置经度 */ + @NotBlank(message = "经度不能为空",groups = AddGroup.class) private String longitude; /** * 中心位置纬度 */ + @NotBlank(message = "纬度不能为空",groups = AddGroup.class) private String latitude; /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 05c8e2d10a..9da287e05d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -62,10 +64,10 @@ public class IcPartyActivityController { } @PostMapping("save") - public Result save(@RequestBody IcPartyActivityDTO dto){ + public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyActivityDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icPartyActivityService.save(dto); + icPartyActivityService.save(tokenDto, dto); return new Result(); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 1daacc73c7..f0b03fa8d9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -69,10 +69,11 @@ public class IcPartyUnitController { } @PostMapping("save") - public Result save(@RequestBody IcPartyUnitDTO dto){ + public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyUnitDTO dto){ //效验数据 + dto.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icPartyUnitService.save(dto); + icPartyUnitService.save(tokenDto, dto); return new Result(); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java index 322201808e..7133dfd1d4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java @@ -19,6 +19,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.entity.IcPartyActivityEntity; @@ -71,7 +72,7 @@ public interface IcPartyActivityService extends BaseService { * @author generator * @date 2021-11-19 */ - void save(IcPartyUnitDTO dto); + void save(TokenDto tokenDto, IcPartyUnitDTO dto); /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index 2d3c6c81b2..c4121d354a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -21,9 +21,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.redis.common.CustomerOrgRedis; -import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcPartyActivityDao; import com.epmet.dto.IcPartyActivityDTO; @@ -123,10 +124,12 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl list = dto.getImageList().stream().map(item -> { IcPartymemberStyleImageEntity e = new IcPartymemberStyleImageEntity(); + e.setCustomerId(tokenDto.getCustomerId()); e.setStyleId(entity.getId()); e.setImageUrl(item); e.setSort(i.getAndIncrement()); From 7f75a3d21cf2cf5b978501d402efca6f1c272ac1 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 25 Nov 2021 11:10:48 +0800 Subject: [PATCH 095/170] =?UTF-8?q?agencyId=E4=BB=8E=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcPartyUnitServiceImpl.java | 3 +++ .../service/impl/IcPartymemberStyleServiceImpl.java | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 901e809d82..de6fdafb0f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -156,6 +156,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl Date: Thu, 25 Nov 2021 12:01:17 +0800 Subject: [PATCH 096/170] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IcPartyActivityController.java | 2 ++ .../main/java/com/epmet/controller/IcPartyUnitController.java | 2 ++ .../java/com/epmet/service/impl/IcPartyUnitServiceImpl.java | 2 +- .../partymember/controller/IcPartymemberStyleController.java | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 9da287e05d..5fad4a9c6e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -64,6 +65,7 @@ public class IcPartyActivityController { } @PostMapping("save") + @NoRepeatSubmit public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyActivityDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index f0b03fa8d9..780b9f141e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -69,6 +70,7 @@ public class IcPartyUnitController { } @PostMapping("save") + @NoRepeatSubmit public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyUnitDTO dto){ //效验数据 dto.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index de6fdafb0f..fb8bc02b3f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -146,7 +146,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl Date: Thu, 25 Nov 2021 13:32:52 +0800 Subject: [PATCH 097/170] =?UTF-8?q?=E6=94=BE=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcCommunitySelfOrganizationController.java | 3 +++ .../com/epmet/controller/IcPartyServiceCenterController.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 7578334f2c..d9019b6c5b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; @@ -145,6 +146,7 @@ public class IcCommunitySelfOrganizationController { * @author zxc * @date 2021/11/19 8:33 上午 */ + @NoRepeatSubmit @PostMapping("addcommunityselforganization") public Result addCommunitySelfOrganization(@LoginUser TokenDto tokenDto, @RequestBody AddCommunitySelfOrganizationFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, AddCommunitySelfOrganizationFormDTO.AddCommunitySelfOrganizationForm.class); @@ -159,6 +161,7 @@ public class IcCommunitySelfOrganizationController { * @author zxc * @date 2021/11/19 10:12 上午 */ + @NoRepeatSubmit @PostMapping("editcommunityselforganization") public Result editCommunitySelfOrganization(@LoginUser TokenDto tokenDto, @RequestBody EditCommunitySelfOrganizationFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, EditCommunitySelfOrganizationFormDTO.EditCommunitySelfOrganizationForm.class); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 62b7fe619d..2f015ec216 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -103,6 +104,7 @@ public class IcPartyServiceCenterController { * @author zxc * @date 2021/11/22 9:13 上午 */ + @NoRepeatSubmit @PostMapping("addpartyservicecenter") public Result addPartyServiceCenter(@RequestBody AddPartyServiceCenterFormDTO formDTO, @LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(formDTO, AddPartyServiceCenterFormDTO.AddPartyServiceCenterForm.class); @@ -117,6 +119,7 @@ public class IcPartyServiceCenterController { * @author zxc * @date 2021/11/22 10:21 上午 */ + @NoRepeatSubmit @PostMapping("editpartyservicecenter") public Result editPartyServiceCenter(@RequestBody EditPartyServiceCenterFormDTO formDTO,@LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(formDTO, EditPartyServiceCenterFormDTO.EditPartyServiceCenterForm.class); From 74f598456437b8eab14013ca0d3d3dc00aa0c558 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 25 Nov 2021 15:07:07 +0800 Subject: [PATCH 098/170] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcPartyUnitServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index fb8bc02b3f..52dad6f7d3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -76,7 +76,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); - wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); + wrapper.like(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); wrapper.eq(StringUtils.isNotBlank(formDTO.getType()), IcPartyUnitEntity::getType, formDTO.getType()); wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact()); wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); @@ -106,7 +106,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); - wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); + wrapper.like(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); wrapper.eq(StringUtils.isNotBlank(formDTO.getType()), IcPartyUnitEntity::getType, formDTO.getType()); wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact()); wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); From bfa9bc36896c4064b418a670c70a479e71feca0e Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 25 Nov 2021 15:22:19 +0800 Subject: [PATCH 099/170] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcPartyActivityController.java | 25 +++++++++------ .../controller/IcPartyUnitController.java | 32 +++++++++++-------- .../IcPartymemberStyleController.java | 25 +++++++++------ .../service/IcPartymemberStyleService.java | 4 +-- .../impl/IcPartymemberStyleServiceImpl.java | 18 +++++++++-- 5 files changed, 65 insertions(+), 39 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 5fad4a9c6e..413598926e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -30,10 +30,12 @@ import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.excel.IcPartyActivityExcel; import com.epmet.service.IcPartyActivityService; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -82,17 +84,20 @@ public class IcPartyActivityController { @GetMapping("export") public void export(@RequestBody PartyActivityFormDTO formDTO, HttpServletResponse response) throws Exception { List list = icPartyActivityService.list(formDTO); + List excelList = new ArrayList<>(); AtomicInteger i = new AtomicInteger(0); - List excelList = list.stream().map(item -> { - IcPartyActivityExcel excel = new IcPartyActivityExcel(); - excel.setIndex(i.getAndIncrement()); - excel.setUnitName(item.getUnitName()); - excel.setTitle(item.getTitle()); - excel.setAddress(item.getAddress()); - excel.setPeopleCount(item.getPeopleCount()); - excel.setActivityTime(item.getActivityTime()); - return excel; - }).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(list)) { + excelList = list.stream().map(item -> { + IcPartyActivityExcel excel = new IcPartyActivityExcel(); + excel.setIndex(i.getAndIncrement()); + excel.setUnitName(item.getUnitName()); + excel.setTitle(item.getTitle()); + excel.setAddress(item.getAddress()); + excel.setPeopleCount(item.getPeopleCount()); + excel.setActivityTime(item.getActivityTime()); + return excel; + }).collect(Collectors.toList()); + } ExcelUtils.exportExcelToTarget(response, null, excelList, IcPartyActivityExcel.class); } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 780b9f141e..ea8a59285d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -33,10 +33,12 @@ import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcPartyUnitExcel; import com.epmet.service.IcPartyUnitService; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -90,21 +92,23 @@ public class IcPartyUnitController { @GetMapping("export") public void export(@RequestBody PartyUnitFormDTO formDTO, HttpServletResponse response) throws Exception { List list = icPartyUnitService.list(formDTO); + List excelList = new ArrayList<>(); AtomicInteger i = new AtomicInteger(0); - List excelList = list.stream().map(item -> { - IcPartyUnitExcel excel = new IcPartyUnitExcel(); - excel.setIndex(i.getAndIncrement()); - excel.setUnitName(item.getUnitName()); - excel.setContact(item.getContact()); - excel.setContactMobile(item.getContactMobile()); - excel.setType(item.getType()); - excel.setMemberCount(item.getMemberCount()); - excel.setRemark(item.getRemark()); - excel.setSatisfaction(item.getSatisfaction()); - excel.setServiceMatter(String.join(String.valueOf((char)10), item.getServiceMatterList())); - return excel; - }).collect(Collectors.toList()); - + if (CollectionUtils.isNotEmpty(list)) { + excelList = list.stream().map(item -> { + IcPartyUnitExcel excel = new IcPartyUnitExcel(); + excel.setIndex(i.getAndIncrement()); + excel.setUnitName(item.getUnitName()); + excel.setContact(item.getContact()); + excel.setContactMobile(item.getContactMobile()); + excel.setType(item.getType()); + excel.setMemberCount(item.getMemberCount()); + excel.setRemark(item.getRemark()); + excel.setSatisfaction(item.getSatisfaction()); + excel.setServiceMatter(String.join(String.valueOf((char) 10), item.getServiceMatterList())); + return excel; + }).collect(Collectors.toList()); + } ExcelUtils.exportExcelToTarget(response, null, excelList, IcPartyUnitExcel.class); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java index e3ed99cb53..f4ff0bf2c2 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java @@ -31,10 +31,12 @@ import com.epmet.modules.partymember.excel.IcPartymemberStyleExcel; import com.epmet.modules.partymember.service.IcPartymemberStyleService; import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; @@ -84,17 +86,20 @@ public class IcPartymemberStyleController { @PostMapping("export") public void export(@RequestBody PartyMemberStyleFormDTO formDTO, HttpServletResponse response) throws Exception { - List list = icPartymemberStyleService.search(formDTO).getList(); + List list = icPartymemberStyleService.list(formDTO); + List result = new ArrayList<>(); AtomicInteger i = new AtomicInteger(NumConstant.ONE); - List result = list.stream().map(item -> { - IcPartymemberStyleExcel excel = new IcPartymemberStyleExcel(); - excel.setIndex(i.getAndIncrement()); - excel.setGridName(item.getGridName()); - excel.setName(item.getName()); - excel.setMainDeed(item.getMainDeed()); - return excel; - }).collect(Collectors.toList()); - ExcelUtils.exportExcelToTarget(response, null, list, IcPartymemberStyleExcel.class); + if (CollectionUtils.isNotEmpty(list)) { + result = list.stream().map(item -> { + IcPartymemberStyleExcel excel = new IcPartymemberStyleExcel(); + excel.setIndex(i.getAndIncrement()); + excel.setGridName(item.getGridName()); + excel.setName(item.getName()); + excel.setMainDeed(item.getMainDeed()); + return excel; + }).collect(Collectors.toList()); + } + ExcelUtils.exportExcelToTarget(response, null, result, IcPartymemberStyleExcel.class); } @PostMapping("list") diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java index bc52136543..85bb4bb216 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java @@ -48,12 +48,12 @@ public interface IcPartymemberStyleService extends BaseService * @author generator * @date 2021-11-18 */ - List list(Map params); + List list(PartyMemberStyleFormDTO formDTO); /** * 单条查询 diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java index a2df22f69e..768aa71b08 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java @@ -73,10 +73,22 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(PartyMemberStyleFormDTO formDTO) { + //分页查询 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartymemberStyleEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getGridId()), IcPartymemberStyleEntity::getGridId, formDTO.getGridId()); + wrapper.like(StringUtils.isNotBlank(formDTO.getName()), IcPartymemberStyleEntity::getName, formDTO.getName()); + wrapper.like(StringUtils.isNotBlank(formDTO.getMainDeed()), IcPartymemberStyleEntity::getMainDeed, formDTO.getMainDeed()); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartymemberStyleDTO.class); + //设置网格名 + dtoList.forEach(item -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); + item.setGridName(gridInfo.getGridName()); + }); - return ConvertUtils.sourceToTarget(entityList, IcPartymemberStyleDTO.class); + return dtoList; } private QueryWrapper getWrapper(Map params){ From db9118cba4fbb965abee8c5b201b92e512bf0987 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 25 Nov 2021 16:09:12 +0800 Subject: [PATCH 100/170] =?UTF-8?q?=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/MatterListDTO.java | 6 ++++++ .../PartyServiceCenterListResultDTO.java | 4 ++++ .../mapper/IcPartyServiceCenterDao.xml | 19 ++++++++++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java index 21c56927e2..95c545f656 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java @@ -32,6 +32,12 @@ public class MatterListDTO implements Serializable { */ private String allowTime; + private String startTime; + + private String endTime; + + private String appointmentType; + public MatterListDTO() { this.sort = NumConstant.ZERO; this.matterName = ""; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java index 7f99cedc12..17ca6f112c 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java @@ -46,6 +46,10 @@ public class PartyServiceCenterListResultDTO implements Serializable { * 下午工作时间 */ private String pmWorkTime; + private String amStartTime; + private String amEndTime; + private String pmStartTime; + private String pmEndTime; /** * 经度 diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml index db25c15da0..9ce747f95f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -8,14 +8,19 @@ - - + + + + + + + @@ -25,13 +30,17 @@ sc.CENTER_NAME AS centerName, sc.ADDRESS AS address, sc.WORK_PHONE AS workPhone, - CONCAT('上午 ',sc.AM_START_TIME,' ~ ',sc.AM_END_TIME) AS amWorkTime, - CONCAT('下午 ',sc.PM_START_TIME,' ~ ',sc.PM_END_TIME) AS pmWorkTime, + sc.AM_START_TIME AS amStartTime, + sc.AM_END_TIME AS amEndTime, + sc.PM_START_TIME AS pmStartTime, + sc.PM_END_TIME AS pmEndTime, sc.LONGITUDE AS longitude, sc.LATITUDE AS latitude, cm.MATTER_NAME AS matterName, cm.ID AS matterId, - CONCAT(cm.START_TIME,' ~ ',cm.END_TIME) AS allowTime + cm.START_TIME AS startTime, + cm.END_TIME AS endTime, + cm.APPOINTMENT_TYPE AS appointmentType FROM ic_party_service_center sc LEFT JOIN ic_party_service_center_matter cm ON (cm.PARTY_SERVICE_CENTER_ID = sc.ID AND cm.DEL_FLAG = 0) WHERE sc.DEL_FLAG = 0 From 79433b12382b37618d9afda0add7a8a91dd96324 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 25 Nov 2021 16:56:12 +0800 Subject: [PATCH 101/170] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcPartyActivityDTO.java | 6 ++++-- .../main/java/com/epmet/dto/form/PartyActivityFormDTO.java | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java index d09b657ee0..fc0d7555e3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -18,7 +18,9 @@ package com.epmet.dto; import com.epmet.commons.tools.validator.group.AddGroup; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -49,7 +51,6 @@ public class IcPartyActivityDTO implements Serializable { /** * 组织ID */ - @NotBlank(message = "agencyId不能为空",groups = AddGroup.class) private String agencyId; /** @@ -95,7 +96,8 @@ public class IcPartyActivityDTO implements Serializable { /** * 活动时间 */ - @NotBlank(message = "活动时间不能为空",groups = AddGroup.class) + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date activityTime; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java index 2053b99d0f..40ac5563ac 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; @@ -18,7 +19,9 @@ public class PartyActivityFormDTO implements Serializable { private String agencyId; private String unitId; private String title; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date startTime; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date endTime; private String serviceMatter; private Integer pageNo; From 92dd324e32c231059321d43f2a4670a69abf3a33 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 25 Nov 2021 17:47:39 +0800 Subject: [PATCH 102/170] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcPartyActivityServiceImpl.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index c4121d354a..222a839148 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -26,6 +26,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dao.IcPartyActivityDao; import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.IcPartyUnitDTO; @@ -42,6 +43,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -60,6 +62,14 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl search(PartyActivityFormDTO formDTO) { + if (null == formDTO.getStartTime()) { + Date startDate = DateUtils.parse("1900-01-01 00:00:00", DateUtils.DATE_TIME_PATTERN); + formDTO.setStartTime(startDate); + } + if (null == formDTO.getEndTime()) { + Date endDate = DateUtils.parse("2099-12-31 00:00:00", DateUtils.DATE_TIME_PATTERN); + formDTO.setEndTime(endDate); + } PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId()); @@ -85,6 +95,14 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl list(PartyActivityFormDTO formDTO) { + if (null == formDTO.getStartTime()) { + Date startDate = DateUtils.parse("1900-01-01 00:00:00", DateUtils.DATE_TIME_PATTERN); + formDTO.setStartTime(startDate); + } + if (null == formDTO.getEndTime()) { + Date endDate = DateUtils.parse("2099-12-31 00:00:00", DateUtils.DATE_TIME_PATTERN); + formDTO.setEndTime(endDate); + } LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId()); wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcPartyActivityEntity::getUnitId, formDTO.getUnitId()); From 2f2aa42d410ed4f0c4681ef0ccfe60f89025072b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 26 Nov 2021 09:28:46 +0800 Subject: [PATCH 103/170] =?UTF-8?q?=E5=BA=94=E4=BA=A7=E5=93=81=E3=80=81?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E8=A6=81=E6=B1=82=E5=A4=8D=E6=9F=A5=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=96=B0=E5=A2=9E=E3=80=81=E4=BF=AE=E6=94=B9=E6=97=B6?= =?UTF-8?q?=E5=9D=87=E8=BF=94=E5=9B=9E=E5=AF=B9=E5=BA=94=E7=9A=84=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=95=B0=E6=8D=AE=EF=BC=8C=E5=A4=8D=E6=9F=A5=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=97=E8=A1=A8=E6=8C=89=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=8D=87=E5=BA=8F=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcPlacePatrolReviewRecordController.java | 10 ++++------ .../service/IcPlacePatrolReviewRecordService.java | 4 ++-- .../impl/IcPlacePatrolReviewRecordServiceImpl.java | 14 ++++++++++++-- .../mapper/IcPlacePatrolReviewRecordDao.xml | 2 +- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java index 5f0f36c750..04666c0230 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java @@ -52,11 +52,10 @@ public class IcPlacePatrolReviewRecordController { * @Description 新增巡查复查记录 **/ @PostMapping("add") - public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolReviewRecordFormDTO formDTO) { + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolReviewRecordFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddPlacePatrolReviewRecordFormDTO.Add.class); formDTO.setCustomerId(tokenDto.getCustomerId()); - placePatrolReviewRecordService.add(formDTO); - return new Result(); + return new Result().ok(placePatrolReviewRecordService.add(formDTO)); } /** @@ -64,10 +63,9 @@ public class IcPlacePatrolReviewRecordController { * @Description 修改巡查复查记录 **/ @PostMapping("edit") - public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolReviewRecordFormDTO formDTO) { + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolReviewRecordFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, EditPlacePatrolReviewRecordFormDTO.Edit.class); - placePatrolReviewRecordService.edit(formDTO); - return new Result(); + return new Result().ok(placePatrolReviewRecordService.edit(formDTO)); } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolReviewRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolReviewRecordService.java index 2ab44dd930..1bc4b86fe5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolReviewRecordService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolReviewRecordService.java @@ -37,13 +37,13 @@ public interface IcPlacePatrolReviewRecordService extends BaseService ORDER BY - a.created_time DESC + a.created_time ASC \ No newline at end of file From 1b5f8787b8cf4a06b42cef43c63c5f973c6e44a0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 26 Nov 2021 10:00:48 +0800 Subject: [PATCH 104/170] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcPlacePatrolRecordDao.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml index d0c33f3471..58fab01358 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml @@ -43,6 +43,12 @@ AND a.nine_place_val = #{ninePlaceVal} + + AND a.first_result = #{firstResult} + + + AND a.final_result = #{finalResult} + AND a.place_org_id IN (select id from ic_place_org where place_org_name like concat('%', #{placeOrgName}, '%')) From d721d6d2fad6caaa7bed30fffc0bb1e6c705509d Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 26 Nov 2021 11:00:47 +0800 Subject: [PATCH 105/170] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/commons/tools/utils/IpUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java index 8aabf5f5d9..33846da5c2 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java @@ -62,6 +62,8 @@ public class IpUtils { if (StringUtils.isEmpty(ip) || IP_UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getRemoteAddr(); } + + logger.info("getIpAddr origin ip:{}",ip); //对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 if (ip != null) { //"***.***.***.***".length() = 15 if (ip.indexOf(StrConstant.COMMA) > 0) { @@ -72,7 +74,6 @@ public class IpUtils { } catch (Exception e) { logger.error("IpUtils getIpAddr ERROR ", e); } - return ip; } From 3676c5ba176643e89e0b8ae6992bc1843601a1f4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 26 Nov 2021 11:10:18 +0800 Subject: [PATCH 106/170] =?UTF-8?q?Revert=20"=E6=B7=BB=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d721d6d2 --- .../src/main/java/com/epmet/commons/tools/utils/IpUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java index 33846da5c2..8aabf5f5d9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java @@ -62,8 +62,6 @@ public class IpUtils { if (StringUtils.isEmpty(ip) || IP_UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getRemoteAddr(); } - - logger.info("getIpAddr origin ip:{}",ip); //对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 if (ip != null) { //"***.***.***.***".length() = 15 if (ip.indexOf(StrConstant.COMMA) > 0) { @@ -74,6 +72,7 @@ public class IpUtils { } catch (Exception e) { logger.error("IpUtils getIpAddr ERROR ", e); } + return ip; } From 1a8f098e26ed3a1d7fe25368f82c5a7b6da5463b Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 26 Nov 2021 14:02:34 +0800 Subject: [PATCH 107/170] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcCommunitySelfOrganizationServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 267ef87956..cde9814019 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -337,7 +337,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl list = testExcelImportResult.getList(); if (CollectionUtils.isNotEmpty(list)){ String customerId = tokenDto.getCustomerId(); - List existsNames = baseDao.selectOrgByOrgName(list.stream().map(m -> m.getOrganizationName()).collect(Collectors.toList()), customerId); + List existsNames = baseDao.selectOrgByOrgName(list.stream().map(ImportCommunitySelfOrganization::getOrganizationName).collect(Collectors.toList()), customerId); Map> groupByName = list.stream().collect(Collectors.groupingBy(ImportCommunitySelfOrganization::getOrganizationName)); groupByName.forEach((k,v) -> { if (v.size() > NumConstant.ONE){ @@ -399,4 +399,4 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl Date: Fri, 26 Nov 2021 14:27:41 +0800 Subject: [PATCH 108/170] emm --- .../src/main/resources/mapper/IcPartyServiceCenterDao.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml index 9ce747f95f..b241afaf64 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -40,7 +40,11 @@ cm.ID AS matterId, cm.START_TIME AS startTime, cm.END_TIME AS endTime, - cm.APPOINTMENT_TYPE AS appointmentType + cm.APPOINTMENT_TYPE AS appointmentType, + case when cm.APPOINTMENT_TYPE = 'everyDay' THEN CONCAT('每天',' ', cm.START_TIME,'-',cm.END_TIME) + when cm.APPOINTMENT_TYPE = 'workDay' THEN CONCAT('工作日',' ', cm.START_TIME,'-',cm.END_TIME) + when cm.APPOINTMENT_TYPE = 'weekend' THEN CONCAT('周末',' ', cm.START_TIME,'-',cm.END_TIME) + ELSE CONCAT(cm.START_TIME,'-',cm.END_TIME) END AS allowTime FROM ic_party_service_center sc LEFT JOIN ic_party_service_center_matter cm ON (cm.PARTY_SERVICE_CENTER_ID = sc.ID AND cm.DEL_FLAG = 0) WHERE sc.DEL_FLAG = 0 From 60147901b21aa0fd404417f50ca7d3b7c7e247bc Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 26 Nov 2021 17:24:38 +0800 Subject: [PATCH 109/170] =?UTF-8?q?=E5=8F=96=E6=B6=88=E9=A2=84=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CancelAppointmentFormDTO.java | 22 +++++++++++++++++++ .../result/AppointmentRecordResultDTO.java | 3 +++ .../IcPartyServiceCenterController.java | 13 +++++++++++ .../service/IcPartyServiceCenterService.java | 8 +++++++ .../impl/IcPartyServiceCenterServiceImpl.java | 11 ++++++++++ .../mapper/IcMatterAppointmentRecordDao.xml | 3 ++- 6 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java new file mode 100644 index 0000000000..896d3b1cb3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/26 5:19 下午 + * @DESC + */ +@Data +public class CancelAppointmentFormDTO implements Serializable { + + private static final long serialVersionUID = 8646430374802086292L; + + public interface CancelAppointmentForm{} + + @NotBlank(message = "recordId不能为空",groups = CancelAppointmentForm.class) + private String recordId; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java index ae76c66052..84813a4f47 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java @@ -40,6 +40,8 @@ public class AppointmentRecordResultDTO implements Serializable { */ private String remark; + private String recordId; + /** * 预约时间 */ @@ -55,5 +57,6 @@ public class AppointmentRecordResultDTO implements Serializable { this.appointmentPhone = ""; this.remark = ""; this.appointmentTime = new ArrayList<>(); + this.recordId = ""; } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 2f015ec216..02c1175d07 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -190,4 +190,17 @@ public class IcPartyServiceCenterController { return new Result>().ok(icPartyServiceCenterService.appointmentRecord(formDTO)); } + /** + * @Description 取消预约 + * @param formDTO + * @author zxc + * @date 2021/11/26 5:21 下午 + */ + @PostMapping("cancelappointment") + public Result cancelAppointment(@RequestBody CancelAppointmentFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,CancelAppointmentFormDTO.CancelAppointmentForm.class); + icPartyServiceCenterService.cancelAppointment(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java index 586bf7dda6..9bbfcaf44e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java @@ -158,4 +158,12 @@ public interface IcPartyServiceCenterService extends BaseService appointmentRecord(AppointmentRecordFormDTO formDTO); + /** + * @Description 取消预约 + * @param formDTO + * @author zxc + * @date 2021/11/26 5:21 下午 + */ + void cancelAppointment(CancelAppointmentFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 6fd12822f0..d884a47e99 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -394,6 +394,17 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl getTimeList(String start,String end,Integer interval){ List result = new ArrayList<>(); List intervalTimeList = getIntervalTimeList(start, end, interval); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml index 0cdf818653..79c21f6c04 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -10,7 +10,8 @@ ar.APPOINTMENT_PHONE, ar.REMARK, ar.TIME_ID, - cm.MATTER_NAME + cm.MATTER_NAME, + ar.ID AS recordId FROM ic_matter_appointment_record ar LEFT JOIN ic_party_service_center_matter cm ON (cm.ID = ar.MATTER_ID AND cm.DEL_FLAG = 0) WHERE ar.DEL_FLAG = 0 From cb18a7e52179359141635112ebe945f7efb9971c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 26 Nov 2021 17:45:47 +0800 Subject: [PATCH 110/170] =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcPartyServiceCenterServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index d884a47e99..21171e8212 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -61,6 +61,7 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; /** * 党群服务中心 @@ -259,7 +260,12 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl { timeIds.addAll(Arrays.asList(r.getTimeId().split(","))); }); - if (timeIds.containsAll(Arrays.asList(formDTO.getTimeId().split(",")))){ + List formTimeId = Arrays.asList(formDTO.getTimeId().split(",")); + int before = timeIds.size() + formTimeId.size(); + List endTimeId = new ArrayList<>(); + endTimeId.addAll(timeIds);endTimeId.addAll(formTimeId); + List collect = endTimeId.stream().distinct().collect(Collectors.toList()); + if (collect.size() < before){ throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); } } From 1ff4f047690c420813e65d15c148a5dc5725fce0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 29 Nov 2021 15:09:55 +0800 Subject: [PATCH 111/170] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=AD=97=E5=85=B8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.6__add_dict_data.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.6__add_dict_data.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.6__add_dict_data.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.6__add_dict_data.sql new file mode 100644 index 0000000000..78f16f4d94 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.6__add_dict_data.sql @@ -0,0 +1,29 @@ +-- 1、增加字典类型 +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (8, 'user_demand_status', '居民需求状态', '待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished', 8, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (9, 'user_demand_report_type', '居民需求上报类型', '社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help', 9, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (10, 'user_demand_service_type', '居民需求服务方类型', '服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;', 10, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000006, 'scale', '人员规模', '', 6, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000007, 'party_unit_type', '联建单位分类', '', 7, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +-- 2、增加字典数据 +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000200, 1000000000000000007, '楼宇党建', '0', '', 0, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000201, 1000000000000000007, '两新组织', '1', '', 1, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000202, 1000000000000000007, '区域单位党建', '2', '', 2, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000203, 1000000000000000007, '机关直属部门', '3', '', 3, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000204, 1000000000000000007, '其他', '4', '', 4, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000205, 8, '待处理', 'pending', '', 1, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000206, 8, '已取消', 'canceled', '', 2, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000207, 8, '已派单', 'assigned', '', 3, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000208, 8, '已接单', 'have_order', '', 4, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000209, 8, '已完成', 'finished', '', 5, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000210, 9, '社区帮办', 'community', '', 1, 1, '2021-11-23 14:03:22', 1, '2021-11-23 14:03:22'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000211, 9, '楼长帮办', 'building_caption', '', 2, 1, '2021-11-23 14:03:22', 1, '2021-11-23 14:03:22'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000212, 9, '党员帮办', 'party', '', 3, 1, '2021-11-23 14:03:22', 1, '2021-11-23 14:03:22'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000213, 10, '志愿者', 'volunteer', '', 1, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000214, 10, '社会组织', 'social_org', '', 2, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000215, 10, '社区自组织', 'community_org', '', 3, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000216, 10, '区域党建单位', 'party_unit', '', 4, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000000, 1000000000000000006, '10人以下', '0', '', 0, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000001, 1000000000000000006, '10-20人', '1', '', 1, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000002, 1000000000000000006, '21-40人', '2', '', 2, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000003, 1000000000000000006, '41-100人', '3', '', 3, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000004, 1000000000000000006, '100人以上', '4', '', 4, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); \ No newline at end of file From d00170e1a77c2f1cf979409946fdba4e0c8f0c09 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 29 Nov 2021 15:37:49 +0800 Subject: [PATCH 112/170] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/CancelAppointmentFormDTO.java | 2 ++ .../controller/IcPartyServiceCenterController.java | 3 ++- .../com/epmet/dao/IcMatterAppointmentRecordDao.java | 9 +++++++++ .../service/impl/IcPartyServiceCenterServiceImpl.java | 2 +- .../resources/mapper/IcMatterAppointmentRecordDao.xml | 10 ++++++++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java index 896d3b1cb3..51faf2aa6d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java @@ -19,4 +19,6 @@ public class CancelAppointmentFormDTO implements Serializable { @NotBlank(message = "recordId不能为空",groups = CancelAppointmentForm.class) private String recordId; + + private String userId; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index 02c1175d07..a948681219 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -197,8 +197,9 @@ public class IcPartyServiceCenterController { * @date 2021/11/26 5:21 下午 */ @PostMapping("cancelappointment") - public Result cancelAppointment(@RequestBody CancelAppointmentFormDTO formDTO){ + public Result cancelAppointment(@RequestBody CancelAppointmentFormDTO formDTO,@LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(formDTO,CancelAppointmentFormDTO.CancelAppointmentForm.class); + formDTO.setUserId(tokenDto.getUserId()); icPartyServiceCenterService.cancelAppointment(formDTO); return new Result(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java index f349032024..0b118216bb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java @@ -52,4 +52,13 @@ public interface IcMatterAppointmentRecordDao extends BaseDao appointmentExistRecord(@Param("matterIds")List matterIds); + /** + * @Description 取消预约 + * @param recordId + * @param userId + * @author zxc + * @date 2021/11/29 3:34 下午 + */ + void cancelAppointment(@Param("recordId")String recordId,@Param("userId")String userId); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 21171e8212..3a027a9b8a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -408,7 +408,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl getTimeList(String start,String end,Integer interval){ diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml index 79c21f6c04..3b5f960894 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -3,6 +3,16 @@ + + + UPDATE ic_matter_appointment_record + SET `STATUS` = 'cancel', + DEL_FLAG = 1, + UPDATED_BY = #{userId}, + UPDATED_TIME = NOW() + WHERE ID = #{recordId} + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 72ac018284..67eab8c3f4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -116,4 +116,67 @@ order by r.WANT_SERVICE_TIME desc,r.CREATED_TIME asc + + + + \ No newline at end of file From 7efe46fa045ffd6730e0865f9f89c716ca8e22d0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 15:48:42 +0800 Subject: [PATCH 125/170] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=92=8C=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=9C=80=E8=A6=81=E8=BF=94=E5=9B=9E=E4=B8=80=E7=BA=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=BC=96=E7=A0=81=E5=92=8C=E4=B8=80=E7=BA=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/demand/DemandRecResultDTO.java | 3 ++- .../service/impl/IcUserDemandRecServiceImpl.java | 3 ++- .../main/resources/mapper/IcUserDemandRecDao.xml | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index d1eac19bff..feb5c70b84 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -22,7 +22,8 @@ public class DemandRecResultDTO implements Serializable { private String categoryCode; private String parentCode; private String categoryName; - + private String firstCategoryCode; + private String firstCategoryName; //社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 3ba0fcb8b4..962653db3e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -263,7 +263,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl userIdList = Arrays.asList(res.getServerId()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 67eab8c3f4..85beb700c0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -70,7 +70,12 @@ s.SERVICE_END_TIME as serviceEndTime, IFNULL(s.FINISH_DESC,'') as finishDesc, '' AS serviceShowName, - s.id as serviceId + s.id as serviceId, + ( + case when r.PARENT_CODE !='0' then r.PARENT_CODE + ELSE R.CATEGORY_CODE + END + ) as firstCategoryCode FROM ic_user_demand_rec r left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' ) @@ -169,7 +174,12 @@ s.SERVICE_END_TIME as serviceEndTime, IFNULL(s.FINISH_DESC,'') as finishDesc, '' AS serviceShowName, - s.id as serviceId + s.id as serviceId, + ( + case when r.PARENT_CODE !='0' then r.PARENT_CODE + ELSE R.CATEGORY_CODE + END + ) as firstCategoryCode FROM ic_user_demand_rec r left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' ) From aac87f7d0d0864cd464b2c38fe7365cd2396308c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 17:07:45 +0800 Subject: [PATCH 126/170] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=92=8C=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=9C=80=E8=A6=81=E8=BF=94=E5=9B=9E=E4=B8=80=E7=BA=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=BC=96=E7=A0=81=E5=92=8C=E4=B8=80=E7=BA=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java | 5 +++++ .../com/epmet/service/impl/IcUserDemandRecServiceImpl.java | 4 ++-- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java index 0a3382d3d3..0b46c1ca4b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java @@ -23,6 +23,11 @@ public class IcResiUserDemandFromDTO implements Serializable { private Integer pageSize; + /** + * 研判分析界面,查看同类型的需求可以用此接口,只需传入分类编码 + */ + private String firstCategoryCode; + @NotBlank(message = "tokenDto获取客户id不能为空", groups = AddUserInternalGroup.class) private String customerId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 962653db3e..e3b6d48d4d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -303,7 +303,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl + and r.CATEGORY_CODE like concat(#{firstCategoryCode},'%') + ORDER BY r.WANT_SERVICE_TIME DESC From 6967f3f275ec710914257a81e109de50a43eb1eb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 17:41:50 +0800 Subject: [PATCH 127/170] =?UTF-8?q?/api/resi/mine/resiregister/submit?= =?UTF-8?q?=EF=BC=8C=E6=B3=A8=E5=86=8C=E5=B1=85=E6=B0=91=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?idNum.=E6=97=A0=E6=B3=95=E9=99=90=E5=88=B6=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=EF=BC=8C=E5=9B=A0=E4=B8=BA=E4=B8=8D=E6=98=AF=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=83=BD=E5=8F=91=E7=89=88=E3=80=82?= =?UTF-8?q?=E4=B8=94=E5=90=8C=E6=AD=A5=E5=88=B0user=5Fbase=5Finfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/UserResiInfoDTO.java | 5 +++++ .../java/com/epmet/dto/form/InfoSubmitFromDTO.java | 6 +++++- .../src/main/java/com/epmet/dao/UserResiInfoDao.java | 7 +++++++ .../java/com/epmet/entity/UserResiInfoEntity.java | 8 +++++--- .../epmet/service/impl/UserResiInfoServiceImpl.java | 7 +++++++ .../db/migration/V0.0.19__user_resi_infoaddidnum.sql | 1 + .../src/main/resources/mapper/UserResiInfoDao.xml | 11 +++++++++++ 7 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.19__user_resi_infoaddidnum.sql diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java index 3d81025a02..d8b5c10495 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java @@ -66,6 +66,11 @@ public class UserResiInfoDTO implements Serializable { */ private String name; + /** + * 身份证号,1206新增 + */ + private String idNum; + /** * 街道 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java index 75453a1d22..d64368a7b4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java @@ -22,7 +22,6 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import java.io.Serializable; -import java.util.Date; /** @@ -57,6 +56,11 @@ public class InfoSubmitFromDTO implements Serializable { @Length(max=20,message = "名称不能超过20个字") private String name; + //@NotBlank(message = "身份证号不能为空") + //@Length(max=18,message = "身份证号不能超过18位") + //别的小程序不统一升级,没办法限制必填。 + private String idNum; + /** * 街道 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java index 59d42dfc6e..997a615fab 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java @@ -96,4 +96,11 @@ public interface UserResiInfoDao extends BaseDao { * @return void */ void updateByUserId(UserResiInfoEntity entity); + + /** + * 身份证 + * @param idNum + * @return + */ + Integer selectCountByIdNum(@Param("idNum") String idNum,@Param("customerId") String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserResiInfoEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserResiInfoEntity.java index 7c4266e3c7..7df10f75a6 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserResiInfoEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserResiInfoEntity.java @@ -20,13 +20,10 @@ package com.epmet.entity; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 用户居民端注册信息表 用户在居民端完善的个人信息 * @@ -60,6 +57,11 @@ public class UserResiInfoEntity extends BaseEpmetEntity { */ private String name; + /** + * 身份证号,1206新增 + */ + private String idNum; + /** * 街道 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index 2c58fe7b65..9da7ccac80 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -27,6 +27,7 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; @@ -217,6 +218,12 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); + } + } userResiRegisterVisitService.updateResiRegisterVisit(true, userResiInfoDTO); //4:居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一 registerRelationService.saveRegisterRelation(userResiInfoDTO); diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.19__user_resi_infoaddidnum.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.19__user_resi_infoaddidnum.sql new file mode 100644 index 0000000000..535da1b138 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.19__user_resi_infoaddidnum.sql @@ -0,0 +1 @@ +alter table user_resi_info add COLUMN ID_NUM VARCHAR(32) COMMENT '身份证号,1206新增' AFTER NAME; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index fb360d3a39..0c4738a565 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -175,4 +175,15 @@ uri.DEL_FLAG = '0' AND uri.USER_ID = #{userId} + + From 72dad217f17ac55d5944e7a2065c086e36675fa6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 20:10:04 +0800 Subject: [PATCH 128/170] =?UTF-8?q?/personalcenter/editinfo=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=8F=82idNum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/EditInfoFormDTO.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java index 81bd8e9082..a4565ffc6d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java @@ -36,6 +36,12 @@ public class EditInfoFormDTO implements Serializable { */ @NotBlank(message = "名不能为空") private String name; + + //@NotBlank(message = "身份证号不能为空") + //@Length(max=18,message = "身份证号不能超过18位") + //别的小程序不统一升级,没办法限制必填。 + private String idNum; + /** * 路牌号 */ From f30e11175152933484b74bc8a0919a01baf1c1c2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 20:48:12 +0800 Subject: [PATCH 129/170] =?UTF-8?q?api/resi/mine/mine/profile=E8=BF=94?= =?UTF-8?q?=E5=8F=82=E5=A2=9E=E5=8A=A0completeIdNum=EF=BC=9Atrue:=E5=B7=B2?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7=EF=BC=9B?= =?UTF-8?q?false=EF=BC=9A=E6=9C=AA=E5=AE=8C=E5=96=84=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E5=8F=B7=E3=80=82=20=E5=8F=AA=E6=9C=89registerFlag=3D?= =?UTF-8?q?true&&completeIdNum=3Dfalse=E6=97=B6=E6=89=8D=E6=8F=90=E9=86=92?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AE=8C=E5=96=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/MyResiUserInfoResultDTO.java | 4 ++++ .../main/java/com/epmet/dto/result/MyselfMsgResultDTO.java | 4 ++++ .../src/main/java/com/epmet/service/impl/UserServiceImpl.java | 2 ++ .../epmet-user-server/src/main/resources/mapper/UserDao.xml | 3 ++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java index 5b26ee9150..a81e542024 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java @@ -22,6 +22,10 @@ public class MyResiUserInfoResultDTO implements Serializable { * 是否已注册居民,true ,false * */ private Boolean registerFlag; + /** + * 是否录入身份证号,true ,false + * */ + private Boolean completeIdNum; /** * 微信昵称,可为空“” * */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyselfMsgResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyselfMsgResultDTO.java index b46c665dfc..cb15d9440b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyselfMsgResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyselfMsgResultDTO.java @@ -38,4 +38,8 @@ public class MyselfMsgResultDTO implements Serializable { * */ private String gridId; + /** + * 身份证号 + * */ + private String idNum; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java index 6c56b705a8..fee82e7839 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java @@ -183,6 +183,8 @@ public class UserServiceImpl extends BaseServiceImpl implem MyResiUserInfoResultDTO result = ConvertUtils.sourceToTarget(myselfMsg,MyResiUserInfoResultDTO.class); //registerFlag 是否已注册居民,true ,false result.setRegisterFlag(StringUtils.isNotBlank(myselfMsg.getResiId())); + // 已录入身份证号:true;未完善:false. + result.setCompleteIdNum(StringUtils.isNotBlank(myselfMsg.getIdNum())); result.setRegisterGridName(ModuleConstant.EMPTY_STR); if(StringUtils.isNotBlank(myselfMsg.getGridId())){ //registerGridName 当前在哪个网格,显示哪个网格的名称 diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml index bbdaf024ba..6d82e4c200 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml @@ -34,7 +34,8 @@ IFNULL(wechat.NICKNAME,"") AS nickName, IFNULL(resi.ID,"") AS resiId, IFNULL(CONCAT(resi.SURNAME,resi.NAME),"") AS userRealName, - IFNULL(relation.GRID_ID,"") AS gridId + IFNULL(relation.GRID_ID,"") AS gridId, + IFNULL(resi.id_num,'')AS idNum FROM USER user LEFT JOIN From b62ef09e0246d0be93be5931cbe03ab69a962f18 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 21:24:53 +0800 Subject: [PATCH 130/170] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=85=9A=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=87=AA=E5=8A=A8=E6=B3=A8=E5=86=8C=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=A2=9E=E5=8A=A0=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PartyMemberServiceImpl.java | 1 - .../impl/PartyMemberConfirmServiceImpl.java | 4 ++- .../service/impl/UserResiInfoServiceImpl.java | 27 ++++++++++--------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java index 447055431a..1cc431a9b3 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberServiceImpl.java @@ -10,7 +10,6 @@ import com.epmet.resi.mine.dto.from.PartyMemberSubmitFromDTO; import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; -import org.apache.poi.ss.formula.constant.ErrorConstant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java index 502a520dc3..ae67b95ebf 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java @@ -580,6 +580,8 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService userResiInfoDTO.setDistrict(partyMemberInfoDTO.getEstate()); userResiInfoDTO.setBuildingAddress(partyMemberInfoDTO.getBuilding()); userResiInfoDTO.setCustomerId(partyMemberInfoDTO.getCustomerId()); + //注册居民需要录入身份证号 + userResiInfoDTO.setIdNum(partyMemberInfoDTO.getIdCard()); Result result = epmetUserFeignClient.saveResiInfo(userResiInfoDTO); log.info("isResiRegister epmetUserFeignClient.saveResiInfo result:{}",JSON.toJSONString(result)); if (!result.success()){ @@ -608,7 +610,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService /** - * 保存或者更新热心居民申请行为记录表 + * 保存或者更新党员认证行为记录表 * * @param visitId 主键 * @param fromDTO 参数 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index 9da7ccac80..cede578427 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -221,7 +221,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO) { - throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); } } userResiRegisterVisitService.updateResiRegisterVisit(true, userResiInfoDTO); @@ -303,24 +303,25 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl 0) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); + } + //居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一 + registerRelationService.saveRegisterRelation(userResiInfoDTO); + //数据存入居民注册表 + saveUserResiInfo(userResiInfoDTO); /* //将用户于居民角色关联 saveUserResiInfo已包含 UserRoleDTO userRole = new UserRoleDTO(); userRole.setUserId(userResiInfoDTO.getUserId()); userRole.setRoleKey(UserConstant.ROLE_RESI); userRole.setApp(userResiInfoDTO.getApp()); userRoleService.saveUserRole(userRole);*/ - //更新该用户在该客户下的注册状态 - userCustomerDao.updateRegistered(userResiInfoDTO.getCustomerId(), userResiInfoDTO.getUserId()); - }else{ - log.warn("手机号客户内不可用,没有更新用户信息,param:{}", JSON.toJSONString(userResiInfoDTO)); - throw new RenException(EpmetErrorCode.THE_MOBILE_HAS_BEEN_USED.getCode(),EpmetErrorCode.THE_MOBILE_HAS_BEEN_USED.getMsg()); - } - + //更新该用户在该客户下的注册状态 + userCustomerDao.updateRegistered(userResiInfoDTO.getCustomerId(), userResiInfoDTO.getUserId()); return result; } From d34a34ef129205e78c43d8b135c2cc65dbc6d166 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 21:50:05 +0800 Subject: [PATCH 131/170] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E5=8F=B7=E6=89=BE=E4=BA=BA=EF=BC=9A/epmetuser/user/fi?= =?UTF-8?q?nduser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/ResiUserFormDTO.java | 18 +++++++++++++++ .../com/epmet/dto/result/ResiUserResDTO.java | 15 ++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 ++++++++ .../EpmetUserOpenFeignClientFallback.java | 11 +++++++++ .../com/epmet/controller/UserController.java | 13 +++++++++++ .../java/com/epmet/dao/IcResiUserDao.java | 2 ++ .../java/com/epmet/dao/UserBaseInfoDao.java | 2 ++ .../java/com/epmet/dao/UserResiInfoDao.java | 2 ++ .../com/epmet/service/IcResiUserService.java | 9 ++++++++ .../epmet/service/UserBaseInfoService.java | 2 ++ .../java/com/epmet/service/UserService.java | 9 ++++++++ .../service/impl/IcResiUserServiceImpl.java | 14 +++++++++-- .../service/impl/UserBaseInfoServiceImpl.java | 5 ++++ .../epmet/service/impl/UserServiceImpl.java | 23 ++++++++++++++++++- .../main/resources/mapper/IcResiUserDao.xml | 11 +++++++++ .../main/resources/mapper/UserBaseInfoDao.xml | 9 ++++++++ .../main/resources/mapper/UserResiInfoDao.xml | 11 +++++++++ 17 files changed, 162 insertions(+), 3 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java new file mode 100644 index 0000000000..129385a187 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class ResiUserFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + @NotBlank(message = "身份证号不能为空", groups = AddUserInternalGroup.class) + private String idNum; + + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java new file mode 100644 index 0000000000..3d0679b9d4 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result; + +import com.epmet.dto.form.ResiUserFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class ResiUserResDTO implements Serializable { + private String idNum; + private String customerId; + private String epmetUserId; + private String icResiUserId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 4e9b5f9d0e..c3841b37b2 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -660,4 +660,13 @@ public interface EpmetUserOpenFeignClient { **/ @PostMapping(value = "epmetuser/customerstaff/getbyrealnames") Result> getByRealNames(@RequestBody GetByRealNamesFormDTO formDTO); + + /** + * 根据身份证号找人 + * + * @param formDTO + * @return + */ + @PostMapping(value = "/epmetuser/user/finduser") + Result findUser(@RequestBody ResiUserFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 0a4d2c41d4..004df9ca5b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -479,4 +479,15 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result> getByRealNames(GetByRealNamesFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getByRealNames", formDTO); } + + /** + * 根据身份证号找人 + * + * @param formDTO + * @return + */ + @Override + public Result findUser(ResiUserFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "findUser", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index f1cbcb114a..de10f4a695 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -185,4 +185,17 @@ public class UserController { } return new Result().ok(userService.queryUserClient(userId)); } + + /** + * 根据身份证号找人 + * + * + * @param formDTO + * @return + */ + @PostMapping("finduser") + public Result findUser(@RequestBody ResiUserFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,ResiUserFormDTO.AddUserInternalGroup.class); + return new Result().ok(userService.findUser(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index dfc0cdae15..fe13a9d010 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -162,4 +162,6 @@ public interface IcResiUserDao extends BaseDao { List selectDemandUsers(@Param("agencyId") String agencyId, @Param("gridId")String gridId, @Param("name")String name); + + String selectIdByIdCard(@Param("customerId") String customerId, @Param("idNum")String idNum); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java index 6fdd2f931f..fc1e1b35a8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java @@ -80,4 +80,6 @@ public interface UserBaseInfoDao extends BaseDao { * @date 2020.07.30 19:16 **/ String selectIdByUserId(@Param("userId") String userId); + + String selectUserId(@Param("customerId") String customerId, @Param("idNum")String idNum); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java index 997a615fab..0d8b949596 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java @@ -103,4 +103,6 @@ public interface UserResiInfoDao extends BaseDao { * @return */ Integer selectCountByIdNum(@Param("idNum") String idNum,@Param("customerId") String customerId); + + String selectByIdNum(@Param("customerId") String customerId, @Param("idNum")String idNum); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 2b88399eab..a21e7a1aa5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -141,4 +141,13 @@ public interface IcResiUserService extends BaseService { List listFormItems(String customerId, String formCode); List queryDemandUsers(DemandUserFormDTO formDTO); + + /** + * 返回ic_resi_user.id + * + * @param customerId + * @param idNum + * @return + */ + String getByIdCard(String customerId, String idNum); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java index 531213863d..f0fa310d45 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java @@ -189,4 +189,6 @@ public interface UserBaseInfoService extends BaseService { * @date 2020.08.21 17:16 **/ ExtUserInfoResultDTO extUserInfo(CommonUserIdFormDTO param); + + String getUserIdByIdNum(String customerId, String idNum); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java index 33e7b1c7ad..2157dd6db0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java @@ -104,4 +104,13 @@ public interface UserService extends BaseService { * @date 2021/9/10 8:50 上午 */ UserDTO queryUserClient(String userId); + + /** + * 根据身份证号找人 + * + * + * @param formDTO + * @return + */ + ResiUserResDTO findUser(ResiUserFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 841f01ce34..3191bb3927 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -21,7 +21,6 @@ import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.rocketmq.messages.IcResiUserAddMQMsg; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; @@ -47,7 +46,6 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.IcPlatformConstant; import com.epmet.constant.IcResiUserConstant; -import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserConstant; import com.epmet.dao.IcResiUserDao; import com.epmet.dto.*; @@ -852,4 +850,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl queryDemandUsers(DemandUserFormDTO formDTO) { return baseDao.selectDemandUsers(formDTO.getAgencyId(),formDTO.getGridId(),formDTO.getName()); } + + /** + * 返回ic_resi_user.id + * + * @param customerId + * @param idNum + * @return + */ + @Override + public String getByIdCard(String customerId, String idNum) { + return baseDao.selectIdByIdCard(customerId,idNum); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index 0f4d76d821..c762450689 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -442,4 +442,9 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl implem private EpmetPointOpenFeignClient epmetPointOpenFeignClient; @Autowired private UserResiInfoDao userResiInfoDao; - + @Autowired + private IcResiUserService icResiUserService; private static final Logger log = LoggerFactory.getLogger(UserServiceImpl.class); @@ -344,4 +346,23 @@ public class UserServiceImpl extends BaseServiceImpl implem return baseDao.selectByUserId(userId); } + /** + * 根据身份证号找人 + * + * @param formDTO + * @return + */ + @Override + public ResiUserResDTO findUser(ResiUserFormDTO formDTO) { + ResiUserResDTO resiUserResDTO = ConvertUtils.sourceToTarget(formDTO, ResiUserResDTO.class); + String icResiUserId = icResiUserService.getByIdCard(formDTO.getCustomerId(), formDTO.getIdNum()); + resiUserResDTO.setIcResiUserId(icResiUserId); + String userId = userBaseInfoService.getUserIdByIdNum(formDTO.getCustomerId(), formDTO.getIdNum()); + if (StringUtils.isBlank(userId)) { + resiUserResDTO.setEpmetUserId(userResiInfoDao.selectByIdNum(formDTO.getCustomerId(), formDTO.getIdNum())); + } + resiUserResDTO.setEpmetUserId(userId); + return resiUserResDTO; + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 2278cf515a..df41841400 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -308,4 +308,15 @@ ORDER BY CONVERT ( ir.NAME USING gbk ) ASC + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml index 8c664e678e..7ff2110cc1 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml @@ -120,4 +120,13 @@ WHERE DEL_FLAG = '0' AND USER_ID = #{userId} + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index 0c4738a565..3c821c48c8 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -186,4 +186,15 @@ AND uri.id_num = #{idNum} and uri.customer_id=#{customerId} + + From 95a564b77b10ce55cf6846ab146237a4b9e2eccd Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 22:19:58 +0800 Subject: [PATCH 132/170] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E5=8F=B7=E6=89=BE=E4=BA=BA=EF=BC=9A/epmetuser/user/fi?= =?UTF-8?q?nduser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/ResiUserFormDTO.java | 9 ++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 2 +- .../com/epmet/controller/UserController.java | 2 +- .../java/com/epmet/dao/IcResiUserDao.java | 4 +- .../java/com/epmet/dao/UserBaseInfoDao.java | 5 ++- .../java/com/epmet/dao/UserResiInfoDao.java | 4 +- .../com/epmet/service/IcResiUserService.java | 3 +- .../epmet/service/UserBaseInfoService.java | 2 +- .../service/impl/IcResiUserServiceImpl.java | 7 ++- .../service/impl/UserBaseInfoServiceImpl.java | 7 ++- .../epmet/service/impl/UserServiceImpl.java | 44 ++++++++++++++----- .../main/resources/mapper/IcResiUserDao.xml | 11 +++-- .../main/resources/mapper/UserBaseInfoDao.xml | 11 +++-- .../main/resources/mapper/UserResiInfoDao.xml | 11 +++-- 14 files changed, 90 insertions(+), 32 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java index 129385a187..9e9d6da69a 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java @@ -5,6 +5,9 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; +/** + * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId + */ @Data public class ResiUserFormDTO implements Serializable { public interface AddUserInternalGroup { @@ -15,4 +18,10 @@ public class ResiUserFormDTO implements Serializable { @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) private String customerId; + + private String epmetUserId; + private String icResiUserId; + + //@NotBlank(message = "findType不能为空;根据身份证号:byIdNum;根据ic居民:byIc;根据小程序里的居民:byEpmetUser", groups = AddUserInternalGroup.class) + //private String findType; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index c3841b37b2..3d04463256 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -662,7 +662,7 @@ public interface EpmetUserOpenFeignClient { Result> getByRealNames(@RequestBody GetByRealNamesFormDTO formDTO); /** - * 根据身份证号找人 + * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId * * @param formDTO * @return diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index de10f4a695..5d0f66d698 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -187,7 +187,7 @@ public class UserController { } /** - * 根据身份证号找人 + * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId * * * @param formDTO diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index fe13a9d010..ea5ca5b741 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -163,5 +163,7 @@ public interface IcResiUserDao extends BaseDao { @Param("gridId")String gridId, @Param("name")String name); - String selectIdByIdCard(@Param("customerId") String customerId, @Param("idNum")String idNum); + IcResiUserDTO selectIdByIdCard(@Param("customerId") String customerId, + @Param("idNum")String idNum, + @Param("icResiUserId")String icResiUserId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java index fc1e1b35a8..c44ea90420 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.UserWechatResultDTO; @@ -81,5 +82,7 @@ public interface UserBaseInfoDao extends BaseDao { **/ String selectIdByUserId(@Param("userId") String userId); - String selectUserId(@Param("customerId") String customerId, @Param("idNum")String idNum); + UserBaseInfoDTO selectUserId(@Param("customerId") String customerId, + @Param("idNum")String idNum, + @Param("userId")String userId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java index 0d8b949596..31f4625abf 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java @@ -104,5 +104,7 @@ public interface UserResiInfoDao extends BaseDao { */ Integer selectCountByIdNum(@Param("idNum") String idNum,@Param("customerId") String customerId); - String selectByIdNum(@Param("customerId") String customerId, @Param("idNum")String idNum); + UserResiInfoDTO selectByIdNum(@Param("customerId") String customerId, + @Param("idNum")String idNum, + @Param("userId")String userId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index a21e7a1aa5..9a0fcbed95 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; @@ -149,5 +150,5 @@ public interface IcResiUserService extends BaseService { * @param idNum * @return */ - String getByIdCard(String customerId, String idNum); + IcResiUserDTO getByIdCard(String customerId, String idNum,String icResiUserId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java index f0fa310d45..164a222894 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java @@ -190,5 +190,5 @@ public interface UserBaseInfoService extends BaseService { **/ ExtUserInfoResultDTO extUserInfo(CommonUserIdFormDTO param); - String getUserIdByIdNum(String customerId, String idNum); + UserBaseInfoDTO getUserIdByIdNum(String customerId, String idNum,String userId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 3191bb3927..9510a50fe2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -859,7 +859,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl implem } /** - * 根据身份证号找人 + * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId * * @param formDTO * @return */ @Override public ResiUserResDTO findUser(ResiUserFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getIdNum()) && StringUtils.isBlank(formDTO.getEpmetUserId()) && StringUtils.isBlank(formDTO.getIcResiUserId())) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),"身份证号、epmetuserId、icResiUserId至少输入一个","至少选择一种查询方式"); + } ResiUserResDTO resiUserResDTO = ConvertUtils.sourceToTarget(formDTO, ResiUserResDTO.class); - String icResiUserId = icResiUserService.getByIdCard(formDTO.getCustomerId(), formDTO.getIdNum()); - resiUserResDTO.setIcResiUserId(icResiUserId); - String userId = userBaseInfoService.getUserIdByIdNum(formDTO.getCustomerId(), formDTO.getIdNum()); - if (StringUtils.isBlank(userId)) { - resiUserResDTO.setEpmetUserId(userResiInfoDao.selectByIdNum(formDTO.getCustomerId(), formDTO.getIdNum())); + //可以根据身份证号查询,也可以根据ic_resi_user.id查询 + if (StringUtils.isBlank(formDTO.getIcResiUserId())) { + IcResiUserDTO icResiUser = icResiUserService.getByIdCard(formDTO.getCustomerId(), formDTO.getIdNum(), formDTO.getIcResiUserId()); + resiUserResDTO.setIcResiUserId(null != icResiUser ? icResiUser.getId() : StrConstant.EPMETY_STR); + resiUserResDTO.setIdNum(null != icResiUser ? icResiUser.getIdCard() : StrConstant.EPMETY_STR); + } + //可以根据身份证号查询,也可以根据epmet_user.user.id查询 + if (StringUtils.isBlank(formDTO.getEpmetUserId())) { + UserBaseInfoDTO userBaseInfoDTO = userBaseInfoService.getUserIdByIdNum(formDTO.getCustomerId(), + formDTO.getIdNum(), + formDTO.getEpmetUserId()); + if (null == userBaseInfoDTO || StringUtils.isBlank(userBaseInfoDTO.getUserId())) { + log.info("user_base_info没有找到,去查下user_resi_info表吧"); + UserResiInfoDTO userResiInfoDTO = userResiInfoDao.selectByIdNum(formDTO.getCustomerId(), + formDTO.getIdNum(), + formDTO.getEpmetUserId()); + resiUserResDTO.setEpmetUserId(null != userResiInfoDTO ? userResiInfoDTO.getId() : StrConstant.EPMETY_STR); + } else { + resiUserResDTO.setEpmetUserId(userBaseInfoDTO.getUserId()); + } } - resiUserResDTO.setEpmetUserId(userId); return resiUserResDTO; } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index df41841400..e7c9de9224 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -309,14 +309,19 @@ CONVERT ( ir.NAME USING gbk ) ASC - select - ir.id + ir.* FROM ic_resi_user ir WHERE ir.DEL_FLAG = '0' and ir.customer_id=#{customerId} - and ir.ID_CARD=#{idNum} + + and ir.ID_CARD=#{idNum} + + + and ir.id=#{icResiUserId} + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml index 7ff2110cc1..521bba1169 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml @@ -121,12 +121,17 @@ AND USER_ID = #{userId} - SELECT - distinct user_id + * FROM user_base_info WHERE DEL_FLAG = '0' AND customer_id = #{=customerId} - and id_num=#{idNum} + + and id_num=#{idNum} + + + and user_id=#{userId} + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index 3c821c48c8..c0bc153d95 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -187,14 +187,19 @@ and uri.customer_id=#{customerId} - SELECT - distinct uri.user_id + uri.* FROM user_resi_info uri WHERE uri.DEL_FLAG = '0' - AND uri.id_num = #{idNum} and uri.customer_id=#{customerId} + + AND uri.id_num = #{idNum} + + + and uri.user_id=#{userId} + From 7130b6cfbde333c426692b067710ccd449d9e24d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 22:31:21 +0800 Subject: [PATCH 133/170] =?UTF-8?q?"mydemand"=E6=8E=A5=E5=8F=A3=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84=E6=98=AFPC=E5=BD=95=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E9=9C=80=E6=B1=82+=E5=B1=85=E6=B0=91=E7=AB=AF=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=94=A8=E6=88=B7=E8=87=AA=E5=B7=B1=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E7=9A=84=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/demand/IcResiUserDemandFromDTO.java | 5 +++++ .../service/impl/IcUserDemandRecServiceImpl.java | 12 ++++++++++++ .../src/main/resources/mapper/IcUserDemandRecDao.xml | 10 +++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java index 0b46c1ca4b..ad416293e9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java @@ -30,4 +30,9 @@ public class IcResiUserDemandFromDTO implements Serializable { @NotBlank(message = "tokenDto获取客户id不能为空", groups = AddUserInternalGroup.class) private String customerId; + + /** + * 代码内自己查询的参数,赋值到此属性 + */ + private String epmetUserId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index e3b6d48d4d..29f1c20143 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -40,8 +40,10 @@ import com.epmet.dao.IcUserDemandServiceDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.CustomerGridFormDTO; +import com.epmet.dto.form.ResiUserFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.AllGridsByUserIdResultDTO; +import com.epmet.dto.result.ResiUserResDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; @@ -465,6 +467,16 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl queryMyDemand(IcResiUserDemandFromDTO formDTO) { + //1、查询当前居民在小程序里是否有用户id + ResiUserFormDTO resiUserFormDTO=new ResiUserFormDTO(); + resiUserFormDTO.setCustomerId(formDTO.getCustomerId()); + resiUserFormDTO.setIcResiUserId(formDTO.getUserId()); + Result userRes=epmetUserOpenFeignClient.findUser(resiUserFormDTO); + if(!userRes.success()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"/epmetuser/user/finduser接口异常","查找居民端小程序用户信息异常"); + } + formDTO.setEpmetUserId(userRes.getData().getEpmetUserId()); + //2、小程序内自己上报+赋能平台待录入的 PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectUserDemand(formDTO)); List list = pageInfo.getList(); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 4681fbdbe3..c2f1298b2c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -134,7 +134,15 @@ ic_user_demand_rec r WHERE r.DEL_FLAG = '0' - AND r.DEMAND_USER_ID = #{userId} + + + AND (r.DEMAND_USER_ID = #{userId} or r.DEMAND_USER_ID=#{epmetUserId}) + + + AND r.DEMAND_USER_ID = #{userId} + + + and r.CATEGORY_CODE like concat(#{firstCategoryCode},'%') From e542453c1046bf2e9337527de31a766b191e603d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 6 Dec 2021 22:31:49 +0800 Subject: [PATCH 134/170] =?UTF-8?q?"mydemand"=E6=8E=A5=E5=8F=A3=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84=E6=98=AFPC=E5=BD=95=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E9=9C=80=E6=B1=82+=E5=B1=85=E6=B0=91=E7=AB=AF=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=94=A8=E6=88=B7=E8=87=AA=E5=B7=B1=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E7=9A=84=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/IcUserDemandRecDao.xml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index c2f1298b2c..8aed916dee 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -134,15 +134,14 @@ ic_user_demand_rec r WHERE r.DEL_FLAG = '0' - - - AND (r.DEMAND_USER_ID = #{userId} or r.DEMAND_USER_ID=#{epmetUserId}) - - - AND r.DEMAND_USER_ID = #{userId} - - - + + + AND (r.DEMAND_USER_ID = #{userId} or r.DEMAND_USER_ID=#{epmetUserId}) + + + AND r.DEMAND_USER_ID = #{userId} + + and r.CATEGORY_CODE like concat(#{firstCategoryCode},'%') From 745d249f47a8dc001ab8a44f947c84d346c8c7ec Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Dec 2021 08:04:29 +0800 Subject: [PATCH 135/170] =?UTF-8?q?"finduser"3=E8=80=85=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/ResiUserFormDTO.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java index 9e9d6da69a..c6341dd565 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java @@ -13,15 +13,24 @@ public class ResiUserFormDTO implements Serializable { public interface AddUserInternalGroup { } - @NotBlank(message = "身份证号不能为空", groups = AddUserInternalGroup.class) + /** + * 身份证号 + */ private String idNum; - @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) - private String customerId; - + /** + * epemt_user.user.id + */ private String epmetUserId; + + /** + * ic_resi_user.id + */ private String icResiUserId; + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + //@NotBlank(message = "findType不能为空;根据身份证号:byIdNum;根据ic居民:byIc;根据小程序里的居民:byEpmetUser", groups = AddUserInternalGroup.class) //private String findType; } From 42c88be18404788dd74f4033dfeef07aaa2023a9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Dec 2021 08:14:02 +0800 Subject: [PATCH 136/170] =?UTF-8?q?=E4=BF=AE=E6=94=B9"persondata"=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=8F=82=E6=96=B0=E5=A2=9EepmetUserId?= =?UTF-8?q?=EF=BC=8CicResiUserId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/PersonDataFormDTO.java | 4 ++++ .../com/epmet/dto/result/PersonDataResultDTO.java | 11 ++++++++++- .../com/epmet/controller/IcResiUserController.java | 4 +++- .../com/epmet/service/impl/IcResiUserServiceImpl.java | 11 +++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonDataFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonDataFormDTO.java index 52d96870a2..e2355d145a 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonDataFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonDataFormDTO.java @@ -19,4 +19,8 @@ public class PersonDataFormDTO implements Serializable { @NotBlank(message = "userId不能为空",groups = PersonDataForm.class) private String userId; + + + @NotBlank(message = "tokenDto获取customerId不能为空",groups = PersonDataForm.class) + private String customerId; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java index 6a89bb2037..3d1334d249 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java @@ -7,7 +7,6 @@ import lombok.Data; import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * @Author zxc @@ -19,6 +18,16 @@ public class PersonDataResultDTO implements Serializable { private static final long serialVersionUID = 5210308218052783909L; + /** + * epemt_user.user.id + */ + private String epmetUserId; + + /** + * ic_resi_user.id + */ + private String icResiUserId; + /** * 工作单位 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index f5720acd39..d6df9f57e0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -426,7 +426,9 @@ public class IcResiUserController { * @date 2021/11/3 9:21 上午 */ @PostMapping("persondata") - public Result personData(@RequestBody PersonDataFormDTO formDTO) { + public Result personData(@LoginUser TokenDto tokenDto,@RequestBody PersonDataFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,PersonDataFormDTO.PersonDataForm.class); return new Result().ok(icResiUserService.personData(formDTO)); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 9510a50fe2..a78ec9c296 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -59,6 +59,7 @@ import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.IcResiUserService; +import com.epmet.service.UserService; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -99,6 +100,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); @@ -528,6 +531,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> listResult = govOrgOpenFeignClient.selectHouseInfoByIdCard(personData.getIdCard()); if (!listResult.success()){ From f74c0ace18e83cc2a62acd792412d871a94abad4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Dec 2021 08:18:36 +0800 Subject: [PATCH 137/170] =?UTF-8?q?=E4=BF=AE=E6=94=B9""mydemand""=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=85=A5=E5=8F=82=E6=96=B0=E5=A2=9EepmetUserId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/demand/IcResiUserDemandFromDTO.java | 11 ++++++----- .../service/impl/IcUserDemandRecServiceImpl.java | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java index ad416293e9..51d334d874 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java @@ -17,12 +17,17 @@ public class IcResiUserDemandFromDTO implements Serializable { */ @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) private String userId; + + /** + * icresiuser/persondata接口返参中有此值 + */ + private String epmetUserId; + @NotNull(message = "pageNo不能为空", groups = AddUserInternalGroup.class) private Integer pageNo; @NotNull(message = "pageSize不能为空", groups = AddUserInternalGroup.class) private Integer pageSize; - /** * 研判分析界面,查看同类型的需求可以用此接口,只需传入分类编码 */ @@ -31,8 +36,4 @@ public class IcResiUserDemandFromDTO implements Serializable { @NotBlank(message = "tokenDto获取客户id不能为空", groups = AddUserInternalGroup.class) private String customerId; - /** - * 代码内自己查询的参数,赋值到此属性 - */ - private String epmetUserId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 29f1c20143..0693b7ec7b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -40,10 +40,8 @@ import com.epmet.dao.IcUserDemandServiceDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.CustomerGridFormDTO; -import com.epmet.dto.form.ResiUserFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.AllGridsByUserIdResultDTO; -import com.epmet.dto.result.ResiUserResDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; @@ -467,7 +465,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl queryMyDemand(IcResiUserDemandFromDTO formDTO) { - //1、查询当前居民在小程序里是否有用户id + /*//1、查询当前居民在小程序里是否有用户id ResiUserFormDTO resiUserFormDTO=new ResiUserFormDTO(); resiUserFormDTO.setCustomerId(formDTO.getCustomerId()); resiUserFormDTO.setIcResiUserId(formDTO.getUserId()); @@ -475,7 +473,9 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectUserDemand(formDTO)); From f2a05962feff997a894e76c69ce09fbc5b4ee88f Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Dec 2021 09:44:12 +0800 Subject: [PATCH 138/170] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/CustomerGridFormDTO.java | 5 +++-- .../java/com/epmet/controller/CustomerGridController.java | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridFormDTO.java index c34d3c5870..1949f6d8a8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridFormDTO.java @@ -31,11 +31,12 @@ import java.io.Serializable; public class CustomerGridFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** * 网格Id */ - @NotBlank(message = "网格ID不能为空") + @NotBlank(message = "网格ID不能为空", groups = {Grid.class}) private String gridId; + public interface Grid{} + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java index 2780e25b56..0b58b4d6f0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java @@ -103,6 +103,7 @@ public class CustomerGridController { */ @PostMapping("getcustomergridbygridid") public Result getCustomerGridByGridId(@RequestBody CustomerGridFormDTO customerGridFormDTO) { + ValidatorUtils.validateEntity(customerGridFormDTO, CustomerGridFormDTO.Grid.class); return customerGridService.getCustomerGridByGridId(customerGridFormDTO); } From a364a1fbb7831234816ac5441c9bb8d09b7f3eb9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 7 Dec 2021 13:49:27 +0800 Subject: [PATCH 139/170] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E7=BB=84=E7=BB=87=E7=BB=8F=E7=BA=AC=E5=BA=A6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=88=99=E5=8E=BB=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=A0=B9=E7=BB=84=E7=BB=87=E7=BB=8F=E7=BA=AC=E5=BA=A6?= =?UTF-8?q?=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/CustomerStaffInfoCacheResult.java | 16 +++++++++++++++ .../result/CustomerStaffResultDTO.java | 20 +++++++++++++++++++ .../dto/govorg/CustomerAgencyDTO.java | 15 ++++++++++++++ .../epmetuser/impl/EpmetUserServiceImpl.java | 3 +++ .../mapper/govorg/CustomerStaffAgencyDao.xml | 18 ++++++++++++++++- .../dto/result/StaffBasicInfoResultDTO.java | 16 +++++++++++++++ .../impl/CustomerStaffServiceImpl.java | 3 +++ 7 files changed, 90 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/CustomerStaffInfoCacheResult.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/CustomerStaffInfoCacheResult.java index c5db9c6718..81c74a4c38 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/CustomerStaffInfoCacheResult.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/CustomerStaffInfoCacheResult.java @@ -93,4 +93,20 @@ public class CustomerStaffInfoCacheResult implements Serializable { */ private List deptList; + /** + * 组织级别 + */ + private String level; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java index a03406f0d0..3269ebcb26 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java @@ -93,4 +93,24 @@ public class CustomerStaffResultDTO implements Serializable { */ private String twoOrgName; + /** + * 【社区】名称0409 + */ + private String community; + + /** + * 组织级别 + */ + private String level; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java index 496a2c87cc..7c343c5ccc 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java @@ -142,4 +142,19 @@ public class CustomerAgencyDTO implements Serializable { * 社区 */ private String community; + + /** + * 坐标 + */ + private String coordinates; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java index 6315daf303..50221188f9 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java @@ -602,6 +602,9 @@ public class EpmetUserServiceImpl implements EpmetUserService { result.setAgencyId(agencyDTO.getId()); result.setAgencyName(agencyDTO.getOrganizationName()); result.setAgencyPIds(agencyDTO.getPids()); + result.setLevel(agencyDTO.getLevel()); + result.setLongitude(agencyDTO.getLongitude()); + result.setLatitude(agencyDTO.getLatitude()); StaffOrgRelationResultDTO fromOrgTypeDto = govOrgService.getStaffFromOrgType(staffId); String fromOrgType = OrgTypeEnum.AGENCY.getCode(); if (fromOrgTypeDto != null){ diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml index 55c4d7789c..4016ac6385 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml @@ -26,7 +26,23 @@ ca.organization_name, ca.level, ca.area_code, - ca.parent_area_code + ca.parent_area_code, + ( CASE WHEN ca.longitude is THEN + ( SELECT longitude FROM customer_agency + WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) + ORDER BY pid ASC LIMIT 1 + ) + ELSE ca.longitude + END + ) longitude, + ( CASE WHEN ca.latitude is null THEN + ( SELECT latitude FROM customer_agency + WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) + ORDER BY pid ASC LIMIT 1 + ) + ELSE ca.latitude + END + ) latitude FROM customer_staff_agency csa INNER JOIN customer_agency ca ON csa.agency_id = ca.id diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java index c861899ccb..f981a68f8b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java @@ -77,4 +77,20 @@ public class StaffBasicInfoResultDTO implements Serializable { */ private String agencyName; + /** + * 组织级别 + */ + private String level; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 87ea5b411b..648c0e8245 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -717,6 +717,9 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl().ok(resultDTO); From 02c7efe32934685fd1a2f92a15ac6f59ef8cabc8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Dec 2021 14:11:55 +0800 Subject: [PATCH 140/170] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E5=8F=B7||ic=5Fresi=5Fuser.id=E6=89=BE=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E7=AB=AF=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=87=8C=E7=9A=84?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/ResiUserFormDTO.java | 10 +----- .../epmet/feign/EpmetUserOpenFeignClient.java | 6 ++-- .../EpmetUserOpenFeignClientFallback.java | 6 ++-- .../com/epmet/controller/UserController.java | 8 ++--- .../java/com/epmet/service/UserService.java | 4 +-- .../service/impl/IcResiUserServiceImpl.java | 4 ++- .../epmet/service/impl/UserServiceImpl.java | 31 +++++++++---------- 7 files changed, 31 insertions(+), 38 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java index c6341dd565..e8b62f166a 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiUserFormDTO.java @@ -6,7 +6,7 @@ import javax.validation.constraints.NotBlank; import java.io.Serializable; /** - * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId + * 根据身份证号||ic_resi_user.id找居民端小程序里的人 */ @Data public class ResiUserFormDTO implements Serializable { @@ -18,11 +18,6 @@ public class ResiUserFormDTO implements Serializable { */ private String idNum; - /** - * epemt_user.user.id - */ - private String epmetUserId; - /** * ic_resi_user.id */ @@ -30,7 +25,4 @@ public class ResiUserFormDTO implements Serializable { @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) private String customerId; - - //@NotBlank(message = "findType不能为空;根据身份证号:byIdNum;根据ic居民:byIc;根据小程序里的居民:byEpmetUser", groups = AddUserInternalGroup.class) - //private String findType; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 3d04463256..ff3b7ffc1c 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -662,11 +662,11 @@ public interface EpmetUserOpenFeignClient { Result> getByRealNames(@RequestBody GetByRealNamesFormDTO formDTO); /** - * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId + * 根据身份证号||ic_resi_user.id找居民端小程序里的人 * * @param formDTO * @return */ - @PostMapping(value = "/epmetuser/user/finduser") - Result findUser(@RequestBody ResiUserFormDTO formDTO); + @PostMapping(value = "/epmetuser/user/findepmetuser") + Result findEpmetUser(@RequestBody ResiUserFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 004df9ca5b..1eeca4cdd3 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -481,13 +481,13 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien } /** - * 根据身份证号找人 + * 根据身份证号||ic_resi_user.id找居民端小程序里的人 * * @param formDTO * @return */ @Override - public Result findUser(ResiUserFormDTO formDTO) { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "findUser", formDTO); + public Result findEpmetUser(ResiUserFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "findEpmetUser", formDTO); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index 5d0f66d698..66d5d15d7a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -187,15 +187,15 @@ public class UserController { } /** - * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId + * 根据身份证号||ic_resi_user.id找居民端小程序里的人 * * * @param formDTO * @return */ - @PostMapping("finduser") - public Result findUser(@RequestBody ResiUserFormDTO formDTO){ + @PostMapping("findepmetuser") + public Result findEpmetUser(@RequestBody ResiUserFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO,ResiUserFormDTO.AddUserInternalGroup.class); - return new Result().ok(userService.findUser(formDTO)); + return new Result().ok(userService.findEpmetUser(formDTO)); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java index 2157dd6db0..0790655742 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserService.java @@ -106,11 +106,11 @@ public interface UserService extends BaseService { UserDTO queryUserClient(String userId); /** - * 根据身份证号找人 + * 根据身份证号||ic_resi_user.id找居民端小程序里的人 * * * @param formDTO * @return */ - ResiUserResDTO findUser(ResiUserFormDTO formDTO); + ResiUserResDTO findEpmetUser(ResiUserFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index a78ec9c296..ed20fb2374 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -534,8 +534,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl implem } /** - * 根据身份证号找人,也可根据epmetUserId查询,或者icResiUserId + * 根据身份证号||ic_resi_user.id找居民端小程序里的人 * * @param formDTO * @return */ @Override - public ResiUserResDTO findUser(ResiUserFormDTO formDTO) { - if (StringUtils.isBlank(formDTO.getIdNum()) && StringUtils.isBlank(formDTO.getEpmetUserId()) && StringUtils.isBlank(formDTO.getIcResiUserId())) { - throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),"身份证号、epmetuserId、icResiUserId至少输入一个","至少选择一种查询方式"); - } - ResiUserResDTO resiUserResDTO = ConvertUtils.sourceToTarget(formDTO, ResiUserResDTO.class); - //可以根据身份证号查询,也可以根据ic_resi_user.id查询 - if (StringUtils.isBlank(formDTO.getIcResiUserId())) { - IcResiUserDTO icResiUser = icResiUserService.getByIdCard(formDTO.getCustomerId(), formDTO.getIdNum(), formDTO.getIcResiUserId()); - resiUserResDTO.setIcResiUserId(null != icResiUser ? icResiUser.getId() : StrConstant.EPMETY_STR); - resiUserResDTO.setIdNum(null != icResiUser ? icResiUser.getIdCard() : StrConstant.EPMETY_STR); + public ResiUserResDTO findEpmetUser(ResiUserFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getIdNum()) && StringUtils.isBlank(formDTO.getIcResiUserId())) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "身份证号、icResiUserId至少输入一个", "至少选择一种查询方式"); } //可以根据身份证号查询,也可以根据epmet_user.user.id查询 - if (StringUtils.isBlank(formDTO.getEpmetUserId())) { + if (StringUtils.isNotBlank(formDTO.getIcResiUserId()) && StringUtils.isBlank(formDTO.getIdNum())) { + IcResiUserDTO icResiUserDTO = icResiUserService.getByIdCard(formDTO.getCustomerId(), null, formDTO.getIcResiUserId()); + if (null == icResiUserDTO) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "根据ic_resi_user.id没有找到记录id=" + formDTO.getIcResiUserId(), "至少选择一种查询方式"); + } + formDTO.setIdNum(icResiUserDTO.getIdCard()); + } + ResiUserResDTO resiUserResDTO = ConvertUtils.sourceToTarget(formDTO, ResiUserResDTO.class); + if (StringUtils.isNotBlank(formDTO.getIdNum())) { UserBaseInfoDTO userBaseInfoDTO = userBaseInfoService.getUserIdByIdNum(formDTO.getCustomerId(), - formDTO.getIdNum(), - formDTO.getEpmetUserId()); + formDTO.getIdNum(), null); if (null == userBaseInfoDTO || StringUtils.isBlank(userBaseInfoDTO.getUserId())) { log.info("user_base_info没有找到,去查下user_resi_info表吧"); UserResiInfoDTO userResiInfoDTO = userResiInfoDao.selectByIdNum(formDTO.getCustomerId(), - formDTO.getIdNum(), - formDTO.getEpmetUserId()); + formDTO.getIdNum(), null); resiUserResDTO.setEpmetUserId(null != userResiInfoDTO ? userResiInfoDTO.getId() : StrConstant.EPMETY_STR); } else { resiUserResDTO.setEpmetUserId(userBaseInfoDTO.getUserId()); From 87dcd764158535276d3c1d86b99660f8417a8c7c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Dec 2021 14:21:34 +0800 Subject: [PATCH 141/170] sqlbugfix --- .../src/main/resources/mapper/UserBaseInfoDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml index 521bba1169..9d74f0d600 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml @@ -126,7 +126,7 @@ * FROM user_base_info WHERE DEL_FLAG = '0' - AND customer_id = #{=customerId} + AND customer_id = #{customerId} and id_num=#{idNum} From 45ef35eb0f71218ca6f2a00e20a59b81fbe1f57f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 7 Dec 2021 14:35:07 +0800 Subject: [PATCH 142/170] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E9=99=A4=E4=BA=86=E6=9C=AC=E4=BA=BA=E5=A4=96=EF=BC=8C?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=B7=B2=E8=A2=AB=E4=BD=BF=E7=94=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mine/service/impl/PersonalCenterServiceImpl.java | 1 + .../main/java/com/epmet/dto/form/EditInfoFormDTO.java | 6 ++++++ .../src/main/java/com/epmet/dao/UserResiInfoDao.java | 4 +++- .../epmet/service/impl/UserResiInfoServiceImpl.java | 10 ++++++++-- .../src/main/resources/mapper/UserResiInfoDao.xml | 3 +++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java index d3cf8a2a64..d60b177815 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java @@ -46,6 +46,7 @@ public class PersonalCenterServiceImpl implements PersonalCenterService { @Override public void editInfo(TokenDto tokenDto, EditInfoFormDTO formDTO) { formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); Result result = epmetUserOpenFeignClient.editUserInfo(formDTO); if (!result.success()) { throw new RenException(result.getCode(), result.getMsg()); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java index a4565ffc6d..d3a29103dc 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java @@ -60,4 +60,10 @@ public class EditInfoFormDTO implements Serializable { */ @NotBlank(message = "昵称不能为空") private String nickname; + + /** + * 当前客户id + */ + @NotBlank(message = "customerId不能为空") + private String customerId; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java index 31f4625abf..048b6d114b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java @@ -102,7 +102,9 @@ public interface UserResiInfoDao extends BaseDao { * @param idNum * @return */ - Integer selectCountByIdNum(@Param("idNum") String idNum,@Param("customerId") String customerId); + Integer selectCountByIdNum(@Param("idNum") String idNum, + @Param("customerId") String customerId, + @Param("excludeUserId")String excludeUserId); UserResiInfoDTO selectByIdNum(@Param("customerId") String customerId, @Param("idNum")String idNum, diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index cede578427..96ce44f847 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -220,7 +220,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + if (baseDao.selectCountByIdNum(userResiInfoDTO.getIdNum(), userResiInfoDTO.getCustomerId(),null) > NumConstant.ZERO) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); } } @@ -307,7 +307,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl 0) { + if (baseDao.selectCountByIdNum(userResiInfoDTO.getIdNum(), userResiInfoDTO.getCustomerId(),userResiInfoDTO.getUserId()) > 0) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); } //居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一 @@ -384,6 +384,12 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl0){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); + } + } //更新居民注册信息表 baseDao.updateByUserId(ConvertUtils.sourceToTarget(formDTO, UserResiInfoEntity.class)); //更新baseInfo diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index c0bc153d95..968abeff28 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -185,6 +185,9 @@ uri.DEL_FLAG = '0' AND uri.id_num = #{idNum} and uri.customer_id=#{customerId} + + AND uri.user_id != #{excludeUserId} + + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index 968abeff28..13ff3e74eb 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -43,7 +43,8 @@ NAME = #{name}, STREET = #{street}, DISTRICT = #{district}, - BUILDING_ADDRESS = #{buildingAddress} + BUILDING_ADDRESS = #{buildingAddress}, + ID_NUM = #{idNum} where USER_ID = #{userId} and DEL_FLAG = '0' From 3fa03b586cce9c0d24d54ed9397554a4076cf148 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Dec 2021 10:34:45 +0800 Subject: [PATCH 146/170] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=81=E6=B3=A8=E5=86=8C=E5=B1=85=E6=B0=91=E3=80=81=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E5=85=9A=E5=91=98=E4=B9=8B=E8=87=AA=E5=8A=A8=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=B1=85=E6=B0=91=E9=83=BD=E4=B8=8D=E5=86=8D=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=86=85=E5=94=AF=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PersonalCenterController.java | 4 +++ .../impl/PersonalCenterServiceImpl.java | 2 -- .../com/epmet/dto/form/EditInfoFormDTO.java | 22 +++++++++----- .../com/epmet/dto/form/InfoSubmitFromDTO.java | 2 +- .../controller/UserResiInfoController.java | 1 + .../epmet/service/UserBaseInfoService.java | 1 + .../service/impl/UserResiInfoServiceImpl.java | 30 ++++++++++--------- 7 files changed, 37 insertions(+), 25 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/PersonalCenterController.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/PersonalCenterController.java index e71b28101f..48ea31f06b 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/PersonalCenterController.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/PersonalCenterController.java @@ -3,6 +3,7 @@ package com.epmet.modules.mine.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.EditInfoFormDTO; import com.epmet.dto.form.EditMobileFormDTO; import com.epmet.dto.form.SendCodeFormDTO; @@ -51,6 +52,9 @@ public class PersonalCenterController { */ @PostMapping("editinfo") public Result editInfo(@LoginUser TokenDto tokenDto, @RequestBody EditInfoFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,EditInfoFormDTO.AddUserShowGroup.class,EditInfoFormDTO.AddUserInternalGroup.class); personalCenterService.editInfo(tokenDto, formDTO); return new Result(); } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java index d60b177815..d9c1b86e9a 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java @@ -45,8 +45,6 @@ public class PersonalCenterServiceImpl implements PersonalCenterService { @Override public void editInfo(TokenDto tokenDto, EditInfoFormDTO formDTO) { - formDTO.setUserId(tokenDto.getUserId()); - formDTO.setCustomerId(tokenDto.getCustomerId()); Result result = epmetUserOpenFeignClient.editUserInfo(formDTO); if (!result.success()) { throw new RenException(result.getCode(), result.getMsg()); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java index ef54d73a3a..e8eb4249fa 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.validator.constraints.Length; @@ -17,36 +18,41 @@ import java.io.Serializable; public class EditInfoFormDTO implements Serializable { private static final long serialVersionUID = 1280489016677129419L; + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } /** * 头像 */ - @NotBlank(message = "头像不能为空") + @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class) private String userId; /** * 头像 */ - @NotBlank(message = "头像不能为空") + @NotBlank(message = "头像不能为空",groups = AddUserShowGroup.class) private String headImgUrl; /** * 姓 */ - @NotBlank(message = "姓不能为空") + @NotBlank(message = "姓不能为空",groups = AddUserShowGroup.class) private String surname; /** * 名 */ - @NotBlank(message = "名不能为空") + @NotBlank(message = "名不能为空",groups = AddUserShowGroup.class) private String name; //@NotBlank(message = "身份证号不能为空") - @Length(max=18,message = "身份证号不能超过18位") + @Length(max=18,message = "身份证号不能超过18位",groups = AddUserShowGroup.class) //别的小程序不统一升级,没办法限制必填。 private String idNum; /** * 路牌号 */ - @NotBlank(message = "路牌号不能为空") + @NotBlank(message = "路牌号不能为空",groups = AddUserShowGroup.class) private String street; /** * 小区名称 @@ -59,12 +65,12 @@ public class EditInfoFormDTO implements Serializable { /** * 昵称 */ - @NotBlank(message = "昵称不能为空") + @NotBlank(message = "昵称不能为空",groups = AddUserShowGroup.class) private String nickname; /** * 当前客户id */ - @NotBlank(message = "customerId不能为空") + @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) private String customerId; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java index d64368a7b4..c99a96878c 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java @@ -57,7 +57,7 @@ public class InfoSubmitFromDTO implements Serializable { private String name; //@NotBlank(message = "身份证号不能为空") - //@Length(max=18,message = "身份证号不能超过18位") + @Length(max=18,message = "身份证号不能超过18位") //别的小程序不统一升级,没办法限制必填。 private String idNum; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java index 41e4a1114a..820f310a40 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java @@ -171,6 +171,7 @@ public class UserResiInfoController { */ @PostMapping("edituserinfo") public Result editUserInfo(@RequestBody EditInfoFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO,EditInfoFormDTO.AddUserShowGroup.class,EditInfoFormDTO.AddUserInternalGroup.class); userResiInfoService.editUserInfo(formDTO); return new Result(); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java index 456365e58c..35e52df1d8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java @@ -192,5 +192,6 @@ public interface UserBaseInfoService extends BaseService { UserBaseInfoDTO getUserIdByIdNum(String customerId, String idNum,String userId); + @Deprecated Integer checkIdNum(String idNum, String customerId, String excludeUserId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index 2d25fc6bde..09a74b157f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -27,7 +27,6 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; -import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; @@ -218,16 +217,17 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl NumConstant.ZERO) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); + throw new EpmetException(EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getCode(), "user_resi_info已存在该身份证号", EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getMsg()); } //判断user_base_info表是否存在相同的身份证号 if (userBaseInfoService.checkIdNum(userResiInfoDTO.getIdNum(), userResiInfoDTO.getCustomerId(), null) > 0) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_base_info已存在该身份证号", "身份证号已被使用"); + throw new EpmetException(EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getCode(), "user_base_info已存在该身份证号", EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getMsg()); } - } + }*/ userResiRegisterVisitService.updateResiRegisterVisit(true, userResiInfoDTO); //4:居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一 registerRelationService.saveRegisterRelation(userResiInfoDTO); @@ -311,15 +311,16 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl 0) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); + throw new EpmetException(EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getCode(), "user_resi_info已存在该身份证号", EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getMsg()); } //判断user_base_info表是否存在相同的身份证号 if (userBaseInfoService.checkIdNum(userResiInfoDTO.getIdNum(), userResiInfoDTO.getCustomerId(), null) > 0) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_base_info已存在该身份证号", "身份证号已被使用"); + throw new EpmetException(EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getCode(), "user_base_info已存在该身份证号", EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getMsg()); } - } + }*/ //居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一 registerRelationService.saveRegisterRelation(userResiInfoDTO); //数据存入居民注册表 @@ -394,19 +395,20 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl18){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号至多18位"); } //判断身份证号唯一,除了当前用户外没有人用过这个身份证号吧??? if(baseDao.selectCountByIdNum(formDTO.getIdNum(),formDTO.getCustomerId(),formDTO.getUserId())>0){ - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_resi_info已存在该身份证号", "身份证号已被使用"); + throw new EpmetException(EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getCode(), "user_resi_info已存在该身份证号", EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getMsg()); } //判断user_base_info表是否存在相同的身份证号 if (userBaseInfoService.checkIdNum(formDTO.getIdNum(), formDTO.getCustomerId(), formDTO.getUserId()) > 0) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "user_base_info已存在该身份证号", "身份证号已被使用"); + throw new EpmetException(EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getCode(), "user_base_info已存在该身份证号", EpmetErrorCode.IDCARDNO_ALREADY_EXITS.getMsg()); } - } + }*/ //更新居民注册信息表 baseDao.updateByUserId(ConvertUtils.sourceToTarget(formDTO, UserResiInfoEntity.class)); //更新baseInfo From e154b2fa1c92131896806098e313d8c9f71ac318 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Dec 2021 11:07:39 +0800 Subject: [PATCH 147/170] =?UTF-8?q?/epmetuser/icresiuser/persondata?= =?UTF-8?q?=E8=BF=94=E5=8F=82=E5=A2=9E=E5=8A=A0epmetUserIdList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/PersonDataResultDTO.java | 2 +- .../com/epmet/dto/result/ResiUserResDTO.java | 9 +++++---- .../java/com/epmet/dao/UserBaseInfoDao.java | 7 ++++--- .../java/com/epmet/dao/UserResiInfoDao.java | 5 ++--- .../com/epmet/service/UserBaseInfoService.java | 2 +- .../service/impl/IcResiUserServiceImpl.java | 2 +- .../service/impl/UserBaseInfoServiceImpl.java | 6 +++--- .../com/epmet/service/impl/UserServiceImpl.java | 17 +++++++++-------- .../main/resources/mapper/UserBaseInfoDao.xml | 9 ++------- .../main/resources/mapper/UserResiInfoDao.xml | 9 ++------- 10 files changed, 30 insertions(+), 38 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java index 3d1334d249..68ad326637 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java @@ -21,7 +21,7 @@ public class PersonDataResultDTO implements Serializable { /** * epemt_user.user.id */ - private String epmetUserId; + private List epmetUserIdList; /** * ic_resi_user.id diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java index 3d0679b9d4..250ed45494 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserResDTO.java @@ -1,15 +1,16 @@ package com.epmet.dto.result; -import com.epmet.dto.form.ResiUserFormDTO; import lombok.Data; -import javax.validation.constraints.NotBlank; import java.io.Serializable; +import java.util.List; +/** + * 根据ic_resi_user找 epmetUser + */ @Data public class ResiUserResDTO implements Serializable { private String idNum; private String customerId; - private String epmetUserId; - private String icResiUserId; + private List epmetUserIdList; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java index 7cea610e90..3cd4c5ffe2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java @@ -26,6 +26,8 @@ import com.epmet.entity.UserBaseInfoEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 用户基础信息 * @@ -82,9 +84,8 @@ public interface UserBaseInfoDao extends BaseDao { **/ String selectIdByUserId(@Param("userId") String userId); - UserBaseInfoDTO selectUserId(@Param("customerId") String customerId, - @Param("idNum")String idNum, - @Param("userId")String userId); + List selectCommonIdNumUser(@Param("customerId") String customerId, + @Param("idNum")String idNum); Integer selectCountIdNum(@Param("idNum") String idNum, @Param("customerId")String customerId, diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java index 048b6d114b..73044f21c4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java @@ -106,7 +106,6 @@ public interface UserResiInfoDao extends BaseDao { @Param("customerId") String customerId, @Param("excludeUserId")String excludeUserId); - UserResiInfoDTO selectByIdNum(@Param("customerId") String customerId, - @Param("idNum")String idNum, - @Param("userId")String userId); + List selectCommonIdNumUser(@Param("customerId") String customerId, + @Param("idNum")String idNum); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java index 35e52df1d8..b5ca38d3ed 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java @@ -190,7 +190,7 @@ public interface UserBaseInfoService extends BaseService { **/ ExtUserInfoResultDTO extUserInfo(CommonUserIdFormDTO param); - UserBaseInfoDTO getUserIdByIdNum(String customerId, String idNum,String userId); + List getCommonIdNumUser(String customerId, String idNum); @Deprecated Integer checkIdNum(String idNum, String customerId, String excludeUserId); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index ed20fb2374..ea21846183 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -538,7 +538,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl()); personData.setIcResiUserId(formDTO.getUserId()); // 房屋信息查询 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index a8afc76953..5dd7677665 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -444,11 +444,11 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl getCommonIdNumUser(String customerId, String idNum) { + if(StringUtils.isBlank(idNum)){ return null; } - return baseDao.selectUserId(customerId,idNum,userId); + return baseDao.selectCommonIdNumUser(customerId,idNum); } @Override diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java index 36e820b18d..697fda9582 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java @@ -2,7 +2,6 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; @@ -26,13 +25,17 @@ import com.epmet.service.IcResiUserService; import com.epmet.service.UserBaseInfoService; import com.epmet.service.UserService; import com.epmet.util.ModuleConstant; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; /** @@ -370,15 +373,13 @@ public class UserServiceImpl extends BaseServiceImpl implem } ResiUserResDTO resiUserResDTO = ConvertUtils.sourceToTarget(formDTO, ResiUserResDTO.class); if (StringUtils.isNotBlank(formDTO.getIdNum())) { - UserBaseInfoDTO userBaseInfoDTO = userBaseInfoService.getUserIdByIdNum(formDTO.getCustomerId(), - formDTO.getIdNum(), null); - if (null == userBaseInfoDTO || StringUtils.isBlank(userBaseInfoDTO.getUserId())) { + List userBaseInfoList = userBaseInfoService.getCommonIdNumUser(formDTO.getCustomerId(),formDTO.getIdNum()); + if (CollectionUtils.isEmpty(userBaseInfoList)) { log.info("user_base_info没有找到,去查下user_resi_info表吧"); - UserResiInfoDTO userResiInfoDTO = userResiInfoDao.selectByIdNum(formDTO.getCustomerId(), - formDTO.getIdNum(), null); - resiUserResDTO.setEpmetUserId(null != userResiInfoDTO ? userResiInfoDTO.getId() : StrConstant.EPMETY_STR); + List userResiInfoDTO = userResiInfoDao.selectCommonIdNumUser(formDTO.getCustomerId(),formDTO.getIdNum()); + resiUserResDTO.setEpmetUserIdList(CollectionUtils.isNotEmpty(userResiInfoDTO) ? userResiInfoDTO.stream().map(UserResiInfoDTO::getUserId).collect(Collectors.toList()): new ArrayList<>()); } else { - resiUserResDTO.setEpmetUserId(userBaseInfoDTO.getUserId()); + resiUserResDTO.setEpmetUserIdList(userBaseInfoList.stream().map(UserBaseInfoDTO::getUserId).collect(Collectors.toList())); } } return resiUserResDTO; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml index 16a0e4d8e9..ae0fbc5486 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml @@ -121,18 +121,13 @@ AND USER_ID = #{userId} - SELECT * FROM user_base_info WHERE DEL_FLAG = '0' AND customer_id = #{customerId} - - and id_num=#{idNum} - - - and user_id=#{userId} - + and id_num=#{idNum} - SELECT uri.* FROM @@ -199,11 +199,6 @@ WHERE uri.DEL_FLAG = '0' and uri.customer_id=#{customerId} - - AND uri.id_num = #{idNum} - - - and uri.user_id=#{userId} - + AND uri.id_num = #{idNum} From d9c81f6af5dfb72db48fcde71b56d88551e5fca1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 8 Dec 2021 11:15:13 +0800 Subject: [PATCH 148/170] =?UTF-8?q?"mydemand"=E5=85=A5=E5=8F=82=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0epmetUserIdList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/demand/IcResiUserDemandFromDTO.java | 7 ++++++- .../service/impl/IcUserDemandRecServiceImpl.java | 6 +++++- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 12 ++++-------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java index 51d334d874..f29e088293 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; +import java.util.List; @Data public class IcResiUserDemandFromDTO implements Serializable { @@ -21,7 +22,7 @@ public class IcResiUserDemandFromDTO implements Serializable { /** * icresiuser/persondata接口返参中有此值 */ - private String epmetUserId; + private List epmetUserIdList; @NotNull(message = "pageNo不能为空", groups = AddUserInternalGroup.class) private Integer pageNo; @@ -36,4 +37,8 @@ public class IcResiUserDemandFromDTO implements Serializable { @NotBlank(message = "tokenDto获取客户id不能为空", groups = AddUserInternalGroup.class) private String customerId; + /** + * epmetUserIdList+userId + */ + private List userIds; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 0693b7ec7b..3a0f278b10 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -475,7 +475,11 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl userIds=new ArrayList<>(); + userIds.add(formDTO.getUserId()); + if(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList())){ + userIds.addAll(formDTO.getEpmetUserIdList()); + } //2、小程序内自己上报+赋能平台待录入的 PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectUserDemand(formDTO)); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 8aed916dee..33d491e2b4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -134,14 +134,10 @@ ic_user_demand_rec r WHERE r.DEL_FLAG = '0' - - - AND (r.DEMAND_USER_ID = #{userId} or r.DEMAND_USER_ID=#{epmetUserId}) - - - AND r.DEMAND_USER_ID = #{userId} - - + AND r.DEMAND_USER_ID in + + #{demandUserId} + and r.CATEGORY_CODE like concat(#{firstCategoryCode},'%') From c3119499421306c2475138d003402f6510746ed2 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 8 Dec 2021 16:59:37 +0800 Subject: [PATCH 149/170] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/IcFormController.java | 69 +++++------------ .../controller/IcFormItemController.java | 63 ++------------- .../com/epmet/service/IcFormItemService.java | 66 +--------------- .../java/com/epmet/service/IcFormService.java | 66 +--------------- .../service/impl/IcFormItemServiceImpl.java | 55 +------------- .../epmet/service/impl/IcFormServiceImpl.java | 76 ++++--------------- 6 files changed, 41 insertions(+), 354 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java index dee3afb8ec..d35993f13a 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java @@ -18,28 +18,20 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.IcFormDTO; import com.epmet.dto.form.CustomerFormQueryDTO; import com.epmet.dto.result.*; -import com.epmet.excel.IcFormExcel; import com.epmet.service.IcFormItemService; import com.epmet.service.IcFormService; import org.apache.commons.lang3.StringUtils; 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; import java.util.Set; @@ -58,49 +50,24 @@ public class IcFormController { @Autowired private IcFormItemService icFormItemService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icFormService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - IcFormDTO data = icFormService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody IcFormDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icFormService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody IcFormDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icFormService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - icFormService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = icFormService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, IcFormExcel.class); + /** + * desc: 初始化 客户表单配置 + * + * @param customerId + * @param formCode + * @return com.epmet.commons.tools.utils.Result + * @author LiuJanJun + * @date 2021/12/8 4:28 下午 + */ + @GetMapping("initCustomerForm/{formCode}") + public Result initCustomerFormByCode(@RequestParam String customerId, + @PathVariable(value = "formCode") String formCode){ + if (StringUtils.isBlank(customerId)){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"参数错误"); + } + return new Result().ok(icFormService.initCustomerFormByCode(customerId,formCode)); } - /** * 获取居民信息表单 【dynamic=null】查询全部;否则查询对应的item * diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java index 50f4d10ff9..1cfe0d4276 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemController.java @@ -17,25 +17,16 @@ package com.epmet.controller; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.IcFormItemDTO; import com.epmet.dto.result.ColumnTableNameResultDTO; -import com.epmet.dto.result.CustomerStaffRoleResultDTO; -import com.epmet.excel.IcFormItemExcel; import com.epmet.service.IcFormItemService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; /** @@ -47,52 +38,10 @@ import java.util.Map; @RestController @RequestMapping("icformitem") public class IcFormItemController { - + @Autowired private IcFormItemService icFormItemService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icFormItemService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - IcFormItemDTO data = icFormItemService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody IcFormItemDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icFormItemService.save(dto); - return new Result(); - } - - @PutMapping - public Result update(@RequestBody IcFormItemDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icFormItemService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - icFormItemService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = icFormItemService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, IcFormItemExcel.class); - } - /** * @Author sun * @Description 居民信息新增查询各表必填字段 @@ -102,4 +51,4 @@ public class IcFormItemController { return new Result>().ok(icFormItemService.getMustColumn(customerId)); } -} \ No newline at end of file +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java index 32480613c2..575e31d6b1 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemService.java @@ -18,8 +18,6 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.IcFormItemDTO; import com.epmet.dto.form.CustomerFormQueryDTO; import com.epmet.dto.result.ColumnTableNameResultDTO; import com.epmet.dto.result.ConditionResultDTO; @@ -28,7 +26,6 @@ import com.epmet.dto.result.TableHeaderResultDTO; import com.epmet.entity.IcFormItemEntity; import java.util.List; -import java.util.Map; import java.util.Set; /** @@ -38,67 +35,6 @@ import java.util.Set; * @since v1.0.0 2021-10-26 */ public interface IcFormItemService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-10-26 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-10-26 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return IcFormItemDTO - * @author generator - * @date 2021-10-26 - */ - IcFormItemDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-10-26 - */ - void save(IcFormItemDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-10-26 - */ - void update(IcFormItemDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-10-26 - */ - void delete(String[] ids); - /** * 获取居民信息的查询条件,组件列表 * @@ -122,4 +58,4 @@ public interface IcFormItemService extends BaseService { * @Description 居民信息新增查询各表必填字段 **/ List getMustColumn(String customerId); -} \ No newline at end of file +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java index c90e6227dc..fdceecbb51 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java @@ -18,15 +18,12 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.IcFormDTO; import com.epmet.dto.form.CustomerFormQueryDTO; import com.epmet.dto.result.CustomerFormResultDTO; import com.epmet.dto.result.FormItemResult; import com.epmet.entity.IcFormEntity; import java.util.List; -import java.util.Map; /** * 配置表单 @@ -35,67 +32,6 @@ import java.util.Map; * @since v1.0.0 2021-10-26 */ public interface IcFormService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-10-26 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-10-26 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return IcFormDTO - * @author generator - * @date 2021-10-26 - */ - IcFormDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-10-26 - */ - void save(IcFormDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-10-26 - */ - void update(IcFormDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-10-26 - */ - void delete(String[] ids); - /** * 获取居民信息表单 * @@ -116,4 +52,6 @@ public interface IcFormService extends BaseService { * @date 2021.10.27 17:41:59 */ List listItems(String customerId, String formCode); + + String initCustomerFormByCode(String customerId, String formCode); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java index f614e64e0b..00c79db52c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java @@ -49,59 +49,6 @@ import java.util.*; @Service public class IcFormItemServiceImpl extends BaseServiceImpl implements IcFormItemService { - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, IcFormItemDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, IcFormItemDTO.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 IcFormItemDTO get(String id) { - IcFormItemEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, IcFormItemDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(IcFormItemDTO dto) { - IcFormItemEntity entity = ConvertUtils.sourceToTarget(dto, IcFormItemEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(IcFormItemDTO dto) { - IcFormItemEntity entity = ConvertUtils.sourceToTarget(dto, IcFormItemEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - /** * 获取居民信息的查询条件,组件列表 * @@ -171,4 +118,4 @@ public class IcFormItemServiceImpl extends BaseServiceImpl implements IcFormService { @Autowired - private CustomerFootBarRedis customerFootBarRedis; + private CustomerFootBarRedis customerFootBarRedis; @Autowired private RedisUtils redisUtils; - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, IcFormDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, IcFormDTO.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 IcFormDTO get(String id) { - IcFormEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, IcFormDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(IcFormDTO dto) { - IcFormEntity entity = ConvertUtils.sourceToTarget(dto, IcFormEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(IcFormDTO dto) { - IcFormEntity entity = ConvertUtils.sourceToTarget(dto, IcFormEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - /** * 获取居民信息表单 * @@ -165,4 +103,16 @@ public class IcFormServiceImpl extends BaseServiceImpl return formItemResults; } + + @Override + public String initCustomerFormByCode(String customerId, String formCode) { + CustomerFormResultDTO formResultDTO = baseDao.selectByCode(customerId, formCode); + if (formResultDTO == null){ + return "该客户已经存在了表单的数据"; + } + CustomerFormResultDTO defaultIcForm = baseDao.selectByCode("default", formCode); + + + return null; + } } From befacc4eddd513b4d89f466a0215a392d8a72113 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 8 Dec 2021 22:27:37 +0800 Subject: [PATCH 150/170] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=A1=A8=E5=8D=95=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/IcFormController.java | 4 +- .../com/epmet/dao/IcFormQueryBuilderDao.java | 33 +++++ .../entity/IcFormQueryBuilderEntity.java | 63 ++++++++ .../java/com/epmet/service/IcFormService.java | 2 +- .../epmet/service/impl/IcFormServiceImpl.java | 136 +++++++++++++++--- .../mapper/IcFormQueryBuilderDao.xml | 22 +++ 6 files changed, 239 insertions(+), 21 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormQueryBuilderDao.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormQueryBuilderDao.xml diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java index d35993f13a..8466ceb6a6 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java @@ -60,12 +60,12 @@ public class IcFormController { * @date 2021/12/8 4:28 下午 */ @GetMapping("initCustomerForm/{formCode}") - public Result initCustomerFormByCode(@RequestParam String customerId, + public Result initCustomerFormByCode(@RequestParam String customerId,@RequestParam String areaCode, @PathVariable(value = "formCode") String formCode){ if (StringUtils.isBlank(customerId)){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"参数错误"); } - return new Result().ok(icFormService.initCustomerFormByCode(customerId,formCode)); + return new Result().ok(icFormService.initCustomerFormByCode(customerId, areaCode, formCode)); } /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormQueryBuilderDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormQueryBuilderDao.java new file mode 100644 index 0000000000..a142d8d637 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormQueryBuilderDao.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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcFormQueryBuilderEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 表单查询项 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-12-08 + */ +@Mapper +public interface IcFormQueryBuilderDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java new file mode 100644 index 0000000000..f8255baa01 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java @@ -0,0 +1,63 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 表单查询项 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-12-08 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_form_query_builder") +public class IcFormQueryBuilderEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * ic_form_item.id + */ + private String formItemId; + + /** + * ic_form.form_code,举例:resi_base_info + */ + private String formCode; + + /** + * 查询类型: equal, like,daterange.... + */ + private String queryType; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java index fdceecbb51..7bbc7ca275 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormService.java @@ -53,5 +53,5 @@ public interface IcFormService extends BaseService { */ List listItems(String customerId, String formCode); - String initCustomerFormByCode(String customerId, String formCode); + String initCustomerFormByCode(String customerId, String areaCode, String formCode); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java index 28edd796be..e9e2b3b1f4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java @@ -17,23 +17,33 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; -import com.epmet.dao.IcFormDao; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.dao.*; import com.epmet.dto.form.CustomerFormQueryDTO; import com.epmet.dto.result.CustomerFormResultDTO; import com.epmet.dto.result.FormGroupDTO; import com.epmet.dto.result.FormItemResult; -import com.epmet.entity.IcFormEntity; +import com.epmet.entity.*; import com.epmet.redis.CustomerFootBarRedis; import com.epmet.service.IcFormService; +import lombok.extern.slf4j.Slf4j; +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 org.springframework.util.CollectionUtils; +import java.util.Date; import java.util.List; /** @@ -42,13 +52,22 @@ import java.util.List; * @author generator generator@elink-cn.com * @since v1.0.0 2021-10-26 */ +@Slf4j @Service public class IcFormServiceImpl extends BaseServiceImpl implements IcFormService { - @Autowired - private CustomerFootBarRedis customerFootBarRedis; + @Autowired + private CustomerFootBarRedis customerFootBarRedis; - @Autowired - private RedisUtils redisUtils; + @Autowired + private RedisUtils redisUtils; + @Autowired + private IcFormItemDao icFormItemDao; + @Autowired + private IcFormItemOptionsDao icFormItemOptionsDao; + @Autowired + private IcFormItemGroupDao icFormItemGroupDao; + @Autowired + private IcFormQueryBuilderDao icFormQueryBuilderDao; /** * 获取居民信息表单 @@ -60,19 +79,19 @@ public class IcFormServiceImpl extends BaseServiceImpl */ @Override public CustomerFormResultDTO getCustomerForm(CustomerFormQueryDTO formDto) { - CustomerFormResultDTO customerFormResultDTO = customerFootBarRedis.getCustomerFormResultDTO(formDto.getFormCode(), formDto.getCustomerId(),formDto.getDynamic()); + CustomerFormResultDTO customerFormResultDTO = customerFootBarRedis.getCustomerFormResultDTO(formDto.getFormCode(), formDto.getCustomerId(), formDto.getDynamic()); if (null != customerFormResultDTO) { return customerFormResultDTO; } - CustomerFormResultDTO resultDTO=baseDao.selectByCode(formDto.getCustomerId(),formDto.getFormCode()); + CustomerFormResultDTO resultDTO = baseDao.selectByCode(formDto.getCustomerId(), formDto.getFormCode()); if (null == resultDTO) { - throw new RenException(EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getCode(),EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getMsg()); + throw new RenException(EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getCode(), EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getMsg()); } - List itemList=baseDao.selectItemList(resultDTO.getFormId(),formDto.getDynamic()); - List groupList=baseDao.selectListGroup(resultDTO.getFormId()); + List itemList = baseDao.selectItemList(resultDTO.getFormId(), formDto.getDynamic()); + List groupList = baseDao.selectListGroup(resultDTO.getFormId()); resultDTO.setItemList(itemList); resultDTO.setGroupList(groupList); - customerFootBarRedis.setCustomerFormResultDTO(formDto.getFormCode(),formDto.getCustomerId(),resultDTO,formDto.getDynamic()); + customerFootBarRedis.setCustomerFormResultDTO(formDto.getFormCode(), formDto.getCustomerId(), resultDTO, formDto.getDynamic()); return resultDTO; } @@ -88,9 +107,9 @@ public class IcFormServiceImpl extends BaseServiceImpl } // 从db取 - CustomerFormResultDTO formResultDto=baseDao.selectByCode(customerId, formCode); + CustomerFormResultDTO formResultDto = baseDao.selectByCode(customerId, formCode); if (null == formResultDto) { - throw new RenException(EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getCode(),EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getMsg()); + throw new RenException(EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getCode(), EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getMsg()); } List formItemResults = baseDao.listItems(formResultDto.getFormId()); @@ -104,15 +123,96 @@ public class IcFormServiceImpl extends BaseServiceImpl return formItemResults; } + @Transactional(rollbackFor = Exception.class) @Override - public String initCustomerFormByCode(String customerId, String formCode) { + public String initCustomerFormByCode(String customerId, String areaCode, String formCode) { CustomerFormResultDTO formResultDTO = baseDao.selectByCode(customerId, formCode); - if (formResultDTO == null){ + if (formResultDTO != null) { return "该客户已经存在了表单的数据"; } - CustomerFormResultDTO defaultIcForm = baseDao.selectByCode("default", formCode); + String defaultCustomerId = "default"; + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcFormEntity::getCustomerId, defaultCustomerId); + wrapper.eq(IcFormEntity::getFormCode, formCode); + IcFormEntity defaultIcForm = baseDao.selectOne(wrapper); + if (defaultIcForm == null) { + return "默认配置错误"; + } + + //统一前缀 + String newPrefixed = DateUtils.format(new Date(), DateUtils.DATE_TIME_NO_SPLIT) + StrConstant.UNDER_LINE; + String newFormId = newPrefixed + defaultIcForm.getId(); + defaultIcForm.setId(newFormId); + defaultIcForm.setAreaCode(areaCode); + + int insert = baseDao.insert(defaultIcForm); + log.info("insert icForm:" + insert); + + LambdaQueryWrapper wrapperItem = new LambdaQueryWrapper<>(); + wrapperItem.eq(IcFormItemEntity::getCustomerId, defaultCustomerId); + wrapperItem.eq(IcFormItemEntity::getFormCode, formCode); + List itemList = icFormItemDao.selectList(wrapperItem); + if (CollectionUtils.isEmpty(itemList)) { + return "默认配置错误"; + } + //设置item + itemList.forEach(item -> { + item.setId(newPrefixed + item.getId()); + item.setCustomerId(customerId); + item.setFormId(newFormId); + item.setAreaCode(areaCode); + item.setParentItemId(newPrefixed + item.getParentItemId()); + item.setItemGroupId(newPrefixed + item.getItemGroupId()); + String optionSourceValue = item.getOptionSourceValue(); + if (StringUtils.isNotBlank(optionSourceValue) && optionSourceValue.contains(StrConstant.QUESTION_MARK)){ + //多个参数 + String[] paramArr = optionSourceValue.split(StrConstant.QUESTION_MARK_TRANSFER)[NumConstant.ONE].split(StrConstant.AND_MARK); + for (String o : paramArr) { + optionSourceValue = optionSourceValue.replace(o, newPrefixed + o); + } + item.setOptionSourceValue(optionSourceValue); + } + log.debug("item:"+ JSON.toJSONString(item)); + icFormItemDao.insert(item); + }); + LambdaQueryWrapper wrapperOptions = new LambdaQueryWrapper<>(); + wrapperOptions.eq(IcFormItemOptionsEntity::getCustomerId, defaultCustomerId); + wrapperOptions.eq(IcFormItemOptionsEntity::getFormCode, formCode); + List optionsList = icFormItemOptionsDao.selectList(wrapperOptions); + optionsList.forEach(item -> { + item.setId(newPrefixed + item.getId()); + item.setCustomerId(customerId); + item.setFormId(newFormId); + item.setItemId(newPrefixed + item.getItemId()); + log.debug("option:"+ JSON.toJSONString(item)); + icFormItemOptionsDao.insert(item); + }); + + LambdaQueryWrapper wrapperGroup = new LambdaQueryWrapper<>(); + wrapperGroup.eq(IcFormItemGroupEntity::getCustomerId, defaultCustomerId); + wrapperGroup.eq(IcFormItemGroupEntity::getFormCode, formCode); + List groupList = icFormItemGroupDao.selectList(wrapperGroup); + groupList.forEach(item -> { + item.setId(newPrefixed + item.getId()); + item.setCustomerId(customerId); + item.setFormId(newFormId); + log.debug("group:"+ JSON.toJSONString(item)); + icFormItemGroupDao.insert(item); + }); + + LambdaQueryWrapper wrapperQuery = new LambdaQueryWrapper<>(); + wrapperQuery.eq(IcFormQueryBuilderEntity::getCustomerId, defaultCustomerId); + wrapperQuery.eq(IcFormQueryBuilderEntity::getFormCode, formCode); + List queryList = icFormQueryBuilderDao.selectList(wrapperQuery); + queryList.forEach(item -> { + item.setId(newPrefixed + item.getId()); + item.setCustomerId(customerId); + item.setFormItemId(newPrefixed + item.getFormItemId()); + log.debug("query:"+ JSON.toJSONString(item)); + icFormQueryBuilderDao.insert(item); + }); - return null; + return "初始化成功!客户ID:" + customerId + " formCode:" + formCode; } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormQueryBuilderDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormQueryBuilderDao.xml new file mode 100644 index 0000000000..62281279fa --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormQueryBuilderDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From deb2b99b2d64d4e1783496d74510ce3dc72bb653 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 8 Dec 2021 23:02:14 +0800 Subject: [PATCH 151/170] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=A1=A8=E5=8D=95=E9=85=8D=E7=BD=AE2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/IcFormServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java index e9e2b3b1f4..c3b2805d9c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java @@ -143,6 +143,7 @@ public class IcFormServiceImpl extends BaseServiceImpl String newPrefixed = DateUtils.format(new Date(), DateUtils.DATE_TIME_NO_SPLIT) + StrConstant.UNDER_LINE; String newFormId = newPrefixed + defaultIcForm.getId(); defaultIcForm.setId(newFormId); + defaultIcForm.setCustomerId(customerId); defaultIcForm.setAreaCode(areaCode); int insert = baseDao.insert(defaultIcForm); From b7a9f9c8b6cbf6fbffe7d9c408e4302c1b6f1320 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 8 Dec 2021 23:34:09 +0800 Subject: [PATCH 152/170] =?UTF-8?q?=E4=B8=8D=E5=9B=BA=E5=AE=9A=E5=88=86?= =?UTF-8?q?=E7=BB=84id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcFormItemDao.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml index 61a1c155c9..c9b16fd11c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml @@ -97,7 +97,8 @@ temp.LABEL from ( SELECT - ( CASE WHEN M.ITEM_GROUP_ID = '0' THEN 'ic_resi_user' ELSE g.TABLE_NAME END ) AS table_name, + ifnull(g.TABLE_NAME,'ic_resi_user') AS table_name, + #( CASE WHEN M.ITEM_GROUP_ID = '0' THEN 'ic_resi_user' ELSE g.TABLE_NAME END ) AS table_name, m.COLUMN_NAME AS columnName, m.LABEL FROM @@ -158,4 +159,4 @@ AND a.customer_id = #{customerId} - \ No newline at end of file + From 166bf9925ff7a0d71195561dadc6af70cd927554 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 9 Dec 2021 15:09:06 +0800 Subject: [PATCH 153/170] =?UTF-8?q?=E5=85=9A=E5=91=98=E9=A3=8E=E9=87=87?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partymember/form/PartyMemberStyleFormDTO.java | 2 ++ .../controller/IcPartymemberStyleController.java | 1 + .../service/impl/IcPartymemberStyleServiceImpl.java | 12 ++++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java index 5b80fc1642..6cedb15c89 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.resi.partymember.dto.partymember.form; import lombok.Data; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -14,6 +15,7 @@ import java.io.Serializable; @Data public class PartyMemberStyleFormDTO implements Serializable { private static final long serialVersionUID = 4743261460276449408L; + @NotBlank(message = "组织ID不能为空") private String agencyId; private String gridId; private String name; diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java index ff362ee7ec..cadf703b2c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java @@ -108,6 +108,7 @@ public class IcPartymemberStyleController { @PostMapping("list") public Result> search(@RequestBody PartyMemberStyleFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); return new Result>().ok(icPartymemberStyleService.search(formDTO)); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java index ad8a41f077..72872ab638 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java @@ -98,8 +98,10 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl dtoList = ConvertUtils.sourceToTarget(list, IcPartymemberStyleDTO.class); //设置网格名 dtoList.forEach(item -> { - GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); - item.setGridName(gridInfo.getGridName()); + if (StringUtils.isNotBlank(item.getGridId())) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); + item.setGridName(gridInfo.getGridName()); + } }); return dtoList; @@ -187,8 +189,10 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl pageInfo = new PageInfo<>(dtoList); //设置网格名 dtoList.forEach(item -> { - GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); - item.setGridName(gridInfo.getGridName()); + if (StringUtils.isNotBlank(item.getGridId())) { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); + item.setGridName(gridInfo.getGridName()); + } }); return new PageData<>(dtoList, pageInfo.getTotal()); } From cfb382f3eff275878fa38142e81562885991bbc7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 9 Dec 2021 15:53:58 +0800 Subject: [PATCH 154/170] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml index 4016ac6385..ee8caafc3e 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml @@ -27,7 +27,7 @@ ca.level, ca.area_code, ca.parent_area_code, - ( CASE WHEN ca.longitude is THEN + ( CASE WHEN ca.longitude is null THEN ( SELECT longitude FROM customer_agency WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id) ORDER BY pid ASC LIMIT 1 From 13d76dbd905e698daaf35811a070791efe4cc18a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 9 Dec 2021 17:45:00 +0800 Subject: [PATCH 155/170] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A/heart/icres?= =?UTF-8?q?idemanddict/option-service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/dto/result/OptionResultDTO.java | 1 + .../dto/form/demand/DemandOptionFormDTO.java | 19 +++++++++++++++++++ .../IcResiDemandDictController.java | 13 +++++++++++++ .../com/epmet/dao/IcResiDemandDictDao.java | 4 ++-- .../service/IcResiDemandDictService.java | 1 + .../impl/IcResiDemandDictServiceImpl.java | 13 ++++++++++++- .../resources/mapper/IcResiDemandDictDao.xml | 17 ++++++++++++++--- 7 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java index 9ffd3efccb..8c42570bc3 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java @@ -18,4 +18,5 @@ public class OptionResultDTO implements Serializable { private String pValue; private String sysDictDataId; private List children; + private Boolean usableFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java new file mode 100644 index 0000000000..64d77d5788 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class DemandOptionFormDTO implements Serializable { + private static final long serialVersionUID = -5335277881919236426L; + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "token获取客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + @NotBlank(message = "查询条件和查看居民详情:query;新增或修改居民信息:addorupdate", groups = AddUserInternalGroup.class) + private String purpose; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java index 2b225c73dc..565a7a8423 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java @@ -132,6 +132,19 @@ public class IcResiDemandDictController { return new Result>().ok(icResiDemandDictService.getDemandOptions(tokenDto.getCustomerId())); } + /** + * 服务措施管理界面, + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("option-service") + public Result> getDemandOptionsV2(@LoginUser TokenDto tokenDto,@RequestBody DemandOptionFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,DemandOptionFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icResiDemandDictService.getDemandOptionsV2(formDTO)); + } /** * 居民信息列表需要展示分类名称,单独开出来这个接口,供user查询 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java index ed09bfd858..211ab20e8d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java @@ -36,8 +36,8 @@ import java.util.Set; */ @Mapper public interface IcResiDemandDictDao extends BaseDao { - List selectDemandOptions(@Param("customerId") String customerId); - List selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode); + List selectDemandOptions(@Param("customerId") String customerId,@Param("usableFlagFormValue") String usableFlagFormValue); + List selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode,@Param("usableFlagFormValue") String usableFlagFormValue); String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set codeSet); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java index ce9c4741a7..12cbaf7dad 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java @@ -86,6 +86,7 @@ public interface IcResiDemandDictService extends BaseService getDemandOptions(String customerId); + List getDemandOptionsV2(DemandOptionFormDTO formDTO); /** * 居民信息列表需要展示分类名称,单独开出来这个接口,供user查询 * @param formDTO diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index 520e367177..5fe0df4eff 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -182,7 +182,18 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl getDemandOptions(String customerId) { - return baseDao.selectDemandOptions(customerId); + return baseDao.selectDemandOptions(customerId,null); + } + + + @Override + public List getDemandOptionsV2(DemandOptionFormDTO formDTO) { + if ("addorupdate".equals(formDTO.getPurpose())) { + //只查询可用的 + return baseDao.selectDemandOptions(formDTO.getCustomerId(), "1"); + } + //查询全部 + return baseDao.selectDemandOptions(formDTO.getCustomerId(), null); } @Override diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index 0e6293002d..be50e98601 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -24,8 +24,9 @@ + + select="selectChildDemands" column="customerId=customerId,parentCode=value,usableFlagFormValue=usable_flag_form_value"> @@ -48,7 +54,9 @@ CUSTOMER_ID AS customerId, CATEGORY_CODE AS "value", CATEGORY_NAME AS "label", - PARENT_CODE as pValue + PARENT_CODE as pValue, + #{usableFlagFormValue} as usable_flag_form_value, + USABLE_FLAG as usableFlag FROM ic_resi_demand_dict WHERE @@ -56,6 +64,9 @@ AND LEVEL = 2 AND CUSTOMER_ID = #{customerId} AND PARENT_CODE = #{parentCode} + + and USABLE_FLAG=#{usableFlagFormValue} + ORDER BY SORT ASC From 5ed5d9ccfbae8ab834230bdaf731cd27558d31a0 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 10 Dec 2021 09:08:50 +0800 Subject: [PATCH 156/170] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD=E9=87=8D=E5=A4=8D=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 1 + .../dao/IcPartyServiceCenterMatterDao.java | 12 ++++++- .../IcPartyServiceCenterMatterService.java | 8 +++++ ...IcPartyServiceCenterMatterServiceImpl.java | 11 ++++++ .../impl/IcPartyServiceCenterServiceImpl.java | 35 ++++++++++++++----- .../mapper/IcPartyServiceCenterMatterDao.xml | 9 +++++ 6 files changed, 67 insertions(+), 9 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 05e6c7668e..d2b0ffa647 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -163,6 +163,7 @@ public enum EpmetErrorCode { EXISTS_SAME_PHONE_ERROR(8529, "%s存在重复"), COMMUNITY_SELF_ORGANIZATION_LIST_REPART_ERROR(8530, "%s社区自组织名称已存在"), + MATTER_NAME_EXISTS_APPOINTMENT_ERROR(8531, "存在重复预约事项"), // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java index 42b765e40c..18bf0f63f0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java @@ -22,6 +22,8 @@ import com.epmet.entity.IcPartyServiceCenterMatterEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 党群服务中心可预约事项表 * @@ -38,5 +40,13 @@ public interface IcPartyServiceCenterMatterDao extends BaseDao selectMatterNameByCenterId(@Param("centerId") String centerId); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java index cc977a17c5..23ac454d97 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java @@ -100,4 +100,12 @@ public interface IcPartyServiceCenterMatterService extends BaseService selectMatterNameByCenterId(String centerId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java index b264c2159b..e6e85dc9ff 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java @@ -109,4 +109,15 @@ public class IcPartyServiceCenterMatterServiceImpl extends BaseServiceImpl selectMatterNameByCenterId(String centerId) { + return baseDao.selectMatterNameByCenterId(centerId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 3a027a9b8a..25d7c9fffa 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; @@ -164,6 +165,12 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); + Map> groupByMatterName = matters.stream().collect(Collectors.groupingBy(IcPartyServiceCenterMatterEntity::getMatterName)); + groupByMatterName.forEach((k,v) -> { + if (v.size() > NumConstant.ONE){ + throw new EpmetException(EpmetErrorCode.MATTER_NAME_EXISTS_APPOINTMENT_ERROR.getCode()); + } + }); matters.forEach(m -> { m.setCustomerId(customerId); m.setPartyServiceCenterId(centerEntity.getId()); @@ -194,14 +201,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); - matters.forEach(m -> { - m.setCustomerId(tokenDto.getCustomerId()); - m.setPartyServiceCenterId(formDTO.getPartyServiceCenterId()); - }); - matterService.insertBatch(matters); - } + // del matter if (CollectionUtils.isNotEmpty(formDTO.getDelMatterList())){ List delMatterList = formDTO.getDelMatterList(); @@ -218,6 +218,25 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl existsMatterNames = matterService.selectMatterNameByCenterId(formDTO.getPartyServiceCenterId()); + List matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); + List paramMatterNames = matters.stream().map(m -> m.getMatterName()).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(existsMatterNames)){ + paramMatterNames.addAll(existsMatterNames); + } + Integer allSize = paramMatterNames.size(); + Integer distinctSize = paramMatterNames.stream().distinct().collect(Collectors.toList()).size(); + if (distinctSize < allSize){ + throw new EpmetException(EpmetErrorCode.MATTER_NAME_EXISTS_APPOINTMENT_ERROR.getCode()); + } + matters.forEach(m -> { + m.setCustomerId(tokenDto.getCustomerId()); + m.setPartyServiceCenterId(formDTO.getPartyServiceCenterId()); + }); + matterService.insertBatch(matters); + } } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml index f765126687..d8bbd1ba95 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml @@ -10,4 +10,13 @@ AND PARTY_SERVICE_CENTER_ID = #{partyServiceCenterId} + + + \ No newline at end of file From 1891fa1626bb469a64d6dc17c6ca27864e218a54 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 10 Dec 2021 09:22:31 +0800 Subject: [PATCH 157/170] emm --- .../epmet/service/impl/IcPartyServiceCenterServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 25d7c9fffa..2fc2622dc3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -138,6 +138,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); @@ -188,6 +189,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); l.eq(IcPartyServiceCenterEntity::getCenterName,formDTO.getCenterName()) @@ -246,6 +248,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl re = new LambdaQueryWrapper<>(); re.eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO). @@ -266,6 +269,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); @@ -426,6 +430,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl Date: Fri, 10 Dec 2021 09:24:44 +0800 Subject: [PATCH 158/170] emm --- .../impl/IcPartyServiceCenterServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 2fc2622dc3..f15494c546 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -166,12 +166,12 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); - Map> groupByMatterName = matters.stream().collect(Collectors.groupingBy(IcPartyServiceCenterMatterEntity::getMatterName)); - groupByMatterName.forEach((k,v) -> { - if (v.size() > NumConstant.ONE){ - throw new EpmetException(EpmetErrorCode.MATTER_NAME_EXISTS_APPOINTMENT_ERROR.getCode()); - } - }); + List paramMatterNames = matters.stream().map(m -> m.getMatterName()).collect(Collectors.toList()); + Integer allSize = paramMatterNames.size(); + Integer distinctSize = paramMatterNames.stream().distinct().collect(Collectors.toList()).size(); + if (distinctSize < allSize){ + throw new EpmetException(EpmetErrorCode.MATTER_NAME_EXISTS_APPOINTMENT_ERROR.getCode()); + } matters.forEach(m -> { m.setCustomerId(customerId); m.setPartyServiceCenterId(centerEntity.getId()); From 48e86555efbfc76f0f5524072420bcf3fddb25a4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 10 Dec 2021 09:30:29 +0800 Subject: [PATCH 159/170] =?UTF-8?q?code=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index d2b0ffa647..0f70c9ecbd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -163,7 +163,7 @@ public enum EpmetErrorCode { EXISTS_SAME_PHONE_ERROR(8529, "%s存在重复"), COMMUNITY_SELF_ORGANIZATION_LIST_REPART_ERROR(8530, "%s社区自组织名称已存在"), - MATTER_NAME_EXISTS_APPOINTMENT_ERROR(8531, "存在重复预约事项"), + MATTER_NAME_EXISTS_APPOINTMENT_ERROR(8532, "存在重复预约事项"), // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), From af27db247acb20acb043eefb924cd44fa93d21b3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 10 Dec 2021 12:17:27 +0800 Subject: [PATCH 160/170] selectItemList --- .../src/main/java/com/epmet/dao/IcFormDao.java | 2 +- .../src/main/resources/mapper/IcFormDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormDao.java index 7cd489b2bb..41928a94ce 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormDao.java @@ -47,7 +47,7 @@ public interface IcFormDao extends BaseDao { */ CustomerFormResultDTO selectByCode(@Param("customerId") String customerId, @Param("formCode") String formCode); - List selectItemList(String formId, Boolean dynamic); + List selectItemList(@Param("formId") String formId, @Param("dynamic") Boolean dynamic); List selectItemListByGroupId(String groupId); List selectListOption(String itemId); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormDao.xml index d93d611f7c..d3c2c0261e 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormDao.xml @@ -82,7 +82,7 @@ ) - SELECT fi.ID AS item_id, 'ic_resi_user' AS table_name, From 02012fd9017078746bcbc3cdf0d6b728790ae735 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 10 Dec 2021 15:40:03 +0800 Subject: [PATCH 161/170] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A2=84?= =?UTF-8?q?=E8=AD=A6=E5=92=8C=E5=88=86=E7=B1=BB=E9=85=8D=E7=BD=AE=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcFormServiceImpl.java | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java index c3b2805d9c..3d453ea38c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormServiceImpl.java @@ -68,6 +68,10 @@ public class IcFormServiceImpl extends BaseServiceImpl private IcFormItemGroupDao icFormItemGroupDao; @Autowired private IcFormQueryBuilderDao icFormQueryBuilderDao; + @Autowired + private IcResiCategoryStatsConfigDao icResiCategoryStatsConfigDao; + @Autowired + private IcResiCategoryWarnConfigDao icResiCategoryWarnConfigDao; /** * 获取居民信息表单 @@ -145,6 +149,10 @@ public class IcFormServiceImpl extends BaseServiceImpl defaultIcForm.setId(newFormId); defaultIcForm.setCustomerId(customerId); defaultIcForm.setAreaCode(areaCode); + defaultIcForm.setCreatedBy("init_user"); + defaultIcForm.setCreatedTime(new Date()); + defaultIcForm.setUpdatedBy("init_user"); + defaultIcForm.setUpdatedTime(new Date()); int insert = baseDao.insert(defaultIcForm); log.info("insert icForm:" + insert); @@ -163,7 +171,10 @@ public class IcFormServiceImpl extends BaseServiceImpl item.setFormId(newFormId); item.setAreaCode(areaCode); item.setParentItemId(newPrefixed + item.getParentItemId()); - item.setItemGroupId(newPrefixed + item.getItemGroupId()); + //分组Id 为0 说明不村子分组 则直接不设置 仍然为0 + if (!NumConstant.ZERO_STR.equals(item.getItemGroupId())){ + item.setItemGroupId(newPrefixed + item.getItemGroupId()); + } String optionSourceValue = item.getOptionSourceValue(); if (StringUtils.isNotBlank(optionSourceValue) && optionSourceValue.contains(StrConstant.QUESTION_MARK)){ //多个参数 @@ -173,6 +184,10 @@ public class IcFormServiceImpl extends BaseServiceImpl } item.setOptionSourceValue(optionSourceValue); } + item.setCreatedBy("init_user"); + item.setCreatedTime(new Date()); + item.setUpdatedBy("init_user"); + item.setUpdatedTime(new Date()); log.debug("item:"+ JSON.toJSONString(item)); icFormItemDao.insert(item); }); @@ -186,6 +201,10 @@ public class IcFormServiceImpl extends BaseServiceImpl item.setCustomerId(customerId); item.setFormId(newFormId); item.setItemId(newPrefixed + item.getItemId()); + item.setCreatedBy("init_user"); + item.setCreatedTime(new Date()); + item.setUpdatedBy("init_user"); + item.setUpdatedTime(new Date()); log.debug("option:"+ JSON.toJSONString(item)); icFormItemOptionsDao.insert(item); }); @@ -198,6 +217,10 @@ public class IcFormServiceImpl extends BaseServiceImpl item.setId(newPrefixed + item.getId()); item.setCustomerId(customerId); item.setFormId(newFormId); + item.setCreatedBy("init_user"); + item.setCreatedTime(new Date()); + item.setUpdatedBy("init_user"); + item.setUpdatedTime(new Date()); log.debug("group:"+ JSON.toJSONString(item)); icFormItemGroupDao.insert(item); }); @@ -210,10 +233,42 @@ public class IcFormServiceImpl extends BaseServiceImpl item.setId(newPrefixed + item.getId()); item.setCustomerId(customerId); item.setFormItemId(newPrefixed + item.getFormItemId()); + item.setCreatedBy("init_user"); + item.setCreatedTime(new Date()); + item.setUpdatedBy("init_user"); + item.setUpdatedTime(new Date()); log.debug("query:"+ JSON.toJSONString(item)); icFormQueryBuilderDao.insert(item); }); + LambdaQueryWrapper wrapperStats = new LambdaQueryWrapper<>(); + wrapperStats.eq(IcResiCategoryStatsConfigEntity::getCustomerId, defaultCustomerId); + List statsConfigList = icResiCategoryStatsConfigDao.selectList(wrapperStats); + statsConfigList.forEach(item -> { + item.setId(newPrefixed + item.getId()); + item.setCustomerId(customerId); + item.setCreatedBy("init_user"); + item.setCreatedTime(new Date()); + item.setUpdatedBy("init_user"); + item.setUpdatedTime(new Date()); + log.debug("stats:"+ JSON.toJSONString(item)); + icResiCategoryStatsConfigDao.insert(item); + }); + + LambdaQueryWrapper wrapperWarn = new LambdaQueryWrapper<>(); + wrapperWarn.eq(IcResiCategoryWarnConfigEntity::getCustomerId, defaultCustomerId); + List warnConfigList = icResiCategoryWarnConfigDao.selectList(wrapperWarn); + warnConfigList.forEach(item -> { + item.setId(newPrefixed + item.getId()); + item.setCustomerId(customerId); + item.setCreatedBy("init_user"); + item.setCreatedTime(new Date()); + item.setUpdatedBy("init_user"); + item.setUpdatedTime(new Date()); + log.debug("stats:"+ JSON.toJSONString(item)); + icResiCategoryWarnConfigDao.insert(item); + }); + return "初始化成功!客户ID:" + customerId + " formCode:" + formCode; } } From 7f604ce4ad92992f9532b390e37cbdbe4c002632 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 11 Dec 2021 10:07:45 +0800 Subject: [PATCH 162/170] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8E=AA=E6=96=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcUserDemandRecServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 3a0f278b10..cc318638b6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -236,9 +236,9 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl userInfoMap=new HashMap<>(); - List userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toList()); + Set userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toSet()); if(CollectionUtils.isNotEmpty(userIdList)){ - Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIdList)); if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ throw new RenException("查询志愿者信息异常"); } From 4e7fc38f9459a0d89bc23deaeaeb7cd19d4d2b78 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 12 Dec 2021 18:23:19 +0800 Subject: [PATCH 163/170] CalPartyUnitSatisfactionFormDTO --- .../messages/CalPartyUnitSatisfactionFormDTO.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java new file mode 100644 index 0000000000..f852b2285a --- /dev/null +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java @@ -0,0 +1,15 @@ +package com.epmet.commons.rocketmq.messages; + + +import lombok.Data; + +import java.io.Serializable; + +/** + * 需求完成,如果服务方是区域化党建单位,重新计算这个单位的满意度,或者直接计算整个客户 + */ +@Data +public class CalPartyUnitSatisfactionFormDTO implements Serializable { + private String customerId; + private String partyUnitId; +} From 87f1cbdd37ac68f35ffab7390a20329df51dd586 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 12 Dec 2021 18:34:48 +0800 Subject: [PATCH 164/170] cal_party_unit_satisfaction --- .../commons/rocketmq/constants/ConsomerGroupConstants.java | 4 ++++ .../com/epmet/commons/rocketmq/constants/TopicConstants.java | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java index 93894c0bdb..400eca1d51 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java @@ -70,4 +70,8 @@ public interface ConsomerGroupConstants { */ String IC_WARN_STATS_EVENT_LISTENER_GROUP = "ic_warn_stats_event_listener_group"; + /** + * 需求完成,如果服务方是区域化党建单位,重新计算这个单位的满意度 + */ + String CAL_PARTY_UNIT_SATISFACTION = "cal_party_unit_satisfaction"; } diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java index 13217da550..e11400fef3 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java @@ -53,4 +53,9 @@ public interface TopicConstants { * 项目 */ String IC_RESI_USER = "ic_resi_user"; + + /** + * 需求完成,如果服务方是区域化党建单位,重新计算这个单位的满意度 + */ + String CAL_PARTY_UNIT_SATISFACTION = "cal_party_unit_satisfaction"; } From cd43854e7bb7092eddfbf3e31b03198cfaf78c6c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 12 Dec 2021 18:38:39 +0800 Subject: [PATCH 165/170] SystemMessageType.CAL_PARTY_UNIT_SATISFACTION --- .../src/main/java/com/epmet/constant/SystemMessageType.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java index 5d6cd6190c..284be1cb95 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java @@ -100,4 +100,8 @@ public interface SystemMessageType { */ String IC_RESI_USER_DEL = "ic_resi_user_del"; + /** + * 需求完成,如果服务方是区域化党建单位,重新计算这个单位的满意度 + */ + String CAL_PARTY_UNIT_SATISFACTION = "cal_party_unit_satisfaction"; } From 8fcd4a2a7282c86e9744f0b5aa3492ddf4c58cee Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 12 Dec 2021 19:04:16 +0800 Subject: [PATCH 166/170] SystemMessageType.CAL_PARTY_UNIT_SATISFACTION --- .../java/com/epmet/service/impl/SystemMessageServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java index c57bd798f6..ca4f862049 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java @@ -192,6 +192,9 @@ public class SystemMessageServiceImpl implements SystemMessageService { case SystemMessageType.IC_RESI_USER_DEL: topic = TopicConstants.IC_RESI_USER; break; + case SystemMessageType.CAL_PARTY_UNIT_SATISFACTION: + topic=TopicConstants.CAL_PARTY_UNIT_SATISFACTION; + break; } return topic; } From eb4e4df5e0d200adac13b822f21ce60f37e02c08 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 13 Dec 2021 08:35:22 +0800 Subject: [PATCH 167/170] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=BE=A4=E4=BC=97?= =?UTF-8?q?=E6=BB=A1=E6=84=8F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CalPartyUnitSatisfactionFormDTO.java | 4 + .../epmet-heart/epmet-heart-server/pom.xml | 22 ++++ .../controller/IcPartyUnitController.java | 15 +++ .../epmet/mq/RocketMQConsumerRegister.java | 31 ++++++ ...PartyUnitSatisfactionCalEventListener.java | 104 ++++++++++++++++++ .../com/epmet/service/IcPartyUnitService.java | 7 ++ .../service/impl/IcPartyUnitServiceImpl.java | 15 +++ .../impl/IcUserDemandRecServiceImpl.java | 18 +++ .../src/main/resources/bootstrap.yml | 5 +- 9 files changed, 220 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/listener/PartyUnitSatisfactionCalEventListener.java diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java index f852b2285a..bfaf63703a 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.commons.rocketmq.messages; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -10,6 +11,9 @@ import java.io.Serializable; */ @Data public class CalPartyUnitSatisfactionFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + @NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class) private String customerId; private String partyUnitId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index 648896a0c9..05ff205836 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -88,6 +88,12 @@ 2.0.0 compile + + + com.epmet + epmet-commons-rocketmq + 2.0.0 + @@ -152,6 +158,10 @@ https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4 SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd + + + true + 192.168.1.140:9876;192.168.1.141:9876 @@ -195,6 +205,10 @@ https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4 SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd + + + false + 192.168.1.140:9876;192.168.1.141:9876 @@ -238,6 +252,10 @@ https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4 SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd + + + true + 192.168.10.161:9876 @@ -281,6 +299,10 @@ https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + + + true + 192.168.11.187:9876;192.168.11.184:9876 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index ec06c3bf5f..90c500b87d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -17,6 +17,7 @@ package com.epmet.controller; +import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; @@ -150,4 +151,18 @@ public class IcPartyUnitController { public Result importData(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws IOException { return icPartyUnitService.importData(tokenDto, response, file); } + + + /** + * 计算区域化党建单位的群众满意度 + * + * @param formDTO + * @return + */ + @PostMapping("cal-partyunit-satisfation") + public Result calPartyUnitSatisfation(@RequestBody CalPartyUnitSatisfactionFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,CalPartyUnitSatisfactionFormDTO.AddUserInternalGroup.class); + icPartyUnitService.calPartyUnitSatisfation(formDTO); + return new Result(); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java new file mode 100644 index 0000000000..3f599eefc0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java @@ -0,0 +1,31 @@ +package com.epmet.mq; + +import com.epmet.commons.rocketmq.constants.ConsomerGroupConstants; +import com.epmet.commons.rocketmq.constants.TopicConstants; +import com.epmet.commons.rocketmq.register.MQAbstractRegister; +import com.epmet.commons.rocketmq.register.MQConsumerProperties; +import com.epmet.mq.listener.PartyUnitSatisfactionCalEventListener; +import org.apache.rocketmq.common.protocol.heartbeat.MessageModel; +import org.springframework.stereotype.Component; + +/** + * @Description 如果rocketmq.enable=true,这里必须实现,且 实例化 + * @author wxz + * @date 2021.07.14 17:13:41 +*/ +@Component +public class RocketMQConsumerRegister extends MQAbstractRegister { + + @Override + public void registerAllListeners(String env, MQConsumerProperties consumerProperties) { + // 客户初始化监听器注册 + register(consumerProperties, + ConsomerGroupConstants.CAL_PARTY_UNIT_SATISFACTION, + MessageModel.CLUSTERING, + TopicConstants.CAL_PARTY_UNIT_SATISFACTION, + "*", + new PartyUnitSatisfactionCalEventListener()); + + // ...其他监听器类似 + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/listener/PartyUnitSatisfactionCalEventListener.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/listener/PartyUnitSatisfactionCalEventListener.java new file mode 100644 index 0000000000..b7c3abc938 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/listener/PartyUnitSatisfactionCalEventListener.java @@ -0,0 +1,104 @@ +package com.epmet.mq.listener; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.rocketmq.constants.MQUserPropertys; +import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO; +import com.epmet.commons.tools.distributedlock.DistributedLock; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.service.IcPartyUnitService; +import org.apache.commons.lang.StringUtils; +import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; +import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; +import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently; +import org.apache.rocketmq.common.message.MessageExt; +import org.redisson.api.RLock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; +import java.util.concurrent.TimeUnit; + +/** + * @Description 计算区域化党建单位,群众满意度=分数相加➗ 需求的总个数。 + * @author wxz + * @date 2021.10.13 15:21:48 +*/ +public class PartyUnitSatisfactionCalEventListener implements MessageListenerConcurrently { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + private RedisUtils redisUtils; + + @Override + public ConsumeConcurrentlyStatus consumeMessage(List msgs, ConsumeConcurrentlyContext context) { + + if (redisUtils == null) { + redisUtils = SpringContextUtils.getBean(RedisUtils.class); + } + + try { + msgs.forEach(msg -> consumeMessage(msg)); + } catch (Exception e) { + logger.error(ExceptionUtils.getErrorStackTrace(e)); + return ConsumeConcurrentlyStatus.RECONSUME_LATER; + } + return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; + } + + private void consumeMessage(MessageExt messageExt) { + // msg即为消息体 + // tags为SystemMessageType.java中的项,为具体的操作,此处拿到tags,判断是创建还是变更,来做响应的后续操作即可 + String msg = new String(messageExt.getBody()); + String topic = messageExt.getTopic(); + String tags = messageExt.getTags(); + String pendingMsgLabel = messageExt.getUserProperty(MQUserPropertys.BLOCKED_MSG_LABEL); + + logger.info("【计算区域化党建单位群众满意度事件监听器】-需求完成-收到消息内容:{},操作:{}", msg, tags); + CalPartyUnitSatisfactionFormDTO obj = JSON.parseObject(msg, CalPartyUnitSatisfactionFormDTO.class); + + DistributedLock distributedLock = null; + RLock lock = null; + try { + distributedLock = SpringContextUtils.getBean(DistributedLock.class); + lock = distributedLock.getLock(String.format("lock:ic_warn_stats:%s", obj.getCustomerId()), + 30L, 30L, TimeUnit.SECONDS); + //待执行方法 + SpringContextUtils.getBean(IcPartyUnitService.class).calPartyUnitSatisfation(obj); + } catch (RenException e) { + // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 + logger.error("【计算区域化党建单位群众满意度事件监听器】-MQ失败:".concat(ExceptionUtils.getErrorStackTrace(e))); + } catch (Exception e) { + // 不是我们自己抛出的异常,可以让MQ重试 + logger.error("【计算区域化党建单位群众满意度监听器】-MQ失败:".concat(ExceptionUtils.getErrorStackTrace(e))); + throw e; + } finally { + distributedLock.unLock(lock); + } + + if (StringUtils.isNotBlank(pendingMsgLabel)) { + try { + removePendingMqMsgCache(pendingMsgLabel); + } catch (Exception e) { + logger.error("【计算区域化党建单位群众满意度监听器】-删除mq阻塞消息缓存失败:{}", ExceptionUtils.getErrorStackTrace(e)); + } + } + } + + /** + * @description + * + * @param pendingMsgLabel + * @return + * @author wxz + * @date 2021.10.14 16:32:32 + */ + private void removePendingMqMsgCache(String pendingMsgLabel) { + String key = RedisKeys.blockedMqMsgKey(pendingMsgLabel); + redisUtils.delete(key); + //logger.info("【开放数据事件监听器】删除mq阻塞消息缓存成功,blockedMsgLabel:{}", pendingMsgLabel); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index 8106d724fe..b303cab184 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -18,6 +18,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -120,4 +121,10 @@ public interface IcPartyUnitService extends BaseService { * @Date 2021/11/29 11:01 */ Result importData(TokenDto tokenDto, HttpServletResponse response, MultipartFile file) throws IOException; + + /** + * 计算区域化党建单位的群众满意度 + * @param formDTO + */ + void calPartyUnitSatisfation(CalPartyUnitSatisfactionFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 4931389ae0..78625590df 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -18,9 +18,11 @@ package com.epmet.service.impl; import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -370,6 +372,19 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl map, String matter) { List matters = Arrays.asList(matter.split(StrConstant.COLON)); List list = matters.stream().map(map::get).collect(Collectors.toList()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index cc318638b6..eec0f484eb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -20,6 +20,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -32,6 +33,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; import com.epmet.dao.IcUserDemandOperateLogDao; import com.epmet.dao.IcUserDemandRecDao; @@ -40,6 +42,7 @@ import com.epmet.dao.IcUserDemandServiceDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.CustomerGridFormDTO; +import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; @@ -47,6 +50,7 @@ import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; import com.epmet.entity.*; import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcResiDemandDictService; @@ -86,6 +90,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl page(Map params) { @@ -455,6 +461,18 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl Date: Mon, 13 Dec 2021 09:33:27 +0800 Subject: [PATCH 168/170] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=8C=96=E5=85=9A?= =?UTF-8?q?=E5=BB=BA=E5=8D=95=E4=BD=8D=E7=BE=A4=E4=BC=97=E6=BB=A1=E6=84=8F?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/demand/ServiceStatDTO.java | 23 +++++++++++++++++++ .../java/com/epmet/dao/IcPartyUnitDao.java | 3 +++ .../com/epmet/dao/IcUserDemandRecDao.java | 3 +++ .../epmet/service/IcUserDemandRecService.java | 10 ++++++++ .../service/impl/IcPartyUnitServiceImpl.java | 19 +++++++++++---- .../impl/IcUserDemandRecServiceImpl.java | 19 +++++++++++---- .../main/resources/mapper/IcPartyUnitDao.xml | 6 +++++ .../resources/mapper/IcUserDemandRecDao.xml | 22 ++++++++++++++++++ 8 files changed, 96 insertions(+), 9 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceStatDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceStatDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceStatDTO.java new file mode 100644 index 0000000000..2393e942d6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceStatDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.result.demand; + + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class ServiceStatDTO implements Serializable { + /** + * 服务方id + */ + private String serverId; + /** + * 总分 + */ + private BigDecimal totalScore; + /** + * 服务的需求个数 + */ + private Integer demandCount; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index caf1f6336c..4efaff7d84 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -23,6 +23,7 @@ import com.epmet.entity.IcPartyUnitEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.math.BigDecimal; import java.util.List; /** @@ -43,4 +44,6 @@ public interface IcPartyUnitDao extends BaseDao { List selectListByAgencyId(@Param("agencyIds") List agencyIds, @Param("unitName") String unitName, @Param("customerId")String customerId); + + int updateSatisfaction(@Param("partyUnitId") String serverId, @Param("satisfaction") BigDecimal satisfaction); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index a06f831778..3089b64be9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; import com.epmet.dto.form.demand.UserDemandPageFormDTO; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; +import com.epmet.dto.result.demand.ServiceStatDTO; import com.epmet.entity.IcUserDemandRecEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -56,4 +57,6 @@ public interface IcUserDemandRecDao extends BaseDao { * @return */ DemandRecResultDTO selectDemandRecDetail(@Param("customerId") String customerId, @Param("demandRecId") String demandRecId); + + List selectGroupByPartyUnit(@Param("customerId") String customerId, @Param("partyUnitId") String partyUnitId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index e3b719615e..0ed62b84be 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -23,6 +23,7 @@ import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; +import com.epmet.dto.result.demand.ServiceStatDTO; import com.epmet.entity.IcUserDemandRecEntity; import java.util.List; @@ -144,4 +145,13 @@ public interface IcUserDemandRecService extends BaseService groupByPartyUnit(String customerId, String partyUnitId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 78625590df..7e2f697833 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -43,6 +43,7 @@ import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.dto.result.demand.ServiceStatDTO; import com.epmet.entity.IcPartyUnitEntity; import com.epmet.excel.IcPartyUnitImportExcel; import com.epmet.feign.EpmetAdminOpenFeignClient; @@ -61,6 +62,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; @@ -108,6 +110,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl()); } + if(StringUtils.isBlank(item.getSatisfaction())){ + item.setSatisfaction(StrConstant.HYPHEN); + } }); PageInfo pageInfo = new PageInfo<>(dtoList); return new PageData<>(dtoList, pageInfo.getTotal()); @@ -374,15 +379,19 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list = icUserDemandRecService.groupByPartyUnit(formDTO.getCustomerId(), formDTO.getPartyUnitId()); + for (ServiceStatDTO serviceStatDTO : list) { + if (0 != serviceStatDTO.getDemandCount()) { + BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP); + baseDao.updateSatisfaction(serviceStatDTO.getServerId(),result); + } + } } private String getServiceMatter(Map map, String matter) { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index eec0f484eb..7f55c2ecfd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -48,6 +48,7 @@ import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.demand.DemandRecResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; +import com.epmet.dto.result.demand.ServiceStatDTO; import com.epmet.entity.*; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient; @@ -569,10 +570,20 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl groupByPartyUnit(String customerId, String partyUnitId) { + if(StringUtils.isBlank(customerId)&&StringUtils.isBlank(partyUnitId)){ + return new ArrayList<>(); + } + return baseDao.selectGroupByPartyUnit(customerId,partyUnitId); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index a346765fd8..024b33adf6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -46,4 +46,10 @@ + + update ic_party_unit + set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW() + where del_flag='0' + and id=#{partyUnitId} + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 33d491e2b4..f352685356 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -195,4 +195,26 @@ AND r.CUSTOMER_ID = #{customerId} and r.id=#{demandRecId} + + + \ No newline at end of file From 8580a2c467e6c843fef500d1f5bd56e46a7c70e0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 13 Dec 2021 10:44:17 +0800 Subject: [PATCH 169/170] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=8C=96=E5=85=9A?= =?UTF-8?q?=E5=BB=BA=E5=8D=95=E4=BD=8D=E6=BB=A1=E6=84=8F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/demand/FinishResultDTO.java | 15 ++++++++++++ .../controller/IcUserDemandRecController.java | 19 +++++++++++++-- .../epmet/service/IcUserDemandRecService.java | 3 ++- .../impl/IcUserDemandRecServiceImpl.java | 23 +++++++------------ 4 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java new file mode 100644 index 0000000000..96d03b9c2d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result.demand; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 完成需求时,是否需要计算 区域化党建单位的满意度 + * + */ +@Data +public class FinishResultDTO implements Serializable { + private Boolean sendCalStatisfaction; + private String partyUnitId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 9ce587e7b3..0d5567ad63 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -17,16 +17,21 @@ package com.epmet.controller; +import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; +import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandRecResultDTO; +import com.epmet.dto.result.demand.FinishResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -59,7 +64,8 @@ public class IcUserDemandRecController { private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService; @Autowired private IcPartyUnitService icPartyUnitService; - + @Autowired + private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; /** * 根据服务方类型查询 下拉框 @@ -178,7 +184,16 @@ public class IcUserDemandRecController { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO,FinishStaffFromDTO.AddUserShowGroup.class,FinishStaffFromDTO.AddUserInternalGroup.class); - icUserDemandRecService.finish(formDTO); + FinishResultDTO finishResultDTO=icUserDemandRecService.finish(formDTO); + if(finishResultDTO.getSendCalStatisfaction()){ + CalPartyUnitSatisfactionFormDTO mqMsg = new CalPartyUnitSatisfactionFormDTO(); + mqMsg.setCustomerId(formDTO.getCustomerId()); + mqMsg.setPartyUnitId(finishResultDTO.getPartyUnitId()); + SystemMsgFormDTO form = new SystemMsgFormDTO(); + form.setMessageType(SystemMessageType.CAL_PARTY_UNIT_SATISFACTION); + form.setContent(mqMsg); + epmetMessageOpenFeignClient.sendSystemMsgByMQ(form); + } return new Result(); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 0ed62b84be..87ffcaa67f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandRecResultDTO; +import com.epmet.dto.result.demand.FinishResultDTO; import com.epmet.dto.result.demand.IcResiUserReportDemandRes; import com.epmet.dto.result.demand.ServiceStatDTO; import com.epmet.entity.IcUserDemandRecEntity; @@ -128,7 +129,7 @@ public interface IcUserDemandRecService extends BaseService page(Map params) { @@ -414,7 +410,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl Date: Mon, 13 Dec 2021 13:35:29 +0800 Subject: [PATCH 170/170] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=8C=96=E5=85=9A?= =?UTF-8?q?=E5=BB=BA=E5=8D=95=E4=BD=8D=E6=BB=A1=E6=84=8F=E5=BA=A6=EF=BC=8C?= =?UTF-8?q?=E5=9B=9B=E8=88=8D=E4=BA=94=E5=85=A5=E4=BF=9D=E7=95=99=E4=B8=A4?= =?UTF-8?q?=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcPartyUnitServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 7e2f697833..5b49e3a276 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -112,6 +112,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl pageInfo = new PageInfo<>(dtoList);