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 01/44] =?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 02/44] =?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 03/44] =?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 04/44] =?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 06/44] =?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 07/44] =?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 08/44] =?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 09/44] =?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 10/44] =?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 11/44] =?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 12/44] =?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 13/44] =?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 14/44] 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 15/44] =?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 16/44] =?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 17/44] =?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 18/44] =?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 19/44] =?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 20/44] =?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 21/44] =?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 22/44] 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 23/44] =?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 24/44] =?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 25/44] 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 26/44] 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 27/44] 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 28/44] =?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 29/44] =?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 30/44] =?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 31/44] 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 35/44] =?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 36/44] =?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 37/44] =?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 38/44] =?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 39/44] =?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 43/44] 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 44/44] 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