diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java index 9faf6cabaf..e28914d26f 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java @@ -6,9 +6,11 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import java.util.List; +import java.util.Map; @FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class) //@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class, url = "localhost:8082") @@ -72,4 +74,14 @@ public interface EpmetAdminOpenFeignClient { */ @PostMapping("/sys/dict/data/relationship") Result> getRelationshipOption(); + + /** + * 字典数据查询通用接口 + * @Param dictType + * @Return {@link Result< Map < String, String>>} + * @Author zhaoqifeng + * @Date 2021/11/19 17:36 + */ + @PostMapping("/sys/dict/data/dictMap/{dictType}") + Result> dictMap(@PathVariable("dictType") String dictType); } diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java index 6ba1f8bee7..fec84ab1fd 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java @@ -6,9 +6,9 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.EpmetAdminOpenFeignClient; -import org.springframework.stereotype.Component; import java.util.List; +import java.util.Map; //@Component public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignClient { @@ -41,4 +41,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli public Result> getRelationshipOption() { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRelationshipOption", null); } + + @Override + public Result> dictMap(String dictType) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "dictMap", dictType); + } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java index 18e0437551..1424f480ed 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java @@ -150,4 +150,16 @@ public class SysDictDataController { return new Result>().ok(sysDictDataService.dictList(formDTO.getDictType())); } + /** + * 字典数据查询通用接口 + * @Param dictType + * @Return {@link Result< Map< String, String>>} + * @Author zhaoqifeng + * @Date 2021/11/19 17:36 + */ + @PostMapping("dictMap/{dictType}") + public Result> dictMap(@PathVariable("dictType") String dictType) { + return new Result>().ok(sysDictDataService.dictMap(dictType)); + } + } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java index 0d64ee0d8c..9109cfdc86 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java @@ -9,7 +9,6 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.dto.form.DictListFormDTO; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; @@ -85,4 +84,7 @@ public interface SysDictDataService extends BaseService { * @Author sun */ List dictList(String dictType); + + + Map dictMap(String dictType); } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java index 468fb764c7..d3c61d6c16 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java @@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.dto.form.DictListFormDTO; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; @@ -212,4 +211,10 @@ public class SysDictDataServiceImpl extends BaseServiceImpl dictMap(String dictType) { + List resultDTOList = baseDao.selectDictList(dictType); + return resultDTOList.stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel)); + } + } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java new file mode 100644 index 0000000000..fc40fcae64 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -0,0 +1,55 @@ +package com.epmet.commons.tools.enums; + +/** + * @author Administrator + */ +public enum DictTypeEnum { + /** + * 环境变量枚举 + */ + UN_KNOWN("un_know", "暂不清楚", 0), + NINE_SMALL_PLACES("nine_small_places", "九小场所", 1), + EDUCATION("education", "文化程度", 2), + NATION("nation", "民族", 3), + RELATIONSHIP("relationship", "与户主关系", 4), + HOUSE("house", "住房性质", 5), + SCALE("scale", "人员规模", 6), + PARTY_UNIT_TYPE("party_unit_type", "联建单位分类", 7), + GENDER("gender", "性别", 8), + ; + + private final String code; + private final String name; + private final Integer sort; + + + + DictTypeEnum(String code, String name, Integer sort) { + this.code = code; + this.name = name; + this.sort = sort; + } + + public static DictTypeEnum getEnum(String code) { + DictTypeEnum[] values = DictTypeEnum.values(); + for (DictTypeEnum value : values) { + if (value.getCode().equals(code)) { + return value; + } + } + return DictTypeEnum.UN_KNOWN; + } + + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public Integer getSort(){ + return sort; + } +} diff --git a/epmet-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 8d28c56bf1..9035d81861 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -83,6 +83,13 @@ public enum EpmetErrorCode { DOOR_NAME_EXITED(8216,"门牌号已存在"), NEIGHBOOR_NAME_EXITED(8217,"小区名称已存在"), DEMAND_NAME_EXITED(8218, "分类名称已存在"), + DEMAND_CAN_NOT_CANCEL(8219, "需求已完成,不可取消"), + DEMAND_CAN_NOT_ASSIGN(8220, "当前状态,不可指派"), + DEMAND_CAN_NOT_FINISH(8221, "当前状态,不能评价"), + DEMAND_FINISHED(8222,"需求已完成"), + DEMAND_CAN_NOT_UPDATE(8223,"当前状态,不可更新需求"), + DEMAND_NOT_EXITS(8224,"需求不存在"), + DEMAND_SERVICE_NOT_EXITS(8225,"服务记录不存在"), REQUIRE_PERMISSION(8301, "您没有足够的操作权限"), THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"), @@ -135,6 +142,17 @@ public enum EpmetErrorCode { PATROL_REPEATED_SUBMIT_ERROR(8521, "巡查已结束,请勿重复提交"), PATROL_END_TIME_ERROR(8522, "巡查结束时间不能小于巡查开始时间"), TIME_FORMAT_ERROR(8523, "时间格式错误"), + // 社区自组织 + COMMUNITY_SELF_ORGANIZATION_REPART_ERROR(8524, "社区自组织名称已存在"), + + // 党群服务中心 + PARTY_SERVICE_CENTER_ERROR(8525, "党群服务中心名称已存在"), + // 删除可预约事项存在预约记录时提示 + MATTER_EXISTS_APPOINTMENT_ERROR(8526, "尚有未履行的预约存在,请确认后操作"), + + // 预约某事项在某时间段存在记录时 + APPOINTMENT_TIME_ERROR(8527, "该时间段已被预约,请选择其他时间段"), + // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java new file mode 100644 index 0000000000..d09b657ee0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -0,0 +1,154 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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 com.epmet.commons.tools.validator.group.AddGroup; +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-19 + */ +@Data +public class IcPartyActivityDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + @NotBlank(message = "agencyId不能为空",groups = AddGroup.class) + private String agencyId; + + /** + * 组织的所有上级 + */ + private String pids; + + /** + * 单位ID + */ + @NotBlank(message = "单位不能为空",groups = AddGroup.class) + private String unitId; + private String unitName; + /** + * 服务事项 + */ + @NotBlank(message = "服务事项不能为空",groups = AddGroup.class) + private String serviceMatter; + + /** + * 活动标题 + */ + @NotBlank(message = "活动标题不能为空",groups = AddGroup.class) + private String title; + + /** + * 活动目标 + */ + @NotBlank(message = "活动目标不能为空",groups = AddGroup.class) + private String target; + + /** + * 活动内容 + */ + @NotBlank(message = "活动内容不能为空",groups = AddGroup.class) + private String content; + + /** + * 服务人数 + */ + private Integer peopleCount; + + /** + * 活动时间 + */ + @NotBlank(message = "活动时间不能为空",groups = AddGroup.class) + private Date activityTime; + + /** + * 活动地址 + */ + @NotBlank(message = "活动地址不能为空",groups = AddGroup.class) + private String address; + + /** + * 活动地址经度 + */ + @NotBlank(message = "活动地址不能为空",groups = AddGroup.class) + private String longitude; + + /** + * 活动地址纬度 + */ + @NotBlank(message = "活动地址不能为空",groups = AddGroup.class) + private String latitude; + + /** + * 活动结果 + */ + private String result; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java new file mode 100644 index 0000000000..7fdc5d38a4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java @@ -0,0 +1,145 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcPartyUnitDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * + */ + private String pids; + + /** + * 单位名称 + */ + private String unitName; + + /** + * 分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他 + */ + private String type; + + /** + * 服务事项 多选逗号隔开 + */ + private String serviceMatter; + + private List serviceMatterList; + + /** + * 联系人 + */ + private String contact; + + /** + * 联系电话 + */ + private String contactMobile; + + /** + * 在职党员数 + */ + private Integer memberCount; + + /** + * 地址 + */ + private String address; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + /** + * 群众满意度 + */ + private String satisfaction; + + /** + * 备注 + */ + private String remark; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java similarity index 97% rename from epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java rename to epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java index 3c7a60b93c..36ffcbe8a0 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class SocietyOrgDTO implements Serializable { +public class IcSocietyOrgDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java new file mode 100644 index 0000000000..3acb6a0510 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 居民需求操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandOperateLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前操作用户id + */ + private String userId; + + /** + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish; + */ + private String actionCode; + + /** + * 操作时间 + */ + private Date operateTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java new file mode 100644 index 0000000000..b070d80073 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java @@ -0,0 +1,178 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandRecDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + /** + * 二级需求分类编码 + */ + private String categoryCode; + + /** + * 父级需求分类编码 + */ + private String parentCode; + + /** + * 需求内容1000字 + */ + private String content; + + /** + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + private String reportType; + + /** + * 上报人姓名 + */ + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + private String reportUserMobile; + + /** + * 自身上报时存储居民端用户id + */ + private String reportUserId; + + /** + * 上报时间 + */ + private Date reportTime; + + /** + * 希望服务时间 + */ + private Date wantServiceTime; + + /** + * 小程序用户自己上报:mini_resi;居民信息录入的居民:ic_resi_user + */ + private String demandUserType; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + private String demandUserId; + + /** + * 需求人姓名 + */ + private String demandUserName; + + /** + * 需求人联系电话 + */ + private String demandUserMobile; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + private String status; + + /** + * 完成结果:已解决 resolved,未解决 unresolved + + */ + private String finishResult; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 + */ + private Boolean evaluateFlag; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java new file mode 100644 index 0000000000..c28b702723 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 居民需求评价记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandSatisfactionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,居民需求评价表 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前评价用户id,可以是小程序里用户id,也可以是工作端帮忙录入需求的人 + */ + private String userId; + + /** + * 评价时间 + */ + private Date evaluateTime; + + /** + * 得分可为半星 + */ + private BigDecimal score; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java new file mode 100644 index 0000000000..e3196e2b02 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民需求服务记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcUserDemandServiceDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 志愿者:居民端爱心互助的志愿者userId; + */ + private String serverId; + + /** + * 实际服务开始时间 + */ + private Date serviceStartTime; + + /** + * 实际服务结束时间 + */ + private Date serviceEndTime; + + /** + * 完成情况 + */ + private String finishDesc; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java index 5d80ef5c18..c839c78a78 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -72,12 +73,12 @@ public class AddSocietyOrgFormDTO implements Serializable { /** * 起始服务时间 */ - @NotBlank(message = "起始服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceStartTime; /** * 终止服务时间 */ - @NotBlank(message = "终止服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class }) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceEndTime; /** * 绑定管理员[组织下录入的工作人员] diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java new file mode 100644 index 0000000000..c70e2a7055 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java @@ -0,0 +1,49 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/19 1:47 下午 + * @DESC + */ +@Data +public class CommunitySelfOrganizationListFormDTO implements Serializable { + + private static final long serialVersionUID = 4202083250504143469L; + + public interface CommunitySelfOrganizationListForm{} + + /** + * 社区自组织名 + */ + private String organizationName; + + /** + * 开始时间 + */ + private String startTime; + + /** + * 结束时间 + */ + private String endTime; + + @NotNull(message = "pageNo不能为空",groups = CommunitySelfOrganizationListForm.class) + private Integer pageNo; + + @NotNull(message = "pageSize不能为空",groups = CommunitySelfOrganizationListForm.class) + private Integer pageSize; + + /** + * 是否分页,默认true分页 + */ + private Boolean isPage = true; + + private String customerId; + private String agencyId; + private Integer ranking; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java new file mode 100644 index 0000000000..67ee078676 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/19 4:19 下午 + * @DESC + */ +@Data +public class DelCommunitySelfOrganizationFormDTO implements Serializable { + + private static final long serialVersionUID = 789228513283561471L; + + public interface DelCommunitySelfOrganizationForm{} + + @NotBlank(message = "orgId不能为空",groups = DelCommunitySelfOrganizationForm.class) + private String orgId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java new file mode 100644 index 0000000000..588843ba92 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java @@ -0,0 +1,83 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/18 5:32 下午 + * @DESC + */ +@Data +public class EditCommunitySelfOrganizationFormDTO implements Serializable { + + private static final long serialVersionUID = -4990925380900678065L; + + public interface EditCommunitySelfOrganizationForm{} + + /** + * 组织名称 + */ + @NotBlank(message = "organizationName不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String organizationName; + + /** + * 组织人数 + */ + @NotNull(message = "organizationPersonCount不能为空",groups = EditCommunitySelfOrganizationForm.class) + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + @NotBlank(message = "principalName不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String principalName; + + /** + * 负责人电话 + */ + @NotBlank(message = "principalPhone不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String principalPhone; + + /** + * 服务事项 + */ + @NotBlank(message = "serviceItem不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + @NotNull(message = "organizationCreatedTime不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String organizationCreatedTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String latitude; + + /** + * 社区自组织ID + */ + @NotBlank(message = "orgId不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String orgId; + + /** + * 社区自组织人员 + */ + private List organizationPersonnel; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java index e28bba50b5..83c1523800 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -62,10 +63,12 @@ public class EditSocietyOrgFormDTO implements Serializable { /** * 起始服务时间 */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceStartTime; /** * 终止服务时间 */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date serviceEndTime; /** * 绑定管理员[组织下录入的工作人员] diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java index d28f93fe7e..48272aa6a6 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java @@ -47,5 +47,7 @@ public class GetListSocietyOrgFormDTO implements Serializable { private Integer pageNo; //每页多少条 private Integer pageSize = 20; + //token中客户Id + private String customerId; } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java new file mode 100644 index 0000000000..2053b99d0f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/11/22 14:42 + */ +@NoArgsConstructor +@Data +public class PartyActivityFormDTO implements Serializable { + private static final long serialVersionUID = -2510068555703677L; + private String agencyId; + private String unitId; + private String title; + private Date startTime; + private Date endTime; + private String serviceMatter; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java new file mode 100644 index 0000000000..683cee2803 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/11/19 16:19 + */ +@NoArgsConstructor +@Data +public class PartyUnitFormDTO implements Serializable { + + private static final long serialVersionUID = 1256798619648265622L; + private String agencyId; + private String unitName; + private String serviceMatter; + private String type; + private String contact; + private String contactMobile; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java new file mode 100644 index 0000000000..b24a505a5f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class AssignFormDTO implements Serializable { + private static final long serialVersionUID = -8844710824469349121L; + + public interface AddUserInternalGroup { + } + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + @NotBlank(message = "需求id不能为空", groups = AddUserInternalGroup.class) + private String demandRecId; + @NotBlank(message = "服务方类型不能为空", groups = AddUserShowGroup.class) + private String serviceType; + @NotBlank(message = "服务方不能为空", groups = AddUserShowGroup.class) + private String serverId; + + + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java new file mode 100644 index 0000000000..f3a1c9ae0c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java @@ -0,0 +1,120 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + +@Data +public class DemandAddFromDTO implements Serializable { + + private static final long serialVersionUID = 1589287946950749226L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + public interface UpdateInternalGroup { + } + + @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) + private String demandRecId; + + private String customerId; + private String currentUserId; + + + /** + * 网格id + */ + @NotBlank(message = "所属网格不能为空",groups = AddUserShowGroup.class) + private String gridId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + + + + /** + * 二级需求分类编码 + */ + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) + private String categoryCode; + + /** + * 父级需求分类编码 + */ + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) + private String parentCode; + + /** + * 需求内容1000字 + */ + @NotBlank(message = "需求内容不能为空",groups = AddUserShowGroup.class) + @Length(max = 1000,message = "需求内容至多输入1000字",groups = AddUserShowGroup.class) + private String content; + + /** + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + @NotBlank(message = "上报类型不能为空",groups = AddUserShowGroup.class) + private String reportType; + + /** + * 上报人姓名 + */ + @NotBlank(message = "上报人不能为空",groups = AddUserShowGroup.class) + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + @NotBlank(message = "上报人联系方式不能为空",groups = AddUserShowGroup.class) + private String reportUserMobile; + + /** + * 上报时间 + */ + @NotNull(message = "上报时间不能为空",groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date reportTime; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) + private String demandUserId; + + /** + * 需求人姓名 + */ + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) + private String demandUserName; + + /** + * 需求人联系电话 + */ + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) + private String demandUserMobile; + + /** + * 希望服务时间 + */ + @NotNull(message = "服务时间不能为空",groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date wantServiceTime; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java new file mode 100644 index 0000000000..7fdf7a29c5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java @@ -0,0 +1,10 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class DemandRecId implements Serializable { + private String demandRecId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java new file mode 100644 index 0000000000..8213529326 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class FinishStaffFromDTO implements Serializable { + private static final long serialVersionUID = 591380873862126679L; + + public interface AddUserInternalGroup { + } + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + @NotBlank(message = "需求id不能为空", groups = AddUserInternalGroup.class) + private String demandRecId; + + @NotBlank(message = "服务方不能为空", groups = AddUserShowGroup.class) + private String serverId; + + @NotNull(message = "实际服务开始不能为空", groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date serviceStartTime; + + @NotNull(message = "实际服务结束不能为空", groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date serviceEndTime; + + @NotBlank(message = "完成结果不能为空", groups = AddUserShowGroup.class) + private String finishResult; + private String finishDesc; + + @NotNull(message = "得分不能为空", groups = AddUserShowGroup.class) + private BigDecimal score; + + + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java new file mode 100644 index 0000000000..142b081d80 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java @@ -0,0 +1,44 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class ServiceQueryFormDTO implements Serializable { + private static final long serialVersionUID = -2738313255838176318L; + + public interface AddUserInternalGroup { + } + + public interface SocietyOrgInternalGroup { + } + + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + @NotBlank(message = "服务方类型不能为空", groups = AddUserInternalGroup.class) + private String serviceType; + + /** + * 名称检索 + */ + private String serviceName; + + /** + * 列表查询条件:query_demand 需求指派:add_demand + */ + @NotBlank(message = "新增需求:add_demand;列表查询:query_demand", groups = SocietyOrgInternalGroup.class) + private String queryPurpose; + + // -------------------------------------------------------- + // 以下参数从token中获取 + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String staffId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + private String demandRecId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java new file mode 100644 index 0000000000..09d920f55c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class StaffCancelFormDTO { + public interface AddUserInternalGroup {} + @NotBlank(message = "需求id不能为空",groups = AddUserInternalGroup.class) + private String demandRecId; + + @NotBlank(message = "userId不能为空", groups =AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java index 5fecd09258..d7952fd53a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java @@ -12,4 +12,6 @@ public class SubCodeFormDTO implements Serializable { private String customerId; @NotBlank(message = "parentCategoryCode不能为空",groups = AddUserInternalGroup.class) private String parentCategoryCode; + + private String categoryName; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java new file mode 100644 index 0000000000..265a88b5f1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -0,0 +1,83 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { + + private String customerId; + private String currentStaffId; + private String gridPids; + + + /** + * 网格id + */ + private String gridId; + + + + /** + * 分类的编码 + */ + private String categoryCode; + + /** + * 分类的级别 + */ + private Integer level; + + + + /** + * 需求人姓名 + */ + private String demandUserName; + + /** + * 上报时间开始 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date reportStartDate; + + /** + * 上报时间截止 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date reportEndDate; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + private String status; + + + + + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 服务方id + */ + private String serverId; + + /** + * 希望服务时间开始 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date wantServiceStartDate; + + /** + * 希望截止 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date wantServiceEndDate; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java new file mode 100644 index 0000000000..47b2c02df8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -0,0 +1,89 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/19 1:47 下午 + * @DESC + */ +@Data +public class CommunitySelfOrganizationListDTO implements Serializable { + + private static final long serialVersionUID = 3208034033470533749L; + + /** + * 排序 + */ + private Integer sort; + + /** + * 社区自组织人数 + */ + private Integer organizationPersonCount; + + /** + * 社区自组织名字 + */ + private String organizationName; + + /** + * 服务事项 + */ + private String serviceItem; + + /** + * 负责人 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 自组织创办时间 + */ + private String organizationCreatedTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 社区自组织ID + */ + private String orgId; + + /** + * 社区自组织人员 + */ + private List organizationPersonnel; + + public CommunitySelfOrganizationListDTO() { + this.sort = NumConstant.ZERO; + this.organizationPersonCount = NumConstant.ZERO; + this.organizationName = ""; + this.serviceItem = ""; + this.principalName = ""; + this.principalPhone = ""; + this.organizationCreatedTime = ""; + this.longitude = ""; + this.latitude = ""; + this.orgId = ""; + this.organizationPersonnel = new ArrayList<>(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java new file mode 100644 index 0000000000..c8cb3375fd --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/19 1:47 下午 + * @DESC + */ +@Data +public class CommunitySelfOrganizationListResultDTO implements Serializable { + + private static final long serialVersionUID = 3208034033470533749L; + + private Integer total; + + private List list; + + public CommunitySelfOrganizationListResultDTO() { + this.total = NumConstant.ZERO; + this.list = new ArrayList<>(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java index 1765350a6d..a7139bdc1d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java @@ -17,9 +17,11 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; +import java.util.Date; import java.util.List; /** @@ -34,7 +36,7 @@ public class GetListSocietyOrgResultDTO implements Serializable { //集合总条数 private Integer total; //社会组织信息 - private List list; + private List list; @Data public class SocietyOrgList{ @@ -51,9 +53,11 @@ public class GetListSocietyOrgResultDTO implements Serializable { //负责人电话 private String mobile; //起始服务时间 - private String serviceStartTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date serviceStartTime; //终止服务时间 - private String serviceEndTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date serviceEndTime; //绑定管理员[组织下Id录入的工作人员] private String adminStaffId; //绑定管理员[组织下录入的工作人员]姓名 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java new file mode 100644 index 0000000000..30b23d3ed6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 社会组织列表查询 + **/ +@Data +public class SocietyOrgListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //所属组织Id + private String agencyId; + //社会组织Id + private String societyId; + //社会组织名称 + private String societyName; + //服务事项 + private String serviceMatters; + //负责人姓名 + private String personInCharge; + //负责人电话 + private String mobile; + //起始服务时间 + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + //private Date serviceStartTime; + private String serviceStartTime; + //终止服务时间 + private String serviceEndTime; + //绑定管理员[组织下Id录入的工作人员] + private String adminStaffId; + //绑定管理员[组织下录入的工作人员]姓名 + private String adminStaffName = ""; + //地址 + private String address; + //经度 + private String longitude; + //维度 + private String dimension; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java new file mode 100644 index 0000000000..fd606dc31f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -0,0 +1,113 @@ +package com.epmet.dto.result.demand; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + + +@Data +public class DemandRecResultDTO implements Serializable { + private static final long serialVersionUID = 1140730681599839420L; + + private String demandRecId; + @JsonIgnore + private String gridId; + private String gridName; + + @JsonIgnore + private String categoryCode; + private String categoryName; + + + + //社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + private String reportType; + private String reportTypeName; + + private String content; + private String reportUserName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date reportTime; + private String demandUserId; + private String demandUser; + private String demandUserName; + private String demandUserMobile; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private String wantServiceTime; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + private String status; + private String statusName; + + /** + * 完成结果:已解决 resolved,未解决 unresolved + + */ + private String finishResult; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 + */ + private Boolean evaluateFlag; + /** + * 得分可为半星 + */ + private BigDecimal score; + + /** 服务情况********************************************************************/ + /** 服务情况********************************************************************/ + /** 服务情况********************************************************************/ + private String serviceId; + /** + * 志愿者的姓名 + * 社会组织名 + * 社区自组织的名字 + * 区域党建单位名称 + */ + private String serviceName; + /** + * 尹作梅(志愿者) + * XXX(社会组织) + * XXX(社区自组织) + * XXX(区域化党建单位) + */ + private String serviceShowName; + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 志愿者:居民端爱心互助的志愿者userId; + */ + private String serverId; + + /** + * 实际服务开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date serviceStartTime; + + /** + * 实际服务结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date serviceEndTime; + + /** + * 完成情况 + */ + private String finishDesc; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index b5b36b0ee1..648896a0c9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -82,6 +82,12 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + compile + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java new file mode 100644 index 0000000000..c28768b30f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java @@ -0,0 +1,53 @@ +package com.epmet.constant; + +public interface UserDemandConstant { + + + /** + * 小程序用户自己上报:mini_resi;居民信息录入的居民:ic_resi_user + */ + String MINI_RESI = "mini_resi"; + String IC_RESI_USER = "ic_resi_user"; + + /** + * 上报类型:社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + String COMMUNITY_REPORT="community"; + String BUILDING_CAPTION_REPORT="building_caption"; + String PARTY_REPORT="party"; + String SELF_HELP_REPORT="self_help"; + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + String PENDING = "pending"; + String CANCELED = "canceled"; + String ASSIGNED = "assigned"; + String HAVE_ORDER = "have_order"; + String FINISHED = "finished"; + + + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + String STAFF="staff"; + String RESI="resi"; + + + /** + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish;; + * 更新需求:update + */ + String CREATE="create"; + String UPDATE="update"; + String CANCEL="cancel"; + String ASSIGN="assign"; + String TAKE_ORDER="take_order"; + String FINISH="finish"; + +// 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + String VOLUNTEER="volunteer"; + String SOCIAL_ORG="social_org"; + String COMMUNITY_ORG="community_org"; + String PARTY_UNIT="party_unit"; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 3093b70b91..0a52e569ff 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -20,16 +20,21 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; import com.epmet.service.IcCommunitySelfOrganizationService; import org.springframework.beans.factory.annotation.Autowired; @@ -109,4 +114,59 @@ public class IcCommunitySelfOrganizationController { return new Result(); } + /** + * @Description 修改社区自组织 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/19 10:12 上午 + */ + @PostMapping("editcommunityselforganization") + public Result editCommunitySelfOrganization(@LoginUser TokenDto tokenDto, @RequestBody EditCommunitySelfOrganizationFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, EditCommunitySelfOrganizationFormDTO.EditCommunitySelfOrganizationForm.class); + icCommunitySelfOrganizationService.editCommunitySelfOrganization(tokenDto, formDTO); + return new Result(); + } + + /** + * @Description 查询社区自组织列表 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/19 1:59 下午 + */ + @PostMapping("communityselforganizationlist") + public Result communitySelfOrganizationList(@LoginUser TokenDto tokenDto,@RequestBody CommunitySelfOrganizationListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, CommunitySelfOrganizationListFormDTO.CommunitySelfOrganizationListForm.class); + return new Result().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO)); + } + + /** + * @Description 社区自组织删除 + * @param formDTO + * @author zxc + * @date 2021/11/19 4:22 下午 + */ + @PostMapping("delcommunityselforganization") + public Result delCommunitySelfOrganization(@RequestBody DelCommunitySelfOrganizationFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, DelCommunitySelfOrganizationFormDTO.DelCommunitySelfOrganizationForm.class); + icCommunitySelfOrganizationService.delCommunitySelfOrganization(formDTO); + return new Result(); + } + + /** + * 需求指派,选择社区自组织,调用此接口 + * 返回需求所属社区下的 组织 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("servicelist") + public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java similarity index 53% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 77fc0c7fc9..85fb59ec7b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -20,14 +20,13 @@ 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 com.epmet.dto.IcPartyActivityDTO; +import com.epmet.dto.form.PartyActivityFormDTO; +import com.epmet.excel.IcPartyActivityExcel; +import com.epmet.service.IcPartyActivityService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -37,58 +36,48 @@ import java.util.Map; /** - * 九小场所下组织管理 + * 联建活动 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 + * @since v1.0.0 2021-11-19 */ @RestController -@RequestMapping("placeorg") -public class PlaceOrgController { +@RequestMapping("icpartyactivity") +public class IcPartyActivityController { @Autowired - private PlaceOrgService placeOrgService; + private IcPartyActivityService icPartyActivityService; - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = placeOrgService.page(params); - return new Result>().ok(page); + @PostMapping("search") + public Result> page(@RequestBody PartyActivityFormDTO formDTO){ + PageData page = icPartyActivityService.search(formDTO); + 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("detail") + public Result get(@RequestBody IcPartyActivityDTO dto){ + IcPartyActivityDTO data = icPartyActivityService.get(dto.getId()); + return new Result().ok(data); } - @PostMapping - public Result save(@RequestBody PlaceOrgDTO dto){ + @PostMapping("save") + public Result save(@RequestBody IcPartyActivityDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - placeOrgService.save(dto); + icPartyActivityService.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); + @PostMapping("delete") + public Result delete(@RequestBody IcPartyActivityDTO dto){ + icPartyActivityService.delete(dto.getId()); 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); + List list = icPartyActivityService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyActivityExcel.class); } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java new file mode 100644 index 0000000000..3a8fcf0142 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +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.dto.IcPartyUnitDTO; +import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.excel.IcPartyUnitExcel; +import com.epmet.service.IcPartyUnitService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@RestController +@RequestMapping("icpartyunit") +public class IcPartyUnitController { + + @Autowired + private IcPartyUnitService icPartyUnitService; + + @PostMapping("list") + public Result> search(@RequestBody PartyUnitFormDTO formDTO){ + PageData page = icPartyUnitService.search(formDTO); + return new Result>().ok(page); + } + + @PostMapping("detail") + public Result get(@RequestBody IcPartyUnitDTO formDTO){ + AssertUtils.isBlank(formDTO.getId(), "id"); + IcPartyUnitDTO data = icPartyUnitService.get(formDTO.getId()); + return new Result().ok(data); + } + + @PostMapping("save") + public Result save(@RequestBody IcPartyUnitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartyUnitService.save(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody IcPartyUnitDTO dto){ + //效验数据 + AssertUtils.isBlank(dto.getId(), "id"); + icPartyUnitService.delete(dto.getId()); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPartyUnitService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartyUnitExcel.class); + } + + /** + * 需求指派,选择区域化党建单位,调用此接口 + * 返回需求所属组织线上的数据 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("servicelist") + public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icPartyUnitService.queryServiceList(formDTO)); + } + + @PostMapping("option") + public Result> option(@RequestBody IcPartyUnitDTO dto){ + AssertUtils.isBlank(dto.getAgencyId(), "agencyId"); + return new Result>().ok(icPartyUnitService.option(dto)); + } +} \ 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/IcSocietyOrgController.java similarity index 75% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index 7443423ece..0b97210715 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -24,14 +24,18 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; -import com.epmet.service.SocietyOrgService; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.service.IcSocietyOrgService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * 社会组织管理 @@ -41,10 +45,10 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("societyorg") -public class SocietyOrgController { +public class IcSocietyOrgController { @Autowired - private SocietyOrgService societyOrgService; + private IcSocietyOrgService societyOrgService; /** * @Author sun @@ -53,7 +57,7 @@ public class SocietyOrgController { @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddSocietyOrgFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddSocietyOrgFormDTO.Add.class); - formDTO.setCustomerId(tokenDto.getToken()); + formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); societyOrgService.add(formDTO); return new Result(); @@ -87,7 +91,21 @@ public class SocietyOrgController { **/ @PostMapping("getlist") public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(societyOrgService.getList(formDTO)); } + /** + * 需求指派,选择社会组织,调用此接口 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("servicelist") + public Result> queryServiceList(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class,ServiceQueryFormDTO.SocietyOrgInternalGroup.class); + return new Result>().ok(societyOrgService.queryServiceList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java new file mode 100644 index 0000000000..bc517fc654 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -0,0 +1,183 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constant.UserDemandConstant; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandRecResultDTO; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.service.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Slf4j +@RestController +@RequestMapping("userdemand") +public class IcUserDemandRecController { + + @Autowired + private IcUserDemandRecService icUserDemandRecService; + @Autowired + private VolunteerInfoService volunteerInfoService; + @Autowired + private IcSocietyOrgService societyOrgService; + @Autowired + private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService; + @Autowired + private IcPartyUnitService icPartyUnitService; + + + /** + * 根据服务方类型查询 下拉框 + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("servicelist") + public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, ServiceQueryFormDTO.AddUserInternalGroup.class); + if (UserDemandConstant.VOLUNTEER.equals(formDTO.getServiceType())) { + return new Result>().ok(volunteerInfoService.queryListVolunteer(tokenDto.getCustomerId(), formDTO.getServiceName())); + } else if (UserDemandConstant.SOCIAL_ORG.equals(formDTO.getServiceType())) { + ValidatorUtils.validateEntity(formDTO, ServiceQueryFormDTO.AddUserInternalGroup.class, ServiceQueryFormDTO.SocietyOrgInternalGroup.class); + return new Result>().ok(societyOrgService.queryServiceList(formDTO)); + } else if (UserDemandConstant.COMMUNITY_ORG.equals(formDTO.getServiceType())) { + return new Result>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO)); + } else if (UserDemandConstant.PARTY_UNIT.equals(formDTO.getServiceType())) { + return new Result>().ok(icPartyUnitService.queryServiceList(formDTO)); + } + return new Result<>(); + } + + /** + * 新增需求 + * + * @param tokenDto + * @param fromDTO + * @return + */ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){ + fromDTO.setCustomerId(tokenDto.getCustomerId()); + fromDTO.setCurrentUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.AddUserShowGroup.class); + return new Result().ok(icUserDemandRecService.add(fromDTO)); + } + + /** + * 更新需求 + * 只有待处理的才可以编辑 + * + * @param tokenDto + * @param fromDTO + * @return + */ + @PostMapping("update") + public Result update(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){ + fromDTO.setCustomerId(tokenDto.getCustomerId()); + fromDTO.setCurrentUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.UpdateInternalGroup.class,DemandAddFromDTO.AddUserShowGroup.class); + return new Result().ok(icUserDemandRecService.update(fromDTO)); + } + + /** + * 列表查询 分页 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("pagelist") + public Result> pageList(@LoginUser TokenDto tokenDto, @RequestBody UserDemandPageFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentStaffId(tokenDto.getUserId()); + return new Result>().ok(icUserDemandRecService.pageList(formDTO)); + } + + + /** + * 取消,未完成之前都可以取消 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("cancel") + public Result cancel(@LoginUser TokenDto tokenDto,@RequestBody StaffCancelFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,StaffCancelFormDTO.AddUserInternalGroup.class); + icUserDemandRecService.cancel(formDTO); + return new Result(); + } + + + /** + * 指派 + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + * 待处理+已派单才可以指派 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("assign") + public Result assign(@LoginUser TokenDto tokenDto,@RequestBody AssignFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,AssignFormDTO.AddUserShowGroup.class,AssignFormDTO.AddUserInternalGroup.class); + icUserDemandRecService.assign(formDTO); + return new Result(); + } + + /** + * 完成并评价 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("finish") + public Result finish(@LoginUser TokenDto tokenDto,@RequestBody FinishStaffFromDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,FinishStaffFromDTO.AddUserShowGroup.class,FinishStaffFromDTO.AddUserInternalGroup.class); + icUserDemandRecService.finish(formDTO); + return new Result(); + } +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java index 00a07440ca..e144e9c11f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java @@ -23,8 +23,10 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO; import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO; import com.epmet.service.VolunteerInfoService; import org.springframework.beans.factory.annotation.Autowired; @@ -112,4 +114,15 @@ public class ResiVolunteerController { public Result queryUserVolunteerInfo(@PathVariable("userId")String userId){ return new Result().ok(volunteerInfoService.queryUserVolunteerInfo(userId)); } + + /** + * 需求指派时,服务对象选择志愿者,调用此接口查询当前客户下所有的志愿者信息:姓名(手机号) + * + * @param tokenDto + * @return + */ + @PostMapping("listprofile") + public Result> queryListVolunteer(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){ + return new Result>().ok(volunteerInfoService.queryListVolunteer(tokenDto.getCustomerId(),formDTO.getServiceName())); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index c046cfe956..3fee0e0a71 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -18,8 +18,14 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 社区自组织表 @@ -29,5 +35,24 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcCommunitySelfOrganizationDao extends BaseDao { - + + /** + * @Description 自组织修改 + * @param formDTO + * @author zxc + * @date 2021/11/19 2:04 下午 + */ + void updateCommunitySelfOrganization(IcCommunitySelfOrganizationEntity formDTO); + + /** + * @Description 查询社区自组织列表 + * @param formDTO + * @author zxc + * @date 2021/11/19 2:05 下午 + */ + List selectCommunitySelfOrganizationList(CommunitySelfOrganizationListFormDTO formDTO); + + List selectListByAgencyId(@Param("customerId") String customerId, + @Param("agencyIds") List agencyIds, + @Param("orgName") String orgName); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java index 45a233840c..4bd2fde9f4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 社区自组织人员表 @@ -29,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcCommunitySelfOrganizationPersonnelDao extends BaseDao { - + + /** + * @Description 根据社区自组织ID删除 + * @param orgId + * @author zxc + * @date 2021/11/19 11:19 上午 + */ + void deleteByOrgId(@Param("orgId")String orgId); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java similarity index 84% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java index d25d485262..c596572fee 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java @@ -18,16 +18,16 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PlaceOrgEntity; +import com.epmet.entity.IcPartyActivityEntity; import org.apache.ibatis.annotations.Mapper; /** - * 九小场所下组织管理 + * 联建活动 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 + * @since v1.0.0 2021-11-19 */ @Mapper -public interface PlaceOrgDao extends BaseDao { +public interface IcPartyActivityDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java new file mode 100644 index 0000000000..caf1f6336c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.dto.result.demand.OptionDTO; +import com.epmet.entity.IcPartyUnitEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcPartyUnitDao extends BaseDao { + + /** + * 需求指派,选择区域化党建单位,调用此接口 + * @param agencyIds + * @param unitName + * @return + */ + List selectListByAgencyId(@Param("agencyIds") List agencyIds, + @Param("unitName") String unitName, + @Param("customerId")String customerId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java index d58dce2d8a..cf2625d680 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java @@ -41,7 +41,9 @@ public interface IcResiDemandDictDao extends BaseDao { String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set codeSet); - List selectByPCode(@Param("pcode") String pcode, @Param("customerId") String customerId); + List selectByPCode(@Param("pcode") String pcode, + @Param("customerId") String customerId, + @Param("categoryName")String categoryName); List pageSelect(@Param("customerId") String customerId, @Param("firstCategoryCode")String firstCategoryCode); @@ -60,4 +62,7 @@ public interface IcResiDemandDictDao extends BaseDao { Integer selectMaxSort(@Param("customerId") String customerId, @Param("level") int level, @Param("parentCode") String parentCode); + + List selectSecondCodes(@Param("customerId") String customerId, @Param("cateogryCodes") List categoryCodes); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java new file mode 100644 index 0000000000..2a435d7d9f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.SocietyOrgListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.entity.IcSocietyOrgEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 社会组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcSocietyOrgDao extends BaseDao { + + /** + * @Author sun + * @Description 社会组织列表查询 + **/ + List getList(GetListSocietyOrgFormDTO formDTO); + + /** + * 需求指派,选择社会组织,调用此接口 + * + * @param agencyIds + * @return + */ + List selectListByAgencyId(@Param("agencyIds")List agencyIds, + @Param("societyName")String societyName, + @Param("customerId")String customerId, + @Param("queryPurpose")String queryPurpose); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java similarity index 81% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java index 6253e7afd2..178e0482b9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java @@ -18,16 +18,16 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PlacePatrolReviewRecordEntity; +import com.epmet.entity.IcUserDemandOperateLogEntity; import org.apache.ibatis.annotations.Mapper; /** - * 场所巡查复查记录 + * 居民需求操作日志表 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 + * @since v1.0.0 2021-11-19 */ @Mapper -public interface PlacePatrolReviewRecordDao extends BaseDao { +public interface IcUserDemandOperateLogDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java new file mode 100644 index 0000000000..12bc2f68b4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.result.demand.DemandRecResultDTO; +import com.epmet.entity.IcUserDemandRecEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcUserDemandRecDao extends BaseDao { + + + List pageSelect(UserDemandPageFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java similarity index 81% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java index 7e19b451c1..4c32bc9045 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java @@ -18,16 +18,16 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PlacePatrolTeamEntity; +import com.epmet.entity.IcUserDemandSatisfactionEntity; import org.apache.ibatis.annotations.Mapper; /** - * 场所分队管理 + * 居民需求评价记录表 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 + * @since v1.0.0 2021-11-19 */ @Mapper -public interface PlacePatrolTeamDao extends BaseDao { +public interface IcUserDemandSatisfactionDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java new file mode 100644 index 0000000000..5f9adffb87 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserDemandServiceEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民需求服务记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Mapper +public interface IcUserDemandServiceDao extends BaseDao { + + IcUserDemandServiceEntity selectByRecId(String demandRecId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java new file mode 100644 index 0000000000..529bb4f34a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_activity") +public class IcPartyActivityEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 组织的所有上级 + */ + private String pids; + + /** + * 单位ID + */ + private String unitId; + + /** + * 服务事项 + */ + private String serviceMatter; + + /** + * 活动标题 + */ + private String title; + + /** + * 活动目标 + */ + private String target; + + /** + * 活动内容 + */ + private String content; + + /** + * 服务人数 + */ + private Integer peopleCount; + + /** + * 活动时间 + */ + private Date activityTime; + + /** + * 活动地址 + */ + private String address; + + /** + * 活动地址经度 + */ + private String longitude; + + /** + * 活动地址纬度 + */ + private String latitude; + + /** + * 活动结果 + */ + private String result; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java new file mode 100644 index 0000000000..f789736b80 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_unit") +public class IcPartyUnitEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * + */ + private String pids; + + /** + * 单位名称 + */ + private String unitName; + + /** + * 分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他 + */ + private String type; + + /** + * 服务事项 多选逗号隔开 + */ + private String serviceMatter; + + /** + * 联系人 + */ + private String contact; + + /** + * 联系电话 + */ + private String contactMobile; + + /** + * 在职党员数 + */ + private Integer memberCount; + + /** + * 地址 + */ + private String address; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + /** + * 群众满意度 + */ + private String satisfaction; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java similarity index 95% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java index 9c0d086929..3c564349cb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java @@ -33,8 +33,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("society_org") -public class SocietyOrgEntity extends BaseEpmetEntity { +@TableName("ic_society_org") +public class IcSocietyOrgEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java new file mode 100644 index 0000000000..9b6afa0aea --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.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-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_operate_log") +public class IcUserDemandOperateLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前操作用户id + */ + private String userId; + + /** + * 创建需求:create;撤销需求:cancel;指派:assign;接单:take_order;完成:finish; + */ + private String actionCode; + + /** + * 操作时间 + */ + private Date operateTime; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java new file mode 100644 index 0000000000..5979d780ed --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.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.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_rec") +public class IcUserDemandRecEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + /** + * 二级需求分类编码 + */ + private String categoryCode; + + /** + * 父级需求分类编码 + */ + private String parentCode; + + /** + * 需求内容1000字 + */ + private String content; + + /** + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + */ + private String reportType; + + /** + * 上报人姓名 + */ + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + private String reportUserMobile; + + /** + * 自身上报时存储居民端用户id + */ + private String reportUserId; + + /** + * 上报时间 + */ + private Date reportTime; + + /** + * 希望服务时间 + */ + private Date wantServiceTime; + + /** + * 小程序用户自己上报:mini_resi;居民信息录入的居民:ic_resi_user + */ + private String demandUserType; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + private String demandUserId; + + /** + * 需求人姓名 + */ + private String demandUserName; + + /** + * 需求人联系电话 + */ + private String demandUserMobile; + + /** + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + */ + private String status; + + /** + * 完成结果:已解决 resolved,未解决 unresolved + + */ + private String finishResult; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 + */ + private Boolean evaluateFlag; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java new file mode 100644 index 0000000000..bae8aaaff0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java @@ -0,0 +1,72 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 居民需求评价记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_satisfaction") +public class IcUserDemandSatisfactionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 当前操作用户属于哪个端?工作端:staff;居民端:resi + */ + private String userType; + + /** + * 当前评价用户id,可以是小程序里用户id,也可以是工作端帮忙录入需求的人 + */ + private String userId; + + /** + * 评价时间 + */ + private Date evaluateTime; + + /** + * 得分可为半星 + */ + private BigDecimal score; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java new file mode 100644 index 0000000000..b2b95ec5d4 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民需求服务记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_demand_service") +public class IcUserDemandServiceEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 需求id + */ + private String demandRecId; + + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 志愿者:居民端爱心互助的志愿者userId; + */ + private String serverId; + + /** + * 实际服务开始时间 + */ + private Date serviceStartTime; + + /** + * 实际服务结束时间 + */ + private Date serviceEndTime; + + /** + * 完成情况 + */ + private String finishDesc; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java new file mode 100644 index 0000000000..4dd9c4d87c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcPartyActivityExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "组织ID") + private String agencyId; + + @Excel(name = "组织的所有上级") + private String pids; + + @Excel(name = "单位ID") + private String unitId; + + @Excel(name = "服务事项") + private String serviceMatter; + + @Excel(name = "活动标题") + private String title; + + @Excel(name = "活动目标") + private String target; + + @Excel(name = "活动内容") + private String content; + + @Excel(name = "服务人数") + private Integer peopleCount; + + @Excel(name = "活动时间") + private Date activityTime; + + @Excel(name = "活动地址") + private String address; + + @Excel(name = "活动地址经度") + private String longitude; + + @Excel(name = "活动地址纬度") + private String latitude; + + @Excel(name = "活动结果") + private String result; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java new file mode 100644 index 0000000000..ace9eff6b0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Data +public class IcPartyUnitExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "组织ID") + private String agencyId; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "") + private String pids; + + @Excel(name = "单位名称") + private String unitName; + + @Excel(name = "分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他") + private String type; + + @Excel(name = "服务事项 多选逗号隔开") + private String serviceMatter; + + @Excel(name = "联系人") + private String contact; + + @Excel(name = "联系电话") + private String contactMobile; + + @Excel(name = "在职党员数") + private Integer memberCount; + + @Excel(name = "地址") + private String address; + + @Excel(name = "中心位置经度") + private String longitude; + + @Excel(name = "中心位置纬度") + private String latitude; + + @Excel(name = "群众满意度") + private String satisfaction; + + @Excel(name = "备注") + private String remark; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java similarity index 98% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java index af8ddbe4c1..4d9089fa35 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class SocietyOrgExcel { +public class IcSocietyOrgExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java new file mode 100644 index 0000000000..c2ead1498b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Component +public class IcPartyActivityRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java new file mode 100644 index 0000000000..83113e7903 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Component +public class IcPartyUnitRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java index c8265ba859..32d04687af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java @@ -92,4 +92,12 @@ public interface IcCommunitySelfOrganizationPersonnelService extends BaseService * @date 2021-11-18 */ void delete(String[] ids); + + /** + * @Description 根据社区自组织ID删除 + * @param orgId + * @author zxc + * @date 2021/11/19 11:18 上午 + */ + void deleteByOrgId(String orgId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 4133c7c103..d9b536b625 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -22,6 +22,12 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import java.util.List; @@ -103,4 +109,40 @@ public interface IcCommunitySelfOrganizationService extends BaseService queryServiceList(ServiceQueryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java similarity index 63% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java index ba728dcca2..def86c6c60 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java @@ -19,49 +19,50 @@ 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 com.epmet.dto.IcPartyActivityDTO; +import com.epmet.dto.form.PartyActivityFormDTO; +import com.epmet.entity.IcPartyActivityEntity; import java.util.List; import java.util.Map; /** - * 九小场所下组织管理 + * 联建活动 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 + * @since v1.0.0 2021-11-19 */ -public interface PlaceOrgService extends BaseService { +public interface IcPartyActivityService extends BaseService { /** * 默认分页 * - * @param params - * @return PageData + * @param formDTO + * @return PageData * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - PageData page(Map params); + PageData search(PartyActivityFormDTO formDTO); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return PlaceOrgDTO + * @return IcPartyActivityDTO * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - PlaceOrgDTO get(String id); + IcPartyActivityDTO get(String id); /** * 默认保存 @@ -69,19 +70,9 @@ public interface PlaceOrgService extends BaseService { * @param dto * @return void * @author generator - * @date 2021-11-18 - */ - void save(PlaceOrgDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - void update(PlaceOrgDTO dto); + void save(IcPartyActivityDTO dto); /** * 批量删除 @@ -89,7 +80,7 @@ public interface PlaceOrgService extends BaseService { * @param ids * @return void * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - void delete(String[] ids); + void delete(String id); } \ 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/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java similarity index 52% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index 55b983e348..de50d62319 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -19,49 +19,52 @@ 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 com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.entity.IcPartyUnitEntity; import java.util.List; import java.util.Map; /** - * 场所分队管理 + * 联建单位 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-11-18 + * @since v1.0.0 2021-11-19 */ -public interface PlacePatrolTeamService extends BaseService { +public interface IcPartyUnitService extends BaseService { /** * 默认分页 * - * @param params - * @return PageData + * @param formDTO + * @return PageData * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - PageData page(Map params); + PageData search(PartyUnitFormDTO formDTO); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return PlacePatrolTeamDTO + * @return IcPartyUnitDTO * @author generator - * @date 2021-11-18 + * @date 2021-11-19 */ - PlacePatrolTeamDTO get(String id); + IcPartyUnitDTO get(String id); /** * 默认保存 @@ -69,27 +72,37 @@ public interface PlacePatrolTeamService extends BaseService queryServiceList(ServiceQueryFormDTO formDTO); + + /** + * @Description 获取组织下单位列表 + * @Param dto + * @Return {@link List< OptionDTO>} + * @Author zhaoqifeng + * @Date 2021/11/22 14:35 */ - void delete(String[] ids); + List option(IcPartyUnitDTO dto); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java index 1df5be75af..3836539181 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java @@ -21,14 +21,12 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IcResiDemandDictDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.DemandPageResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcResiDemandDictEntity; import java.util.List; -import java.util.Map; /** * 居民需求字典表 @@ -42,7 +40,6 @@ public interface IcResiDemandDictService extends BaseService * @author generator * @date 2021-10-27 */ @@ -60,18 +57,6 @@ public interface IcResiDemandDictService extends BaseService - * @author generator - * @date 2021-10-27 - */ - List list(Map params); - - /** * 默认更新 * @@ -116,4 +101,12 @@ public interface IcResiDemandDictService extends BaseService listByCodes(String customerId, List categoryCodes); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java similarity index 79% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java index 2acaa20c05..f61eec5b94 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java @@ -21,8 +21,12 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; -import com.epmet.entity.SocietyOrgEntity; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.entity.IcSocietyOrgEntity; + +import java.util.List; /** * 社会组织管理 @@ -30,7 +34,7 @@ import com.epmet.entity.SocietyOrgEntity; * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ -public interface SocietyOrgService extends BaseService { +public interface IcSocietyOrgService extends BaseService { /** * @Author sun @@ -55,4 +59,11 @@ public interface SocietyOrgService extends BaseService { * @Description 社会组织列表查询 **/ GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO); + + /** + * 需求指派,选择社会组织,调用此接口 + * @param formDTO + * @return + */ + List queryServiceList(ServiceQueryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java new file mode 100644 index 0000000000..a0b3799d4e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -0,0 +1,130 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcUserDemandRecDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.demand.DemandRecResultDTO; +import com.epmet.entity.IcUserDemandRecEntity; + +import java.util.List; +import java.util.Map; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +public interface IcUserDemandRecService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcUserDemandRecDTO + * @author generator + * @date 2021-11-19 + */ + IcUserDemandRecDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + void save(IcUserDemandRecDTO dto); + + /** + * 更新需求 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-19 + */ + DemandRecId update(DemandAddFromDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-19 + */ + void delete(String[] ids); + + /** + * 新增需求 + * + * @param fromDTO + * @return + */ + DemandRecId add(DemandAddFromDTO fromDTO); + + PageData pageList(UserDemandPageFormDTO formDTO); + + /** + * 未完成之前都可以取消 + * + * @param formDTO + */ + void cancel(StaffCancelFormDTO formDTO); + + /** + * 指派 + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + * 待处理+已派单才可以指派 + * + * @param formDTO + * @return + */ + void assign(AssignFormDTO formDTO); + + /** + * 完成并评价 + * @param formDTO + */ + void finish(FinishStaffFromDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java index 53ac849cb8..850c4367de 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java @@ -24,6 +24,7 @@ import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO; import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO; import com.epmet.entity.VolunteerInfoEntity; @@ -84,4 +85,13 @@ public interface VolunteerInfoService extends BaseService { * @return com.epmet.dto.VolunteerInfoDTO */ VolunteerInfoDTO queryUserVolunteerInfo(String userId); + + /** + * label: 张三(15764229697) + * value:userId + * + * @param customerId + * @return + */ + List queryListVolunteer(String customerId,String userRealName); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java index 197cfc1d86..15b759def7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java @@ -97,4 +97,16 @@ public class IcCommunitySelfOrganizationPersonnelServiceImpl extends BaseService baseDao.deleteBatchIds(Arrays.asList(ids)); } + /** + * @Description 根据社区自组织ID删除 + * @param orgId + * @author zxc + * @date 2021/11/19 11:19 上午 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void deleteByOrgId(String orgId) { + baseDao.deleteByOrgId(orgId); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 055a07533b..402d184668 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -1,9 +1,15 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; @@ -11,27 +17,34 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.validator.PhoneValidatorUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IcCommunitySelfOrganizationConstant; import com.epmet.dao.IcCommunitySelfOrganizationDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; import com.epmet.service.IcCommunitySelfOrganizationService; +import com.epmet.service.IcUserDemandRecService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.xml.crypto.Data; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; + +import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN; /** * 社区自组织表 @@ -44,6 +57,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl page(Map params) { @@ -107,6 +122,14 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); + l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) + .eq(IcCommunitySelfOrganizationEntity::getCustomerId,customerId) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO); + IcCommunitySelfOrganizationEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_REPART_ERROR.getCode()); + } CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); if (null == staffInfo){ throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); @@ -139,4 +162,105 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); + l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) + .eq(IcCommunitySelfOrganizationEntity::getCustomerId,tokenDto.getCustomerId()) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO) + .ne(BaseEpmetEntity::getId,formDTO.getOrgId()); + IcCommunitySelfOrganizationEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_REPART_ERROR.getCode()); + } + IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(formDTO, IcCommunitySelfOrganizationEntity.class); + e.setOrganizationCreatedTime(DateUtils.stringToDate(formDTO.getOrganizationCreatedTime(),DATE_PATTERN)); + e.setUpdatedBy(tokenDto.getUserId()); + baseDao.updateCommunitySelfOrganization(e); + personnelService.deleteByOrgId(formDTO.getOrgId()); + if (CollectionUtils.isNotEmpty(formDTO.getOrganizationPersonnel())){ + List persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class); + persons.forEach(p -> { + p.setOrgId(formDTO.getOrgId()); + p.setCustomerId(tokenDto.getCustomerId()); + }); + personnelService.insertBatch(persons); + } + } + + /** + * @Description 查询社区自组织列表 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2021/11/19 1:59 下午 + */ + @Override + public CommunitySelfOrganizationListResultDTO communitySelfOrganizationList(TokenDto tokenDto, CommunitySelfOrganizationListFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + final int[] i = {(formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize() + NumConstant.ONE}; + CommunitySelfOrganizationListResultDTO result = new CommunitySelfOrganizationListResultDTO(); + PageInfo objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); + result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); + if (CollectionUtils.isNotEmpty(objectPageInfo.getList())){ + objectPageInfo.getList().forEach(l -> { + l.setSort(i[NumConstant.ZERO]); + i[NumConstant.ZERO]++; + }); + result.setList(objectPageInfo.getList()); + } + return result; + } + + /** + * @Description 社区自组织删除 + * 社区自组织表逻辑删,社区自组织人员表物理删 + * @param formDTO + * @author zxc + * @date 2021/11/19 4:22 下午 + */ + @Override + public void delCommunitySelfOrganization(DelCommunitySelfOrganizationFormDTO formDTO) { + baseDao.deleteById(formDTO.getOrgId()); + personnelService.deleteByOrgId(formDTO.getOrgId()); + } + + /** + * 需求指派,选择社区自组织,调用此接口 + * 返回需求所属社区下的 组织 + * + * @param formDTO + * @return + */ + @Override + public List queryServiceList(ServiceQueryFormDTO formDTO) { + List resultList=new ArrayList<>(); + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { + throw new RenException("工作人员所属组织信息查询异常"); + } + List agencyIds=new ArrayList<>(); + if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { + if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){ + agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); + } + } + agencyIds.add(staffInfoCacheResult.getAgencyId()); + resultList=baseDao.selectListByAgencyId(formDTO.getCustomerId(),agencyIds,formDTO.getServiceName()); + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java new file mode 100644 index 0000000000..bbf89dc290 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -0,0 +1,127 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcPartyActivityDao; +import com.epmet.dto.IcPartyActivityDTO; +import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.form.PartyActivityFormDTO; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.entity.IcPartyActivityEntity; +import com.epmet.service.IcPartyActivityService; +import com.epmet.service.IcPartyUnitService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 联建活动 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Service +public class IcPartyActivityServiceImpl extends BaseServiceImpl implements IcPartyActivityService { + + @Resource + private IcPartyUnitService icPartyUnitService; + + @Override + public PageData search(PartyActivityFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcPartyActivityEntity::getUnitId, formDTO.getUnitId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyActivityEntity::getServiceMatter, formDTO.getServiceMatter()); + wrapper.like(StringUtils.isNotBlank(formDTO.getTitle()), IcPartyActivityEntity::getTitle, formDTO.getTitle()); + wrapper.between(IcPartyActivityEntity::getActivityTime, formDTO.getStartTime(), formDTO.getEndTime()); + wrapper.orderByDesc(IcPartyActivityEntity::getUpdatedTime); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartyActivityDTO.class); + + IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); + unitDTO.setAgencyId(formDTO.getAgencyId()); + if (CollectionUtils.isNotEmpty(dtoList)) { + Map option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + dtoList.forEach(dto -> { + dto.setUnitName(option.get(dto.getUnitId())); + }); + } + PageInfo pageInfo = new PageInfo<>(dtoList); + return new PageData<>(dtoList, pageInfo.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyActivityDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPartyActivityDTO get(String id) { + IcPartyActivityEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyActivityDTO dto) { + IcPartyActivityEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyActivityEntity.class); + AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(entity.getAgencyId()); + entity.setPids(agency.getPids()); + if(StringUtils.isBlank(entity.getId())) { + insert(entity); + } else { + updateById(entity); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String id) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteById(id); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java new file mode 100644 index 0000000000..7de26379e3 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -0,0 +1,189 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.enums.DictTypeEnum; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.IcPartyUnitDao; +import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.IcUserDemandRecDTO; +import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.entity.IcPartyUnitEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.service.IcPartyUnitService; +import com.epmet.service.IcUserDemandRecService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 联建单位 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Service +public class IcPartyUnitServiceImpl extends BaseServiceImpl implements IcPartyUnitService { + + @Resource + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + @Autowired + private IcUserDemandRecService icUserDemandRecService; + + + @Override + public PageData search(PartyUnitFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getType()), IcPartyUnitEntity::getType, formDTO.getType()); + wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact()); + wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); + wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); + Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); + dtoList.forEach(item -> { + item.setType(unitTypeMap.getData().get(item.getType())); + //TODO 服务事项 + if (StringUtils.isNotBlank(item.getServiceMatter())) { + List matters = Arrays.asList(item.getServiceMatter().split(StrConstant.COMMA)); + } + }); + PageInfo pageInfo = new PageInfo<>(dtoList); + return new PageData<>(dtoList, pageInfo.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartyUnitDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPartyUnitDTO get(String id) { + IcPartyUnitEntity entity = baseDao.selectById(id); + IcPartyUnitDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyUnitDTO.class); + if (StringUtils.isNotBlank(dto.getServiceMatter())) { + dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); + } + return ConvertUtils.sourceToTarget(entity, IcPartyUnitDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartyUnitDTO dto) { + IcPartyUnitEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitEntity.class); + AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(entity.getAgencyId()); + entity.setPids(agency.getPids()); + if(StringUtils.isBlank(entity.getId())) { + insert(entity); + } else { + updateById(entity); + } + } + + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String id) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteById(id); + } + + /** + * 需求指派,选择区域化党建单位,调用此接口 + * 返回需求所属组织线上的数据 + * + * @param formDTO + * @return + */ + @Override + public List queryServiceList(ServiceQueryFormDTO formDTO) { + List resultList=new ArrayList<>(); + IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); + if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ + return resultList; + } + List agencyIds=new ArrayList<>(); + if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ + agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); + }else{ + agencyIds.add(icUserDemandRecDTO.getGridPids()); + } + resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); + return resultList; + } + + /** + * @Description 获取组织下单位列表 + * @param dto + * @Return {@link List< OptionDTO>} + * @Author zhaoqifeng + * @Date 2021/11/22 14:35 + */ + @Override + public List option(IcPartyUnitDTO dto) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()); + wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); + wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionDTO option = new OptionDTO(); + option.setValue(item.getId()); + option.setLabel(item.getUnitName()); + return option; + }).collect(Collectors.toList()); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index fd30b41bd3..4fd9a2b193 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -25,10 +25,8 @@ 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.*; import com.epmet.dto.result.demand.DemandPageResDTO; import com.epmet.dto.result.demand.OptionDTO; @@ -99,6 +97,9 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl NumConstant.ZERO) { // 名称唯一 throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg()); @@ -132,16 +133,6 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, IcResiDemandDictDTO.class); - } - private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); @@ -200,7 +191,7 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl querySubCodeList(SubCodeFormDTO formDTO) { - return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId()); + return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId(),formDTO.getCategoryName()); } @Override @@ -224,5 +215,17 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl listByCodes(String customerId, List categoryCodes) { + return baseDao.selectSecondCodes(customerId,categoryCodes); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java similarity index 65% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java rename to epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index b2cb48717c..2376a88150 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -19,25 +19,29 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dao.SocietyOrgDao; -import com.epmet.dto.ProjectStaffDTO; +import com.epmet.dao.IcSocietyOrgDao; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.form.UserIdsFormDTO; +import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.SocietyOrgListResultDTO; import com.epmet.dto.result.StaffSinGridResultDTO; -import com.epmet.entity.ActInfoEntity; -import com.epmet.entity.SocietyOrgEntity; +import com.epmet.dto.result.demand.OptionDTO; +import com.epmet.entity.IcSocietyOrgEntity; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.service.SocietyOrgService; +import com.epmet.service.IcSocietyOrgService; +import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -46,6 +50,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @@ -56,11 +61,12 @@ import java.util.stream.Collectors; * @since v1.0.0 2021-11-18 */ @Service -public class SocietyOrgServiceImpl extends BaseServiceImpl implements SocietyOrgService { - private static final Logger log = LoggerFactory.getLogger(SocietyOrgServiceImpl.class); +public class IcSocietyOrgServiceImpl extends BaseServiceImpl implements IcSocietyOrgService { + private static final Logger log = LoggerFactory.getLogger(IcSocietyOrgServiceImpl.class); @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; - + @Autowired + private IcUserDemandRecService icUserDemandRecService; /** * @Author sun @@ -69,8 +75,9 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl%s", formDTO.getSocietyId())); } - entity = ConvertUtils.sourceToTarget(formDTO, SocietyOrgEntity.class); + entity = ConvertUtils.sourceToTarget(formDTO, IcSocietyOrgEntity.class); + entity.setId(formDTO.getSocietyId()); baseDao.updateById(entity); } @@ -108,7 +116,7 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl result = + PageInfo result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO)); if (CollectionUtils.isEmpty(result.getList())) { return resultDTO; @@ -116,7 +124,7 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl staffIdList = result.getList().stream().map(GetListSocietyOrgResultDTO.SocietyOrgList::getAdminStaffId).collect(Collectors.toList()); + List staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList()); staffIdList = staffIdList.stream().distinct().collect(Collectors.toList()); dto.setUserIds(staffIdList); Result> listResult = epmetUserOpenFeignClient.getStaffInfoList(dto); @@ -129,4 +137,28 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl queryServiceList(ServiceQueryFormDTO formDTO) { + List resultList = new ArrayList<>(); + CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { + throw new RenException("工作人员所属组织信息查询异常"); + } + List agencyIds = new ArrayList<>(); + if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { + if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) { + agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); + } + } + agencyIds.add(staffInfoCacheResult.getAgencyId()); + resultList = baseDao.selectListByAgencyId(agencyIds, formDTO.getServiceName(), formDTO.getCustomerId(), formDTO.getQueryPurpose()); + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java new file mode 100644 index 0000000000..6b2e6de95d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -0,0 +1,440 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.constant.StrConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.UserDemandConstant; +import com.epmet.dao.IcUserDemandOperateLogDao; +import com.epmet.dao.IcUserDemandRecDao; +import com.epmet.dao.IcUserDemandSatisfactionDao; +import com.epmet.dao.IcUserDemandServiceDao; +import com.epmet.dto.CustomerGridDTO; +import com.epmet.dto.IcUserDemandRecDTO; +import com.epmet.dto.form.CustomerGridFormDTO; +import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.AllGridsByUserIdResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.dto.result.demand.DemandRecResultDTO; +import com.epmet.entity.*; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.service.IcResiDemandDictService; +import com.epmet.service.IcUserDemandRecService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 居民需求记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-19 + */ +@Service +public class IcUserDemandRecServiceImpl extends BaseServiceImpl implements IcUserDemandRecService { + @Autowired + private IcUserDemandOperateLogDao operateLogDao; + @Autowired + private IcUserDemandServiceDao demandServiceDao; + @Autowired + private IcUserDemandSatisfactionDao demandSatisfactionDao; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private IcResiDemandDictService demandDictService; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcUserDemandRecDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcUserDemandRecDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcUserDemandRecDTO get(String id) { + IcUserDemandRecEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcUserDemandRecDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcUserDemandRecDTO dto) { + IcUserDemandRecEntity entity = ConvertUtils.sourceToTarget(dto, IcUserDemandRecEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public DemandRecId update(DemandAddFromDTO dto) { + IcUserDemandRecEntity origin = baseDao.selectById(dto.getDemandRecId()); + if (null == origin) { + throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); + } + if(!UserDemandConstant.PENDING.equals(origin.getStatus())){ + //待处理的才可以修改需求 + throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_UPDATE.getCode(),EpmetErrorCode.DEMAND_CAN_NOT_UPDATE.getMsg()); + } + CustomerGridFormDTO customerGridFormDTO=new CustomerGridFormDTO(); + customerGridFormDTO.setGridId(dto.getGridId()); + Result gridInfoRes=govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO); + if(!gridInfoRes.success()||null==gridInfoRes.getData()){ + throw new RenException("查询网格信息失败"); + } + IcUserDemandRecEntity updateEntity=ConvertUtils.sourceToTarget(dto,IcUserDemandRecEntity.class); + updateEntity.setAgencyId(gridInfoRes.getData().getPid()); + updateEntity.setGridPids(gridInfoRes.getData().getPids()); + updateEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER); + updateEntity.setStatus(UserDemandConstant.PENDING); + updateEntity.setEvaluateFlag(false); + updateEntity.setId(dto.getDemandRecId()); + baseDao.updateById(updateEntity); + + IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(dto.getCustomerId()); + logEntity.setDemandRecId(dto.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(dto.getCurrentUserId()); + logEntity.setActionCode(UserDemandConstant.UPDATE); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + DemandRecId resultDto=new DemandRecId(); + resultDto.setDemandRecId(updateEntity.getId()); + return resultDto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 新增需求 + * + * @param fromDTO + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public DemandRecId add(DemandAddFromDTO fromDTO) { + CustomerGridFormDTO customerGridFormDTO=new CustomerGridFormDTO(); + customerGridFormDTO.setGridId(fromDTO.getGridId()); + Result gridInfoRes=govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO); + if(!gridInfoRes.success()||null==gridInfoRes.getData()){ + throw new RenException("查询网格信息失败"); + } + IcUserDemandRecEntity insertEntity=ConvertUtils.sourceToTarget(fromDTO,IcUserDemandRecEntity.class); + insertEntity.setAgencyId(gridInfoRes.getData().getPid()); + insertEntity.setGridPids(gridInfoRes.getData().getPids()); + insertEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER); + insertEntity.setStatus(UserDemandConstant.PENDING); + insertEntity.setEvaluateFlag(false); + baseDao.insert(insertEntity); + IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(fromDTO.getCustomerId()); + logEntity.setDemandRecId(insertEntity.getId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(fromDTO.getCurrentUserId()); + logEntity.setActionCode(UserDemandConstant.CREATE); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + DemandRecId resultDto=new DemandRecId(); + resultDto.setDemandRecId(insertEntity.getId()); + return resultDto; + } + + @Override + public PageData pageList(UserDemandPageFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getCurrentStaffId()); + if (null == staffInfo) { + throw new RenException("工作人员所属组织信息查询异常"); + } + if (StringUtils.isBlank(staffInfo.getAgencyPIds())) { + formDTO.setGridPids(staffInfo.getAgencyId()); + } else { + if (staffInfo.getAgencyPIds().contains(StrConstant.COLON)) { + formDTO.setGridPids(staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId())); + } + } + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO)); + List list=pageInfo.getList(); + if(CollectionUtils.isNotEmpty(list)){ + //1、查询网格信息 + List gridIds=list.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList()); + Result> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds); + List gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); + Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity())); + + //2、查询分类名称 + List categoryCodes=list.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList()); + List dictList=demandDictService.listByCodes(formDTO.getCustomerId(),categoryCodes); + Map dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName)); + + //3、查询志愿者 + // 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + Map userInfoMap=new HashMap<>(); + List userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toList()); + if(CollectionUtils.isNotEmpty(userIdList)){ + Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ + throw new RenException("查询志愿者信息异常"); + } + userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName)); + } + for(DemandRecResultDTO res:list){ + if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) { + res.setGridName(gridInfoMap.get(res.getGridId()).getGridName()); + } + + if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) { + res.setCategoryName(dictMap.get(res.getCategoryCode())); + } + + if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) { + res.setServiceName(userInfoMap.get(res.getServerId())); + } + //社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + switch(res.getReportType()){ + case UserDemandConstant.COMMUNITY_REPORT : + res.setReportTypeName("社区帮办"); + break; + case UserDemandConstant.BUILDING_CAPTION_REPORT : + res.setReportTypeName("楼长帮办"); + break; + case UserDemandConstant.PARTY_REPORT : + res.setReportTypeName("党员帮办"); + break; + case UserDemandConstant.SELF_HELP_REPORT : + res.setReportTypeName("自身上报"); + break; + } + //待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + switch(res.getStatus()){ + case UserDemandConstant.PENDING : + res.setStatusName("待处理"); + break; + case UserDemandConstant.CANCELED : + res.setStatusName("已取消"); + break; + case UserDemandConstant.ASSIGNED : + res.setStatusName("已指派"); + break; + case UserDemandConstant.HAVE_ORDER : + res.setStatusName("已接单"); + break; + case UserDemandConstant.FINISHED : + res.setStatusName("已完成"); + break; + } + //服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + switch(res.getServiceType()){ + case UserDemandConstant.VOLUNTEER : + res.setServiceShowName(res.getServiceName().concat("(志愿者)")); + break; + case UserDemandConstant.SOCIAL_ORG : + res.setServiceShowName(res.getServiceName().concat("(社会组织)")); + break; + case UserDemandConstant.COMMUNITY_ORG : + res.setServiceShowName(res.getServiceName().concat("(社区自组织")); + break; + case UserDemandConstant.PARTY_UNIT : + res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)")); + break; + } + } + } + return new PageData<>(list, pageInfo.getTotal()); + } + + /** + * 未完成之前都可以取消 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void cancel(StaffCancelFormDTO formDTO) { + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity) { + throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); + } + if (UserDemandConstant.FINISH.equals(entity.getStatus())) { + //需求已完成,不可取消 + throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getCode(),EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getMsg()); + } + //1、修改主表 + //置为取消状态、设置取消时间 + entity.setStatus(UserDemandConstant.CANCELED); + entity.setCancelTime(new Date()); + baseDao.updateById(entity); + //2、插入操作日志 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setActionCode(UserDemandConstant.CANCEL); + logEntity.setOperateTime(entity.getCancelTime()); + operateLogDao.insert(logEntity); + } + + /** + * 指派 + * 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + * 待处理+已派单才可以指派 + * + * @param formDTO + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void assign(AssignFormDTO formDTO) { + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity) { + throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); + } + if (!UserDemandConstant.PENDING.equals(entity.getStatus()) && !UserDemandConstant.ASSIGNED.equals(entity.getStatus())) { + //待处理+已派单才可以指派 + throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_ASSIGN.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_ASSIGN.getMsg()); + } + //1、修改主表 + //置为已派单 + entity.setStatus(UserDemandConstant.ASSIGNED); + baseDao.updateById(entity); + //2、插入操作日志 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setActionCode(UserDemandConstant.ASSIGN); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + //3、插入或更新服务记录 + IcUserDemandServiceEntity serviceEntity=ConvertUtils.sourceToTarget(formDTO,IcUserDemandServiceEntity.class); + IcUserDemandServiceEntity origin=demandServiceDao.selectByRecId(formDTO.getDemandRecId()); + if (null == origin) { + demandServiceDao.insert(serviceEntity); + }else{ + serviceEntity.setId(origin.getId()); + serviceEntity.setUpdatedBy(formDTO.getUserId()); + demandServiceDao.updateById(serviceEntity); + } + + } + + /** + * 完成并评价 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void finish(FinishStaffFromDTO formDTO) { + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity) { + throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); + } + if (UserDemandConstant.PENDING.equals(entity.getStatus()) ||UserDemandConstant.CANCELED.equals(entity.getStatus())) { + //待处理或者已取消的不能评价 + throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getMsg()); + } + if(UserDemandConstant.FINISHED.equals(entity.getStatus()) ){ + //已经完成 + throw new RenException(EpmetErrorCode.DEMAND_FINISHED.getCode(), EpmetErrorCode.DEMAND_FINISHED.getMsg()); + } + //1、修改主表 + entity.setStatus(UserDemandConstant.FINISHED); + entity.setFinishResult(formDTO.getFinishResult()); + entity.setEvaluateFlag(true); + baseDao.updateById(entity); + + //2、插入操作日志 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType(UserDemandConstant.STAFF); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setActionCode(UserDemandConstant.FINISH); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + + //3、更新服务记录 + IcUserDemandServiceEntity serviceEntity=demandServiceDao.selectById(formDTO.getServerId()); + if(null==serviceEntity){ + throw new RenException(EpmetErrorCode.DEMAND_SERVICE_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_SERVICE_NOT_EXITS.getMsg()); + } + serviceEntity.setServiceStartTime(formDTO.getServiceStartTime()); + serviceEntity.setServiceEndTime(formDTO.getServiceEndTime()); + serviceEntity.setFinishDesc(formDTO.getFinishDesc()); + demandServiceDao.updateById(serviceEntity); + + //4、插入评价 + IcUserDemandSatisfactionEntity satisfactionEntity=new IcUserDemandSatisfactionEntity(); + satisfactionEntity.setCustomerId(formDTO.getCustomerId()); + satisfactionEntity.setDemandRecId(formDTO.getDemandRecId()); + satisfactionEntity.setUserType(UserDemandConstant.STAFF); + satisfactionEntity.setUserId(formDTO.getUserId()); + satisfactionEntity.setEvaluateTime(logEntity.getOperateTime()); + satisfactionEntity.setScore(formDTO.getScore()); + demandSatisfactionDao.insert(satisfactionEntity); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 71b318ba0a..a0ac541131 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -42,12 +42,16 @@ import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO; import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO; import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.SendVerificationCodeResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO; import com.epmet.entity.VolunteerInfoEntity; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.HeartUserInfoService; import com.epmet.service.VolunteerInfoService; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -56,6 +60,9 @@ import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; /** * 志愿者信息 @@ -220,4 +227,35 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl queryListVolunteer(String customerId, String userRealName) { + List resultList = new ArrayList<>(); + List userIds = baseDao.selectVolunteerIds(customerId); + if (CollectionUtils.isEmpty(userIds)) { + return resultList; + } + Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); + if (userInfoRes.success() && CollectionUtils.isNotEmpty(userInfoRes.getData())) { + Map userMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, Function.identity())); + for (String userId : userIds) { + if (userMap.containsKey(userId)) { + if (StringUtils.isNoneBlank(userRealName)) { + if (userMap.get(userId).getRealName().contains(userRealName)) { + OptionDTO optionDTO = new OptionDTO(); + optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); + optionDTO.setValue(userId); + resultList.add(optionDTO); + } + } else { + OptionDTO optionDTO = new OptionDTO(); + optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")"))); + optionDTO.setValue(userId); + resultList.add(optionDTO); + } + } + } + } + return resultList; + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 12c22d2fa6..b893795104 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -3,4 +3,86 @@ + + + UPDATE ic_community_self_organization + SET ORGANIZATION_NAME = #{organizationName}, + ORGANIZATION_PERSON_COUNT = #{organizationPersonCount}, + PRINCIPAL_NAME = #{principalName}, + PRINCIPAL_PHONE = #{principalPhone}, + SERVICE_ITEM = #{serviceItem}, + LONGITUDE = #{longitude}, + LATITUDE = #{latitude}, + ORGANIZATION_CREATED_TIME = #{organizationCreatedTime}, + UPDATED_TIME = NOW(), + UPDATED_BY = #{updatedBy} + WHERE DEL_FLAG = 0 + AND ID = #{orgId} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml index 91cf453a04..f3b365f739 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml @@ -3,4 +3,8 @@ + + + DELETE FROM ic_community_self_organization_personnel WHERE ORG_ID = #{orgId} + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml new file mode 100644 index 0000000000..fd84685f0e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml new file mode 100644 index 0000000000..a346765fd8 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index d9b7adb0ac..f0917a69af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -84,6 +84,9 @@ m.DEL_FLAG = '0' AND m.CUSTOMER_ID = #{customerId} and m.PARENT_CODE = #{pcode} + + and m.category_name like concat('%',#{categoryName},'%') + order by m.sort asc @@ -194,4 +197,24 @@ and m.parent_code=#{parentCode} + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml new file mode 100644 index 0000000000..4c91e2e3e7 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml @@ -0,0 +1,65 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml new file mode 100644 index 0000000000..0d1b2c9f14 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml new file mode 100644 index 0000000000..7fd7542258 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml new file mode 100644 index 0000000000..08d7883eb1 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml new file mode 100644 index 0000000000..219f457444 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ 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 deleted file mode 100644 index e2bac86f4b..0000000000 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml index d4bd179a9d..4dc80881f2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml @@ -69,9 +69,10 @@ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java similarity index 97% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java index bc61f843e8..f836ce406f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlaceOrgDTO implements Serializable { +public class IcPlaceOrgDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java similarity index 96% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java index 592ff13956..519ec4f1a4 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolRecordDTO implements Serializable { +public class IcPlacePatrolRecordDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -61,7 +61,7 @@ public class PlacePatrolRecordDTO implements Serializable { /** * 场所类型【admin库sys_dict_data表九小场所value值】 */ - private String ninePlacsVal; + private String ninePlaceVal; /** * 场所下的组织Id diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java similarity index 96% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java index dbc2160e45..d93e3928c7 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolReviewRecordDTO implements Serializable { +public class IcPlacePatrolReviewRecordDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java similarity index 96% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java index b80cd8509b..7e4531f0a4 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamDTO implements Serializable { +public class IcPlacePatrolTeamDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -61,7 +61,7 @@ public class PlacePatrolTeamDTO implements Serializable { /** * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 */ - private String ninePlacsVals; + private String ninePlaceVals; /** * 分队名称 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java similarity index 96% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java index 48f69a5c4a..36eb03ac3a 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java @@ -29,7 +29,7 @@ import lombok.Data; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamStaffDTO implements Serializable { +public class IcPlacePatrolTeamStaffDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java new file mode 100644 index 0000000000..21c56927e2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:41 下午 + * @DESC + */ +@Data +public class MatterListDTO implements Serializable { + + private static final long serialVersionUID = 493404409015559029L; + + private Integer sort; + + /** + * 事项名 + */ + private String matterName; + + /** + * 事项ID + */ + private String matterId; + + /** + * 可预约时间 + */ + private String allowTime; + + public MatterListDTO() { + this.sort = NumConstant.ZERO; + this.matterName = ""; + this.matterId = ""; + this.allowTime = ""; + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java new file mode 100644 index 0000000000..00b01c30fe --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 3:56 下午 + * @DESC + */ +@Data +public class TimeDTO implements Serializable { + + private static final long serialVersionUID = -3290964095027429971L; + + private String timeId; + + private Boolean isAppointment = true; + + private String time; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPartyServiceCenterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPartyServiceCenterFormDTO.java new file mode 100644 index 0000000000..2c122705c7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPartyServiceCenterFormDTO.java @@ -0,0 +1,80 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/22 9:05 上午 + * @DESC + */ +@Data +public class AddPartyServiceCenterFormDTO implements Serializable { + + private static final long serialVersionUID = -230856877756036529L; + + public interface AddPartyServiceCenterForm{} + + /** + * 中心名称 + */ + @NotBlank(message = "centerName不能为空",groups = AddPartyServiceCenterForm.class) + private String centerName; + + /** + * 社区地址 + */ + @NotBlank(message = "address不能为空",groups = AddPartyServiceCenterForm.class) + private String address; + + /** + * 办公电话 + */ + @NotBlank(message = "workPhone不能为空",groups = AddPartyServiceCenterForm.class) + private String workPhone; + + /** + * 上午开始时间 + */ + @NotBlank(message = "amStartTime不能为空",groups = AddPartyServiceCenterForm.class) + private String amStartTime; + + /** + * 上午结束时间 + */ + @NotBlank(message = "amEndTime不能为空",groups = AddPartyServiceCenterForm.class) + private String amEndTime; + + /** + * 下午开始时间 + */ + @NotBlank(message = "pmStartTime不能为空",groups = AddPartyServiceCenterForm.class) + private String pmStartTime; + + /** + * 下午结束时间 + */ + @NotBlank(message = "pmEndTime不能为空",groups = AddPartyServiceCenterForm.class) + private String pmEndTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = AddPartyServiceCenterForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = AddPartyServiceCenterForm.class) + private String latitude; + + /** + * 可预约事项 + */ + private List matterList; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlaceOrgFormDTO.java new file mode 100644 index 0000000000..a3d56416c0 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlaceOrgFormDTO.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 新增九小场所下组织 + **/ +@Data +public class AddPlaceOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 客户Id + */ + private String customerId; + /** + * 组织Id + */ + private String agencyId; + /** + * agency_id的所有上级 + */ + private String pids; + /** + * 网格Id【场所区域】 + */ + @NotBlank(message = "场所区域不能为空", groups = {Add.class}) + private String gridId; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + @NotBlank(message = "场所类型不能为空", groups = {Add.class}) + private String ninePlaceVal; + /** + * 场所名称 + */ + @NotBlank(message = "场所名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "场所名称不能超过20个字符", groups = {Add.class}) + private String placeOrgName; + /** + * 场所地址 + */ + @NotBlank(message = "场所地址不能为空", groups = {Add.class}) + @Length(max = 100, message = "场所地址不能超过100个字符", groups = {Add.class}) + private String address; + /** + * 字典value,场所规模【0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + */ + @NotBlank(message = "场所规模不能为空", groups = {Add.class}) + private String scale; + /** + * 场所负责人 + */ + @NotBlank(message = "负责人名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Add.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @NotBlank(message = "负责人电话不能为空", groups = {Add.class}) + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {Add.class}) + private String mobile; + /** + * 备注 + */ + private String remarks; + //token中userId + private String staffId; + + public interface Add { } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java new file mode 100644 index 0000000000..cb8b6b2724 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java @@ -0,0 +1,127 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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 com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + + +/** + * @Author sun + * @Description 新增场所巡查记录 + **/ +@Data +public class AddPlacePatrolRecordFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + @NotBlank(message = "场所区域不能为空", groups = {Add.class}) + private String gridId; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + @NotBlank(message = "场所类型不能为空", groups = {Add.class}) + private String ninePlaceVal; + + /** + * 场所下的组织Id + */ + @NotBlank(message = "场所名称不能为空", groups = {Add.class}) + private String placeOrgId; + + /** + * 场所下分队(place_patrolteam)表Id + */ + @NotBlank(message = "分队名称不能为空", groups = {Add.class}) + private String placePatrolTeamId; + + /** + * 分队下检查人员Id,分号分隔 + */ + @NotBlank(message = "检察人员不能为空", groups = {Add.class}) + private String inspectors; + + /** + * 首次巡查时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstTime; + + /** + * 隐患明细 + */ + @NotBlank(message = "隐患明细不能为空", groups = {Add.class}) + //@Length(max = 200, message = "隐患明细不能超过200个字符", groups = {Add.class}) + private String detailed; + + /** + * 首次检查结果【0:合格 1:不合格】 + */ + @NotBlank(message = "首次检查结果不能为空", groups = {Add.class}) + private String firstResult; + + /** + * 拟复查时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date reviewTime; + + /** + * 最终检查结果【0:合格 1:不合格】初始数据默认和首次检查结果相同 + */ + private String finalResult; + + /** + * 最新复查时间【初始数据默认和首次巡查时间相同】 + */ + private Date finalTime; + + /** + * 备注 + */ + private String remarks; + + + //token中userId + private String staffId; + + public interface Add {} + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolReviewRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolReviewRecordFormDTO.java new file mode 100644 index 0000000000..fefc67e2ea --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolReviewRecordFormDTO.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + + +/** + * @Author sun + * @Description 新增巡查复查记录 + **/ +@Data +public class AddPlacePatrolReviewRecordFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 巡查记录主(place_patrol_record)表Id + */ + @NotBlank(message = "巡查记录Id不能为空", groups = {Add.class}) + private String placePatrolRecordId; + + /** + * 场所下分队(place_patrol_team)表Id + */ + @NotBlank(message = "分队名称不能为空", groups = {Add.class}) + private String placePatrolTeamId; + + /** + * 检查人员Id,逗号分隔 + */ + @NotBlank(message = "检查人员不能为空", groups = {Add.class}) + private String inspectors; + + /** + * 复查时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date reviewTime; + + /** + * 复查隐患明细 + */ + private String detailed; + + /** + * 复查检查结果【0:合格 1:不合格】 + */ + @NotBlank(message = "复查检查结果不能为空", groups = {Add.class}) + private String reviewResult; + + /** + * 备注 + */ + private String remarks; + + public interface Add { } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java new file mode 100644 index 0000000000..b4767e0315 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolTeamFormDTO.java @@ -0,0 +1,125 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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 com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ +@Data +public class AddPlacePatrolTeamFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * agency_id的所有上级 + */ + private String pids; + + /** + * 网格Id【场所区域】 + */ + @NotBlank(message = "场所区域不能为空", groups = {Add.class}) + private String gridIds; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + @NotBlank(message = "场所类型不能为空", groups = {Add.class}) + private String ninePlaceVals; + + /** + * 分队名称 + */ + @NotBlank(message = "分队名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "分队名称不能超过20个字符", groups = {Add.class}) + private String teamName; + + /** + * 巡查计划 + */ + @NotBlank(message = "巡查计划不能为空", groups = {Add.class}) + @Length(max = 200, message = "巡查计划不能超过200个字符", groups = {Add.class}) + private String plan; + + /** + * 创建(建队)时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date time; + + /** + * 场所负责人 + */ + @NotBlank(message = "负责人名称不能为空", groups = {Add.class}) + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Add.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @NotBlank(message = "负责人电话不能为空", groups = {Add.class}) + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {Add.class}) + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 分队成员信息 + */ + @Valid + @NotEmpty(message = "成员列表不能为空") + private List memberList; + + //token中userId + private String staffId; + + public interface Add { } + + @Data + public class Member { + //姓名 + private String name; + //联系电话 + private String mobile; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java new file mode 100644 index 0000000000..a1caadfd14 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java @@ -0,0 +1,54 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:00 下午 + * @DESC + */ +@Data +public class AppointmentFormDTO implements Serializable { + + private static final long serialVersionUID = -7113952715343314153L; + + public interface AppointmentForm{} + + /** + * 事项ID + */ + @NotBlank(message = "matterId不能为空",groups = AppointmentForm.class) + private String matterId; + + /** + * 预约日期 + */ + @NotBlank(message = "appointmentDate不能为空",groups = AppointmentForm.class) + private String appointmentDate; + + /** + * 预约编号 + */ + @NotBlank(message = "timeId不能为空",groups = AppointmentForm.class) + private String timeId; + + /** + * 预约人 + */ + @NotBlank(message = "appointmentName不能为空",groups = AppointmentForm.class) + private String appointmentName; + + /** + * 预约电话 + */ + @NotBlank(message = "appointmentPhone不能为空",groups = AppointmentForm.class) + private String appointmentPhone; + + /** + * 备注 + */ + private String remark; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentRecordFormDTO.java new file mode 100644 index 0000000000..ef3783f1fa --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentRecordFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.time.LocalDate; + +/** + * @Author zxc + * @DateTime 2021/11/23 10:42 上午 + * @DESC + */ +@Data +public class AppointmentRecordFormDTO implements Serializable { + + private static final long serialVersionUID = 2021698309505676292L; + + public interface AppointmentRecordForm{} + + @NotBlank(message = "matterId不能为空",groups = AppointmentRecordForm.class) + private String matterId; + + @NotBlank(message = "date不能为空",groups = AppointmentRecordForm.class) + private String date; + + public AppointmentRecordFormDTO() { + this.date = LocalDate.now().toString(); + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentTimeFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentTimeFormDTO.java new file mode 100644 index 0000000000..241aba3802 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentTimeFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/23 9:57 上午 + * @DESC + */ +@Data +public class AppointmentTimeFormDTO implements Serializable { + + private static final long serialVersionUID = -3645075481936669437L; + + public interface AppointmentTimeForm{} + + /** + * 事项ID + */ + @NotBlank(message = "matterId不能为空",groups = AppointmentTimeForm.class) + private String matterId; + + /** + * 日期,默认当天 + */ + @NotBlank(message = "date不能为空",groups = AppointmentTimeForm.class) + private String date; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DelMatterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DelMatterFormDTO.java new file mode 100644 index 0000000000..2c45e104b5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/DelMatterFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 11:11 上午 + * @DESC + */ +@Data +public class DelMatterFormDTO implements Serializable { + + private static final long serialVersionUID = -5351894549285626126L; + + public interface DelMatterForm{} + + /** + * 事项ID + */ + @NotBlank(message = "matterId不能为空",groups = DelMatterForm.class) + private String matterId; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java new file mode 100644 index 0000000000..1bdb9886c3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPartyServiceCenterFormDTO.java @@ -0,0 +1,86 @@ +package com.epmet.dto.form; + +import com.epmet.dto.IcPartyServiceCenterMatterDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/22 9:05 上午 + * @DESC + */ +@Data +public class EditPartyServiceCenterFormDTO implements Serializable { + + private static final long serialVersionUID = -231856877756036529L; + + public interface EditPartyServiceCenterForm{} + + /** + * 中心名称 + */ + @NotBlank(message = "centerName不能为空",groups = EditPartyServiceCenterForm.class) + private String centerName; + + /** + * 社区地址 + */ + @NotBlank(message = "address不能为空",groups = EditPartyServiceCenterForm.class) + private String address; + + /** + * 办公电话 + */ + @NotBlank(message = "workPhone不能为空",groups = EditPartyServiceCenterForm.class) + private String workPhone; + + /** + * 上午开始时间 + */ + @NotBlank(message = "amStartTime不能为空",groups = EditPartyServiceCenterForm.class) + private String amStartTime; + + /** + * 上午结束时间 + */ + @NotBlank(message = "amEndTime不能为空",groups = EditPartyServiceCenterForm.class) + private String amEndTime; + + /** + * 下午开始时间 + */ + @NotBlank(message = "pmStartTime不能为空",groups = EditPartyServiceCenterForm.class) + private String pmStartTime; + + /** + * 下午结束时间 + */ + @NotBlank(message = "pmEndTime不能为空",groups = EditPartyServiceCenterForm.class) + private String pmEndTime; + + /** + * 经度 + */ + @NotBlank(message = "longitude不能为空",groups = EditPartyServiceCenterForm.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "latitude不能为空",groups = EditPartyServiceCenterForm.class) + private String latitude; + + /** + * 党群服务中心ID + */ + @NotBlank(message = "partyServiceCenterId不能为空",groups = EditPartyServiceCenterForm.class) + private String partyServiceCenterId; + + /** + * 可预约事项 + */ + private List matterList; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlaceOrgFormDTO.java new file mode 100644 index 0000000000..d4863f9cb9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlaceOrgFormDTO.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 修改、删除九小场所下组织 + **/ +@Data +public class EditPlaceOrgFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 场所Id + */ + @NotBlank(message = "场所Id不能为空", groups = {Edit.class, Del.class, Detail.class}) + private String placeOrgId; + /** + * 网格Id【场所区域】 + */ + private String gridId; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVal; + /** + * 场所名称 + */ + @Length(max = 20, message = "场所名称不能超过20个字符", groups = {Edit.class}) + private String placeOrgName; + /** + * 场所地址 + */ + @Length(max = 100, message = "场所地址不能超过100个字符", groups = {Edit.class}) + private String address; + /** + * 字典value,场所规模【0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + */ + private String scale; + /** + * 场所负责人 + */ + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Edit.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {Edit.class}) + private String mobile; + /** + * 备注 + */ + private String remarks; + + public interface Edit { } + + public interface Del { } + + public interface Detail { } + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolRecordFormDTO.java new file mode 100644 index 0000000000..ea24f0613b --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolRecordFormDTO.java @@ -0,0 +1,44 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 删除、详情场所巡查记录 + **/ +@Data +public class EditPlacePatrolRecordFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 巡查记录Id + */ + @NotBlank(message = "巡查记录Id不能为空", groups = {Del.class, Detail.class}) + private String placePatrolRecordId; + + + public interface Del { } + public interface Detail { } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolReviewRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolReviewRecordFormDTO.java new file mode 100644 index 0000000000..0ceff8ebab --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolReviewRecordFormDTO.java @@ -0,0 +1,79 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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 com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * @Author sun + * @Description 修改、删除、详情巡查复查记录 + **/ +@Data +public class EditPlacePatrolReviewRecordFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 复查记录Id + */ + @NotBlank(message = "复查记录Id不能为空", groups = {Edit.class, Del.class, Detail.class}) + private String placePatrolReviewRecordId; + + /** + * 场所下分队(place_patrol_team)表Id + */ + private String placePatrolTeamId; + + /** + * 检查人员Id,逗号分隔 + */ + private String inspectors; + + /** + * 复查时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date reviewTime; + + /** + * 复查隐患明细 + */ + private String detailed; + + /** + * 复查检查结果【0:合格 1:不合格】 + */ + private String reviewResult; + + /** + * 备注 + */ + private String remarks; + + public interface Edit { } + public interface Del { } + public interface Detail { } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java new file mode 100644 index 0000000000..8036d2dd12 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditPlacePatrolTeamFormDTO.java @@ -0,0 +1,109 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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 com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * @Author sun + * @Description 修改、删除九小场所巡查分队人员管理 + **/ +@Data +public class EditPlacePatrolTeamFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 分队Id + */ + @NotBlank(message = "分队Id不能为空", groups = {Edit.class, Del.class, Detail.class}) + private String teamId; + + /** + * 网格Id【场所区域】 + */ + private String gridIds; + /** + * 场所类型【admin库sys_dict_data表九小场所value值】 + */ + private String ninePlaceVals; + + /** + * 分队名称 + */ + @Length(max = 20, message = "分队名称不能超过20个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String teamName; + + /** + * 巡查计划 + */ + @Length(max = 200, message = "巡查计划不能超过200个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String plan; + + /** + * 创建(建队)时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date time; + + /** + * 场所负责人 + */ + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String personInCharge; + /** + * 负责人电话 + */ + @Length(max = 11, message = "负责人电话不能超过11个字符", groups = {AddPlacePatrolTeamFormDTO.Add.class}) + private String mobile; + + /** + * 备注 + */ + private String remarks; + + /** + * 分队成员信息 + */ + private List memberList; + + public interface Edit { + } + + public interface Del { + } + + public interface Detail { + } + + @Data + public class Member { + //姓名 + private String name; + //联系电话 + private String mobile; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java new file mode 100644 index 0000000000..c45a197ab8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlaceOrgFormDTO.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ +@Data +public class GetListPlaceOrgFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //场所名称 + private String placeOrgName; + //联系电话 + private String mobile; + //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + private String scale; + //场所区域【网格Id】 + private String gridId; + //场所类型【九小场所Value值】 + private String ninePlaceVal; + //是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 + private Boolean isPage = true; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + //token中客户Id + private String customerId; + //场所Id + private String placeOrgId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java new file mode 100644 index 0000000000..b839d432b6 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolRecordFormDTO.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 场所巡查记录列表查询 + **/ +@Data +public class GetListPlacePatrolRecordFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //场所名称 + private String placeOrgName; + //首次检查结果【0:合格 1:不合格】 + private String firstResult; + //场所区域【网格Id】 + private String gridId; + //场所类型【九小场所Value值】 + private String ninePlaceVal; + //最终检查结果【0:合格 1:不合格】 + private String finalResult; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + //token中客户Id + private String customerId; + //巡查记录Id + private String placePatrolRecordId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java new file mode 100644 index 0000000000..596bad17d4 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolReviewRecordFormDTO.java @@ -0,0 +1,48 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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 javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 巡查复查记录列表查询 + **/ +@Data +public class GetListPlacePatrolReviewRecordFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + //巡查记录Id + private String placePatrolRecordId; + //复查记录Id + @NotBlank(message = "复查记录Id不能为空", groups = {GetData.class}) + private String placePatrolReviewRecordId; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + //token中客户Id + private String customerId; + public interface GetData { } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java new file mode 100644 index 0000000000..4b01a8b484 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetListPlacePatrolTeamFormDTO.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + + +/** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ +@Data +public class GetListPlacePatrolTeamFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + //负责人 + private String personInCharge; + //联系电话 + private String mobile; + //场所区域【网格Id】 + private String gridId; + //场所类型【九小场所Value值】 + private String ninePlaceVal; + //是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 + private Boolean isPage = true; + //页码 + @Min(1) + private Integer pageNo; + //每页多少条 + private Integer pageSize = 20; + //token中客户Id + private String customerId; + //场所Id + private String teamId; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/PartyServiceCenterListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/PartyServiceCenterListFormDTO.java new file mode 100644 index 0000000000..1014b844cc --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/PartyServiceCenterListFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:37 下午 + * @DESC + */ +@Data +public class PartyServiceCenterListFormDTO implements Serializable { + + private static final long serialVersionUID = -6620725991593811931L; + + private String orgId; + + private String orgType; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java new file mode 100644 index 0000000000..ae76c66052 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java @@ -0,0 +1,59 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/23 10:45 上午 + * @DESC + */ +@Data +public class AppointmentRecordResultDTO implements Serializable { + + private static final long serialVersionUID = 6066514365788141940L; + + private Integer sort; + + /** + * 事项名 + */ + private String matterName; + + /** + * 预约人 + */ + private String appointmentName; + + /** + * 预约电话 + */ + private String appointmentPhone; + + /** + * 备注 + */ + private String remark; + + /** + * 预约时间 + */ + private List appointmentTime; + + @JsonIgnore + private String timeId; + + public AppointmentRecordResultDTO() { + this.sort = NumConstant.ZERO; + this.matterName = ""; + this.appointmentName = ""; + this.appointmentPhone = ""; + this.remark = ""; + this.appointmentTime = new ArrayList<>(); + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentTimeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentTimeResultDTO.java new file mode 100644 index 0000000000..b37e4e913a --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentTimeResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.result; + +import com.epmet.dto.TimeDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/23 9:55 上午 + * @DESC + */ +@Data +public class AppointmentTimeResultDTO implements Serializable { + + private static final long serialVersionUID = 8724962797702659712L; + + /** + * 预约类型【每天:everyDay,工作日:workDay,周末:weekend】 + */ + private String appointmentType; + + /** + * 时间段 + */ + private List timeDetail; + + public AppointmentTimeResultDTO() { + this.appointmentType = ""; + this.timeDetail = new ArrayList<>(); + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java new file mode 100644 index 0000000000..2111d8ef30 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlaceOrgResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ +@Data +public class GetListPlaceOrgResultDTO implements Serializable { + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolRecordResultDTO.java new file mode 100644 index 0000000000..0ef22dfa52 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolRecordResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 场所巡查记录列表查询 + **/ +@Data +public class GetListPlacePatrolRecordResultDTO implements Serializable { + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolReviewRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolReviewRecordResultDTO.java new file mode 100644 index 0000000000..9caca08bd1 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolReviewRecordResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 巡查复查记录列表查询 + **/ +@Data +public class GetListPlacePatrolReviewRecordResultDTO implements Serializable { + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java new file mode 100644 index 0000000000..b2ce9018f6 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GetListPlacePatrolTeamResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ +@Data +public class GetListPlacePatrolTeamResultDTO implements Serializable { + //集合总条数 + private Integer total; + //社会组织信息 + private List list; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java new file mode 100644 index 0000000000..7f99cedc12 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PartyServiceCenterListResultDTO.java @@ -0,0 +1,73 @@ +package com.epmet.dto.result; + +import com.epmet.dto.MatterListDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/11/22 2:38 下午 + * @DESC + */ +@Data +public class PartyServiceCenterListResultDTO implements Serializable { + + private static final long serialVersionUID = -5977663317819468536L; + + /** + * 中心名称 + */ + private String centerName; + + /** + * 党群服务中心ID + */ + private String partyServiceCenterId; + + /** + * 社区地址 + */ + private String address; + + /** + * 办公电话 + */ + private String workPhone; + + /** + * 上午工作时间 + */ + private String amWorkTime; + + /** + * 下午工作时间 + */ + private String pmWorkTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + private List matterList; + + public PartyServiceCenterListResultDTO() { + this.centerName = ""; + this.partyServiceCenterId = ""; + this.address = ""; + this.workPhone = ""; + this.amWorkTime = ""; + this.pmWorkTime = ""; + this.longitude = ""; + this.latitude = ""; + this.matterList = new ArrayList<>(); + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java new file mode 100644 index 0000000000..211c74097f --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ +@Data +public class PlaceOrgDetailResultDTO implements Serializable { + //场所Id + private String placeOrgId; + //场所名称 + private String placeOrgName; + //场所区域Id + private String gridId; + //场所区域名称 + private String gridName; + //场所地址 + private String address; + //场所类型名称[九小场所Value值] + private String ninePlaceVal; + //场所类型名称[九小场所名称] + private String ninePlaceName; + //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + private String scale; + //负责人 + private String personInCharge; + //联系电话 + private String mobile; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolRecordDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolRecordDetailResultDTO.java new file mode 100644 index 0000000000..93450c6cfa --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolRecordDetailResultDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 场所巡查记录详情 + **/ +@Data +public class PlacePatrolRecordDetailResultDTO implements Serializable { + //所属组织Id + private String agencyId; + //巡查Id + private String placePatrolRecordId; + //网格Id【场所区域】 + private String gridId; + //网格名称【场所区域】 + private String gridName; + //场所下的组织Id + private String placeOrgId; + //场所下的组织名称 + private String placeOrgName; + //场所类型【admin库sys_dict_data表九小场所value值】 + private String ninePlaceVal; + //场所类型名称 + private String ninePlaceName; + //场所下分队(place_patrolteam)表Id + private String placePatrolTeamId; + //场所下分队名称 + private String placePatrolTeamName; + //分队下检查人员Id,分号分隔 + private String inspectors; + //分队下检查人员名称 + private String inspectorsNames; + //首次巡查时间 + private String firstTime; + //隐患明细 + private String detailed; + //首次检查结果【0:合格 1:不合格】 + private String firstResult; + //拟复查时间 + private String reviewTime; + //最新结果【0:合格 1:不合格】 + private String finalResult; + //最新检查时间 + private String finalTime; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolReviewRecordDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolReviewRecordDetailResultDTO.java new file mode 100644 index 0000000000..47da9065f7 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolReviewRecordDetailResultDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 巡查复查记录详情 + **/ +@Data +public class PlacePatrolReviewRecordDetailResultDTO implements Serializable { + //复查记录Id + private String placePatrolReviewRecordId; + //巡查记录Id + private String placePatrolRecordId; + //分队id + private String placePatrolTeamId; + //分队名称 + private String placePatrolTeamName; + //检查人员Id,分号分隔 + private String inspectors; + //检查人员姓名,分号分隔 + private String inspectorsNames; + //复查时间 + private String reviewTime; + //复查隐患明细 + private String detailed; + //复查检查结果【0:合格 1:不合格】 + private String reviewResult; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java new file mode 100644 index 0000000000..6869a2fb75 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlacePatrolTeamDetailResultDTO.java @@ -0,0 +1,38 @@ +package com.epmet.dto.result; + +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ +@Data +public class PlacePatrolTeamDetailResultDTO implements Serializable { + //分队Id + private String teamId; + //场所名称 + private String teamName; + //场所区域Id + private String gridIds; + //场所区域名称 + private String gridNames; + //场所类型名称[九小场所Value值] + private String ninePlaceVals; + //场所类型名称[九小场所名称] + private String ninePlaceNames; + //负责人 + private String personInCharge; + //联系电话 + private String mobile; + //监查计划 + private String plan; + //创建时间 + private String time; + //分队成员信息 + private List memberList; + +} diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 5b9c7fbf37..7b2a84d8dd 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -119,6 +119,12 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + compile + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java new file mode 100644 index 0000000000..ced0df2da5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/PartyServiceCenterConstant.java @@ -0,0 +1,15 @@ +package com.epmet.constant; + +/** + * @Author zxc + * @DateTime 2021/11/22 9:29 上午 + * @DESC + */ +public interface PartyServiceCenterConstant { + + String ORG_TYPE_AGENCY = "agency"; + + String APPOINTMENT_STATUS_APPOINTING = "appointing"; + String APPOINTMENT_STATUS_CANCEL = "cancel"; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index dc9df26699..62b7fe619d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,14 +28,17 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcPartyServiceCenterDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.AppointmentRecordResultDTO; +import com.epmet.dto.result.AppointmentTimeResultDTO; +import com.epmet.dto.result.PartyServiceCenterListResultDTO; 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; +import java.util.*; /** @@ -91,4 +96,95 @@ public class IcPartyServiceCenterController { ExcelUtils.exportExcelToTarget(response, null, list, IcPartyServiceCenterExcel.class); } + /** + * @Description 新增党群服务中心 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 9:13 上午 + */ + @PostMapping("addpartyservicecenter") + public Result addPartyServiceCenter(@RequestBody AddPartyServiceCenterFormDTO formDTO, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, AddPartyServiceCenterFormDTO.AddPartyServiceCenterForm.class); + icPartyServiceCenterService.addPartyServiceCenter(formDTO,tokenDto); + return new Result(); + } + + /** + * @Description 修改党群服务中心 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 10:21 上午 + */ + @PostMapping("editpartyservicecenter") + public Result editPartyServiceCenter(@RequestBody EditPartyServiceCenterFormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, EditPartyServiceCenterFormDTO.EditPartyServiceCenterForm.class); + icPartyServiceCenterService.editPartyServiceCenter(formDTO,tokenDto); + return new Result(); + } + + /** + * @Description 事项删除 + * @param formDTO + * @author zxc + * @date 2021/11/22 1:25 下午 + */ + @PostMapping("delmatter") + public Result delMatter(@RequestBody DelMatterFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, DelMatterFormDTO.DelMatterForm.class); + icPartyServiceCenterService.delMatter(formDTO); + return new Result(); + } + + /** + * @Description 预约 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 2:06 下午 + */ + @PostMapping("appointment") + public Result appointment(@RequestBody AppointmentFormDTO formDTO, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, AppointmentFormDTO.AppointmentForm.class); + icPartyServiceCenterService.appointment(formDTO,tokenDto); + return new Result(); + } + + /** + * @Description 党群服务中心列表 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 2:47 下午 + */ + @PostMapping("partyservicecenterlist") + public Result> partyServiceCenterList(@RequestBody PartyServiceCenterListFormDTO formDTO, @LoginUser TokenDto tokenDto){ + return new Result>().ok(icPartyServiceCenterService.partyServiceCenterList(formDTO,tokenDto)); + } + + /** + * @Description 【党群服务中心】点击预约按钮时,查询可选时间 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:02 上午 + */ + @PostMapping("appointmenttime") + public Result appointmentTime(@RequestBody AppointmentTimeFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AppointmentTimeFormDTO.AppointmentTimeForm.class); + return new Result().ok(icPartyServiceCenterService.appointmentTime(formDTO)); + } + + /** + * @Description 【党群服务中心】预约记录 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:50 上午 + */ + @PostMapping("appointmentrecord") + public Result> appointmentRecord(@RequestBody AppointmentRecordFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AppointmentRecordFormDTO.AppointmentRecordForm.class); + return new Result>().ok(icPartyServiceCenterService.appointmentRecord(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java new file mode 100644 index 0000000000..238b6ed595 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.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.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.AddPlaceOrgFormDTO; +import com.epmet.dto.form.EditPlaceOrgFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; +import com.epmet.service.IcPlaceOrgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placeorg") +public class IcPlaceOrgController { + + @Autowired + private IcPlaceOrgService placeOrgService; + + /** + * @Author sun + * @Description 新增九小场所下组织 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddPlaceOrgFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + placeOrgService.add(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 修改九小场所下组织 + **/ + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlaceOrgFormDTO.Edit.class); + placeOrgService.edit(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 删除九小场所下组织 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlaceOrgFormDTO.Del.class); + placeOrgService.del(formDTO.getPlaceOrgId()); + return new Result(); + } + + /** + * @Author sun + * @Description 九小场所下组织详情 + **/ + @PostMapping("detail") + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EditPlaceOrgFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlaceOrgFormDTO.Detail.class); + return new Result().ok(placeOrgService.detail(formDTO.getPlaceOrgId())); + } + + /** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlaceOrgFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result().ok(placeOrgService.getList(formDTO)); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java new file mode 100644 index 0000000000..9ef1e21e5d --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.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.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.AddPlacePatrolRecordFormDTO; +import com.epmet.dto.form.EditPlacePatrolRecordFormDTO; +import com.epmet.dto.form.GetListPlacePatrolRecordFormDTO; +import com.epmet.dto.result.GetListPlacePatrolRecordResultDTO; +import com.epmet.dto.result.PlacePatrolRecordDetailResultDTO; +import com.epmet.service.IcPlacePatrolRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolrecord") +public class IcPlacePatrolRecordController { + + @Autowired + private IcPlacePatrolRecordService placePatrolRecordService; + + /** + * @Author sun + * @Description 新增场所巡查记录 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddPlacePatrolRecordFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + placePatrolRecordService.add(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 删除场所巡查记录 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolRecordFormDTO.Del.class); + placePatrolRecordService.del(tokenDto.getUserId(), formDTO.getPlacePatrolRecordId()); + return new Result(); + } + + /** + * @Author sun + * @Description 场所巡查记录详情 + **/ + @PostMapping("detail") + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolRecordFormDTO.Detail.class); + return new Result().ok(placePatrolRecordService.detail(formDTO.getPlacePatrolRecordId())); + } + + /** + * @Author sun + * @Description 场所巡查记录列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolRecordFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result().ok(placePatrolRecordService.getList(formDTO)); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.java new file mode 100644 index 0000000000..5f0f36c750 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolReviewRecordController.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.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.AddPlacePatrolReviewRecordFormDTO; +import com.epmet.dto.form.EditPlacePatrolReviewRecordFormDTO; +import com.epmet.dto.form.GetListPlacePatrolReviewRecordFormDTO; +import com.epmet.dto.result.GetListPlacePatrolReviewRecordResultDTO; +import com.epmet.dto.result.PlacePatrolReviewRecordDetailResultDTO; +import com.epmet.service.IcPlacePatrolReviewRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolreviewrecord") +public class IcPlacePatrolReviewRecordController { + + @Autowired + private IcPlacePatrolReviewRecordService placePatrolReviewRecordService; + + /** + * @Author sun + * @Description 新增巡查复查记录 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolReviewRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddPlacePatrolReviewRecordFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + placePatrolReviewRecordService.add(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 修改巡查复查记录 + **/ + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolReviewRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolReviewRecordFormDTO.Edit.class); + placePatrolReviewRecordService.edit(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 删除巡查复查记录 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolReviewRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolReviewRecordFormDTO.Del.class); + placePatrolReviewRecordService.del(formDTO.getPlacePatrolReviewRecordId()); + return new Result(); + } + + /** + * @Author sun + * @Description 巡查复查记录详情 + **/ + @PostMapping("detail") + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolReviewRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolReviewRecordFormDTO.Detail.class); + return new Result().ok(placePatrolReviewRecordService.detail(formDTO.getPlacePatrolReviewRecordId())); + } + + /** + * @Author sun + * @Description 巡查复查记录列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolReviewRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GetListPlacePatrolReviewRecordFormDTO.GetData.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result().ok(placePatrolReviewRecordService.getList(formDTO)); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.java new file mode 100644 index 0000000000..6d62a5f951 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamController.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.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.AddPlacePatrolTeamFormDTO; +import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; +import com.epmet.service.IcPlacePatrolTeamService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolteam") +public class IcPlacePatrolTeamController { + + @Autowired + private IcPlacePatrolTeamService placePatrolTeamService; + + + /** + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddPlacePatrolTeamFormDTO.Add.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + placePatrolTeamService.add(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 修改九小场所巡查分队人员管理 + **/ + @PostMapping("edit") + public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Edit.class); + placePatrolTeamService.edit(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 删除九小场所巡查分队人员管理 + **/ + @PostMapping("del") + public Result del(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Del.class); + placePatrolTeamService.del(formDTO.getTeamId()); + return new Result(); + } + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ + @PostMapping("detail") + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EditPlacePatrolTeamFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EditPlacePatrolTeamFormDTO.Detail.class); + return new Result().ok(placePatrolTeamService.detail(formDTO.getTeamId())); + } + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ + @PostMapping("getlist") + public Result getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolTeamFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result().ok(placePatrolTeamService.getList(formDTO)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamStaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamStaffController.java new file mode 100644 index 0000000000..9d3750d7b8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolTeamStaffController.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.service.IcPlacePatrolTeamStaffService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("placepatrolteamstaff") +public class IcPlacePatrolTeamStaffController { + + @Autowired + private IcPlacePatrolTeamStaffService placePatrolTeamStaffService; + + + /** + * @Author sun + * @Description 查询分队下人员列表数据 + **/ + @PostMapping("getlist") + public Result> getList(@LoginUser TokenDto tokenDto, @RequestBody GetListPlacePatrolTeamFormDTO formDTO) { + return new Result>().ok(placePatrolTeamStaffService.getList(formDTO.getTeamId())); + } + +} \ 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 deleted file mode 100644 index 35cbfad262..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolRecordController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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/PlacePatrolTeamController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java deleted file mode 100644 index 29df2c1deb..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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 deleted file mode 100644 index 787d98981e..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolTeamStaffController.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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/IcMatterAppointmentRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java index 98a08ee373..f8c02d5429 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcMatterAppointmentRecordDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.AppointmentRecordResultDTO; import com.epmet.entity.IcMatterAppointmentRecordEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 事项预约记录 @@ -29,5 +33,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcMatterAppointmentRecordDao extends BaseDao { - + + /** + * @Description 查询预约列表 + * @param matterId + * @param date + * @author zxc + * @date 2021/11/23 1:55 下午 + */ + List appointmentRecord(@Param("matterId")String matterId,@Param("date")String date); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java index 0fa37f6146..b85d2086f0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.PartyServiceCenterListResultDTO; import com.epmet.entity.IcPartyServiceCenterEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党群服务中心 @@ -29,5 +33,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcPartyServiceCenterDao extends BaseDao { - + + /** + * @Description 查询党群服务中心列表 + * @param orgId + * @author zxc + * @date 2021/11/22 2:51 下午 + */ + List partyServiceCenterList(@Param("orgId")String orgId); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java index 6001796620..42b765e40c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterMatterDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcPartyServiceCenterMatterEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 党群服务中心可预约事项表 @@ -29,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcPartyServiceCenterMatterDao extends BaseDao { + + /** + * @Description 根据党群服务中心删除事项 + * @param partyServiceCenterId + * @author zxc + * @date 2021/11/22 10:29 上午 + */ + void deleteMattersByPartyServiceCenterId(@Param("partyServiceCenterId") String partyServiceCenterId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java similarity index 72% rename from epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java index 0c3f5cc4af..a3c5c667bd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/SocietyOrgDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java @@ -18,26 +18,26 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.form.GetListSocietyOrgFormDTO; -import com.epmet.dto.result.GetListSocietyOrgResultDTO; -import com.epmet.entity.SocietyOrgEntity; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; +import com.epmet.entity.IcPlaceOrgEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** - * 社会组织管理 + * 九小场所下组织管理 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ @Mapper -public interface SocietyOrgDao extends BaseDao { +public interface IcPlaceOrgDao extends BaseDao { /** * @Author sun - * @Description 社会组织列表查询 + * @Description 九小场所下组织列表查询 **/ - List getList(GetListSocietyOrgFormDTO formDTO); + List getList(GetListPlaceOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolRecordDao.java new file mode 100644 index 0000000000..be3bd364f2 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolRecordDao.java @@ -0,0 +1,38 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.dto.form.GetListPlacePatrolRecordFormDTO; +import com.epmet.dto.result.PlacePatrolRecordDetailResultDTO; +import com.epmet.entity.IcPlacePatrolRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPlacePatrolRecordDao extends BaseDao { + + List getList(GetListPlacePatrolRecordFormDTO dto); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolReviewRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolReviewRecordDao.java new file mode 100644 index 0000000000..0b6c476228 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolReviewRecordDao.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.GetListPlacePatrolReviewRecordFormDTO; +import com.epmet.dto.result.PlacePatrolReviewRecordDetailResultDTO; +import com.epmet.entity.IcPlacePatrolReviewRecordEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPlacePatrolReviewRecordDao extends BaseDao { + + /** + * @Author sun + * @Description 删除巡查记录对应的复查记录 + **/ + int delByPatrolRecordId(@Param("staffId") String staffId, @Param("placePatrolRecordId") String placePatrolRecordId); + + /** + * @Author sun + * @Description 查询巡查记录对应的复查记录数据 + **/ + List getList(GetListPlacePatrolReviewRecordFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamDao.java new file mode 100644 index 0000000000..d53d0f24e8 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamDao.java @@ -0,0 +1,42 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; +import com.epmet.entity.IcPlacePatrolTeamEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPlacePatrolTeamDao extends BaseDao { + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ + List getList(GetListPlacePatrolTeamFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java new file mode 100644 index 0000000000..56dee8582f --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlacePatrolTeamStaffDao.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPlacePatrolTeamStaffDao extends BaseDao { + + /** + * @Author sun + * @Description 删除分队下成员信息 + **/ + int delByTeamId(@Param("teamId") String teamId); + + /** + * @Author sun + * @Description 查询分队下成员信息 + **/ + List getByTeamId(@Param("teamId") String teamId); + + /** + * @Author sun + * @Description 批量查询分队下人员信息 + **/ + List selectByTeamIds(@Param("teamIds") List teamIds); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java similarity index 96% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java index fbe92edea5..65540a28b1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlaceOrgEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlaceOrgEntity.java @@ -33,8 +33,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_org") -public class PlaceOrgEntity extends BaseEpmetEntity { +@TableName("ic_place_org") +public class IcPlaceOrgEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java similarity index 94% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java index b5a2c64dd2..3b6995b09c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolRecordEntity.java @@ -33,8 +33,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_record") -public class PlacePatrolRecordEntity extends BaseEpmetEntity { +@TableName("ic_place_patrol_record") +public class IcPlacePatrolRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -61,7 +61,7 @@ public class PlacePatrolRecordEntity extends BaseEpmetEntity { /** * 场所类型【admin库sys_dict_data表九小场所value值】 */ - private String ninePlacsVal; + private String ninePlaceVal; /** * 场所下的组织Id diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java similarity index 93% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java index 196794d147..dd492d7dfa 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolReviewRecordEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolReviewRecordEntity.java @@ -33,8 +33,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_review_record") -public class PlacePatrolReviewRecordEntity extends BaseEpmetEntity { +@TableName("ic_place_patrol_review_record") +public class IcPlacePatrolReviewRecordEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java similarity index 93% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java index dce4701f43..85b37ddd64 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamEntity.java @@ -33,8 +33,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_team") -public class PlacePatrolTeamEntity extends BaseEpmetEntity { +@TableName("ic_place_patrol_team") +public class IcPlacePatrolTeamEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -61,7 +61,7 @@ public class PlacePatrolTeamEntity extends BaseEpmetEntity { /** * 负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】 */ - private String ninePlacsVals; + private String ninePlaceVals; /** * 分队名称 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java similarity index 93% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java index f0012def21..fc16a6dc42 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/PlacePatrolTeamStaffEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcPlacePatrolTeamStaffEntity.java @@ -33,8 +33,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("place_patrol_team_staff") -public class PlacePatrolTeamStaffEntity extends BaseEpmetEntity { +@TableName("ic_place_patrol_team_staff") +public class IcPlacePatrolTeamStaffEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlaceOrgExcel.java similarity index 98% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlaceOrgExcel.java index 83a6fb8792..4647a3e9b9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlaceOrgExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlaceOrgExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlaceOrgExcel { +public class IcPlaceOrgExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java similarity index 97% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java index ccf1208aaa..423f7b845e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolRecordExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolRecordExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolRecordExcel { +public class IcPlacePatrolRecordExcel { @Excel(name = "唯一标识") private String id; @@ -47,7 +47,7 @@ public class PlacePatrolRecordExcel { private String gridId; @Excel(name = "场所类型【admin库sys_dict_data表九小场所value值】") - private String ninePlacsVal; + private String ninePlaceVal; @Excel(name = "场所下的组织Id") private String placeOrgId; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolReviewRecordExcel.java similarity index 97% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolReviewRecordExcel.java index c98b265c27..3a997045a3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolReviewRecordExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolReviewRecordExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolReviewRecordExcel { +public class IcPlacePatrolReviewRecordExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java similarity index 96% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java index b77fce4de4..1e5da44cfa 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamExcel { +public class IcPlacePatrolTeamExcel { @Excel(name = "唯一标识") private String id; @@ -47,7 +47,7 @@ public class PlacePatrolTeamExcel { private String gridIds; @Excel(name = "负责场所类型【admin库sys_dict_data表九小场所value值 多个值逗号分隔】") - private String ninePlacsVals; + private String ninePlaceVals; @Excel(name = "分队名称") private String teamName; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamStaffExcel.java similarity index 97% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamStaffExcel.java index db8c9c250a..99e1641231 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/PlacePatrolTeamStaffExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPlacePatrolTeamStaffExcel.java @@ -29,7 +29,7 @@ import java.util.Date; * @since v1.0.0 2021-11-18 */ @Data -public class PlacePatrolTeamStaffExcel { +public class IcPlacePatrolTeamStaffExcel { @Excel(name = "唯一标识") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java index 48a39b4b7e..cc977a17c5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterMatterService.java @@ -92,4 +92,12 @@ public interface IcPartyServiceCenterMatterService extends BaseService partyServiceCenterList(PartyServiceCenterListFormDTO formDTO,TokenDto tokenDto); + + /** + * @Description 【党群服务中心】点击预约按钮时,查询可选时间 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:02 上午 + */ + AppointmentTimeResultDTO appointmentTime(AppointmentTimeFormDTO formDTO); + + /** + * @Description 【党群服务中心】预约记录 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:50 上午 + */ + List appointmentRecord(AppointmentRecordFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java new file mode 100644 index 0000000000..e8fed58f7a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.dto.form.AddPlaceOrgFormDTO; +import com.epmet.dto.form.EditPlaceOrgFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; +import com.epmet.entity.IcPlaceOrgEntity; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPlaceOrgService extends BaseService { + + /** + * @Author sun + * @Description 新增九小场所下组织 + **/ + void add(AddPlaceOrgFormDTO formDTO); + + /** + * @Author sun + * @Description 修改九小场所下组织 + **/ + void edit(EditPlaceOrgFormDTO formDTO); + + /** + * @Author sun + * @Description 删除九小场所下组织 + **/ + void del(String placeOrgId); + + /** + * @Author sun + * @Description 九小场所下组织详情 + **/ + PlaceOrgDetailResultDTO detail(String placeOrgId); + + /** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ + GetListPlaceOrgResultDTO getList(GetListPlaceOrgFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java new file mode 100644 index 0000000000..3b0c2c6e12 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.dto.form.AddPlacePatrolRecordFormDTO; +import com.epmet.dto.form.GetListPlacePatrolRecordFormDTO; +import com.epmet.dto.result.GetListPlacePatrolRecordResultDTO; +import com.epmet.dto.result.PlacePatrolRecordDetailResultDTO; +import com.epmet.entity.IcPlacePatrolRecordEntity; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPlacePatrolRecordService extends BaseService { + + /** + * @Author sun + * @Description 新增场所巡查记录 + **/ + void add(AddPlacePatrolRecordFormDTO formDTO); + + /** + * @Author sun + * @Description 删除场所巡查记录 + **/ + void del(String staffId, String placePatrolRecordId); + + /** + * @Author sun + * @Description 场所巡查记录详情 + **/ + PlacePatrolRecordDetailResultDTO detail(String placePatrolRecordId); + + /** + * @Author sun + * @Description 场所巡查记录列表查询 + **/ + GetListPlacePatrolRecordResultDTO getList(GetListPlacePatrolRecordFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolReviewRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolReviewRecordService.java new file mode 100644 index 0000000000..2ab44dd930 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolReviewRecordService.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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.form.AddPlacePatrolReviewRecordFormDTO; +import com.epmet.dto.form.EditPlacePatrolReviewRecordFormDTO; +import com.epmet.dto.form.GetListPlacePatrolReviewRecordFormDTO; +import com.epmet.dto.result.GetListPlacePatrolReviewRecordResultDTO; +import com.epmet.dto.result.PlacePatrolReviewRecordDetailResultDTO; +import com.epmet.entity.IcPlacePatrolReviewRecordEntity; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPlacePatrolReviewRecordService extends BaseService { + + /** + * @Author sun + * @Description 新增巡查复查记录 + **/ + void add(AddPlacePatrolReviewRecordFormDTO formDTO); + + /** + * @Author sun + * @Description 修改巡查复查记录 + **/ + void edit(EditPlacePatrolReviewRecordFormDTO formDTO); + + /** + * @Author sun + * @Description 删除巡查复查记录 + **/ + void del(String placePatrolReviewRecordId); + + /** + * @Author sun + * @Description 巡查复查记录详情 + **/ + PlacePatrolReviewRecordDetailResultDTO detail(String placePatrolReviewRecordId); + + /** + * @Author sun + * @Description 巡查复查记录列表查询 + **/ + GetListPlacePatrolReviewRecordResultDTO getList(GetListPlacePatrolReviewRecordFormDTO formDTO); + + /** + * @Author sun + * @Description 删除巡查记录对应的复查记录 + **/ + int delByPatrolRecordId(String staffId, String placePatrolRecordId); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamService.java new file mode 100644 index 0000000000..2c17403e80 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamService.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.dto.form.AddPlacePatrolTeamFormDTO; +import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; +import com.epmet.entity.IcPlacePatrolTeamEntity; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +public interface IcPlacePatrolTeamService extends BaseService { + + /** + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ + void add(AddPlacePatrolTeamFormDTO formDTO); + + /** + * @Author sun + * @Description 修改九小场所巡查分队人员管理 + **/ + void edit(EditPlacePatrolTeamFormDTO formDTO); + + /** + * @Author sun + * @Description 删除九小场所巡查分队人员管理 + **/ + void del(String teamId); + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ + PlacePatrolTeamDetailResultDTO detail(String teamId); + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ + GetListPlacePatrolTeamResultDTO getList(GetListPlacePatrolTeamFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamStaffService.java similarity index 56% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamStaffService.java index a8c180fee7..32fd96e962 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamStaffDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolTeamStaffService.java @@ -15,11 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.dao; +package com.epmet.service; -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PlacePatrolTeamStaffEntity; -import org.apache.ibatis.annotations.Mapper; +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; + +import java.util.List; /** * 场所分队下人员管理 @@ -27,7 +30,17 @@ 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 { - +public interface IcPlacePatrolTeamStaffService extends BaseService { + + /** + * @Author sun + * @Description 删除分队下成员信息 + **/ + int delByTeamId(String teamId); + + /** + * @Author sun + * @Description 查询分队下人员列表数据 + **/ + List getList(String teamId); } \ 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 deleted file mode 100644 index e970167e66..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamStaffService.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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/IcPartyServiceCenterMatterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java index ac837eed29..b264c2159b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterMatterServiceImpl.java @@ -97,4 +97,16 @@ public class IcPartyServiceCenterMatterServiceImpl extends BaseServiceImpl implements IcPartyServiceCenterService { + @Autowired + private IcPartyServiceCenterMatterService matterService; + @Autowired + private IcMatterAppointmentRecordDao matterAppointmentRecordDao; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -97,4 +127,317 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl l = new LambdaQueryWrapper<>(); + l.eq(IcPartyServiceCenterEntity::getCenterName,formDTO.getCenterName()) + .eq(IcPartyServiceCenterEntity::getCustomerId,customerId) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO); + IcPartyServiceCenterEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.PARTY_SERVICE_CENTER_ERROR.getCode()); + } + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); + if (null == staffInfo){ + throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); + } + IcPartyServiceCenterEntity centerEntity = ConvertUtils.sourceToTarget(formDTO, IcPartyServiceCenterEntity.class); + centerEntity.setCustomerId(customerId); + centerEntity.setOrgId(staffInfo.getAgencyId()); + centerEntity.setOrgType(PartyServiceCenterConstant.ORG_TYPE_AGENCY); + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + if (null == agencyInfo){ + throw new RenException(String.format("查询组织信息失败%s",staffInfo.getAgencyId())); + } + centerEntity.setPid(agencyInfo.getPid()); + centerEntity.setPids(agencyInfo.getPids()); + baseDao.insert(centerEntity); + if (CollectionUtils.isNotEmpty(formDTO.getMatterList())){ + List matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); + matters.forEach(m -> { + m.setCustomerId(customerId); + m.setPartyServiceCenterId(centerEntity.getId()); + }); + matterService.insertBatch(matters); + } + } + + /** + * @Description 修改党群服务中心 + * 事项只准删除,不准修改 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 10:21 上午 + */ + @Override + public void editPartyServiceCenter(EditPartyServiceCenterFormDTO formDTO, TokenDto tokenDto) { + LambdaQueryWrapper l = new LambdaQueryWrapper<>(); + l.eq(IcPartyServiceCenterEntity::getCenterName,formDTO.getCenterName()) + .eq(IcPartyServiceCenterEntity::getCustomerId,tokenDto.getCustomerId()) + .eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO) + .ne(BaseEpmetEntity::getId,formDTO.getPartyServiceCenterId()); + IcPartyServiceCenterEntity record = baseDao.selectOne(l); + if (null != record){ + throw new RenException(EpmetErrorCode.PARTY_SERVICE_CENTER_ERROR.getCode()); + } + IcPartyServiceCenterEntity centerEntity = ConvertUtils.sourceToTarget(formDTO, IcPartyServiceCenterEntity.class); + centerEntity.setId(formDTO.getPartyServiceCenterId()); + baseDao.updateById(centerEntity); + if (CollectionUtils.isNotEmpty(formDTO.getMatterList())){ + List matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); + matters.forEach(m -> { + m.setCustomerId(tokenDto.getCustomerId()); + m.setPartyServiceCenterId(formDTO.getPartyServiceCenterId()); + }); + matterService.insertBatch(matters); + } + } + + /** + * @Description 事项删除 + * @param formDTO + * @author zxc + * @date 2021/11/22 1:25 下午 + */ + @Override + public void delMatter(DelMatterFormDTO formDTO) { + LambdaQueryWrapper re = new LambdaQueryWrapper<>(); + re.eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO). + eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()). + ge(IcMatterAppointmentRecordEntity::getAppointmentDate, LocalDate.now()); + List appointmentRecords = matterAppointmentRecordDao.selectList(re); + if (CollectionUtils.isNotEmpty(appointmentRecords)){ + throw new RenException(EpmetErrorCode.MATTER_EXISTS_APPOINTMENT_ERROR.getCode()); + } + matterService.deleteById(formDTO.getMatterId()); + } + + /** + * @Description 预约 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 2:06 下午 + */ + @Override + public void appointment(AppointmentFormDTO formDTO, TokenDto tokenDto) { + String customerId = tokenDto.getCustomerId(); + LambdaQueryWrapper l = new LambdaQueryWrapper<>(); + l.eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()) + .eq(IcMatterAppointmentRecordEntity::getAppointmentDate,formDTO.getAppointmentDate()) + .eq(IcMatterAppointmentRecordEntity::getStatus,PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING) + .eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO); + List records = matterAppointmentRecordDao.selectList(l); + if (CollectionUtils.isNotEmpty(records)){ + List timeIds = new ArrayList<>(); + records.forEach(r -> { + timeIds.addAll(Arrays.asList(r.getTimeId().split(","))); + }); + if (timeIds.retainAll(Arrays.asList(formDTO.getTimeId().split(",")))){ + throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); + } + } + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); + if (null == staffInfo){ + throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); + } + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + if (null == agencyInfo){ + throw new RenException(String.format("查询组织信息失败%s",staffInfo.getAgencyId())); + } + IcMatterAppointmentRecordEntity e = ConvertUtils.sourceToTarget(formDTO, IcMatterAppointmentRecordEntity.class); + e.setCustomerId(customerId); + e.setOrgId(staffInfo.getAgencyId()); + e.setOrgType(PartyServiceCenterConstant.ORG_TYPE_AGENCY); + e.setPid(agencyInfo.getPid()); + e.setPids(agencyInfo.getPids()); + e.setStatus(PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING); + matterAppointmentRecordDao.insert(e); + } + + /** + * @Description 党群服务中心列表 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2021/11/22 2:47 下午 + */ + @Override + public List partyServiceCenterList(PartyServiceCenterListFormDTO formDTO, TokenDto tokenDto) { + if (StringUtils.isBlank(formDTO.getOrgId())){ + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); + } + formDTO.setOrgId(staffInfo.getAgencyId()); + } + List result = baseDao.partyServiceCenterList(formDTO.getOrgId()); + if (CollectionUtils.isNotEmpty(result)){ + result.forEach(r -> { + if (CollectionUtils.isNotEmpty(r.getMatterList())){ + final Integer[] sort = {NumConstant.ONE}; + r.getMatterList().forEach(m -> { + m.setSort(sort[NumConstant.ZERO]++); + }); + } + }); + } + return result; + } + + /** + * @Description 【党群服务中心】点击预约按钮时,查询可选时间 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:02 上午 + */ + @Override + public AppointmentTimeResultDTO appointmentTime(AppointmentTimeFormDTO formDTO) { + AppointmentTimeResultDTO result = new AppointmentTimeResultDTO(); + IcPartyServiceCenterMatterEntity matter = matterService.selectById(formDTO.getMatterId()); + if (null == matter){ + throw new RenException("事项不存在..."); + } + result.setAppointmentType(matter.getAppointmentType()); + LambdaQueryWrapper l = new LambdaQueryWrapper<>(); + l.eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()) + .eq(IcMatterAppointmentRecordEntity::getAppointmentDate,formDTO.getDate()) + .eq(IcMatterAppointmentRecordEntity::getStatus,PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING) + .eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO); + List records = matterAppointmentRecordDao.selectList(l); + List timeList = getTimeList(matter.getStartTime(), matter.getEndTime(), NumConstant.THIRTY); + if (formDTO.getDate().equals(LocalDate.now().toString())){ + LocalDateTime now = LocalDateTime.now(); + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + for (TimeDTO t : timeList) { + List list = Arrays.asList(t.getTime().split("-")); + String concat = formDTO.getDate().concat(" ").concat(list.get(NumConstant.ONE)).concat(":00"); + LocalDateTime parse = LocalDateTime.parse(concat, df); + t.setIsAppointment(parse.isAfter(now)); + } + } + if (LocalDate.now().isAfter(LocalDate.parse(formDTO.getDate()))){ + timeList.forEach(t -> { + t.setIsAppointment(false); + }); + result.setTimeDetail(timeList); + return result; + } + if (CollectionUtils.isNotEmpty(records)){ + records.forEach(r -> { + String[] split = r.getTimeId().split(","); + for (String s : split) { + for (TimeDTO t : timeList) { + if (s.equals(t.getTimeId())){ + t.setIsAppointment(false); + break; + } + } + } + }); + } + result.setTimeDetail(timeList); + return result; + } + + /** + * @Description 【党群服务中心】预约记录 + * @param formDTO + * @author zxc + * @date 2021/11/23 10:50 上午 + */ + @Override + public List appointmentRecord(AppointmentRecordFormDTO formDTO) { + List result = matterAppointmentRecordDao.appointmentRecord(formDTO.getMatterId(), formDTO.getDate()); + if (CollectionUtils.isEmpty(result)){ + return new ArrayList<>(); + } + IcPartyServiceCenterMatterEntity matter = matterService.selectById(formDTO.getMatterId()); + if (null == matter){ + throw new RenException("事项不存在..."); + } + List timeList = getTimeList(matter.getStartTime(), matter.getEndTime(), NumConstant.THIRTY); + AtomicReference sort = new AtomicReference<>(NumConstant.ONE); + result.forEach(r -> { + r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); + List time = new ArrayList<>(); + List list = Arrays.asList(r.getTimeId().split(",")); + list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime()))); + r.setAppointmentTime(time); + }); + return result; + } + + public List getTimeList(String start,String end,Integer interval){ + List result = new ArrayList<>(); + List intervalTimeList = getIntervalTimeList(start, end, interval); + Integer sort = NumConstant.ONE; + for (int i = NumConstant.ZERO; i < intervalTimeList.size(); i++) { + if (i + NumConstant.ONE >= intervalTimeList.size()){ + return result; + } + TimeDTO timeDTO = new TimeDTO(); + timeDTO.setTime(intervalTimeList.get(i) + "-" + intervalTimeList.get(i + NumConstant.ONE)); + timeDTO.setTimeId(String.valueOf(sort++)); + result.add(timeDTO); + } + return result; + } + + /** + * @Description 获取固定时间段之间固定时间的集合 + * @param start 开始时间 + * @param end 结束时间 + * @param interval 间隔时间 + * @author zxc + * @date 2021/11/22 3:48 下午 + */ + public List getIntervalTimeList(String start,String end,Integer interval) { + Date startDate = convertStringToDate("HH:mm", start); + Date endDate = convertStringToDate("HH:mm", end); + List list = new ArrayList<>(); + while (startDate.getTime() <= endDate.getTime()) { + list.add(convertDateToString("HH:mm", startDate)); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.MINUTE, interval); + if (calendar.getTime().getTime() > endDate.getTime()) { + if (!startDate.equals(endDate)) { + list.add(convertDateToString("HH:mm", endDate)); + } + startDate = calendar.getTime(); + } else { + startDate = calendar.getTime(); + } + + } + return list; + } + + + public Date convertStringToDate(String format, String dateStr) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); + try { + Date date = simpleDateFormat.parse(dateStr); + return date; + } catch (ParseException e) { + e.printStackTrace(); + } + return null; + } + + public String convertDateToString(String format, Date date) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); + return simpleDateFormat.format(date); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java new file mode 100644 index 0000000000..f3dbe0bf65 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java @@ -0,0 +1,154 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.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.IcPlaceOrgDao; +import com.epmet.dto.form.AddPlaceOrgFormDTO; +import com.epmet.dto.form.EditPlaceOrgFormDTO; +import com.epmet.dto.form.GetListPlaceOrgFormDTO; +import com.epmet.dto.result.GetListPlaceOrgResultDTO; +import com.epmet.dto.result.PlaceOrgDetailResultDTO; +import com.epmet.entity.IcPlaceOrgEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.service.IcPlaceOrgService; +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.List; + +/** + * 九小场所下组织管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPlaceOrgServiceImpl extends BaseServiceImpl implements IcPlaceOrgService { + private static final Logger log = LoggerFactory.getLogger(IcPlaceOrgServiceImpl.class); + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + + /** + * @Author sun + * @Description 新增九小场所下组织 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void add(AddPlaceOrgFormDTO formDTO) { + IcPlaceOrgEntity entity = ConvertUtils.sourceToTarget(formDTO, IcPlaceOrgEntity.class); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + entity.setAgencyId(staffInfoCache.getAgencyId()); + entity.setPids(staffInfoCache.getAgencyPIds()); + insert(entity); + } + + /** + * @Author sun + * @Description 修改九小场所下组织 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void edit(EditPlaceOrgFormDTO formDTO) { + IcPlaceOrgEntity entity = baseDao.selectById(formDTO.getPlaceOrgId()); + if (null == entity) { + throw new RenException(String.format("修改九小场所下场所信息失败,场所不存在,场所Id->%s", formDTO.getPlaceOrgId())); + } + entity = ConvertUtils.sourceToTarget(formDTO, IcPlaceOrgEntity.class); + entity.setId(formDTO.getPlaceOrgId()); + baseDao.updateById(entity); + } + + /** + * @Author sun + * @Description 删除九小场所下组织 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void del(String placeOrgId) { + if (baseDao.deleteById(placeOrgId) < NumConstant.ONE) { + throw new RenException(String.format("删除九小场所下场所信息失败,场所Id->%s", placeOrgId)); + } + } + + /** + * @Author sun + * @Description 九小场所下组织详情 + **/ + @Override + public PlaceOrgDetailResultDTO detail(String placeOrgId) { + PlaceOrgDetailResultDTO resultDTO = new PlaceOrgDetailResultDTO(); + //1.查询场所基础信息 + GetListPlaceOrgFormDTO dto = new GetListPlaceOrgFormDTO(); + dto.setPlaceOrgId(placeOrgId); + List result = baseDao.getList(dto); + if (CollectionUtils.isEmpty(result)) { + return resultDTO; + } + resultDTO = result.get(0); + //2.查询九小场所信息 + Result> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!result1.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + for (OptionResultDTO d : result1.getData()) { + if (d.getValue().equals(resultDTO.getNinePlaceVal())) { + resultDTO.setNinePlaceName(d.getLabel()); + } + } + return resultDTO; + } + + /** + * @Author sun + * @Description 九小场所下组织列表查询 + **/ + @Override + public GetListPlaceOrgResultDTO getList(GetListPlaceOrgFormDTO formDTO) { + GetListPlaceOrgResultDTO resultDTO = new GetListPlaceOrgResultDTO(); + //1.根据查询条件分页查询场所数据 + PageInfo result = + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); + if (CollectionUtils.isEmpty(result.getList())) { + return resultDTO; + } + resultDTO.setTotal((int) result.getTotal()); + //2.查询九小场所信息 + Result> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!result1.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + result.getList().forEach(r -> result1.getData().stream().filter(u -> r.getNinePlaceVal().equals(u.getValue())).forEach(u -> r.setNinePlaceName(u.getLabel()))); + resultDTO.setList(result.getList()); + + return resultDTO; + } +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java new file mode 100644 index 0000000000..ab8d20776f --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java @@ -0,0 +1,188 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.LambdaQueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.IcPlacePatrolRecordDao; +import com.epmet.dao.IcPlacePatrolTeamStaffDao; +import com.epmet.dto.CustomerGridDTO; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.dto.form.AddPlacePatrolRecordFormDTO; +import com.epmet.dto.form.GetListPlacePatrolRecordFormDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.*; +import com.epmet.entity.IcHouseEntity; +import com.epmet.entity.IcPlacePatrolRecordEntity; +import com.epmet.entity.IcPlacePatrolTeamEntity; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.service.IcPlacePatrolRecordService; +import com.epmet.service.IcPlacePatrolReviewRecordService; +import com.epmet.service.IcPlacePatrolTeamService; +import com.epmet.service.IcPlacePatrolTeamStaffService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 场所巡查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl implements IcPlacePatrolRecordService { + private static final Logger log = LoggerFactory.getLogger(IcPlaceOrgServiceImpl.class); + @Autowired + private IcPlacePatrolReviewRecordService icPlacePatrolReviewRecordService; + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + @Autowired + private IcPlacePatrolTeamStaffDao icPlacePatrolTeamStaffDao; + + + /** + * @Author sun + * @Description 新增场所巡查记录 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void add(AddPlacePatrolRecordFormDTO formDTO) { + IcPlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolRecordEntity.class); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + entity.setAgencyId(staffInfoCache.getAgencyId()); + entity.setPids(staffInfoCache.getAgencyPIds()); + entity.setFinalResult(entity.getFirstResult()); + entity.setFinalTime(entity.getFirstTime()); + insert(entity); + } + + /** + * @Author sun + * @Description 删除场所巡查记录 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void del(String staffId, String placePatrolRecordId) { + //1.删除巡查记录主表数据 + if (baseDao.deleteById(placePatrolRecordId) < NumConstant.ONE) { + throw new RenException(String.format("删除场所巡查记录信息失败,巡查Id->%s", placePatrolRecordId)); + } + //2.删除复查记录附表数据 + icPlacePatrolReviewRecordService.delByPatrolRecordId(staffId, placePatrolRecordId); + } + + /** + * @Author sun + * @Description 场所巡查记录详情 + **/ + @Override + public PlacePatrolRecordDetailResultDTO detail(String placePatrolRecordId) { + PlacePatrolRecordDetailResultDTO resultDTO = new PlacePatrolRecordDetailResultDTO(); + //1.查询场所基础信息 + GetListPlacePatrolRecordFormDTO dto = new GetListPlacePatrolRecordFormDTO(); + dto.setPlacePatrolRecordId(placePatrolRecordId); + List result = baseDao.getList(dto); + if (CollectionUtils.isEmpty(result)) { + return resultDTO; + } + resultDTO = result.get(0); + + //2.查询九小场所信息 + Result> nineList = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!nineList.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + + //3.封装九小场所数据 + for (OptionResultDTO n : nineList.getData()){ + if(resultDTO.getNinePlaceVal().equals(n.getValue())){ + resultDTO.setNinePlaceName(n.getLabel()); + } + } + + return resultDTO; + } + + /** + * @Author sun + * @Description 场所巡查记录列表查询 + **/ + @Override + public GetListPlacePatrolRecordResultDTO getList(GetListPlacePatrolRecordFormDTO formDTO) { + GetListPlacePatrolRecordResultDTO resultDTO = new GetListPlacePatrolRecordResultDTO(); + //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.查询九小场所信息 + Result> nineList = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!nineList.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + + //3.查询所有分队下人员名单 + List teamIds = result.getList().stream().map(PlacePatrolRecordDetailResultDTO::getPlacePatrolTeamId).collect(Collectors.toList()); + teamIds = teamIds.stream().distinct().collect(Collectors.toList()); + List teamDTOList = icPlacePatrolTeamStaffDao.selectByTeamIds(teamIds); + //4.封装九小场所、分队人员数据 + for (PlacePatrolRecordDetailResultDTO dto : result.getList()){ + //九小场所 + nineList.getData().forEach(n->{ + if(dto.getNinePlaceVal().equals(n.getValue())){ + dto.setNinePlaceName(n.getLabel()); + } + }); + //分队成员 + StringBuffer inspectorsNames = new StringBuffer(""); + for (String str : dto.getInspectors().split(",")) { + teamDTOList.forEach(r -> { + if (str.equals(r.getId())) { + inspectorsNames.append("".equals(inspectorsNames) ? r.getName() : "," + r.getName()); + } + }); + } + dto.setInspectorsNames(inspectorsNames.toString()); + } + + resultDTO.setList(result.getList()); + return resultDTO; + } +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java new file mode 100644 index 0000000000..ae5463de04 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolReviewRecordServiceImpl.java @@ -0,0 +1,211 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.toolkit.StringUtils; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.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.IcPlacePatrolReviewRecordDao; +import com.epmet.dao.IcPlacePatrolTeamStaffDao; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.GetListPlacePatrolRecordResultDTO; +import com.epmet.dto.result.GetListPlacePatrolReviewRecordResultDTO; +import com.epmet.dto.result.PlacePatrolRecordDetailResultDTO; +import com.epmet.dto.result.PlacePatrolReviewRecordDetailResultDTO; +import com.epmet.entity.IcPlacePatrolRecordEntity; +import com.epmet.entity.IcPlacePatrolReviewRecordEntity; +import com.epmet.entity.IcPlacePatrolTeamEntity; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.service.IcPlacePatrolRecordService; +import com.epmet.service.IcPlacePatrolReviewRecordService; +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; + +/** + * 场所巡查复查记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPlacePatrolReviewRecordServiceImpl extends BaseServiceImpl implements IcPlacePatrolReviewRecordService { + private static final Logger log = LoggerFactory.getLogger(IcPlaceOrgServiceImpl.class); + @Autowired + private IcPlacePatrolRecordService icPlacePatrolRecordService; + @Autowired + private IcPlacePatrolTeamStaffDao icPlacePatrolTeamStaffDao; + + + /** + * @Author sun + * @Description 新增巡查复查记录 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void add(AddPlacePatrolReviewRecordFormDTO formDTO) { + //1.复查记录表新增数据 + IcPlacePatrolReviewRecordEntity entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolReviewRecordEntity.class); + insert(entity); + //2.修改巡查记录数据最新巡查时间和结果 + IcPlacePatrolRecordEntity recordEntity = new IcPlacePatrolRecordEntity(); + recordEntity.setId(entity.getPlacePatrolRecordId()); + recordEntity.setFinalResult(entity.getReviewResult()); + recordEntity.setFinalTime(entity.getReviewTime()); + icPlacePatrolRecordService.updateById(recordEntity); + + } + + /** + * @Author sun + * @Description 修改巡查复查记录 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void edit(EditPlacePatrolReviewRecordFormDTO formDTO) { + //1.修改复查记录表数据 + IcPlacePatrolReviewRecordEntity entity = baseDao.selectById(formDTO.getPlacePatrolReviewRecordId()); + if (null == entity) { + throw new RenException(String.format("修改巡查复查记录信息失败,复查记录不存在,复查记录Id->%s", formDTO.getPlacePatrolReviewRecordId())); + } + entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolReviewRecordEntity.class); + entity.setId(formDTO.getPlacePatrolReviewRecordId()); + baseDao.updateById(entity); + //2.复查记录修改了复查时间或复查结果时对应修改巡查记录数据最新巡查时间和结果 + if (StringUtils.isNotEmpty(formDTO.getReviewResult()) || StringUtils.isNotEmpty(formDTO.getReviewTime().toString())) { + IcPlacePatrolRecordEntity recordEntity = new IcPlacePatrolRecordEntity(); + recordEntity.setId(entity.getPlacePatrolRecordId()); + if (StringUtils.isNotEmpty(formDTO.getReviewResult()) || StringUtils.isNotEmpty(formDTO.getReviewTime().toString())) { + recordEntity.setFinalResult(entity.getReviewResult()); + } + if (StringUtils.isNotEmpty(formDTO.getReviewTime().toString())) { + recordEntity.setFinalTime(entity.getReviewTime()); + } + icPlacePatrolRecordService.updateById(recordEntity); + } + + } + + /** + * @Author sun + * @Description 删除巡查复查记录 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void del(String placePatrolReviewRecordId) { + if (baseDao.deleteById(placePatrolReviewRecordId) < NumConstant.ONE) { + throw new RenException(String.format("删除巡查复查记录信息失败,复查记录Id->%s", placePatrolReviewRecordId)); + } + } + + /** + * @Author sun + * @Description 巡查复查记录详情 + **/ + @Override + public PlacePatrolReviewRecordDetailResultDTO detail(String placePatrolReviewRecordId) { + PlacePatrolReviewRecordDetailResultDTO resultDTO = new PlacePatrolReviewRecordDetailResultDTO(); + //1.查询场所基础信息 + GetListPlacePatrolReviewRecordFormDTO dto = new GetListPlacePatrolReviewRecordFormDTO(); + dto.setPlacePatrolReviewRecordId(placePatrolReviewRecordId); + List result = baseDao.getList(dto); + if (CollectionUtils.isEmpty(result)) { + return resultDTO; + } + resultDTO = result.get(0); + + //2.查询所有分队下人员名单 + List teamDTOList = icPlacePatrolTeamStaffDao.getByTeamId(resultDTO.getPlacePatrolTeamId()); + //3.封装九小场所数据 + StringBuffer inspectorsNames = new StringBuffer(""); + for (String str : resultDTO.getInspectors().split(",")) { + teamDTOList.forEach(r -> { + if (str.equals(r.getId())) { + inspectorsNames.append("".equals(inspectorsNames) ? r.getName() : "," + r.getName()); + } + }); + } + resultDTO.setInspectorsNames(inspectorsNames.toString()); + + return resultDTO; + } + + /** + * @Author sun + * @Description 巡查复查记录列表查询 + **/ + @Override + public GetListPlacePatrolReviewRecordResultDTO getList(GetListPlacePatrolReviewRecordFormDTO formDTO) { + GetListPlacePatrolReviewRecordResultDTO resultDTO = new GetListPlacePatrolReviewRecordResultDTO(); + //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.查询所有分队下人员名单 + List teamIds = result.getList().stream().map(PlacePatrolReviewRecordDetailResultDTO::getPlacePatrolTeamId).collect(Collectors.toList()); + teamIds = teamIds.stream().distinct().collect(Collectors.toList()); + List teamDTOList = icPlacePatrolTeamStaffDao.selectByTeamIds(teamIds); + + //3.封装各分队人员数据 + for (PlacePatrolReviewRecordDetailResultDTO dto : result.getList()) { + //分队成员 + StringBuffer inspectorsNames = new StringBuffer(""); + for (String str : dto.getInspectors().split(",")) { + teamDTOList.forEach(r -> { + if (str.equals(r.getId())) { + inspectorsNames.append("".equals(inspectorsNames) ? r.getName() : "," + r.getName()); + } + }); + } + dto.setInspectorsNames(inspectorsNames.toString()); + } + + resultDTO.setList(result.getList()); + return resultDTO; + } + + /** + * @Author sun + * @Description 删除巡查记录对应的复查记录 + **/ + @Override + public int delByPatrolRecordId(String staffId, String placePatrolRecordId) { + return baseDao.delByPatrolRecordId(staffId, placePatrolRecordId); + } +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java new file mode 100644 index 0000000000..4a73f3b5e0 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -0,0 +1,254 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.CustomerGridDao; +import com.epmet.dao.IcPlacePatrolTeamDao; +import com.epmet.dto.CustomerGridDTO; +import com.epmet.dto.form.AddPlacePatrolTeamFormDTO; +import com.epmet.dto.form.EditPlacePatrolTeamFormDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.dto.result.PlacePatrolTeamDetailResultDTO; +import com.epmet.entity.IcPlacePatrolTeamEntity; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.service.IcPlacePatrolTeamService; +import com.epmet.service.IcPlacePatrolTeamStaffService; +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; + +/** + * 场所分队管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl implements IcPlacePatrolTeamService { + private static final Logger log = LoggerFactory.getLogger(IcPlacePatrolTeamServiceImpl.class); + @Autowired + private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; + @Autowired + private IcPlacePatrolTeamStaffService placePatrolTeamStaffService; + @Autowired + private CustomerGridDao customerGridDao; + + /** + * @Author sun + * @Description 新增九小场所巡查分队人员管理 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void add(AddPlacePatrolTeamFormDTO formDTO) { + //1.分队主表新增数据 + IcPlacePatrolTeamEntity entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolTeamEntity.class); + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + entity.setAgencyId(staffInfoCache.getAgencyId()); + entity.setPids(staffInfoCache.getAgencyPIds()); + insert(entity); + //2.分队成员表新增数据 + List entityList = new ArrayList<>(); + formDTO.getMemberList().forEach(m -> { + IcPlacePatrolTeamStaffEntity entity1 = new IcPlacePatrolTeamStaffEntity(); + entity1.setCustomerId(formDTO.getCustomerId()); + entity1.setPlacePatrolTeamId(entity.getId()); + entity1.setName(m.getName()); + entity1.setMobile(m.getMobile()); + entityList.add(entity1); + }); + placePatrolTeamStaffService.insertBatch(entityList); + + } + + /** + * @Author sun + * @Description 修改九小场所巡查分队人员管理数据 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void edit(EditPlacePatrolTeamFormDTO formDTO) { + //1.修改分队主表信息 + IcPlacePatrolTeamEntity entity = baseDao.selectById(formDTO.getTeamId()); + if (null == entity) { + throw new RenException(String.format("修改九小场所下巡查分队人员信息失败,分队信息不存在,分队Id->%s", formDTO.getTeamId())); + } + entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolTeamEntity.class); + entity.setId(formDTO.getTeamId()); + baseDao.updateById(entity); + //2.全删全增分队成员字表数据 + List entityList = new ArrayList<>(); + for (EditPlacePatrolTeamFormDTO.Member m : formDTO.getMemberList()) { + IcPlacePatrolTeamStaffEntity entity1 = new IcPlacePatrolTeamStaffEntity(); + entity1.setCustomerId(entity.getCustomerId()); + entity1.setPlacePatrolTeamId(entity.getId()); + entity1.setName(m.getName()); + entity1.setMobile(m.getMobile()); + entityList.add(entity1); + } + placePatrolTeamStaffService.delByTeamId(formDTO.getTeamId()); + placePatrolTeamStaffService.insertBatch(entityList); + + } + + /** + * @Author sun + * @Description 删除九小场所巡查分队人员管理数据 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void del(String teamId) { + //1.删除分队主表数据 + if (baseDao.deleteById(teamId) < NumConstant.ONE) { + throw new RenException(String.format("删除九小场所下分队信息失败,分队Id->%s", teamId)); + } + //2.删除分队成员字表数据 + placePatrolTeamStaffService.delByTeamId(teamId); + } + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理详情 + **/ + @Override + public PlacePatrolTeamDetailResultDTO detail(String teamId) { + PlacePatrolTeamDetailResultDTO resultDTO = new PlacePatrolTeamDetailResultDTO(); + //1.查询场所基础信息 + GetListPlacePatrolTeamFormDTO dto = new GetListPlacePatrolTeamFormDTO(); + dto.setTeamId(teamId); + List result = baseDao.getList(dto); + if (CollectionUtils.isEmpty(result)) { + return resultDTO; + } + resultDTO = result.get(0); + + //2.查询网格信息 + List gridIds = new ArrayList<>(); + for (String str : resultDTO.getGridIds().split(",")) { + gridIds.add(str); + } + gridIds = gridIds.stream().distinct().collect(Collectors.toList()); + List gridList = customerGridDao.selectGridListByIds(gridIds); + + //3.查询九小场所信息 + Result> nineList = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!nineList.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + + //4.分别封装网格。九小场所数据 + //网格 + StringBuffer gridNames = new StringBuffer(""); + for (String str : resultDTO.getGridIds().split(",")) { + gridList.forEach(r -> { + if (str.equals(r.getGridName())) { + gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + } + }); + } + resultDTO.setGridNames(gridNames.toString()); + //九小场所 + StringBuffer ninePlaceNames = new StringBuffer(""); + for (String str : resultDTO.getNinePlaceVals().split(",")) { + nineList.getData().forEach(r -> { + if (str.equals(r.getValue())) { + ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + } + }); + } + resultDTO.setNinePlaceNames(ninePlaceNames.toString()); + + return resultDTO; + } + + /** + * @Author sun + * @Description 九小场所巡查分队人员管理列表查询 + **/ + @Override + public GetListPlacePatrolTeamResultDTO getList(GetListPlacePatrolTeamFormDTO formDTO) { + GetListPlacePatrolTeamResultDTO resultDTO = new GetListPlacePatrolTeamResultDTO(); + //1.根据条件查询分队及成员数据 + PageInfo result = + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getList(formDTO)); + if (CollectionUtils.isEmpty(result.getList())) { + return resultDTO; + } + resultDTO.setTotal((int) result.getTotal()); + + //2.查询网格信息 + List gridIds = new ArrayList<>(); + for (PlacePatrolTeamDetailResultDTO dto : result.getList()) { + for (String str : dto.getGridIds().split(",")) { + gridIds.add(str); + } + } + gridIds = gridIds.stream().distinct().collect(Collectors.toList()); + List gridList = customerGridDao.selectGridListByIds(gridIds); + + //3.查询九小场所信息 + Result> nineList = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); + if (!nineList.success()) { + throw new RenException("获取九小场所基本信息失败......"); + } + + //4.封装网格、九小场所数据 + for (PlacePatrolTeamDetailResultDTO dto : result.getList()) { + StringBuffer gridNames = new StringBuffer(""); + for (String str : dto.getGridIds().split(",")) { + gridList.forEach(r -> { + if (str.equals(r.getGridName())) { + gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + } + }); + } + dto.setGridNames(gridNames.toString()); + StringBuffer ninePlaceNames = new StringBuffer(""); + for (String str : dto.getNinePlaceVals().split(",")) { + nineList.getData().forEach(r -> { + if (str.equals(r.getValue())) { + ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + } + }); + } + dto.setNinePlaceNames(ninePlaceNames.toString()); + } + + resultDTO.setList(result.getList()); + return resultDTO; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java new file mode 100644 index 0000000000..f8ca6fc890 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamStaffServiceImpl.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.IcPlacePatrolTeamStaffDao; +import com.epmet.dto.IcPlacePatrolTeamStaffDTO; +import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO; +import com.epmet.dto.result.GetListPlacePatrolTeamResultDTO; +import com.epmet.entity.IcPlacePatrolTeamStaffEntity; +import com.epmet.service.IcPlacePatrolTeamStaffService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 场所分队下人员管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPlacePatrolTeamStaffServiceImpl extends BaseServiceImpl implements IcPlacePatrolTeamStaffService { + + + + /** + * @Author sun + * @Description 删除分队下成员信息 + **/ + @Override + public int delByTeamId(String teamId) { + return baseDao.delByTeamId(teamId); + } + + @Override + public List getList(String teamId) { + return baseDao.getByTeamId(teamId); + } + +} \ 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 deleted file mode 100644 index a6be788df8..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlaceOrgServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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 deleted file mode 100644 index 6953888aac..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolRecordServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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 deleted file mode 100644 index 532bbc2545..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolReviewRecordServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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 deleted file mode 100644 index e7696ba4f9..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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 deleted file mode 100644 index c44ec42a76..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PlacePatrolTeamStaffServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for 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/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml index 0602d34e44..c77ebceca6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -3,4 +3,19 @@ + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml index c309bcd54b..db25c15da0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml @@ -3,4 +3,39 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml index 4953af937a..f765126687 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterMatterDao.xml @@ -3,4 +3,11 @@ + + + DELETE FROM ic_party_service_center_matter + WHERE DEL_FLAG = 0 + AND PARTY_SERVICE_CENTER_ID = #{partyServiceCenterId} + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml new file mode 100644 index 0000000000..4d04a72530 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml @@ -0,0 +1,46 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml new file mode 100644 index 0000000000..efde00da1e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolRecordDao.xml @@ -0,0 +1,48 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolReviewRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolReviewRecordDao.xml new file mode 100644 index 0000000000..5151dfe91b --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolReviewRecordDao.xml @@ -0,0 +1,45 @@ + + + + + + + UPDATE + ic_place_patrol_review_record + SET + del_flag = '1', + updated_by = #{staffId}, + updated_time = NOW() + WHERE + place_patrol_record_id = #{placePatrolRecordId} + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml new file mode 100644 index 0000000000..99bbcb7886 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamDao.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml new file mode 100644 index 0000000000..7dddc8e731 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlacePatrolTeamStaffDao.xml @@ -0,0 +1,39 @@ + + + + + + + DELETE + FROM + ic_place_patrol_team_staff + WHERE + place_patrol_team_id = #{teamId} + + + + + + + \ 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 deleted file mode 100644 index 3fb8247c8b..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlaceOrgDao.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ 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 deleted file mode 100644 index 93cbf7d277..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolRecordDao.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ 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 deleted file mode 100644 index bf558e052d..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolReviewRecordDao.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ 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 deleted file mode 100644 index 2e889eb2dd..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamDao.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ 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 deleted file mode 100644 index 26bebdb857..0000000000 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/PlacePatrolTeamStaffDao.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleDTO.java new file mode 100644 index 0000000000..1bfdc10d0b --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleDTO.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.resi.partymember.dto.partymember; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartymemberStyleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 楼栋主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + private String gridName; + + /** + * 党员姓名 + */ + private String name; + + /** + * 主要事迹 + */ + private String mainDeed; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + private List imageList; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiDemandDictDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleImageDTO.java similarity index 75% rename from epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiDemandDictDTO.java rename to epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleImageDTO.java index ccdb6f5752..0a39e3dc8e 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiDemandDictDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartymemberStyleImageDTO.java @@ -15,22 +15,21 @@ * along with this program. If not, see . */ -package com.epmet.dto; - -import lombok.Data; +package com.epmet.resi.partymember.dto.partymember; import java.io.Serializable; import java.util.Date; +import lombok.Data; /** - * 居民需求字典表 + * 党员风采图片 * * @author generator generator@elink-cn.com - * @since v1.0.0 2021-10-27 + * @since v1.0.0 2021-11-18 */ @Data -public class IcResiDemandDictDTO implements Serializable { +public class IcPartymemberStyleImageDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -40,34 +39,19 @@ public class IcResiDemandDictDTO implements Serializable { private String id; /** - * 客户Id customer.id + * 客户ID */ private String customerId; /** - * 父级 - */ - private String parentCode; - - /** - * 字典值 - */ - private String categoryCode; - - /** - * 字典描述 - */ - private String categoryName; - - /** - * 级别 + * 党员风采ID */ - private String level; + private String styleId; /** - * 备注 + * 图片地址 */ - private String remark; + private String imageUrl; /** * 排序 @@ -75,7 +59,7 @@ public class IcResiDemandDictDTO implements Serializable { private Integer sort; /** - * 删除标识:0.未删除 1.已删除 + * 删除标识 0.未删除 1.已删除 */ private Integer delFlag; diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java new file mode 100644 index 0000000000..5b80fc1642 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/PartyMemberStyleFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/11/19 9:49 + */ +@NoArgsConstructor +@Data +public class PartyMemberStyleFormDTO implements Serializable { + private static final long serialVersionUID = 4743261460276449408L; + private String agencyId; + private String gridId; + private String name; + private String mainDeed; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java new file mode 100644 index 0000000000..4e11bc658d --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.controller; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.modules.partymember.excel.IcPartymemberStyleExcel; +import com.epmet.modules.partymember.service.IcPartymemberStyleService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@RestController +@RequestMapping("icpartymemberstyle") +public class IcPartymemberStyleController { + + @Autowired + private IcPartymemberStyleService icPartymemberStyleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPartymemberStyleService.page(params); + return new Result>().ok(page); + } + + @PostMapping("detail") + public Result get(@RequestBody IcPartymemberStyleDTO dto){ + IcPartymemberStyleDTO data = icPartymemberStyleService.get(dto.getId()); + return new Result().ok(data); + } + + @PostMapping("save") + public Result save(@RequestBody IcPartymemberStyleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPartymemberStyleService.save(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody IcPartymemberStyleDTO dto){ + //效验数据 + icPartymemberStyleService.delete(dto.getId()); + return new Result(); + } + + @PostMapping("export") + public void export(@RequestBody PartyMemberStyleFormDTO formDTO, HttpServletResponse response) throws Exception { + List list = icPartymemberStyleService.search(formDTO).getList(); + AtomicInteger i = new AtomicInteger(NumConstant.ONE); + List result = list.stream().map(item -> { + IcPartymemberStyleExcel excel = new IcPartymemberStyleExcel(); + excel.setIndex(i.getAndIncrement()); + excel.setGridName(item.getGridName()); + excel.setName(item.getName()); + excel.setMainDeed(item.getMainDeed()); + return excel; + }).collect(Collectors.toList()); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartymemberStyleExcel.class); + } + + @PostMapping("list") + public Result> search(@RequestBody PartyMemberStyleFormDTO formDTO) { + return new Result>().ok(icPartymemberStyleService.search(formDTO)); + } + + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleImageController.java similarity index 62% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java rename to epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleImageController.java index a6caf1d1aa..cddd24d894 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlacePatrolReviewRecordController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleImageController.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.controller; +package com.epmet.modules.partymember.controller; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; @@ -23,11 +23,11 @@ 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 com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.modules.partymember.excel.IcPartymemberStyleImageExcel; +import com.epmet.modules.partymember.service.IcPartymemberStyleImageService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleImageDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -37,43 +37,43 @@ import java.util.Map; /** - * 场所巡查复查记录 + * 党员风采图片 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ @RestController -@RequestMapping("placepatrolreviewrecord") -public class PlacePatrolReviewRecordController { +@RequestMapping("icpartymemberstyleimage") +public class IcPartymemberStyleImageController { @Autowired - private PlacePatrolReviewRecordService placePatrolReviewRecordService; + private IcPartymemberStyleImageService icPartymemberStyleImageService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = placePatrolReviewRecordService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = icPartymemberStyleImageService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - PlacePatrolReviewRecordDTO data = placePatrolReviewRecordService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + IcPartymemberStyleImageDTO data = icPartymemberStyleImageService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody PlacePatrolReviewRecordDTO dto){ + public Result save(@RequestBody IcPartymemberStyleImageDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - placePatrolReviewRecordService.save(dto); + icPartymemberStyleImageService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody PlacePatrolReviewRecordDTO dto){ + public Result update(@RequestBody IcPartymemberStyleImageDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - placePatrolReviewRecordService.update(dto); + icPartymemberStyleImageService.update(dto); return new Result(); } @@ -81,14 +81,14 @@ public class PlacePatrolReviewRecordController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - placePatrolReviewRecordService.delete(ids); + icPartymemberStyleImageService.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); + List list = icPartymemberStyleImageService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPartymemberStyleImageExcel.class); } } \ 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/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleDao.java similarity index 81% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java rename to epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleDao.java index 8d501f16e9..de5966a068 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolRecordDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleDao.java @@ -15,19 +15,19 @@ * along with this program. If not, see . */ -package com.epmet.dao; +package com.epmet.modules.partymember.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.PlacePatrolRecordEntity; +import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; import org.apache.ibatis.annotations.Mapper; /** - * 场所巡查记录 + * 党员风采 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ @Mapper -public interface PlacePatrolRecordDao extends BaseDao { +public interface IcPartymemberStyleDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleImageDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleImageDao.java new file mode 100644 index 0000000000..34a43a8bfc --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartymemberStyleImageDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcPartymemberStyleImageDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleEntity.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleEntity.java new file mode 100644 index 0000000000..ad3e4afe9e --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleEntity.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_partymember_style") +public class IcPartymemberStyleEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 党员姓名 + */ + private String name; + + /** + * 主要事迹 + */ + private String mainDeed; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleImageEntity.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleImageEntity.java new file mode 100644 index 0000000000..1da117a7b2 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartymemberStyleImageEntity.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.entity; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_partymember_style_image") +public class IcPartymemberStyleImageEntity { + + private static final long serialVersionUID = 1L; + /** + * id + */ + @TableId(type = IdType.UUID) + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 党员风采ID + */ + private String styleId; + + /** + * 图片地址 + */ + private String imageUrl; + + /** + * 排序 + */ + private Integer sort; + + /** + * 乐观锁 + */ + @TableField(fill = FieldFill.INSERT) + private Integer revision; + + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT) + private String createdBy; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdTime; + + /** + * 修改者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private String updatedBy; + + /** + * 修改时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updatedTime; + + /** + * 是否已删除(0-未删除,1-已删除) + */ + @TableField(fill = FieldFill.INSERT) + private String delFlag; + +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleExcel.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleExcel.java new file mode 100644 index 0000000000..a64decdd9c --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleExcel.java @@ -0,0 +1,43 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartymemberStyleExcel { + + @Excel(name = "序号") + private Integer index; + + @Excel(name = "党员姓名") + private String name; + + @Excel(name = "所属网格") + private String gridName; + + @Excel(name = "主要事迹") + private String mainDeed; +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleImageExcel.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleImageExcel.java new file mode 100644 index 0000000000..6b97049997 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartymemberStyleImageExcel.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +public class IcPartymemberStyleImageExcel { + + @Excel(name = "唯一标识") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "党员风采ID") + private String styleId; + + @Excel(name = "图片地址") + private String imageUrl; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleImageService.java similarity index 60% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java rename to epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleImageService.java index ae73375c3a..43e101ed26 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolReviewRecordService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleImageService.java @@ -15,53 +15,53 @@ * along with this program. If not, see . */ -package com.epmet.service; +package com.epmet.modules.partymember.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 com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleImageDTO; import java.util.List; import java.util.Map; /** - * 场所巡查复查记录 + * 党员风采图片 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ -public interface PlacePatrolReviewRecordService extends BaseService { +public interface IcPartymemberStyleImageService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2021-11-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2021-11-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return PlacePatrolReviewRecordDTO + * @return IcPartymemberStyleImageDTO * @author generator * @date 2021-11-18 */ - PlacePatrolReviewRecordDTO get(String id); + IcPartymemberStyleImageDTO get(String id); /** * 默认保存 @@ -71,7 +71,7 @@ public interface PlacePatrolReviewRecordService extends BaseService} + * @Author zhaoqifeng + * @Date 2021/11/19 10:40 + */ + List getByStyleId(String styleId); } \ 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/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java similarity index 59% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java rename to epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java index 51d4885918..ca58a11dc8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolRecordService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartymemberStyleService.java @@ -15,53 +15,54 @@ * along with this program. If not, see . */ -package com.epmet.service; +package com.epmet.modules.partymember.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.PlacePatrolRecordDTO; -import com.epmet.entity.PlacePatrolRecordEntity; +import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; import java.util.List; import java.util.Map; /** - * 场所巡查记录 + * 党员风采 * * @author generator generator@elink-cn.com * @since v1.0.0 2021-11-18 */ -public interface PlacePatrolRecordService extends BaseService { +public interface IcPartymemberStyleService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2021-11-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2021-11-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return PlacePatrolRecordDTO + * @return IcPartymemberStyleDTO * @author generator * @date 2021-11-18 */ - PlacePatrolRecordDTO get(String id); + IcPartymemberStyleDTO get(String id); /** * 默认保存 @@ -71,25 +72,24 @@ public interface PlacePatrolRecordService extends BaseService} + * @Author zhaoqifeng + * @Date 2021/11/19 9:30 */ - void delete(String[] ids); + PageData search(PartyMemberStyleFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleImageServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleImageServiceImpl.java new file mode 100644 index 0000000000..8f0d323673 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleImageServiceImpl.java @@ -0,0 +1,137 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.modules.partymember.dao.IcPartymemberStyleImageDao; +import com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import com.epmet.modules.partymember.service.IcPartymemberStyleImageService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleImageDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 党员风采图片 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartymemberStyleImageServiceImpl extends BaseServiceImpl implements IcPartymemberStyleImageService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartymemberStyleImageDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartymemberStyleImageDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPartymemberStyleImageDTO get(String id) { + IcPartymemberStyleImageEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPartymemberStyleImageDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartymemberStyleImageDTO dto) { + IcPartymemberStyleImageEntity entity = ConvertUtils.sourceToTarget(dto, IcPartymemberStyleImageEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPartymemberStyleImageDTO dto) { + IcPartymemberStyleImageEntity entity = ConvertUtils.sourceToTarget(dto, IcPartymemberStyleImageEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 删除党员风采图片 + * + * @param styleId + * @Param styleId + * @Return + * @Author zhaoqifeng + * @Date 2021/11/19 10:14 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByStyleId(String styleId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartymemberStyleImageEntity::getStyleId, styleId); + baseDao.delete(wrapper); + } + + /** + * 获取党员风采图片 + * + * @param styleId + * @Param styleId + * @Return {@link List< String>} + * @Author zhaoqifeng + * @Date 2021/11/19 10:40 + */ + @Override + public List getByStyleId(String styleId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartymemberStyleImageEntity::getStyleId, styleId); + wrapper.orderByAsc(IcPartymemberStyleImageEntity::getSort); + List list = baseDao.selectList(wrapper); + return list.stream().map(IcPartymemberStyleImageEntity::getImageUrl).collect(Collectors.toList()); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java new file mode 100644 index 0000000000..654da767d8 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.modules.partymember.dao.IcPartymemberStyleDao; +import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; +import com.epmet.modules.partymember.entity.IcPartymemberStyleImageEntity; +import com.epmet.modules.partymember.service.IcPartymemberStyleImageService; +import com.epmet.modules.partymember.service.IcPartymemberStyleService; +import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; +import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * 党员风采 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Service +public class IcPartymemberStyleServiceImpl extends BaseServiceImpl implements IcPartymemberStyleService { + + @Resource + private IcPartymemberStyleImageService icPartymemberStyleImageService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPartymemberStyleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPartymemberStyleDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPartymemberStyleDTO get(String id) { + IcPartymemberStyleEntity entity = baseDao.selectById(id); + IcPartymemberStyleDTO dto = ConvertUtils.sourceToTarget(entity, IcPartymemberStyleDTO.class); + dto.setImageList(icPartymemberStyleImageService.getByStyleId(id)); + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPartymemberStyleDTO dto) { + IcPartymemberStyleEntity entity = ConvertUtils.sourceToTarget(dto, IcPartymemberStyleEntity.class); + if (StringUtils.isBlank(entity.getId())) { + insert(entity); + } else { + updateById(entity); + } + //删除原有的照片 + icPartymemberStyleImageService.deleteByStyleId(entity.getId()); + //保存新的照片 + if (CollectionUtils.isNotEmpty(dto.getImageList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getImageList().stream().map(item -> { + IcPartymemberStyleImageEntity e = new IcPartymemberStyleImageEntity(); + e.setStyleId(entity.getId()); + e.setImageUrl(item); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + icPartymemberStyleImageService.insertBatch(list); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String id) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteById(id); + } + + /** + * 查询列表 + * + * @param formDTO + * @Param formDTO + * @Return {@link PageData} + * @Author zhaoqifeng + * @Date 2021/11/19 9:30 + */ + @Override + public PageData search(PartyMemberStyleFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + //分页查询 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcPartymemberStyleEntity::getAgencyId, formDTO.getAgencyId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getGridId()), IcPartymemberStyleEntity::getGridId, formDTO.getGridId()); + wrapper.like(StringUtils.isNotBlank(formDTO.getName()), IcPartymemberStyleEntity::getName, formDTO.getName()); + wrapper.like(StringUtils.isNotBlank(formDTO.getMainDeed()), IcPartymemberStyleEntity::getMainDeed, formDTO.getMainDeed()); + List list = baseDao.selectList(wrapper); + List dtoList = ConvertUtils.sourceToTarget(list, IcPartymemberStyleDTO.class); + PageInfo pageInfo = new PageInfo<>(dtoList); + //设置网格名 + dtoList.forEach(item -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId()); + item.setGridName(gridInfo.getGridName()); + }); + return new PageData<>(dtoList, pageInfo.getTotal()); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleDao.xml new file mode 100644 index 0000000000..a8375fe173 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleImageDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleImageDao.xml new file mode 100644 index 0000000000..308d34d1e6 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartymemberStyleImageDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DemandUserFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DemandUserFormDTO.java new file mode 100644 index 0000000000..27e59a526d --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DemandUserFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +public class DemandUserFormDTO implements Serializable { + public interface InternalGroup { + } + +// public interface GridIdGroup extends CustomerClientShowGroup { +// } + + @NotBlank(message = "工作人员所属组织id不能为空", groups = InternalGroup.class) + private String agencyId; + +// @NotBlank(message = "请先选择所属网格", groups = GridIdGroup.class) + private String gridId; + + + private String name; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java new file mode 100644 index 0000000000..da8e6cfd07 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class DemandUserResDTO implements Serializable { + private String demandUserId; + private String demandUserName; + private String demandUserMobile; + private String label; + private String gridId; + private String idCard; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 73d97faf60..127beb5828 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 @@ -689,4 +689,15 @@ public class IcResiUserController { return new Result>>().ok(icResiUserService.getHomeUserCategoryCount(formDTO.getBuildId())); } + /** + * @LoginUser TokenDto tokenDto, + * 新增需求,需求人列表:展示当前工作人员所属组织+页面已选择所属网格 下的居民列表 + * @param formDTO + * @return + */ + @PostMapping("demandusers") + public Result> queryDemandUsers(@RequestBody DemandUserFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, DemandUserFormDTO.InternalGroup.class); + return new Result>().ok(icResiUserService.queryDemandUsers(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index 9897d01be7..186928372a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.ResiUserQueryValueDTO; +import com.epmet.dto.result.DemandUserResDTO; import com.epmet.dto.result.IcFormResColumnDTO; import com.epmet.dto.result.PersonDataResultDTO; import com.epmet.dto.result.SearchByNameResultDTO; @@ -145,4 +146,14 @@ public interface IcResiUserDao extends BaseDao { Map selectPersonType(@Param("columns")List columns,@Param("customerId")String customerId, @Param("tableName")String tableName,@Param("userId")String userId); + /** + * + * @param agencyId + * @param gridId + * @param name + * @return + */ + List selectDemandUsers(@Param("agencyId") String agencyId, + @Param("gridId")String gridId, + @Param("name")String name); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 2d8a3592bd..2b88399eab 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -139,4 +139,6 @@ public interface IcResiUserService extends BaseService { * @return */ List listFormItems(String customerId, String formCode); + + List queryDemandUsers(DemandUserFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 8b73150513..e03b401dd9 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 @@ -825,4 +825,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> result = operCustomizeOpenFeignClient.listItems(form); return getResultDataOrThrowsException(result, ServiceConstant.OPER_CUSTOMIZE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "查询表单相关信息失败", null); } + + @Override + public List queryDemandUsers(DemandUserFormDTO formDTO) { + return baseDao.selectDemandUsers(formDTO.getAgencyId(),formDTO.getGridId(),formDTO.getName()); + } } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 712e78ed81..311a451e20 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -271,4 +271,28 @@ AND IC_RESI_USER = #{userId} + + +