diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaTokenFormDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaTokenFormDTO.java index 901255fdd..c2e6a993a 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaTokenFormDTO.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaTokenFormDTO.java @@ -23,6 +23,11 @@ public class EpdcAppUserMaTokenFormDTO implements Serializable { @NotBlank(message = "微信code不能为空") private String wxCode; + /** + * APP识别不能为空 1、识别 不为Null即识别 + */ + private String reg; + /*@NotBlank(message = "用户信息不能为空") private String encryptedData; diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index a44e29288..33ad80317 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -73,8 +73,6 @@ public class AppUserServiceImpl implements AppUserService { private static final Logger logger = LoggerFactory.getLogger(AppUserServiceImpl.class); - private static final String WXCODE = "0b34C80w3YMmU03jsv3w3VFO5734C804"; - @Autowired private AppUserRedis appUserRedis; @@ -124,12 +122,12 @@ public class AppUserServiceImpl implements AppUserService { @Override public Result getMpToken(EpdcAppUserTokenFormDTO formDto) { - return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode())); + return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode(), "0")); } @Override public Result getMaToken(EpdcAppUserMaTokenFormDTO formDto) { - return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode())); + return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode(), formDto.getReg())); } @Override @@ -144,7 +142,7 @@ public class AppUserServiceImpl implements AppUserService { EpdcUserSaveWxFormIdFormDTO saveFormId = new EpdcUserSaveWxFormIdFormDTO(); saveFormId.setWxFormId(formDto.getWxFormId()); - saveFormId.setWxOpenId(this.getWxMaUser(formDto.getWxCode()).getOpenid()); + saveFormId.setWxOpenId(this.getWxMaUser(formDto.getWxCode(), "0").getOpenid()); return this.userFeignClient.saveWxFormId(saveFormId); } @@ -276,7 +274,7 @@ public class AppUserServiceImpl implements AppUserService { this.verifyUserRegisterData(formDto); - WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(formDto.getWxCode()); + WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(formDto.getWxCode(), "0"); UserDTO userDto = this.packageUserDto(formDto, null, wxMaUser); // IP地址 HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); @@ -345,7 +343,7 @@ public class AppUserServiceImpl implements AppUserService { */ private EpdcGridLeaderRegisterDTO packageGridLeaderWhileRegister(SysUserDTO sysUser, String wxCode) { - WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(wxCode); + WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(wxCode, "0"); Date now = new Date(); String mobile = sysUser.getMobile(); @@ -576,10 +574,10 @@ public class AppUserServiceImpl implements AppUserService { * @author work@yujt.net.cn * @date 2019/9/19 19:32 */ - private WxMaJscode2SessionResult getWxMaUser(String wxCode) { + private WxMaJscode2SessionResult getWxMaUser(String wxCode, String reg) { WxMaJscode2SessionResult wxMaJscode2SessionResult = null; try { - if (wxCode.equals(WXCODE)) { + if (StringUtils.isNotEmpty(reg)) { wxMaJscode2SessionResult = wxMaServiceUtils.analysisWxMaService().jsCode2SessionInfo(wxCode); } else { wxMaJscode2SessionResult = wxMaServiceUtils.normalWxMaService().jsCode2SessionInfo(wxCode); @@ -704,7 +702,7 @@ public class AppUserServiceImpl implements AppUserService { @Override public Result getMaV2Token(EpdcAppUserRegisterFormDTO formDto) { - WxMaJscode2SessionResult wxMaResult = this.getWxMaUser(formDto.getWxCode()); + WxMaJscode2SessionResult wxMaResult = this.getWxMaUser(formDto.getWxCode(), "0"); String openId = wxMaResult.getOpenid(); String unionId = wxMaResult.getUnionid(); @@ -913,7 +911,7 @@ public class AppUserServiceImpl implements AppUserService { String encryptedData = infoDto.getEncryptedData(); if (StringUtils.isNotBlank(wxCode)) { // 解析微信用户openid - WxMaJscode2SessionResult maJscode2SessionResult = getWxMaUser(wxCode); + WxMaJscode2SessionResult maJscode2SessionResult = getWxMaUser(wxCode, "0"); userDto.setWxOpenId(maJscode2SessionResult.getOpenid()); // 解析微信用户加密数据 if (StringUtils.isNotBlank(iv) && StringUtils.isNotBlank(encryptedData)) { diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ActivityPartyDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ActivityPartyDTO.java new file mode 100755 index 000000000..285a7dbb4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ActivityPartyDTO.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.user.dto.party; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; + + +/** + * 党员活动 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +public class ActivityPartyDTO implements Serializable { + + private static final long serialVersionUID = 8627064190462881427L; + /** + * 主键ID + */ + private String id; + + /** + * 党员ID + */ + private String[] reportPartyIds; + + /** + * 活动名称 + */ + private String title; + + /** + * 活动内容 + */ + private String content; + + /** + * 活动开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private String startDate; + + /** + * 活动结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private String endDate; + + /** + * 活动地址 + */ + private String address; + + /** + * 活动图片 + */ + private String imgs; + + /** + * 社区id + */ + private Long deptId; + + /** + * 父所有部门 + */ + private String parentDeptIds; + + /** + * 父所有部门 + */ + private String parentDeptNames; + + /** + * 所有部门ID + */ + private String allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; + + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/FlowPartyDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/FlowPartyDTO.java new file mode 100755 index 000000000..af72d08a6 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/FlowPartyDTO.java @@ -0,0 +1,93 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.user.dto.party; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 流动党员报道表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Data +public class FlowPartyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 流动党员ID + */ + private String id; + + /** + * 党员姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 是否自由职业 0、否 1、是 + */ + private Integer freelance; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 工作单位地址 + */ + private String workAddr; + + /** + * 居住网格id + */ + private Long deptId; + + private String[] allDeptIds; + + /*** + *父所有部门 + */ + private String parentDeptNames; + + /** + * 审核状态 0、待审核 1、审核通过 + */ + private Integer status; + + /** + * 现属党支部 + */ + private String partyName; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/IntoPartyDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/IntoPartyDTO.java new file mode 100755 index 000000000..2b96ee784 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/IntoPartyDTO.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.user.dto.party; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 申请入党表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +@Data +public class IntoPartyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private String id; + + /** + * 姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 电话 + */ + private String mobile; + + /** + * 是否自由职业者 0、否 1、是 + */ + private Integer freelance; + + /** + * 工作单位名称 + */ + private String workUnit; + + /** + * 工作单位地址 + */ + private String workAddr; + + /** + * 隶属社区 + */ + private String agencyId; + + /** + * 审核状态 0、待审核 1、审核通过 + */ + private Integer status; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/KnightPionnerDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/KnightPionnerDTO.java new file mode 100755 index 000000000..a3deb1241 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/KnightPionnerDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.user.dto.party; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 骑士先锋 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +public class KnightPionnerDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 骑士ID + */ + private String id; + + /** + * 姓名 + */ + private String name; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 是否党员 0、否 1、是 + */ + private Integer party; + + /** + * 是否外卖员、快递员 0、否 1、是 + */ + private Integer courier; + + /** + * 居住网格id + */ + private Long deptId; + + /** + * 父所有部门 + */ + private String parentDeptIds; + + /** + * 父所有部门 + */ + private String parentDeptNames; + + /** + * 所有部门ID + */ + private String[] allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/RedSpearheadDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/RedSpearheadDTO.java new file mode 100755 index 000000000..c173c6345 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/RedSpearheadDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.user.dto.party; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 红色尖兵 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +public class RedSpearheadDTO implements Serializable { + + + private static final long serialVersionUID = 5092769899043712642L; + /** + * 主键ID + */ + private String id; + + /** + * 姓名 + */ + private String name; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 所属社区 + */ + private Long deptId; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 服务类型 + */ + private String serviceType; + + /** + * 特长 + */ + private String specialty; + + /** + * 父所有部门 + */ + private String parentDeptIds; + + /** + * 父所有部门 + */ + private String parentDeptNames; + + /** + * 所有部门ID + */ + private String[] allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ReportPartyDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ReportPartyDTO.java new file mode 100755 index 000000000..0a466ebc2 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/ReportPartyDTO.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.user.dto.party; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 党员报道 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Data +public class ReportPartyDTO implements Serializable { + + + private static final long serialVersionUID = 6947865008331192851L; + + /** + * 主键ID + */ + private String id; + + /** + * 党员姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 社区id + */ + private String deptId; + + /** + * 居住小区名称 + */ + private String homeName; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 工作单位性质 + */ + private String workType; + + /** + * 工作单位行业 + */ + private String workIndustry; + + /** + * 特长 + */ + private String specialty; + + /** + * 是否党员 0、否 1、是 + */ + private Integer party; + + /** + * 是否愿意加入志愿者 0、否 1、是 + */ + private Integer volunteer; + + /** + * 是否愿意加入网格员 0、否 1、是 + */ + private Integer gridStaff; + + /** + * 是否愿意加入业务委员会 0、否 1、是 + */ + private Integer owners; + + /** + * 父所有部门 + */ + private String parentDeptIds; + + /** + * 父所有部门 + */ + private String parentDeptNames; + + /** + * 所有部门ID + */ + private String[] allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/form/IntoPartyFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/form/IntoPartyFormDTO.java new file mode 100644 index 000000000..e5d2061f7 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/form/IntoPartyFormDTO.java @@ -0,0 +1,60 @@ +package com.elink.esua.epdc.user.dto.party.form; + +import lombok.Data; + +/** + * @author yan Lu + * @description 描述 + * @create 2023/6/29 14:39 + */ +@Data +public class IntoPartyFormDTO { + + /** + * 主键ID + */ + private String id; + + /** + * 姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 电话 + */ + private String mobile; + + /** + * 是否自由职业者 0、否 1、是 + */ + private Integer freelance; + + /** + * 工作单位名称 + */ + private String workUnit; + + /** + * 工作单位地址 + */ + private String workAddr; + + /** + * 审核状态 0、待审核 1、审核通过 + */ + private Integer status; + + /** + * 街道或者社区ID + */ + private String deptId; + + private String[] allDeptIds; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/result/IntoPartyResultDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/result/IntoPartyResultDTO.java new file mode 100644 index 000000000..c0927b1ea --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/user/dto/party/result/IntoPartyResultDTO.java @@ -0,0 +1,82 @@ +package com.elink.esua.epdc.user.dto.party.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author yan Lu + * @description 入党申请 + * @create 2023/6/29 15:02 + */ +@Data +public class IntoPartyResultDTO implements Serializable { + private static final long serialVersionUID = 3714021689660950552L; + + /** + * 主键ID + */ + private String id; + + /** + * 姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 电话 + */ + private String mobile; + + /** + * 是否自由职业者 0、否 1、是 + */ + private Integer freelance; + + /** + * 工作单位名称 + */ + private String workUnit; + + /** + * 工作单位地址 + */ + private String workAddr; + + /** + * 审核状态 0、待审核 1、审核通过 + */ + private Integer status; + + /** + * 街道或者社区ID + */ + private String deptId; + + private String deptName; + + /*** + *所有部门名称 + */ + private String allDeptNames; + + /*** + *所有部门ID + */ + private String allDeptIds; + + /*** + *父所有部门 + */ + private String parentDeptNames; + + /*** + *父所有部门 + */ + private String parentDeptIds; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ActivityPartyController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ActivityPartyController.java new file mode 100755 index 000000000..5509f1174 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ActivityPartyController.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.elink.esua.epdc.party.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.security.user.UserDetail; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.party.excel.ActivityPartyExcel; +import com.elink.esua.epdc.party.service.ActivityPartyService; +import com.elink.esua.epdc.user.dto.party.ActivityPartyDTO; +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 elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@RestController +@RequestMapping("activityparty") +public class ActivityPartyController { + + @Autowired + private ActivityPartyService activityPartyService; + + @GetMapping("page") + @DataFilter(tableAlias = "t", deptId = "DEPT_ID", prefix = "AND", isPendingCreator = false) + public Result> page(@RequestParam Map params) { + PageData page = activityPartyService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + ActivityPartyDTO data = activityPartyService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ActivityPartyDTO dto) { + //效验数据 + UserDetail user = SecurityUser.getUser(); + dto.setDeptId(user.getDeptId()); + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + activityPartyService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ActivityPartyDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + UserDetail user = SecurityUser.getUser(); + dto.setDeptId(user.getDeptId()); + activityPartyService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + activityPartyService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = activityPartyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ActivityPartyExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/FlowPartyController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/FlowPartyController.java new file mode 100755 index 000000000..9ec54afc1 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/FlowPartyController.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.party.excel.FlowPartyExcel; +import com.elink.esua.epdc.party.service.FlowPartyService; +import com.elink.esua.epdc.user.dto.party.FlowPartyDTO; +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 elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@RestController +@RequestMapping("flowparty") +public class FlowPartyController { + + @Autowired + private FlowPartyService flowPartyService; + + @GetMapping("page") + @DataFilter(tableAlias = "t", deptId = "DEPT_ID", prefix = "AND", isPendingCreator = false) + public Result> page(@RequestParam Map params) { + PageData page = flowPartyService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + FlowPartyDTO data = flowPartyService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody FlowPartyDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + flowPartyService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody FlowPartyDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + flowPartyService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + flowPartyService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = flowPartyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, FlowPartyExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/IntoPartyController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/IntoPartyController.java new file mode 100755 index 000000000..7d1cbbf75 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/IntoPartyController.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.party.excel.IntoPartyExcel; +import com.elink.esua.epdc.party.service.IntoPartyService; +import com.elink.esua.epdc.user.dto.party.form.IntoPartyFormDTO; +import com.elink.esua.epdc.user.dto.party.result.IntoPartyResultDTO; +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 elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +@RestController +@RequestMapping("intoparty") +public class IntoPartyController { + + @Autowired + private IntoPartyService intoPartyService; + + @GetMapping("page") + @DataFilter(tableAlias = "t", deptId = "DEPT_ID", prefix = "AND", isPendingCreator = false) + public Result> page(@RequestParam Map params) { + PageData page = intoPartyService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + IntoPartyResultDTO data = intoPartyService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IntoPartyFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + intoPartyService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IntoPartyFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + intoPartyService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + intoPartyService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = intoPartyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IntoPartyExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/KnightPionnerController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/KnightPionnerController.java new file mode 100755 index 000000000..adf2e66dc --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/KnightPionnerController.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.party.excel.KnightPionnerExcel; +import com.elink.esua.epdc.party.service.KnightPionnerService; +import com.elink.esua.epdc.user.dto.party.KnightPionnerDTO; +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 elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@RestController +@RequestMapping("knightpionner") +public class KnightPionnerController { + + @Autowired + private KnightPionnerService knightPionnerService; + + @GetMapping("page") + @DataFilter(tableAlias = "t", deptId = "DEPT_ID", prefix = "AND", isPendingCreator = false) + public Result> page(@RequestParam Map params) { + PageData page = knightPionnerService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + KnightPionnerDTO data = knightPionnerService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody KnightPionnerDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + knightPionnerService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody KnightPionnerDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + knightPionnerService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + knightPionnerService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = knightPionnerService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, KnightPionnerExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/RedSpearheadController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/RedSpearheadController.java new file mode 100755 index 000000000..83354f4c8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/RedSpearheadController.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.party.excel.RedSpearheadExcel; +import com.elink.esua.epdc.party.service.RedSpearheadService; +import com.elink.esua.epdc.user.dto.party.RedSpearheadDTO; +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 elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@RestController +@RequestMapping("redspearhead") +public class RedSpearheadController { + + @Autowired + private RedSpearheadService redSpearheadService; + + @GetMapping("page") + @DataFilter(tableAlias = "t", deptId = "DEPT_ID", prefix = "AND", isPendingCreator = false) + public Result> page(@RequestParam Map params){ + PageData page = redSpearheadService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + RedSpearheadDTO data = redSpearheadService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody RedSpearheadDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + redSpearheadService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody RedSpearheadDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + redSpearheadService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + redSpearheadService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = redSpearheadService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, RedSpearheadExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ReportPartyController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ReportPartyController.java new file mode 100755 index 000000000..8553a5811 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/controller/ReportPartyController.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.party.excel.ReportPartyExcel; +import com.elink.esua.epdc.party.service.ReportPartyService; +import com.elink.esua.epdc.user.dto.party.ReportPartyDTO; +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 elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@RestController +@RequestMapping("reportparty") +public class ReportPartyController { + + @Autowired + private ReportPartyService reportPartyService; + + @GetMapping("page") + @DataFilter(tableAlias = "t", deptId = "DEPT_ID", prefix = "AND", isPendingCreator = false) + public Result> page(@RequestParam Map params) { + PageData page = reportPartyService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + ReportPartyDTO data = reportPartyService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ReportPartyDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + reportPartyService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ReportPartyDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + reportPartyService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + reportPartyService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = reportPartyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ReportPartyExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/ActivityPartyDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/ActivityPartyDao.java new file mode 100755 index 000000000..c7f5261c4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/ActivityPartyDao.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.elink.esua.epdc.party.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.party.entity.ActivityPartyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党员活动 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Mapper +public interface ActivityPartyDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/FlowPartyDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/FlowPartyDao.java new file mode 100755 index 000000000..9bbf7af6d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/FlowPartyDao.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.elink.esua.epdc.party.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.party.entity.FlowPartyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 流动党员报道表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Mapper +public interface FlowPartyDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/IntoPartyDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/IntoPartyDao.java new file mode 100755 index 000000000..15f8b7aab --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/IntoPartyDao.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.elink.esua.epdc.party.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.party.entity.IntoPartyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 申请入党表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +@Mapper +public interface IntoPartyDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/KnightPionnerDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/KnightPionnerDao.java new file mode 100755 index 000000000..9ff2081f0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/KnightPionnerDao.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.elink.esua.epdc.party.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.party.entity.KnightPionnerEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 骑士先锋 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Mapper +public interface KnightPionnerDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/RedSpearheadDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/RedSpearheadDao.java new file mode 100755 index 000000000..fbd2f8188 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/RedSpearheadDao.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.elink.esua.epdc.party.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.party.entity.RedSpearheadEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 红色尖兵 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Mapper +public interface RedSpearheadDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/ReportPartyDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/ReportPartyDao.java new file mode 100755 index 000000000..c4a952fa3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/dao/ReportPartyDao.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.elink.esua.epdc.party.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.party.entity.ReportPartyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党员报道 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Mapper +public interface ReportPartyDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ActivityPartyEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ActivityPartyEntity.java new file mode 100755 index 000000000..cdfcaddd9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ActivityPartyEntity.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.elink.esua.epdc.party.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党员活动 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("activity_party") +public class ActivityPartyEntity extends DeptScope { + + private static final long serialVersionUID = 1179730791253578254L; + /** + * 党员ID + */ + private String reportPartyIds; + + /** + * 活动名称 + */ + private String title; + + /** + * 活动内容 + */ + private String content; + + /** + * 活动开始时间 + */ + private Date startDate; + + /** + * 活动结束时间 + */ + private Date endDate; + + /** + * 活动地址 + */ + private String address; + + /** + * 活动图片 + */ + private String imgs; + + /** + * 社区id + */ + private String deptId; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/FlowPartyEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/FlowPartyEntity.java new file mode 100755 index 000000000..3a58e39a9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/FlowPartyEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 流动党员报道表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("flow_party") +public class FlowPartyEntity extends DeptScope { + + private static final long serialVersionUID = 6728231988052417884L; + + /** + * 党员姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 是否自由职业 0、否 1、是 + */ + private Integer freelance; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 工作单位地址 + */ + private String workAddr; + + /** + * 居住网格id + */ + private String deptId; + + private String allDeptIds; + + /** + * 审核状态 0、待审核 1、审核通过 + */ + private Integer status; + + /** + * 现属党支部 + */ + private String partyName; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/IntoPartyEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/IntoPartyEntity.java new file mode 100755 index 000000000..076dc89c7 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/IntoPartyEntity.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 申请入党表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("into_party") +public class IntoPartyEntity extends DeptScope { + + private static final long serialVersionUID = 1L; + + /** + * 姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 电话 + */ + private String mobile; + + /** + * 是否自由职业者 0、否 1、是 + */ + private Integer freelance; + + /** + * 工作单位名称 + */ + private String workUnit; + + /** + * 工作单位地址 + */ + private String workAddr; + + /** + * 审核状态 0、待审核 1、审核通过 + */ + private Integer status; + + /** + * 隶属社区 + */ + private Long deptId; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/KnightPionnerEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/KnightPionnerEntity.java new file mode 100755 index 000000000..589484fe9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/KnightPionnerEntity.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 骑士先锋 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("knight_pionner") +public class KnightPionnerEntity extends DeptScope { + + + private static final long serialVersionUID = -8212390585108800235L; + + /** + * 姓名 + */ + private String name; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 是否党员 0、否 1、是 + */ + private Integer party; + + /** + * 是否外卖员、快递员 0、否 1、是 + */ + private Integer courier; + + /** + * 居住网格id + */ + private String deptId; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/RedSpearheadEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/RedSpearheadEntity.java new file mode 100755 index 000000000..d99b4ef31 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/RedSpearheadEntity.java @@ -0,0 +1,73 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 红色尖兵 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("red_spearhead") +public class RedSpearheadEntity extends DeptScope { + + + private static final long serialVersionUID = -7134444541655351950L; + /** + * 姓名 + */ + private String name; + + /** + * 证件号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 所属社区 + */ + private String deptId; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 服务类型 + */ + private String serviceType; + + /** + * 特长 + */ + private String specialty; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ReportPartyEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ReportPartyEntity.java new file mode 100755 index 000000000..cea67d61a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/entity/ReportPartyEntity.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.elink.esua.epdc.party.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 党员报道 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("report_party") +public class ReportPartyEntity extends DeptScope { + + private static final long serialVersionUID = 1L; + + /** + * 党员姓名 + */ + private String name; + + /** + * 身份证号码 + */ + private String idCard; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 社区id + */ + private String deptId; + + /** + * 居住小区名称 + */ + private String homeName; + + /** + * 现工作单位 + */ + private String workUnit; + + /** + * 工作单位性质 + */ + private String workType; + + /** + * 工作单位行业 + */ + private String workIndustry; + + /** + * 特长 + */ + private String specialty; + + /** + * 是否党员 0、否 1、是 + */ + private Integer party; + + /** + * 是否愿意加入志愿者 0、否 1、是 + */ + private Integer volunteer; + + /** + * 是否愿意加入网格员 0、否 1、是 + */ + private Integer gridStaff; + + /** + * 是否愿意加入业务委员会 0、否 1、是 + */ + private Integer owners; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ActivityPartyExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ActivityPartyExcel.java new file mode 100755 index 000000000..16ec952cc --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ActivityPartyExcel.java @@ -0,0 +1,64 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党员活动 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +public class ActivityPartyExcel { + + @Excel(name = "党员ID") + private String reportPartyIds; + + @Excel(name = "活动名称") + private String title; + + @Excel(name = "活动内容") + private String content; + + @Excel(name = "活动开始时间") + private Date startDate; + + @Excel(name = "活动结束时间") + private Date endDate; + + @Excel(name = "活动地址") + private String address; + + @Excel(name = "活动图片") + private String imgs; + + @Excel(name = "社区id") + private Long deptId; + + @Excel(name = "父所有部门") + private String parentDeptNames; + + @Excel(name = "所有部门名称") + private String allDeptNames; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/FlowPartyExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/FlowPartyExcel.java new file mode 100755 index 000000000..fd5a28304 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/FlowPartyExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 流动党员报道表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Data +public class FlowPartyExcel { + + @Excel(name = "党员姓名") + private String name; + + @Excel(name = "身份证号码") + private String idCard; + + @Excel(name = "联系电话") + private String mobile; + + @Excel(name = "是否自由职业者", replace = {"否_0", "是_1"}) + private Integer freelance; + + @Excel(name = "现工作单位") + private String workUnit; + + @Excel(name = "现属党支部") + private String partyName; + + @Excel(name = "工作单位地址") + private String workAddr; + + @Excel(name = "审核状态", replace = {"待审核_0", "审核通过_1"}) + private Integer status; + + @Excel(name = "父所有部门") + private String parentDeptNames; + + @Excel(name = "所有部门名称") + private String allDeptNames; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/IntoPartyExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/IntoPartyExcel.java new file mode 100755 index 000000000..929ca71c2 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/IntoPartyExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 申请入党表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +@Data +public class IntoPartyExcel { + + @Excel(name = "姓名") + private String name; + + @Excel(name = "身份证号码") + private String idCard; + + @Excel(name = "电话") + private String mobile; + + @Excel(name = "是否自由职业者", replace = {"否_0", "是_1"}) + private Integer freelance; + + @Excel(name = "工作单位名称") + private String workUnit; + + @Excel(name = "工作单位地址") + private String workAddr; + + @Excel(name = "隶属社区") + private String agencyId; + + @Excel(name = "审核状态", replace = {"待审核_0", "审核通过_1"}) + private Integer status; + + @Excel(name = "父所有部门") + private String parentDeptNames; + + @Excel(name = "所有部门名称") + private String allDeptNames; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/KnightPionnerExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/KnightPionnerExcel.java new file mode 100755 index 000000000..e5de8494f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/KnightPionnerExcel.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.elink.esua.epdc.party.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 骑士先锋 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +public class KnightPionnerExcel { + + @Excel(name = "姓名") + private String name; + + @Excel(name = "证件号码") + private String idCard; + + @Excel(name = "联系电话") + private String mobile; + + @Excel(name = "现工作单位") + private String workUnit; + + @Excel(name = "是否党员 0、否 1、是") + private Integer party; + + @Excel(name = "是否外卖员、快递员 0、否 1、是") + private Integer courier; + + @Excel(name = "父所有部门") + private String parentDeptNames; + + @Excel(name = "所有部门名称") + private String allDeptNames; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/RedSpearheadExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/RedSpearheadExcel.java new file mode 100755 index 000000000..2bd54fe8c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/RedSpearheadExcel.java @@ -0,0 +1,60 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 红色尖兵 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Data +public class RedSpearheadExcel { + + @Excel(name = "姓名") + private String name; + + @Excel(name = "证件号码") + private String idCard; + + @Excel(name = "联系电话") + private String mobile; + + @Excel(name = "所属社区") + private Long deptId; + + @Excel(name = "现工作单位") + private String workUnit; + + @Excel(name = "服务类型") + private String serviceType; + + @Excel(name = "特长") + private String specialty; + + @Excel(name = "父所有部门") + private String parentDeptNames; + + @Excel(name = "所有部门名称") + private String allDeptNames; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ReportPartyExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ReportPartyExcel.java new file mode 100755 index 000000000..18b61f7d3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/excel/ReportPartyExcel.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.elink.esua.epdc.party.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 党员报道 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Data +public class ReportPartyExcel { + + @Excel(name = "党员姓名") + private String name; + + @Excel(name = "身份证号码") + private String idCard; + + @Excel(name = "联系电话") + private String mobile; + + @Excel(name = "社区id") + private Long deptId; + + @Excel(name = "居住小区名称") + private String homeName; + + @Excel(name = "现工作单位") + private String workUnit; + + @Excel(name = "工作单位性质") + private String workType; + + @Excel(name = "工作单位行业") + private String workIndustry; + + @Excel(name = "特长") + private String specialty; + + @Excel(name = "是否党员 0、否 1、是") + private Integer party; + + @Excel(name = "是否愿意加入志愿者 0、否 1、是") + private Integer volunteer; + + @Excel(name = "是否愿意加入网格员 0、否 1、是") + private Integer gridStaff; + + @Excel(name = "是否愿意加入业务委员会 0、否 1、是") + private Integer owners; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/ActivityPartyRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/ActivityPartyRedis.java new file mode 100755 index 000000000..728d1e87b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/ActivityPartyRedis.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.elink.esua.epdc.party.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 党员活动 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Component +public class ActivityPartyRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/FlowPartyRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/FlowPartyRedis.java new file mode 100755 index 000000000..1792b3131 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/FlowPartyRedis.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.elink.esua.epdc.party.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 流动党员报道表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Component +public class FlowPartyRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/IntoPartyRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/IntoPartyRedis.java new file mode 100755 index 000000000..b208f74c4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/IntoPartyRedis.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.elink.esua.epdc.party.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 申请入党表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +@Component +public class IntoPartyRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/KnightPionnerRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/KnightPionnerRedis.java new file mode 100755 index 000000000..6f89e0eae --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/KnightPionnerRedis.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.elink.esua.epdc.party.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 骑士先锋 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Component +public class KnightPionnerRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/RedSpearheadRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/RedSpearheadRedis.java new file mode 100755 index 000000000..f04adfbc5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/RedSpearheadRedis.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.elink.esua.epdc.party.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 红色尖兵 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Component +public class RedSpearheadRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/ReportPartyRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/ReportPartyRedis.java new file mode 100755 index 000000000..c238b9bcd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/redis/ReportPartyRedis.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.elink.esua.epdc.party.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 党员报道 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Component +public class ReportPartyRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/ActivityPartyService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/ActivityPartyService.java new file mode 100755 index 000000000..6f11aae59 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/ActivityPartyService.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.elink.esua.epdc.party.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.party.entity.ActivityPartyEntity; +import com.elink.esua.epdc.user.dto.party.ActivityPartyDTO; + +import java.util.List; +import java.util.Map; + +/** + * 党员活动 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +public interface ActivityPartyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-07-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-07-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ActivityPartyDTO + * @author generator + * @date 2023-07-01 + */ + ActivityPartyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-01 + */ + void save(ActivityPartyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-01 + */ + void update(ActivityPartyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-07-01 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/FlowPartyService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/FlowPartyService.java new file mode 100755 index 000000000..fd2b2070f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/FlowPartyService.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.elink.esua.epdc.party.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.party.entity.FlowPartyEntity; +import com.elink.esua.epdc.user.dto.party.FlowPartyDTO; + +import java.util.List; +import java.util.Map; + +/** + * 流动党员报道表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +public interface FlowPartyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-06-30 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-06-30 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FlowPartyDTO + * @author generator + * @date 2023-06-30 + */ + FlowPartyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-06-30 + */ + void save(FlowPartyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-06-30 + */ + void update(FlowPartyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-06-30 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/IntoPartyService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/IntoPartyService.java new file mode 100755 index 000000000..c2119a8c3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/IntoPartyService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.party.entity.IntoPartyEntity; +import com.elink.esua.epdc.user.dto.party.form.IntoPartyFormDTO; +import com.elink.esua.epdc.user.dto.party.result.IntoPartyResultDTO; + +import java.util.List; +import java.util.Map; + +/** + * 申请入党表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +public interface IntoPartyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-06-29 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-06-29 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IntoPartyDTO + * @author generator + * @date 2023-06-29 + */ + IntoPartyResultDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-06-29 + */ + void save(IntoPartyFormDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-06-29 + */ + void update(IntoPartyFormDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-06-29 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/KnightPionnerService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/KnightPionnerService.java new file mode 100755 index 000000000..8508ebf2e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/KnightPionnerService.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.elink.esua.epdc.party.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.party.entity.KnightPionnerEntity; +import com.elink.esua.epdc.user.dto.party.KnightPionnerDTO; + +import java.util.List; +import java.util.Map; + +/** + * 骑士先锋 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +public interface KnightPionnerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-07-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-07-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return KnightPionnerDTO + * @author generator + * @date 2023-07-01 + */ + KnightPionnerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-01 + */ + void save(KnightPionnerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-01 + */ + void update(KnightPionnerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-07-01 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/RedSpearheadService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/RedSpearheadService.java new file mode 100755 index 000000000..e9cfc4e2a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/RedSpearheadService.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.elink.esua.epdc.party.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.party.entity.RedSpearheadEntity; +import com.elink.esua.epdc.user.dto.party.RedSpearheadDTO; + +import java.util.List; +import java.util.Map; + +/** + * 红色尖兵 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +public interface RedSpearheadService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-07-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-07-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return RedSpearheadDTO + * @author generator + * @date 2023-07-01 + */ + RedSpearheadDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-01 + */ + void save(RedSpearheadDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-01 + */ + void update(RedSpearheadDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-07-01 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/ReportPartyService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/ReportPartyService.java new file mode 100755 index 000000000..97b920d7a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/ReportPartyService.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.elink.esua.epdc.party.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.party.entity.ReportPartyEntity; +import com.elink.esua.epdc.user.dto.party.ReportPartyDTO; + +import java.util.List; +import java.util.Map; + +/** + * 党员报道 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +public interface ReportPartyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-06-30 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-06-30 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ReportPartyDTO + * @author generator + * @date 2023-06-30 + */ + ReportPartyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-06-30 + */ + void save(ReportPartyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-06-30 + */ + void update(ReportPartyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-06-30 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ActivityPartyServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ActivityPartyServiceImpl.java new file mode 100755 index 000000000..94c868d78 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ActivityPartyServiceImpl.java @@ -0,0 +1,187 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.service.impl; + +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.party.dao.ActivityPartyDao; +import com.elink.esua.epdc.party.entity.ActivityPartyEntity; +import com.elink.esua.epdc.party.service.ActivityPartyService; +import com.elink.esua.epdc.user.dto.party.ActivityPartyDTO; +import com.elink.esua.epdc.user.feign.AdminFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 党员活动 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Service +public class ActivityPartyServiceImpl extends BaseServiceImpl implements ActivityPartyService { + + @Resource + private AdminFeignClient adminFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + PageData result = getPageData(page, ActivityPartyDTO.class); + result.getList().forEach(dto -> { + page.getRecords().forEach(entity -> { + if (dto.getId().equals(entity.getId())) { + if (null != entity.getStartDate()) { + dto.setStartDate(DateUtil.formatDate(entity.getStartDate())); + } + if (null != entity.getEndDate()) { + dto.setEndDate(DateUtil.formatDate(entity.getEndDate())); + } + } + }); + }); + return result; + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ActivityPartyDTO.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 ActivityPartyDTO get(String id) { + ActivityPartyEntity entity = baseDao.selectById(id); + ActivityPartyDTO result = ConvertUtils.sourceToTarget(entity, ActivityPartyDTO.class); + if (StringUtils.isNotEmpty(entity.getReportPartyIds())) { + result.setReportPartyIds(entity.getReportPartyIds().split(",")); + } + if (null != entity.getStartDate()) { + result.setStartDate(DateUtil.formatDate(entity.getStartDate())); + } + if (null != entity.getEndDate()) { + result.setEndDate(DateUtil.formatDate(entity.getEndDate())); + } + return result; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ActivityPartyDTO dto) { + ActivityPartyEntity entity = ConvertUtils.sourceToTarget(dto, ActivityPartyEntity.class); + if (null != dto.getReportPartyIds()) { + String[] partyIds = dto.getReportPartyIds(); + String temp = ""; + for (String id : partyIds) { + temp += id.concat(","); + } + entity.setReportPartyIds(temp.substring(0, temp.length() - 1)); + } + if (StringUtils.isNotEmpty(dto.getStartDate())) { + entity.setStartDate(DateUtil.parseDate(dto.getStartDate())); + } + if (StringUtils.isNotEmpty(dto.getEndDate())) { + entity.setEndDate(DateUtil.parseDate(dto.getEndDate())); + } + Result parentResult = null; + if (StringUtils.isNotEmpty(String.valueOf(dto.getDeptId()))) { + entity.setDeptId(String.valueOf(dto.getDeptId())); + parentResult = adminFeignClient.getParentAndAllDept(String.valueOf(dto.getDeptId())); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ActivityPartyDTO dto) { + ActivityPartyEntity entity = ConvertUtils.sourceToTarget(dto, ActivityPartyEntity.class); + if (null != dto.getReportPartyIds()) { + String[] partyIds = dto.getReportPartyIds(); + String temp = ""; + for (String id : partyIds) { + temp += id.concat(","); + } + entity.setReportPartyIds(temp.substring(0, temp.length() - 1)); + } + if (StringUtils.isNotEmpty(dto.getStartDate())) { + entity.setStartDate(DateUtil.parseDate(dto.getStartDate())); + } + if (StringUtils.isNotEmpty(dto.getEndDate())) { + entity.setEndDate(DateUtil.parseDate(dto.getEndDate())); + } + Result parentResult = null; + if (StringUtils.isNotEmpty(String.valueOf(dto.getDeptId()))) { + entity.setDeptId(String.valueOf(dto.getDeptId())); + parentResult = adminFeignClient.getParentAndAllDept(String.valueOf(dto.getDeptId())); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/FlowPartyServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/FlowPartyServiceImpl.java new file mode 100755 index 000000000..b9a6de5ec --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/FlowPartyServiceImpl.java @@ -0,0 +1,153 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.party.dao.FlowPartyDao; +import com.elink.esua.epdc.party.entity.FlowPartyEntity; +import com.elink.esua.epdc.party.service.FlowPartyService; +import com.elink.esua.epdc.user.dto.party.FlowPartyDTO; +import com.elink.esua.epdc.user.feign.AdminFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 流动党员报道表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Service +public class FlowPartyServiceImpl extends BaseServiceImpl implements FlowPartyService { + + @Resource + private AdminFeignClient adminFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + PageData result = getPageData(page, FlowPartyDTO.class); + page.getRecords().forEach(entity -> { + result.getList().forEach(dto -> { + if (entity.getId().equals(dto.getId())) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + } + }); + }); + return result; + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FlowPartyDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get(FieldConstant.NAME_HUMP); + String idCard = (String) params.get(FieldConstant.ID_CARD_HUMP); + String mobile = (String) params.get(FieldConstant.MOBILE_HUMP); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(name), FieldConstant.NAME_HUMP, name); + wrapper.like(StringUtils.isNotBlank(idCard), FieldConstant.ID_CARD, idCard); + wrapper.like(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE_HUMP, mobile); + return wrapper; + } + + @Override + public FlowPartyDTO get(String id) { + FlowPartyEntity entity = baseDao.selectById(id); + FlowPartyDTO dto = ConvertUtils.sourceToTarget(entity, FlowPartyDTO.class); + if (null != entity.getAllDeptIds()) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + dto.setDeptId(Long.parseLong(entity.getDeptId())); + } + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FlowPartyDTO dto) { + FlowPartyEntity entity = ConvertUtils.sourceToTarget(dto, FlowPartyEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + entity.setStatus(0); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FlowPartyDTO dto) { + FlowPartyEntity entity = ConvertUtils.sourceToTarget(dto, FlowPartyEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/IntoPartyServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/IntoPartyServiceImpl.java new file mode 100755 index 000000000..357e20b8b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/IntoPartyServiceImpl.java @@ -0,0 +1,128 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.party.dao.IntoPartyDao; +import com.elink.esua.epdc.party.entity.IntoPartyEntity; +import com.elink.esua.epdc.party.service.IntoPartyService; +import com.elink.esua.epdc.user.dto.party.form.IntoPartyFormDTO; +import com.elink.esua.epdc.user.dto.party.result.IntoPartyResultDTO; +import com.elink.esua.epdc.user.feign.AdminFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 申请入党表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-29 + */ +@Service +public class IntoPartyServiceImpl extends BaseServiceImpl implements IntoPartyService { + + @Resource + private AdminFeignClient adminFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IntoPartyResultDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + return ConvertUtils.sourceToTarget(entityList, IntoPartyResultDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get(FieldConstant.NAME_HUMP); + String idCard = (String) params.get(FieldConstant.ID_CARD_HUMP); + String mobile = (String) params.get(FieldConstant.MOBILE_HUMP); + String status = (String) params.get("status"); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(name), FieldConstant.NAME_HUMP, name); + wrapper.like(StringUtils.isNotBlank(idCard), FieldConstant.ID_CARD, idCard); + wrapper.like(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE_HUMP, mobile); + wrapper.eq(StringUtils.isNotBlank(status), "status", status); + return wrapper; + } + + @Override + public IntoPartyResultDTO get(String id) { + IntoPartyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IntoPartyResultDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IntoPartyFormDTO dto) { + IntoPartyEntity entity = ConvertUtils.sourceToTarget(dto, IntoPartyEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(Long.parseLong(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1])); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + entity.setStatus(0); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IntoPartyFormDTO dto) { + IntoPartyEntity entity = ConvertUtils.sourceToTarget(dto, IntoPartyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/KnightPionnerServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/KnightPionnerServiceImpl.java new file mode 100755 index 000000000..36fd7382a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/KnightPionnerServiceImpl.java @@ -0,0 +1,152 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.party.dao.KnightPionnerDao; +import com.elink.esua.epdc.party.entity.KnightPionnerEntity; +import com.elink.esua.epdc.party.service.KnightPionnerService; +import com.elink.esua.epdc.user.dto.party.KnightPionnerDTO; +import com.elink.esua.epdc.user.feign.AdminFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 骑士先锋 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Service +public class KnightPionnerServiceImpl extends BaseServiceImpl implements KnightPionnerService { + + @Resource + private AdminFeignClient adminFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + PageData result = getPageData(page, KnightPionnerDTO.class); + page.getRecords().forEach(entity -> { + result.getList().forEach(dto -> { + if (entity.getId().equals(dto.getId())) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + } + }); + }); + return result; + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, KnightPionnerDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get(FieldConstant.NAME_HUMP); + String idCard = (String) params.get(FieldConstant.ID_CARD_HUMP); + String mobile = (String) params.get(FieldConstant.MOBILE_HUMP); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(name), FieldConstant.NAME_HUMP, name); + wrapper.like(StringUtils.isNotBlank(idCard), FieldConstant.ID_CARD, idCard); + wrapper.like(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE_HUMP, mobile); + return wrapper; + } + + @Override + public KnightPionnerDTO get(String id) { + KnightPionnerEntity entity = baseDao.selectById(id); + KnightPionnerDTO dto = ConvertUtils.sourceToTarget(entity, KnightPionnerDTO.class); + if (null != entity.getAllDeptIds()) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + dto.setDeptId(Long.parseLong(entity.getDeptId())); + } + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(KnightPionnerDTO dto) { + KnightPionnerEntity entity = ConvertUtils.sourceToTarget(dto, KnightPionnerEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(KnightPionnerDTO dto) { + KnightPionnerEntity entity = ConvertUtils.sourceToTarget(dto, KnightPionnerEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/RedSpearheadServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/RedSpearheadServiceImpl.java new file mode 100755 index 000000000..c3da53512 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/RedSpearheadServiceImpl.java @@ -0,0 +1,152 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.party.dao.RedSpearheadDao; +import com.elink.esua.epdc.party.entity.RedSpearheadEntity; +import com.elink.esua.epdc.party.service.RedSpearheadService; +import com.elink.esua.epdc.user.dto.party.RedSpearheadDTO; +import com.elink.esua.epdc.user.feign.AdminFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 红色尖兵 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-01 + */ +@Service +public class RedSpearheadServiceImpl extends BaseServiceImpl implements RedSpearheadService { + + @Resource + private AdminFeignClient adminFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + PageData result = getPageData(page, RedSpearheadDTO.class); + page.getRecords().forEach(entity -> { + result.getList().forEach(dto -> { + if (entity.getId().equals(dto.getId())) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + } + }); + }); + return result; + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, RedSpearheadDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get(FieldConstant.NAME_HUMP); + String idCard = (String) params.get(FieldConstant.ID_CARD_HUMP); + String mobile = (String) params.get(FieldConstant.MOBILE_HUMP); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(name), FieldConstant.NAME_HUMP, name); + wrapper.like(StringUtils.isNotBlank(idCard), FieldConstant.ID_CARD, idCard); + wrapper.like(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE_HUMP, mobile); + return wrapper; + } + + @Override + public RedSpearheadDTO get(String id) { + RedSpearheadEntity entity = baseDao.selectById(id); + RedSpearheadDTO dto = ConvertUtils.sourceToTarget(entity, RedSpearheadDTO.class); + if (null != entity.getAllDeptIds()) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + dto.setDeptId(Long.parseLong(entity.getDeptId())); + } + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(RedSpearheadDTO dto) { + RedSpearheadEntity entity = ConvertUtils.sourceToTarget(dto, RedSpearheadEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(RedSpearheadDTO dto) { + RedSpearheadEntity entity = ConvertUtils.sourceToTarget(dto, RedSpearheadEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java new file mode 100755 index 000000000..c30482da5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/party/service/impl/ReportPartyServiceImpl.java @@ -0,0 +1,143 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.party.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.party.dao.ReportPartyDao; +import com.elink.esua.epdc.party.entity.ReportPartyEntity; +import com.elink.esua.epdc.party.service.ReportPartyService; +import com.elink.esua.epdc.user.dto.party.ReportPartyDTO; +import com.elink.esua.epdc.user.feign.AdminFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 党员报道 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-06-30 + */ +@Service +public class ReportPartyServiceImpl extends BaseServiceImpl implements ReportPartyService { + + @Resource + private AdminFeignClient adminFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ReportPartyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + return ConvertUtils.sourceToTarget(entityList, ReportPartyDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get(FieldConstant.NAME_HUMP); + String idCard = (String) params.get(FieldConstant.ID_CARD_HUMP); + String mobile = (String) params.get(FieldConstant.MOBILE_HUMP); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(name), FieldConstant.NAME_HUMP, name); + wrapper.like(StringUtils.isNotBlank(idCard), FieldConstant.ID_CARD, idCard); + wrapper.like(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE_HUMP, mobile); + return wrapper; + } + + @Override + public ReportPartyDTO get(String id) { + ReportPartyEntity entity = baseDao.selectById(id); + ReportPartyDTO result = ConvertUtils.sourceToTarget(entity, ReportPartyDTO.class); + if (null != entity.getAllDeptIds()) { + result.setAllDeptIds(entity.getAllDeptIds().split(",")); + result.setDeptId(entity.getDeptId()); + } + return result; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ReportPartyDTO dto) { + ReportPartyEntity entity = ConvertUtils.sourceToTarget(dto, ReportPartyEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ReportPartyDTO dto) { + ReportPartyEntity entity = ConvertUtils.sourceToTarget(dto, ReportPartyEntity.class); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/AdminFeignClient.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/AdminFeignClient.java index 4c32f520f..03339aa44 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/AdminFeignClient.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/AdminFeignClient.java @@ -3,10 +3,14 @@ package com.elink.esua.epdc.user.feign; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.epdc.form.UserSysDeptInfoFormDTO; +import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO; import com.elink.esua.epdc.user.feign.fallback.AdminFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; @@ -39,4 +43,13 @@ public interface AdminFeignClient { */ @GetMapping("/sys/dept/getParentAndAllDept/{deptId}") Result getParentAndAllDept(@PathVariable("deptId") String deptId); + + /** + * 根据当前登陆人,获取用户数据权限下各部门基本信息 + * @param formDTO + * @return + */ + @PostMapping("/sys/deptqueryUserSysDeptInfo") + Result> queryUserSysDeptInfo(@RequestBody UserSysDeptInfoFormDTO formDTO); + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/fallback/AdminFeignClientFallback.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/fallback/AdminFeignClientFallback.java index 94a776767..a4deee22f 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/fallback/AdminFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/user/feign/fallback/AdminFeignClientFallback.java @@ -1,10 +1,12 @@ package com.elink.esua.epdc.user.feign.fallback; -import com.elink.esua.epdc.user.feign.AdminFeignClient; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.epdc.form.UserSysDeptInfoFormDTO; +import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO; +import com.elink.esua.epdc.user.feign.AdminFeignClient; import org.springframework.stereotype.Component; import java.util.List; @@ -26,4 +28,9 @@ public class AdminFeignClientFallback implements AdminFeignClient { public Result getParentAndAllDept(String depId) { return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getParentAndAllDept", depId); } + + @Override + public Result> queryUserSysDeptInfo(UserSysDeptInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "queryUserSysDeptInfo", formDTO); + } } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/ActivityPartyDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/ActivityPartyDao.xml new file mode 100755 index 000000000..68abe54ce --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/ActivityPartyDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/FlowPartyDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/FlowPartyDao.xml new file mode 100755 index 000000000..b210dff28 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/FlowPartyDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/IntoPartyDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/IntoPartyDao.xml new file mode 100755 index 000000000..a40b05333 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/IntoPartyDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/KnightPionnerDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/KnightPionnerDao.xml new file mode 100755 index 000000000..3363db543 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/KnightPionnerDao.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/RedSpearheadDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/RedSpearheadDao.xml new file mode 100755 index 000000000..6eae850b8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/RedSpearheadDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/ReportPartyDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/ReportPartyDao.xml new file mode 100755 index 000000000..3febe4559 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/ReportPartyDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +