From f8c5ae7324170d45e0946e49642206c2c322d1a0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 May 2023 10:48:17 +0800 Subject: [PATCH 01/68] =?UTF-8?q?=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/OrganizationMessageResultDTO.java | 9 ++ .../epmet-message-server/pom.xml | 5 - .../entity/OrganizationMessageEntity.java | 10 +- .../impl/OrganizationMessageServiceImpl.java | 93 ++++++++++++++++++- .../mapper/OrganizationMessageDao.xml | 2 + .../dto/form/RegisterRelationPageFormDTO.java | 33 +++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 8 ++ .../EpmetUserOpenFeignClientFallback.java | 11 +++ .../RegisterRelationController.java | 18 ++++ .../com/epmet/dao/RegisterRelationDao.java | 5 + .../service/RegisterRelationService.java | 12 +++ .../impl/RegisterRelationServiceImpl.java | 20 ++++ .../resources/mapper/RegisterRelationDao.xml | 17 +++- 13 files changed, 234 insertions(+), 9 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterRelationPageFormDTO.java diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java index 0d68bafe6d..08b6d88924 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java @@ -61,5 +61,14 @@ public class OrganizationMessageResultDTO { * 发布人所属组织名称 */ private String publishOrgName; + + /** + * 发送结果 + */ + private String sendMsgRes; + /** + * 共发送出多少条消息 + */ + private Integer totalReceiver; } diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index fef8b6bded..daa811ed8e 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -101,11 +101,6 @@ flyway-core - - com.epmet - epmet-user-client - 2.0.0 - com.epmet epmet-third-client diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java index 383720be2a..416f66793b 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java @@ -65,5 +65,13 @@ public class OrganizationMessageEntity extends BaseEpmetEntity { * 发布时间 */ private Date publishTime; - + /** + * 发送结果 + * sending发送中;failed失败;success成功 + */ + private String sendMsgRes; + /** + * 共发送出多少条消息 + */ + private Integer totalReceiver; } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java index cfc8daef6a..616228fc59 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java @@ -1,9 +1,15 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.constant.Constant; 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.enums.OrgTypeEnum; +import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; @@ -12,18 +18,26 @@ import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.PidUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.OrganizationMessageDao; import com.epmet.dao.OrganizationMessagePublishRangeDao; +import com.epmet.dao.UserMessageDao; import com.epmet.dto.OrganizationMessageFormDTO; import com.epmet.dto.OrganizationMessagePublishRangeDTO; +import com.epmet.dto.RegisterRelationDTO; +import com.epmet.dto.form.RegisterRelationPageFormDTO; import com.epmet.dto.result.OrganizationMessageResultDTO; import com.epmet.entity.OrganizationMessageEntity; import com.epmet.entity.OrganizationMessagePublishRangeEntity; +import com.epmet.entity.UserMessageEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.OrganizationMessageService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -36,10 +50,16 @@ import java.util.List; * @author generator generator@elink-cn.com * @since v1.0.0 2023-05-04 */ +@Slf4j @Service public class OrganizationMessageServiceImpl extends BaseServiceImpl implements OrganizationMessageService { @Autowired private OrganizationMessagePublishRangeDao organizationMessagePublishRangeDao; + @Autowired + private UserMessageDao userMessageDao; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + /** * 分页列表 @@ -93,6 +113,7 @@ public class OrganizationMessageServiceImpl extends BaseServiceImpl rangeList, String customerId) { + String result = "success"; + int totalMsg = NumConstant.ZERO; + try { + for (OrganizationMessagePublishRangeDTO rangeDto : rangeList) { + RegisterRelationPageFormDTO pageFormDTO=new RegisterRelationPageFormDTO(); + pageFormDTO.setCustomerId(customerId); + pageFormDTO.setFirstRegister(NumConstant.ONE_STR); + pageFormDTO.setPageNo(NumConstant.ONE); + pageFormDTO.setPageSize(NumConstant.TWO); + // pageFormDTO.setPageSize(NumConstant.ONE_THOUSAND); + if (OrgTypeEnum.GRID.getCode().equals(rangeDto.getOrgType())) { + // 查询该网格下的注册居民 + pageFormDTO.setGridId(rangeDto.getOrgId()); + } else { + // 查询该组织下的注册居民 + pageFormDTO.setAgencyIdPath(rangeDto.getOrgIdPath()); + } + List list=null; + do { + Result> regRes = epmetUserOpenFeignClient.pageQueryRegisterUser(pageFormDTO); + list = regRes.getData().getList(); + for (RegisterRelationDTO regUser : list) { + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper(); + queryWrapper.eq(UserMessageEntity::getCustomerId,customerId) + .eq(UserMessageEntity::getTargetId,messageId) + .eq(UserMessageEntity::getUserId,regUser.getUserId()); + UserMessageEntity origin=userMessageDao.selectOne(queryWrapper); + if(null==origin){ + UserMessageEntity userMessageEntity = new UserMessageEntity(); + userMessageEntity.setCustomerId(customerId); + userMessageEntity.setGridId(regUser.getGridId()); + userMessageEntity.setUserId(regUser.getUserId()); + userMessageEntity.setApp(AppClientConstant.APP_RESI); + userMessageEntity.setTitle("您有一条社区消息!"); + userMessageEntity.setMessageContent(content); + userMessageEntity.setReadFlag(Constant.UNREAD); + userMessageEntity.setReferer(StrConstant.EPMETY_STR); + userMessageEntity.setMessageType("organization_message"); + userMessageEntity.setTargetId(messageId); + userMessageEntity.setCreatedBy(publishStaffId); + userMessageEntity.setUpdatedBy(publishStaffId); + userMessageDao.insert(userMessageEntity); + totalMsg += 1; + } + } + pageFormDTO.setPageNo(pageFormDTO.getPageNo() + NumConstant.ONE); + } while (CollectionUtils.isNotEmpty(list) && list.size() == pageFormDTO.getPageSize()); + } + } catch (Exception e) { + log.error(String.format("messageId:%s,发送消息异常:%s", messageId, ExceptionUtils.getErrorStackTrace(e))); + result = "failed"; + } finally { + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(OrganizationMessageEntity::getId, messageId) + .set(OrganizationMessageEntity::getSendMsgRes, result) + .set(OrganizationMessageEntity::getTotalReceiver, totalMsg) + .set(OrganizationMessageEntity::getUpdatedTime,new Date()); + baseDao.update(null, updateWrapper); + } + } + + } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml index 742421c739..8e8bd51ad6 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml @@ -32,6 +32,8 @@ om.PUBLISH_ORG_ID as publishStaffName, om.PUBLISH_ORG_ID_PATH as publishOrgIdPath, OM.PUBLISH_ORG_NAME as publishOrgName, + om.SEND_MSG_RES as sendMsgRes, + om.TOTAL_RECEIVER as totalReceiver, GROUP_CONCAT(r.ORG_NAME) as publishRangeName from organization_message om left join organization_message_publish_range r diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterRelationPageFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterRelationPageFormDTO.java new file mode 100644 index 0000000000..bd1e28d424 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/RegisterRelationPageFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2023/5/5 9:47 + */ +@Data +public class RegisterRelationPageFormDTO extends PageFormDTO { + /** + * 客户Id (customer.id) + */ + private String customerId; + + /** + * agencyId的所有上级,包含自己 + */ + private String agencyIdPath; + + /** + * 网格Id (customer_grid.id) + */ + private String gridId; + + /** + * 首次注册用户 0表示不参与计数 1表示参与计数 + */ + private String firstRegister; +} + 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 c80eab326e..ddc7a635e7 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 @@ -1033,4 +1033,12 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icNat/clearNatRecords") Result clearNatRecords(@RequestBody Map map); + + /** + * 分页查询注册居民 + * @param pageFormDTO + * @return + */ + @PostMapping("/epmetuser/registerrelation/pageQueryRegisterUser") + Result> pageQueryRegisterUser(@RequestBody RegisterRelationPageFormDTO pageFormDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 4d3d56b76c..3bba7ced02 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -756,4 +756,15 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result clearNatRecords(Map map) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "clearNatRecords", map); } + + /** + * 分页查询注册居民 + * + * @param pageFormDTO + * @return + */ + @Override + public Result> pageQueryRegisterUser(RegisterRelationPageFormDTO pageFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "pageQueryRegisterUser", pageFormDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RegisterRelationController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RegisterRelationController.java index d801a5e6e9..77dd78bf9d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RegisterRelationController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/RegisterRelationController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.RegisterRelationDTO; import com.epmet.dto.form.AllResiByGridFormDTO; import com.epmet.dto.form.EnterGridFormDTO; +import com.epmet.dto.form.RegisterRelationPageFormDTO; import com.epmet.dto.result.UserInfoOnEnterGridResultDTO; import com.epmet.excel.RegisterRelationExcel; import com.epmet.service.RegisterRelationService; @@ -120,4 +121,21 @@ public class RegisterRelationController { ValidatorUtils.validateEntity(formDTO, AllResiByGridFormDTO.AllResiByGridForm.class); return new Result().ok(registerRelationService.getAllResiByGrid(formDTO)); } + + /** + * 分页查询注册居民信息 + * @param pageFormDTO + * @return + */ + @PostMapping("pageQueryRegisterUser") + public Result> pageQueryRegisterUser(@RequestBody RegisterRelationPageFormDTO pageFormDTO){ + return new Result>().ok(registerRelationService.pageQueryRegisterUser(pageFormDTO.getPageNo(), + pageFormDTO.getPageSize(), + pageFormDTO.getCustomerId(), + pageFormDTO.getGridId(), + pageFormDTO.getAgencyIdPath(), + pageFormDTO.getFirstRegister())); + } + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java index f5f4cdfd35..83ac08f940 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java @@ -71,4 +71,9 @@ public interface RegisterRelationDao extends BaseDao { * @date 2022/10/8 10:48 */ Integer getAllResiByGrid(@Param("gridId")String gridId); + + List pageQueryRegisterUser(@Param("customerId") String customerId, + @Param("gridId") String gridId, + @Param("agencyIdPath") String agencyIdPath, + @Param("firstRegister") String firstRegister); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java index 7179b78530..ed39bd6441 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java @@ -123,4 +123,16 @@ public interface RegisterRelationService extends BaseService pageQueryRegisterUser(Integer pageNo, Integer pageSize, String customerId, String gridId, String agencyIdPath, String firstRegister); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java index 11cca8346e..6091ab7cdb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java @@ -48,6 +48,8 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.GridVisitedService; import com.epmet.service.RegisterRelationService; import com.epmet.util.ModuleConstant; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -389,4 +391,22 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl pageQueryRegisterUser(Integer pageNo, Integer pageSize, String customerId, String gridId, String agencyIdPath, String firstRegister) { + PageHelper.startPage(pageNo,pageSize); + List resList=baseDao.pageQueryRegisterUser(customerId,gridId,agencyIdPath,firstRegister); + PageInfo pageInfo = new PageInfo<>(resList); + return new PageData<>(resList, pageInfo.getTotal()); + } } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml index c43cea28cc..f2e0506de3 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml @@ -97,5 +97,20 @@ AND grid_id = #{gridId} - + From 30c353f013d243b83309381bbca992294447d1da Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 May 2023 12:27:15 +0800 Subject: [PATCH 02/68] bugfix --- .../result/OrganizationMessageResultDTO.java | 4 ++++ .../OrganizationMessageController.java | 5 ++++- .../service/OrganizationMessageService.java | 5 +++++ .../impl/OrganizationMessageServiceImpl.java | 18 ++++++++++-------- .../mapper/OrganizationMessageDao.xml | 2 ++ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java index 08b6d88924..86ec079f87 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java @@ -1,9 +1,11 @@ package com.epmet.dto.result; +import com.epmet.dto.OrganizationMessagePublishRangeDTO; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.util.Date; +import java.util.List; /** * @Description 烟台消息管理,列表查询 @@ -70,5 +72,7 @@ public class OrganizationMessageResultDTO { * 共发送出多少条消息 */ private Integer totalReceiver; + + private List rangeList; } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/OrganizationMessageController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/OrganizationMessageController.java index ea14265f47..fac7d6d6d2 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/OrganizationMessageController.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/OrganizationMessageController.java @@ -67,7 +67,10 @@ public class OrganizationMessageController { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setPublishStaffId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, OrganizationMessageFormDTO.AddShowGroup.class); - return new Result().ok(organizationMessageService.publish(formDTO)); + String messageId=organizationMessageService.publish(formDTO); + // 发送消息 发布范围下有哪些网格,网格下所有的注册居民,每人发送一条消息 + organizationMessageService.sendUserMsg(messageId,formDTO.getContent(),formDTO.getPublishStaffId(),formDTO.getRangeList(),formDTO.getCustomerId()); + return new Result().ok(messageId); } } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/OrganizationMessageService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/OrganizationMessageService.java index 18299bb1c5..8932b557b4 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/OrganizationMessageService.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/OrganizationMessageService.java @@ -3,9 +3,12 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.OrganizationMessageFormDTO; +import com.epmet.dto.OrganizationMessagePublishRangeDTO; import com.epmet.dto.result.OrganizationMessageResultDTO; import com.epmet.entity.OrganizationMessageEntity; +import java.util.List; + /** * 组织发布消息(烟台) * @@ -39,4 +42,6 @@ public interface OrganizationMessageService extends BaseService rangeList, String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java index 616228fc59..51b1924af7 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java @@ -15,10 +15,7 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.EpmetRequestHolder; -import com.epmet.commons.tools.utils.PidUtils; -import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.*; import com.epmet.dao.OrganizationMessageDao; import com.epmet.dao.OrganizationMessagePublishRangeDao; import com.epmet.dao.UserMessageDao; @@ -79,7 +76,7 @@ public class OrganizationMessageServiceImpl extends BaseServiceImpl list = baseDao.pageList(EpmetRequestHolder.getLoginUserCustomerId(),staffOrgIdPath, publishDitch, orgId, startDate, endDate,null); PageInfo pageInfo = new PageInfo<>(list); - return new PageData<>(list, pageInfo.getTotal()); + return new PageData<>(list, pageInfo.getTotal(),pageSize); } /** @@ -92,7 +89,13 @@ public class OrganizationMessageServiceImpl extends BaseServiceImpl list = baseDao.pageList(EpmetRequestHolder.getLoginUserCustomerId(),null, null, null, null, null,messageId); if(CollectionUtils.isNotEmpty(list)){ - return list.get(NumConstant.ZERO); + OrganizationMessageResultDTO resultDTO=list.get(NumConstant.ZERO); + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + queryWrapper.eq(OrganizationMessagePublishRangeEntity::getMessageId,messageId) + .orderByAsc(OrganizationMessagePublishRangeEntity::getCreatedTime); + List rangeList=organizationMessagePublishRangeDao.selectList(queryWrapper); + resultDTO.setRangeList(ConvertUtils.sourceToTarget(rangeList,OrganizationMessagePublishRangeDTO.class)); + return resultDTO; } return null; } @@ -138,13 +141,12 @@ public class OrganizationMessageServiceImpl extends BaseServiceImpl rangeList, String customerId) { String result = "success"; int totalMsg = NumConstant.ZERO; diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml index 8e8bd51ad6..a1e5dcb6c8 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/OrganizationMessageDao.xml @@ -30,6 +30,7 @@ om.PUBLISH_TIME as publishTime, om.PUBLISH_STAFF_ID as publishStaffId, om.PUBLISH_ORG_ID as publishStaffName, + om.PUBLISH_ORG_ID as publishOrgId, om.PUBLISH_ORG_ID_PATH as publishOrgIdPath, OM.PUBLISH_ORG_NAME as publishOrgName, om.SEND_MSG_RES as sendMsgRes, @@ -58,6 +59,7 @@ and om.id =#{messageId} + group by om.id order by om.PUBLISH_TIME desc \ No newline at end of file From 330e2bfc8211ac5decac0892d4101f572a78c222 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 May 2023 14:10:59 +0800 Subject: [PATCH 03/68] /message/organization/message/list;NullPointerException --- .../epmet/service/impl/OrganizationMessageServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java index 51b1924af7..29c9a9bf48 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java @@ -9,6 +9,8 @@ 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.enums.OrgTypeEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; @@ -72,6 +74,9 @@ public class OrganizationMessageServiceImpl extends BaseServiceImpl pageList(Integer pageNo, Integer pageSize, String publishDitch, String orgId, String startDate, String endDate) { CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); + if (null == staffInfoCacheResult) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "customerId:" + EpmetRequestHolder.getLoginUserCustomerId() + "staffId:" + EpmetRequestHolder.getLoginUserId(), "获取工作人员信息异常"); + } String staffOrgIdPath = PidUtils.convertPid2OrgIdPath(staffInfoCacheResult.getAgencyId(), staffInfoCacheResult.getAgencyPIds()); PageHelper.startPage(pageNo, pageSize); List list = baseDao.pageList(EpmetRequestHolder.getLoginUserCustomerId(),staffOrgIdPath, publishDitch, orgId, startDate, endDate,null); From b511b7a6671ef1d09d9495ef53bd8f24c4cdbdf4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 May 2023 14:27:50 +0800 Subject: [PATCH 04/68] FINISH_SEND_TIME --- .../com/epmet/dto/result/OrganizationMessageResultDTO.java | 6 ++++++ .../java/com/epmet/entity/OrganizationMessageEntity.java | 5 +++++ .../epmet/service/impl/OrganizationMessageServiceImpl.java | 1 + .../src/main/resources/mapper/OrganizationMessageDao.xml | 1 + 4 files changed, 13 insertions(+) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java index 86ec079f87..94b89ded76 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/OrganizationMessageResultDTO.java @@ -73,6 +73,12 @@ public class OrganizationMessageResultDTO { */ private Integer totalReceiver; + /** + * 发送完成时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date finishSendTime; + private List rangeList; } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java index 416f66793b..15c07c0851 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/OrganizationMessageEntity.java @@ -74,4 +74,9 @@ public class OrganizationMessageEntity extends BaseEpmetEntity { * 共发送出多少条消息 */ private Integer totalReceiver; + + /** + * 发送完成时间 + */ + private Date finishSendTime; } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java index 29c9a9bf48..65580da84c 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/OrganizationMessageServiceImpl.java @@ -209,6 +209,7 @@ public class OrganizationMessageServiceImpl extends BaseServiceImpl Date: Sat, 6 May 2023 10:52:52 +0800 Subject: [PATCH 05/68] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=83=9F=E5=8F=B0=E9=9C=80=E6=B1=82=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/AddStaffV2FromDTO.java | 34 +++++++++++++++++++ .../epmet/dto/form/StaffSubmitFromDTO.java | 33 ++++++++++++++++++ .../java/com/epmet/dto/CustomerStaffDTO.java | 25 ++++++++++++++ .../com/epmet/entity/CustomerStaffEntity.java | 28 +++++++++++++++ .../impl/CustomerStaffServiceImpl.java | 24 +++++++++++++ 5 files changed, 144 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java index 7bc3b93076..4250c5ca61 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java @@ -78,4 +78,38 @@ public class AddStaffV2FromDTO implements Serializable { * 烟台用:当前登录用户 */ private String currentUserId; + + /** + * 烟台需求:党组织职务 + */ + private String partyPosition; + + /** + * 烟台需求:村居委员职务 + */ + private String viliagePosition; + + /** + * 烟台需求:工作职责 + */ + private String duty; + + /** + * 烟台需求:备注 + */ + private String remark; + /** + * 文化程度 + */ + private String culture; + /** + * 身份证 + */ + private String idCard; + + /** + * 居住地址 + */ + private String address; + } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java index f39bde7aab..a3ecf0f06f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java @@ -74,4 +74,37 @@ public class StaffSubmitFromDTO implements Serializable { * 社会自组织: community_org */ private String deptType; + + /** + * 烟台需求:党组织职务 + */ + private String partyPosition; + + /** + * 烟台需求:村居委员职务 + */ + private String viliagePosition; + + /** + * 烟台需求:工作职责 + */ + private String duty; + + /** + * 烟台需求:备注 + */ + private String remark; + /** + * 文化程度 + */ + private String culture; + /** + * 身份证 + */ + private String idCard; + + /** + * 居住地址 + */ + private String address; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java index cd042877ab..fddf4fc83d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java @@ -150,4 +150,29 @@ public class CustomerStaffDTO implements Serializable { */ private String idCard; + /** + * 烟台需求:党组织职务 + */ + private String partyPosition; + + /** + * 烟台需求:村居委员职务 + */ + private String viliagePosition; + + /** + * 烟台需求:工作职责 + */ + private String duty; + + /** + * 烟台需求:备注 + */ + private String remark; + /** + * 文化程度 + */ + private String culture; + + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java index aa19464f9e..3d26a85c76 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java @@ -111,4 +111,32 @@ public class CustomerStaffEntity extends BaseEpmetEntity { * 身份证号 */ private String idCard; + + + /** + * 烟台需求:党组织职务 + */ + private String partyPosition; + + /** + * 烟台需求:村居委员职务 + */ + private String viliagePosition; + + /** + * 烟台需求:工作职责 + */ + private String duty; + + /** + * 烟台需求:备注 + */ + private String remark; + /** + * 文化程度 + */ + private String culture; + + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 1ff4560c99..0212da4168 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -370,6 +370,30 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Sat, 6 May 2023 11:02:07 +0800 Subject: [PATCH 06/68] =?UTF-8?q?=E5=86=B2=E7=AA=81=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/CustomerStaffDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java index 32f05ca6e6..ce231a91f4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java @@ -149,7 +149,6 @@ public class CustomerStaffDTO implements Serializable { * 身份证号 */ private String idCard; - private String culture; private Date birthday; /** From 52c573be1847ed0815d992568ee854d90b03b0e0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 13:04:35 +0800 Subject: [PATCH 07/68] =?UTF-8?q?ic=5Fproperty=5Fmanagement=E8=A1=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=81=94=E7=B3=BB=E4=BA=BA=EF=BC=8C=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E7=94=B5=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/IcPropertyManagementDTO.java | 10 ++++++++ .../dto/form/IcPropertyManagementFormDTO.java | 12 +++++++++ .../PropertyManagementController.java | 15 +++++++++-- .../entity/IcPropertyManagementEntity.java | 9 +++++++ .../impl/PropertyManagementServiceImpl.java | 25 ++++++++++++++++--- 5 files changed, 66 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java index a276e36387..171cbeb01c 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java @@ -48,6 +48,16 @@ public class IcPropertyManagementDTO implements Serializable { */ private String customerId; + /** + * 烟台需求:物业联系人姓名 + */ + private String contactName; + + /** + * 烟台需求:物业联系人电话 + */ + private String contactMobile; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java index bbc2cd7152..220a2b7488 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java @@ -52,6 +52,18 @@ public class IcPropertyManagementFormDTO implements Serializable { @Length(max = 50, message = "物业名称不能超过50个字", groups = {AddShowGroup.class}) private String name; + /** + * 烟台需求:物业联系人姓名 + */ + @Length(max = 30, message = "物业联系人不能超过30个字", groups = {AddShowGroup.class, UpdateShowGroup.class}) + private String contactName; + + /** + * 烟台需求:物业联系人电话 + */ + @Length(max = 30, message = "联系电话不能超过30个字",groups = {AddShowGroup.class, UpdateShowGroup.class}) + private String contactMobile; + private String customerId; @NotNull(message = "pageNo不能为空", groups = PageGroup.class) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index ba24389143..047a98d802 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -49,8 +49,9 @@ public class PropertyManagementController { @Autowired private PropertyManagementService propertyManagementService; + /** - * 分页查询物业列表 + * 物业管理-分页查询物业列表 */ @PostMapping("page") public Result> page(@RequestBody IcPropertyManagementFormDTO formDTO){ @@ -68,7 +69,7 @@ public class PropertyManagementController { } /** - * 新增物业 + * 物业管理-新增物业 * 新增小区页面,添加小区也调用此接口 * @param tokenDTO * @param formDTO @@ -84,6 +85,11 @@ public class PropertyManagementController { return new Result().ok(map); } + /** + * 物业管理-修改 + * @param formDTO + * @return + */ @PostMapping("update") public Result update(@RequestBody IcPropertyManagementFormDTO formDTO){ //效验数据 @@ -92,6 +98,11 @@ public class PropertyManagementController { return new Result(); } + /** + * 物业管理-删除 + * @param formDTO + * @return + */ @PostMapping("delete") public Result delete(@RequestBody IcPropertyManagementFormDTO formDTO){ //效验数据 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPropertyManagementEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPropertyManagementEntity.java index 239fce61cc..c0ea9df16d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPropertyManagementEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPropertyManagementEntity.java @@ -40,4 +40,13 @@ public class IcPropertyManagementEntity extends BaseEpmetEntity { */ private String name; private String customerId; + /** + * 烟台需求:物业联系人姓名 + */ + private String contactName; + + /** + * 烟台需求:物业联系人电话 + */ + private String contactMobile; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 41d2f7bfbc..cb782f36d7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -22,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.ArrayList; +import java.util.Date; import java.util.List; @Slf4j @@ -73,6 +75,10 @@ public class PropertyManagementServiceImpl implements PropertyManagementService return icPropertyManagementEntity.getId(); } + /** + * 物业管理-修改 + * @param formDTO + */ @Override @Transactional(rollbackFor = Exception.class) public void update(IcPropertyManagementFormDTO formDTO) { @@ -80,8 +86,14 @@ public class PropertyManagementServiceImpl implements PropertyManagementService if (null != entity) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"物业名称已存在","物业名称已存在"); } - IcPropertyManagementEntity icPropertyManagementEntity = ConvertUtils.sourceToTarget(formDTO, IcPropertyManagementEntity.class); - icPropertyManagementDao.updateById(icPropertyManagementEntity); + LambdaUpdateWrapper updateWrapper=new LambdaUpdateWrapper<>(); + updateWrapper.eq(IcPropertyManagementEntity::getId,formDTO.getId()) + .set(IcPropertyManagementEntity::getName,formDTO.getName()) + .set(IcPropertyManagementEntity::getContactName,formDTO.getContactName()) + .set(IcPropertyManagementEntity::getContactMobile,formDTO.getContactMobile()) + .set(IcPropertyManagementEntity::getUpdatedTime,new Date()) + .set(IcPropertyManagementEntity::getUpdatedBy,EpmetRequestHolder.getLoginUserId()); + icPropertyManagementDao.update(null,updateWrapper); } /** @@ -99,11 +111,18 @@ public class PropertyManagementServiceImpl implements PropertyManagementService icPropertyManagementDao.deleteById(formDTO.getId()); } + /** + * 物业管理-列表查询 + * @param pageNo + * @param pageSize + * @param name + * @return + */ @Override public PageData page(Integer pageNo, Integer pageSize, String name) { PageHelper.startPage(pageNo,pageSize); List list=icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(),name); PageInfo pageInfo = new PageInfo<>(list); - return new PageData<>(list, pageInfo.getTotal()); + return new PageData<>(list, pageInfo.getTotal(),pageSize); } } From 8ae98006d230d3f8c95b33e9cd18aa468629d632 Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Sat, 6 May 2023 13:27:12 +0800 Subject: [PATCH 08/68] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/epmetuser/CustomerStaffDTO.java | 35 +++++++++++++++++ .../dto/govorg/form/StaffDetailV2FormDTO.java | 39 +++++++++++++++++++ .../epmet/dto/result/StaffInitResultDTO.java | 29 ++++++++++++++ .../impl/CustomerStaffServiceImpl.java | 13 +++++++ 4 files changed, 116 insertions(+) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/CustomerStaffDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/CustomerStaffDTO.java index dec7a89cc7..61df5ba791 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/CustomerStaffDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/CustomerStaffDTO.java @@ -134,4 +134,39 @@ public class CustomerStaffDTO implements Serializable { */ private String password; + /** + * 烟台用:当前登录用户 + */ + private String currentUserId; + + /** + * 烟台需求:党组织职务 + */ + private String partyPosition; + + /** + * 烟台需求:村居委员职务 + */ + private String viliagePosition; + + /** + * 烟台需求:工作职责 + */ + private String duty; + + /** + * 烟台需求:备注 + */ + private String remark; + /** + * 文化程度 + */ + private String culture; + /** + * 身份证 + */ + private String idCard; + + + } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java index ea1763af18..5e75cbdeab 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/StaffDetailV2FormDTO.java @@ -48,4 +48,43 @@ public class StaffDetailV2FormDTO implements Serializable { private List szsqRoles; private String customerId; + /** + * 烟台用:当前登录用户 + */ + private String currentUserId; + + /** + * 烟台需求:党组织职务 + */ + private String partyPosition; + + /** + * 烟台需求:村居委员职务 + */ + private String viliagePosition; + + /** + * 烟台需求:工作职责 + */ + private String duty; + + /** + * 烟台需求:备注 + */ + private String remark; + /** + * 文化程度 + */ + private String culture; + /** + * 身份证 + */ + private String idCard; + + /** + * 居住地址 + */ + private String address; + + } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java index 87b641b564..90e325a2f1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInitResultDTO.java @@ -55,4 +55,33 @@ public class StaffInitResultDTO implements Serializable { * xxx-xxx */ private String agencyName; + + + /** + * 烟台需求:党组织职务 + */ + private String partyPosition; + + /** + * 烟台需求:村居委员职务 + */ + private String viliagePosition; + + /** + * 烟台需求:工作职责 + */ + private String duty; + + /** + * 烟台需求:备注 + */ + private String remark; + /** + * 文化程度 + */ + private String culture; + + private String address; + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 0212da4168..8f308d06ac 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -304,6 +304,12 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Sat, 6 May 2023 13:29:43 +0800 Subject: [PATCH 09/68] =?UTF-8?q?gov/org/propertymanagement/page=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=81=94=E7=B3=BB=E4=BA=BA=EF=BC=8C=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E7=94=B5=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/PropertyManagementController.java | 3 ++- .../main/java/com/epmet/dao/IcPropertyManagementDao.java | 5 ++++- .../java/com/epmet/service/PropertyManagementService.java | 2 +- .../epmet/service/impl/PropertyManagementServiceImpl.java | 2 +- .../src/main/resources/mapper/IcPropertyManagementDao.xml | 6 ++++++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index 047a98d802..d65ba66296 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -56,7 +56,8 @@ public class PropertyManagementController { @PostMapping("page") public Result> page(@RequestBody IcPropertyManagementFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO,IcPropertyManagementFormDTO.PageGroup.class); - return new Result>().ok(propertyManagementService.page(formDTO.getPageNo(),formDTO.getPageSize(),formDTO.getName())); + return new Result>().ok(propertyManagementService.page(formDTO.getPageNo(),formDTO.getPageSize(),formDTO.getName(), + formDTO.getContactName(),formDTO.getContactMobile())); } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java index 915b2f6d7d..69124d0459 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java @@ -59,5 +59,8 @@ public interface IcPropertyManagementDao extends BaseDao selectPropertyNameList(String neighborhoodId); - List queryList(@Param("customerId") String customerId,@Param("name")String name); + List queryList(@Param("customerId") String customerId, + @Param("name")String name, + @Param("contactName") String contactName, + @Param("contactMobile") String contactMobile); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java index f3f77cde27..cae9715bd1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java @@ -39,5 +39,5 @@ public interface PropertyManagementService { void update(IcPropertyManagementFormDTO formDTO); void delete(IcPropertyManagementFormDTO formDTO); - PageData page(Integer pageNo, Integer pageSize, String name); + PageData page(Integer pageNo, Integer pageSize, String name,String contactName,String contactMobile); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index cb782f36d7..643cdbacb9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -119,7 +119,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService * @return */ @Override - public PageData page(Integer pageNo, Integer pageSize, String name) { + public PageData page(Integer pageNo, Integer pageSize, String name,String contactName,String contactMobile) { PageHelper.startPage(pageNo,pageSize); List list=icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(),name); PageInfo pageInfo = new PageInfo<>(list); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml index 045514482f..2035e53020 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml @@ -80,6 +80,12 @@ and m.name like concat('%',#{name},'%') + + and m.CONTACT_NAME like concat('%',#{contactName},'%') + + + and m.CONTACT_MOBILE like concat('%',#{contactMobile},'%') + order by m.CREATED_TIME desc \ No newline at end of file From 31fee9c480500ecdbc4aa1ca3e9ee3e4d88f9210 Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Sat, 6 May 2023 14:26:36 +0800 Subject: [PATCH 10/68] =?UTF-8?q?=E7=83=9F=E5=8F=B0=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E3=80=81=E6=96=B0=E5=A2=9E=E7=BB=84=E7=BB=87=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddAgencyV2FormDTO.java | 26 ++++++++++++++++++ .../epmet/entity/CustomerAgencyEntity.java | 27 +++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyV2FormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyV2FormDTO.java index 63bf3c6e55..1427330c53 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyV2FormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyV2FormDTO.java @@ -124,4 +124,30 @@ public class AddAgencyV2FormDTO implements Serializable { */ @Length(max = 500,message ="最多输入500字",groups =DefaultUserShowGroup.class ) private String remark; + + /** + * 村居/社区书记姓名 + */ + private String secretaryName; + /** + * 村居/社区书记电话 + */ + private String secretaryMobile; + /** + * 值班电话 + */ + private String dutyMobile; + /** + * 统一社会信用代码 + */ + private String unifiedSocialCreditCode; + /** + * 统一社会信用代码证书(图片附件) + */ + private String unifiedSocialCreditCodeCertificate; + + /** + * 详细地址 + */ + private String fullAddress; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java index a2668ae5fd..236a8c3181 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java @@ -149,4 +149,31 @@ public class CustomerAgencyEntity extends BaseEpmetEntity { */ private String remark; + + /** + * 村居/社区书记姓名 + */ + private String secretaryName; + /** + * 村居/社区书记电话 + */ + private String secretaryMobile; + /** + * 值班电话 + */ + private String dutyMobile; + /** + * 统一社会信用代码 + */ + private String unifiedSocialCreditCode; + /** + * 统一社会信用代码证书(图片附件) + */ + private String unifiedSocialCreditCodeCertificate; + + /** + * 详细地址 + */ + private String fullAddress; + } From 2a2511d3e12135455b23fe6d2d7c5f9181b39d8f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 14:33:08 +0800 Subject: [PATCH 11/68] =?UTF-8?q?gov/org/propertymanagement/page=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=81=94=E7=B3=BB=E4=BA=BA=EF=BC=8C=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E7=94=B5=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/PropertyManagementServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 643cdbacb9..e816556e07 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -121,7 +121,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService @Override public PageData page(Integer pageNo, Integer pageSize, String name,String contactName,String contactMobile) { PageHelper.startPage(pageNo,pageSize); - List list=icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(),name); + List list=icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(),name,contactName,contactMobile); PageInfo pageInfo = new PageInfo<>(list); return new PageData<>(list, pageInfo.getTotal(),pageSize); } From 0efcc3578f48c3b0e8221af89475eb5a275598d5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 14:58:57 +0800 Subject: [PATCH 12/68] =?UTF-8?q?=E6=A5=BC=E6=A0=8B=E5=8D=95=E5=85=83?= =?UTF-8?q?=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../CommunityBuildingManagerPageFormDTO.java | 80 ++++++++++ .../result/CommunityBuildingManagerDTO.java | 110 +++++++++++++ .../yt/CommunityBuildingManagerResultDTO.java | 102 +++++++++++++ .../CommunityBuildingManagerController.java | 111 ++++++++++++++ .../dao/CommunityBuildingManagerDao.java | 50 ++++++ .../CommunityBuildingManagerEntity.java | 86 +++++++++++ .../CommunityBuildingManagerService.java | 66 ++++++++ .../CommunityBuildingManagerServiceImpl.java | 144 ++++++++++++++++++ .../mapper/CommunityBuildingManagerDao.xml | 94 ++++++++++++ 10 files changed, 844 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/yt/CommunityBuildingManagerPageFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityBuildingManagerDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CommunityBuildingManagerDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CommunityBuildingManagerEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CommunityBuildingManagerDao.xml diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml index 86b39b69c8..186ba27276 100644 --- a/epmet-cloud-generator/src/main/resources/application.yml +++ b/epmet-cloud-generator/src/main/resources/application.yml @@ -9,7 +9,7 @@ spring: type: com.alibaba.druid.pool.DruidDataSource #MySQL配置 driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://118.190.150.119:43306/epmet_gov_org?useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://192.168.1.140:3306/epmet_gov_org?useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: root #oracle配置 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/yt/CommunityBuildingManagerPageFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/yt/CommunityBuildingManagerPageFormDTO.java new file mode 100644 index 0000000000..f4fd8bbbda --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/yt/CommunityBuildingManagerPageFormDTO.java @@ -0,0 +1,80 @@ +package com.epmet.dto.form.yt; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2023/5/6 13:53 + */ +@Data +public class CommunityBuildingManagerPageFormDTO extends PageFormDTO { + // start + private String customerId; + private String staffId; + /** + * 工作人员所属组织的org_id_path + * 列表数据应查询本组织及下级 + * 网格的全路径,包含网格id + */ + private String orgIdPath; + // end + + + /** + * 姓名 + */ + private String name; + + /** + * 联系电话 + */ + private String phone; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 类型:0楼长;1单元长 + */ + private String type; + + /** + * 所属区县id;取名字关联customer_agency + */ + private String districtId; + + /** + * 所属街道id;取名字关联customer_agency + */ + private String streetId; + + /** + * 所属社区id;取名字关联customer_agency + */ + private String communityId; + + /** + * 所属网格id;取名字关联customer_grid + */ + private String gridId; + + /** + * 所属小区id + */ + private String viliageId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 所属单元id; 单元长时必填此列 + */ + private String unitId; +} + diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityBuildingManagerDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityBuildingManagerDTO.java new file mode 100644 index 0000000000..062fe0b7b7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityBuildingManagerDTO.java @@ -0,0 +1,110 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * 楼长单元长信息表(烟台) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-06 + */ +@Data +public class CommunityBuildingManagerDTO implements Serializable { + + private static final long serialVersionUID = -2526419541953300212L; + public interface AddShowGroup extends CustomerClientShowGroup { + } + + public interface UpdateShowGroup extends CustomerClientShowGroup { + } + /** + * 主键(烟台需求) + */ + @NotBlank(message ="id不能为空" ,groups = {UpdateShowGroup.class}) + private String id; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 姓名 + */ + @Length(max = 50,message = "姓名最多输入50字",groups = {AddShowGroup.class,UpdateShowGroup.class}) + @NotBlank(message ="姓名不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String name; + + /** + * 联系电话 + */ + @Length(max = 50,message = "联系电话最多输入50字",groups = {AddShowGroup.class,UpdateShowGroup.class}) + @NotBlank(message ="联系电话不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String phone; + + /** + * 身份证号 + */ + @Length(max = 50,message = "身份证号最多输入50字",groups = {AddShowGroup.class,UpdateShowGroup.class}) + @NotBlank(message ="身份证号不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String idCard; + + /** + * 类型:0楼长;1单元长 + */ + @NotBlank(message ="类型不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String type; + + /** + * 所属区县id;取名字关联customer_agency + */ + @NotBlank(message ="所属区县不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String districtId; + + /** + * 所属街道id;取名字关联customer_agency + */ + @NotBlank(message ="所属街道不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String streetId; + + /** + * 所属社区id;取名字关联customer_agency + */ + @NotBlank(message ="所属社区不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String communityId; + + /** + * 所属网格id;取名字关联customer_grid + */ + @NotBlank(message ="所属网格不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String gridId; + + /** + * 网格的全路径,包含网格id + */ + private String orgIdPath; + + /** + * 所属小区id + */ + @NotBlank(message ="所属小区不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String viliageId; + + /** + * 所属楼栋id + */ + @NotBlank(message ="楼栋不能为空" ,groups = {AddShowGroup.class,UpdateShowGroup.class}) + private String buildingId; + + /** + * 所属单元id; 单元长时必填此列 + */ + private String unitId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java new file mode 100644 index 0000000000..1d2df38f08 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java @@ -0,0 +1,102 @@ +package com.epmet.dto.result.yt; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 楼长单元长信息表(烟台) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-06 + */ +@Data +public class CommunityBuildingManagerResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键(烟台需求) + */ + private String id; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 姓名 + */ + private String name; + + /** + * 联系电话 + */ + private String phone; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 类型:0楼长;1单元长 + */ + private String type; + + /** + * 所属区县id;取名字关联customer_agency + */ + private String districtId; + private String districtName; + /** + * 所属街道id;取名字关联customer_agency + */ + private String streetId; + private String streetName; + + /** + * 所属社区id;取名字关联customer_agency + */ + private String communityId; + private String communityName; + + /** + * 所属网格id;取名字关联customer_grid + */ + private String gridId; + private String gridName; + + /** + * 网格的全路径,包含网格id + */ + private String orgIdPath; + + /** + * 所属小区id + */ + private String viliageId; + /** + * 所属小区id + */ + private String viliageName; + + /** + * 所属楼栋id + */ + private String buildingId; + private String buildingName; + + /** + * 所属单元id; 单元长时必填此列 + */ + private String unitId; + /** + * 所属单元id; 单元长时必填此列 + */ + private String unitName; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java new file mode 100644 index 0000000000..264e37c895 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java @@ -0,0 +1,111 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +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.yt.CommunityBuildingManagerPageFormDTO; +import com.epmet.dto.result.CommunityBuildingManagerDTO; +import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; +import com.epmet.service.CommunityBuildingManagerService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * 楼长单元长信息表(烟台) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-06 + */ +@RestController +@RequestMapping("communityBuildingManager") +public class CommunityBuildingManagerController { + + @Autowired + private CommunityBuildingManagerService communityBuildingManagerService; + + /** + * 列表分页查询 + * @param formDTO + * @return + */ + @RequestMapping("page") + public Result> page(@LoginUser TokenDto tokenDto, @RequestBody CommunityBuildingManagerPageFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + PageData page = communityBuildingManagerService.page(formDTO); + return new Result>().ok(page); + } + + /** + * 查看详情 + * @param id + * @return + */ + @RequestMapping(value = "detail/{id}",method = {RequestMethod.POST}) + public Result get(@PathVariable("id") String id){ + CommunityBuildingManagerResultDTO data = communityBuildingManagerService.get(id); + return new Result().ok(data); + } + + /** + * 新增楼长/单元长 + * todo: 同步到具体的楼栋 + * @param dto + * @return + */ + @NoRepeatSubmit + @PostMapping("save") + public Result save(@LoginUser TokenDto tokenDto,@RequestBody CommunityBuildingManagerDTO dto){ + dto.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(dto, CommunityBuildingManagerDTO.AddShowGroup.class); + //类型:0楼长;1单元长 + if("1".equals(dto.getType())&& StringUtils.isBlank(dto.getUnitId())){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"单元长必须选择所属单元","单元长必须选择所属单元"); + } + communityBuildingManagerService.save(dto); + return new Result(); + } + + /** + * 编辑楼长/单元长 + * todo: 同步到具体的楼栋 + * @param dto + * @return + */ + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CommunityBuildingManagerDTO dto){ + ValidatorUtils.validateEntity(dto, CommunityBuildingManagerDTO.UpdateShowGroup.class); + //类型:0楼长;1单元长 + if("1".equals(dto.getType())&& StringUtils.isBlank(dto.getUnitId())){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"单元长必须选择所属单元","单元长必须选择所属单元"); + } + communityBuildingManagerService.update(dto); + return new Result(); + } + + /** + * 批量删除楼长/单元长 + * todo: 同时清空楼栋表里的信息 + * @param ids + * @return + */ + @PostMapping("delete") + public Result delete(@RequestBody List ids){ + if(!CollectionUtils.isEmpty(ids)){ + communityBuildingManagerService.delete(ids); + } + return new Result(); + } + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CommunityBuildingManagerDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CommunityBuildingManagerDao.java new file mode 100644 index 0000000000..e6c19b0d26 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CommunityBuildingManagerDao.java @@ -0,0 +1,50 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; +import com.epmet.entity.CommunityBuildingManagerEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 楼长单元长信息表(烟台) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-06 + */ +@Mapper +public interface CommunityBuildingManagerDao extends BaseDao { + /** + * 楼长单元长分页列表查询 + * @param customerId + * @param orgIdPath + * @param name + * @param phone + * @param idCard + * @param type + * @param districtId + * @param streetId + * @param communityId + * @param gridId + * @param viliageId + * @param buildingId + * @param unitId + * @return + */ + List pageList(@Param("customerId") String customerId, + @Param("orgIdPath")String orgIdPath, + @Param("name")String name, + @Param("phone")String phone, + @Param("idCard")String idCard, + @Param("type")String type, + @Param("districtId")String districtId, + @Param("streetId")String streetId, + @Param("communityId")String communityId, + @Param("gridId")String gridId, + @Param("viliageId")String viliageId, + @Param("buildingId")String buildingId, + @Param("unitId")String unitId, + @Param("id")String id); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CommunityBuildingManagerEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CommunityBuildingManagerEntity.java new file mode 100644 index 0000000000..c2ac9184b9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CommunityBuildingManagerEntity.java @@ -0,0 +1,86 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 楼长单元长信息表(烟台) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("community_building_manager") +public class CommunityBuildingManagerEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 姓名 + */ + private String name; + + /** + * 联系电话 + */ + private String phone; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 类型:0楼长;1单元长 + */ + private String type; + + /** + * 所属区县id;取名字关联customer_agency + */ + private String districtId; + + /** + * 所属街道id;取名字关联customer_agency + */ + private String streetId; + + /** + * 所属社区id;取名字关联customer_agency + */ + private String communityId; + + /** + * 所属网格id;取名字关联customer_grid + */ + private String gridId; + + /** + * 网格的全路径,包含网格id + */ + private String orgIdPath; + + /** + * 所属小区id + */ + private String viliageId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 所属单元id; 单元长时必填此列 + */ + private String unitId; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java new file mode 100644 index 0000000000..b67d4d0d35 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java @@ -0,0 +1,66 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.form.yt.CommunityBuildingManagerPageFormDTO; +import com.epmet.dto.result.CommunityBuildingManagerDTO; +import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; +import com.epmet.entity.CommunityBuildingManagerEntity; + +import java.util.List; + +/** + * 楼长单元长信息表(烟台) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-06 + */ +public interface CommunityBuildingManagerService extends BaseService { + + /** + * 默认分页 + * + * @param formDTO + * @return PageData + * @author generator + * @date 2023-05-06 + */ + PageData page(CommunityBuildingManagerPageFormDTO formDTO); + + /** + * 查看详情 + * + * @param id + * @return CommunityBuildingManagerResultDTO + * @author generator + * @date 2023-05-06 + */ + CommunityBuildingManagerResultDTO get(String id); + + /** + * 新增楼长/单元长 + * todo: 同步到具体的楼栋表 + * + * @param dto + * @return + */ + void save(CommunityBuildingManagerDTO dto); + + /** + * 编辑楼长/单元长 + * todo: 同步到具体的楼栋 + * + * @param dto + * @return + */ + void update(CommunityBuildingManagerDTO dto); + + /** + * 批量删除楼长/单元长 + * todo: 同时清空楼栋表里的信息 + * + * @param ids + * @return + */ + void delete(List ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java new file mode 100644 index 0000000000..4693ce14b3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java @@ -0,0 +1,144 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +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.EpmetRequestHolder; +import com.epmet.commons.tools.utils.PidUtils; +import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.dao.CommunityBuildingManagerDao; +import com.epmet.dto.CustomerGridDTO; +import com.epmet.dto.form.yt.CommunityBuildingManagerPageFormDTO; +import com.epmet.dto.result.CommunityBuildingManagerDTO; +import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; +import com.epmet.entity.CommunityBuildingManagerEntity; +import com.epmet.service.CommunityBuildingManagerService; +import com.epmet.service.CustomerGridService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +/** + * 楼长单元长信息表(烟台) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-05-06 + */ +@Service +public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl implements CommunityBuildingManagerService { + + /** + * 列表分页查询 + * + * @param formDTO + * @return + */ + @Override + public PageData page(CommunityBuildingManagerPageFormDTO formDTO) { + // 默认查询本组织及下级 + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfoCacheResult) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询工作人员信息异常staffId:" + formDTO.getStaffId(), "查询工作人员信息异常"); + } + formDTO.setOrgIdPath(PidUtils.convertPid2OrgIdPath(staffInfoCacheResult.getAgencyId(), staffInfoCacheResult.getAgencyPIds())); + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List resList = baseDao.pageList(formDTO.getCustomerId(), + formDTO.getOrgIdPath(), + formDTO.getName(), + formDTO.getPhone(), + formDTO.getIdCard(), + formDTO.getType(), + formDTO.getDistrictId(), + formDTO.getStreetId(), + formDTO.getCommunityId(), + formDTO.getGridId(), + formDTO.getViliageId(), + formDTO.getBuildingId(), + formDTO.getUnitId(), null); + PageInfo pageInfo = new PageInfo<>(resList); + return new PageData<>(resList, pageInfo.getTotal()); + } + + /** + * 查看详情 + * + * @param id + * @return + */ + @Override + public CommunityBuildingManagerResultDTO get(String id) { + List resList = baseDao.pageList(EpmetRequestHolder.getLoginUserCustomerId(), + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, id); + if (CollectionUtils.isEmpty(resList)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "community_building_manager表记录不存在:id:" + id, "记录不存在"); + } + return resList.get(NumConstant.ZERO); + } + + /** + * 新增楼长/单元长 + * todo: 同步到具体的楼栋表 + * + * @param addFormDto + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CommunityBuildingManagerDTO addFormDto) { + // 唯一性判断,同一个楼可以有多个楼长吗?待定。。。 + CommunityBuildingManagerEntity entity = ConvertUtils.sourceToTarget(addFormDto, CommunityBuildingManagerEntity.class); + CustomerGridDTO gridDTO = SpringContextUtils.getBean(CustomerGridService.class).get(addFormDto.getGridId()); + entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(gridDTO.getId(), gridDTO.getPids())); + insert(entity); + } + + /** + * 编辑楼长/单元长 + * todo: 同步到具体的楼栋 + * + * @param updateFormDto + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CommunityBuildingManagerDTO updateFormDto) { + CommunityBuildingManagerEntity entity = ConvertUtils.sourceToTarget(updateFormDto, CommunityBuildingManagerEntity.class); + CustomerGridDTO gridDTO = SpringContextUtils.getBean(CustomerGridService.class).get(updateFormDto.getGridId()); + entity.setOrgIdPath(PidUtils.convertPid2OrgIdPath(gridDTO.getId(), gridDTO.getPids())); + updateById(entity); + } + + /** + * 批量删除楼长/单元长 + * todo: 同时清空楼栋表里的信息 + * + * @param ids + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(List ids) { + baseDao.deleteBatchIds(ids); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CommunityBuildingManagerDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CommunityBuildingManagerDao.xml new file mode 100644 index 0000000000..74b789763b --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CommunityBuildingManagerDao.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 6349bdc821d42a926785efe12841e56fcafaaa32 Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Sat, 6 May 2023 14:59:05 +0800 Subject: [PATCH 13/68] =?UTF-8?q?=E7=83=9F=E5=8F=B0=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E3=80=81=E6=96=B0=E5=A2=9E=E5=B0=8F=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcNeighborHoodDTO.java | 16 ++++++++++++++++ .../dto/form/IcNeighborHoodAddFormDTO.java | 17 ++++++++++++++++- .../com/epmet/entity/IcNeighborHoodEntity.java | 17 +++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java index 8e39699670..66c41f6342 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java @@ -165,4 +165,20 @@ public class IcNeighborHoodDTO implements Serializable { */ private String buildingName; + /** + * 烟台需求:自然村/小区 + */ + private String viliageType; + /** + * 烟台需求:面积 + */ + private String area; + /** + * 烟台需求:开放类型 + */ + private String openType; + /** + * 烟台需求:建筑年代 + */ + private String buildYear; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java index 854462c6e1..f975c75048 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java @@ -113,6 +113,21 @@ public class IcNeighborHoodAddFormDTO extends PageFormDTO { * 实有楼栋数 */ private Integer realBuilding; - + /** + * 烟台需求:自然村/小区 + */ + private String viliageType; + /** + * 烟台需求:面积 + */ + private String area; + /** + * 烟台需求:开放类型 + */ + private String openType; + /** + * 烟台需求:建筑年代 + */ + private String buildYear; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java index 26e278fd16..2d67d4259b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java @@ -121,4 +121,21 @@ public class IcNeighborHoodEntity extends BaseEpmetEntity { * 二维码地址 */ private String qrcodeUrl; + + /** + * 烟台需求:自然村/小区 + */ + private String viliageType; + /** + * 烟台需求:面积 + */ + private String area; + /** + * 烟台需求:开放类型 + */ + private String openType; + /** + * 烟台需求:建筑年代 + */ + private String buildYear; } From 1d6f0a78549c9c02f05cdfd3e63bbeb19df314a5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 15:25:18 +0800 Subject: [PATCH 14/68] =?UTF-8?q?=E6=A5=BC=E6=A0=8B=E5=8D=95=E5=85=83?= =?UTF-8?q?=E9=95=BFfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java | 3 --- .../service/impl/CommunityBuildingManagerServiceImpl.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java index 1d2df38f08..ffb2fc69c8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityBuildingManagerResultDTO.java @@ -78,9 +78,6 @@ public class CommunityBuildingManagerResultDTO implements Serializable { * 所属小区id */ private String viliageId; - /** - * 所属小区id - */ private String viliageName; /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java index 4693ce14b3..0d7593f50c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java @@ -65,7 +65,7 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl pageInfo = new PageInfo<>(resList); - return new PageData<>(resList, pageInfo.getTotal()); + return new PageData<>(resList, pageInfo.getTotal(),formDTO.getPageSize()); } /** From 6453e1c29626c844a9a89ee3e0ad4bfefafa47ef Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 15:43:52 +0800 Subject: [PATCH 15/68] =?UTF-8?q?=E5=8C=BA=E5=8E=BF=E3=80=81=E8=A1=97?= =?UTF-8?q?=E9=81=93=E3=80=81=E7=A4=BE=E5=8C=BA=E4=B8=8B=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CustomerAgencyController.java | 54 +++++++++++++++++++ .../impl/CustomerAgencyServiceImpl.java | 20 +++---- 2 files changed, 65 insertions(+), 9 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 3d26395c0e..fad4233d80 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -19,6 +19,9 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.enums.OrgLevelEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; @@ -41,6 +44,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -564,4 +568,54 @@ public class CustomerAgencyController { return new Result>().ok(customerAgencyService.getCommunityList(dto)); } + /** + * 返回区县列表 + * @param tokenDto + * @return + */ + @PostMapping("districtList") + public Result> districtList(@LoginUser TokenDto tokenDto){ + Map params=new HashMap<>(); + params.put("CUSTOMER_ID",tokenDto.getCustomerId()); + params.put("LEVEL",OrgLevelEnum.DISTRICT.getCode()); + params.put("PID",null); + return new Result>().ok(customerAgencyService.list(params)); + } + + /** + * 返回街道列表,必传区县 + * @param tokenDto + * @param districtId + * @return + */ + @PostMapping("streetList/{districtId}") + public Result> streetList(@LoginUser TokenDto tokenDto,@PathVariable("districtId")String districtId){ + if(StringUtils.isBlank(districtId)){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"districtId为空","请先选择区县"); + } + Map params=new HashMap<>(); + params.put("CUSTOMER_ID",tokenDto.getCustomerId()); + params.put("LEVEL",OrgLevelEnum.STREET.getCode()); + params.put("PID",districtId); + return new Result>().ok(customerAgencyService.list(params)); + } + + /** + * 返回社区列表,街道必传 + * @param tokenDto + * @param streetId + * @return + */ + @PostMapping("communityList/{streetId}") + public Result> communityList(@LoginUser TokenDto tokenDto,@PathVariable("streetId")String streetId){ + if(StringUtils.isBlank(streetId)){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"streetId为空","请先选择街道"); + } + Map params=new HashMap<>(); + params.put("CUSTOMER_ID",tokenDto.getCustomerId()); + params.put("LEVEL",OrgLevelEnum.COMMUNITY.getCode()); + params.put("PID",streetId); + return new Result>().ok(customerAgencyService.list(params)); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 4585f7481d..87f0555690 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -18,7 +18,6 @@ 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.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -45,7 +44,6 @@ import com.epmet.constant.CustomerGridConstant; import com.epmet.dao.*; import com.epmet.dto.*; import com.epmet.dto.form.*; -import com.epmet.dto.region.LogOperationResultDTO; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerDepartmentEntity; @@ -136,12 +134,16 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl getWrapper(Map params) { - String id = (String) params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - + private LambdaQueryWrapper getWrapper(Map map) { + String id = map.containsKey(FieldConstant.ID_HUMP) ? (String) map.get(FieldConstant.ID_HUMP) : null; + String customerId = map.containsKey("CUSTOMER_ID") ? (String) map.get("CUSTOMER_ID") : null; + String level = map.containsKey("LEVEL") ? (String) map.get("LEVEL") : null; + String pid = map.containsKey("PID") ? (String) map.get("PID") : null; + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), CustomerAgencyEntity::getId, id) + .eq(StringUtils.isNotBlank(customerId), CustomerAgencyEntity::getCustomerId, customerId) + .eq(StringUtils.isNotBlank(level), CustomerAgencyEntity::getLevel, level) + .eq(StringUtils.isNotBlank(pid), CustomerAgencyEntity::getPid, pid); return wrapper; } @@ -1244,7 +1246,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl agencyList, List gridList) { From 6f58e991382e0f2490b5e88c3a886bc12f4b206e Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Sat, 6 May 2023 16:10:43 +0800 Subject: [PATCH 16/68] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/IcHouseAddFormDTO.java | 8 ++++++++ .../src/main/java/com/epmet/entity/IcHouseEntity.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java index aa4e6a999b..11d5ce0295 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java @@ -112,5 +112,13 @@ public class IcHouseAddFormDTO implements Serializable { * 房屋可编辑编码 */ private String coding; + /** + * 所在楼层 + */ + private String floor; + /** + * 面积 + */ + private String area; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java index 96e993c865..983b876709 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java @@ -136,4 +136,12 @@ public class IcHouseEntity extends BaseEpmetEntity { * 房屋可编辑编码 */ private String coding; + /** + * 所在楼层 + */ + private String floor; + /** + * 面积 + */ + private String area; } From d3009dfeaf3c9819ca4d92a60d4a60e2d019d97e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 18:01:52 +0800 Subject: [PATCH 17/68] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=92=8C=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=B1=85=E6=B0=91=EF=BC=8C=E8=AF=81=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/processor/YanTaiTripReportSyncProcessor.java | 4 +--- .../com/epmet/service/impl/IcResiUserServiceImpl.java | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/processor/YanTaiTripReportSyncProcessor.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/processor/YanTaiTripReportSyncProcessor.java index 6b1d4a028d..1bb4afd991 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/processor/YanTaiTripReportSyncProcessor.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/processor/YanTaiTripReportSyncProcessor.java @@ -6,17 +6,15 @@ import com.epmet.service.DataSyncConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; import static com.epmet.constant.EpidemicConstant.JOB_TYPE_TRIP_REPORT; -import static com.epmet.constant.EpidemicConstant.JOB_TYPE_VACCINE; /** * @Description 烟台行程上报数据同步处理器 * @Author zxc * @Date 2022/11/22 14:08 */ -@Component +// @Component @Slf4j public class YanTaiTripReportSyncProcessor extends AbstractDataSyncJobProcessor { 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 b10ab41c03..98c22b85ff 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 @@ -366,8 +366,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl Date: Sat, 6 May 2023 18:28:45 +0800 Subject: [PATCH 18/68] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/EditAgencyFormDTO.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java index 2d0da966d0..af4e9a36e2 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java @@ -113,4 +113,30 @@ public class EditAgencyFormDTO implements Serializable { @Length(max = 500,message = "最多输入500字",groups =DefaultUserShowGroup.class ) private String remark; + + /** + * 村居/社区书记姓名 + */ + private String secretaryName; + /** + * 村居/社区书记电话 + */ + private String secretaryMobile; + /** + * 值班电话 + */ + private String dutyMobile; + /** + * 统一社会信用代码 + */ + private String unifiedSocialCreditCode; + /** + * 统一社会信用代码证书(图片附件) + */ + private String unifiedSocialCreditCodeCertificate; + + /** + * 详细地址 + */ + private String fullAddress; } \ No newline at end of file From 05f60d37787427a90f37dc378997f54eeba3409e Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Sat, 6 May 2023 18:31:14 +0800 Subject: [PATCH 19/68] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/AgencysResultDTO.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java index f95c6349a4..7ca182856f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java @@ -137,4 +137,30 @@ public class AgencysResultDTO implements Serializable { private String remark; private String coordinates; + + /** + * 村居/社区书记姓名 + */ + private String secretaryName; + /** + * 村居/社区书记电话 + */ + private String secretaryMobile; + /** + * 值班电话 + */ + private String dutyMobile; + /** + * 统一社会信用代码 + */ + private String unifiedSocialCreditCode; + /** + * 统一社会信用代码证书(图片附件) + */ + private String unifiedSocialCreditCodeCertificate; + + /** + * 详细地址 + */ + private String fullAddress; } \ No newline at end of file From 1de597c2c244c6bf87ccd461bdc4a11d5ad50c3d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 18:48:06 +0800 Subject: [PATCH 20/68] dictOption/{dictType} --- .../controller/SysDictDataController.java | 13 ++++++++ .../com/epmet/service/SysDictDataService.java | 2 ++ .../service/impl/SysDictDataServiceImpl.java | 31 +++++++++++++++++++ 3 files changed, 46 insertions(+) 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 ce18026bf8..1a51f32c0e 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 @@ -20,6 +20,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.SysDictDataDTO; import com.epmet.service.SysDictDataService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -118,6 +119,18 @@ public class SysDictDataController { return new Result>().ok(sysDictDataService.getNationOption()); } + /** + * 字典下拉框接口 + * @param dictType + * @return + */ + @PostMapping("dictOption/{dictType}") + public Result> getDictOption(@PathVariable("dictType")String dictType) { + if(StringUtils.isBlank(dictType)){ + return new Result<>(); + } + return new Result>().ok(sysDictDataService.getDictOption(dictType)); + } /** * @Description 人员关系 * @Param 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 6277ab6d2f..52de66b46d 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 @@ -92,4 +92,6 @@ public interface SysDictDataService extends BaseService { List dictListTree(String dictType); List getDictDataList(String dictType); + + List getDictOption(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 a7b6bff903..52c44b78f6 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 @@ -19,13 +19,17 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.TreeUtils; import com.epmet.dao.SysDictDataDao; +import com.epmet.dao.SysDictTypeDao; import com.epmet.dto.SysDictDataDTO; import com.epmet.entity.SysDictDataEntity; +import com.epmet.entity.SysDictTypeEntity; import com.epmet.service.SysDictDataService; 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.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -38,6 +42,9 @@ import java.util.stream.Collectors; */ @Service public class SysDictDataServiceImpl extends BaseServiceImpl implements SysDictDataService { + @Autowired + private SysDictTypeDao sysDictTypeDao; + @Override public PageData page(Map params) { @@ -230,4 +237,28 @@ public class SysDictDataServiceImpl extends BaseServiceImpl getDictOption(String dictType) { + LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); + queryWrapper.eq(SysDictTypeEntity::getDictType,dictType); + SysDictTypeEntity sysDictTypeEntity=sysDictTypeDao.selectOne(queryWrapper); + if(null==sysDictTypeEntity){ + return new ArrayList<>(); + } + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(SysDictDataEntity::getDictTypeId,sysDictTypeEntity.getId() ); + wrapper.orderByAsc(SysDictDataEntity::getSort); + List list = baseDao.selectList(wrapper); + return list.stream().map(item -> { + OptionResultDTO dto = new OptionResultDTO(); + dto.setValue(item.getDictValue()); + dto.setLabel(item.getDictLabel()); + return dto; + }).collect(Collectors.toList()); + } } From 049c9b47af35b34ff4e996f7e286f5e621364a89 Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Sat, 6 May 2023 19:38:53 +0800 Subject: [PATCH 21/68] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/CustomerStaffServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 8f308d06ac..213f990d83 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -389,7 +389,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Sat, 6 May 2023 20:43:04 +0800 Subject: [PATCH 22/68] =?UTF-8?q?=E7=83=9F=E5=8F=B0=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=A2=9E=E5=8A=A0=E9=87=8D=E7=82=B9=E4=BA=BA?= =?UTF-8?q?=E7=BE=A4=E3=80=81=E5=9B=BD=E7=B1=8D=E3=80=81=E4=BA=BA=E5=8F=A3?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E3=80=81=E6=95=B4=E6=B2=BB=E9=9D=A2=E8=B2=8C?= =?UTF-8?q?=EF=BC=9B=E4=BF=AE=E6=94=B9=E8=AF=81=E4=BB=B6=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcResiUserDTO.java | 25 +++++++++++++++++++ .../com/epmet/entity/IcResiUserEntity.java | 24 ++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java index bf93b3b225..d16310d77c 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java @@ -105,6 +105,11 @@ public class IcResiUserDTO implements Serializable { */ private String idCard; + /** + * 证件类型。烟台需求:来源于字典表dict_type=yt_id_card_type;1:身份证号;2:护照;3:港澳通行证;4:军人证;5:台胞证;6:其他 + */ + private String idCardType; + /** * 出生日期 */ @@ -125,6 +130,26 @@ public class IcResiUserDTO implements Serializable { */ private String contactsMobile; + /** + * 烟台需求:重点人群;名称对应字典表,dict_type:yt_key_point_user_type + */ + private String keyPointUserType; + + /** + * 烟台需求:国籍 + */ + private String nationality; + + /** + * 烟台需求:人口类型;名称对应字典表,dict_type:yt_population_type + */ + private String populationType; + + /** + * 烟台需求:政治面貌;名称对应字典表,dict_type:yt_politics_status + */ + private String politicsStatus; + /** * 九小场所url */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java index a78fae885d..eda20ac933 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java @@ -102,7 +102,7 @@ public class IcResiUserEntity extends BaseEpmetEntity { private String idCard; /** - * 证件类型。1:身份证号;2:护照 + * 证件类型。烟台需求:来源于字典表dict_type=yt_id_card_type;1:身份证号;2:护照;3:港澳通行证;4:军人证;5:台胞证;6:其他 */ private String idCardType; @@ -126,7 +126,27 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String contactsMobile; - /** + /** + * 烟台需求:重点人群;名称对应字典表,dict_type:yt_key_point_user_type + */ + private String keyPointUserType; + + /** + * 烟台需求:国籍 + */ + private String nationality; + + /** + * 烟台需求:人口类型;名称对应字典表,dict_type:yt_population_type + */ + private String populationType; + + /** + * 烟台需求:政治面貌;名称对应字典表,dict_type:yt_politics_status + */ + private String politicsStatus; + + /** * 九小场所url */ private String ninePlace; From 6e771a6d2db0211d300adde4001173f8acd71f5c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 6 May 2023 21:15:07 +0800 Subject: [PATCH 23/68] =?UTF-8?q?=E7=83=9F=E5=8F=B0=E9=9C=80=E6=B1=82?= =?UTF-8?q?=EF=BC=9A=E4=B8=8E=E6=88=B7=E4=B8=BB=E5=85=B3=E7=B3=BB=EF=BC=88?= =?UTF-8?q?60=EF=BC=89=E5=AF=B9=E5=BA=94=E5=AD=97=E5=85=B8=E8=A1=A8dict=5F?= =?UTF-8?q?type:yt=5FHouseholder=5Frelationship=5Ftype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcResiUserDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/IcResiUserEntity.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java index d16310d77c..3098207e44 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java @@ -490,6 +490,11 @@ public class IcResiUserDTO implements Serializable { */ private String jtxxRemakes; + /** + * 烟台需求:与户主关系(60)对应字典表dict_type:yt_Householder_relationship_type + */ + private String yt_yhzgx; + /** * 用户状态【0:正常;1:迁出;2:注销】 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java index eda20ac933..33037d487c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java @@ -480,6 +480,11 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String jtxxRemakes; + /** + * 烟台需求:与户主关系(60)对应字典表dict_type:yt_Householder_relationship_type + */ + private String yt_yhzgx; + /** * 用户状态【0:正常;1:迁出;2:注销】 */ From 00de29ab2806b8e45ea4dac7385c5add38bb7267 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 7 May 2023 09:17:26 +0800 Subject: [PATCH 24/68] =?UTF-8?q?=E6=88=B7=E7=B1=8D=E6=89=80=E5=9C=A8?= =?UTF-8?q?=E5=9C=B0=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A=EF=BC=8C?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E6=B5=AA=E6=BD=AE=E9=82=A3=E7=9A=84=E6=88=B7?= =?UTF-8?q?=E7=B1=8D=E8=AF=A6=E7=BB=86=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcResiUserDTO.java | 4 ++-- .../src/main/java/com/epmet/entity/IcResiUserEntity.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java index 3098207e44..31a6740e6b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java @@ -426,9 +426,9 @@ public class IcResiUserDTO implements Serializable { private String jg; /** - * 户籍所在地 + * 户籍所在地;烟台需求:对应户籍详细地址 */ - private String hjszd; + private String hjszd; /** * 现居住地 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java index 33037d487c..427d18a897 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java @@ -415,9 +415,9 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String jg; - /** - * 户籍所在地 - */ + /** + * 户籍所在地;烟台需求:对应户籍详细地址 + */ private String hjszd; /** From c4dd042be2033c924a1d6d8f67544863f2a395fa Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 7 May 2023 09:19:52 +0800 Subject: [PATCH 25/68] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AFic=5F?= =?UTF-8?q?resi=5Fuser=E5=A2=9E=E5=8A=A0=E6=88=B7=E7=B1=8D=E3=80=81?= =?UTF-8?q?=E5=B1=85=E4=BD=8F=E7=AD=8921=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcResiUserDTO.java | 105 ++++++++++++++++++ .../com/epmet/entity/IcResiUserEntity.java | 105 ++++++++++++++++++ 2 files changed, 210 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java index 31a6740e6b..62541c7469 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java @@ -440,6 +440,111 @@ public class IcResiUserDTO implements Serializable { */ private String rhzk; + /** + * 烟台需求:是否现居住;0否;1是,对应字典表dict_type: + */ + private String isNowLive; + + /** + * 烟台需求:居住省 + */ + private String livingProvince; + + /** + * 烟台需求:居住市 + */ + private String livingCity; + + /** + * 烟台需求:居住区 + */ + private String livingArea; + + /** + * 烟台需求:居住街道 + */ + private String livingStreet; + + /** + * 烟台需求:居住社区 + */ + private String livingCommunity; + + /** + * 烟台需求:居住小区 + */ + private String livingViliageName; + + /** + * 烟台需求:居住楼号 + */ + private String livingBuildingNo; + + /** + * 烟台需求:居住单元号 + */ + private String livingUnitNo; + + /** + * 烟台需求:居住房间号 + */ + private String livingHouseNo; + + /** + * 烟台需求:户籍所在省 + */ + private String registerProvince; + + /** + * 烟台需求:户籍所在市 + */ + private String registerCity; + + /** + * 烟台需求:户籍所在区县 + */ + private String registerArea; + + /** + * 烟台需求:户籍所在街道 + */ + private String registerStreet; + + /** + * 烟台需求:户籍所在社区 + */ + private String registerCommunity; + + /** + * 烟台需求:户籍所在小区名称 + */ + private String registerViliageName; + + /** + * 烟台需求:户籍楼号 + */ + private String registerBuildingNo; + + /** + * 烟台需求:户籍单元号 + */ + private String registerUnitNo; + + /** + * 烟台需求:户籍房间号 + */ + private String registerHouseNo; + + /** + * 烟台需求:户别;对应字典表dict_type:yt_household_category + */ + private String householdCategory; + + /** + * 烟台需求:户号 + */ + private String houseHoldId; + /** * 居住信息备注 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java index 427d18a897..961f69dfe9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java @@ -430,6 +430,111 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String rhzk; + /** + * 烟台需求:是否现居住;0否;1是,对应字典表dict_type: + */ + private String isNowLive; + + /** + * 烟台需求:居住省 + */ + private String livingProvince; + + /** + * 烟台需求:居住市 + */ + private String livingCity; + + /** + * 烟台需求:居住区 + */ + private String livingArea; + + /** + * 烟台需求:居住街道 + */ + private String livingStreet; + + /** + * 烟台需求:居住社区 + */ + private String livingCommunity; + + /** + * 烟台需求:居住小区 + */ + private String livingViliageName; + + /** + * 烟台需求:居住楼号 + */ + private String livingBuildingNo; + + /** + * 烟台需求:居住单元号 + */ + private String livingUnitNo; + + /** + * 烟台需求:居住房间号 + */ + private String livingHouseNo; + + /** + * 烟台需求:户籍所在省 + */ + private String registerProvince; + + /** + * 烟台需求:户籍所在市 + */ + private String registerCity; + + /** + * 烟台需求:户籍所在区县 + */ + private String registerArea; + + /** + * 烟台需求:户籍所在街道 + */ + private String registerStreet; + + /** + * 烟台需求:户籍所在社区 + */ + private String registerCommunity; + + /** + * 烟台需求:户籍所在小区名称 + */ + private String registerViliageName; + + /** + * 烟台需求:户籍楼号 + */ + private String registerBuildingNo; + + /** + * 烟台需求:户籍单元号 + */ + private String registerUnitNo; + + /** + * 烟台需求:户籍房间号 + */ + private String registerHouseNo; + + /** + * 烟台需求:户别;对应字典表dict_type:yt_household_category + */ + private String householdCategory; + + /** + * 烟台需求:户号 + */ + private String houseHoldId; + /** * 居住信息备注 */ From f9031d61c540a0d96b7338927a5ccef40bdc4e48 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 7 May 2023 10:01:52 +0800 Subject: [PATCH 26/68] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84=E4=B8=8E=E6=88=B7=E4=B8=BB=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E3=80=81=E8=AF=81=E4=BB=B6=E7=B1=BB=E5=9E=8B=E3=80=81?= =?UTF-8?q?=E9=87=8D=E7=82=B9=E4=BA=BA=E7=BE=A4=E3=80=81=E4=BA=BA=E5=8F=A3?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E3=80=81=E6=94=BF=E6=B2=BB=E9=9D=A2=E8=B2=8C?= =?UTF-8?q?=E3=80=81=E6=98=AF=E5=90=A6=E7=8E=B0=E5=B1=85=E4=BD=8F=E3=80=81?= =?UTF-8?q?=E6=88=B7=E5=88=AB,=E8=AF=95=E8=AF=95=E5=8F=AF=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcResiUserImportServiceImpl.java | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index e0b5c91837..71dd1ada0c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.hutool.core.bean.BeanUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcelFactory; -import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.bean.ResiImportCategoryData; @@ -1457,11 +1456,38 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res optionTypeName = "所属支部"; options = this.listBranchOptions(); break; + case "/sys/dict/data/dictOption/yt_Householder_relationship_type": + optionTypeName = "与户主关系"; + options = null; + break; + case "/sys/dict/data/dictOption/yt_id_card_type": + optionTypeName = "证件类型"; + options = null; + break; + case "/sys/dict/data/dictOption/yt_key_point_user_type": + optionTypeName = "重点人群"; + options = null; + break; + case "/sys/dict/data/dictOption/yt_population_type": + optionTypeName = "人口类型"; + options = null; + break; + case "/sys/dict/data/dictOption/yt_politics_status": + optionTypeName = "政治面貌"; + options = null; + break; + case "/sys/dict/data/dictOption/yt_is_now_live": + optionTypeName = "是否现居住"; + options = null; + break; + case "/sys/dict/data/dictOption/yt_household_category": + optionTypeName = "户别"; + options = null; + break; default: log.warn("listRemoteOptions url is not supported"); } - if (options == null) { return null; } From 44a487f2059c918ea33ac732daf698629c932fe5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 7 May 2023 10:06:28 +0800 Subject: [PATCH 27/68] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84=E4=B8=8E=E6=88=B7=E4=B8=BB=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E3=80=81=E8=AF=81=E4=BB=B6=E7=B1=BB=E5=9E=8B=E3=80=81?= =?UTF-8?q?=E9=87=8D=E7=82=B9=E4=BA=BA=E7=BE=A4=E3=80=81=E4=BA=BA=E5=8F=A3?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E3=80=81=E6=94=BF=E6=B2=BB=E9=9D=A2=E8=B2=8C?= =?UTF-8?q?=E3=80=81=E6=98=AF=E5=90=A6=E7=8E=B0=E5=B1=85=E4=BD=8F=E3=80=81?= =?UTF-8?q?=E6=88=B7=E5=88=AB,=E8=AF=95=E8=AF=95=E5=8F=AF=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=AF=BC=E5=87=BA2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/feign/EpmetAdminOpenFeignClient.java | 9 +++++++++ .../EpmetAdminOpenFeignClientFallback.java | 12 ++++++++++++ .../service/impl/IcResiUserImportServiceImpl.java | 14 +++++++------- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java index 59eb1e1e40..3999b45089 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 @@ -105,4 +105,13 @@ public interface EpmetAdminOpenFeignClient { @PostMapping("/sys/dict/data/dictDataList/{dictType}") Result> dictDataList(@PathVariable("dictType") String dictType); + + /** + * 字典下拉框 + * 根据dictType查询字典 + * @param dictType + * @return + */ + @PostMapping("/sys/dict/data/dictOption/{dictType}") + public Result> getDictOption(@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 98e7e7f0f0..0184d2a100 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 @@ -65,4 +65,16 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli public Result> dictDataList(String dictType) { return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictDataList", dictType); } + + /** + * 字典下拉框 + * 根据dictType查询字典 + * + * @param dictType + * @return + */ + @Override + public Result> getDictOption(String dictType) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getDictOption", dictType); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 71dd1ada0c..80d337f65d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -1458,31 +1458,31 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res break; case "/sys/dict/data/dictOption/yt_Householder_relationship_type": optionTypeName = "与户主关系"; - options = null; + options = getResultDataOrThrowsException(adminOpenFeignClient.getDictOption("yt_Householder_relationship_type"), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/dictOption/yt_id_card_type": optionTypeName = "证件类型"; - options = null; + options = getResultDataOrThrowsException(adminOpenFeignClient.getDictOption("yt_id_card_type"), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/dictOption/yt_key_point_user_type": optionTypeName = "重点人群"; - options = null; + options = getResultDataOrThrowsException(adminOpenFeignClient.getDictOption("yt_key_point_user_type"), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/dictOption/yt_population_type": optionTypeName = "人口类型"; - options = null; + options = getResultDataOrThrowsException(adminOpenFeignClient.getDictOption("yt_population_type"), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/dictOption/yt_politics_status": optionTypeName = "政治面貌"; - options = null; + options = getResultDataOrThrowsException(adminOpenFeignClient.getDictOption("yt_politics_status"), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/dictOption/yt_is_now_live": optionTypeName = "是否现居住"; - options = null; + options = getResultDataOrThrowsException(adminOpenFeignClient.getDictOption("yt_is_now_live"), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/dictOption/yt_household_category": optionTypeName = "户别"; - options = null; + options = getResultDataOrThrowsException(adminOpenFeignClient.getDictOption("yt_household_category"), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; default: log.warn("listRemoteOptions url is not supported"); From eee252b0eb40ac46a23e7287b6722c23dab48ad4 Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Sun, 7 May 2023 14:25:46 +0800 Subject: [PATCH 28/68] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/AgencyServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index a972cd9797..b39c2e9d66 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -167,6 +167,12 @@ public class AgencyServiceImpl implements AgencyService { originalEntity.setContacts(formDTO.getContacts()); originalEntity.setMobile(formDTO.getMobile()); originalEntity.setRemark(formDTO.getRemark()); + originalEntity.setSecretaryName(formDTO.getSecretaryName()); + originalEntity.setSecretaryMobile(formDTO.getSecretaryMobile()); + originalEntity.setDutyMobile(formDTO.getDutyMobile()); + originalEntity.setUnifiedSocialCreditCode(formDTO.getUnifiedSocialCreditCode()); + originalEntity.setUnifiedSocialCreditCodeCertificate(formDTO.getUnifiedSocialCreditCodeCertificate()); + originalEntity.setFullAddress(formDTO.getFullAddress()); //利用mybatis 拦截器填充值 originalEntity.setUpdatedTime(null); originalEntity.setUpdatedBy(null); From 7a8cd6135ceca65541112a87c8c5e2b670eca681 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 7 May 2023 14:39:47 +0800 Subject: [PATCH 29/68] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=EF=BC=8C=E6=A8=A1=E6=9D=BF=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E4=B8=BA=E6=B5=AA=E6=BD=AE=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E5=BE=88=E5=A4=9A=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/ic_resi_import_template.xls | Bin 75776 -> 77824 bytes .../excel/ic_resi_import_template_bak0507.xls | Bin 0 -> 75776 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_bak0507.xls diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls index fc10d33a70cdcdd919c973abd4d2f66f973b99b0..1eb11e2f002f1b8c235f38ee57af2c189cbd5bea 100644 GIT binary patch delta 6580 zcmbW63shBA8ppqVE)RKLxIDZdD59W+3Z{vo0=`lL?)CBp6%}8ppx^^T!Ha2=r6s!4 zYxa`K9-~Wp+@<(hq}H@%re@_-Gu2F)X|9=R)>zG|Ov{-6cg|r0E?1-DUiW(JDQUlV@o@oUEK zIy&$0sSZeZYwQ8?G5bJ2Hx<2n zrpkNNekoGM4-ONnW#*7nuKCtuv?edd#mL!16U7>NXlRPKpRaQGuvoctkWH)w_0jwC zt#tKmlA$RnVm-7m-rQk-wQDDxa?sR-i~|eNjr>K0tE}jA=khtlvlqDT+x#F_czOwI z0))f)sq?s_r#6mamdOoM`)V7SWb4#8jdse{Ax7_(pF*^~D1U^AJ0fGI#bp#7<9T|C z4`*l1^=8Aw@LL(oo!7|)8#n-}JWE8$$*bUicH)Olr(6r4nnYOvAY%>_P;feIB zlmcDoD+zVPI>tIydJj6%eR@4l;nRqMN!HCz4)lSSll+OQDrD&VZvcg%rP zFc1xd2GT+y^%|}#@av_8aRcg)>!;|HsMg!~;H;nr%(fc6jbVkXD~^a?K|8nuWeY1^ zr$DY!iGFRzaceE^Gq#jgo287x%|14os2@n7an6YV8Dk?+g2ym9&*={4J|yoz;6xixRZit zCGjkV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Q56OfuPNu4PNZOft>q^yWJ_y-Qg^fap%!+ zmd|;-XunqPtdC$nH}H7*HYdEd+wmO$ZvsmUWDt%N+Q{?Xb_ zYdrgn&e<@6;oGFsG?J}i&aH#lNT*{oGw&M0^v=Db*j{hidj>z=bY_iaP0WytKN L()m#Wo2mal^v>~G diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_bak0507.xls b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_bak0507.xls new file mode 100644 index 0000000000000000000000000000000000000000..fc10d33a70cdcdd919c973abd4d2f66f973b99b0 GIT binary patch literal 75776 zcmeHw2YeO9_W$0S-g_am1OfyIkdTB93007gPC^JJ1VWJjN=GTN@K6H+`b0%U6jAJ5 zpP&J3h+=Q}d@9I8@nJ!qK19*{&v(z=xw~^`BOv3R5Xeqi`OD=@e=x%%Cun!Ym5sQ@DV_YzlKI%%w1o!h8w~C@iF~ zh{A;w7E?f7FQMa73d<*IJbXCsFrA{@HtV5+sj zR8n)P_9xIU>f=;C(R6*JYIO!(8D&3=YGJZoCP3y={m;_t zo25N}Q(X7&O{|l>KHBGDS5g7~)QWw5wCy1;`|YZAXuiIhc0hA#4|wmQUrqa%!Whyt zFU_%t6lsQ*`1^bY=y{mnKpu8d0rz#JY7W8zDJS048~IQ#6->R9KlMnV)Ek9UPZUYL zPyqEpG1LP!(Q{AQLFY&5zxV5DJ*ofp)%z@Jtus%g^&oyAr9H_jN0(cr|F+V9L+RI{ zJ+7bgPaR38^p8@S4a?S`+O@w?`PWqx=L7%O8N!jizvh`f@IVEQ>#F2|_p^}?x4{E! z@L(Nxc-(Ka4Q`j8ZrYQm5|4CL_cfJDSS|0Q=Zk0gq}s@P+u$glY@7UK+28>-c$OkR zTrcYTjj)lAlJFMZ9ZA=tG)F7#P(v$vOr}z3O^?3b8Y5%qk?2NScxO?=h*ybMP+wn7 z&zP|`Cw8aS)Wq||&U7uit1+*IcYjj97WSt$eq|$(Y4n`$syW7MiLMNGAj*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Y~Ny`;Fe6!($hzEa#ziu+4(Ob*QX36$bNQXCV0vwVmY50&C! zQXD=n=JO+@c%&4MlH$=)JjN7fqnBP)C;5X022UjUgKFQu{N`_t=T8m4d#%6LvE9S( zr4jZI3Oq{DT-#)5wFQLX**(g|n@UI2^Fj)EUSCE5&*(K2@SJ{t0!J`%Q)u%Q%?ca&KQ z1^U#YtdOrB6v8RwP>}B#e0+@K38FFn!3XCfy}5``dW-1?=U+wvmt6I*T^e=}Ms+NoLYIQ3l1Z z@;iufJdtubgYr0&a$T&`Gqeem<3(i5no0FJi)bKo>3(Jr;{NoYJ1~!4+#Guf|F(2F d3ik|sPWAd{=&~Z2KlAl7NlVXu{< Date: Mon, 8 May 2023 13:34:31 +0800 Subject: [PATCH 30/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E5=87=BA+=E4=B8=8B=E8=BD=BD=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/IcPropertyManagementDTO.java | 28 +++++ .../dto/form/IcPropertyManagementFormDTO.java | 13 +- .../PropertyManagementController.java | 114 +++++++++++++++++- .../epmet/dao/IcNeighborHoodPropertyDao.java | 10 +- .../service/PropertyManagementService.java | 17 ++- .../impl/PropertyManagementServiceImpl.java | 32 ++++- .../yantai/ic_property_management_temp.xlsx | Bin 0 -> 10172 bytes .../mapper/IcNeighborHoodPropertyDao.xml | 14 ++- 8 files changed, 205 insertions(+), 23 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/excel/yantai/ic_property_management_temp.xlsx diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java index 171cbeb01c..6190e3d6d1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java @@ -17,6 +17,10 @@ package com.epmet.dto; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -37,58 +41,82 @@ public class IcPropertyManagementDTO implements Serializable { /** * 物业id */ + @ExcelIgnore private String id; /** * 物业名称 */ + @ExcelProperty(value = "物业名称") + @ColumnWidth(30) private String name; /** * 客户id */ + @ExcelIgnore private String customerId; /** * 烟台需求:物业联系人姓名 */ + @ExcelProperty(value = "物业联系人") + @ColumnWidth(30) private String contactName; /** * 烟台需求:物业联系人电话 */ + @ExcelProperty(value = "联系电话") + @ColumnWidth(30) private String contactMobile; + /** + * 导出时候用 + * 该物业关联的小区 + */ + @JsonIgnore + @ExcelProperty(value = "关联小区") + @ColumnWidth(60) + private String neighborHoodNames; + /** * 删除标识 0未删除、1已删除 */ + @ExcelIgnore private String delFlag; /** * 乐观锁 */ + @ExcelIgnore private Integer revision; /** * 创建人 */ + @ExcelIgnore private String createdBy; /** * 创建时间 */ + @ExcelIgnore private Date createdTime; /** * 更新人 */ + @ExcelIgnore private String updatedBy; /** * 更新时间 */ + @ExcelIgnore private Date updatedTime; /** * 关联的小区数量 */ + @ExcelIgnore private Integer totalNeighborHood; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java index 220a2b7488..938307b9b3 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java @@ -17,17 +17,17 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.io.Serializable; @Data -public class IcPropertyManagementFormDTO implements Serializable { +public class IcPropertyManagementFormDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -40,8 +40,8 @@ public class IcPropertyManagementFormDTO implements Serializable { public interface UpdateShowGroup extends CustomerClientShowGroup { } - public interface PageGroup extends CustomerClientShowGroup { - } + // public interface PageGroup extends CustomerClientShowGroup { + // } @NotBlank(message = "物业id不能为空", groups = {DeleteGroup.class, UpdateShowGroup.class}) private String id; @@ -66,9 +66,4 @@ public class IcPropertyManagementFormDTO implements Serializable { private String customerId; - @NotNull(message = "pageNo不能为空", groups = PageGroup.class) - private Integer pageNo; - @NotNull(message = "pageSize不能为空", groups = PageGroup.class) - private Integer pageSize; - } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index d65ba66296..09c1266eec 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -17,21 +17,44 @@ package com.epmet.controller; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.alibaba.excel.write.metadata.style.WriteCellStyle; +import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; +import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.IcPropertyManagementDTO; import com.epmet.dto.form.IcPropertyManagementFormDTO; import com.epmet.dto.result.IcPropertyManagementResultDTO; import com.epmet.service.PropertyManagementService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.apache.poi.ss.usermodel.IndexedColors; +import org.apache.poi.ss.usermodel.VerticalAlignment; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.http.HttpHeaders; +import org.springframework.web.bind.annotation.*; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.net.URLEncoder; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -43,6 +66,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-10-25 */ +@Slf4j @RestController @RequestMapping("propertymanagement") public class PropertyManagementController { @@ -55,9 +79,8 @@ public class PropertyManagementController { */ @PostMapping("page") public Result> page(@RequestBody IcPropertyManagementFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO,IcPropertyManagementFormDTO.PageGroup.class); return new Result>().ok(propertyManagementService.page(formDTO.getPageNo(),formDTO.getPageSize(),formDTO.getName(), - formDTO.getContactName(),formDTO.getContactMobile())); + formDTO.getContactName(),formDTO.getContactMobile(),"page-query")); } /** @@ -112,4 +135,83 @@ public class PropertyManagementController { return new Result(); } + /** + * 物业管理-下载导入模板 + * @param response + * @throws IOException + */ + @RequestMapping(value = "download-tem", method = {RequestMethod.GET, RequestMethod.POST}) + public void downloadTemplate(HttpServletResponse response) throws IOException { + response.setCharacterEncoding("UTF-8"); + response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); + //response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); + response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("物业管理导入模版", "UTF-8") + ".xlsx"); + + InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_property_management_temp.xlsx"); + try { + ServletOutputStream os = response.getOutputStream(); + IOUtils.copy(is, os); + } finally { + if (is != null) { + is.close(); + } + } + } + + + /** + * 物业管理-列表导出 + * + * @param tokenDto + * @param formDTO + * @param response + * @return + * @throws IOException + */ + @PostMapping("export") + public void exportEnterprise(@LoginUser TokenDto tokenDto, @RequestBody IcPropertyManagementFormDTO formDTO, HttpServletResponse response) throws IOException { + formDTO.setCustomerId(tokenDto.getCustomerId()); + ExcelWriter excelWriter = null; + formDTO.setPageNo(NumConstant.ONE); + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + try { + String fileName = "物业管理" + DateUtils.format(new Date()) + ".xlsx"; + WriteCellStyle headWriteCellStyle = new WriteCellStyle(); + headWriteCellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); + WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); + contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); + FreezeAndFilter writeHandler = new FreezeAndFilter(); + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcPropertyManagementDTO.class) + .registerWriteHandler(horizontalCellStyleStrategy) + .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) + .registerWriteHandler(writeHandler).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); + PageData data = null; + do { + data = propertyManagementService.page(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getName(), formDTO.getContactName(), formDTO.getContactMobile(),"export"); + formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); + excelWriter.write(data.getList(), writeSheet); + } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize()); + } catch (EpmetException e) { + response.reset(); + response.setCharacterEncoding("UTF-8"); + response.setHeader("content-type", "application/json; charset=UTF-8"); + PrintWriter printWriter = response.getWriter(); + Result result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getMsg()); + printWriter.write(JSON.toJSONString(result)); + printWriter.close(); + } catch (Exception e) { + log.error("物业管理导出异常export exception", e); + } finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + + + + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodPropertyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodPropertyDao.java index 79a71a11b8..0d27ae9d56 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodPropertyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodPropertyDao.java @@ -18,9 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.entity.IcNeighborHoodPropertyEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 小区物业关系表 * @@ -29,5 +32,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcNeighborHoodPropertyDao extends BaseDao { - + /** + * 查询物业下的小区名称 + * @param propertyId 物业id + * @return + */ + List getNeighborHoodList(String propertyId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java index cae9715bd1..949269d16f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java @@ -39,5 +39,20 @@ public interface PropertyManagementService { void update(IcPropertyManagementFormDTO formDTO); void delete(IcPropertyManagementFormDTO formDTO); - PageData page(Integer pageNo, Integer pageSize, String name,String contactName,String contactMobile); + /** + * 物业管理-列表查询 + * @param pageNo + * @param pageSize + * @param name 物业名称 + * @param contactName 物业联系人 + * @param contactMobile 联系电话 + * @param queryType 列表查询:page-query;导出:export + * @return + */ + PageData page(Integer pageNo, + Integer pageSize, + String name, + String contactName, + String contactMobile, + String queryType); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index e816556e07..a61155a910 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -9,6 +10,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.dao.IcNeighborHoodPropertyDao; import com.epmet.dao.IcPropertyManagementDao; +import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.IcPropertyManagementDTO; import com.epmet.dto.form.IcPropertyManagementFormDTO; import com.epmet.dto.result.IcPropertyManagementResultDTO; @@ -18,6 +20,8 @@ import com.epmet.service.PropertyManagementService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -25,6 +29,7 @@ import javax.annotation.Resource; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; @Slf4j @Service @@ -113,16 +118,33 @@ public class PropertyManagementServiceImpl implements PropertyManagementService /** * 物业管理-列表查询 + * * @param pageNo * @param pageSize - * @param name + * @param name 物业名称 + * @param contactName 物业联系人 + * @param contactMobile 联系电话 + * @param queryType 列表查询:page-query;导出:export * @return */ @Override - public PageData page(Integer pageNo, Integer pageSize, String name,String contactName,String contactMobile) { - PageHelper.startPage(pageNo,pageSize); - List list=icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(),name,contactName,contactMobile); + public PageData page(Integer pageNo, Integer pageSize, String name, String contactName, String contactMobile, String queryType) { + PageHelper.startPage(pageNo, pageSize); + List list = icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(), name, contactName, contactMobile); PageInfo pageInfo = new PageInfo<>(list); - return new PageData<>(list, pageInfo.getTotal(),pageSize); + // 导出时需要导出关联的小区名称 + if ("export".equals(queryType)) { + pageInfo.getList().forEach(result -> { + List neighborHoodList = icNeighborHoodPropertyDao.getNeighborHoodList(result.getId()); + List neighborHoodNames = neighborHoodList.stream() + .map(IcNeighborHoodDTO::getNeighborHoodName) + .distinct().collect(Collectors.toList()); + result.setNeighborHoodNames(CollectionUtils.isNotEmpty(neighborHoodList) ? StringUtils.join(neighborHoodNames, StrConstant.COMMA_ZH) : StrConstant.EPMETY_STR); + }); + } + return new PageData<>(list, pageInfo.getTotal(), pageSize); } + + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/yantai/ic_property_management_temp.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/yantai/ic_property_management_temp.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..f0611d26b02afacb2c68d0be54f50c135b9baf1c GIT binary patch literal 10172 zcmeHtbx>T}(k}#ehv2TkEf8D=8C-))g1bwA;O-jS-GjTk4v^sPZXto750ZONPIAw8 z>wSN|s<*0U?>#duYyEodUR~WSF9iV!5B4+yW!D9t?*ATej}HdcZ{_W*ZS0xkAIUHu ze}Mf#mQcy}od+BY%J`Ua5yDsjU^yTTdUh;*hb;N|i0u*YI5ewXn) zDZ`_Q;LDx<`k7`MIOEPp(Z zNQcL?%XTxP_Bm55lb)x~nqDcDQpAHfW}~A6NH~Yv>d=BQ<^pQ)5y;8$F;KkJa9!}> zE4*WCNU;#Z+D@8RJe=*g5{--O5rEW4=&bNei(|yF=qnr8`QzkhP0vd7EJtg3wnnhiMZT z#h2=>?}HogB2%+Qv_=?ynJg4Pej2QkB{#~O9q%SR(z69xIsd_;Fg}7!Y9zaor)=G6 z&gbQugY<)3js(NKcp<{>?aQ;R-OW;+&oTy%FOX@Fp$fFX*&0JWR9F+A$YqRQk{&CU zAmmG@MDu;40Jm)jYS%eVK#3&1FH_S>Yt#3!u^^hy)qR1}IdSF^v`(}K#W?3E=_&1G zQYi=5SPX4_@%nqRa2?)*=Q{Wi6yZ7^>P+Ly2hm%k-)&GQopVh0XalrI8({oq14nxY zYs)7q=OHHWxeJ>MK8t+yaNRpq_T#K{1=g_9_K~8fN{=IV0v) z0<9O8t7!AvtE*Z9;sYVR%JE2d8aFa;p;fpAklhTD^RZ&^S?G!gv!BaFKQCj0|E9}j zvo;!eTrn^oRGqeDDc3r~P$hRoYZ7OEK+tm5u*uuUl3P;a2Z;eaMUy6!swa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$)~TC$~@=H*D4QgjM`CN_0IIi+oWr-Lp{s1O~-Dn1*kDqCF_Ci2m&-J%W^|P?I1T zivD!BV=V#boV@ZFC>Q#&K{ckMD#);!V)m&p4{4oOm-L+^Vd(K3Q6I5L@R2Gipkw19 zqzmWu`a)0_A$DjGK+lv8IzZA^t=QfH?}yT&*jS*JPn=E~YN)*6(&Wu6*H+=|SSp0i zTXI*-sfp+e1~=a6j}9f;l+)$GZpJZ%&F469`o+<0;L!sEUmEzH`TD)vcJ9bO4$nTz z^D&@zcfm@wurb`4)eKBU%8Cq};JlKl93q#{Sur;oafXyt?`9`}w$c#Q@W>)qV!yd5>b#m9OQ|P3<&`An}JT z@7vG)N1ivUXST%eA>^gNpJDzupMG|`{Ar~}LxF*Vkvv|lN&nGiKLz~H&ge(BAjrSmlY*3k32zCT-fo``?yqy9VFzZ!i0 zgy_#cm0#RZkK6k%rT^|)`IG(67K>l(n2*ln7yDlg7yoV1PmKgW$J3&%AG-k_J<)$- z_#GuIlE1mGKPUR9k9*Sd6D8iiv;Bw1`%})JfzU5Gx&;3m7X2yV&wSl43D=K}LQjF! zU)j6=#o8Z_!AI7ASGRuOA%E7lere?WJKL{n*Pm1VGXVM}K#TB)-oL~4-zNRk3G#D1 zSvcyag`b%J>I?aO=6`mEJn{atTFZa%{^}F?bNYXl`F}~_fcb0s|C+&%+mE9E|GgB- k$9?z+{@>Q|L&}d*vb+@3Qxx-fNML})KF%3~{OQ~O0h{5IF8}}l literal 0 HcmV?d00001 diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml index 749861cc9a..db8211a0ce 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml @@ -15,5 +15,17 @@ - + \ No newline at end of file From 96a1c8e62806e143fb7a8b4dce0655c6ddadc6a4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 8 May 2023 14:10:55 +0800 Subject: [PATCH 31/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E7=AE=A1=E7=90=86=E5=B0=8F=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/IcPropertyManagementDTO.java | 4 + .../dto/form/IcPropertyManagementFormDTO.java | 7 ++ .../PropertyManagementController.java | 14 ++++ .../service/PropertyManagementService.java | 7 ++ .../impl/PropertyManagementServiceImpl.java | 78 +++++++++++++++---- .../mapper/IcNeighborHoodPropertyDao.xml | 2 +- 6 files changed, 97 insertions(+), 15 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java index 6190e3d6d1..5a34eab3cb 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java @@ -25,6 +25,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** @@ -79,6 +80,9 @@ public class IcPropertyManagementDTO implements Serializable { @ColumnWidth(60) private String neighborHoodNames; + @ExcelIgnore + List neighborHoodList; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java index 938307b9b3..0b3f3ea9b4 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcPropertyManagementFormDTO.java @@ -24,6 +24,7 @@ import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import java.io.Serializable; +import java.util.List; @Data @@ -64,6 +65,12 @@ public class IcPropertyManagementFormDTO extends PageFormDTO implements Serializ @Length(max = 30, message = "联系电话不能超过30个字",groups = {AddShowGroup.class, UpdateShowGroup.class}) private String contactMobile; + /** + * 管理小区id + */ + private List neighborHoodIdList; + + private String customerId; } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index 09c1266eec..e7175b3e82 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -42,6 +42,7 @@ import com.epmet.service.PropertyManagementService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.VerticalAlignment; import org.springframework.beans.factory.annotation.Autowired; @@ -211,6 +212,19 @@ public class PropertyManagementController { } } + /** + * 获取物业详情 + * + * @param id + * @return + */ + @PostMapping("detail/{id}") + public Result getDetail(@PathVariable("id") String id) { + if (StringUtils.isBlank(id)) { + return new Result<>(); + } + return new Result().ok(propertyManagementService.getDetail(id)); + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java index 949269d16f..4e6e1a71e4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java @@ -55,4 +55,11 @@ public interface PropertyManagementService { String contactName, String contactMobile, String queryType); + + /** + * 查看物业详情 + * @param id + * @return + */ + IcPropertyManagementDTO getDetail(String id); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index a61155a910..324f9e3fff 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -35,6 +35,9 @@ import java.util.stream.Collectors; @Service public class PropertyManagementServiceImpl implements PropertyManagementService { + /** + * 物业表 + */ @Resource private IcPropertyManagementDao icPropertyManagementDao; @Resource @@ -62,43 +65,68 @@ public class PropertyManagementServiceImpl implements PropertyManagementService /** * 新增物业 * 名称客户下唯一 + * * @param formDTO * @return */ @Override @Transactional(rollbackFor = Exception.class) public String add(IcPropertyManagementFormDTO formDTO) { - //物业名字平台内唯一 - //如果输入的物业名字已经存在,直接返回物业id + // 物业名字平台内唯一 + // 如果输入的物业名字已经存在,直接返回物业id formDTO.setName(formDTO.getName().trim()); - IcPropertyManagementEntity entity = icPropertyManagementDao.selectByName(formDTO.getCustomerId(),formDTO.getName(),null); + IcPropertyManagementEntity entity = icPropertyManagementDao.selectByName(formDTO.getCustomerId(), formDTO.getName(), null); if (null != entity) { - return entity.getId(); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "物业名称已存在", "物业名称已存在"); } IcPropertyManagementEntity icPropertyManagementEntity = ConvertUtils.sourceToTarget(formDTO, IcPropertyManagementEntity.class); icPropertyManagementDao.insert(icPropertyManagementEntity); + if (CollectionUtils.isNotEmpty(formDTO.getNeighborHoodIdList())) { + formDTO.getNeighborHoodIdList().forEach(neighborHoodId -> { + // 插入小区物业关系表 + IcNeighborHoodPropertyEntity neighborHoodPropertyEntity = new IcNeighborHoodPropertyEntity(); + neighborHoodPropertyEntity.setPropertyId(icPropertyManagementEntity.getId()); + neighborHoodPropertyEntity.setNeighborHoodId(neighborHoodId); + icNeighborHoodPropertyDao.insert(neighborHoodPropertyEntity); + }); + } return icPropertyManagementEntity.getId(); } /** * 物业管理-修改 + * * @param formDTO */ @Override @Transactional(rollbackFor = Exception.class) public void update(IcPropertyManagementFormDTO formDTO) { - IcPropertyManagementEntity entity = icPropertyManagementDao.selectByName(EpmetRequestHolder.getLoginUserCustomerId(),formDTO.getName(),formDTO.getId()); + IcPropertyManagementEntity entity = icPropertyManagementDao.selectByName(EpmetRequestHolder.getLoginUserCustomerId(), formDTO.getName(), formDTO.getId()); if (null != entity) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"物业名称已存在","物业名称已存在"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "物业名称已存在", "物业名称已存在"); + } + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(IcPropertyManagementEntity::getId, formDTO.getId()) + .set(IcPropertyManagementEntity::getName, formDTO.getName()) + .set(IcPropertyManagementEntity::getContactName, formDTO.getContactName()) + .set(IcPropertyManagementEntity::getContactMobile, formDTO.getContactMobile()) + .set(IcPropertyManagementEntity::getUpdatedTime, new Date()) + .set(IcPropertyManagementEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); + icPropertyManagementDao.update(null, updateWrapper); + if (CollectionUtils.isNotEmpty(formDTO.getNeighborHoodIdList())) { + formDTO.getNeighborHoodIdList().forEach(neighborHoodId -> { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, formDTO.getId()) + .eq(IcNeighborHoodPropertyEntity::getNeighborHoodId, neighborHoodId); + if (icNeighborHoodPropertyDao.selectCount(queryWrapper) < 1) { + // 插入小区物业关系表 + IcNeighborHoodPropertyEntity neighborHoodPropertyEntity = new IcNeighborHoodPropertyEntity(); + neighborHoodPropertyEntity.setPropertyId(formDTO.getId()); + neighborHoodPropertyEntity.setNeighborHoodId(neighborHoodId); + icNeighborHoodPropertyDao.insert(neighborHoodPropertyEntity); + } + }); } - LambdaUpdateWrapper updateWrapper=new LambdaUpdateWrapper<>(); - updateWrapper.eq(IcPropertyManagementEntity::getId,formDTO.getId()) - .set(IcPropertyManagementEntity::getName,formDTO.getName()) - .set(IcPropertyManagementEntity::getContactName,formDTO.getContactName()) - .set(IcPropertyManagementEntity::getContactMobile,formDTO.getContactMobile()) - .set(IcPropertyManagementEntity::getUpdatedTime,new Date()) - .set(IcPropertyManagementEntity::getUpdatedBy,EpmetRequestHolder.getLoginUserId()); - icPropertyManagementDao.update(null,updateWrapper); } /** @@ -140,11 +168,33 @@ public class PropertyManagementServiceImpl implements PropertyManagementService .map(IcNeighborHoodDTO::getNeighborHoodName) .distinct().collect(Collectors.toList()); result.setNeighborHoodNames(CollectionUtils.isNotEmpty(neighborHoodList) ? StringUtils.join(neighborHoodNames, StrConstant.COMMA_ZH) : StrConstant.EPMETY_STR); + result.setNeighborHoodList(neighborHoodList); }); } return new PageData<>(list, pageInfo.getTotal(), pageSize); } + /** + * 查看物业详情 + * + * @param id + * @return + */ + @Override + public IcPropertyManagementDTO getDetail(String id) { + IcPropertyManagementEntity icPropertyManagementEntity = icPropertyManagementDao.selectById(id); + if (null == icPropertyManagementEntity) { + return null; + } + IcPropertyManagementDTO resultDto = ConvertUtils.sourceToTarget(icPropertyManagementEntity, IcPropertyManagementDTO.class); + List neighborHoodList = icNeighborHoodPropertyDao.getNeighborHoodList(id); + List neighborHoodNames = neighborHoodList.stream() + .map(IcNeighborHoodDTO::getNeighborHoodName) + .distinct().collect(Collectors.toList()); + resultDto.setNeighborHoodNames(CollectionUtils.isNotEmpty(neighborHoodList) ? StringUtils.join(neighborHoodNames, StrConstant.COMMA_ZH) : StrConstant.EPMETY_STR); + resultDto.setNeighborHoodList(neighborHoodList); + return resultDto; + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml index db8211a0ce..12a20f286c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml @@ -21,7 +21,7 @@ h.NEIGHBOR_HOOD_NAME FROM ic_neighbor_hood_property p - INNER JOIN ic_neighbor_hood h ON ( p.NEIGHBOR_HOOD_ID = h.ID ) + INNER JOIN ic_neighbor_hood h ON ( p.NEIGHBOR_HOOD_ID = h.ID ) WHERE p.PROPERTY_ID = #{propertyId} AND p.DEL_FLAG = '0' From 546954b098392f84b51eb84d3173c274ca9562dc Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Mon, 8 May 2023 14:18:44 +0800 Subject: [PATCH 32/68] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/StaffController.java | 38 ++++++++++++++++++ .../excel/customer_staff_import_template.xlsx | Bin 0 -> 9722 bytes 2 files changed, 38 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/excel/customer_staff_import_template.xlsx diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java index bcc8e2f55e..d424f60202 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java @@ -8,16 +8,23 @@ import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; 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.*; import com.epmet.dto.result.*; import com.epmet.service.StaffService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.InputStream; +import java.net.URLEncoder; import java.util.List; /** @@ -25,6 +32,7 @@ import java.util.List; * @author zhaoqifeng * @date 2020/4/23 17:59 */ +@Slf4j @RestController @RequestMapping("staff") public class StaffController { @@ -251,4 +259,34 @@ public class StaffController { return new Result>().ok(staffService.staffOrgList(tokenDto)); } + /** + * 下载工作人员导入excel模板 + * + * @return + */ + @PostMapping("import/download-template") + public void downloadIcResiDownloadTemplate(HttpServletResponse response) { + InputStream is = null; + ServletOutputStream os = null; + try { + os = response.getOutputStream(); + + is = this.getClass().getClassLoader().getResourceAsStream("excel/customer_staff_import_template.xlsx"); + + response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); + response.setHeader("content-Type", "application/vnd.ms-excel"); + response.setHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode("工作人员导入模板.xlsx", "UTF-8")); + + IOUtils.copy(is, os); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + log.error("下载工作人员导入模板失败:{}", errorStackTrace); + + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "下载工作人员导入模板失败"); + } finally { + org.apache.poi.util.IOUtils.closeQuietly(is); + org.apache.poi.util.IOUtils.closeQuietly(os); + } + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/customer_staff_import_template.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/customer_staff_import_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..df7f4126472dc1f67d5a60445662f9fa0475343e GIT binary patch literal 9722 zcma)i19%=?^LK2!v2CL<8aK9WH)w3zN#n*z-4J-Y{%b(LelW5%lyk7Pb7YWvB}04t0qPI3Q6Vj0CSV{S zE)XCfq`#Bt+u6~(T3cnrc1VIUAqAcKogz6@n1_cXScPS8h|;P7`i`t{=4FITv^27M z!XZ02&bF2)@32fbvNg}QtjS--_*Xw}c}z{01%}Kv`+Y>{{o>2gT5F?xmcD(zm%>7N zEUE1d3BC$)(YUx8AHD}FQtd-4%1L{dMmZcHP!lA!DHx}%Kuv%nV;)JfUOI@)dA-vL z{K0@5p8$Fu={w4x{2js;m;LOdx3H8gH(!gkjWCGH1!=${woGw;Q!V-DEA*a8-c)}QxEr7boW%r)GF1PKCaE(GQ{ta;-H0kDSAQcAbUGB#2SR)xtk~}8h%c`2MM^JRa@3Zitn8aVoHe?&O=0;kRZn80RD0L$)ZRT9!=vh)d&l}$wAT@99ZC)Q7u0LJg zSU))NroSI0cL9DruHLI2_=4D3wXoMRpuly0d(&)K|1>s87iPmd1}BDB&*&MO;FE@EWJckf%J?NPOG4S<6Nv% z-fRgP6jvw>48IHy6D$3JFlf+~K8fBu5uf@{63|y--K>FDk_kaXR}e64&-<X`E9O+rPo|`;lClZ}ol*fi?$e3%0xCqpUS?f;e z1)kse4{4&9nKhL*Zx6e9lM-w8Po6cXi#gHG6VVL42MH)*$d@3|u0*${OwUmU9&C4o zLq`V=$){d$44j7VZp|gID2SkIC^f3g@a+a?$zXTJIx2+jJW7WsrV!tN{m-rk^c7fF zt3RC1eb(?+CNyB-b~e_x@3bRiq-mI z15d@VBe9tx3&pV6B7R4NS{ZEdaNx65baiu02A(PE2~sYhh%zyhQhrF1oJMgiVbL@- z>4tHO{Uyd@&1N0IN}*A(D7L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AGcNFt6^Y;`*DQLuqVSKeWp-}B)x@;}cDaNcoguRn>*4b>22!e9cx zNU?vvaKQBxkPRwnQ;wRynkr5bz=oAVRvND_6G-$WB_fCC&wMeGB3O60qtB~OiesC}yg4bt4F_Du&O$sd3t;dH$~qPM z?Ao?D0;%tSoelNf7v5fuR(91=T@S(>kFM>~2`ze-?5|w6#@4sdwp?~x8nQn^$VmZ% zp#AZ1`_;GcyJcRD0|X32_<9z7J^cqe{Sxq>Yp`!F=ht{^0V&7(%K`mU>F+M+jpvur zi9dP%*fRf1+1sA{HQtoHjlZ>~{8QiW%_(ohzw}Z3o$dcxRep!)_uh-YxPxAo^q)%q z)rs*t`|s@mf3Xw47PbFk|Fc=(f8F$38T{9HyJ`2=diJZo`CknGMCl&?Zw~7BiT>`% z-t_!JiICuLZ2#uhewXum6!n*!qgMy{pJJ-tCH$Uz{7b^^Yt-;2;m=g$|Np&rze4fK z`me&*KUc`_rLVs<9{!!}uR_@GQ~o`&`AdKd?jL&p4%`2l^jjapukmK#FTX7OkFJJ) m&iwbjhBw|{R_p&a-oLsW Date: Mon, 8 May 2023 14:38:52 +0800 Subject: [PATCH 33/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/constants/ImportTaskConstants.java | 5 + .../PropertyManagementController.java | 65 ++++++++- .../IcPropertyManagementImportListener.java | 120 +++++++++++++++++ .../IcPropertyManagementImportExcelData.java | 58 ++++++++ .../service/IcPropertyManagementService.java | 9 ++ .../service/PropertyManagementService.java | 8 ++ .../impl/IcPropertyManagementServiceImpl.java | 7 + .../impl/PropertyManagementServiceImpl.java | 126 +++++++++++++++++- 8 files changed, 390 insertions(+), 8 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java index 204845c1fb..f7b664de4b 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java @@ -83,4 +83,9 @@ public interface ImportTaskConstants { * 未做核酸比对 */ String IC_NAT_COMPARE_RECORD="ic_nat_compare_record"; + + /** + * 物业表:ic_property_management + */ + String IC_PROPERTY_MANAGEMENT="ic_property_management"; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index e7175b3e82..e342791fb2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -26,19 +26,26 @@ import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcPropertyManagementDTO; import com.epmet.dto.form.IcPropertyManagementFormDTO; import com.epmet.dto.result.IcPropertyManagementResultDTO; +import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.service.PropertyManagementService; +import com.epmet.utils.ImportTaskUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.IOUtils; @@ -48,17 +55,17 @@ import org.apache.poi.ss.usermodel.VerticalAlignment; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.URLEncoder; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.nio.file.Path; +import java.util.*; /** @@ -70,7 +77,7 @@ import java.util.Map; @Slf4j @RestController @RequestMapping("propertymanagement") -public class PropertyManagementController { +public class PropertyManagementController implements ResultDataResolver { @Autowired private PropertyManagementService propertyManagementService; @@ -226,6 +233,54 @@ public class PropertyManagementController { return new Result().ok(propertyManagementService.getDetail(id)); } + /** + * 导入excel + * + * @return + */ + @PostMapping("import") + public Result importExcel(MultipartFile file) { + // 1.暂存文件 + String originalFilename = file.getOriginalFilename(); + String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); + + Path fileSavePath; + try { + Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir(ImportTaskConstants.IC_PROPERTY_MANAGEMENT, "import"); + fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName)); + } catch (IOException e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【物业管理导入】创建临时存储文件失败:{}", errorMsg); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败"); + } + + InputStream is = null; + FileOutputStream os = null; + + try { + is = file.getInputStream(); + os = new FileOutputStream(fileSavePath.toString()); + IOUtils.copy(is, os); + } catch (Exception e) { + log.error(ImportTaskConstants.IC_PROPERTY_MANAGEMENT + "表 importExcel exception", e); + } finally { + org.apache.poi.util.IOUtils.closeQuietly(is); + org.apache.poi.util.IOUtils.closeQuietly(os); + } + + // 2.生成导入任务记录 + ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException( + ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.IC_PROPERTY_MANAGEMENT), + ServiceConstant.EPMET_COMMON_SERVICE, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + "物业管理导入excel错误", + "物业管理导入excel错误"); + + // 3.执行导入 + propertyManagementService.execAsyncExcelImport(fileSavePath, rstData.getTaskId()); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java new file mode 100644 index 0000000000..c591d54331 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java @@ -0,0 +1,120 @@ +package com.epmet.excel.handler; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.read.listener.ReadListener; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.exception.ValidateException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.ObjectUtil; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.entity.IcPropertyManagementEntity; +import com.epmet.excel.yt.IcPropertyManagementImportExcelData; +import com.epmet.service.impl.IcPropertyManagementServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2023/5/8 14:23 + */ +@Slf4j +public class IcPropertyManagementImportListener implements ReadListener { + + // 最大条数阈值 + public static final int MAX_THRESHOLD = 200; + private String currentCustomerId; + private IcPropertyManagementServiceImpl propertyManagementService; + // 错误项列表 + private List errorRows = new ArrayList<>(); + // 要插入的数据 + private List insertDatas = new ArrayList<>(); + private List updateDatas = new ArrayList<>(); + + public IcPropertyManagementImportListener(String customerId, IcPropertyManagementServiceImpl propertyManagementService) { + this.currentCustomerId = customerId; + this.propertyManagementService = propertyManagementService; + } + + @Override + public void invoke(IcPropertyManagementImportExcelData data, AnalysisContext analysisContext) { + try { + // log.warn("有数据吗?"+JSON.toJSONString(data)); + // 不能为空先校验数据 + ValidatorUtils.validateEntity(data); + // 去除空格 + ObjectUtil.objectToTrim(data); + //物业名称唯一 + IcPropertyManagementEntity origin=propertyManagementService.getByName(currentCustomerId, data.getName()); + + IcPropertyManagementEntity propertyManagementEntity = ConvertUtils.sourceToTarget(data, IcPropertyManagementEntity.class); + propertyManagementEntity.setCustomerId(currentCustomerId); + if (null != origin) { + origin.setContactMobile(data.getContactMobile()); + origin.setContactName(data.getContactName()); + insertDatas.add(origin); + } else { + insertDatas.add(propertyManagementEntity); + } + + if (insertDatas.size() == MAX_THRESHOLD) { + execPersist(); + } + if (updateDatas.size() == MAX_THRESHOLD) { + execPersist(); + } + } catch (Exception e) { + String errorMsg = null; + if (e instanceof ValidateException) { + errorMsg = ((ValidateException) e).getMsg(); + } else if (e instanceof EpmetException) { + errorMsg = ((EpmetException) e).getInternalMsg(); + } else { + errorMsg = "未知错误"; + log.error("【物业管理表ic_property_management导入】出错:{}", ExceptionUtils.getErrorStackTrace(e)); + } + IcPropertyManagementImportExcelData.ErrorRow errorRow = ConvertUtils.sourceToTarget(data, IcPropertyManagementImportExcelData.ErrorRow.class); + errorRow.setErrorInfo(errorMsg); + errorRows.add(errorRow); + } + + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 最后几条达不到阈值,这里必须再调用一次 + execPersist(); + } + + /** + * 执行持久化 + */ + private void execPersist() { + try { + if (CollectionUtils.isNotEmpty(insertDatas)) { + propertyManagementService.insertBatch(insertDatas); + } + + if (CollectionUtils.isNotEmpty(updateDatas)) { + propertyManagementService.updateBatchById(updateDatas); + } + } finally { + insertDatas.clear(); + updateDatas.clear(); + } + } + + /** + * 获取错误行 + * + * @return + */ + public List getErrorRows() { + return errorRows; + } +} + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java new file mode 100644 index 0000000000..e172260c16 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java @@ -0,0 +1,58 @@ +package com.epmet.excel.yt; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2023/5/8 14:24 + */ +@Data +public class IcPropertyManagementImportExcelData { + /** + * 物业名称 + */ + @ExcelProperty(value = "物业名称") + private String name; + + /** + * 烟台需求:物业联系人姓名 + */ + @ExcelProperty(value = "物业联系人") + private String contactName; + + /** + * 烟台需求:物业联系人电话 + */ + @ExcelProperty(value = "联系电话") + private String contactMobile; + + @Data + public static class ErrorRow { + /** + * 物业名称 + */ + @ExcelProperty(value = "物业名称") + private String name; + + /** + * 烟台需求:物业联系人姓名 + */ + @ExcelProperty(value = "物业联系人") + private String contactName; + + /** + * 烟台需求:物业联系人电话 + */ + @ExcelProperty(value = "联系电话") + private String contactMobile; + + + @ColumnWidth(60) + @ExcelProperty("错误信息") + private String errorInfo; + } +} + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPropertyManagementService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPropertyManagementService.java index bc808af034..83ea49e041 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPropertyManagementService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPropertyManagementService.java @@ -92,4 +92,13 @@ public interface IcPropertyManagementService extends BaseService wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPropertyManagementEntity::getCustomerId,customerId).eq(IcPropertyManagementEntity::getName,name); + return baseDao.selectOne(wrapper); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 324f9e3fff..557692cc65 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -1,34 +1,56 @@ package com.epmet.service.impl; +import com.alibaba.excel.EasyExcel; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.EpmetRequestHolder; +import com.epmet.commons.tools.utils.*; +import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcNeighborHoodPropertyDao; import com.epmet.dao.IcPropertyManagementDao; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.IcPropertyManagementDTO; import com.epmet.dto.form.IcPropertyManagementFormDTO; +import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.result.IcPropertyManagementResultDTO; +import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.entity.IcNeighborHoodPropertyEntity; import com.epmet.entity.IcPropertyManagementEntity; +import com.epmet.excel.handler.IcPropertyManagementImportListener; +import com.epmet.excel.yt.IcPropertyManagementImportExcelData; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.feign.OssFeignClient; import com.epmet.service.PropertyManagementService; +import com.epmet.utils.ImportTaskUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; +import org.apache.http.entity.ContentType; +import org.apache.poi.util.IOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.commons.CommonsMultipartFile; import javax.annotation.Resource; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.UUID; import java.util.stream.Collectors; @Slf4j @@ -42,6 +64,10 @@ public class PropertyManagementServiceImpl implements PropertyManagementService private IcPropertyManagementDao icPropertyManagementDao; @Resource private IcNeighborHoodPropertyDao icNeighborHoodPropertyDao; + @Autowired + private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; + @Autowired + private OssFeignClient ossFeignClient; /** * 查询当前客户下的物业 @@ -118,7 +144,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, formDTO.getId()) .eq(IcNeighborHoodPropertyEntity::getNeighborHoodId, neighborHoodId); - if (icNeighborHoodPropertyDao.selectCount(queryWrapper) < 1) { + if (icNeighborHoodPropertyDao.selectCount(queryWrapper) < NumConstant.ONE) { // 插入小区物业关系表 IcNeighborHoodPropertyEntity neighborHoodPropertyEntity = new IcNeighborHoodPropertyEntity(); neighborHoodPropertyEntity.setPropertyId(formDTO.getId()); @@ -196,5 +222,99 @@ public class PropertyManagementServiceImpl implements PropertyManagementService return resultDto; } + /** + * 执行Excel导入 + * + * @param filePath + * @param importTaskId + */ + @Async + @Override + public void execAsyncExcelImport(Path filePath, String importTaskId) { + String userId = null; + try { + userId = EpmetRequestHolder.getLoginUserId(); + String customerId = EpmetRequestHolder.getLoginUserCustomerId(); + + IcPropertyManagementImportListener listener = new IcPropertyManagementImportListener(customerId, SpringContextUtils.getBean(IcPropertyManagementServiceImpl.class)); + + EasyExcel.read(filePath.toFile(), IcPropertyManagementImportExcelData.class, listener).headRowNumber(1).sheet(0).doRead(); + + String errorDesFileUrl = null; + + List errorRows = listener.getErrorRows(); + + boolean failed = errorRows.size() > 0; + + // 合并到一起写入 + // errorRows.addAll(otherRows); + + // 生成并上传描述文件 + OutputStream os = null; + FileItem fileItem = null; + if (errorRows.size() > 0) { + try { + // 文件生成 + Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir(ImportTaskConstants.IC_PROPERTY_MANAGEMENT, "import", "error_des"); + String fileName = UUID.randomUUID().toString().concat(".xlsx"); + + fileItem = new DiskFileItemFactory(DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD, errorDescDir.toFile()) + .createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), false, fileName); + os = fileItem.getOutputStream(); + + EasyExcel.write(os, IcPropertyManagementImportExcelData.ErrorRow.class).sheet("信息列表").doWrite(errorRows); + // 文件上传oss + Result errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); + if (errorDesFileUploadResult.success()) { + errorDesFileUrl = errorDesFileUploadResult.getData().getUrl(); + } + + } finally { + IOUtils.closeQuietly(os); + if (!fileItem.isInMemory()) { + try { + fileItem.delete(); + } catch (Exception e) { + log.error("【物业管理表ic_property_management】删除错误描述临时文件失败:{}", ExceptionUtils.getErrorStackTrace(e)); + } + } + } + } + + Result result = ImportTaskUtils.finishImportTask( + importTaskId, + failed ? ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL : ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS, + errorDesFileUrl, + ""); + + if (!result.success()) { + log.error("【物业管理表ic_property_management】finishImportTask失败"); + } + } catch (Exception e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【物业管理表ic_property_management】出错:{}", errorMsg); + + ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); + importFinishTaskForm.setTaskId(importTaskId); + importFinishTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); + importFinishTaskForm.setOperatorId(userId); + importFinishTaskForm.setResultDesc("城市管理图层导入失败:系统异常,请查看系统日志"); + + Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); + if (!result.success()) { + log.error("【物业管理表ic_property_management】导入记录状态修改为'完成'失败"); + } + } finally { + // 删除临时文件 + if (Files.exists(filePath)) { + try { + Files.delete(filePath); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + } From 6cf3547b0134fe54b28a9823dbd963c956ff3424 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 8 May 2023 14:54:11 +0800 Subject: [PATCH 34/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcPropertyManagementDTO.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java index 5a34eab3cb..490cc35f90 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPropertyManagementDTO.java @@ -20,7 +20,6 @@ package com.epmet.dto; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -75,7 +74,6 @@ public class IcPropertyManagementDTO implements Serializable { * 导出时候用 * 该物业关联的小区 */ - @JsonIgnore @ExcelProperty(value = "关联小区") @ColumnWidth(60) private String neighborHoodNames; From f5bbb9314fdd8775bf784262c63b49d7d210084b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 8 May 2023 14:56:13 +0800 Subject: [PATCH 35/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E7=AE=A1=E7=90=86=E5=B0=8F=E5=8C=BA=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcPropertyManagementDao.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml index 2035e53020..71046c4bb0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml @@ -72,7 +72,12 @@ SELECT p.NEIGHBOR_HOOD_ID, @@ -24,7 +25,7 @@ INNER JOIN ic_neighbor_hood h ON ( p.NEIGHBOR_HOOD_ID = h.ID ) WHERE p.PROPERTY_ID = #{propertyId} - AND (h.AGENCY_ID =#{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') ) + AND (h.AGENCY_ID = #{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') ) AND p.DEL_FLAG = '0' AND h.DEL_FLAG = '0' order by h.CREATED_TIME asc From 92cfd3d0c95964eea210fe9b0aaa92f750b16efa Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Mon, 8 May 2023 16:20:01 +0800 Subject: [PATCH 39/68] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/IcNeighborHoodResultDTO.java | 8 ++++++++ .../src/main/resources/mapper/IcNeighborHoodDao.xml | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcNeighborHoodResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcNeighborHoodResultDTO.java index d775552bbf..112ace5fbf 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcNeighborHoodResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcNeighborHoodResultDTO.java @@ -28,4 +28,12 @@ public class IcNeighborHoodResultDTO extends PageFormDTO { private String propertyId; private String agencyName; private String longitude; + + private String viliageTypeName; + + private String area; + + private String openTypeName; + + private String buildYear; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index 326940bdd9..b61da5e7ab 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -130,7 +130,11 @@ d.PROPERTY_ID as propertyId , a.LOCATION as location, a.LONGITUDE as longitude, - a.LATITUDE as latitude + a.LATITUDE as latitude, + a.AREA as area, + a.BUILD_YEAR as buildYear, + if(a.VILIAGE_TYPE = 1,'住宅小区',if(a.VILIAGE_TYPE = 1,'自然村','')) as viliageTypeName, + if(a.OPEN_TYPE = 1,'封闭式',if(a.OPEN_TYPE = 1,'开放式','')) as openTypeName from ic_neighbor_hood a left join customer_agency b on a.AGENCY_ID = b.ID and b.DEL_FLAG='0' From ac12e2d18903fc100314a8851ff6c2f7846a22cb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 8 May 2023 16:39:15 +0800 Subject: [PATCH 40/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=B0=8F=E5=8C=BAid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcNeighborHoodController.java | 15 +++++++++++++ .../java/com/epmet/dao/IcNeighborHoodDao.java | 13 +++++++++++ .../epmet/service/IcNeighborHoodService.java | 7 ++++++ .../impl/IcNeighborHoodServiceImpl.java | 21 +++++++++++++----- .../resources/mapper/IcNeighborHoodDao.xml | 22 +++++++++++++++++++ .../mapper/IcNeighborHoodPropertyDao.xml | 2 +- 6 files changed, 74 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java index 1faa0d9221..2e39b1f211 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java @@ -174,6 +174,21 @@ public class IcNeighborHoodController { return new Result>().ok(list); } + /** + * 入参:gridId、agencyId + * 返回当前组织及下级下的所有小区 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("neighborhood-options-yantai") + public Result> queryNeighborHoodOptionsYanTai(@LoginUser TokenDto tokenDto, @RequestBody NeighborHoodOptionFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + List list=icNeighborHoodService.queryNeighborHoodOptionsYanTai(formDTO); + return new Result>().ok(list); + } + /** * 获取用户组织下小区列表 * diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java index 2fd4f25eee..b97fdf0f03 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java @@ -224,4 +224,17 @@ public interface IcNeighborHoodDao extends BaseDao { IcNeighborHoodEntity getNeighborHoodInfoByName(CheckHouseInfoFormDTO formDTO); List queryNeighborHoodOptions(NeighborHoodOptionFormDTO formDTO); + + /** + * label: xxx网格-xxx小区 + * @param customerId + * @param agencyId + * @param gridId + * @param neighborHoodName + * @return + */ + List queryNeighborHoodOptionsYanTai(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("gridId") String gridId, + @Param("neighborHoodName") String neighborHoodName); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java index e5766ce0d3..5313886414 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java @@ -203,4 +203,11 @@ public interface IcNeighborHoodService extends BaseService * @return */ List queryNeighborHoodOptions(NeighborHoodOptionFormDTO formDTO); + + /** + * 小区下拉框,小区名:xxx网格-xxx小区 + * @param formDTO + * @return + */ + List queryNeighborHoodOptionsYanTai(NeighborHoodOptionFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index 3b6a79691c..d2f2dc4776 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java @@ -856,9 +856,20 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl queryNeighborHoodOptionsYanTai(NeighborHoodOptionFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getGridId()) && StringUtils.isBlank(formDTO.getAgencyId())) { + // 默认查询当前工作人员所属组织及下级的 + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + formDTO.setAgencyId(staffInfoCacheResult.getAgencyId()); + } + List list = baseDao.queryNeighborHoodOptionsYanTai(formDTO.getCustomerId(),formDTO.getAgencyId(),formDTO.getGridId(),formDTO.getNeighborHoodName()); + return list; + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index 326940bdd9..0a4f7db95b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -695,4 +695,26 @@ ORDER BY h.NEIGHBOR_HOOD_NAME ASC + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml index 4ea353272f..9e5f9b0bf9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodPropertyDao.xml @@ -18,7 +18,7 @@ SELECT m.*, + ( + case when m.type='0' then '楼长' + when m.type='1' then '单元长' + else '-' + end + )as typeName, d.ORGANIZATION_NAME AS districtName, s.ORGANIZATION_NAME AS streetName, c.ORGANIZATION_NAME AS communityName, From a01720c755d3eae1a24dfbcbbfc3550bfffe854c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 10:26:07 +0800 Subject: [PATCH 51/68] =?UTF-8?q?=E6=A5=BC=E9=95=BF=E5=8D=95=E5=85=83?= =?UTF-8?q?=E9=95=BF=E8=BF=99=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=88=96=E8=80=85?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=EF=BC=8C=E4=B8=8D=E8=AE=BA=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=98=AF=E5=95=A5=EF=BC=8C=E5=8D=95=E5=85=83=E9=83=BD?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=B8=8D=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CommunityBuildingManagerController.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java index 771bcb1006..2240faba43 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java @@ -25,7 +25,6 @@ import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; import com.epmet.service.CommunityBuildingManagerService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.VerticalAlignment; import org.springframework.beans.factory.annotation.Autowired; @@ -92,10 +91,10 @@ public class CommunityBuildingManagerController { public Result save(@LoginUser TokenDto tokenDto,@RequestBody CommunityBuildingManagerDTO dto){ dto.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(dto, CommunityBuildingManagerDTO.AddShowGroup.class); - //类型:0楼长;1单元长 + /* //类型:0楼长;1单元长 if("1".equals(dto.getType())&& StringUtils.isBlank(dto.getUnitId())){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"单元长必须选择所属单元","单元长必须选择所属单元"); - } + }*/ communityBuildingManagerService.save(dto); return new Result(); } @@ -110,10 +109,10 @@ public class CommunityBuildingManagerController { @PostMapping("update") public Result update(@RequestBody CommunityBuildingManagerDTO dto){ ValidatorUtils.validateEntity(dto, CommunityBuildingManagerDTO.UpdateShowGroup.class); - //类型:0楼长;1单元长 + /* //类型:0楼长;1单元长 if("1".equals(dto.getType())&& StringUtils.isBlank(dto.getUnitId())){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"单元长必须选择所属单元","单元长必须选择所属单元"); - } + }*/ communityBuildingManagerService.update(dto); return new Result(); } From a8025880e7dd941277528b5a6e12cb74bf1a0941 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 10:41:01 +0800 Subject: [PATCH 52/68] =?UTF-8?q?=E6=A5=BC=E9=95=BF=E5=8D=95=E5=85=83?= =?UTF-8?q?=E9=95=BF=E8=BF=99=EF=BC=8C=E5=90=8C=E4=B8=80=E4=B8=AA=E6=A5=BC?= =?UTF-8?q?=EF=BC=8C=E5=8F=AA=E5=85=81=E8=AE=B8=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=A5=BC=E9=95=BF=EF=BC=8C=E5=90=8C=E4=B8=80=E4=B8=AA=E5=8D=95?= =?UTF-8?q?=E5=85=83=EF=BC=8C=E5=8F=AA=E5=85=81=E8=AE=B8=E6=9C=89=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=8D=95=E5=85=83=E9=95=BF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommunityBuildingManagerServiceImpl.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java index 0d7593f50c..24fedd15ec 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java @@ -1,10 +1,12 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; @@ -21,6 +23,7 @@ import com.epmet.service.CommunityBuildingManagerService; import com.epmet.service.CustomerGridService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; @@ -105,13 +108,27 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl countQuery=new LambdaQueryWrapper<>(); + countQuery.eq(CommunityBuildingManagerEntity::getType,type) + .eq(CommunityBuildingManagerEntity::getBuildingId,buildingId) + .eq(StringUtils.isNotBlank(unitId),CommunityBuildingManagerEntity::getUnitId,unitId) + .ne(StringUtils.isNotBlank(id),CommunityBuildingManagerEntity::getId,id); + if(baseDao.selectCount(countQuery)>NumConstant.ZERO){ + throw new ValidateException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"所选楼栋(单元)已存在楼长(单元长)"); + } + } + /** * 编辑楼长/单元长 * todo: 同步到具体的楼栋 @@ -122,6 +139,7 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl Date: Tue, 9 May 2023 11:16:45 +0800 Subject: [PATCH 53/68] /gov/org/communityBuildingManager/export --- .../com/epmet/controller/CommunityBuildingManagerController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java index 2240faba43..4378e9bf8b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java @@ -167,6 +167,7 @@ public class CommunityBuildingManagerController { @PostMapping("export") public void exportCommunityBuildingManager(@LoginUser TokenDto tokenDto, @RequestBody CommunityBuildingManagerPageFormDTO formDTO, HttpServletResponse response) throws IOException { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); ExcelWriter excelWriter = null; formDTO.setPageNo(NumConstant.ONE); formDTO.setPageSize(NumConstant.TEN_THOUSAND); From a6015e0aed5b927e5942a182f8457b7e55f291e7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 11:21:06 +0800 Subject: [PATCH 54/68] /gov/org/communityBuildingManager/export --- .../service/impl/CommunityBuildingManagerServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java index 24fedd15ec..9f8e9bbf09 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java @@ -6,7 +6,6 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; -import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; @@ -125,7 +124,7 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImplNumConstant.ZERO){ - throw new ValidateException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"所选楼栋(单元)已存在楼长(单元长)"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"所选楼栋(单元)已存在楼长(单元长)","所选楼栋(单元)已存在楼长(单元长)"); } } From 2be44668f27270120b3a7feb213b27e3abe13156 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 11:23:29 +0800 Subject: [PATCH 55/68] /gov/org/propertymanagement/page --- .../com/epmet/service/impl/PropertyManagementServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 16fdde6f25..23ec2b19ff 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -210,6 +210,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService .distinct().collect(Collectors.toList()); result.setNeighborHoodNames(CollectionUtils.isNotEmpty(neighborHoodList) ? StringUtils.join(neighborHoodNames, StrConstant.COMMA_ZH) : StrConstant.EPMETY_STR); result.setNeighborHoodList(neighborHoodList); + result.setTotalNeighborHood(CollectionUtils.isNotEmpty(neighborHoodList)?neighborHoodList.size():NumConstant.ZERO); }); return new PageData<>(list, pageInfo.getTotal(), pageSize); } From 3d68e3a2a0684b1201c5dc483634c85440980f45 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 11:53:51 +0800 Subject: [PATCH 56/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=EF=BC=8C=E5=90=8D=E7=A7=B0=E4=B8=80=E8=87=B4=EF=BC=8C=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E4=BB=A5excel=E5=A1=AB=E5=86=99=E7=9A=84=E4=B8=BA?= =?UTF-8?q?=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/excel/handler/IcPropertyManagementImportListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java index c591d54331..096f586ee1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPropertyManagementImportListener.java @@ -56,7 +56,7 @@ public class IcPropertyManagementImportListener implements ReadListener Date: Tue, 9 May 2023 12:06:08 +0800 Subject: [PATCH 57/68] /gov/org/propertymanagement/update --- .../impl/PropertyManagementServiceImpl.java | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 23ec2b19ff..77f30363d4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -141,21 +141,24 @@ public class PropertyManagementServiceImpl implements PropertyManagementService .set(IcPropertyManagementEntity::getUpdatedTime, new Date()) .set(IcPropertyManagementEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); icPropertyManagementDao.update(null, updateWrapper); + CustomerStaffInfoCacheResult staffInfoCacheResult= CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(),EpmetRequestHolder.getLoginUserId()); + + // 查询当前物业,在本组织及下级范围内,管理的小区 + List originNeighborHoodList = icNeighborHoodPropertyDao.getNeighborHoodList(formDTO.getId(), staffInfoCacheResult.getAgencyId()); + // 原来存在关联的小区,现在取消勾选了,需要删除物业小区关系表 + originNeighborHoodList.forEach(origin -> { + // 举例:原来管理A小区,现在取消勾选 + if (!formDTO.getNeighborHoodIdList().contains(origin.getId())) { + LambdaUpdateWrapper updateWrapper1 = new LambdaUpdateWrapper<>(); + updateWrapper1.eq(IcNeighborHoodPropertyEntity::getPropertyId, formDTO.getId()) + .eq(IcNeighborHoodPropertyEntity::getNeighborHoodId, origin.getId()) + .set(IcNeighborHoodPropertyEntity::getDelFlag, NumConstant.ONE_STR) + .set(IcNeighborHoodPropertyEntity::getUpdatedTime, new Date()) + .set(IcNeighborHoodPropertyEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); + icNeighborHoodPropertyDao.update(null, updateWrapper1); + } + }); if (CollectionUtils.isNotEmpty(formDTO.getNeighborHoodIdList())) { - CustomerStaffInfoCacheResult staffInfoCacheResult= CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(),EpmetRequestHolder.getLoginUserId()); - List originNeighborHoodList = icNeighborHoodPropertyDao.getNeighborHoodList(formDTO.getId(),staffInfoCacheResult.getAgencyId()); - //原来关联的,现在清除的小区,删除物业小区关系表 - originNeighborHoodList.forEach(origin->{ - if(!formDTO.getNeighborHoodIdList().contains(origin.getId())){ - LambdaUpdateWrapper updateWrapper1=new LambdaUpdateWrapper<>(); - updateWrapper1.eq(IcNeighborHoodPropertyEntity::getPropertyId,formDTO.getId()) - .eq(IcNeighborHoodPropertyEntity::getNeighborHoodId,origin.getId()) - .set(IcNeighborHoodPropertyEntity::getDelFlag,NumConstant.ONE_STR) - .set(IcNeighborHoodPropertyEntity::getUpdatedTime, new Date()) - .set(IcNeighborHoodPropertyEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); - icNeighborHoodPropertyDao.update(null,updateWrapper1); - } - }); formDTO.getNeighborHoodIdList().forEach(neighborHoodId -> { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, formDTO.getId()) @@ -167,6 +170,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService neighborHoodPropertyEntity.setNeighborHoodId(neighborHoodId); icNeighborHoodPropertyDao.insert(neighborHoodPropertyEntity); } + //原本已经存在小区和物业的关系,不用再插入 }); } } From 90f0ddbff1c8d32b60b76cd0bccbf23aa287e12b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 12:18:11 +0800 Subject: [PATCH 58/68] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/excel/yt/IcPropertyManagementImportExcelData.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java index 55196ffa18..cf9ad9d66b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java @@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; +import javax.validation.constraints.NotBlank; + /** * @Description * @Author yzm @@ -14,6 +16,7 @@ public class IcPropertyManagementImportExcelData { /** * 物业名称 */ + @NotBlank(message = "物业名称必填") @ExcelProperty(value = "*物业名称") private String name; From 73a98fe99edde529a4ee11a46f0d72f7a37cacf8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 12:23:29 +0800 Subject: [PATCH 59/68] /gov/org/communityBuildingManager/import --- .../epmet/constants/ImportTaskConstants.java | 5 ++ .../CommunityBuildingManagerController.java | 60 ++++++++++++++++++- .../CommunityBuildingManagerService.java | 3 + .../CommunityBuildingManagerServiceImpl.java | 39 ++++++++---- 4 files changed, 96 insertions(+), 11 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java index f7b664de4b..f25fd4269a 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java @@ -88,4 +88,9 @@ public interface ImportTaskConstants { * 物业表:ic_property_management */ String IC_PROPERTY_MANAGEMENT="ic_property_management"; + + /** + * 楼长单元长 + */ + String COMMUNITY_BUILDING_MANAGER="community_building_manager"; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java index 4378e9bf8b..21f5cbfca9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java @@ -10,19 +10,26 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.form.yt.CommunityBuildingManagerPageFormDTO; import com.epmet.dto.result.CommunityBuildingManagerDTO; +import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; import com.epmet.service.CommunityBuildingManagerService; +import com.epmet.utils.ImportTaskUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.apache.poi.ss.usermodel.IndexedColors; @@ -31,15 +38,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.URLEncoder; +import java.nio.file.Path; import java.util.Date; import java.util.List; +import java.util.UUID; /** @@ -51,7 +62,7 @@ import java.util.List; @Slf4j @RestController @RequestMapping("communityBuildingManager") -public class CommunityBuildingManagerController { +public class CommunityBuildingManagerController implements ResultDataResolver { @Autowired private CommunityBuildingManagerService communityBuildingManagerService; @@ -207,6 +218,53 @@ public class CommunityBuildingManagerController { } } + /** + * 导入excel + * + * @return + */ + @PostMapping("import") + public Result importExcel(MultipartFile file) { + // 1.暂存文件 + String originalFilename = file.getOriginalFilename(); + String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); + + Path fileSavePath; + try { + Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir(ImportTaskConstants.COMMUNITY_BUILDING_MANAGER, "import"); + fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName)); + } catch (IOException e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【楼长单元长导入】创建临时存储文件失败:{}", errorMsg); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败"); + } + + InputStream is = null; + FileOutputStream os = null; + + try { + is = file.getInputStream(); + os = new FileOutputStream(fileSavePath.toString()); + IOUtils.copy(is, os); + } catch (Exception e) { + log.error(ImportTaskConstants.COMMUNITY_BUILDING_MANAGER + "表 importExcel exception", e); + } finally { + org.apache.poi.util.IOUtils.closeQuietly(is); + org.apache.poi.util.IOUtils.closeQuietly(os); + } + + // 2.生成导入任务记录 + ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException( + ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.COMMUNITY_BUILDING_MANAGER), + ServiceConstant.EPMET_COMMON_SERVICE, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + "楼长单元长导入excel错误", + "楼长单元长导入excel错误"); + + // 3.执行导入 + communityBuildingManagerService.execAsyncExcelImport(fileSavePath, rstData.getTaskId()); + return new Result(); + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java index b67d4d0d35..eb32743443 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CommunityBuildingManagerService.java @@ -7,6 +7,7 @@ import com.epmet.dto.result.CommunityBuildingManagerDTO; import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; import com.epmet.entity.CommunityBuildingManagerEntity; +import java.nio.file.Path; import java.util.List; /** @@ -63,4 +64,6 @@ public interface CommunityBuildingManagerService extends BaseService ids); + + void execAsyncExcelImport(Path fileSavePath, String taskId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java index 9f8e9bbf09..817d435c9b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java @@ -22,11 +22,14 @@ import com.epmet.service.CommunityBuildingManagerService; import com.epmet.service.CustomerGridService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.nio.file.Path; import java.util.List; /** @@ -35,6 +38,7 @@ import java.util.List; * @author generator generator@elink-cn.com * @since v1.0.0 2023-05-06 */ +@Slf4j @Service public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl implements CommunityBuildingManagerService { @@ -67,7 +71,7 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl pageInfo = new PageInfo<>(resList); - return new PageData<>(resList, pageInfo.getTotal(),formDTO.getPageSize()); + return new PageData<>(resList, pageInfo.getTotal(), formDTO.getPageSize()); } /** @@ -108,7 +112,7 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl countQuery=new LambdaQueryWrapper<>(); - countQuery.eq(CommunityBuildingManagerEntity::getType,type) - .eq(CommunityBuildingManagerEntity::getBuildingId,buildingId) - .eq(StringUtils.isNotBlank(unitId),CommunityBuildingManagerEntity::getUnitId,unitId) - .ne(StringUtils.isNotBlank(id),CommunityBuildingManagerEntity::getId,id); - if(baseDao.selectCount(countQuery)>NumConstant.ZERO){ - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"所选楼栋(单元)已存在楼长(单元长)","所选楼栋(单元)已存在楼长(单元长)"); + LambdaQueryWrapper countQuery = new LambdaQueryWrapper<>(); + countQuery.eq(CommunityBuildingManagerEntity::getType, type) + .eq(CommunityBuildingManagerEntity::getBuildingId, buildingId) + .eq(StringUtils.isNotBlank(unitId), CommunityBuildingManagerEntity::getUnitId, unitId) + .ne(StringUtils.isNotBlank(id), CommunityBuildingManagerEntity::getId, id); + if (baseDao.selectCount(countQuery) > NumConstant.ZERO) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "所选楼栋(单元)已存在楼长(单元长)", "所选楼栋(单元)已存在楼长(单元长)"); } } @@ -138,7 +142,7 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl Date: Tue, 9 May 2023 12:27:11 +0800 Subject: [PATCH 60/68] =?UTF-8?q?/gov/org/communityBuildingManager/import,?= =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E5=BE=85=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommunityBuildingManagerController.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java index 21f5cbfca9..01e62c31f4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java @@ -10,26 +10,20 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; -import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.form.yt.CommunityBuildingManagerPageFormDTO; import com.epmet.dto.result.CommunityBuildingManagerDTO; -import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.yt.CommunityBuildingManagerResultDTO; import com.epmet.service.CommunityBuildingManagerService; -import com.epmet.utils.ImportTaskUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.apache.poi.ss.usermodel.IndexedColors; @@ -42,15 +36,12 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.URLEncoder; -import java.nio.file.Path; import java.util.Date; import java.util.List; -import java.util.UUID; /** @@ -225,7 +216,8 @@ public class CommunityBuildingManagerController implements ResultDataResolver { */ @PostMapping("import") public Result importExcel(MultipartFile file) { - // 1.暂存文件 + return new Result(); + /*// 1.暂存文件 String originalFilename = file.getOriginalFilename(); String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); @@ -263,7 +255,7 @@ public class CommunityBuildingManagerController implements ResultDataResolver { // 3.执行导入 communityBuildingManagerService.execAsyncExcelImport(fileSavePath, rstData.getTaskId()); - return new Result(); + return new Result();*/ } From dd8eb84ecbe9484b9776c9b90802c31bd88891c9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 12:33:50 +0800 Subject: [PATCH 61/68] =?UTF-8?q?/gov/org/communityBuildingManager/import,?= =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E5=BE=85=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/CommunityBuildingManagerController.java | 2 +- .../java/com/epmet/controller/PropertyManagementController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java index 01e62c31f4..7c4f1fef3c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CommunityBuildingManagerController.java @@ -215,7 +215,7 @@ public class CommunityBuildingManagerController implements ResultDataResolver { * @return */ @PostMapping("import") - public Result importExcel(MultipartFile file) { + public Result importExcel(@RequestPart("file") MultipartFile file) { return new Result(); /*// 1.暂存文件 String originalFilename = file.getOriginalFilename(); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index c3bff703b0..9adff02f7f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -239,7 +239,7 @@ public class PropertyManagementController implements ResultDataResolver { * @return */ @PostMapping("import") - public Result importExcel(MultipartFile file) { + public Result importExcel(@RequestPart("file") MultipartFile file) { // 1.暂存文件 String originalFilename = file.getOriginalFilename(); String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); From e46992190554c6a7797bad2d7d8a1faf20034240 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 12:58:07 +0800 Subject: [PATCH 62/68] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=89=A9=E4=B8=9A=EF=BC=9A/gov/org/propertymanagement/delete-b?= =?UTF-8?q?atch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PropertyManagementController.java | 15 +++++++- .../service/PropertyManagementService.java | 12 ++++++- .../impl/PropertyManagementServiceImpl.java | 34 ++++++++++++++++--- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index 9adff02f7f..4c77e5472c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -139,7 +139,20 @@ public class PropertyManagementController implements ResultDataResolver { public Result delete(@RequestBody IcPropertyManagementFormDTO formDTO){ //效验数据 ValidatorUtils.validateEntity(formDTO, IcPropertyManagementFormDTO.DeleteGroup.class); - propertyManagementService.delete(formDTO); + propertyManagementService.delete(formDTO.getId()); + return new Result(); + } + + /** + * 物业批量删除 + * @param ids + * @return + */ + @PostMapping("delete-batch") + public Result deleteBatch( @RequestBody List ids) { + if (CollectionUtils.isNotEmpty(ids)) { + propertyManagementService.deleteBatch(ids); + } return new Result(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java index 301b730072..ccd2b27a38 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java @@ -38,7 +38,11 @@ public interface PropertyManagementService { String add(IcPropertyManagementFormDTO formDTO); void update(IcPropertyManagementFormDTO formDTO); - void delete(IcPropertyManagementFormDTO formDTO); + /** + * 物业管理批量删除 + * @param id + */ + void delete(String id); /** * 物业管理-列表查询 @@ -68,4 +72,10 @@ public interface PropertyManagementService { * @param taskId */ void execAsyncExcelImport(Path fileSavePath, String taskId); + + /** + * 物业管理批量删除 + * @param ids + */ + void deleteBatch(List ids); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 77f30363d4..3e34e3c845 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -177,19 +177,45 @@ public class PropertyManagementServiceImpl implements PropertyManagementService /** * 单个删除 - * @param formDTO + * @param id */ @Override @Transactional(rollbackFor = Exception.class) - public void delete(IcPropertyManagementFormDTO formDTO) { + public void delete(String id) { LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); - queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId,formDTO.getId()); + queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId,id); if (icNeighborHoodPropertyDao.selectCount(queryWrapper) > 0) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"物业存在与小区关联,无法删除","已与小区关联,无法删除"); } - icPropertyManagementDao.deleteById(formDTO.getId()); + icPropertyManagementDao.deleteById(id); } + /** + * 物业管理批量删除 + * @param ids + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteBatch(List ids) { + if (CollectionUtils.isEmpty(ids)) { + return; + } + int failedNum = NumConstant.ZERO; + for (String id : ids) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, id); + if (icNeighborHoodPropertyDao.selectCount(queryWrapper) > 0) { + failedNum += 1; + } else { + icPropertyManagementDao.deleteById(id); + } + } + if (failedNum > NumConstant.ZERO) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "物业存在与小区关联,无法删除", String.format("%s个物业已与小区关联,无法批量删除,请先解除与小区关联关系", failedNum)); + } + } + + /** * 物业管理-列表查询 * From de6311a50b1e8451f9d6eb8d3dd9854617a19c30 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 13:16:52 +0800 Subject: [PATCH 63/68] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=89=A9=E4=B8=9A=EF=BC=9A/gov/org/propertymanagement/delete-b?= =?UTF-8?q?atch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PropertyManagementController.java | 13 +++-- .../service/PropertyManagementService.java | 6 ++- .../impl/PropertyManagementServiceImpl.java | 49 +++++++++++++------ 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index 4c77e5472c..50767693ed 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -144,14 +144,19 @@ public class PropertyManagementController implements ResultDataResolver { } /** - * 物业批量删除 + * 物业管理-批量删除 + * * @param ids - * @return + * @return 返回失败的id列表 */ @PostMapping("delete-batch") - public Result deleteBatch( @RequestBody List ids) { + public Result> deleteBatch(@RequestBody List ids) { if (CollectionUtils.isNotEmpty(ids)) { - propertyManagementService.deleteBatch(ids); + List failedIdList = propertyManagementService.deleteBatch(ids); + Result result = new Result>().ok(failedIdList); + result.setMsg("部门物业删除失败"); + result.setCode(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode()); + return result; } return new Result(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java index ccd2b27a38..3f50a0658c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java @@ -42,7 +42,7 @@ public interface PropertyManagementService { * 物业管理批量删除 * @param id */ - void delete(String id); + Boolean delete(String id); /** * 物业管理-列表查询 @@ -75,7 +75,9 @@ public interface PropertyManagementService { /** * 物业管理批量删除 + * * @param ids + * @return 返回失败的id列表 */ - void deleteBatch(List ids); + List deleteBatch(List ids); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 3e34e3c845..d91fb52d38 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -177,42 +177,59 @@ public class PropertyManagementServiceImpl implements PropertyManagementService /** * 单个删除 + * * @param id */ @Override @Transactional(rollbackFor = Exception.class) - public void delete(String id) { - LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); - queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId,id); + public Boolean delete(String id) { + Boolean delResFlag=true; + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); + // 查询当前物业,在本组织及下级范围内,管理的小区 + List originNeighborHoodList = icNeighborHoodPropertyDao.getNeighborHoodList(id, staffInfoCacheResult.getAgencyId()); + // 如果存在记录,则解除物业与小区关联关系 + originNeighborHoodList.forEach(origin -> { + LambdaUpdateWrapper updateWrapper1 = new LambdaUpdateWrapper<>(); + updateWrapper1.eq(IcNeighborHoodPropertyEntity::getPropertyId, id) + .eq(IcNeighborHoodPropertyEntity::getNeighborHoodId, origin.getId()) + .set(IcNeighborHoodPropertyEntity::getDelFlag, NumConstant.ONE_STR) + .set(IcNeighborHoodPropertyEntity::getUpdatedTime, new Date()) + .set(IcNeighborHoodPropertyEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); + icNeighborHoodPropertyDao.update(null, updateWrapper1); + }); + // 再查询是否存在其他组织下的小区,与该物业有关联,存在则不允许删除 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, id); if (icNeighborHoodPropertyDao.selectCount(queryWrapper) > 0) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"物业存在与小区关联,无法删除","已与小区关联,无法删除"); + delResFlag=false; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前物业已与其他组织下的小区关联,无法删除", "当前物业已与其他组织下的小区关联,无法删除"); } + // 删除物业表 icPropertyManagementDao.deleteById(id); + return delResFlag; } + /** * 物业管理批量删除 + * * @param ids + * @return 返回失败的id列表 */ @Override @Transactional(rollbackFor = Exception.class) - public void deleteBatch(List ids) { + public List deleteBatch(List ids) { if (CollectionUtils.isEmpty(ids)) { - return; + return new ArrayList<>(); } - int failedNum = NumConstant.ZERO; + List failedIdList = new ArrayList<>(); for (String id : ids) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, id); - if (icNeighborHoodPropertyDao.selectCount(queryWrapper) > 0) { - failedNum += 1; - } else { - icPropertyManagementDao.deleteById(id); + Boolean res = delete(id); + if (!res) { + failedIdList.add(id); } } - if (failedNum > NumConstant.ZERO) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "物业存在与小区关联,无法删除", String.format("%s个物业已与小区关联,无法批量删除,请先解除与小区关联关系", failedNum)); - } + return failedIdList; } From 5a79a055643d898cc8da60fe36e2bbc1d2b4bfa5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 13:34:54 +0800 Subject: [PATCH 64/68] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=89=A9=E4=B8=9A=EF=BC=9A/gov/org/propertymanagement/delete-b?= =?UTF-8?q?atch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/PropertyManagementService.java | 2 +- .../service/impl/PropertyManagementServiceImpl.java | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java index 3f50a0658c..6966cf38a1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PropertyManagementService.java @@ -42,7 +42,7 @@ public interface PropertyManagementService { * 物业管理批量删除 * @param id */ - Boolean delete(String id); + void delete(String id); /** * 物业管理-列表查询 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index d91fb52d38..8e4d6331b7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -182,8 +182,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService */ @Override @Transactional(rollbackFor = Exception.class) - public Boolean delete(String id) { - Boolean delResFlag=true; + public void delete(String id) { CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); // 查询当前物业,在本组织及下级范围内,管理的小区 List originNeighborHoodList = icNeighborHoodPropertyDao.getNeighborHoodList(id, staffInfoCacheResult.getAgencyId()); @@ -201,12 +200,10 @@ public class PropertyManagementServiceImpl implements PropertyManagementService LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, id); if (icNeighborHoodPropertyDao.selectCount(queryWrapper) > 0) { - delResFlag=false; throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前物业已与其他组织下的小区关联,无法删除", "当前物业已与其他组织下的小区关联,无法删除"); } // 删除物业表 icPropertyManagementDao.deleteById(id); - return delResFlag; } @@ -224,7 +221,13 @@ public class PropertyManagementServiceImpl implements PropertyManagementService } List failedIdList = new ArrayList<>(); for (String id : ids) { - Boolean res = delete(id); + Boolean res =true; + try{ + //调用单挑删除方法 + delete(id); + }catch(EpmetException e){ + res=false; + } if (!res) { failedIdList.add(id); } From fcb374a34f600ab48856f632ae937a2396a2b2d5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 13:45:57 +0800 Subject: [PATCH 65/68] 111 --- .../com/epmet/excel/yt/IcPropertyManagementImportExcelData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java index cf9ad9d66b..7a318bbad7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/yt/IcPropertyManagementImportExcelData.java @@ -37,7 +37,7 @@ public class IcPropertyManagementImportExcelData { /** * 物业名称 */ - @ExcelProperty(value = "物业名称") + @ExcelProperty(value = "*物业名称") private String name; /** From 9b920e5256789e85b4b952bce9d963f6449190e8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 13:47:40 +0800 Subject: [PATCH 66/68] 111 --- .../com/epmet/controller/PropertyManagementController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java index 50767693ed..c6bfacb04e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PropertyManagementController.java @@ -153,6 +153,9 @@ public class PropertyManagementController implements ResultDataResolver { public Result> deleteBatch(@RequestBody List ids) { if (CollectionUtils.isNotEmpty(ids)) { List failedIdList = propertyManagementService.deleteBatch(ids); + if(CollectionUtils.isEmpty(failedIdList)){ + return new Result<>(); + } Result result = new Result>().ok(failedIdList); result.setMsg("部门物业删除失败"); result.setCode(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode()); From 9608a4fb868b0ba9ad058b7a1676e594ce95287c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 14:25:50 +0800 Subject: [PATCH 67/68] =?UTF-8?q?=E7=BB=8F=E4=B8=8E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BB=8F=E7=90=86=E7=A1=AE=E8=AE=A4=EF=BC=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=89=A9=E4=B8=9A=EF=BC=8C=E7=9B=B4=E6=8E=A5=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=A0=E9=9C=80=E5=88=A4=E6=96=AD=E4=B8=8B=E9=9D=A2=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=85=B3=E8=81=94=E5=B0=8F=E5=8C=BA=E3=80=82=20?= =?UTF-8?q?=E4=B8=94=E5=88=AB=E7=9A=84=E7=A4=BE=E5=8C=BA=E5=9C=A8=E7=94=A8?= =?UTF-8?q?=E6=AD=A4=E7=89=A9=E4=B8=9A=EF=BC=8C=E4=B9=9F=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E3=80=82=E6=B8=85=E9=99=A4=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=9A=84=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PropertyManagementServiceImpl.java | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 8e4d6331b7..6ead260319 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -183,27 +183,21 @@ public class PropertyManagementServiceImpl implements PropertyManagementService @Override @Transactional(rollbackFor = Exception.class) public void delete(String id) { - CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); - // 查询当前物业,在本组织及下级范围内,管理的小区 - List originNeighborHoodList = icNeighborHoodPropertyDao.getNeighborHoodList(id, staffInfoCacheResult.getAgencyId()); - // 如果存在记录,则解除物业与小区关联关系 - originNeighborHoodList.forEach(origin -> { - LambdaUpdateWrapper updateWrapper1 = new LambdaUpdateWrapper<>(); - updateWrapper1.eq(IcNeighborHoodPropertyEntity::getPropertyId, id) - .eq(IcNeighborHoodPropertyEntity::getNeighborHoodId, origin.getId()) - .set(IcNeighborHoodPropertyEntity::getDelFlag, NumConstant.ONE_STR) - .set(IcNeighborHoodPropertyEntity::getUpdatedTime, new Date()) - .set(IcNeighborHoodPropertyEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); - icNeighborHoodPropertyDao.update(null, updateWrapper1); - }); - // 再查询是否存在其他组织下的小区,与该物业有关联,存在则不允许删除 - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(IcNeighborHoodPropertyEntity::getPropertyId, id); - if (icNeighborHoodPropertyDao.selectCount(queryWrapper) > 0) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前物业已与其他组织下的小区关联,无法删除", "当前物业已与其他组织下的小区关联,无法删除"); - } + Date now = new Date(); + // 删除物业与小区关联关系表 + LambdaUpdateWrapper updateWrapper1 = new LambdaUpdateWrapper<>(); + updateWrapper1.eq(IcNeighborHoodPropertyEntity::getPropertyId, id) + .set(IcNeighborHoodPropertyEntity::getDelFlag, NumConstant.ONE_STR) + .set(IcNeighborHoodPropertyEntity::getUpdatedTime, now) + .set(IcNeighborHoodPropertyEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); + icNeighborHoodPropertyDao.update(null, updateWrapper1); // 删除物业表 - icPropertyManagementDao.deleteById(id); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(IcPropertyManagementEntity::getId, id) + .set(IcPropertyManagementEntity::getDelFlag, NumConstant.ONE_STR) + .set(IcPropertyManagementEntity::getUpdatedTime, now) + .set(IcPropertyManagementEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()); + icPropertyManagementDao.update(null, updateWrapper); } From 4d2ba136e8f0b1db96891b9e5f51aca972ca3e30 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 9 May 2023 14:49:08 +0800 Subject: [PATCH 68/68] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=A5=BC=E9=95=BF?= =?UTF-8?q?=EF=BC=8C=20=E5=90=8C=E6=97=B6=E6=B8=85=E7=A9=BAic=5Fbuilding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CommunityBuildingManagerServiceImpl.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java index 817d435c9b..c6cf2f0eb3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CommunityBuildingManagerServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; @@ -30,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.nio.file.Path; +import java.util.Date; import java.util.List; /** @@ -159,7 +161,16 @@ public class CommunityBuildingManagerServiceImpl extends BaseServiceImpl ids) { - baseDao.deleteBatchIds(ids); + Date now=new Date(); + ids.forEach(id->{ + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(CommunityBuildingManagerEntity::getId, id) + .set(CommunityBuildingManagerEntity::getDelFlag, NumConstant.ONE_STR) + .set(CommunityBuildingManagerEntity::getUpdatedBy, EpmetRequestHolder.getLoginUserId()) + .set(CommunityBuildingManagerEntity::getUpdatedTime, now); + baseDao.update(null, updateWrapper); + // todo + }); }