From 57c279de57b7ea05f2dffa6df0ef300f033ce915 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 18 Nov 2021 13:43:00 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=201.ic=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=AF=BC=E5=85=A5=20=E4=BF=AE=E5=A4=8Dgridoption?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9A=84=E9=80=82=E9=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiUserImportServiceImpl.java | 6 +++--- .../java/com/epmet/service/impl/IcResiUserServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 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 48c0cf7a5b..909f16b8ad 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 @@ -564,7 +564,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res } else { // remote类型 - Map options = listRemoteOptions(headerColumnWrapper, columnWrapper.getOptionSourceValue(), currUserAgencyId); + Map options = listRemoteOptions(headerColumnWrapper, columnWrapper.getOptionSourceValue(), currUserAgencyId, "saveorupdate"); String colValue = options.get(cellContent); columnWrapper.setColValue(colValue); } @@ -765,7 +765,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res * @param fullUri * @return */ - public Map listRemoteOptions(Map columnWrappers, String fullUri, String currUserAgencyId) { + public Map listRemoteOptions(Map columnWrappers, String fullUri, String currUserAgencyId, String purpose) { String pureUri = null; String cascadeItemId = null; ColumnWrapper cascadeItemColumnWrapper = null; @@ -793,7 +793,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res case "/gov/org/customergrid/gridoption": GridOptionFormDTO form = new GridOptionFormDTO(); form.setAgencyId(currUserAgencyId); - form.setPurpose("saveorupdate"); + form.setPurpose(purpose); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); break; case "/gov/org/customerpartybranch/branchoption": 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 c97cdbabdd..eb62c090af 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 @@ -684,7 +684,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl stringMap = icResiUserImportService.listRemoteOptions(columnWrappers, v.getOptionSourceValue(), currentStaffAgencyId); + Map stringMap = icResiUserImportService.listRemoteOptions(columnWrappers, v.getOptionSourceValue(), currentStaffAgencyId, "query"); if ("checkbox".equals(v.getItemType())) { stringMap.forEach((label, value) -> map.put(value, vauleStr.contains(value) ? "是" : "否")); } else if ("select".equals(v.getItemType())) { From 4c594eb4c203e64040d278053c2f11c665b063d7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Nov 2021 14:22:10 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E8=A1=A8=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysDictDataController.java | 10 ++++++++++ .../java/com/epmet/dao/SysDictDataDao.java | 3 +++ .../com/epmet/service/SysDictDataService.java | 8 ++++++++ .../service/impl/SysDictDataServiceImpl.java | 12 +++++++++++ .../main/resources/mapper/SysDictDataDao.xml | 13 ++++++++++++ .../tools/dto/form/DictListFormDTO.java | 20 +++++++++++++++++++ .../tools/dto/result/DictListResultDTO.java | 17 ++++++++++++++++ 7 files changed, 83 insertions(+) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DictListFormDTO.java create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictListResultDTO.java 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 af65d4fd90..18e0437551 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 @@ -8,6 +8,8 @@ package com.epmet.controller; +import com.epmet.commons.tools.dto.form.DictListFormDTO; +import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; @@ -139,5 +141,13 @@ public class SysDictDataController { return new Result>().ok(sysDictDataService.getHouseOption()); } + /** + * @Description 字典数据查询通用接口 + * @Author sun + */ + @PostMapping("dictlist") + public Result> dictList(@RequestBody DictListFormDTO formDTO) { + return new Result>().ok(sysDictDataService.dictList(formDTO.getDictType())); + } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java index 50528f1326..59ee893a89 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java @@ -9,6 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.entity.DictData; import com.epmet.entity.SysDictDataEntity; import org.apache.ibatis.annotations.Mapper; @@ -27,4 +28,6 @@ public interface SysDictDataDao extends BaseDao { * 字典数据列表 */ List getDictDataList(); + + List selectDictList(String dictType); } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java index bcc3bd3953..0d64ee0d8c 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java @@ -9,6 +9,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.dto.form.DictListFormDTO; +import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.SysDictDataDTO; @@ -77,4 +79,10 @@ public interface SysDictDataService extends BaseService { * @Date 2021/10/26 17:12 */ List getHouseOption(); + + /** + * @Description 字典数据查询通用接口 + * @Author sun + */ + List dictList(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 aa62b9b624..468fb764c7 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java @@ -12,6 +12,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.dto.form.DictListFormDTO; +import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; @@ -200,4 +202,14 @@ public class SysDictDataServiceImpl extends BaseServiceImpl dictList(String dictType) { + List resultDTOList = baseDao.selectDictList(dictType); + return resultDTOList; + } + } diff --git a/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml b/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml index b6c79a46bf..3760e0895a 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml +++ b/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml @@ -7,4 +7,17 @@ select dict_type_id, dict_label, dict_value from sys_dict_data order by dict_type_id, sort + + diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DictListFormDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DictListFormDTO.java new file mode 100644 index 0000000000..1880debe42 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/DictListFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.commons.tools.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Description 字典数据查询-接口入参 + * @Author sun + */ +@Data +public class DictListFormDTO { + + /** + * 字典类型 + */ + @NotBlank(message = "字典类型不能为空") + private String dictType; + +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictListResultDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictListResultDTO.java new file mode 100644 index 0000000000..fe89cf0d24 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/DictListResultDTO.java @@ -0,0 +1,17 @@ +package com.epmet.commons.tools.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 字典数据查询-接口返参 + * @Author sun + */ +@Data +public class DictListResultDTO implements Serializable { + private static final long serialVersionUID = 8618231166600518980L; + private String label; + private String value; +} From 170e3fc2b63e99cda9f16cb7735cb2f7195b109a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 18 Nov 2021 15:01:21 +0800 Subject: [PATCH 03/19] =?UTF-8?q?ic=5Fresi=5Fdemand=5Fdict=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E5=88=B0heart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IcResiDemandDictController.java | 0 .../src/main/java/com/epmet/dao/IcResiDemandDictDao.java | 0 .../src/main/java/com/epmet/entity/IcResiDemandDictEntity.java | 0 .../src/main/java/com/epmet/service/IcResiDemandDictService.java | 0 .../java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java | 0 .../src/main/resources/mapper/IcResiDemandDictDao.xml | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {epmet-user/epmet-user-server => epmet-module/epmet-heart/epmet-heart-server}/src/main/java/com/epmet/controller/IcResiDemandDictController.java (100%) rename {epmet-user/epmet-user-server => epmet-module/epmet-heart/epmet-heart-server}/src/main/java/com/epmet/dao/IcResiDemandDictDao.java (100%) rename {epmet-user/epmet-user-server => epmet-module/epmet-heart/epmet-heart-server}/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java (100%) rename {epmet-user/epmet-user-server => epmet-module/epmet-heart/epmet-heart-server}/src/main/java/com/epmet/service/IcResiDemandDictService.java (100%) rename {epmet-user/epmet-user-server => epmet-module/epmet-heart/epmet-heart-server}/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java (100%) rename {epmet-user/epmet-user-server => epmet-module/epmet-heart/epmet-heart-server}/src/main/resources/mapper/IcResiDemandDictDao.xml (100%) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java similarity index 100% rename from epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java similarity index 100% rename from epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java similarity index 100% rename from epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java similarity index 100% rename from epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiDemandDictService.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java similarity index 100% rename from epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml similarity index 100% rename from epmet-user/epmet-user-server/src/main/resources/mapper/IcResiDemandDictDao.xml rename to epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml From 0ed47e7c68aa2de0c4ee8f330a9c3579e7c7bfee Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 18 Nov 2021 15:42:36 +0800 Subject: [PATCH 04/19] =?UTF-8?q?ic=5Fresi=5Fdemand=5Fdict=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E5=88=B0heart,=E6=9F=A5=E8=AF=A2=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demand/UserDemandNameQueryFormDTO.java | 21 +++++++++++++++++++ .../feign/EpmetHeartOpenFeignClient.java | 5 ++++- .../EpmetHeartOpenFeignClientFallback.java | 7 ++++++- .../IcResiDemandDictController.java | 12 +++++++++++ .../com/epmet/dao/IcResiDemandDictDao.java | 3 +++ .../service/IcResiDemandDictService.java | 8 +++++++ .../impl/IcResiDemandDictServiceImpl.java | 7 +++++++ .../resources/mapper/IcResiDemandDictDao.xml | 16 ++++++++++++++ .../service/impl/IcResiUserServiceImpl.java | 15 +++++++++++-- 9 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java new file mode 100644 index 0000000000..3247482054 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.io.Serializable; +import java.util.Set; + +@Data +public class UserDemandNameQueryFormDTO implements Serializable { + private static final long serialVersionUID = 1562457999313501989L; + + public interface AddUserInternalGroup {} + + @NotBlank(message = "客户idbu不能为空",groups =AddUserInternalGroup.class) + private String customerId; + + @NotEmpty(message = "分类编码不能为空",groups =AddUserInternalGroup.class) + private Set codeSet; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index b9f4424ab3..7a4a6c8ad5 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -5,7 +5,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.CommonCustomerFormDTO; -import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallback; +import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PathVariable; @@ -53,4 +53,7 @@ public interface EpmetHeartOpenFeignClient { **/ @PostMapping("/heart/resi/volunteer/queryuservolunteerinfo/{userId}") Result queryUserVolunteerInfo(@PathVariable("userId") String userId); + + @PostMapping("/heart/icresidemanddict/demangnames") + Result queryDemandNames(@RequestBody UserDemandNameQueryFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 23759f82c0..e0e140b02e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -6,8 +6,8 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; -import org.springframework.stereotype.Component; import java.util.List; @@ -48,4 +48,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result queryUserVolunteerInfo(String userId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "queryUserVolunteerInfo", userId); } + + @Override + public Result queryDemandNames(UserDemandNameQueryFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "queryDemandNames", formDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java index c83b41aa4f..13779cfe13 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcResiDemandDictDTO; +import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.service.IcResiDemandDictService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -90,4 +91,15 @@ public class IcResiDemandDictController { return new Result>().ok(icResiDemandDictService.getDemandOptions(tokenDto.getCustomerId())); } + + /** + * 居民信息列表需要展示分类名称,单独开出来这个接口,供user查询 + * @param formDTO + * @return + */ + @PostMapping("demangnames") + public Result queryDemandNames(@RequestBody UserDemandNameQueryFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,UserDemandNameQueryFormDTO.AddUserInternalGroup.class); + return icResiDemandDictService.queryDemandNames(formDTO); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java index 390e190f3c..94fd335929 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java @@ -24,6 +24,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Set; /** * 居民需求字典表 @@ -35,4 +36,6 @@ import java.util.List; public interface IcResiDemandDictDao extends BaseDao { List selectDemandOptions(@Param("customerId") String customerId); List selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode); + + String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set codeSet); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java index 034d4fc166..d41c4303ba 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java @@ -20,7 +20,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiDemandDictDTO; +import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.entity.IcResiDemandDictEntity; import java.util.List; @@ -103,4 +105,10 @@ public interface IcResiDemandDictService extends BaseService getDemandOptions(String customerId); + /** + * 居民信息列表需要展示分类名称,单独开出来这个接口,供user查询 + * @param formDTO + * @return + */ + Result queryDemandNames(UserDemandNameQueryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index 1910a360af..fb23a85fe8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -24,8 +24,10 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcResiDemandDictDao; import com.epmet.dto.IcResiDemandDictDTO; +import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.entity.IcResiDemandDictEntity; import com.epmet.service.IcResiDemandDictService; import org.apache.commons.lang3.StringUtils; @@ -110,4 +112,9 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl queryDemandNames(UserDemandNameQueryFormDTO formDTO) { + return new Result().ok(baseDao.selectCategoryNames(formDTO.getCustomerId(),formDTO.getCodeSet())); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index d33235f4bf..ae0c5a1e7f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -58,4 +58,20 @@ + + \ No newline at end of file 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 eb62c090af..3c021235fd 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 @@ -52,8 +52,10 @@ import com.epmet.dto.IcHouseDTO; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.IcResiCategoryStatsConfigDTO; import com.epmet.dto.form.*; +import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; +import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; @@ -87,7 +89,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl demandNameRes=heartOpenFeignClient.queryDemandNames(userDemandNameQueryFormDTO); + if(demandNameRes.success()){ + demandName=demandNameRes.getData(); + } return demandName; } From 45655d9c75168441fa75825fe3541e54a44f0fcf Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Nov 2021 16:45:59 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E3=80=81=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/SocietyOrgDTO.java | 141 +++++++++++++++++ .../controller/SocietyOrgController.java | 94 +++++++++++ .../java/com/epmet/dao/SocietyOrgDao.java | 33 ++++ .../com/epmet/entity/SocietyOrgEntity.java | 111 +++++++++++++ .../java/com/epmet/excel/SocietyOrgExcel.java | 98 ++++++++++++ .../com/epmet/service/SocietyOrgService.java | 95 ++++++++++++ .../service/impl/SocietyOrgServiceImpl.java | 100 ++++++++++++ .../main/resources/mapper/SocietyOrgDao.xml | 8 + .../main/java/com/epmet/dto/PlaceOrgDTO.java | 131 ++++++++++++++++ .../com/epmet/dto/PlacePatrolRecordDTO.java | 146 ++++++++++++++++++ .../epmet/dto/PlacePatrolReviewRecordDTO.java | 111 +++++++++++++ .../com/epmet/dto/PlacePatrolTeamDTO.java | 126 +++++++++++++++ .../epmet/dto/PlacePatrolTeamStaffDTO.java | 96 ++++++++++++ .../epmet/controller/PlaceOrgController.java | 94 +++++++++++ .../PlacePatrolRecordController.java | 94 +++++++++++ .../PlacePatrolReviewRecordController.java | 94 +++++++++++ .../controller/PlacePatrolTeamController.java | 94 +++++++++++ .../PlacePatrolTeamStaffController.java | 94 +++++++++++ .../main/java/com/epmet/dao/PlaceOrgDao.java | 33 ++++ .../com/epmet/dao/PlacePatrolRecordDao.java | 33 ++++ .../epmet/dao/PlacePatrolReviewRecordDao.java | 33 ++++ .../com/epmet/dao/PlacePatrolTeamDao.java | 33 ++++ .../epmet/dao/PlacePatrolTeamStaffDao.java | 33 ++++ .../java/com/epmet/entity/PlaceOrgEntity.java | 101 ++++++++++++ .../epmet/entity/PlacePatrolRecordEntity.java | 116 ++++++++++++++ .../entity/PlacePatrolReviewRecordEntity.java | 81 ++++++++++ .../epmet/entity/PlacePatrolTeamEntity.java | 96 ++++++++++++ .../entity/PlacePatrolTeamStaffEntity.java | 66 ++++++++ .../java/com/epmet/excel/PlaceOrgExcel.java | 89 +++++++++++ .../epmet/excel/PlacePatrolRecordExcel.java | 101 ++++++++++++ .../excel/PlacePatrolReviewRecordExcel.java | 80 ++++++++++ .../com/epmet/excel/PlacePatrolTeamExcel.java | 89 +++++++++++ .../excel/PlacePatrolTeamStaffExcel.java | 71 +++++++++ .../com/epmet/service/PlaceOrgService.java | 95 ++++++++++++ .../service/PlacePatrolRecordService.java | 95 ++++++++++++ .../PlacePatrolReviewRecordService.java | 95 ++++++++++++ .../epmet/service/PlacePatrolTeamService.java | 95 ++++++++++++ .../service/PlacePatrolTeamStaffService.java | 95 ++++++++++++ .../service/impl/PlaceOrgServiceImpl.java | 100 ++++++++++++ .../impl/PlacePatrolRecordServiceImpl.java | 100 ++++++++++++ .../PlacePatrolReviewRecordServiceImpl.java | 100 ++++++++++++ .../impl/PlacePatrolTeamServiceImpl.java | 100 ++++++++++++ .../impl/PlacePatrolTeamStaffServiceImpl.java | 100 ++++++++++++ .../src/main/resources/mapper/PlaceOrgDao.xml | 8 + .../resources/mapper/PlacePatrolRecordDao.xml | 8 + .../mapper/PlacePatrolReviewRecordDao.xml | 8 + .../resources/mapper/PlacePatrolTeamDao.xml | 8 + .../mapper/PlacePatrolTeamStaffDao.xml | 8 + 48 files changed, 3830 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java new file mode 100644 index 0000000000..3c7a60b93c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java @@ -0,0 +1,141 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class SocietyOrgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 社会组织名称 + */ + private String societyName; + + /** + * 服务事项 + */ + private String serviceMatters; + + /** + * 负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 起始服务时间 + */ + private Date serviceStartTime; + + /** + * 终止服务时间 + */ + private Date serviceEndTime; + + /** + * 绑定管理员[组织下录入的工作人员] + */ + private String adminStaffId; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 维度 + */ + private String dimension; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java new file mode 100644 index 0000000000..315b568a9d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.SocietyOrgDTO; +import com.epmet.excel.SocietyOrgExcel; +import com.epmet.service.SocietyOrgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("societyorg") +public class SocietyOrgController { + + @Autowired + private SocietyOrgService societyOrgService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = societyOrgService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + SocietyOrgDTO data = societyOrgService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody SocietyOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + societyOrgService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody SocietyOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + societyOrgService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + societyOrgService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = societyOrgService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, SocietyOrgExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java new file mode 100644 index 0000000000..b46d6035d2 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.SocietyOrgEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface SocietyOrgDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java new file mode 100644 index 0000000000..9c0d086929 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("society_org") +public class SocietyOrgEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 社会组织名称 + */ + private String societyName; + + /** + * 服务事项 + */ + private String serviceMatters; + + /** + * 负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 起始服务时间 + */ + private Date serviceStartTime; + + /** + * 终止服务时间 + */ + private Date serviceEndTime; + + /** + * 绑定管理员[组织下录入的工作人员] + */ + private String adminStaffId; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 维度 + */ + private String dimension; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java new file mode 100644 index 0000000000..af8ddbe4c1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class SocietyOrgExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "社会组织名称") + private String societyName; + + @Excel(name = "服务事项") + private String serviceMatters; + + @Excel(name = "负责人") + private String personInCharge; + + @Excel(name = "负责人电话") + private String mobile; + + @Excel(name = "起始服务时间") + private Date serviceStartTime; + + @Excel(name = "终止服务时间") + private Date serviceEndTime; + + @Excel(name = "绑定管理员[组织下录入的工作人员]") + private String adminStaffId; + + @Excel(name = "地址") + private String address; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "维度") + private String dimension; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java new file mode 100644 index 0000000000..da73dc29d0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.SocietyOrgDTO; +import com.epmet.entity.SocietyOrgEntity; + +import java.util.List; +import java.util.Map; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface SocietyOrgService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return SocietyOrgDTO + * @author generator + * @date 2021-11-18 + */ + SocietyOrgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(SocietyOrgDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(SocietyOrgDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java new file mode 100644 index 0000000000..235c8f1c53 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.SocietyOrgDao; +import com.epmet.dto.SocietyOrgDTO; +import com.epmet.entity.SocietyOrgEntity; +import com.epmet.service.SocietyOrgService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, SocietyOrgDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, SocietyOrgDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public SocietyOrgDTO get(String id) { + SocietyOrgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, SocietyOrgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(SocietyOrgDTO dto) { + SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(SocietyOrgDTO dto) { + SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml new file mode 100644 index 0000000000..6583d6afc2 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java new file mode 100644 index 0000000000..bc61f843e8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java @@ -0,0 +1,131 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlaceOrgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVal; + + /** + * 场所名称 + */ + private String placeOrgName; + + /** + * 场所地址 + */ + private String address; + + /** + * 字典value,场所规模【 +0:10人以下 +1:10-20人 +2:21-40人 +3:41-100人 +4:100人以上】 + */ + private String scale; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java new file mode 100644 index 0000000000..592ff13956 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java @@ -0,0 +1,146 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlacsVal; + + /** + * 场所下的组织Id + */ + private String placeOrgId; + + /** + * 场所下分队(place_patrolteam)表Id + */ + private String placePatrolTeamId; + + /** + * 分队下检查人员Id,分号分隔 + */ + private String inspectors; + + /** + * 首次巡查时间 + */ + private Date firstTime; + + /** + * 隐患明细 + */ + private String detailed; + + /** + * 首次检查结果【0:合格 1:不合格】 + */ + private String firstResult; + + /** + * 拟复查时间 + */ + private Date reviewTime; + + /** + * 最终检查结果【0:合格 1:不合格】初始数据默认和首次检查结果相同 + */ + private String finalResult; + + /** + * 最新复查时间【初始数据默认和首次巡查时间相同】 + */ + private Date finalTime; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java new file mode 100644 index 0000000000..dbc2160e45 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolReviewRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查记录主(place_patrol_record)表Id + */ + private String placePatrolRecordId; + + /** + * 场所下分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 检查人员Id,逗号分隔 + */ + private String inspectors; + + /** + * 复查时间 + */ + private Date reviewTime; + + /** + * 复查隐患明细 + */ + private String detailed; + + /** + * 复查检查结果【0:合格 1:不合格】 + */ + private String reviewResult; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java new file mode 100644 index 0000000000..b80cd8509b --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 负责区域【网格Id 多个值逗号分隔】 + */ + private String gridIds; + + /** + * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 + */ + private String ninePlacsVals; + + /** + * 分队名称 + */ + private String teamName; + + /** + * 巡查计划 + */ + private String plan; + + /** + * 创建(建队)时间 + */ + private Date time; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java new file mode 100644 index 0000000000..48f69a5c4a --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamStaffDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 成员姓名 + */ + private String name; + + /** + * 成员电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java new file mode 100644 index 0000000000..77fc0c7fc9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlaceOrgDTO; +import com.epmet.excel.PlaceOrgExcel; +import com.epmet.service.PlaceOrgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placeorg") +public class PlaceOrgController { + + @Autowired + private PlaceOrgService placeOrgService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placeOrgService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlaceOrgDTO data = placeOrgService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlaceOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placeOrgService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlaceOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placeOrgService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placeOrgService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placeOrgService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlaceOrgExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java new file mode 100644 index 0000000000..35cbfad262 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolRecordDTO; +import com.epmet.excel.PlacePatrolRecordExcel; +import com.epmet.service.PlacePatrolRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolrecord") +public class PlacePatrolRecordController { + + @Autowired + private PlacePatrolRecordService placePatrolRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolRecordDTO data = placePatrolRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java new file mode 100644 index 0000000000..a6caf1d1aa --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolReviewRecordDTO; +import com.epmet.excel.PlacePatrolReviewRecordExcel; +import com.epmet.service.PlacePatrolReviewRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolreviewrecord") +public class PlacePatrolReviewRecordController { + + @Autowired + private PlacePatrolReviewRecordService placePatrolReviewRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolReviewRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolReviewRecordDTO data = placePatrolReviewRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolReviewRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolReviewRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolReviewRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolReviewRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolReviewRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolReviewRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolReviewRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java new file mode 100644 index 0000000000..29df2c1deb --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.excel.PlacePatrolTeamExcel; +import com.epmet.service.PlacePatrolTeamService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolteam") +public class PlacePatrolTeamController { + + @Autowired + private PlacePatrolTeamService placePatrolTeamService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolTeamService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolTeamDTO data = placePatrolTeamService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolTeamService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolTeamService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolTeamService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolTeamService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolTeamExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java new file mode 100644 index 0000000000..787d98981e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.excel.PlacePatrolTeamStaffExcel; +import com.epmet.service.PlacePatrolTeamStaffService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolteamstaff") +public class PlacePatrolTeamStaffController { + + @Autowired + private PlacePatrolTeamStaffService placePatrolTeamStaffService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = placePatrolTeamStaffService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PlacePatrolTeamStaffDTO data = placePatrolTeamStaffService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PlacePatrolTeamStaffDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + placePatrolTeamStaffService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PlacePatrolTeamStaffDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + placePatrolTeamStaffService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + placePatrolTeamStaffService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = placePatrolTeamStaffService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PlacePatrolTeamStaffExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java new file mode 100644 index 0000000000..d25d485262 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlaceOrgEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlaceOrgDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java new file mode 100644 index 0000000000..8d501f16e9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java new file mode 100644 index 0000000000..6253e7afd2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolReviewRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolReviewRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java new file mode 100644 index 0000000000..7e19b451c1 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolTeamEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolTeamDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java new file mode 100644 index 0000000000..a8c180fee7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PlacePatrolTeamStaffEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface PlacePatrolTeamStaffDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java new file mode 100644 index 0000000000..fbe92edea5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_org") +public class PlaceOrgEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVal; + + /** + * 场所名称 + */ + private String placeOrgName; + + /** + * 场所地址 + */ + private String address; + + /** + * 字典value,场所规模【 +0:10人以下 +1:10-20人 +2:21-40人 +3:41-100人 +4:100人以上】 + */ + private String scale; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java new file mode 100644 index 0000000000..b5a2c64dd2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_record") +public class PlacePatrolRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + private String gridId; + + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlacsVal; + + /** + * 场所下的组织Id + */ + private String placeOrgId; + + /** + * 场所下分队(place_patrolteam)表Id + */ + private String placePatrolTeamId; + + /** + * 分队下检查人员Id,分号分隔 + */ + private String inspectors; + + /** + * 首次巡查时间 + */ + private Date firstTime; + + /** + * 隐患明细 + */ + private String detailed; + + /** + * 首次检查结果【0:合格 1:不合格】 + */ + private String firstResult; + + /** + * 拟复查时间 + */ + private Date reviewTime; + + /** + * 最终检查结果【0:合格 1:不合格】初始数据默认和首次检查结果相同 + */ + private String finalResult; + + /** + * 最新复查时间【初始数据默认和首次巡查时间相同】 + */ + private Date finalTime; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java new file mode 100644 index 0000000000..196794d147 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_review_record") +public class PlacePatrolReviewRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查记录主(place_patrol_record)表Id + */ + private String placePatrolRecordId; + + /** + * 场所下分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 检查人员Id,逗号分隔 + */ + private String inspectors; + + /** + * 复查时间 + */ + private Date reviewTime; + + /** + * 复查隐患明细 + */ + private String detailed; + + /** + * 复查检查结果【0:合格 1:不合格】 + */ + private String reviewResult; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java new file mode 100644 index 0000000000..dce4701f43 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_team") +public class PlacePatrolTeamEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 负责区域【网格Id 多个值逗号分隔】 + */ + private String gridIds; + + /** + * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 + */ + private String ninePlacsVals; + + /** + * 分队名称 + */ + private String teamName; + + /** + * 巡查计划 + */ + private String plan; + + /** + * 创建(建队)时间 + */ + private Date time; + + /** + * 场所负责人 + */ + private String personInCharge; + + /** + * 负责人电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java new file mode 100644 index 0000000000..f0012def21 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("place_patrol_team_staff") +public class PlacePatrolTeamStaffEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 成员姓名 + */ + private String name; + + /** + * 成员电话 + */ + private String mobile; + + /** + * 备注 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java new file mode 100644 index 0000000000..83a6fb8792 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java @@ -0,0 +1,89 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlaceOrgExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "网格Id【场所区域】") + private String gridId; + + @Excel(name = "场所类型") + private String ninePlaceVal; + + @Excel(name = "场所名称") + private String placeOrgName; + + @Excel(name = "场所地址") + private String address; + + @Excel(name = "场所规模") + private String scale; + + @Excel(name = "场所负责人") + private String personInCharge; + + @Excel(name = "负责人电话") + private String mobile; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java new file mode 100644 index 0000000000..ccf1208aaa --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolRecordExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "网格Id【场所区域】") + private String gridId; + + @Excel(name = "场所类型【admin库sys_dict_data表九小场所value值】") + private String ninePlacsVal; + + @Excel(name = "场所下的组织Id") + private String placeOrgId; + + @Excel(name = "场所下分队(place_patrolteam)表Id") + private String placePatrolTeamId; + + @Excel(name = "分队下检查人员Id,分号分隔") + private String inspectors; + + @Excel(name = "首次巡查时间") + private Date firstTime; + + @Excel(name = "隐患明细") + private String detailed; + + @Excel(name = "首次检查结果【0:合格 1:不合格】") + private String firstResult; + + @Excel(name = "拟复查时间") + private Date reviewTime; + + @Excel(name = "最终检查结果【0:合格 1:不合格】初始数据默认和首次检查结果相同") + private String finalResult; + + @Excel(name = "最新复查时间【初始数据默认和首次巡查时间相同】") + private Date finalTime; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java new file mode 100644 index 0000000000..c98b265c27 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java @@ -0,0 +1,80 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolReviewRecordExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "巡查记录主(place_patrol_record)表Id") + private String placePatrolRecordId; + + @Excel(name = "场所下分队(place_patrol_team)表Id") + private String placePatrolTeamId; + + @Excel(name = "检查人员Id,逗号分隔") + private String inspectors; + + @Excel(name = "复查时间") + private Date reviewTime; + + @Excel(name = "复查隐患明细") + private String detailed; + + @Excel(name = "复查检查结果【0:合格 1:不合格】") + private String reviewResult; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java new file mode 100644 index 0000000000..b77fce4de4 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java @@ -0,0 +1,89 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "agency_id的所有上级") + private String pids; + + @Excel(name = "负责区域【网格Id 多个值逗号分隔】") + private String gridIds; + + @Excel(name = "负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】") + private String ninePlacsVals; + + @Excel(name = "分队名称") + private String teamName; + + @Excel(name = "巡查计划") + private String plan; + + @Excel(name = "创建(建队)时间") + private Date time; + + @Excel(name = "场所负责人") + private String personInCharge; + + @Excel(name = "负责人电话") + private String mobile; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java new file mode 100644 index 0000000000..db8c9c250a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class PlacePatrolTeamStaffExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户Id") + private String customerId; + + @Excel(name = "巡查分队(place_patrol_team)表Id") + private String placePatrolTeamId; + + @Excel(name = "成员姓名") + private String name; + + @Excel(name = "成员电话") + private String mobile; + + @Excel(name = "备注") + private String remarks; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java new file mode 100644 index 0000000000..ba728dcca2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlaceOrgDTO; +import com.epmet.entity.PlaceOrgEntity; + +import java.util.List; +import java.util.Map; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlaceOrgService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlaceOrgDTO + * @author generator + * @date 2021-11-18 + */ + PlaceOrgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlaceOrgDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlaceOrgDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java new file mode 100644 index 0000000000..51d4885918 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolRecordDTO; +import com.epmet.entity.PlacePatrolRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolRecordDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java new file mode 100644 index 0000000000..ae73375c3a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolReviewRecordDTO; +import com.epmet.entity.PlacePatrolReviewRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolReviewRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolReviewRecordDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolReviewRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolReviewRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolReviewRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java new file mode 100644 index 0000000000..55b983e348 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.entity.PlacePatrolTeamEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolTeamService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolTeamDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolTeamDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolTeamDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolTeamDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java new file mode 100644 index 0000000000..e970167e66 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.entity.PlacePatrolTeamStaffEntity; + +import java.util.List; +import java.util.Map; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface PlacePatrolTeamStaffService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PlacePatrolTeamStaffDTO + * @author generator + * @date 2021-11-18 + */ + PlacePatrolTeamStaffDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(PlacePatrolTeamStaffDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(PlacePatrolTeamStaffDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java new file mode 100644 index 0000000000..a6be788df8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlaceOrgDao; +import com.epmet.dto.PlaceOrgDTO; +import com.epmet.entity.PlaceOrgEntity; +import com.epmet.service.PlaceOrgService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlaceOrgServiceImpl extends BaseServiceImpl implements PlaceOrgService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlaceOrgDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlaceOrgDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PlaceOrgDTO get(String id) { + PlaceOrgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlaceOrgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlaceOrgDTO dto) { + PlaceOrgEntity entity = ConvertUtils.sourceToTarget(dto, PlaceOrgEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlaceOrgDTO dto) { + PlaceOrgEntity entity = ConvertUtils.sourceToTarget(dto, PlaceOrgEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java new file mode 100644 index 0000000000..6953888aac --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolRecordDao; +import com.epmet.dto.PlacePatrolRecordDTO; +import com.epmet.entity.PlacePatrolRecordEntity; +import com.epmet.service.PlacePatrolRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolRecordServiceImpl extends BaseServiceImpl implements PlacePatrolRecordService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PlacePatrolRecordDTO get(String id) { + PlacePatrolRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolRecordDTO dto) { + PlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolRecordDTO dto) { + PlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java new file mode 100644 index 0000000000..532bbc2545 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolReviewRecordDao; +import com.epmet.dto.PlacePatrolReviewRecordDTO; +import com.epmet.entity.PlacePatrolReviewRecordEntity; +import com.epmet.service.PlacePatrolReviewRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolReviewRecordServiceImpl extends BaseServiceImpl implements PlacePatrolReviewRecordService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolReviewRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolReviewRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PlacePatrolReviewRecordDTO get(String id) { + PlacePatrolReviewRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolReviewRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolReviewRecordDTO dto) { + PlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolReviewRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolReviewRecordDTO dto) { + PlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolReviewRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java new file mode 100644 index 0000000000..e7696ba4f9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolTeamDao; +import com.epmet.dto.PlacePatrolTeamDTO; +import com.epmet.entity.PlacePatrolTeamEntity; +import com.epmet.service.PlacePatrolTeamService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolTeamServiceImpl extends BaseServiceImpl implements PlacePatrolTeamService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolTeamDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolTeamDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PlacePatrolTeamDTO get(String id) { + PlacePatrolTeamEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolTeamDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolTeamDTO dto) { + PlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolTeamDTO dto) { + PlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java new file mode 100644 index 0000000000..c44ec42a76 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.PlacePatrolTeamStaffDao; +import com.epmet.dto.PlacePatrolTeamStaffDTO; +import com.epmet.entity.PlacePatrolTeamStaffEntity; +import com.epmet.service.PlacePatrolTeamStaffService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class PlacePatrolTeamStaffServiceImpl extends BaseServiceImpl implements PlacePatrolTeamStaffService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PlacePatrolTeamStaffDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PlacePatrolTeamStaffDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PlacePatrolTeamStaffDTO get(String id) { + PlacePatrolTeamStaffEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlacePatrolTeamStaffDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlacePatrolTeamStaffDTO dto) { + PlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamStaffEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlacePatrolTeamStaffDTO dto) { + PlacePatrolTeamStaffEntity entity = ConvertUtils.sourceToTarget(dto, PlacePatrolTeamStaffEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml new file mode 100644 index 0000000000..3fb8247c8b --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml new file mode 100644 index 0000000000..93cbf7d277 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml new file mode 100644 index 0000000000..bf558e052d --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml new file mode 100644 index 0000000000..2e889eb2dd --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml new file mode 100644 index 0000000000..26bebdb857 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 8e78d5c48ec0d4b8d3e41b41f05a1ee530392717 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Nov 2021 17:19:04 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddSocietyOrgFormDTO.java | 101 ++++++++++++++++++ .../controller/SocietyOrgController.java | 69 +++--------- .../com/epmet/service/SocietyOrgService.java | 68 +----------- .../service/impl/SocietyOrgServiceImpl.java | 70 +++--------- 4 files changed, 136 insertions(+), 172 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java new file mode 100644 index 0000000000..bc0555f95b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class AddSocietyOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 客户Id + */ + private String customerId; + /** + * 组织Id + */ + private String agencyId; + /** + * agency_id的所有上级 + */ + private String pids; + /** + * 社会组织名称 + */ + @NotBlank(message = "社会组织名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String societyName; + /** + * 服务事项 + */ + @NotBlank(message = "服务事项不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String serviceMatters; + /** + * 负责人 + */ + @NotBlank(message = "负责人名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String personInCharge; + /** + * 负责人电话 + */ + @NotBlank(message = "负责人电话不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String mobile; + /** + * 起始服务时间 + */ + @NotBlank(message = "起始服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private Date serviceStartTime; + /** + * 终止服务时间 + */ + @NotBlank(message = "终止服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private Date serviceEndTime; + /** + * 绑定管理员[组织下录入的工作人员] + */ + @NotBlank(message = "绑定管理员名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + private String adminStaffId; + /** + * 地址 + */ + private String address; + /** + * 经度 + */ + private String longitude; + /** + * 维度 + */ + private String dimension; + //token中userId + private String staffId; + + public interface Add {} + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java index 315b568a9d..0eb23cde7d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java @@ -17,23 +17,17 @@ package com.epmet.controller; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.SocietyOrgDTO; -import com.epmet.excel.SocietyOrgExcel; +import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.service.SocietyOrgService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** @@ -49,46 +43,17 @@ public class SocietyOrgController { @Autowired private SocietyOrgService societyOrgService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = societyOrgService.page(params); - return new Result>().ok(page); - } - - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - SocietyOrgDTO data = societyOrgService.get(id); - return new Result().ok(data); - } - - @PostMapping - public Result save(@RequestBody SocietyOrgDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - societyOrgService.save(dto); + /** + * @Author sun + * @Description 新增社会组织 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddSocietyOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddSocietyOrgFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setStaffId(tokenDto.getUserId()); + societyOrgService.add(formDTO); return new Result(); } - @PutMapping - public Result update(@RequestBody SocietyOrgDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - societyOrgService.update(dto); - return new Result(); - } - - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - societyOrgService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = societyOrgService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, SocietyOrgExcel.class); - } - } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java index da73dc29d0..846e07777f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java @@ -18,13 +18,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.SocietyOrgDTO; +import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.entity.SocietyOrgEntity; -import java.util.List; -import java.util.Map; - /** * 社会组织管理 * @@ -34,62 +30,8 @@ import java.util.Map; public interface SocietyOrgService extends BaseService { /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2021-11-18 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-11-18 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return SocietyOrgDTO - * @author generator - * @date 2021-11-18 - */ - SocietyOrgDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void save(SocietyOrgDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 - */ - void update(SocietyOrgDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2021-11-18 - */ - void delete(String[] ids); + * @Author sun + * @Description 新增社会组织 + **/ + void add(AddSocietyOrgFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java index 235c8f1c53..5f2c284be2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java @@ -17,24 +17,19 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.SocietyOrgDao; -import com.epmet.dto.SocietyOrgDTO; +import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.entity.SocietyOrgEntity; import com.epmet.service.SocietyOrgService; -import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - /** * 社会组织管理 * @@ -43,58 +38,19 @@ import java.util.Map; */ @Service public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { + private static final Logger log = LoggerFactory.getLogger(SocietyOrgServiceImpl.class); - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, SocietyOrgDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, SocietyOrgDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public SocietyOrgDTO get(String id) { - SocietyOrgEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, SocietyOrgDTO.class); - } - + /** + * @Author sun + * @Description 新增社会组织 + **/ @Override @Transactional(rollbackFor = Exception.class) - public void save(SocietyOrgDTO dto) { + public void add(AddSocietyOrgFormDTO dto) { SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getStaffId()); + entity.setPids(staffInfoCache.getAgencyPIds()); insert(entity); } - @Override - @Transactional(rollbackFor = Exception.class) - public void update(SocietyOrgDTO dto) { - SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - } \ No newline at end of file From 483046df86b754f3af6939b668bff6651ced2f03 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Nov 2021 17:19:43 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=EF=BC=8C=E5=85=9A=E7=BE=A4=E6=9C=8D=E5=8A=A1=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=87=AA=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/IcCommunitySelfOrganizationDTO.java | 136 +++++++++++++++++ ...CommunitySelfOrganizationPersonnelDTO.java | 91 +++++++++++ ...IcCommunitySelfOrganizationController.java | 94 ++++++++++++ ...tySelfOrganizationPersonnelController.java | 94 ++++++++++++ .../dao/IcCommunitySelfOrganizationDao.java | 33 ++++ ...CommunitySelfOrganizationPersonnelDao.java | 33 ++++ .../IcCommunitySelfOrganizationEntity.java | 106 +++++++++++++ ...munitySelfOrganizationPersonnelEntity.java | 61 ++++++++ .../IcCommunitySelfOrganizationExcel.java | 95 ++++++++++++ ...mmunitySelfOrganizationPersonnelExcel.java | 68 +++++++++ ...unitySelfOrganizationPersonnelService.java | 95 ++++++++++++ .../IcCommunitySelfOrganizationService.java | 95 ++++++++++++ ...ySelfOrganizationPersonnelServiceImpl.java | 100 +++++++++++++ ...cCommunitySelfOrganizationServiceImpl.java | 83 +++++++++++ .../mapper/IcCommunitySelfOrganizationDao.xml | 6 + ...cCommunitySelfOrganizationPersonnelDao.xml | 6 + .../dto/IcMatterAppointmentRecordDTO.java | 131 ++++++++++++++++ .../epmet/dto/IcPartyServiceCenterDTO.java | 141 ++++++++++++++++++ .../dto/IcPartyServiceCenterMatterDTO.java | 101 +++++++++++++ .../IcMatterAppointmentRecordController.java | 94 ++++++++++++ .../IcPartyServiceCenterController.java | 94 ++++++++++++ .../IcPartyServiceCenterMatterController.java | 94 ++++++++++++ .../dao/IcMatterAppointmentRecordDao.java | 33 ++++ .../epmet/dao/IcPartyServiceCenterDao.java | 33 ++++ .../dao/IcPartyServiceCenterMatterDao.java | 33 ++++ .../IcMatterAppointmentRecordEntity.java | 101 +++++++++++++ .../entity/IcPartyServiceCenterEntity.java | 111 ++++++++++++++ .../IcPartyServiceCenterMatterEntity.java | 71 +++++++++ .../excel/IcMatterAppointmentRecordExcel.java | 92 ++++++++++++ .../excel/IcPartyServiceCenterExcel.java | 98 ++++++++++++ .../IcPartyServiceCenterMatterExcel.java | 74 +++++++++ .../IcMatterAppointmentRecordService.java | 95 ++++++++++++ .../IcPartyServiceCenterMatterService.java | 95 ++++++++++++ .../service/IcPartyServiceCenterService.java | 95 ++++++++++++ .../IcMatterAppointmentRecordServiceImpl.java | 100 +++++++++++++ ...IcPartyServiceCenterMatterServiceImpl.java | 100 +++++++++++++ .../impl/IcPartyServiceCenterServiceImpl.java | 100 +++++++++++++ .../mapper/IcMatterAppointmentRecordDao.xml | 6 + .../mapper/IcPartyServiceCenterDao.xml | 6 + .../mapper/IcPartyServiceCenterMatterDao.xml | 6 + 40 files changed, 3100 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java new file mode 100644 index 0000000000..6be34cb9b8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java @@ -0,0 +1,136 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * 组织ID的父级 + */ + private String pid; + + /** + * org_id的所有上级 + */ + private String pids; + + /** + * 组织名称 + */ + private String organizationName; + + /** + * 组织人数 + */ + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 服务事项 + */ + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + private Date organizationCreatedTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java new file mode 100644 index 0000000000..1361539bce --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 社区自组织ID + */ + private String orgId; + + /** + * 人员姓名 + */ + private String personName; + + /** + * 人员电话 + */ + private String personIphone; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java new file mode 100644 index 0000000000..acab1c9611 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.excel.IcCommunitySelfOrganizationExcel; +import com.epmet.service.IcCommunitySelfOrganizationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("iccommunityselforganization") +public class IcCommunitySelfOrganizationController { + + @Autowired + private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icCommunitySelfOrganizationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcCommunitySelfOrganizationDTO data = icCommunitySelfOrganizationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcCommunitySelfOrganizationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcCommunitySelfOrganizationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icCommunitySelfOrganizationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icCommunitySelfOrganizationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.java new file mode 100644 index 0000000000..76a64ce4f0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationPersonnelController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.epmet.excel.IcCommunitySelfOrganizationPersonnelExcel; +import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("iccommunityselforganizationpersonnel") +public class IcCommunitySelfOrganizationPersonnelController { + + @Autowired + private IcCommunitySelfOrganizationPersonnelService icCommunitySelfOrganizationPersonnelService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icCommunitySelfOrganizationPersonnelService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcCommunitySelfOrganizationPersonnelDTO data = icCommunitySelfOrganizationPersonnelService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcCommunitySelfOrganizationPersonnelDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationPersonnelService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcCommunitySelfOrganizationPersonnelDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icCommunitySelfOrganizationPersonnelService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icCommunitySelfOrganizationPersonnelService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icCommunitySelfOrganizationPersonnelService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationPersonnelExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java new file mode 100644 index 0000000000..c046cfe956 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcCommunitySelfOrganizationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcCommunitySelfOrganizationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java new file mode 100644 index 0000000000..45a233840c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcCommunitySelfOrganizationPersonnelDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java new file mode 100644 index 0000000000..4d3515e7ff --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_community_self_organization") +public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * 组织ID的父级 + */ + private String pid; + + /** + * org_id的所有上级 + */ + private String pids; + + /** + * 组织名称 + */ + private String organizationName; + + /** + * 组织人数 + */ + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 服务事项 + */ + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + private Date organizationCreatedTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java new file mode 100644 index 0000000000..411429d430 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_community_self_organization_personnel") +public class IcCommunitySelfOrganizationPersonnelEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 社区自组织ID + */ + private String orgId; + + /** + * 人员姓名 + */ + private String personName; + + /** + * 人员电话 + */ + private String personIphone; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java new file mode 100644 index 0000000000..7310a47279 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationExcel.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "组织ID") + private String orgId; + + @Excel(name = "组织类型,agency:组织,grid:网格") + private String orgType; + + @Excel(name = "组织ID的父级") + private String pid; + + @Excel(name = "org_id的所有上级") + private String pids; + + @Excel(name = "组织名称") + private String organizationName; + + @Excel(name = "组织人数") + private Integer organizationPersonCount; + + @Excel(name = "负责人姓名") + private String principalName; + + @Excel(name = "负责人电话") + private String principalPhone; + + @Excel(name = "服务事项") + private String serviceItem; + + @Excel(name = "社区自组织创建时间") + private Date organizationCreatedTime; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java new file mode 100644 index 0000000000..da9480bb66 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcCommunitySelfOrganizationPersonnelExcel.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcCommunitySelfOrganizationPersonnelExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "社区自组织ID") + private String orgId; + + @Excel(name = "人员姓名") + private String personName; + + @Excel(name = "人员电话") + private String personIphone; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java new file mode 100644 index 0000000000..c8265ba859 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; + +import java.util.List; +import java.util.Map; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcCommunitySelfOrganizationPersonnelService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcCommunitySelfOrganizationPersonnelDTO + * @author generator + * @date 2021-11-18 + */ + IcCommunitySelfOrganizationPersonnelDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcCommunitySelfOrganizationPersonnelDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcCommunitySelfOrganizationPersonnelDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java new file mode 100644 index 0000000000..353ed2e6d8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.entity.IcCommunitySelfOrganizationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcCommunitySelfOrganizationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcCommunitySelfOrganizationDTO + * @author generator + * @date 2021-11-18 + */ + IcCommunitySelfOrganizationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcCommunitySelfOrganizationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcCommunitySelfOrganizationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java new file mode 100644 index 0000000000..197cfc1d86 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcCommunitySelfOrganizationPersonnelDao; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; +import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 社区自组织人员表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcCommunitySelfOrganizationPersonnelServiceImpl extends BaseServiceImpl implements IcCommunitySelfOrganizationPersonnelService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcCommunitySelfOrganizationPersonnelDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcCommunitySelfOrganizationPersonnelDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcCommunitySelfOrganizationPersonnelDTO get(String id) { + IcCommunitySelfOrganizationPersonnelEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcCommunitySelfOrganizationPersonnelDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcCommunitySelfOrganizationPersonnelDTO dto) { + IcCommunitySelfOrganizationPersonnelEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationPersonnelEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcCommunitySelfOrganizationPersonnelDTO dto) { + IcCommunitySelfOrganizationPersonnelEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationPersonnelEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java new file mode 100644 index 0000000000..5de7659620 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcCommunitySelfOrganizationDao; +import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.entity.IcCommunitySelfOrganizationEntity; +import com.epmet.service.IcCommunitySelfOrganizationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl implements IcCommunitySelfOrganizationService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcCommunitySelfOrganizationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcCommunitySelfOrganizationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcCommunitySelfOrganizationDTO get(String id) { + IcCommunitySelfOrganizationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcCommunitySelfOrganizationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcCommunitySelfOrganizationDTO dto) { + IcCommunitySelfOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcCommunitySelfOrganizationDTO dto) { + IcCommunitySelfOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, IcCommunitySelfOrganizationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml new file mode 100644 index 0000000000..12c22d2fa6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml new file mode 100644 index 0000000000..91cf453a04 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java new file mode 100644 index 0000000000..27ee8af29b --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcMatterAppointmentRecordDTO.java @@ -0,0 +1,131 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcMatterAppointmentRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 事项ID + */ + private String matterId; + + /** + * 预约日期 + */ + private String appointmentDate; + + /** + * 预约人 + */ + private String appointmentName; + + /** + * 预约电话 + */ + private String appointmentPhone; + + /** + * 备注 + */ + private String remark; + + /** + * 预约状态【cancel:取消,appointing:预约中】 + */ + private String status; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 1,2,5 + */ + private String timeId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java new file mode 100644 index 0000000000..50430c31b5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterDTO.java @@ -0,0 +1,141 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 中心名称 + */ + private String centerName; + + /** + * 办公电话 + */ + private String workPhone; + + /** + * 上午开始办公时间 + */ + private String amStartTime; + + /** + * 上午结束办公时间 + */ + private String amEndTime; + + /** + * 下午开始办公时间 + */ + private String pmStartTime; + + /** + * 下午结束办公时间 + */ + private String pmEndTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java new file mode 100644 index 0000000000..42b028df98 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPartyServiceCenterMatterDTO.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterMatterDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 党群服务中心ID + */ + private String partyServiceCenterId; + + /** + * 事项名字 + */ + private String matterName; + + /** + * 预约类型,每天:everyDay,工作日:workDay,周末:weekend + */ + private String appointmentType; + + /** + * 可预约开始时间 + */ + private String startTime; + + /** + * 可预约结束时间 + */ + private String endTime; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 客户ID + */ + private String customerId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.java new file mode 100644 index 0000000000..848ab27ceb --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcMatterAppointmentRecordController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcMatterAppointmentRecordDTO; +import com.epmet.excel.IcMatterAppointmentRecordExcel; +import com.epmet.service.IcMatterAppointmentRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icmatterappointmentrecord") +public class IcMatterAppointmentRecordController { + + @Autowired + private IcMatterAppointmentRecordService icMatterAppointmentRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icMatterAppointmentRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcMatterAppointmentRecordDTO data = icMatterAppointmentRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcMatterAppointmentRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icMatterAppointmentRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcMatterAppointmentRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icMatterAppointmentRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icMatterAppointmentRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icMatterAppointmentRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcMatterAppointmentRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java new file mode 100644 index 0000000000..dc9df26699 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.excel.IcPartyServiceCenterExcel; +import com.epmet.service.IcPartyServiceCenterService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icpartyservicecenter") +public class IcPartyServiceCenterController { + + @Autowired + private IcPartyServiceCenterService icPartyServiceCenterService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartyServiceCenterService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcPartyServiceCenterDTO data = icPartyServiceCenterService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcPartyServiceCenterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartyServiceCenterService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcPartyServiceCenterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPartyServiceCenterService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPartyServiceCenterService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartyServiceCenterService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyServiceCenterExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.java new file mode 100644 index 0000000000..affe64381a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterMatterController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import com.epmet.excel.IcPartyServiceCenterMatterExcel; +import com.epmet.service.IcPartyServiceCenterMatterService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icpartyservicecentermatter") +public class IcPartyServiceCenterMatterController { + + @Autowired + private IcPartyServiceCenterMatterService icPartyServiceCenterMatterService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartyServiceCenterMatterService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IcPartyServiceCenterMatterDTO data = icPartyServiceCenterMatterService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IcPartyServiceCenterMatterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartyServiceCenterMatterService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcPartyServiceCenterMatterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPartyServiceCenterMatterService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPartyServiceCenterMatterService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartyServiceCenterMatterService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyServiceCenterMatterExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java new file mode 100644 index 0000000000..98a08ee373 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcMatterAppointmentRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcMatterAppointmentRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java new file mode 100644 index 0000000000..0fa37f6146 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPartyServiceCenterEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPartyServiceCenterDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java new file mode 100644 index 0000000000..6001796620 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPartyServiceCenterMatterEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPartyServiceCenterMatterDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java new file mode 100644 index 0000000000..c7df20f0f7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcMatterAppointmentRecordEntity.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_matter_appointment_record") +public class IcMatterAppointmentRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 事项ID + */ + private String matterId; + + /** + * 预约日期 + */ + private String appointmentDate; + + /** + * 预约人 + */ + private String appointmentName; + + /** + * 预约电话 + */ + private String appointmentPhone; + + /** + * 备注 + */ + private String remark; + + /** + * 预约状态【cancel:取消,appointing:预约中】 + */ + private String status; + + /** + * 1,2,5 + */ + private String timeId; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java new file mode 100644 index 0000000000..b2b422ff9e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterEntity.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_service_center") +public class IcPartyServiceCenterEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * + */ + private String pid; + + /** + * + */ + private String pids; + + /** + * 中心名称 + */ + private String centerName; + + /** + * 办公电话 + */ + private String workPhone; + + /** + * 上午开始办公时间 + */ + private String amStartTime; + + /** + * 上午结束办公时间 + */ + private String amEndTime; + + /** + * 下午开始办公时间 + */ + private String pmStartTime; + + /** + * 下午结束办公时间 + */ + private String pmEndTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java new file mode 100644 index 0000000000..fd9f55fe13 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPartyServiceCenterMatterEntity.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_service_center_matter") +public class IcPartyServiceCenterMatterEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 党群服务中心ID + */ + private String partyServiceCenterId; + + /** + * 事项名字 + */ + private String matterName; + + /** + * 预约类型,每天:everyDay,工作日:workDay,周末:weekend + */ + private String appointmentType; + + /** + * 可预约开始时间 + */ + private String startTime; + + /** + * 可预约结束时间 + */ + private String endTime; + + /** + * 客户ID + */ + private String customerId; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java new file mode 100644 index 0000000000..ecbb00ee36 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcMatterAppointmentRecordExcel.java @@ -0,0 +1,92 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcMatterAppointmentRecordExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "") + private String customerId; + + @Excel(name = "组织ID") + private String orgId; + + @Excel(name = "组织类型,agency:组织,grid:网格") + private String orgType; + + @Excel(name = "") + private String pid; + + @Excel(name = "") + private String pids; + + @Excel(name = "事项ID") + private String matterId; + + @Excel(name = "预约日期") + private String appointmentDate; + + @Excel(name = "预约人") + private String appointmentName; + + @Excel(name = "预约电话") + private String appointmentPhone; + + @Excel(name = "备注") + private String remark; + + @Excel(name = "预约状态【cancel:取消,appointing:预约中】") + private String status; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "1,2,5") + private String timeId; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java new file mode 100644 index 0000000000..b1779eca45 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterExcel.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "组织ID") + private String orgId; + + @Excel(name = "组织类型,agency:组织,grid:网格") + private String orgType; + + @Excel(name = "") + private String pid; + + @Excel(name = "") + private String pids; + + @Excel(name = "中心名称") + private String centerName; + + @Excel(name = "办公电话") + private String workPhone; + + @Excel(name = "上午开始办公时间") + private String amStartTime; + + @Excel(name = "上午结束办公时间") + private String amEndTime; + + @Excel(name = "下午开始办公时间") + private String pmStartTime; + + @Excel(name = "下午结束办公时间") + private String pmEndTime; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "地址") + private String address; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java new file mode 100644 index 0000000000..465f2f7493 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPartyServiceCenterMatterExcel.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartyServiceCenterMatterExcel { + + @Excel(name = "") + private String id; + + @Excel(name = "党群服务中心ID") + private String partyServiceCenterId; + + @Excel(name = "事项名字") + private String matterName; + + @Excel(name = "预约类型,每天:everyDay,工作日:workDay,周末:weekend") + private String appointmentType; + + @Excel(name = "可预约开始时间") + private String startTime; + + @Excel(name = "可预约结束时间") + private String endTime; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private String revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "客户ID") + private String customerId; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java new file mode 100644 index 0000000000..4f330654a9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcMatterAppointmentRecordService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcMatterAppointmentRecordDTO; +import com.epmet.entity.IcMatterAppointmentRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcMatterAppointmentRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcMatterAppointmentRecordDTO + * @author generator + * @date 2021-11-18 + */ + IcMatterAppointmentRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcMatterAppointmentRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcMatterAppointmentRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java new file mode 100644 index 0000000000..48a39b4b7e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import com.epmet.entity.IcPartyServiceCenterMatterEntity; + +import java.util.List; +import java.util.Map; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPartyServiceCenterMatterService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartyServiceCenterMatterDTO + * @author generator + * @date 2021-11-18 + */ + IcPartyServiceCenterMatterDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcPartyServiceCenterMatterDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcPartyServiceCenterMatterDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java new file mode 100644 index 0000000000..8da75be135 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.entity.IcPartyServiceCenterEntity; + +import java.util.List; +import java.util.Map; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPartyServiceCenterService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPartyServiceCenterDTO + * @author generator + * @date 2021-11-18 + */ + IcPartyServiceCenterDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void save(IcPartyServiceCenterDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-18 + */ + void update(IcPartyServiceCenterDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java new file mode 100644 index 0000000000..6878b736c3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcMatterAppointmentRecordServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcMatterAppointmentRecordDao; +import com.epmet.dto.IcMatterAppointmentRecordDTO; +import com.epmet.entity.IcMatterAppointmentRecordEntity; +import com.epmet.service.IcMatterAppointmentRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事项预约记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcMatterAppointmentRecordServiceImpl extends BaseServiceImpl implements IcMatterAppointmentRecordService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcMatterAppointmentRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcMatterAppointmentRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcMatterAppointmentRecordDTO get(String id) { + IcMatterAppointmentRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcMatterAppointmentRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcMatterAppointmentRecordDTO dto) { + IcMatterAppointmentRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcMatterAppointmentRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcMatterAppointmentRecordDTO dto) { + IcMatterAppointmentRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcMatterAppointmentRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java new file mode 100644 index 0000000000..ac837eed29 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPartyServiceCenterMatterDao; +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import com.epmet.entity.IcPartyServiceCenterMatterEntity; +import com.epmet.service.IcPartyServiceCenterMatterService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 党群服务中心可预约事项表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartyServiceCenterMatterServiceImpl extends BaseServiceImpl implements IcPartyServiceCenterMatterService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartyServiceCenterMatterDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyServiceCenterMatterDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPartyServiceCenterMatterDTO get(String id) { + IcPartyServiceCenterMatterEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartyServiceCenterMatterDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyServiceCenterMatterDTO dto) { + IcPartyServiceCenterMatterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterMatterEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartyServiceCenterMatterDTO dto) { + IcPartyServiceCenterMatterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterMatterEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java new file mode 100644 index 0000000000..06978a4755 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPartyServiceCenterDao; +import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.entity.IcPartyServiceCenterEntity; +import com.epmet.service.IcPartyServiceCenterService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 党群服务中心 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl implements IcPartyServiceCenterService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartyServiceCenterDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyServiceCenterDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPartyServiceCenterDTO get(String id) { + IcPartyServiceCenterEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartyServiceCenterDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyServiceCenterDTO dto) { + IcPartyServiceCenterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartyServiceCenterDTO dto) { + IcPartyServiceCenterEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyServiceCenterEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml new file mode 100644 index 0000000000..0602d34e44 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml new file mode 100644 index 0000000000..c309bcd54b --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml new file mode 100644 index 0000000000..4953af937a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 8d8a9cd94cc1e05c47fa477fe10d3c8173c63a28 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 08:30:40 +0800 Subject: [PATCH 08/19] =?UTF-8?q?dto,entity=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java | 2 +- .../entity/IcCommunitySelfOrganizationPersonnelEntity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java index 1361539bce..53c7196083 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java @@ -56,7 +56,7 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { /** * 人员电话 */ - private String personIphone; + private String personPhone; /** * diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java index 411429d430..66e4309b16 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationPersonnelEntity.java @@ -56,6 +56,6 @@ public class IcCommunitySelfOrganizationPersonnelEntity extends BaseEpmetEntity /** * 人员电话 */ - private String personIphone; + private String personPhone; } From 7d790f8e83591eecbc9659e43a18b0a3cd02657c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 09:40:01 +0800 Subject: [PATCH 09/19] emm --- .../AddCommunitySelfOrganizationFormDTO.java | 75 +++++++++++++++++++ .../IcCommunitySelfOrganizationConstant.java | 11 +++ ...IcCommunitySelfOrganizationController.java | 18 +++++ .../IcCommunitySelfOrganizationEntity.java | 7 +- .../IcCommunitySelfOrganizationService.java | 11 +++ ...cCommunitySelfOrganizationServiceImpl.java | 50 +++++++++++++ 6 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java new file mode 100644 index 0000000000..a0c1cb762d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -0,0 +1,75 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/18 5:32 下午 + * @DESC + */ +@Data +public class AddCommunitySelfOrganizationFormDTO implements Serializable { + + private static final long serialVersionUID = -4996925380900678065L; + + public interface AddCommunitySelfOrganizationForm{} + + /** + * 组织名称 + */ + @NotBlank(message = "organizationName不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String organizationName; + + /** + * 组织人数 + */ + @NotNull(message = "organizationPersonCount不能为空",groups = AddCommunitySelfOrganizationForm.class) + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + @NotBlank(message = "principalName不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String principalName; + + /** + * 负责人电话 + */ + @NotBlank(message = "principalPhone不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String principalPhone; + + /** + * 服务事项 + */ + @NotBlank(message = "serviceItem不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + private Date organizationCreatedTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = AddCommunitySelfOrganizationForm.class) + private String latitude; + + /** + * 社区自组织人员 + */ + private List organizationPersonnel; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java new file mode 100644 index 0000000000..ffd87124bf --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java @@ -0,0 +1,11 @@ +package com.epmet.constant; + +/** + * @Author zxc + * @DateTime 2021/11/19 8:39 上午 + * @DESC + */ +public interface IcCommunitySelfOrganizationConstant { + + String ORG_TYPE_AGENCY = "agency"; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index acab1c9611..3093b70b91 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -17,7 +17,10 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +29,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +95,18 @@ public class IcCommunitySelfOrganizationController { ExcelUtils.exportExcelToTarget(response, null, list, IcCommunitySelfOrganizationExcel.class); } + /** + * @Description 添加社区自组织 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/19 8:33 上午 + */ + @PostMapping("addcommunityselforganization") + public Result addCommunitySelfOrganization(@LoginUser TokenDto tokenDto, @RequestBody AddCommunitySelfOrganizationFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AddCommunitySelfOrganizationFormDTO.AddCommunitySelfOrganizationForm.class); + icCommunitySelfOrganizationService.addCommunitySelfOrganization(tokenDto, formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java index 4d3515e7ff..9e06cb48c3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -17,9 +17,12 @@ package com.epmet.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.EqualsAndHashCode; @@ -91,7 +94,9 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { /** * 社区自组织创建时间 */ - private Date organizationCreatedTime; + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date organizationCreatedTime; /** * 经度 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 353ed2e6d8..4133c7c103 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -19,7 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import java.util.List; @@ -92,4 +94,13 @@ public interface IcCommunitySelfOrganizationService extends BaseService implements IcCommunitySelfOrganizationService { + @Autowired + private IcCommunitySelfOrganizationPersonnelService personnelService; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -80,4 +95,39 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); + persons.forEach(p -> { + p.setCustomerId(customerId); + p.setOrgId(orgEntity.getId()); + }); + personnelService.insertBatch(persons); + } + } + } \ No newline at end of file From a863f7f0f4970c1dbdf0c04f3f155f90fa257fe1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Nov 2021 10:00:58 +0800 Subject: [PATCH 10/19] em --- .../epmet/entity/IcCommunitySelfOrganizationEntity.java | 2 -- .../impl/IcCommunitySelfOrganizationServiceImpl.java | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java index 9e06cb48c3..b66e6a0773 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -94,8 +94,6 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { /** * 社区自组织创建时间 */ - @TableField(fill = FieldFill.INSERT) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date organizationCreatedTime; /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 26f8b8d7e1..055a07533b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -27,7 +27,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.xml.crypto.Data; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; @@ -119,6 +121,13 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); From 4966fc2ef6bde490b28790fd35018afe66c1cc2a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 19 Nov 2021 10:14:22 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E7=BB=84=E7=BB=87CRUD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AddSocietyOrgFormDTO.java | 13 ++- .../epmet/dto/form/EditSocietyOrgFormDTO.java | 92 +++++++++++++++++++ .../dto/form/GetListSocietyOrgFormDTO.java | 51 ++++++++++ .../result/GetListSocietyOrgResultDTO.java | 69 ++++++++++++++ .../controller/SocietyOrgController.java | 36 +++++++- .../java/com/epmet/dao/SocietyOrgDao.java | 12 ++- .../com/epmet/service/SocietyOrgService.java | 21 +++++ .../service/impl/SocietyOrgServiceImpl.java | 76 +++++++++++++++ .../main/resources/mapper/SocietyOrgDao.xml | 35 ++++++- 9 files changed, 397 insertions(+), 8 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java index bc0555f95b..5d80ef5c18 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java @@ -18,6 +18,7 @@ package com.epmet.dto.form; import lombok.Data; +import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -25,11 +26,9 @@ import java.util.Date; /** - * 社会组织管理 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 - */ + * @Author sun + * @Description 新增社会组织 + **/ @Data public class AddSocietyOrgFormDTO implements Serializable { @@ -50,21 +49,25 @@ public class AddSocietyOrgFormDTO implements Serializable { * 社会组织名称 */ @NotBlank(message = "社会组织名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 50, message = "社会组织名称不能超过50个字符",groups = {Add.class}) private String societyName; /** * 服务事项 */ @NotBlank(message = "服务事项不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 1000, message = "服务事项不能超过1000个字符",groups = {Add.class}) private String serviceMatters; /** * 负责人 */ @NotBlank(message = "负责人名称不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 20, message = "负责人名称不能超过20个字符",groups = {Add.class}) private String personInCharge; /** * 负责人电话 */ @NotBlank(message = "负责人电话不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @Length(max = 11, message = "负责人电话不能超过11个字符",groups = {Add.class}) private String mobile; /** * 起始服务时间 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java new file mode 100644 index 0000000000..e28bba50b5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java @@ -0,0 +1,92 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + + +/** + * @Author sun + * @Description 修改、删除社会组织 + **/ +@Data +public class EditSocietyOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 社会组织Id + */ + @NotBlank(message = "社会组织Id不能为空", groups = { Edit.class, Del.class }) + private String societyId; + /** + * 社会组织名称 + */ + @Length(max = 50, message = "社会组织名称不能超过50个字符",groups = {Edit.class}) + private String societyName; + /** + * 服务事项 + */ + @Length(max = 1000, message = "服务事项不能超过1000个字符",groups = {Edit.class}) + private String serviceMatters; + /** + * 负责人 + */ + @Length(max = 20, message = "负责人名称不能超过20个字符",groups = {Edit.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @Length(max = 11, message = "负责人电话不能超过11个字符",groups = {Edit.class}) + private String mobile; + /** + * 起始服务时间 + */ + private Date serviceStartTime; + /** + * 终止服务时间 + */ + private Date serviceEndTime; + /** + * 绑定管理员[组织下录入的工作人员] + */ + private String adminStaffId; + /** + * 地址 + */ + private String address; + /** + * 经度 + */ + private String longitude; + /** + * 维度 + */ + private String dimension; + //token中userId + private String staffId; + + public interface Edit {} + public interface Del {} + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java new file mode 100644 index 0000000000..d28f93fe7e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; +import java.util.Date; + + +/** + * @Author sun + * @Description 社会组织列表查询 + **/ +@Data +public class GetListSocietyOrgFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //社会组织名称 + private String societyName; + //负责人 + private String personInCharge; + //负责人电话 + private String mobile; + //起始服务时间 + private Date serviceStartTime; + //终止服务时间 + private Date serviceEndTime; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java new file mode 100644 index 0000000000..1765350a6d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java @@ -0,0 +1,69 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 社会组织列表查询 + **/ +@Data +public class GetListSocietyOrgResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + + @Data + public class SocietyOrgList{ + //所属组织Id + private String agencyId; + //社会组织Id + private String societyId; + //社会组织名称 + private String societyName; + //服务事项 + private String serviceMatters; + //负责人姓名 + private String personInCharge; + //负责人电话 + private String mobile; + //起始服务时间 + private String serviceStartTime; + //终止服务时间 + private String serviceEndTime; + //绑定管理员[组织下Id录入的工作人员] + private String adminStaffId; + //绑定管理员[组织下录入的工作人员]姓名 + private String adminStaffName; + //地址 + private String address; + //经度 + private String longitude; + //维度 + private String dimension; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java index 0eb23cde7d..7443423ece 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java @@ -22,6 +22,9 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.AddSocietyOrgFormDTO; +import com.epmet.dto.form.EditSocietyOrgFormDTO; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.service.SocietyOrgService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -39,7 +42,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("societyorg") public class SocietyOrgController { - + @Autowired private SocietyOrgService societyOrgService; @@ -56,4 +59,35 @@ public class SocietyOrgController { return new Result(); } + /** + * @Author sun + * @Description 修改社会组织 + **/ + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditSocietyOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditSocietyOrgFormDTO.Edit.class); + societyOrgService.edit(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 删除社会组织 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditSocietyOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditSocietyOrgFormDTO.Del.class); + societyOrgService.del(formDTO.getSocietyId()); + return new Result(); + } + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO) { + return new Result().ok(societyOrgService.getList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java index b46d6035d2..0c3f5cc4af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java @@ -18,9 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.entity.SocietyOrgEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 社会组织管理 * @@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface SocietyOrgDao extends BaseDao { - + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + List getList(GetListSocietyOrgFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java index 846e07777f..2acaa20c05 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java @@ -19,6 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.form.AddSocietyOrgFormDTO; +import com.epmet.dto.form.EditSocietyOrgFormDTO; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.entity.SocietyOrgEntity; /** @@ -34,4 +37,22 @@ public interface SocietyOrgService extends BaseService { * @Description 新增社会组织 **/ void add(AddSocietyOrgFormDTO dto); + + /** + * @Author sun + * @Description 修改社会组织 + **/ + void edit(EditSocietyOrgFormDTO formDTO); + + /** + * @Author sun + * @Description 删除社会组织 + **/ + void del(String societyId); + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java index 5f2c284be2..b2cb48717c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java @@ -18,17 +18,36 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.SocietyOrgDao; +import com.epmet.dto.ProjectStaffDTO; import com.epmet.dto.form.AddSocietyOrgFormDTO; +import com.epmet.dto.form.EditSocietyOrgFormDTO; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.form.UserIdsFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.StaffSinGridResultDTO; +import com.epmet.entity.ActInfoEntity; import com.epmet.entity.SocietyOrgEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.SocietyOrgService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; /** * 社会组织管理 @@ -39,6 +58,9 @@ import org.springframework.transaction.annotation.Transactional; @Service public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { private static final Logger log = LoggerFactory.getLogger(SocietyOrgServiceImpl.class); + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + /** * @Author sun @@ -53,4 +75,58 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl%s", formDTO.getSocietyId())); + } + entity = ConvertUtils.sourceToTarget(formDTO, SocietyOrgEntity.class); + baseDao.updateById(entity); + } + + /** + * @Author sun + * @Description 删除社会组织 + **/ + @Override + public void del(String societyId) { + if (baseDao.deleteById(societyId) < NumConstant.ONE) { + throw new RenException(String.format("修改社会组织信息删除失败,社会组织Id->%s", societyId)); + } + } + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + @Override + public GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO) { + GetListSocietyOrgResultDTO resultDTO = new GetListSocietyOrgResultDTO(); + //1.根据查询条件分页查询社会组织数据 + PageInfo result = + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); + if (CollectionUtils.isEmpty(result.getList())) { + return resultDTO; + } + resultDTO.setTotal((int) result.getTotal()); + //2.查询被绑定管理员信息 + UserIdsFormDTO dto = new UserIdsFormDTO(); + List staffIdList = result.getList().stream().map(GetListSocietyOrgResultDTO.SocietyOrgList::getAdminStaffId).collect(Collectors.toList()); + staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); + dto.setUserIds(staffIdList); + Result> listResult = epmetUserOpenFeignClient.getStaffInfoList(dto); + if (!listResult.success()) { + throw new RenException("获取工作人员基本信息失败......"); + } + result.getList().forEach(r -> listResult.getData().stream().filter(u -> r.getAdminStaffId().equals(u.getStaffId())).forEach(u -> r.setAdminStaffName(u.getStaffName()))); + resultDTO.setList(result.getList()); + + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml index 6583d6afc2..e2bac86f4b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml @@ -3,6 +3,39 @@ - + \ No newline at end of file From f4e872c3579aa07c90141dd68af554e7adb53699 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 19 Nov 2021 11:00:51 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E5=B1=85=E6=B0=91=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 1 + .../dto/form/demand/AddCategoryFormDTO.java | 31 ++++ .../form/demand/AddFirstCategoryFormDTO.java | 26 +++ .../form/demand/DemandDictPageFormDTO.java | 17 ++ .../epmet/dto/form/demand/StatusFormDTO.java | 20 +++ .../epmet/dto/form/demand/SubCodeFormDTO.java | 15 ++ .../epmet/dto/form/demand/UpdateFormDTO.java | 42 +++++ .../demand/UserDemandNameQueryFormDTO.java | 2 +- .../dto/result/demand/DemandPageResDTO.java | 21 +++ .../epmet/dto/result/demand/OptionDTO.java | 12 ++ .../IcResiDemandDictController.java | 121 +++++++++++--- .../com/epmet/dao/IcResiDemandDictDao.java | 22 +++ .../epmet/entity/IcResiDemandDictEntity.java | 11 +- .../service/IcResiDemandDictService.java | 51 +++--- .../impl/IcResiDemandDictServiceImpl.java | 154 +++++++++++++++--- .../resources/mapper/IcResiDemandDictDao.xml | 120 ++++++++++++++ 16 files changed, 595 insertions(+), 71 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index b57a5c8584..ac0d07f7be 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -82,6 +82,7 @@ public enum EpmetErrorCode { BUILDING_NAME_EXITED(8215,"楼栋名称已存在"), DOOR_NAME_EXITED(8216,"门牌号已存在"), NEIGHBOOR_NAME_EXITED(8217,"小区名称已存在"), + DEMAND_NAME_EXITED(8218, "分类名称已存在"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java new file mode 100644 index 0000000000..866a20bc6d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddCategoryFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +public class AddCategoryFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "分类名称不能为空", groups = AddUserShowGroup.class) + @Length(max = 100, message = "分类名称最多输入100字", groups = AddUserShowGroup.class) + private String categoryName; + + @NotBlank(message = "请先选择一级分类", groups = AddUserShowGroup.class) + private String parentCategoryCode; + + @NotNull(message = "奖励积分不能为空", groups = AddUserShowGroup.class) + private Integer awardPoint; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java new file mode 100644 index 0000000000..b0a610d278 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AddFirstCategoryFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class AddFirstCategoryFormDTO implements Serializable { + private static final long serialVersionUID = -9011014064624688518L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "分类名称不能为空", groups = AddUserShowGroup.class) + @Length(max = 20, message = "一级分类名称最多输入20字", groups = AddUserShowGroup.class) + private String categoryName; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java new file mode 100644 index 0000000000..3ff7d63c0b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDictPageFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class DemandDictPageFormDTO extends PageFormDTO implements Serializable { + public interface AddUserInternalGroup {} + + @NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class) + private String customerId; + + private String firstCategoryCode; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java new file mode 100644 index 0000000000..879d632cc7 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +public class StatusFormDTO implements Serializable { + + public interface AddUserInternalGroup { + } + + @NotBlank(message = "categoryId不能为空", groups = AddUserInternalGroup.class) + private String categoryId; + + @NotNull(message = "usableFlag不能为空", groups = AddUserInternalGroup.class) + private Boolean usableFlag; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java new file mode 100644 index 0000000000..5fecd09258 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class SubCodeFormDTO implements Serializable { + public interface AddUserInternalGroup {} + @NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class) + private String customerId; + @NotBlank(message = "parentCategoryCode不能为空",groups = AddUserInternalGroup.class) + private String parentCategoryCode; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java new file mode 100644 index 0000000000..4929228f29 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UpdateFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +public class UpdateFormDTO implements Serializable { + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + public interface First extends CustomerClientShowGroup { + } + + public interface Two extends CustomerClientShowGroup { + } + @NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "categoryId不能为空", groups = AddUserInternalGroup.class) + private String categoryId; + + @NotNull(message = "等级不能为空", groups = AddUserInternalGroup.class) + private Integer level; + + + @NotBlank(message = "分类名称不能为空", groups = AddUserShowGroup.class) + @Length(max = 100, message = "分类名称最多输入100字", groups = First.class) + @Length(max = 20, message = "分类名称最多输入20字", groups = Two.class) + private String categoryName; + + @NotNull(message = "奖励积分不能为空", groups = Two.class) + private Integer awardPoint; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java index 3247482054..2a0141713f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandNameQueryFormDTO.java @@ -13,7 +13,7 @@ public class UserDemandNameQueryFormDTO implements Serializable { public interface AddUserInternalGroup {} - @NotBlank(message = "客户idbu不能为空",groups =AddUserInternalGroup.class) + @NotBlank(message = "客户id不能为空",groups =AddUserInternalGroup.class) private String customerId; @NotEmpty(message = "分类编码不能为空",groups =AddUserInternalGroup.class) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java new file mode 100644 index 0000000000..5b2a12c529 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandPageResDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result.demand; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +@Data +public class DemandPageResDTO implements Serializable { + private String customerId; + private String categoryId; + private String categoryCode; + private String parentCategoryCode; + private String categoryName; + private Integer level; + private Integer sort; + private BigDecimal awardPoint; + private Boolean usableFlag; + private List children; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java new file mode 100644 index 0000000000..c0cfd3b48d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/OptionDTO.java @@ -0,0 +1,12 @@ +package com.epmet.dto.result.demand; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class OptionDTO implements Serializable { + private static final long serialVersionUID = -6722370308097497466L; + private String label; + private String value; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java index 13779cfe13..2b225c73dc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java @@ -18,23 +18,22 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.IcResiDemandDictDTO; -import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.service.IcResiDemandDictService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; -import java.util.Map; /** @@ -50,31 +49,73 @@ public class IcResiDemandDictController { @Autowired private IcResiDemandDictService icResiDemandDictService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icResiDemandDictService.page(params); - return new Result>().ok(page); + /** + * 分页列表查询 + * + * @param formDTO + * @return + */ + @PostMapping("pagelist") + public Result> page(@RequestBody DemandDictPageFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,DemandDictPageFormDTO.AddUserInternalGroup.class, PageFormDTO.AddUserInternalGroup.class); + PageData page = icResiDemandDictService.page(formDTO); + return new Result>().ok(page); } - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - IcResiDemandDictDTO data = icResiDemandDictService.get(id); - return new Result().ok(data); + /** + * 添加一级分类 + * @param formDTO + * @return + */ + @PostMapping("addfirst") + public Result addFirstCategory(@RequestBody AddFirstCategoryFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,AddFirstCategoryFormDTO.AddUserShowGroup.class,AddFirstCategoryFormDTO.AddUserInternalGroup.class); + icResiDemandDictService.addFirstCategory(formDTO); + return new Result(); } - @PostMapping - public Result save(@RequestBody IcResiDemandDictDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icResiDemandDictService.save(dto); + /** + * 新增二级分类 + * @param formDTO + * @return + */ + @PostMapping("addchild") + public Result addChild(@RequestBody AddCategoryFormDTO formDTO ){ + ValidatorUtils.validateEntity(formDTO,AddCategoryFormDTO.AddUserShowGroup.class,AddCategoryFormDTO.AddUserInternalGroup.class); + icResiDemandDictService.addChild(formDTO); return new Result(); } - @PutMapping - public Result update(@RequestBody IcResiDemandDictDTO dto){ + /** + * 修改分类 + * + * + * @param formDTO + * @return + */ + @PostMapping("update") + public Result update(@RequestBody UpdateFormDTO formDTO) { //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icResiDemandDictService.update(dto); + ValidatorUtils.validateEntity(formDTO, UpdateFormDTO.AddUserInternalGroup.class, UpdateFormDTO.AddUserShowGroup.class); + if (NumConstant.ONE == formDTO.getLevel()) { + ValidatorUtils.validateEntity(formDTO, UpdateFormDTO.First.class); + } else if (NumConstant.TWO == formDTO.getLevel()) { + ValidatorUtils.validateEntity(formDTO, UpdateFormDTO.Two.class); + } + icResiDemandDictService.update(formDTO); + return new Result(); + } + + /** + * 启用或禁用 + * + * @param formDTO + * @return + */ + @PostMapping("updatestatus") + public Result updateStatus(@RequestBody StatusFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,StatusFormDTO.AddUserInternalGroup.class); + icResiDemandDictService.updateStatus(formDTO); return new Result(); } @@ -102,4 +143,38 @@ public class IcResiDemandDictController { ValidatorUtils.validateEntity(formDTO,UserDemandNameQueryFormDTO.AddUserInternalGroup.class); return icResiDemandDictService.queryDemandNames(formDTO); } + + /** + * 居民需求查询条件:一级分类列表 0 + * 区域化党建单位:服务事项下拉框 1010 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("subcodelist") + public Result> querySubCodeList(@LoginUser TokenDto tokenDto, @RequestBody SubCodeFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,SubCodeFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icResiDemandDictService.querySubCodeList(formDTO)); + } + + + + + + + + + + + + + + + + + + + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java index 94fd335929..d58dce2d8a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java @@ -19,6 +19,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -38,4 +40,24 @@ public interface IcResiDemandDictDao extends BaseDao { List selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode); String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set codeSet); + + List selectByPCode(@Param("pcode") String pcode, @Param("customerId") String customerId); + + List pageSelect(@Param("customerId") String customerId, @Param("firstCategoryCode")String firstCategoryCode); + + List selectChild(@Param("customerId") String customerId, @Param("parentCode")String parentCode); + + int selectCountName(@Param("customerId") String customerId, + @Param("categoryName")String categoryName, + @Param("level")int level, + @Param("parentCode")String parentCode, + @Param("id")String id); + + Integer selectMaxCategoryCode(@Param("customerId") String customerId, + @Param("level") Integer level, + @Param("parentCode") String parentCode); + + Integer selectMaxSort(@Param("customerId") String customerId, + @Param("level") int level, + @Param("parentCode") String parentCode); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java index 5e01dd2b14..1b9a30b755 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcResiDemandDictEntity.java @@ -58,7 +58,7 @@ public class IcResiDemandDictEntity extends BaseEpmetEntity { /** * 级别 */ - private String level; + private Integer level; /** * 备注 @@ -70,4 +70,13 @@ public class IcResiDemandDictEntity extends BaseEpmetEntity { */ private Integer sort; + /** + * 奖励积分:只有二级分类才会配置,一级默认为0。11.17 + */ + private Integer awardPoint; + + /** + * 1可用,0不可用,11.17 + */ + private Boolean usableFlag; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java index d41c4303ba..1df5be75af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java @@ -22,7 +22,9 @@ import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiDemandDictDTO; -import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import java.util.List; @@ -39,52 +41,46 @@ public interface IcResiDemandDictService extends BaseService * @author generator * @date 2021-10-27 */ - PageData page(Map params); + PageData page(DemandDictPageFormDTO formDTO); /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2021-10-27 + * 新增一级分类 + * @param formDTO */ - List list(Map params); + void addFirstCategory(AddFirstCategoryFormDTO formDTO); /** - * 单条查询 - * - * @param id - * @return IcResiDemandDictDTO - * @author generator - * @date 2021-10-27 + * 新增二级分类 + * @param formDTO */ - IcResiDemandDictDTO get(String id); + void addChild(AddCategoryFormDTO formDTO); + /** - * 默认保存 + * 默认查询 * - * @param dto - * @return void + * @param params + * @return java.util.List * @author generator * @date 2021-10-27 */ - void save(IcResiDemandDictDTO dto); + List list(Map params); + /** * 默认更新 * - * @param dto + * @param formDTO * @return void * @author generator * @date 2021-10-27 */ - void update(IcResiDemandDictDTO dto); + void update(UpdateFormDTO formDTO); /** * 批量删除 @@ -111,4 +107,13 @@ public interface IcResiDemandDictService extends BaseService queryDemandNames(UserDemandNameQueryFormDTO formDTO); + + List querySubCodeList(SubCodeFormDTO formDTO); + + /** + * 启用或禁用 + * + * @param formDTO + */ + void updateStatus(StatusFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index fb23a85fe8..fd30b41bd3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -18,18 +18,25 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcResiDemandDictDao; import com.epmet.dto.IcResiDemandDictDTO; -import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandPageResDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import com.epmet.service.IcResiDemandDictService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -44,18 +51,90 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-10-27 */ +@Slf4j @Service public class IcResiDemandDictServiceImpl extends BaseServiceImpl implements IcResiDemandDictService { + /** + * 分页查询 + * + * @param formDTO + * @return + */ @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, IcResiDemandDictDTO.class); + public PageData page(DemandDictPageFormDTO formDTO) { + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO.getCustomerId(),formDTO.getFirstCategoryCode())); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); } + /** + * 新增一级分类 + * @param formDTO + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void addFirstCategory(AddFirstCategoryFormDTO formDTO) { + if (checkCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), NumConstant.ONE, NumConstant.ZERO_STR,null) > NumConstant.ZERO) { + // 名称唯一 + throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); + } + + IcResiDemandDictEntity entity = new IcResiDemandDictEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setCategoryName(formDTO.getCategoryName()); + entity.setLevel(NumConstant.ONE); + entity.setParentCode(NumConstant.ZERO_STR); + entity.setAwardPoint(NumConstant.ZERO); + entity.setUsableFlag(true); + // 获取当前最大的排序号 + Integer maxSort = baseDao.selectMaxSort(formDTO.getCustomerId(), NumConstant.ONE,NumConstant.ZERO_STR); + entity.setSort(null == maxSort ? NumConstant.ZERO : maxSort + 1); + // 一级分类,直接获取最大的,然后+1 + Integer maxFirstCategoryCode = baseDao.selectMaxCategoryCode(formDTO.getCustomerId(),NumConstant.ONE,NumConstant.ZERO_STR); + entity.setCategoryCode(null == maxFirstCategoryCode ? "1001" : String.valueOf(maxFirstCategoryCode + 1)); + baseDao.insert(entity); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public void addChild(AddCategoryFormDTO formDTO) { + if (checkCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), NumConstant.TWO, formDTO.getParentCategoryCode(),null) > NumConstant.ZERO) { + // 名称唯一 + throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); + } + + IcResiDemandDictEntity entity = new IcResiDemandDictEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setCategoryName(formDTO.getCategoryName()); + entity.setLevel(NumConstant.TWO); + entity.setParentCode(formDTO.getParentCategoryCode()); + entity.setAwardPoint(formDTO.getAwardPoint()); + entity.setUsableFlag(true); + // 获取当前最大的排序号 + Integer maxSort = baseDao.selectMaxSort(formDTO.getCustomerId(), NumConstant.TWO,formDTO.getParentCategoryCode()); + entity.setSort(null == maxSort ? NumConstant.ZERO : maxSort + 1); + // 二级分类,直接获取最大的,然后+1 + Integer maxCategoryCode = baseDao.selectMaxCategoryCode(formDTO.getCustomerId(),NumConstant.TWO,formDTO.getParentCategoryCode()); + entity.setCategoryCode(null == maxCategoryCode ? formDTO.getParentCategoryCode().concat("0001") : String.valueOf(maxCategoryCode + 1)); + baseDao.insert(entity); + } + + /** + * 校验名字是否存在 + * @param customerId + * @param categoryName + * @param level + * @param id + * @return + */ + public int checkCategoryName(String customerId,String categoryName,int level,String parentCategoryCode,String id){ + return baseDao.selectCountName(customerId,categoryName,level,parentCategoryCode,id); + } + + + + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); @@ -72,24 +151,26 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + // 名称唯一 + throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); + } + origin.setCategoryName(formDTO.getCategoryName()); + if (NumConstant.TWO == origin.getLevel()) { + origin.setAwardPoint(formDTO.getAwardPoint()); + } + updateById(origin); } @Override @@ -117,4 +198,31 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl().ok(baseDao.selectCategoryNames(formDTO.getCustomerId(),formDTO.getCodeSet())); } + @Override + public List querySubCodeList(SubCodeFormDTO formDTO) { + return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId()); + } + + @Override + public void updateStatus(StatusFormDTO formDTO) { + IcResiDemandDictEntity origin = baseDao.selectById(formDTO.getCategoryId()); + if (null == origin) { + log.error("category_id=" + formDTO.getCategoryId() + " 没有找到记录"); + return; + } + origin.setUsableFlag(formDTO.getUsableFlag()); + updateById(origin); + // 如果修改的是一级分类, 同步到二级 + if (NumConstant.ONE == origin.getLevel()) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(origin.getCategoryCode()), "PARENT_CODE", origin.getCategoryCode()); + List entityList = baseDao.selectList(wrapper); + for (IcResiDemandDictEntity sub : entityList) { + sub.setUsableFlag(formDTO.getUsableFlag()); + updateById(sub); + } + } + } + + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index ae0c5a1e7f..d9b7adb0ac 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -74,4 +74,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 9446a53b3ad03be2deec4b31ee8c5a6f01918bab Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 19 Nov 2021 13:09:52 +0800 Subject: [PATCH 13/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20ResultDataR?= =?UTF-8?q?esolver.java=EF=BC=8C=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0showMe?= =?UTF-8?q?ssage=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../listener/bean/log/LogOperationHelper.java | 2 +- .../service/impl/LogOperationServiceImpl.java | 6 ++-- .../epmet/controller/IcLoinController.java | 4 +-- .../service/impl/IcLoginServiceImpl.java | 2 +- .../tools/feign/ResultDataResolver.java | 7 +++-- .../java/com/epmet/config/CorsConfig.java | 2 +- .../impl/QuestionnaireServiceImpl.java | 2 +- .../impl/BizPointTotalDetailServiceImpl.java | 8 +++--- .../impl/PingyinPrivateEpmetApiService.java | 4 +-- .../service/impl/ResiEventServiceImpl.java | 10 +++---- .../impl/IcResiUserImportServiceImpl.java | 28 +++++++++---------- .../service/impl/IcResiUserServiceImpl.java | 2 +- 12 files changed, 39 insertions(+), 38 deletions(-) diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java index b8c82f6640..ce6502583e 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java @@ -57,7 +57,7 @@ public class LogOperationHelper implements ResultDataResolver { form.setUserId(userId); Result result = userOpenFeignClient.getCustomerStaffInfoByUserId(form); CustomerStaffDTO staffInfo = getResultDataOrThrowsException(result, ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), - "调用epmet-user服务获取staff信息发生异常"); + "调用epmet-user服务获取staff信息发生异常", null); return new OperatorInfo(staffInfo.getCustomerId(), staffInfo.getMobile(), staffInfo.getRealName()); } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java index 09b9269063..4ccc4e868f 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java @@ -82,7 +82,7 @@ public class LogOperationServiceImpl implements LogOperationService, ResultDataR CustomerStaffFormDTO form = new CustomerStaffFormDTO(); form.setUserIds(new ArrayList<>(userIds)); Result> result = userOpenFeignClient.list(form); - List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常"); + List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常", null); HashMap staffMap = new HashMap<>(); staffs.forEach(s -> { @@ -103,7 +103,7 @@ public class LogOperationServiceImpl implements LogOperationService, ResultDataR form.setCustomerId(customerId); form.setMobile(operatorMobile); Result> result = userOpenFeignClient.list(form); - List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常"); + List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常", null); if (staffs.size() == 0) { return null; @@ -134,7 +134,7 @@ public class LogOperationServiceImpl implements LogOperationService, ResultDataR CustomerStaffFormDTO form = new CustomerStaffFormDTO(); form.setRealName(operatorName); Result> result = userOpenFeignClient.list(form); - List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务查询工作人员信息发生异常"); + List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务查询工作人员信息发生异常", null); List userIds = new ArrayList<>(); HashMap staffMap = new HashMap(); diff --git a/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java b/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java index cd3c5543e6..659945bddb 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java @@ -76,7 +76,7 @@ public class IcLoinController implements ResultDataResolver { // 获取用户信息 Result> staffResult = epmetUserFeignClient.checkCustomerStaff(mobile); - List staffList = getResultDataOrThrowsException(staffResult, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】获取用户信息失败"); + List staffList = getResultDataOrThrowsException(staffResult, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】获取用户信息失败", null); if (CollectionUtils.isEmpty(staffList)) { throw new RenException(EpmetErrorCode.ERR10003.getCode()); } @@ -93,7 +93,7 @@ public class IcLoinController implements ResultDataResolver { RootOrgListByStaffIdFormDTO orgListForm = new RootOrgListByStaffIdFormDTO(); orgListForm.setStaffId(staffId); Result> orgListResult = govOrgOpenFeignClient.getStaffOrgListByStaffId(orgListForm); - List orgs = getResultDataOrThrowsException(orgListResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】根据staffId查询所属客户跟组织列表失败"); + List orgs = getResultDataOrThrowsException(orgListResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】根据staffId查询所属客户跟组织列表失败", null); // 生成登录票据 String ticket = UUID.randomUUID().toString().replace("-", ""); diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java index d14db75885..1e1767070e 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java @@ -65,7 +65,7 @@ public class IcLoginServiceImpl implements IcLoginService, ResultDataResolver { String token = this.generateIcToken(staffId, app, client); Result agencyResult = govOrgOpenFeignClient.getAgencyById(orgId); - CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(agencyResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【IC平台登录】获取组织信息失败"); + CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(agencyResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【IC平台登录】获取组织信息失败", null); // 2.缓存token cacheToken(app, client, staffId, token, orgId, agencyInfo.getCustomerId()); diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java index 5b56e64b1a..1bfa31e96b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java @@ -34,18 +34,19 @@ public interface ResultDataResolver { * @return * @param targetServiceName 目标service名称 * @param errorCode 错误码,可以为空,为空则使用上游服务抛出的错误码 - * @param errorInternalMsg 错误信息,可以为空,为空则使用上游服务抛出的异常信息 + * @param errorInternalMsg 内部错误信息,可以为空,为空则使用上游服务抛出的异常信息 + * @param showMsg 展示给前端程序的错误信息,可以为空。为空则根据errorCode给定错误msg信息 * @author wxz * @date 2021.06.07 22:45 */ - default R getResultDataOrThrowsException(Result result, String targetServiceName, Integer errorCode, String errorInternalMsg) { + default R getResultDataOrThrowsException(Result result, String targetServiceName, Integer errorCode, String errorInternalMsg, String showMsg) { if (result == null) { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), "调用{}服务发生错误,返回Result为null", targetServiceName); } if (!result.success()) { Integer finalErrorCode = errorCode == null ? result.getCode() : errorCode; String finalErrorInternalMsg = StringUtils.isBlank(errorInternalMsg) ? result.getInternalMsg() : errorInternalMsg; - throw new RenException(finalErrorCode, finalErrorInternalMsg); + throw new RenException(finalErrorCode, finalErrorInternalMsg, showMsg, RenException.MessageMode.CODE_INTERNAL_EXTERNAL); } return result.getData(); } diff --git a/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java b/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java index bb95213c1f..72a2e0a31f 100644 --- a/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java +++ b/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java @@ -117,7 +117,7 @@ class EpmetWebFilter implements WebFilter, ResultDataResolver { adminOpenFeignClient.list(), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), - "调用Admin服务查询Cors配置失败"); + "调用Admin服务查询Cors配置失败", null); } catch (Exception e) { logger.error("调用Admin服务查询Cors配置失败"); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java index 1c6aab452d..2d69ac0fb3 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java @@ -73,7 +73,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService, ResultDat CustomerGridFormDTO form = new CustomerGridFormDTO(); form.setGridId(gridId); Result gridInfoResult = govOrgOpenFeignClient.getGridBaseInfoByGridId(form); - CustomerGridDTO gridInfo = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【调查问卷】校验访问权限,查询网格信息失败"); + CustomerGridDTO gridInfo = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【调查问卷】校验访问权限,查询网格信息失败", null); // 网格父级ID列表:网格ID(拼接起来,冒号分割) String gridIdPath = gridInfo.getPids().concat(":").concat(gridInfo.getId()); List publishRangeEntity = prPublishRangeService.getPublishRangeEntity(projectKey); diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java index 87b7b20a32..2fd521d1d9 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java @@ -380,7 +380,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl> result = resiGroupOpenFeignClient.listGroupDetailsExcludeGroupIds(form); - List groups = getResultDataOrThrowsException(result, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询积分为0的小组列表失败"); + List groups = getResultDataOrThrowsException(result, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询积分为0的小组列表失败", null); if (CollectionUtils.isEmpty(groups)) { return new ArrayList<>(); } @@ -412,7 +412,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl> listResult = resiGroupOpenFeignClient.listGroupDetailsByGroupIds(groupIds); - List groupInfos = getResultDataOrThrowsException(listResult, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排行】批量查询小组信息出错"); + List groupInfos = getResultDataOrThrowsException(listResult, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排行】批量查询小组信息出错", null); // 将小组基本信息转化为map HashMap groupMap = new HashMap<>(); @@ -454,7 +454,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.getGridBaseInfoByGridId(form); - return getResultDataOrThrowsException(result, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询网格信息失败"); + return getResultDataOrThrowsException(result, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询网格信息失败", null); } @Override @@ -464,7 +464,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl groupList = getResultDataOrThrowsException(resiGroupOpenFeignClient.listGroupsByMember(form), - ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【我所在的小组排名】查询组列表失败"); + ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【我所在的小组排名】查询组列表失败", null); if (CollectionUtils.isEmpty(groupList)) { return new ArrayList(); diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java index da62386442..9878fe2a3c 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java @@ -55,7 +55,7 @@ public class PingyinPrivateEpmetApiService extends ApiService implements String urlParams = super.convertQueryParams2String(constructCommonUrlParamsMap(platformKey, authType, uuid, currentTimeMillis, sign)); String requestUrl = baseUrl.concat(apiUrl).concat(urlParams); Result stringResult = HttpClientManager.getInstance().sendPostByHttps(requestUrl, "{}"); - String remoteResultString = getResultDataOrThrowsException(stringResult, "【调用平阴私有化平台获取AccessToken】", EpmetErrorCode.SERVER_ERROR.getCode(), null); + String remoteResultString = getResultDataOrThrowsException(stringResult, "【调用平阴私有化平台获取AccessToken】", EpmetErrorCode.SERVER_ERROR.getCode(), null, null); Result remoteResult = parsePlatformResponseResult(remoteResultString, GetAccessTokenResultDTO.class); log.info("【调用平阴私有化平台获取AccessToken】结果:{}", remoteResultString); accessTokenFromCache = remoteResult.getData().getAccessToken(); @@ -159,7 +159,7 @@ public class PingyinPrivateEpmetApiService extends ApiService implements String jsonString = JSON.toJSONString(form); Result result = super.sendPostRequest(platformId, ThirdPlatformActions.PUSH_COMPONENT_ACCESS_TOKEN, jsonString, null, urlParams); - getResultDataOrThrowsException(result, "【平阴私有化平台】推送ComponentAccessToken", EpmetErrorCode.SERVER_ERROR.getCode(), null); + getResultDataOrThrowsException(result, "【平阴私有化平台】推送ComponentAccessToken", EpmetErrorCode.SERVER_ERROR.getCode(), null, null); } @Override diff --git a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java index 36a2a43684..fa19f94f14 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java +++ b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java @@ -50,7 +50,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve //查询人大代表列表 ListUserByBadgeFormDTO npcForm = new ListUserByBadgeFormDTO(customerId, BadgeConstant.BADGE_KEY_NPC); Result> npcResult = epmetUserOpenFeignClient.listUsersByBadge(npcForm); - List npcData = getResultDataOrThrowsException(npcResult, ServiceConstant.EPMET_USER_SERVER, null, null); + List npcData = getResultDataOrThrowsException(npcResult, ServiceConstant.EPMET_USER_SERVER, null, null, null); if(CollectionUtils.isEmpty(npcData)) { // 没有人大代表,直接返回空列表即可 @@ -61,7 +61,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve List npcGridIds = npcData.stream().map(d -> d.getGridId()).collect(Collectors.toList()); OrgInfoFormDTO form = new OrgInfoFormDTO(OrgInfoConstant.GRID, npcGridIds); Result> npcGridInfoResult = govOrgOpenFeignClient.selectOrgInfo(form); - List npcGridInfos = getResultDataOrThrowsException(npcGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + List npcGridInfos = getResultDataOrThrowsException(npcGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); Map npcGridInfoMap = convertNpcGridInfos2Map(npcGridInfos); @@ -109,7 +109,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve TreeSet targetLevels = new TreeSet<>(); Result gridInfoResult = govOrgOpenFeignClient.queryGridInfo(gridId); - GridInfoResultDTO gridInfoData = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + GridInfoResultDTO gridInfoData = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); String pidsPath = gridInfoData.getPids(); List parentOrgIds = Arrays.asList(pidsPath.split(":")); // 翻转列表 @@ -118,7 +118,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve // 一.网格信息(只有一条,但是为了适应接口,组装成了列表) List currentGridId = Arrays.asList(gridId); Result> currentGridInfoResult = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, currentGridId)); - List currentGridInfos = getResultDataOrThrowsException(currentGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + List currentGridInfos = getResultDataOrThrowsException(currentGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); OrgInfoResultDTO currentGridInfo = currentGridInfos.get(0); // 因为上游接口的值对应问题,这里只好做一个适配,拼接起来,希望上游代码不要再改了... @@ -128,7 +128,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve // 二.父级组织信息 Result> parentOrgInfoResult = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.AGENCY, parentOrgIds)); - List parentOrgInfos = getResultDataOrThrowsException(parentOrgInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + List parentOrgInfos = getResultDataOrThrowsException(parentOrgInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); parentOrgInfos.forEach(porg -> { String levelName = OrgLevelEnums.getLevelName(porg.getLevel()); if (StringUtils.isBlank(levelName)) { 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 909f16b8ad..e0e1bac217 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 @@ -166,11 +166,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res userForm.setClient(loginUserClient); userForm.setUserId(loginUserId); - LoginUserDetailsResultDTO loginUserDetails = getResultDataOrThrowsException(epmetUserOpenFeignClient.getLoginUserDetails(userForm), ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + LoginUserDetailsResultDTO loginUserDetails = getResultDataOrThrowsException(epmetUserOpenFeignClient.getLoginUserDetails(userForm), ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); String currUserAgencyId = loginUserDetails.getAgencyId(); //String excelPathName = "/opt/test/基础信息表/resi_info.xls"; - CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(currUserAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(currUserAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); String customerId = agencyInfo.getCustomerId(); try { @@ -788,55 +788,55 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res switch (pureUri) { case "/epmetuser/icresidemanddict/demandoption": options = getResultDataOrThrowsException(epmetUserOpenFeignClient.getDemandOptions(), ServiceConstant.EPMET_USER_SERVER, - EpmetErrorCode.SERVER_ERROR.getCode(), null); + EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/customergrid/gridoption": GridOptionFormDTO form = new GridOptionFormDTO(); form.setAgencyId(currUserAgencyId); form.setPurpose(purpose); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/customerpartybranch/branchoption": CustomerPartyBranchDTO bform = new CustomerPartyBranchDTO(); bform.setGridId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBranchOption(bform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBranchOption(bform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icbuilding/buildingoption": IcBuildingDTO buildingform = new IcBuildingDTO(); buildingform.setNeighborHoodId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingOptions(buildingform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingOptions(buildingform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icbuildingunit/unitoption": IcBuildingUnitDTO buForm = new IcBuildingUnitDTO(); buForm.setBuildingId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getUnitOptions(buForm), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getUnitOptions(buForm), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/ichouse/houseoption": HouseFormDTO hform = new HouseFormDTO(); hform.setUnitId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getHouseOption(hform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getHouseOption(hform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icneighborhood/neighborhoodoption": IcNeighborHoodDTO nform = new IcNeighborHoodDTO(); nform.setAgencyId(currUserAgencyId); nform.setGridId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getNeighborHoodOptions(nform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getNeighborHoodOptions(nform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/education": - options = getResultDataOrThrowsException(adminOpenFeignClient.getEducationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getEducationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/house": - options = getResultDataOrThrowsException(adminOpenFeignClient.getHouseOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getHouseOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/nation": - options = getResultDataOrThrowsException(adminOpenFeignClient.getNationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getNationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/ninesmallplaces": - options = getResultDataOrThrowsException(adminOpenFeignClient.getNineSmallPlacesOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getNineSmallPlacesOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/relationship": - options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; } 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 3c021235fd..ddb7c9307d 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 @@ -832,6 +832,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> result = operCustomizeOpenFeignClient.listItems(form); - return getResultDataOrThrowsException(result, ServiceConstant.OPER_CUSTOMIZE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "查询表单相关信息失败"); + return getResultDataOrThrowsException(result, ServiceConstant.OPER_CUSTOMIZE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "查询表单相关信息失败", null); } } From ef755fd15271d3fe461f2af5eb63cae235f10e78 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 19 Nov 2021 15:59:51 +0800 Subject: [PATCH 14/19] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=85=9A=E5=91=98=E6=94=BE=E5=9C=A8=E6=9C=80=E5=89=8D=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcHouseServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java index 0dbfa5796a..18ee67f7ae 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java @@ -219,6 +219,15 @@ public class IcHouseServiceImpl extends BaseServiceImpl Date: Fri, 19 Nov 2021 16:08:20 +0800 Subject: [PATCH 15/19] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=85=9A=E5=91=98=E6=94=BE=E5=9C=A8=E6=9C=80=E5=89=8D=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcHouseServiceImpl.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java index 18ee67f7ae..914bc68a56 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java @@ -220,14 +220,16 @@ public class IcHouseServiceImpl extends BaseServiceImpl Date: Fri, 19 Nov 2021 16:23:48 +0800 Subject: [PATCH 16/19] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/StrConstant.java | 2 + .../commons/tools/enums/FormItemTypeEnum.java | 53 +++++ .../controller/IcNeighborHoodController.java | 4 +- .../epmet/constant/IcResiUserConstant.java | 11 + .../controller/IcResiUserController.java | 62 ++++-- .../com/epmet/enums/IcResiUserTableEnum.java | 4 +- .../excel/support/ExportResiUserItemDTO.java | 29 +++ .../com/epmet/service/IcResiUserService.java | 7 +- .../impl/IcResiUserImportServiceImpl.java | 25 ++- .../service/impl/IcResiUserServiceImpl.java | 202 +++++++++--------- .../ic_resi_info_cid_for_easy_excel.xlsx | Bin 25132 -> 25170 bytes 11 files changed, 267 insertions(+), 132 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/FormItemTypeEnum.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/support/ExportResiUserItemDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java index 2e1d7d5bea..a18f34f72b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java @@ -75,6 +75,8 @@ public interface StrConstant { String STAR="*"; String QUESTION_MARK="?"; + String QUESTION_MARK_TRANSFER="\\?"; + String AND_MARK="&"; /** * 空字符串 diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/FormItemTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/FormItemTypeEnum.java new file mode 100644 index 0000000000..753852bfff --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/FormItemTypeEnum.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.commons.tools.enums; + +/** + * form表单 配置item类型 枚举 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +public enum FormItemTypeEnum { + //枚举类型 + INPUT("input", "输入框"), + RADIO("radio", "单选框"), + CHECKBOX("checkbox", "复选框"), + SELECT("select", "下拉框"), + TEXTAREA("textarea", "文本域"), + CASCADER("cascader", "及联"), + DATE_PICKER("datepicker", "组织"), + UN_KNOWN("un_known", "不支持的类型"); + + private String code; + private String desc; + + FormItemTypeEnum(String value,String name) { + this.code = value; + this.desc = name; + } + + public static FormItemTypeEnum getEnum(String code) { + FormItemTypeEnum[] values = FormItemTypeEnum.values(); + for (FormItemTypeEnum value : values) { + if (value.getCode().equals(code)) { + return value; + } + } + return UN_KNOWN; + } + + public String getCode() { + return code; + } + + public String getDesc() { + return desc; + } +} 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 14dcda318a..fcd64c4658 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 @@ -45,7 +45,7 @@ import java.util.Map; @RestController @RequestMapping("icneighborhood") public class IcNeighborHoodController { - + @Autowired private IcNeighborHoodService icNeighborHoodService; @@ -109,4 +109,4 @@ public class IcNeighborHoodController { return new Result>().ok(icNeighborHoodService.getListByIds(ids)); } -} \ No newline at end of file +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java new file mode 100644 index 0000000000..6b32f663fc --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java @@ -0,0 +1,11 @@ +package com.epmet.constant; + +/** + * @author zhaoqifeng + * @dscription + * @date 2021/6/8 15:28 + */ +public interface IcResiUserConstant { + + String IC_RESI_USER = "ic_resi_user"; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 8b571dce85..fd3a88fd79 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -44,10 +44,12 @@ import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.IpUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constant.IcResiUserConstant; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.enums.IcResiUserTableEnum; +import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.feign.OssFeignClient; import com.epmet.service.IcResiUserImportService; @@ -84,7 +86,7 @@ import java.util.stream.Collectors; @RestController @RequestMapping("icresiuser") public class IcResiUserController { - private static final String BASE_TABLE_NAME = "ic_resi_user"; + //todo 枚举吧 private static final String IC_RESI_FORM_CODE = "resi_base_info"; @@ -227,7 +229,7 @@ public class IcResiUserController { Map> otherSheetItems = buildItemMap(resiFormItems); - Map> resiMainList = icResiUserService.getDataForExport(otherSheetItems.get(BASE_TABLE_NAME), BASE_TABLE_NAME, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); + Map> resiMainList = null;//icResiUserService.getDataForExport(otherSheetItems.get(IcResiUserConstant.IC_RESI_USER), IcResiUserConstant.IC_RESI_USER, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); //resiMainList = (List>)JSON.parse("[{\"IS_BDHJ\":\"1\",\"IS_SPECIAL\":\"1\",\"IS_XFRY\":\"0\",\"REMARKS\":\"beizhu\",\"IS_PARTY\":\"1\",\"icResiUserId\":\"yzmtest2\",\"HOME_ID\":\"中海国际社区一里城1号楼1单元101\",\"HOUSE_TYPE\":\"平房\",\"UNIT_NAME\":\"1单元\",\"GRID_ID\":\"市北区-市北区第三网格3\",\"IS_DB\":\"0\",\"GENDER\":\"男\",\"BIRTHDAY\":\"2021-10-04\",\"IS_VETERANS\":\"0\",\"IS_MB\":\"0\",\"IS_UNEMPLOYED\":\"0\",\"DEMAND_NAME\":null,\"IS_KC\":\"0\",\"IS_ENSURE_HOUSE\":\"0\",\"IS_SD\":\"0\",\"NAME\":\"尹作梅\",\"RDSJ\":null,\"IS_VOLUNTEER\":\"1\",\"GRID_ID_VALUE\":\"e74829ffc43d5470eba6b5e060c11e63\",\"IS_SZ\":\"0\",\"IS_CJ\":\"0\",\"HOME_ID_VALUE\":\"200\",\"DEMAND_CATEGORY_IDS\":null,\"VILLAGE_NAME\":\"中海国际社区一里城\",\"IS_DBH\":\"0\",\"IS_SN\":\"0\",\"BUILD_NAME\":\"1号楼\",\"IS_YLFN\":\"0\",\"IS_UNITED_FRONT\":\"0\",\"ID_CARD\":\"371325199310260529\",\"MOBILE\":\"15764229697\",\"IS_OLD_PEOPLE\":\"0\",\"DOOR_NAME\":\"101\"},{\"IS_SPECIAL\":\"1\",\"IS_XFRY\":\"0\",\"REMARKS\":\"beizhu\",\"IS_PARTY\":\"1\",\"icResiUserId\":\"yzmtest\",\"HOME_ID\":\"中海国际社区一里城1号楼1单元101\",\"HOUSE_TYPE\":\"平房\",\"UNIT_NAME\":\"1单元\",\"GRID_ID\":\"市北区-市北区第三网格3\",\"IS_DB\":\"0\",\"GENDER\":\"男\",\"BIRTHDAY\":\"2021-10-04\",\"IS_VETERANS\":\"0\",\"IS_MB\":\"0\",\"IS_UNEMPLOYED\":\"0\",\"DEMAND_NAME\":\"心理咨询\",\"IS_KC\":\"0\",\"IS_ENSURE_HOUSE\":\"0\",\"IS_SD\":\"0\",\"NAME\":\"尹作梅\",\"RDSJ\":\"2021-10-28 00:00:00\",\"IS_VOLUNTEER\":\"1\",\"GRID_ID_VALUE\":\"e74829ffc43d5470eba6b5e060c11e63\",\"IS_SZ\":\"0\",\"IS_CJ\":\"0\",\"HOME_ID_VALUE\":\"200\",\"DEMAND_CATEGORY_IDS\":\"10180002\",\"VILLAGE_NAME\":\"中海国际社区一里城\",\"IS_DBH\":\"0\",\"IS_SN\":\"0\",\"BUILD_NAME\":\"1号楼\",\"IS_YLFN\":\"0\",\"IS_UNITED_FRONT\":\"0\",\"ID_CARD\":\"371325199310260529\",\"MOBILE\":\"15764229697\",\"IS_OLD_PEOPLE\":\"0\",\"DOOR_NAME\":\"101\"}]"); log.info("resiMainList:{}", JSON.toJSONString(resiMainList)); String templatePath = "excel/ic_resi_info_cid.xls"; @@ -241,13 +243,13 @@ public class IcResiUserController { AtomicInteger n = new AtomicInteger(); for (FormItemResult item : resiFormItems.getItemList()) { //如果 childGroup是空 或者是主表 则跳过 继续下次循环 - if (item.getChildGroup() == null || BASE_TABLE_NAME.equals(item.getChildGroup().getTableName())) { + if (item.getChildGroup() == null || IcResiUserConstant.IC_RESI_USER.equals(item.getChildGroup().getTableName())) { continue; } String tableName = item.getChildGroup().getTableName(); Map itemMap1 = otherSheetItems.get(tableName); - Map> resiChildMap = icResiUserService.getDataForExport(itemMap1, tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); + Map> resiChildMap = null;//icResiUserService.getDataForExport(itemMap1, tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); //resiChildMap.forEach((key, value) -> value.putAll(resiMainList.get(key))); Map mapData2 = new HashMap<>(); @@ -286,7 +288,7 @@ public class IcResiUserController { ExcelWriter excelWriter = EasyExcel.write(getOutputStream("居民基本信息.xlsx", response)).withTemplate(file).build(); FillConfig fillConfig = FillConfig.builder().direction(WriteDirectionEnum.VERTICAL).build(); - IcResiUserTableEnum tableEnums = IcResiUserTableEnum.getObjectByTableName(BASE_TABLE_NAME); + IcResiUserTableEnum tableEnums = IcResiUserTableEnum.getObjectByTableName(IcResiUserConstant.IC_RESI_USER); WriteSheet fistSheet = EasyExcel.writerSheet(tableEnums.getSheetNo()).build(); pageFormDTO.setPageSize(NumConstant.FIVE_HUNDRED); @@ -296,24 +298,24 @@ public class IcResiUserController { Map childTableWriteSheetMap = new HashMap<>(); Map> resiMainTableMap = null; do { - resiMainTableMap = icResiUserService.getDataForExport(otherSheetItems.get(BASE_TABLE_NAME), BASE_TABLE_NAME, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); + resiMainTableMap = null;//icResiUserService.getDataForExport(otherSheetItems.get(IcResiUserConstant.IC_RESI_USER), IcResiUserConstant.IC_RESI_USER, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); //如果 返回的条数小于每页显示的数 则退出查询 if (resiMainTableMap.keySet().size() < pageFormDTO.getPageSize()) { - stopSearchSet.add(BASE_TABLE_NAME); + stopSearchSet.add(IcResiUserConstant.IC_RESI_USER); } //写入数据 excelWriter.fill(new FillWrapper("t1", resiMainTableMap.values()), fillConfig, fistSheet); pageFormDTO.setPageNo(pageFormDTO.getPageNo() + 1); //重置数据 resiMainTableMap.clear(); - } while (!stopSearchSet.contains(BASE_TABLE_NAME)); + } while (!stopSearchSet.contains(IcResiUserConstant.IC_RESI_USER)); //子表数据写入 AtomicInteger n = new AtomicInteger(); for (FormItemResult item : resiFormItems.getItemList()) { //如果 childGroup是空 或者是主表 则跳过 继续下次循环 - if (item.getChildGroup() == null || BASE_TABLE_NAME.equals(item.getChildGroup().getTableName())) { + if (item.getChildGroup() == null || IcResiUserConstant.IC_RESI_USER.equals(item.getChildGroup().getTableName())) { continue; } String tableName = item.getChildGroup().getTableName(); @@ -326,7 +328,7 @@ public class IcResiUserController { continue; } Map itemMap1 = otherSheetItems.get(tableName); - Map> resiChildMap = icResiUserService.getDataForExport(itemMap1, tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); + Map> resiChildMap = null;//icResiUserService.getDataForExport(itemMap1, tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); //如果 返回的条数小于每页显示的数 则退出查询 if (resiChildMap.keySet().size() < pageFormDTO.getPageSize()) { stopSearchSet.add(tableName); @@ -365,8 +367,6 @@ public class IcResiUserController { pageFormDTO.setCustomerId(customerId); pageFormDTO.setPageFlag(false); - - //获取模版文件 File file = getExportTemplateFile(customerId); ExcelWriter excelWriter = null; @@ -381,34 +381,56 @@ public class IcResiUserController { //获取表单项 List resiFormAllItems = icResiUserService.listFormItems(customerId, IC_RESI_FORM_CODE); + Map allItemMap = resiFormAllItems.stream().collect(Collectors.toMap(FormItemResult::getItemId, o -> o)); + Map map = new HashMap<>(); + allItemMap.values().forEach(item->{ + String tableName = item.getTableName(); + ExportResiUserItemDTO exportItem = map.getOrDefault(tableName, new ExportResiUserItemDTO()); + map.putIfAbsent(tableName,exportItem); + String columnName = item.getColumnName().concat(item.getColumnNum() == NumConstant.ZERO ? StrConstant.EPMETY_STR : item.getColumnNum().toString()); + exportItem.getItemMap().put(columnName,item); + if (item.getOptionSourceType().equals("remote")&&item.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)){ + //多个参数 + String[] paramArr = item.getOptionSourceValue().split(StrConstant.QUESTION_MARK_TRANSFER)[NumConstant.ONE].split(StrConstant.AND_MARK); + Arrays.stream(paramArr).forEach(o->{ + FormItemResult value = allItemMap.get(o); + if (value == null){ + return; + } + Set conditionSet = exportItem.getRemoteItemConditionMap().getOrDefault(item.getItemId(),new HashSet<>()); + conditionSet.add(value); + exportItem.getRemoteItemConditionMap().putIfAbsent(item.getItemId(),conditionSet); + }); + } + }); + //每个表对应的 item ;key:表名,value:<字段名:item对象> - Map> tableItemMap = resiFormAllItems.stream() - .collect(Collectors.groupingBy(FormItemResult::getTableName, - Collectors.toMap(o->o.getColumnName().concat(NumConstant.ZERO == o.getColumnNum()? StrConstant.EPMETY_STR:o.getColumnNum().toString()), o -> o))); Map childTableWriteSheetMap = new HashMap<>(); //表数据写入 //通过枚举获取相关表并按照sheetNo排序 List resiTableList = Arrays.stream(IcResiUserTableEnum.values()) .sorted(Comparator.comparing(IcResiUserTableEnum::getSheetNo)) .collect(Collectors.toList()); + List> resiResultList = null; for (IcResiUserTableEnum tableEnum : resiTableList) { String tableName = tableEnum.getTableName(); pageFormDTO.setPageNo(NumConstant.ONE); - //循环一次 写入每个sheet + //循环一次 写入一个sheet do { - Map> resiChildMap = icResiUserService.getDataForExport(tableItemMap.get(tableName), tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); + resiResultList = icResiUserService.getDataForExport(map.get(tableName), tableName, pageFormDTO, staffInfoCacheResult.getAgencyId(), staffOrgPath); //如果 返回的条数小于每页显示的数 则退出查询 - if (resiChildMap.keySet().size() < pageFormDTO.getPageSize()) { + if (resiResultList.size() < pageFormDTO.getPageSize()) { stopSearchSet.add(tableName); } //如果没有 构建新的writeSheet WriteSheet writeSheet = childTableWriteSheetMap.getOrDefault(tableName,EasyExcel.writerSheet(tableEnum.getSheetNo()).build()); childTableWriteSheetMap.putIfAbsent(tableName, writeSheet); //写入数据 - excelWriter.fill(new FillWrapper("t" + (tableEnum.getSheetNo() + NumConstant.ONE), resiChildMap.values()), writeSheet); + excelWriter.fill(new FillWrapper("t" + (tableEnum.getSheetNo() + NumConstant.ONE), resiResultList), writeSheet); pageFormDTO.setPageNo(pageFormDTO.getPageNo() + NumConstant.ONE); //重置数据 - resiChildMap.clear(); + resiResultList.clear(); + //如果包含则说明子表的数据 已经查询完毕 无需再继续查询了 } while (!stopSearchSet.contains(tableName)); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java index eb4ecd977e..ffd0076429 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/IcResiUserTableEnum.java @@ -10,7 +10,9 @@ import lombok.AllArgsConstructor; */ @AllArgsConstructor public enum IcResiUserTableEnum { - + /** + * 注释 + */ IC_RESI_USER("ic_resi_user","社区居民基本信息录入表", 0, 3, null), IC_PARTY_MEMBER("ic_party_member","党员信息录入表", 1, 2, "IS_PARTY"), IC_ENSURE_HOUSE("ic_ensure_house","保障房人员信息录入表", 2, 2, "IS_ENSURE_HOUSE"), diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/support/ExportResiUserItemDTO.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/support/ExportResiUserItemDTO.java new file mode 100644 index 0000000000..8f7cb6de14 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/support/ExportResiUserItemDTO.java @@ -0,0 +1,29 @@ +package com.epmet.excel.support; + +import com.epmet.dto.result.FormItemResult; +import lombok.Data; + +import java.io.Serializable; +import java.util.*; + +/** + * desc: + * + * @author: LiuJanJun + * @date: 2021/11/18 3:31 下午 + * @version: 1.0 + */ +@Data +public class ExportResiUserItemDTO implements Serializable { + + private static final long serialVersionUID = -6581208659638591761L; + + /** + * 该表对应的 字段名:item + */ + private Map itemMap = new HashMap<>(); + /** + * 该表对应的所有远程item的相关条件 key:remote的itemID value:条件中用到的所有的item + */ + private Map> remoteItemConditionMap = new HashMap<>(); +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index d18d47d1b3..52e256105c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; +import com.epmet.excel.support.ExportResiUserItemDTO; import java.util.List; import java.util.Map; @@ -105,12 +106,12 @@ public interface IcResiUserService extends BaseService { /** * desc:条件导出 * - * @param itemList + * @param exportResiUserItemDTO * @param baseTableName * @return Map> 用户Id:用户信息所有的字段名及值 */ - Map> getDataForExport(Map itemList, String baseTableName, IcResiUserPageFormDTO pageFormDTO, String currentStaffAgencyId, - String staffOrgPath); + List> getDataForExport(ExportResiUserItemDTO exportResiUserItemDTO, String baseTableName, IcResiUserPageFormDTO pageFormDTO, String currentStaffAgencyId, + String staffOrgPath); /** * @Description 家庭关系 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 e0e1bac217..b2adb20543 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 @@ -7,6 +7,7 @@ import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcelFactory; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -15,7 +16,6 @@ import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.dao.IcResiUserDao; import com.epmet.dto.*; -import com.epmet.dto.form.AgencyIdFormDTO; import com.epmet.dto.form.GridOptionFormDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.form.LoginUserDetailsFormDTO; @@ -90,7 +90,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res // 是否必填 private Integer required; - private List colIndexs; + private List colIndex; //private List colContents; // 单元格内容 private String cellContent; @@ -544,7 +544,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res || "daterange".equals(columnWrapper.getItemType()) ) { - String cellContent = row.get(columnWrapper.getColIndexs().get(0)); + String cellContent = row.get(columnWrapper.getColIndex().get(0)); columnWrapper.setCellContent(cellContent); columnWrapper.setColValue(cellContent); @@ -553,7 +553,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res String optionSourceType = columnWrapper.getOptionSourceType(); // 取单元格的内容 - String cellContent = row.get(columnWrapper.getColIndexs().get(0)); + String cellContent = row.get(columnWrapper.getColIndex().get(0)); columnWrapper.setCellContent(cellContent); if ("local".equals(optionSourceType)) { @@ -677,7 +677,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res String combinedLabel = StringUtils.isBlank(groupLabel) ? item.getLabel() : groupLabel.concat(":").concat(item.getLabel()); columnWrapper.setCombinedLabel(combinedLabel); columnWrapper.setColumnName(item.getColumnName()); - columnWrapper.setColIndexs(entry.getValue()); + columnWrapper.setColIndex(entry.getValue()); columnWrapper.setRequired(item.getRequired()); columnWrapper.setOptionSourceType(item.getOptionSourceType()); @@ -699,7 +699,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res private String getCheckBoxColValue(ColumnWrapper columnWrapper, Map dataRow, Map checkboxOptions) { Map options = columnWrapper.getOptions(); - List colIndexs = columnWrapper.getColIndexs(); + List colIndexs = columnWrapper.getColIndex(); List optionValues = colIndexs.stream().filter(i -> { String cellContent = dataRow.get(i); @@ -770,8 +770,8 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res String cascadeItemId = null; ColumnWrapper cascadeItemColumnWrapper = null; - if (fullUri.indexOf("?") != -1) { - String[] uriParts = fullUri.split("\\?"); + if (fullUri.indexOf(StrConstant.QUESTION_MARK) != -1) { + String[] uriParts = fullUri.split(StrConstant.QUESTION_MARK_TRANSFER); pureUri = uriParts[0]; cascadeItemId = uriParts[1]; @@ -819,8 +819,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res break; case "/gov/org/icneighborhood/neighborhoodoption": IcNeighborHoodDTO nform = new IcNeighborHoodDTO(); - nform.setAgencyId(currUserAgencyId); - nform.setGridId(cascadeItemColumnWrapper.getColValue()); + String gridId = cascadeItemColumnWrapper.getColValue(); + if (StringUtils.isBlank(gridId)){ + nform.setAgencyId(currUserAgencyId); + } + nform.setGridId(gridId); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getNeighborHoodOptions(nform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/education": @@ -838,6 +841,8 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res case "/sys/dict/data/relationship": options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; + default: + log.warn("listRemoteOptions url is not supported"); } 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 ddb7c9307d..277b7220a7 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 @@ -27,6 +27,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.enums.FormItemTypeEnum; import com.epmet.commons.tools.enums.GenderEnum; import com.epmet.commons.tools.enums.HouseTypeEnum; import com.epmet.commons.tools.enums.RelationshipEnum; @@ -44,6 +45,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.IcPlatformConstant; +import com.epmet.constant.IcResiUserConstant; import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserConstant; import com.epmet.dao.IcResiUserDao; @@ -55,6 +57,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; +import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; @@ -63,6 +66,8 @@ import com.epmet.service.IcResiUserService; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -639,131 +644,136 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> getDataForExport(Map formItemMap, String baseTableName,IcResiUserPageFormDTO pageFormDTO, - String currentStaffAgencyId, - String staffOrgPath) { + public List> getDataForExport(ExportResiUserItemDTO formItemMap, String baseTableName, IcResiUserPageFormDTO pageFormDTO, + String currentStaffAgencyId, + String staffOrgPath) { Page> mapListPage = PageHelper.startPage(pageFormDTO.getPageNo(), pageFormDTO.getPageSize(), pageFormDTO.getPageFlag()).doSelectPage(() -> { this.dynamicQuery(pageFormDTO.getCustomerId(), pageFormDTO.getFormCode(), baseTableName, pageFormDTO.getConditions(), currentStaffAgencyId, staffOrgPath); }); - List> mapList = mapListPage.getResult(); - Map> result = new LinkedHashMap<>(); - mapList.stream().filter(Objects::nonNull).forEach(map -> { - //遍历所有字段 格式化时间字段 - map.forEach((k,o) -> { - if (o instanceof java.sql.Date){ - o = DateUtils.format(((Date) o),DateUtils.DATE_PATTERN); - } - if (o instanceof java.sql.Timestamp){ - o = DateUtils.format(new Date(((Timestamp) o).getTime()),DateUtils.DATE_TIME_PATTERN); - } - map.put(k,o); - - //把checkbox radio select的值放入到map里 并添加对应的 - - }); - Object gridId = map.get(UserConstant.GRID_ID); + mapListPage.getResult().stream().filter(Objects::nonNull).forEach(map -> { String resiId = null; - //获取用户Id - if ("ic_resi_user".equals(baseTableName)) { + if (IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { resiId = (String) map.get("ID"); }else { resiId = (String) map.get(UserConstant.IC_RESI_USER); } - if (StringUtils.isBlank(resiId)){ log.error("getDataForExport error,resiId is net exist:{}",map); return; } - //把人放进去 - result.put(resiId, map); - - for (Map.Entry e : formItemMap.entrySet()) { - String k = e.getKey(); - FormItemResult v = e.getValue(); - Object temp = map.get(k); - String vauleStr = temp == null ? "" : temp.toString(); - - if (v.getOptionSourceType().equals("remote")) { - try { - Map columnWrappers = new HashMap<>(); - if (v.getItemId().equals("1078")) { - IcResiUserImportServiceImpl.ColumnWrapper value = new IcResiUserImportServiceImpl.ColumnWrapper(); - value.setColValue(gridId.toString()); - columnWrappers.put("1001", value); - }else if (v.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)){ - continue; - } - //todo 获取 options - Map stringMap = icResiUserImportService.listRemoteOptions(columnWrappers, v.getOptionSourceValue(), currentStaffAgencyId, "query"); - if ("checkbox".equals(v.getItemType())) { - stringMap.forEach((label, value) -> map.put(value, vauleStr.contains(value) ? "是" : "否")); - } else if ("select".equals(v.getItemType())) { - stringMap.forEach((label, value) -> { - if (vauleStr.equals(value)) { - map.put(k, label); - } - }); - } - } catch (Exception ex) { - log.warn("listRemoteOptions url:{}", v.getOptionSourceValue()); - } - } else { - if ("checkbox".equals(v.getItemType())) { + //遍历所有字段 格式化时间字段 + map.forEach((k,o) -> { + if (o instanceof java.sql.Date){ + o = DateUtils.format(((Date) o),DateUtils.DATE_PATTERN); + }else if (o instanceof java.sql.Timestamp){ + o = DateUtils.format(new Date(((Timestamp) o).getTime()),DateUtils.DATE_TIME_PATTERN); + } + map.put(k,o); + FormItemResult itemResult = formItemMap.getItemMap().get(k); + if (itemResult == null){ + return; + } + }); - v.getOptions().forEach(optionDTO -> { - map.put(optionDTO.getValue(), vauleStr.contains(optionDTO.getValue()) ? "是" : "否"); - }); - } else if ("select".equals(v.getItemType())) { - v.getOptions().forEach(optionDTO -> { - if (optionDTO.getValue().equals(vauleStr)) { - map.put(k, optionDTO.getLabel()); - } - }); - } else if ("radio".equals(v.getItemType())) { - v.getOptions().forEach(optionDTO -> { - if (optionDTO.getValue().equals(vauleStr)) { - map.put(k, optionDTO.getLabel()); - } - }); - } + //当前条数据原始的id值 map + Map originalConditionMap = new HashMap<>(); + for (FormItemResult e : formItemMap.getItemMap().values()) { + String columnName = getColumnName(e); + Object temp = map.get(columnName); + String vauleStr = temp == null ? StrConstant.EPMETY_STR : temp.toString(); + originalConditionMap.putIfAbsent(columnName,vauleStr); + if ("remote".equals(e.getOptionSourceType()) && StringUtils.isNotBlank(vauleStr)) { + putRemoteValue(formItemMap.getRemoteItemConditionMap().get(e.getItemId()), currentStaffAgencyId, map,originalConditionMap, e, columnName, vauleStr); + } else { + putOptionValue(map, e, columnName, vauleStr); } } - if (!"ic_resi_user".equals(baseTableName)) { + if (!IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { Map o = redisUtils.hGetAll(RedisKeys.getExportResiBaseInfoKey(resiId)); if (o != null){ map.putAll(o); } return; } + //把人放入redis缓存 便于后面的sheet使用基础信息 + redisUtils.hMSet(RedisKeys.getExportResiBaseInfoKey(resiId),map,RedisUtils.MINUTE_THIRTY_EXPIRE); + }); + remoteOptionCacheMap.clear(); + return mapListPage.getResult(); + } - /*if (gridId != null) { - CustomerGridFormDTO formDTO = new CustomerGridFormDTO(); - formDTO.setGridId(gridId.toString()); - Result gridInfoRes = govOrgOpenFeignClient.getGridBaseInfoByGridId(formDTO); - if (gridInfoRes != null && gridInfoRes.success() && gridInfoRes.getData() != null) { - map.put(UserConstant.GRID_NAME, gridInfoRes.getData().getGridName()); + /** + * key:itemId,value: key:columnName,中文 + */ + private static Map> remoteOptionCacheMap = new HashMap<>(); + private void putRemoteValue(Set conditionItemSet, String currentStaffAgencyId, Map map, Map originalConditionMap, FormItemResult e, String columnName, String vauleStr) { + try { + Map columnWrappers = new HashMap<>(); + if (e.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)){ + for (FormItemResult o : conditionItemSet) { + String column = getColumnName(o); + Object conditionValue = originalConditionMap.getOrDefault(column, map.get(column)); + originalConditionMap.putIfAbsent(column,conditionValue.toString()); + IcResiUserImportServiceImpl.ColumnWrapper value = new IcResiUserImportServiceImpl.ColumnWrapper(); + value.setColValue(conditionValue.toString()); + columnWrappers.put(o.getItemId(), value); } + } + /*if (e.getItemId().equals("1078")) { + IcResiUserImportServiceImpl.ColumnWrapper value = new IcResiUserImportServiceImpl.ColumnWrapper(); + value.setColValue(gridId.toString()); + columnWrappers.put("1001", value); + }else if (e.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)){ + continue; }*/ - Object homeId = map.get(UserConstant.HOME_ID); - if (homeId != null) { - HashSet houseIds = new HashSet<>(); - houseIds.add(homeId.toString()); - Result> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds); - if (houseInfoRes != null && houseInfoRes.success() && CollectionUtils.isNotEmpty(houseInfoRes.getData())) { - HouseInfoDTO houseInfoDTO = houseInfoRes.getData().get(NumConstant.ZERO); - map.put("VILLAGE_NAME", houseInfoDTO.getNeighborHoodName()); - map.put("BUILD_NAME", houseInfoDTO.getBuildingName()); - map.put("HOME_ID", houseInfoDTO.getHouseName()); - map.put("UNIT_ID", houseInfoDTO.getUnitName()); + Cache cache = remoteOptionCacheMap.getOrDefault(e.getItemId(), CacheBuilder.newBuilder().maximumSize(NumConstant.FIVE_HUNDRED).build()); + remoteOptionCacheMap.put(e.getItemId(),cache); + String cacheValue = cache.getIfPresent(vauleStr); + if (StringUtils.isNotBlank(cacheValue)){ + map.put(columnName,cacheValue); + } else { + Map remoteOptions = icResiUserImportService.listRemoteOptions(columnWrappers, e.getOptionSourceValue(), currentStaffAgencyId, "query"); + if (FormItemTypeEnum.CHECKBOX.getCode().equals(e.getItemType())) { + remoteOptions.forEach((label, value) -> map.put(value, vauleStr.contains(value) ? "是" : "否")); + } else if (FormItemTypeEnum.SELECT.getCode().equals(e.getItemType())) { + remoteOptions.forEach((label, value) -> { + if (vauleStr.equals(value)) { + map.put(columnName, label); + } + cache.put(value,label); + }); } } - //把人放入缓存 - redisUtils.hMSet(RedisKeys.getExportResiBaseInfoKey(resiId),map,RedisUtils.MINUTE_THIRTY_EXPIRE); - }); - return result; + } catch (Exception ex) { + log.warn("listRemoteOptions url:{}", e.getOptionSourceValue()); + } + } + + private void putOptionValue(Map map, FormItemResult e, String columnName, String vauleStr) { + FormItemTypeEnum itemTypeEnum = FormItemTypeEnum.getEnum(e.getItemType()); + switch (itemTypeEnum) { + case CHECKBOX: + e.getOptions().forEach(optionDTO -> { + map.put(optionDTO.getValue(), vauleStr.contains(optionDTO.getValue()) ? "是" : "否"); + }); + break; + case SELECT: + case RADIO: + e.getOptions().forEach(optionDTO -> { + if (optionDTO.getValue().equals(vauleStr)) { + map.put(columnName, optionDTO.getLabel()); + } + }); + break; + default: + } + } + + private String getColumnName(FormItemResult e) { + return e.getColumnNum() == NumConstant.ZERO? e.getColumnName():e.getColumnName().concat(e.getColumnNum().toString()); } /** diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx index c427b87ad521578abe21e75d3462592d4dc793b6..bb88725ee669eec8e404a2dbdfaf20943df9e261 100644 GIT binary patch delta 16419 zcmZX*b95wq*EJm56Wg|J+qP}1gNdDvJ+V2lCN?LW*mg2;^5weTcRlxaKX3oh-DlV7 z>aJc@d!4;&|EdQ;=LbRS;lLoA5~fnO@5EGjKU|> zsfgmXgs#H3>f()S!mk$&UWhz@m}#_gWUUJXtrrlmu)y+E@@Q8yY@o))3kc+rvu>+{ z0g7>B)Wcc%qW$huw8adbs;SIo`IRwj!!z1g^;bT0+@J#xYzSDwTvd_Q(db>GmPfRV zpdn_FB%n6zlpG4L&kj1}RlYRHxmt{O)k>46+{v-IRpr>ve2AjwtfsY_qoYe) z;Htd-wy4*cUxr*w>=P|u7Y*;sp;7)_L-y2d5QmsP;PZ`Q2TNHF90DB#1Ox^oqNxJB z3>0oNPn9qb9t4Dg9SDkv)8qze4bS>85cdMj*J{{EpDu=?x#-wiyuD?37nYy<3HJZ{ zyyC9#@KkVUKLiMf4={-c7r@Hs?O>m(z2;gdiyk1PaYRJD32lEZTcH+}ZjI(PlVcT9 zqYC;59GeXw6eFq3X+Q~#VAtvX8x~N+_nx0`QV?*>eIvm>n>jbjLFi+8B6Sx0@xuB( zx7bYXQB;B#8Hs$q#Xko?`g||z#k%op+~Hp=Ad!W7p;Ty%x1rn&2ShlUMlvMSH=(&4 zmp-u>W{+_mUaG={1>11oI zihFh~;9@o4-!{Y)m>Rn6lj4VgdMSzf`N`z5iwZZTx_9FCBY?K)4aH8b$JI-O7p)KQ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hcfgSVU(HRY?*vhxjF+qYVyn6(p!Wn3vy6AC zJP2E}JSZo*Jm_fY>qgBBz6qcXmlDGsXR_R$FfRc|L+058ZL+4b!>>rQqD6(#SigOt zip#@6qVelUBlX`diiT(EPZW^WyopWn&pG7ny;NvH%`(w z8)GpyD&1t!cfm=}(>rHRs6{4CmISzMft1CX?$sQJt*n4kRcUkV)qUs5H<)hZWQgSfB&^ zzsJD&byYw!fpNM&5bnR~bYJy31!+()bP!;-2JY9H2rV{0Xg-5fKmb7 z_4zjI&`M>Ie|Gkbd@LHb^;y(wRfg}cB>mUOa3^9PR1{nDN?<^qV|DJUG z)!XppM2ramOg2Eq|L;>g|J%_G_dkxyU#tChGyMN{@+A6?6OkbX-hcOy{%@7yrNS`JLfEPS;;6|L+RvfBypwKoTQ5$W85kmj45N Cz#$v} From dec8498fe068f28d11d9010ec97eda1321ebc34e Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 19 Nov 2021 16:26:32 +0800 Subject: [PATCH 17/19] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/IcResiUserController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index fd3a88fd79..bcd83a9e3e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -354,6 +354,18 @@ public class IcResiUserController { excelWriter.finish(); } + /** + * desc: 导出居民信息 + * + * @param customerId + * @param tokenDto + * @param pageFormDTO + * @param response + * @return void + * @author LiuJanJun + * @date 2021/11/19 4:24 下午 + * @remark:分页批量导出 + */ @RequestMapping(value = "/exportExcel") public void exportExcelByEasyExcel(@RequestHeader String customerId,@LoginUser TokenDto tokenDto, @RequestBody IcResiUserPageFormDTO pageFormDTO, HttpServletResponse response) throws Exception { //tokenDto.setUserId("9e37adcce6472152e6508a19d3683e02"); From e68ca8a448d21ad71eea168ff95bdec0e651373f Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 19 Nov 2021 17:42:45 +0800 Subject: [PATCH 18/19] =?UTF-8?q?=E6=94=B9=E4=BA=86=E4=B8=AA=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcResiUserController.java | 5 ++-- .../service/impl/IcResiUserServiceImpl.java | 30 ++++++++----------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index bcd83a9e3e..7f95af3d76 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -385,12 +385,9 @@ public class IcResiUserController { try { excelWriter = EasyExcel.write(getOutputStream("居民基本信息.xlsx", response)).withTemplate(file).build(); - pageFormDTO.setPageSize(NumConstant.FIVE_HUNDRED); - pageFormDTO.setPageNo(NumConstant.ONE); //子表是否停止查询 Set stopSearchSet = new HashSet<>(); - //获取表单项 List resiFormAllItems = icResiUserService.listFormItems(customerId, IC_RESI_FORM_CODE); Map allItemMap = resiFormAllItems.stream().collect(Collectors.toMap(FormItemResult::getItemId, o -> o)); @@ -424,6 +421,8 @@ public class IcResiUserController { .sorted(Comparator.comparing(IcResiUserTableEnum::getSheetNo)) .collect(Collectors.toList()); List> resiResultList = null; + + pageFormDTO.setPageSize(NumConstant.FIVE_HUNDRED); for (IcResiUserTableEnum tableEnum : resiTableList) { String tableName = tableEnum.getTableName(); pageFormDTO.setPageNo(NumConstant.ONE); 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 277b7220a7..f82bcf97dc 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 @@ -650,56 +650,52 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> mapListPage = PageHelper.startPage(pageFormDTO.getPageNo(), pageFormDTO.getPageSize(), pageFormDTO.getPageFlag()).doSelectPage(() -> { this.dynamicQuery(pageFormDTO.getCustomerId(), pageFormDTO.getFormCode(), baseTableName, pageFormDTO.getConditions(), currentStaffAgencyId, staffOrgPath); }); - mapListPage.getResult().stream().filter(Objects::nonNull).forEach(map -> { + mapListPage.getResult().stream().filter(Objects::nonNull).forEach(resiUser -> { String resiId = null; //获取用户Id if (IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { - resiId = (String) map.get("ID"); + resiId = (String) resiUser.get("ID"); }else { - resiId = (String) map.get(UserConstant.IC_RESI_USER); + resiId = (String) resiUser.get(UserConstant.IC_RESI_USER); } if (StringUtils.isBlank(resiId)){ - log.error("getDataForExport error,resiId is net exist:{}",map); + log.error("getDataForExport error,resiId is net exist:{}",resiUser); return; } //遍历所有字段 格式化时间字段 - map.forEach((k,o) -> { + resiUser.forEach((k,o) -> { if (o instanceof java.sql.Date){ o = DateUtils.format(((Date) o),DateUtils.DATE_PATTERN); }else if (o instanceof java.sql.Timestamp){ o = DateUtils.format(new Date(((Timestamp) o).getTime()),DateUtils.DATE_TIME_PATTERN); } - map.put(k,o); - FormItemResult itemResult = formItemMap.getItemMap().get(k); - if (itemResult == null){ - return; - } + resiUser.put(k,o); }); - //当前条数据原始的id值 map + //当前条数据原始的id值 resiUser Map originalConditionMap = new HashMap<>(); for (FormItemResult e : formItemMap.getItemMap().values()) { String columnName = getColumnName(e); - Object temp = map.get(columnName); + Object temp = resiUser.get(columnName); String vauleStr = temp == null ? StrConstant.EPMETY_STR : temp.toString(); originalConditionMap.putIfAbsent(columnName,vauleStr); if ("remote".equals(e.getOptionSourceType()) && StringUtils.isNotBlank(vauleStr)) { - putRemoteValue(formItemMap.getRemoteItemConditionMap().get(e.getItemId()), currentStaffAgencyId, map,originalConditionMap, e, columnName, vauleStr); + putRemoteValue(formItemMap.getRemoteItemConditionMap().get(e.getItemId()), currentStaffAgencyId, resiUser,originalConditionMap, e, columnName, vauleStr); } else { - putOptionValue(map, e, columnName, vauleStr); + putOptionValue(resiUser, e, columnName, vauleStr); } } if (!IcResiUserConstant.IC_RESI_USER.equals(baseTableName)) { Map o = redisUtils.hGetAll(RedisKeys.getExportResiBaseInfoKey(resiId)); if (o != null){ - map.putAll(o); + resiUser.putAll(o); } return; } //把人放入redis缓存 便于后面的sheet使用基础信息 - redisUtils.hMSet(RedisKeys.getExportResiBaseInfoKey(resiId),map,RedisUtils.MINUTE_THIRTY_EXPIRE); + redisUtils.hMSet(RedisKeys.getExportResiBaseInfoKey(resiId),resiUser,RedisUtils.MINUTE_THIRTY_EXPIRE); }); remoteOptionCacheMap.clear(); return mapListPage.getResult(); @@ -730,7 +726,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl cache = remoteOptionCacheMap.getOrDefault(e.getItemId(), CacheBuilder.newBuilder().maximumSize(NumConstant.FIVE_HUNDRED).build()); - remoteOptionCacheMap.put(e.getItemId(),cache); + remoteOptionCacheMap.putIfAbsent(e.getItemId(),cache); String cacheValue = cache.getIfPresent(vauleStr); if (StringUtils.isNotBlank(cacheValue)){ map.put(columnName,cacheValue); From f96d48a3bf27ba025154dc730955655b2e53a707 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 19 Nov 2021 17:57:49 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=20=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 7 ++++- .../ResiCategoryStatsConfigController.java | 26 +++++++------------ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index b57a5c8584..8ecb5a189a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -222,7 +222,12 @@ public enum EpmetErrorCode { ORG_ADD_FAILED(8919,"添加失败"), ORG_EDIT_FAILED(8920,"编辑失败"), - ORG_DEL_FAILED(8921,"删除失败"); + ORG_DEL_FAILED(8921,"删除失败"), + //通用的 错误消息自己定义返回 + OPERATION_FAILED(9999,"网络开小差。。。"), + ; + + private int code; private String msg; diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java index fdec343adf..1e48a9c6f6 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java @@ -19,15 +19,11 @@ package com.epmet.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.constant.IcResiCategoryStatsConfigConstant; import com.epmet.dao.IcResiCategoryStatsConfigDao; @@ -36,22 +32,20 @@ import com.epmet.dto.IcResiCategoryStatsConfigDTO; import com.epmet.dto.IcResiCategoryWarnConfigDTO; import com.epmet.dto.form.IcResiCategoryStatsConfigFormDTO; import com.epmet.dto.form.IcResiCategoryStatsConfigSortFormDTO; -import com.epmet.dto.form.UpGovRoleFormDTO; import com.epmet.dto.result.IcResiCategoryStatsConfigResultDTO; import com.epmet.entity.IcResiCategoryStatsConfigEntity; import com.epmet.entity.IcResiCategoryWarnConfigEntity; -import com.epmet.excel.IcResiCategoryStatsConfigExcel; import com.epmet.service.IcResiCategoryStatsConfigService; import com.epmet.service.ResiCategoryStatsConfigService; -import com.github.pagehelper.util.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.*; +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 javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; /** @@ -63,7 +57,7 @@ import java.util.Map; @RestController @RequestMapping("resicategorystatsconfig") public class ResiCategoryStatsConfigController { - + @Autowired private IcResiCategoryStatsConfigService icResiCategoryStatsConfigService; @Autowired @@ -96,13 +90,13 @@ public class ResiCategoryStatsConfigController { if(IcResiCategoryStatsConfigConstant.WARN_YES.equals(formDTO.getWarn())){ //判断level1 和level2 的值 if(null ==level1 || level1==0){ - return new Result().error(8001,"等级1阈值需大于0"); + return new Result().error(EpmetErrorCode.OPERATION_FAILED.getCode(),"黄色预警阈值需大于0"); } if(null == level2 || level2==0){ - return new Result().error(8001,"等级2阈值需大于0"); + return new Result().error(EpmetErrorCode.OPERATION_FAILED.getCode(),"红色预警阈值需大于0"); } if(level2<=level1){ - return new Result().error(8001,"等级2阈值需大于等级1阈值"); + return new Result().error(EpmetErrorCode.OPERATION_FAILED.getCode(),"黄色预警阈值需大于红色预警阈值"); } } resiCategoryStatsConfigService.update(customerId,formDTO); @@ -170,4 +164,4 @@ public class ResiCategoryStatsConfigController { } -} \ No newline at end of file +}