forked from rongchao/epmet-cloud-rizhao
Browse Source
# Conflicts: # epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java # epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java # epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java # epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java # epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java # epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java # epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml # epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java # epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java # epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java # epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java # epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java # epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java # epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xmldev
156 changed files with 10472 additions and 136 deletions
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.commons.tools.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* epmet-user端调用gov-org端的入参 |
|||
* @author sun |
|||
*/ |
|||
@Data |
|||
public class IcHouseFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
private String customerId; |
|||
private String houseId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.epmet.commons.tools.dto.form.mq; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* desc:rocketmq 基础参数 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/6/7 16:23 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class MqBaseFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -6616119263736477518L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 对象id 没有则查询全部 |
|||
*/ |
|||
private String objectId; |
|||
|
|||
/** |
|||
* 对象id 没有则查询全部 |
|||
*/ |
|||
private List<String> objectIdList; |
|||
|
|||
public MqBaseFormDTO(String customerId, String objectId) { |
|||
this.customerId = customerId; |
|||
this.objectId = objectId; |
|||
} |
|||
|
|||
public MqBaseFormDTO(String customerId, List<String> objectIdList) { |
|||
this.customerId = customerId; |
|||
this.objectIdList = objectIdList; |
|||
} |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
public enum PartyOrgTypeEnum { |
|||
|
|||
PROVINCIAL("0", "省委"), |
|||
MUNICIPAL("1", "市委"), |
|||
DISTRICT("2", "区委"), |
|||
WORKING("3", "党工委"), |
|||
PARTY("4", "党委"), |
|||
BRANCH("5", "支部"); |
|||
|
|||
|
|||
private String code; |
|||
private String name; |
|||
|
|||
|
|||
PartyOrgTypeEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
import java.util.Objects; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
*/ |
|||
public enum PartyPostEnum { |
|||
//党员职务
|
|||
PTDY("0", "普通党员"), |
|||
ZBSJ("1", "支部书记"), |
|||
ZBWY("2", "支部委员"), |
|||
DWWY("3", "党委委员"), |
|||
|
|||
UN_KNOWN("8", "未知"); |
|||
|
|||
private String code; |
|||
private String name; |
|||
|
|||
|
|||
PartyPostEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
public static String getName(String code) { |
|||
PartyPostEnum[] partyPostEnums = values(); |
|||
for (PartyPostEnum partyPostEnum : partyPostEnums) { |
|||
if (Objects.equals(partyPostEnum.getCode(), code)) { |
|||
return partyPostEnum.getName(); |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public static String getCode(String name) { |
|||
PartyPostEnum[] partyPostEnums = values(); |
|||
for (PartyPostEnum partyPostEnum : partyPostEnums) { |
|||
if (partyPostEnum.getName().equals(name)) { |
|||
return partyPostEnum.getCode(); |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
|||
@ -0,0 +1,92 @@ |
|||
package com.epmet.commons.tools.redis.common.bean; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 房屋信息缓存 |
|||
* @author Administrator |
|||
*/ |
|||
@Data |
|||
public class HouseInfoCache implements Serializable { |
|||
/** |
|||
* 所属家庭Id |
|||
*/ |
|||
private String homeId; |
|||
|
|||
/** |
|||
* 小区详细地址 |
|||
*/ |
|||
private String neighborAddress; |
|||
/** |
|||
* 小区id |
|||
*/ |
|||
private String neighborHoodId; |
|||
/** |
|||
* 小区名称 |
|||
*/ |
|||
private String neighborHoodName; |
|||
|
|||
|
|||
/** |
|||
* 所属楼栋id |
|||
*/ |
|||
private String buildingId; |
|||
/** |
|||
* 楼栋名称 |
|||
*/ |
|||
private String buildingName; |
|||
|
|||
|
|||
/** |
|||
* 所属单元id |
|||
*/ |
|||
private String buildingUnitId; |
|||
/** |
|||
* 单元名 |
|||
*/ |
|||
private String unitName; |
|||
|
|||
|
|||
/** |
|||
* 门牌号 |
|||
*/ |
|||
private String doorName; |
|||
|
|||
/** |
|||
* 房屋类型,1楼房,2平房,3别墅 |
|||
*/ |
|||
private String houseType; |
|||
|
|||
private String houseName; |
|||
|
|||
/** |
|||
* 楼的经度 |
|||
*/ |
|||
private String buildingLongitude; |
|||
/** |
|||
* 楼的纬度 |
|||
*/ |
|||
private String buildingLatitude; |
|||
|
|||
/** |
|||
* 小区名+楼栋名+单元名+房屋名 |
|||
*/ |
|||
private String allName; |
|||
|
|||
private String customerId; |
|||
|
|||
/** |
|||
* 小区所在的组织id |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* eg:市北区-阜新路街道-南宁社区 |
|||
*/ |
|||
private String agencyPathName; |
|||
/** |
|||
* 组织的area_code |
|||
*/ |
|||
private String areaCode; |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyTypepercentFormDTO { |
|||
|
|||
private static final long serialVersionUID = -3833404131164761022L; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空") |
|||
private String agencyId; |
|||
|
|||
private String customerId; |
|||
} |
|||
@ -0,0 +1,73 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyUnitListbriefFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2776705671944626707L; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@NotNull |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页记录数 |
|||
*/ |
|||
@NotNull |
|||
private Integer pageSize; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
// private String gridId;
|
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
@NotBlank(message = "组织id不能为空") |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 单位名称 |
|||
*/ |
|||
private String unitName; |
|||
|
|||
/** |
|||
* 服务事项 |
|||
*/ |
|||
private String serviceMatter; |
|||
|
|||
/** |
|||
* 分类 |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
private String contact; |
|||
|
|||
/** |
|||
* 联系人电话 |
|||
*/ |
|||
private String contactMobile; |
|||
|
|||
private String customerId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class PartyTypepercentResultDTO { |
|||
|
|||
private static final long serialVersionUID = -5256798094892121661L; |
|||
|
|||
/** |
|||
* 联建单位类型 |
|||
*/ |
|||
private String label; |
|||
|
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private Integer value; |
|||
|
|||
/** |
|||
* 联建单位编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 联建单位数量占比(%) |
|||
*/ |
|||
private String percent; |
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyUnitListbrieResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -300315089751537091L; |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
// private String gridName;
|
|||
|
|||
/** |
|||
* 所属网格id |
|||
*/ |
|||
// private String gridId;
|
|||
|
|||
/** |
|||
* 分类 |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 服务事项 |
|||
*/ |
|||
private String serviceMatter; |
|||
|
|||
/** |
|||
* 单位名称 |
|||
*/ |
|||
private String unitName; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.epmet.task.ic; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.extract.form.ExtractOriginFormDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.task.ITask; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/23 10:58 |
|||
*/ |
|||
@Slf4j |
|||
@Component("icVolunteerDataExtractionTask") |
|||
public class IcVolunteerDataExtractionTask implements ITask { |
|||
|
|||
@Resource |
|||
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|||
|
|||
/** |
|||
* 执行定时任务接口 |
|||
* |
|||
* @param params 参数,多参数使用JSON数据 |
|||
*/ |
|||
@Override |
|||
public void run(String params) { |
|||
log.info("icVolunteerDataExtractionTask定时任务正在执行,参数为:{}", params); |
|||
ExtractOriginFormDTO formDTO = new ExtractOriginFormDTO(); |
|||
if (StringUtils.isNotBlank(params)) { |
|||
formDTO = JSON.parseObject(params, ExtractOriginFormDTO.class); |
|||
} |
|||
Result result = epmetUserOpenFeignClient.volunteerDataExtraction(formDTO.getCustomerId()); |
|||
if (result.success()) { |
|||
log.info("icVolunteerDataExtractionTask定时任务正在执行定时任务执行成功"); |
|||
} else { |
|||
log.warn("icVolunteerDataExtractionTask定时任务正在执行定时任务执行失败:" + result.getMsg()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @program: epmet-cloud |
|||
* @description: |
|||
* @author: wangtong |
|||
* @create: 2022-05-18 16:46 |
|||
**/ |
|||
@Data |
|||
public class OrgTreeByUserAndTypeFormDTO implements Serializable { |
|||
|
|||
@NotNull(message ="组织id不可为空") |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 党组织类型 0省委,1市委,2区委,3党工委,4党委 |
|||
*/ |
|||
@NotNull(message ="组织类型不可为空") |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
|
|||
private List<String> orgTypeList; |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @program: epmet-cloud |
|||
* @description: |
|||
* @author: wangtong |
|||
* @create: 2022-05-18 16:48 |
|||
**/ |
|||
@Data |
|||
public class PartyOrgTreeResultDTO implements Serializable { |
|||
|
|||
/** |
|||
* 行政组织id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 行政组织pid |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 行政组织名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 行政组织等级 |
|||
*/ |
|||
private String level; |
|||
|
|||
/** |
|||
* 行政组织父ids |
|||
*/ |
|||
private String pids; |
|||
|
|||
private List<PartyOrgTreeResultDTO> children = new ArrayList<>(); |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
update ic_form_item set OPTION_SOURCE_VALUE='/resi/partymember/icPartyOrg/branchlist',ITEM_TYPE='cascader' |
|||
where DEL_FLAG='0' |
|||
and LABEL='所属支部'; |
|||
@ -0,0 +1,127 @@ |
|||
package com.epmet.resi.partymember.dto.partyOrg; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyOrgDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党组织的上级ID,没有上级时为0 |
|||
*/ |
|||
@NotNull(message = "上级组织不能为空") |
|||
private String orgPid; |
|||
|
|||
/** |
|||
* 党组织的所有上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPids; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
|
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|||
*/ |
|||
@NotNull(message = "组织类型不能为空") |
|||
private String partyOrgType; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
@NotNull(message = "组织名称不能为空") |
|||
private String partyOrgName; |
|||
|
|||
/** |
|||
* 组织编码 |
|||
*/ |
|||
private String partyOrgCode; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
@NotNull(message = "经度不能为空") |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
@NotNull(message = "纬度不能为空") |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 党组织介绍 |
|||
*/ |
|||
private String introduction; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.epmet.resi.partymember.dto.partyOrg.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @program: epmet-cloud |
|||
* @description: |
|||
* @author: wangtong |
|||
* @create: 2022-05-20 14:04 |
|||
**/ |
|||
@Data |
|||
public class PartyOrgTreeListDTO implements Serializable { |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
|
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党组织pid |
|||
*/ |
|||
|
|||
private String orgPid; |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package com.epmet.resi.partymember.dto.partyOrg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @program: epmet-cloud |
|||
* @description: |
|||
* @author: wangtong |
|||
* @create: 2022-05-30 10:11 |
|||
**/ |
|||
@Data |
|||
public class BranchlistTreeDTO implements Serializable { |
|||
|
|||
private String label; |
|||
|
|||
private String value; |
|||
|
|||
private List<BranchlistTreeSubDTO> children = new ArrayList<>(); |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.epmet.resi.partymember.dto.partyOrg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @program: epmet-cloud |
|||
* @description: |
|||
* @author: wangtong |
|||
* @create: 2022-05-30 10:11 |
|||
**/ |
|||
@Data |
|||
public class BranchlistTreeSubDTO implements Serializable { |
|||
|
|||
private String label; |
|||
|
|||
private String value; |
|||
|
|||
} |
|||
@ -0,0 +1,59 @@ |
|||
package com.epmet.resi.partymember.dto.partyOrg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyOrgTreeDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 党组织的上级ID,没有上级时为0(前端展示用) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 党组织的所有上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPids; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|||
*/ |
|||
private String partyOrgType; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String partyOrgName; |
|||
|
|||
private List<IcPartyOrgTreeDTO> children = new ArrayList<>(); |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,188 @@ |
|||
package com.epmet.resi.partymember.dto.partymember; |
|||
|
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
@NotBlank(message = "当前网格id不能为空",groups ={UpdateGroup.class}) |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党组织的所有上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPids; |
|||
private String orgName; |
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 对应的ic_resi_user主表Id |
|||
*/ |
|||
private String icResiUser; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@NotBlank(message = "当前网格id不能为空",groups ={AddGroup.class, UpdateGroup.class}) |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "当前网格id不能为空",groups ={AddGroup.class, UpdateGroup.class}) |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
@NotBlank(message = "当前网格id不能为空",groups ={AddGroup.class, UpdateGroup.class}) |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 入党时间 |
|||
*/ |
|||
private String rdsj; |
|||
|
|||
/** |
|||
* 所属支部 |
|||
*/ |
|||
private String sszb; |
|||
|
|||
/** |
|||
* 是否流动党员 |
|||
*/ |
|||
private String isLd; |
|||
|
|||
/** |
|||
* 流动党员活动证号 |
|||
*/ |
|||
private String ldzh; |
|||
|
|||
/** |
|||
* 职务 |
|||
*/ |
|||
private String partyZw; |
|||
private String postName; |
|||
/** |
|||
* 是否退休 |
|||
*/ |
|||
private String isTx; |
|||
|
|||
/** |
|||
* 是否党员中心户 |
|||
*/ |
|||
private String isDyzxh; |
|||
|
|||
/** |
|||
* 是否免学习0否,1是 |
|||
*/ |
|||
private String isMxx; |
|||
|
|||
/** |
|||
* 文化程度【字典表】 |
|||
*/ |
|||
private String culture; |
|||
private String cultureName; |
|||
/** |
|||
* 志愿者类型,逗号隔开 |
|||
*/ |
|||
private String volunteerCategory; |
|||
private List<String> volunteerCategoryName; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 预留字段1 |
|||
*/ |
|||
private String field1; |
|||
|
|||
/** |
|||
* 预留字段2 |
|||
*/ |
|||
private String field2; |
|||
|
|||
/** |
|||
* 预留字段3 |
|||
*/ |
|||
private String field3; |
|||
|
|||
/** |
|||
* 预留字段4 |
|||
*/ |
|||
private String field4; |
|||
|
|||
/** |
|||
* 预留字段5 |
|||
*/ |
|||
private String field5; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,92 @@ |
|||
package com.epmet.resi.partymember.dto.partymember; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberPayRecordDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
@NotBlank(message = "客户Id不能为空") |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
@NotBlank(message = "党员ID不能为空") |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 缴费日期 |
|||
*/ |
|||
@NotBlank(message = "缴费日期不能为空") |
|||
private String payDate; |
|||
|
|||
/** |
|||
* 缴费金额 |
|||
*/ |
|||
@NotBlank(message = "缴费金额不能为空") |
|||
private BigDecimal money; |
|||
|
|||
/** |
|||
* 缴费开始时间 |
|||
*/ |
|||
@NotBlank(message = "缴费开始时间不能为空") |
|||
private String startDate; |
|||
|
|||
/** |
|||
* 缴费结束时间 |
|||
*/ |
|||
@NotBlank(message = "缴费结束时间不能为空") |
|||
private String endDate; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,99 @@ |
|||
package com.epmet.resi.partymember.dto.partymember; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberPayRecordDetailDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 党员缴费记录表ID |
|||
*/ |
|||
private String recordId; |
|||
|
|||
/** |
|||
* 缴费年度 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 缴费月份 |
|||
*/ |
|||
private String month; |
|||
|
|||
/** |
|||
* 缴费金额 |
|||
*/ |
|||
private BigDecimal money; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
// 姓名
|
|||
private String name; |
|||
// 手机号
|
|||
private String mobile; |
|||
// 身份证号
|
|||
private String idCard; |
|||
// 所属党组织名称
|
|||
private String orgName; |
|||
// 缴费次数
|
|||
private String times; |
|||
// 备注
|
|||
private String remark; |
|||
|
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
package com.epmet.resi.partymember.dto.partymember; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberPointDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
private String quarter; |
|||
|
|||
/** |
|||
* 基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础积分选项 英文逗号隔开 |
|||
*/ |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议积分选项 |
|||
*/ |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
private String warnOptions; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
private Integer totalScore; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.epmet.resi.partymember.dto.partymember; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointListCountDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8960345656247021278L; |
|||
|
|||
/** |
|||
* 基础积分分值次数 |
|||
*/ |
|||
private Integer basePointCount; |
|||
|
|||
/** |
|||
* 民主评议积分分值次数 |
|||
*/ |
|||
private Integer reviewPointCount; |
|||
|
|||
/** |
|||
* 激励积分分值次数 |
|||
*/ |
|||
private Integer inspirePointCount; |
|||
|
|||
/** |
|||
* 警示扣分分值次数 |
|||
*/ |
|||
private Integer warnPointCount; |
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/18 16:03 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class IcPartyMemberFromDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -5751720367897462952L; |
|||
private String customerId; |
|||
/** |
|||
* 所属党组织 |
|||
*/ |
|||
private String partyOrgId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 手机 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
/** |
|||
* 流动党员 |
|||
*/ |
|||
private String isLd; |
|||
/** |
|||
* 流动党员证号 |
|||
*/ |
|||
private String ldzh; |
|||
/** |
|||
* 职务 |
|||
*/ |
|||
private String partyZw; |
|||
/** |
|||
* 是否党员中心户 |
|||
*/ |
|||
private String isDyzxh; |
|||
/** |
|||
* 是否免学习 |
|||
*/ |
|||
private String isMxx; |
|||
/** |
|||
* 文化程度 |
|||
*/ |
|||
private String culture; |
|||
/** |
|||
* 是否缴费 |
|||
*/ |
|||
private String isPay; |
|||
/** |
|||
* 入党时间开始 |
|||
*/ |
|||
private String rdsjStartDate; |
|||
/** |
|||
* 入党时间结束 |
|||
*/ |
|||
private String rdsjEndDate; |
|||
/** |
|||
* 最后一次缴费时间开始 |
|||
*/ |
|||
private String payStatrDate; |
|||
/** |
|||
* 最后一次缴费时间结束 |
|||
*/ |
|||
private String payEndDate; |
|||
private String year; |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author wgf |
|||
* @Date 2022/05/17 19:49 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class IcPartyMemberPayRecordDetailFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4743261460276449408L; |
|||
|
|||
private String orgId; |
|||
private String name; |
|||
private String mobile; |
|||
private String idCard; |
|||
private String year; |
|||
private String month; |
|||
|
|||
private Integer pageNo; |
|||
private Integer pageSize; |
|||
|
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberExportFormDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -1193821690622467766L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 所属党组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 评分年度 |
|||
*/ |
|||
private String year; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class PartyMemberPointEchoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6999955563137801002L; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
@NotBlank(message = "年份不能为空") |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
@NotBlank(message = "季度不能为空") |
|||
private String quarter; |
|||
|
|||
/** |
|||
* 党员id |
|||
*/ |
|||
@NotBlank(message = "党员id不能为空") |
|||
private String partyMemberId; |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointListFormDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5659445492756209830L; |
|||
|
|||
/** |
|||
* 所属党组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 评分年度 |
|||
*/ |
|||
private String year; |
|||
|
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/18 16:33 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class IcPartyMemberResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4964061462850271428L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 入党时间 |
|||
*/ |
|||
private String rdsj; |
|||
/** |
|||
* 所属党组织 |
|||
*/ |
|||
private String sszb; |
|||
/** |
|||
* 流动党员 |
|||
*/ |
|||
private String isLd; |
|||
/** |
|||
* 流动党员证号 |
|||
*/ |
|||
private String ldzh; |
|||
/** |
|||
* 职务 |
|||
*/ |
|||
private String partyZw; |
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
/** |
|||
* 是否缴费 |
|||
*/ |
|||
private String isPay; |
|||
/** |
|||
* 最近一次缴纳党费时间 |
|||
*/ |
|||
private String payDate; |
|||
/** |
|||
* 文化程度 |
|||
*/ |
|||
private String culture; |
|||
/** |
|||
* 量化积分 |
|||
*/ |
|||
private String point; |
|||
/** |
|||
* 志愿者类别 |
|||
*/ |
|||
private String volunteerCategory; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
} |
|||
@ -0,0 +1,57 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointEchoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 195601506560614702L; |
|||
|
|||
/** |
|||
* 基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础积分选项 英文逗号隔开 |
|||
*/ |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议积分选项 |
|||
*/ |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
private String warnOptions; |
|||
|
|||
private String id; |
|||
} |
|||
@ -0,0 +1,72 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
public class PartyMemberPointExportResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -3692594790475696502L; |
|||
|
|||
|
|||
/** |
|||
* 党员id |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
private String quarter; |
|||
|
|||
/** |
|||
* 基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础积分选项 |
|||
*/ |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议积分选项 |
|||
*/ |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
private String warnOptions; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
private Integer totalScore; |
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5867583472212661940L; |
|||
|
|||
/** |
|||
* 所属党组织 |
|||
*/ |
|||
private String partyOrg; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
private Integer totalScore; |
|||
|
|||
/** |
|||
*基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础选项 |
|||
*/ |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议选项 |
|||
*/ |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
private String warnOptions; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String Remark; |
|||
|
|||
/** |
|||
* 年度 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
private Integer quarter; |
|||
|
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
} |
|||
@ -0,0 +1,113 @@ |
|||
package com.epmet.modules.partyOrg.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.modules.partyOrg.excel.IcPartyOrgExcel; |
|||
import com.epmet.modules.partyOrg.service.IcPartyOrgService; |
|||
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icPartyOrg") |
|||
public class IcPartyOrgController { |
|||
|
|||
@Autowired |
|||
private IcPartyOrgService icPartyOrgService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcPartyOrgDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcPartyOrgDTO> page = icPartyOrgService.page(params); |
|||
return new Result<PageData<IcPartyOrgDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<IcPartyOrgDTO> get(@PathVariable("id") String id){ |
|||
IcPartyOrgDTO data = icPartyOrgService.get(id); |
|||
return new Result<IcPartyOrgDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping |
|||
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyOrgDTO dto){ |
|||
dto.setCustomerId(tokenDto.getCustomerId()); |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
return icPartyOrgService.save(dto); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PutMapping |
|||
public Result update(@RequestBody IcPartyOrgDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icPartyOrgService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icPartyOrgService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<IcPartyOrgDTO> list = icPartyOrgService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyOrgExcel.class); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* @describe: 获取党组织下拉树 |
|||
* @author wangtong |
|||
* @date 2022/5/17 17:13 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO>> |
|||
*/ |
|||
@GetMapping("getTreelist") |
|||
public Result<List<IcPartyOrgTreeDTO>> getTreelist(@LoginUser TokenDto tokenDto,PartyOrgTreeListDTO formDTO){ |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
return icPartyOrgService.getTreelist(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 当前登录用户所属行政组织,及下级的党组织(只限支部) |
|||
* @author wangtong |
|||
* @date 2022/5/25 15:24 |
|||
* @params [tokenDto] |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.partymember.dto.partyOrg.result.BranchListResultDTO> |
|||
*/ |
|||
@PostMapping("branchlist") |
|||
public Result<List<BranchlistTreeDTO>> branchlist(@LoginUser TokenDto tokenDto){ |
|||
return icPartyOrgService.branchlist(tokenDto); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,78 @@ |
|||
package com.epmet.modules.partyOrg.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
|||
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> { |
|||
|
|||
/** |
|||
* @describe: 获取组织列表 |
|||
* @author wangtong |
|||
* @date 2022/5/17 19:00 |
|||
* @params [] |
|||
* @return java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO> |
|||
*/ |
|||
List<IcPartyOrgTreeDTO> getTreelist(PartyOrgTreeListDTO formDTO); |
|||
|
|||
/** |
|||
* @describe: 查询跟id相关的所有组织id |
|||
* @author wangtong |
|||
* @date 2022/5/19 16:14 |
|||
* @params [id] |
|||
* @return java.util.List<com.epmet.modules.partyOrg.entity.IcPartyOrgEntity> |
|||
*/ |
|||
List<IcPartyOrgEntity> selectAllByOrgId(@Param("id") String id); |
|||
|
|||
/** |
|||
* @describe: 通过名称或者编码查询 |
|||
* @author wangtong |
|||
* @date 2022/5/20 10:35 |
|||
* @params [partyOrgName, partyOrgCode] |
|||
* @return com.epmet.modules.partyOrg.entity.IcPartyOrgEntity |
|||
*/ |
|||
IcPartyOrgEntity selectByCuIdAndNameOrCode(@Param("partyOrgName") String partyOrgName, |
|||
@Param("partyOrgCode") String partyOrgCode, |
|||
@Param("customerId") String customerId); |
|||
|
|||
/** |
|||
* @describe: 通过行政组织id和类型(不等于)筛选 |
|||
* @author wangtong |
|||
* @date 2022/5/20 10:40 |
|||
* @params [agencyId, partyOrgType] |
|||
* @return com.epmet.modules.partyOrg.entity.IcPartyOrgEntity |
|||
*/ |
|||
IcPartyOrgEntity selectByAgencyId(@Param("agencyId") String agencyId,@Param("partyOrgType") String partyOrgType); |
|||
|
|||
/** |
|||
* @describe: 查询当前客户下的一级组织 |
|||
* @author wangtong |
|||
* @date 2022/5/25 10:47 |
|||
* @params [customerId] |
|||
* @return com.epmet.modules.partyOrg.entity.IcPartyOrgEntity |
|||
*/ |
|||
IcPartyOrgEntity selectLevelOneOrgByCustomerId(@Param("customerId") String customerId); |
|||
|
|||
/** |
|||
* @describe: 查询行政组织下的所有支部党组织 |
|||
* @author wangtong |
|||
* @date 2022/5/25 15:30 |
|||
* @params [agencyId, customerId] |
|||
* @return java.util.List<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO> |
|||
*/ |
|||
List<BranchlistTreeSubDTO> selectAllBranchByAgencyId(@Param("agencyId") String agencyId, @Param("customerId") String customerId); |
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
package com.epmet.modules.partyOrg.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_party_org") |
|||
public class IcPartyOrgEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党组织的上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPid; |
|||
|
|||
/** |
|||
* 党组织的所有上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPids; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|||
*/ |
|||
private String partyOrgType; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String partyOrgName; |
|||
|
|||
/** |
|||
* 组织编码 |
|||
*/ |
|||
private String partyOrgCode; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 党组织介绍 |
|||
*/ |
|||
private String introduction; |
|||
|
|||
} |
|||
@ -0,0 +1,75 @@ |
|||
package com.epmet.modules.partyOrg.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyOrgExcel { |
|||
|
|||
@Excel(name = "唯一标识") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户Id (customer.id)") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "党组织的上级ID,没有上级时为0") |
|||
private String orgPid; |
|||
|
|||
@Excel(name = "党组织的所有上级ID,没有上级时为0") |
|||
private String orgPids; |
|||
|
|||
@Excel(name = "行政组织 机关ID") |
|||
private String agencyId; |
|||
|
|||
@Excel(name = "行政组织 机关ID") |
|||
private String agencyPids; |
|||
|
|||
@Excel(name = "党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部") |
|||
private String partyOrgType; |
|||
|
|||
@Excel(name = "组织名称") |
|||
private String partyOrgName; |
|||
|
|||
@Excel(name = "组织编码") |
|||
private String partyOrgCode; |
|||
|
|||
@Excel(name = "经度") |
|||
private String longitude; |
|||
|
|||
@Excel(name = "纬度") |
|||
private String latitude; |
|||
|
|||
@Excel(name = "地址") |
|||
private String address; |
|||
|
|||
@Excel(name = "党组织介绍") |
|||
private String introduction; |
|||
|
|||
@Excel(name = "删除标识:0.未删除 1.已删除") |
|||
private Integer delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.modules.partyOrg.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Component |
|||
public class IcPartyOrgRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,101 @@ |
|||
package com.epmet.modules.partyOrg.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
|||
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
public interface IcPartyOrgService extends BaseService<IcPartyOrgEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcPartyOrgDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
PageData<IcPartyOrgDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcPartyOrgDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
List<IcPartyOrgDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcPartyOrgDTO |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
IcPartyOrgDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
Result save(IcPartyOrgDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void update(IcPartyOrgDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @describe: 获取党组织下拉树 |
|||
* @author wangtong |
|||
* @date 2022/5/17 17:20 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.page.PageData<com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO> |
|||
*/ |
|||
Result<List<IcPartyOrgTreeDTO>> getTreelist(PartyOrgTreeListDTO formDTO); |
|||
|
|||
/** |
|||
* @describe: 当前登录用户所属行政组织,及下级的党组织(只限支部) |
|||
* @author wangtong |
|||
* @date 2022/5/25 15:25 |
|||
* @params [tokenDto] |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.partymember.dto.partyOrg.result.BranchListResultDTO> |
|||
*/ |
|||
Result<List<BranchlistTreeDTO>> branchlist(TokenDto tokenDto); |
|||
} |
|||
@ -0,0 +1,253 @@ |
|||
package com.epmet.modules.partyOrg.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.enums.PartyOrgTypeEnum; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|||
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|||
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.enums.OrgLevelEnums; |
|||
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; |
|||
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
|||
import com.epmet.modules.partyOrg.service.IcPartyOrgService; |
|||
import com.epmet.modules.partymember.dao.IcPartyMemberDao; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
|||
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO; |
|||
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.LinkedHashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Service |
|||
public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPartyOrgEntity> implements IcPartyOrgService { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberDao icPartyMemberDao; |
|||
|
|||
|
|||
@Override |
|||
public PageData<IcPartyOrgDTO> page(Map<String, Object> params) { |
|||
IPage<IcPartyOrgEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcPartyOrgDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcPartyOrgDTO> list(Map<String, Object> params) { |
|||
List<IcPartyOrgEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcPartyOrgDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcPartyOrgEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcPartyOrgEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcPartyOrgDTO get(String id) { |
|||
IcPartyOrgEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcPartyOrgDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Result save(IcPartyOrgDTO dto) { |
|||
//同一个客户下,名称和编码不可重复
|
|||
IcPartyOrgEntity repeatName = baseDao.selectByCuIdAndNameOrCode(dto.getPartyOrgName(),null,dto.getCustomerId()); |
|||
if(null != repeatName){ |
|||
throw new EpmetException("行政组织名称不可重复!"); |
|||
} |
|||
if(StringUtils.isNotBlank(dto.getPartyOrgCode())){ |
|||
IcPartyOrgEntity repeatCode = baseDao.selectByCuIdAndNameOrCode(null,dto.getPartyOrgCode(),dto.getCustomerId()); |
|||
if(null != repeatCode){ |
|||
throw new EpmetException("行政组织编码不可重复!"); |
|||
} |
|||
} |
|||
IcPartyOrgEntity parentOrg = baseDao.selectById(dto.getOrgPid()); |
|||
//判断当前党组织的类型是否是所选上级党组织类型的直接下级
|
|||
if("0".equals(dto.getOrgPid())){ |
|||
if(PartyOrgTypeEnum.BRANCH.getCode().equals(dto.getPartyOrgType())){ |
|||
throw new EpmetException("支部不可设为一级组织!"); |
|||
} |
|||
//一个客户下只能有一个一级组织
|
|||
IcPartyOrgEntity levelOneOrg = baseDao.selectLevelOneOrgByCustomerId(dto.getCustomerId()); |
|||
if(null != levelOneOrg){ |
|||
throw new EpmetException("当前客户下已存在一级组织,不可重复添加!"); |
|||
} |
|||
}else{ |
|||
checkOrgType(parentOrg.getPartyOrgType(),dto.getPartyOrgType()); |
|||
} |
|||
//如果不是支部,需要判断行政组织是否重复
|
|||
if(!PartyOrgTypeEnum.BRANCH.getCode().equals(dto.getPartyOrgType())){ |
|||
IcPartyOrgEntity isAgency = baseDao.selectByAgencyId(dto.getAgencyId(),PartyOrgTypeEnum.BRANCH.getCode()); |
|||
if(null != isAgency){ |
|||
throw new EpmetException("该行政组织已被关联!"); |
|||
} |
|||
AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); |
|||
//判断该所选的行政组织类型是否与当前党组织的类型一致
|
|||
checnAgencyLevel(agency.getLevel(),dto.getPartyOrgType()); |
|||
dto.setAgencyPids(agency.getPids()); |
|||
}else{ |
|||
//类型为支部时,行政组织信息与上级党组织一致
|
|||
dto.setAgencyId(parentOrg.getAgencyId()); |
|||
dto.setAgencyPids(parentOrg.getAgencyPids()); |
|||
} |
|||
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); |
|||
if (null == agencyInfo){ |
|||
throw new EpmetException("组织信息获取失败"); |
|||
} |
|||
IcPartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyOrgEntity.class); |
|||
insert(entity); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 判断当前党组织的类型是否是所选上级党组织类型的直接下级 |
|||
* @author wangtong |
|||
* @date 2022/5/25 10:09 |
|||
* @params [parentOrg, partyOrgType] |
|||
* @return void |
|||
*/ |
|||
private void checkOrgType(String parentOrgType, String partyOrgType) { |
|||
if(PartyOrgTypeEnum.BRANCH.getCode().equals(partyOrgType) && !PartyOrgTypeEnum.PARTY.getCode().equals(parentOrgType)){ |
|||
throw new EpmetException("请保持上级党组织的类型与当前党组织类型为直接的上下级关系,选择党委作为上级组织!"); |
|||
}else if(PartyOrgTypeEnum.PARTY.getCode().equals(partyOrgType) && !PartyOrgTypeEnum.WORKING.getCode().equals(parentOrgType)){ |
|||
throw new EpmetException("请保持上级党组织的类型与当前党组织类型为直接的上下级关系,选择党工委作为上级组织!"); |
|||
}else if(PartyOrgTypeEnum.WORKING.getCode().equals(partyOrgType) && !PartyOrgTypeEnum.DISTRICT.getCode().equals(parentOrgType)){ |
|||
throw new EpmetException("请保持上级党组织的类型与当前党组织类型为直接的上下级关系,选择区委作为上级组织!"); |
|||
}else if(PartyOrgTypeEnum.DISTRICT.getCode().equals(partyOrgType) && !PartyOrgTypeEnum.MUNICIPAL.getCode().equals(parentOrgType)){ |
|||
throw new EpmetException("请保持上级党组织的类型与当前党组织类型为直接的上下级关系,选择市委作为上级组织!"); |
|||
}else if(PartyOrgTypeEnum.MUNICIPAL.getCode().equals(partyOrgType) && !PartyOrgTypeEnum.PROVINCIAL.getCode().equals(parentOrgType)){ |
|||
throw new EpmetException("请保持上级党组织的类型与当前党组织类型为直接的上下级关系,选择省委作为上级组织!"); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @describe: 判断该所选的行政组织类型是否与当前党组织的类型一致 |
|||
* @author wangtong |
|||
* @date 2022/5/25 9:45 |
|||
* @params [agencyLevel, partyOrgType] |
|||
* @return void |
|||
*/ |
|||
private void checnAgencyLevel(String agencyLevel, String partyOrgType) { |
|||
if(PartyOrgTypeEnum.PROVINCIAL.getCode().equals(partyOrgType) && !OrgLevelEnums.PROVINCE.getLevel().equals(agencyLevel)){ |
|||
throw new EpmetException("请保持党组织类型与行政组织类型一致,选择省级的行政组织!"); |
|||
}else if(PartyOrgTypeEnum.MUNICIPAL.getCode().equals(partyOrgType) && !OrgLevelEnums.CITY.getLevel().equals(agencyLevel)){ |
|||
throw new EpmetException("请保持党组织类型与行政组织类型一致,选择市级的行政组织!"); |
|||
}else if(PartyOrgTypeEnum.DISTRICT.getCode().equals(partyOrgType) && !OrgLevelEnums.DISTRICT.getLevel().equals(agencyLevel)){ |
|||
throw new EpmetException("请保持党组织类型与行政组织类型一致,选择区级的行政组织!"); |
|||
}else if(PartyOrgTypeEnum.WORKING.getCode().equals(partyOrgType) && !OrgLevelEnums.STREET.getLevel().equals(agencyLevel)){ |
|||
throw new EpmetException("请保持党组织类型与行政组织类型一致,选择街道级的行政组织!"); |
|||
}else if(PartyOrgTypeEnum.PARTY.getCode().equals(partyOrgType) && !OrgLevelEnums.COMMUNITY.getLevel().equals(agencyLevel)){ |
|||
throw new EpmetException("请保持党组织类型与行政组织类型一致,选择社区级的行政组织!"); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcPartyOrgDTO dto) { |
|||
// IcPartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyOrgEntity.class);
|
|||
IcPartyOrgEntity entity = baseDao.selectById(dto.getId()); |
|||
entity.setPartyOrgName(dto.getPartyOrgName()); |
|||
entity.setPartyOrgCode(dto.getPartyOrgCode()); |
|||
entity.setIntroduction(dto.getIntroduction()); |
|||
entity.setLatitude(dto.getLatitude()); |
|||
entity.setLongitude(dto.getLongitude()); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
// baseDao.deleteBatchIds(Arrays.asList(ids));
|
|||
for(String id : ids){ |
|||
//判断该组织是否有下级党组织
|
|||
List<IcPartyOrgEntity> orgList = baseDao.selectAllByOrgId(id); |
|||
if(!CollectionUtils.isEmpty(orgList)){ |
|||
throw new EpmetException("请先删除下级党组织!"); |
|||
} |
|||
//判断该组织下是否有党员
|
|||
List<IcPartyMemberEntity> memberList = icPartyMemberDao.selectAllByOrgId(id); |
|||
if(!CollectionUtils.isEmpty(memberList)){ |
|||
throw new EpmetException("该组织下有党员信息暂时不可删除!"); |
|||
} |
|||
baseDao.deleteById(id); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<IcPartyOrgTreeDTO>> getTreelist(PartyOrgTreeListDTO formDTO) { |
|||
List<IcPartyOrgTreeDTO> list = baseDao.getTreelist(formDTO); |
|||
return new Result<List<IcPartyOrgTreeDTO>>().ok(build(list)); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<BranchlistTreeDTO>> branchlist(TokenDto tokenDto) { |
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|||
List<BranchlistTreeDTO> resultList = new ArrayList<>(); |
|||
BranchlistTreeDTO result = new BranchlistTreeDTO(); |
|||
result.setValue(staffInfo.getAgencyId()); |
|||
// result.setOrgPids(staffInfo.getAgencyPIds());
|
|||
result.setLabel(staffInfo.getAgencyName()); |
|||
result.setChildren(baseDao.selectAllBranchByAgencyId(staffInfo.getAgencyId(),tokenDto.getCustomerId())); |
|||
resultList.add(result); |
|||
return new Result<List<BranchlistTreeDTO>>().ok(resultList); |
|||
} |
|||
|
|||
/** |
|||
* 构建树节点 |
|||
*/ |
|||
public static List<IcPartyOrgTreeDTO> build(List<IcPartyOrgTreeDTO> treeNodes) { |
|||
List<IcPartyOrgTreeDTO> result = new ArrayList<>(); |
|||
|
|||
//list转map
|
|||
Map<String, IcPartyOrgTreeDTO> nodeMap = new LinkedHashMap<>(treeNodes.size()); |
|||
for(IcPartyOrgTreeDTO treeNode : treeNodes){ |
|||
nodeMap.put(treeNode.getId(), treeNode); |
|||
} |
|||
|
|||
for(IcPartyOrgTreeDTO node : nodeMap.values()) { |
|||
IcPartyOrgTreeDTO parent = nodeMap.get(node.getPid()); |
|||
if(parent != null && !(node.getId().equals(parent.getId()))){ |
|||
parent.getChildren().add(node); |
|||
continue; |
|||
} |
|||
|
|||
result.add(node); |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,311 @@ |
|||
package com.epmet.modules.partymember.controller; |
|||
|
|||
import com.alibaba.excel.EasyExcel; |
|||
import com.alibaba.excel.ExcelWriter; |
|||
import com.alibaba.excel.write.metadata.WriteSheet; |
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.annotation.MaskResponse; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.constant.AppClientConstant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.feign.ResultDataResolver; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.*; |
|||
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.constants.ImportTaskConstants; |
|||
import com.epmet.dto.form.IcPartyMemberFormDTO; |
|||
import com.epmet.dto.form.IcPartyMemberListFormDTO; |
|||
import com.epmet.dto.result.ImportTaskCommonResultDTO; |
|||
import com.epmet.dto.result.PartyMemberAgeResultDTO; |
|||
import com.epmet.dto.result.PartyMemberEducationResultDTO; |
|||
import com.epmet.modules.partymember.excel.IcPartyMemberExcel; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; |
|||
import com.epmet.utils.ImportTaskUtils; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.io.IOUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpHeaders; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.ServletOutputStream; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.FileOutputStream; |
|||
import java.io.IOException; |
|||
import java.io.InputStream; |
|||
import java.io.PrintWriter; |
|||
import java.net.URLEncoder; |
|||
import java.nio.file.Path; |
|||
import java.util.List; |
|||
import java.util.UUID; |
|||
import java.util.concurrent.atomic.AtomicInteger; |
|||
|
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Slf4j |
|||
@RestController |
|||
@RequestMapping("icPartyMember") |
|||
public class IcPartyMemberController implements ResultDataResolver { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberService icPartyMemberService; |
|||
|
|||
@RequestMapping("page") |
|||
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) |
|||
public Result<PageData<IcPartyMemberResultDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFromDTO formDTO){ |
|||
PageData<IcPartyMemberResultDTO> page = icPartyMemberService.page(tokenDto, formDTO); |
|||
return new Result<PageData<IcPartyMemberResultDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<IcPartyMemberDTO> get(@PathVariable("id") String id){ |
|||
IcPartyMemberDTO data = icPartyMemberService.get(id); |
|||
return new Result<IcPartyMemberDTO>().ok(data); |
|||
} |
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result<String> save(@RequestBody IcPartyMemberDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
String id = icPartyMemberService.save(dto); |
|||
return new Result<String>().ok(id); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcPartyMemberDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icPartyMemberService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icPartyMemberService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("export") |
|||
public void export(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFromDTO formDTO, HttpServletResponse response) throws Exception { |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setIsPage(false); |
|||
formDTO.setPageSize(NumConstant.TEN_THOUSAND); |
|||
|
|||
ExcelWriter excelWriter = null; |
|||
AtomicInteger i = new AtomicInteger(1); |
|||
try { |
|||
String fileName = "党员管理.xlsx"; |
|||
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcPartyMemberExcel.class).build(); |
|||
PageData<IcPartyMemberResultDTO> page = null; |
|||
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); |
|||
do { |
|||
page = icPartyMemberService.page(tokenDto, formDTO); |
|||
List<IcPartyMemberExcel> list = ConvertUtils.sourceToTarget(page.getList(), IcPartyMemberExcel.class); |
|||
list.forEach(item -> { |
|||
item.setIndex(i.getAndIncrement()); |
|||
}); |
|||
excelWriter.write(list, writeSheet); |
|||
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); |
|||
} while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDTO.getPageSize()); |
|||
} catch (EpmetException e) { |
|||
response.reset(); |
|||
response.setCharacterEncoding("UTF-8"); |
|||
response.setHeader("content-type", "application/json; charset=UTF-8"); |
|||
PrintWriter printWriter = response.getWriter(); |
|||
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg()); |
|||
printWriter.write(JSON.toJSONString(result)); |
|||
printWriter.close(); |
|||
} catch (Exception e) { |
|||
log.error("export exception", e); |
|||
} finally { |
|||
if (excelWriter != null) { |
|||
excelWriter.finish(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@PostMapping("icPartyMemberSync") |
|||
public Result icPartyMemberSync(@RequestBody IcPartyMemberDTO dto) { |
|||
icPartyMemberService.icPartyMemberSync(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* excel导入 |
|||
* @Param file |
|||
* @Return {@link Result} |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/23 16:05 |
|||
*/ |
|||
@PostMapping("import") |
|||
public Result importExcel(MultipartFile file) { |
|||
String userId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID); |
|||
|
|||
// 1.暂存文件
|
|||
String originalFilename = file.getOriginalFilename(); |
|||
String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); |
|||
|
|||
Path fileSavePath; |
|||
try { |
|||
Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_party_member", "import"); |
|||
fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName)); |
|||
} catch (IOException e) { |
|||
String errorMsg = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error("【党员管理导入】创建临时存储文件失败:{}", errorMsg); |
|||
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败"); |
|||
} |
|||
|
|||
InputStream is = null; |
|||
FileOutputStream os = null; |
|||
|
|||
try { |
|||
is = file.getInputStream(); |
|||
os = new FileOutputStream(fileSavePath.toString()); |
|||
IOUtils.copy(is, os); |
|||
} catch (Exception e) { |
|||
log.error("method exception", e); |
|||
} finally { |
|||
org.apache.poi.util.IOUtils.closeQuietly(is); |
|||
org.apache.poi.util.IOUtils.closeQuietly(os); |
|||
} |
|||
|
|||
// 2.生成导入任务记录
|
|||
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException( |
|||
ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.BIZ_TYPE_IC_PARTY_MEMBER), |
|||
ServiceConstant.EPMET_COMMON_SERVICE, |
|||
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), |
|||
"excel导入党员信息错误", |
|||
"导入党员信息失败"); |
|||
|
|||
// 3.执行导入
|
|||
icPartyMemberService.execAsyncExcelImport(fileSavePath, rstData.getTaskId()); |
|||
|
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员学历统计 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:06 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>> |
|||
*/ |
|||
@PostMapping("partymembereducationstatistics") |
|||
public Result<List<OptionDataResultDTO>> partyMemberEducationStatistics(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFormDTO formDTO) { |
|||
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|||
if (null == staffInfo) { |
|||
throw new EpmetException("获取工作人员信息失败"); |
|||
} |
|||
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|||
} |
|||
return new Result<List<OptionDataResultDTO>>().ok(icPartyMemberService.partyMemberEducationStatistics(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员年龄列表 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:20 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.result.PartyMemberAgeResultDTO>> |
|||
*/ |
|||
@PostMapping("partymemberagelist") |
|||
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) |
|||
public Result<PageData<PartyMemberAgeResultDTO>> partyMemberAgelist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) { |
|||
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|||
if (null == staffInfo) { |
|||
throw new EpmetException("获取工作人员信息失败"); |
|||
} |
|||
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|||
} |
|||
return new Result<PageData<PartyMemberAgeResultDTO>>().ok(icPartyMemberService.getPartyMemberAgeList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员学历列表 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:19 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.result.PartyMemberEducationResultDTO>> |
|||
*/ |
|||
@PostMapping("partymembereducationlist") |
|||
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) |
|||
public Result<PageData<PartyMemberEducationResultDTO>> partyMemberEducationlist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) { |
|||
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|||
if (null == staffInfo) { |
|||
throw new EpmetException("获取工作人员信息失败"); |
|||
} |
|||
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|||
} |
|||
return new Result<PageData<PartyMemberEducationResultDTO>>().ok(icPartyMemberService.getPartyMemberEducationList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员年龄范围统计 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:19 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>> |
|||
*/ |
|||
@PostMapping("partymemberagestatistics") |
|||
public Result<List<OptionDataResultDTO>> partyMemberAgeStatistics(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberFormDTO formDTO) { |
|||
if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){ |
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId()); |
|||
if (null == staffInfo) { |
|||
throw new EpmetException("获取工作人员信息失败"); |
|||
} |
|||
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|||
} |
|||
return new Result<List<OptionDataResultDTO>>().ok(icPartyMemberService.partyMemberAgeStatistics(formDTO)); |
|||
} |
|||
|
|||
|
|||
@RequestMapping(value = "downloadTemplate", method = {RequestMethod.GET, RequestMethod.POST}) |
|||
public void downloadTemplate(HttpServletResponse response) throws IOException { |
|||
response.setCharacterEncoding("UTF-8"); |
|||
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); |
|||
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
|||
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("党员信息导入模板", "UTF-8") + ".xlsx"); |
|||
|
|||
InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_party_member.xlsx"); |
|||
try { |
|||
ServletOutputStream os = response.getOutputStream(); |
|||
IOUtils.copy(is, os); |
|||
} finally { |
|||
if (is != null) { |
|||
is.close(); |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,85 @@ |
|||
package com.epmet.modules.partymember.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.modules.partymember.excel.IcPartyMemberPayRecordExcel; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPayRecordService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icPartyMemberPayRecord") |
|||
public class IcPartyMemberPayRecordController { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPayRecordService icPartyMemberPayRecordService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcPartyMemberPayRecordDTO>> page(@RequestParam Map<String, Object> params){ |
|||
// PageData<IcPartyMemberPayRecordDTO> page = icPartyMemberPayRecordService.page(params);
|
|||
PageData<IcPartyMemberPayRecordDTO> page = icPartyMemberPayRecordService.getPhrasePage(params); |
|||
return new Result<PageData<IcPartyMemberPayRecordDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<IcPartyMemberPayRecordDTO> get(@PathVariable("id") String id){ |
|||
IcPartyMemberPayRecordDTO data = icPartyMemberPayRecordService.get(id); |
|||
return new Result<IcPartyMemberPayRecordDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberPayRecordDTO dto){ |
|||
dto.setCustomerId(tokenDto.getCustomerId()); |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
return icPartyMemberPayRecordService.save(dto); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberPayRecordDTO dto){ |
|||
dto.setCustomerId(tokenDto.getCustomerId()); |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
return icPartyMemberPayRecordService.update(dto); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icPartyMemberPayRecordService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<IcPartyMemberPayRecordDTO> list = icPartyMemberPayRecordService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyMemberPayRecordExcel.class); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,137 @@ |
|||
package com.epmet.modules.partymember.controller; |
|||
|
|||
import com.alibaba.excel.EasyExcel; |
|||
import com.alibaba.excel.ExcelWriter; |
|||
import com.alibaba.excel.write.metadata.WriteSheet; |
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.modules.partymember.excel.IcPartyMemberPayRecordDetailExcel; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPayRecordDetailService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.PrintWriter; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.concurrent.atomic.AtomicInteger; |
|||
|
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Slf4j |
|||
@RestController |
|||
@RequestMapping("icPartyMemberPayRecordDetail") |
|||
public class IcPartyMemberPayRecordDetailController { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPayRecordDetailService icPartyMemberPayRecordDetailService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcPartyMemberPayRecordDetailDTO>> page(@LoginUser TokenDto tokenDto, @RequestParam Map<String, Object> params){ |
|||
params.put("customerId",tokenDto.getCustomerId()); |
|||
// PageData<IcPartyMemberPayRecordDetailDTO> page = icPartyMemberPayRecordDetailService.page(params);
|
|||
PageData<IcPartyMemberPayRecordDetailDTO> page = icPartyMemberPayRecordDetailService.getPhrasePage(params); |
|||
return new Result<PageData<IcPartyMemberPayRecordDetailDTO>>().ok(page); |
|||
} |
|||
|
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<IcPartyMemberPayRecordDetailDTO> get(@PathVariable("id") String id){ |
|||
IcPartyMemberPayRecordDetailDTO data = icPartyMemberPayRecordDetailService.get(id); |
|||
return new Result<IcPartyMemberPayRecordDetailDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody IcPartyMemberPayRecordDetailDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icPartyMemberPayRecordDetailService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcPartyMemberPayRecordDetailDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icPartyMemberPayRecordDetailService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icPartyMemberPayRecordDetailService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("export") |
|||
public void export(@LoginUser TokenDto tokenDto, @RequestBody Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
// List<IcPartyMemberPayRecordDetailDTO> list = icPartyMemberPayRecordDetailService.list(params);
|
|||
// ExcelUtils.exportExcelToTarget(response, null, list, IcPartyMemberPayRecordDetailExcel.class);
|
|||
|
|||
params.put("customerId",tokenDto.getCustomerId()); |
|||
params.put("isPage",false); |
|||
params.put("pageSize",NumConstant.TEN_THOUSAND); |
|||
|
|||
ExcelWriter excelWriter = null; |
|||
AtomicInteger i = new AtomicInteger(1); |
|||
try { |
|||
String fileName = "缴费记录.xlsx"; |
|||
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcPartyMemberPayRecordDetailExcel.class).build(); |
|||
PageData<IcPartyMemberPayRecordDetailDTO> page = null; |
|||
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); |
|||
do { |
|||
page = icPartyMemberPayRecordDetailService.getPhrasePage(params); |
|||
List<IcPartyMemberPayRecordDetailExcel> list = ConvertUtils.sourceToTarget(page.getList(), IcPartyMemberPayRecordDetailExcel.class); |
|||
list.forEach(item -> { |
|||
item.setIndex(i.getAndIncrement()); |
|||
}); |
|||
excelWriter.write(list, writeSheet); |
|||
// formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
|
|||
} while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == NumConstant.TEN_THOUSAND); |
|||
} catch (EpmetException e) { |
|||
response.reset(); |
|||
response.setCharacterEncoding("UTF-8"); |
|||
response.setHeader("content-type", "application/json; charset=UTF-8"); |
|||
PrintWriter printWriter = response.getWriter(); |
|||
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg()); |
|||
printWriter.write(JSON.toJSONString(result)); |
|||
printWriter.close(); |
|||
} catch (Exception e) { |
|||
log.error("export exception", e); |
|||
} finally { |
|||
if (excelWriter != null) { |
|||
excelWriter.finish(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,186 @@ |
|||
package com.epmet.modules.partymember.controller; |
|||
|
|||
import com.alibaba.excel.EasyExcel; |
|||
import com.alibaba.excel.ExcelWriter; |
|||
import com.alibaba.excel.write.metadata.WriteSheet; |
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.IcFollowUpRecordDTO; |
|||
import com.epmet.dto.result.IcMoveInListResultDTO; |
|||
import com.epmet.dto.result.IcVaccineListResultDTO; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|||
import com.epmet.modules.partymember.excel.IcPartyMemberExcel; |
|||
import com.epmet.modules.partymember.excel.IcPartyMemberPointExcel; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPointService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberExportFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointEchoFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
import jdk.nashorn.internal.parser.Token; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.PrintWriter; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.concurrent.atomic.AtomicInteger; |
|||
|
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icPartyMemberPoint") |
|||
@Slf4j |
|||
public class IcPartyMemberPointController { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPointService icPartyMemberPointService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcPartyMemberPointDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<IcPartyMemberPointDTO> page = icPartyMemberPointService.page(params); |
|||
return new Result<PageData<IcPartyMemberPointDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
|||
public Result<IcPartyMemberPointDTO> get(@PathVariable("id") String id) { |
|||
IcPartyMemberPointDTO data = icPartyMemberPointService.get(id); |
|||
return new Result<IcPartyMemberPointDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody IcPartyMemberPointDTO dto, @LoginUser TokenDto tokenDto) { |
|||
dto.setCustomerId(tokenDto.getCustomerId()); |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icPartyMemberPointService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcPartyMemberPointDTO dto, @LoginUser TokenDto tokenDto) { |
|||
dto.setCustomerId(tokenDto.getCustomerId()); |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icPartyMemberPointService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids) { |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icPartyMemberPointService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 量化积分统计导出 |
|||
* |
|||
* @param formDto |
|||
* @param response |
|||
* @return void |
|||
* @author LZN |
|||
* @date 2022/5/24 14:26 |
|||
*/ |
|||
@PostMapping("export") |
|||
public void export(@RequestBody PartyMemberPointListFormDTO formDto, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws Exception { |
|||
|
|||
formDto.setIsPage(false); |
|||
formDto.setPageSize(NumConstant.TEN_THOUSAND); |
|||
|
|||
ExcelWriter excelWriter = null; |
|||
AtomicInteger i = new AtomicInteger(1); |
|||
|
|||
try { |
|||
String fileName = "lhjf.xlsx"; |
|||
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcPartyMemberPointExcel.class).build(); |
|||
PageData<PartyMemberPointListResultDTO> page = null; |
|||
WriteSheet writeSheet = EasyExcel.writerSheet("量化积分").registerWriteHandler(new FreezeAndFilter()).build(); |
|||
do { |
|||
page = icPartyMemberPointService.getExport(formDto, tokenDto); |
|||
List<IcPartyMemberPointExcel> list = ConvertUtils.sourceToTarget(page.getList(), IcPartyMemberPointExcel.class); |
|||
list.forEach(item -> { |
|||
item.setIndex(i.getAndIncrement()); |
|||
}); |
|||
excelWriter.write(list, writeSheet); |
|||
formDto.setPageNo(formDto.getPageNo() + NumConstant.ONE); |
|||
} while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDto.getPageSize()); |
|||
} catch (EpmetException e) { |
|||
response.reset(); |
|||
response.setCharacterEncoding("UTF-8"); |
|||
response.setHeader("content-type", "application/json; charset=UTF-8"); |
|||
PrintWriter printWriter = response.getWriter(); |
|||
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getMsg()); |
|||
printWriter.write(JSON.toJSONString(result)); |
|||
printWriter.close(); |
|||
} catch (Exception e) { |
|||
log.error("export exception", e); |
|||
} finally { |
|||
if (excelWriter != null) { |
|||
excelWriter.finish(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 量化积分统计 |
|||
* |
|||
* @param form |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO>> |
|||
* @author LZN |
|||
* @date 2022/5/17 17:19 |
|||
*/ |
|||
@PostMapping("getList") |
|||
public Result<PageData<PartyMemberPointListResultDTO>> getList(@RequestBody PartyMemberPointListFormDTO form, @LoginUser TokenDto tokenDto) { |
|||
PageData<PartyMemberPointListResultDTO> dto = icPartyMemberPointService.getList(form, tokenDto); |
|||
return new Result<PageData<PartyMemberPointListResultDTO>>().ok(dto); |
|||
} |
|||
|
|||
/** |
|||
* 量化积分统计回显 |
|||
* |
|||
* @param form |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/18 18:18 |
|||
*/ |
|||
@PostMapping("echoPartyMemberPoint") |
|||
public Result<PartyMemberPointEchoResultDTO> getEchoPartyMemberPoint(@RequestBody PartyMemberPointEchoFormDTO form, @LoginUser TokenDto tokenDto) { |
|||
ValidatorUtils.validateEntity(form); |
|||
List<PartyMemberPointEchoResultDTO> dto = icPartyMemberPointService.getEchoPartyMemberPoint(form, tokenDto.getCustomerId()); |
|||
return new Result().ok(dto); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,77 @@ |
|||
package com.epmet.modules.partymember.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; |
|||
import com.epmet.dto.result.PartyMemberAgeResultDTO; |
|||
import com.epmet.dto.result.PartyMemberEducationResultDTO; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface IcPartyMemberDao extends BaseDao<IcPartyMemberEntity> { |
|||
/** |
|||
* 党员列表 |
|||
* |
|||
* @Param formDTO |
|||
* @Return {@link List< IcPartyMemberResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/18 17:01 |
|||
*/ |
|||
List<IcPartyMemberResultDTO> selectList(IcPartyMemberFromDTO formDTO); |
|||
|
|||
/** |
|||
* @describe: 查询该组织下的党员信息 |
|||
* @author wangtong |
|||
* @date 2022/5/19 16:20 |
|||
* @params [orgId] |
|||
* @return java.util.List<com.epmet.modules.partymember.entity.IcPartyMemberEntity> |
|||
*/ |
|||
List<IcPartyMemberEntity> selectAllByOrgId(@Param("orgId") String orgId); |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员学历统计 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:32 |
|||
* @params [orgId] |
|||
* @return java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO> |
|||
*/ |
|||
List<OptionDataResultDTO> getPartyMemberEducationStatistics(@Param("agencyId") String agencyId, @Param("orgId") String orgId); |
|||
|
|||
/** |
|||
* @describe: 党员年龄列表 |
|||
* @author wangtong |
|||
* @date 2022/5/23 11:06 |
|||
* @params [orgId, code] |
|||
* @return java.util.List<com.epmet.dto.result.PartyMemberAgeResultDTO> |
|||
*/ |
|||
List<PartyMemberAgeResultDTO> getPartyMemberAgeList(@Param("agencyId") String agencyId,@Param("orgId") String orgId,@Param("code") String code); |
|||
|
|||
/** |
|||
* @describe: 党员学历列表 |
|||
* @author wangtong |
|||
* @date 2022/5/23 13:40 |
|||
* @params [orgId, code] |
|||
* @return java.util.List<com.epmet.dto.result.PartyMemberEducationResultDTO> |
|||
*/ |
|||
List<PartyMemberEducationResultDTO> getPartyMemberEducationList(@Param("agencyId") String agencyId,@Param("orgId") String orgId,@Param("code") String code); |
|||
|
|||
/** |
|||
* @describe: 党员年龄范围统计 |
|||
* @author wangtong |
|||
* @date 2022/5/23 13:42 |
|||
* @params [orgId] |
|||
* @return java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO> |
|||
*/ |
|||
List<OptionDataResultDTO> getPartyMemberAgeStatistics(@Param("agencyId") String agencyId,@Param("orgId") String orgId); |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.epmet.modules.partymember.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface IcPartyMemberPayRecordDao extends BaseDao<IcPartyMemberPayRecordEntity> { |
|||
|
|||
List<IcPartyMemberPayRecordDTO> selectListInfo(Map<String, Object> params); |
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.modules.partymember.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberPayRecordDetailFormDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface IcPartyMemberPayRecordDetailDao extends BaseDao<IcPartyMemberPayRecordDetailEntity> { |
|||
|
|||
List<IcPartyMemberPayRecordDetailDTO> selectListInfo(Map<String, Object> params); |
|||
|
|||
List<IcPartyMemberPayRecordDetailDTO> getpayedList(@Param("monthList") List<String> monthList, |
|||
@Param("partyMemberId") String partyMemberId, |
|||
@Param("recordId") String recordId); |
|||
|
|||
void deletePayDetailByRecordId(@Param("recordId") String recordId); |
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.epmet.modules.partymember.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberExportFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface IcPartyMemberPointDao extends BaseDao<IcPartyMemberPointEntity> { |
|||
|
|||
List<PartyMemberPointListResultDTO> getList(@Param("idCard") String idCard, |
|||
@Param("mobile") String mobile, |
|||
@Param("name") String name, |
|||
@Param("orgId") String orgId, |
|||
@Param("year") String year, |
|||
@Param("customerId") String customerId); |
|||
|
|||
List<PartyMemberPointListCountDTO> getListCount(@Param("year") String year, |
|||
@Param("customerId") String customerId); |
|||
|
|||
List<PartyMemberPointEchoResultDTO> getEchoPartyMemberPoint(@Param("partyMemberId") String partyMemberId, |
|||
@Param("quarter") String quarter, |
|||
@Param("year") String year, |
|||
@Param("customerId") String customerId); |
|||
|
|||
List<PartyMemberPointExportResultDTO> getExport(@Param("form") PartyMemberExportFormDTO form, |
|||
@Param("customerId") String customerId); |
|||
|
|||
void updateMember(@Param("partyMemberId") String partyMemberId, @Param("totalScore") Integer totalScore); |
|||
} |
|||
@ -0,0 +1,146 @@ |
|||
package com.epmet.modules.partymember.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_party_member") |
|||
public class IcPartyMemberEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id customer.id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党组织的所有上级ID,没有上级时为0 |
|||
*/ |
|||
private String orgPids; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 行政组织 机关ID |
|||
*/ |
|||
private String agencyPids; |
|||
|
|||
/** |
|||
* 对应的ic_resi_user主表Id |
|||
*/ |
|||
private String icResiUser; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 入党时间 |
|||
*/ |
|||
private String rdsj; |
|||
|
|||
/** |
|||
* 所属支部 |
|||
*/ |
|||
private String sszb; |
|||
|
|||
/** |
|||
* 是否流动党员 |
|||
*/ |
|||
private String isLd; |
|||
|
|||
/** |
|||
* 流动党员活动证号 |
|||
*/ |
|||
private String ldzh; |
|||
|
|||
/** |
|||
* 职务 |
|||
*/ |
|||
private String partyZw; |
|||
|
|||
/** |
|||
* 是否退休 |
|||
*/ |
|||
private String isTx; |
|||
|
|||
/** |
|||
* 是否党员中心户 |
|||
*/ |
|||
private String isDyzxh; |
|||
|
|||
/** |
|||
* 是否免学习0否,1是 |
|||
*/ |
|||
private String isMxx; |
|||
|
|||
/** |
|||
* 文化程度【字典表】 |
|||
*/ |
|||
private String culture; |
|||
|
|||
/** |
|||
* 志愿者类型,逗号隔开 |
|||
*/ |
|||
private String volunteerCategory; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 预留字段1 |
|||
*/ |
|||
private Integer totalScore; |
|||
|
|||
/** |
|||
* 预留字段2 |
|||
*/ |
|||
private String field2; |
|||
|
|||
/** |
|||
* 预留字段3 |
|||
*/ |
|||
private String field3; |
|||
|
|||
/** |
|||
* 预留字段4 |
|||
*/ |
|||
private String field4; |
|||
|
|||
/** |
|||
* 预留字段5 |
|||
*/ |
|||
private String field5; |
|||
|
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
package com.epmet.modules.partymember.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_party_member_pay_record_detail") |
|||
public class IcPartyMemberPayRecordDetailEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 党员缴费记录表ID |
|||
*/ |
|||
private String recordId; |
|||
|
|||
/** |
|||
* 缴费年度 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 缴费月份 |
|||
*/ |
|||
private String month; |
|||
|
|||
/** |
|||
* 缴费金额 |
|||
*/ |
|||
private BigDecimal money; |
|||
|
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
package com.epmet.modules.partymember.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_party_member_pay_record") |
|||
public class IcPartyMemberPayRecordEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 缴费日期 |
|||
*/ |
|||
private String payDate; |
|||
|
|||
/** |
|||
* 缴费金额 |
|||
*/ |
|||
private BigDecimal money; |
|||
|
|||
/** |
|||
* 缴费开始时间 |
|||
*/ |
|||
private String startDate; |
|||
|
|||
/** |
|||
* 缴费结束时间 |
|||
*/ |
|||
private String endDate; |
|||
|
|||
} |
|||
@ -0,0 +1,104 @@ |
|||
package com.epmet.modules.partymember.entity; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelIgnore; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_party_member_point") |
|||
public class IcPartyMemberPointEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
@ExcelIgnore |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
@ExcelIgnore |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
@ExcelProperty(index = 1,value = "年份") |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
@ExcelProperty(index = 2,value = "季度") |
|||
private String quarter; |
|||
|
|||
/** |
|||
* 基础积分分值 |
|||
*/ |
|||
@ExcelProperty(index = 3,value = "基础积分分值") |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础积分选项 英文逗号隔开 |
|||
*/ |
|||
@ExcelIgnore |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
@ExcelProperty(index = 4,value = "民主评议积分分值") |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议积分选项 |
|||
*/ |
|||
@ExcelIgnore |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
@ExcelProperty(index = 5,value = "激励积分分值") |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
@ExcelIgnore |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
@ExcelProperty(index = 6,value = "警示扣分分值") |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
@ExcelIgnore |
|||
private String warnOptions; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
@ExcelProperty(index = 7,value = "总分") |
|||
private Integer totalScore; |
|||
|
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
package com.epmet.modules.partymember.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
|||
import com.alibaba.excel.enums.poi.FillPatternTypeEnum; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) |
|||
@Data |
|||
public class IcPartyMemberExcel { |
|||
|
|||
@ColumnWidth(10) |
|||
@ExcelProperty(value = "序号",order = 1) |
|||
private Integer index; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "姓名",order = 2) |
|||
private String name; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "身份证号",order = 3) |
|||
private String idCard; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "手机号",order = 4) |
|||
private String mobile; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "入党时间",order = 5) |
|||
private String rdsj; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "所属党组织",order = 6) |
|||
private String sszb; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "流动党员",order = 7) |
|||
private String isLd; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "流动党员证号",order = 8) |
|||
private String ldzh; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "职务",order = 9) |
|||
private String partyZw; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "地址",order = 10) |
|||
private String address; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "是否缴费",order = 11) |
|||
private String isPay; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "最近一次缴纳党费时间",order = 12) |
|||
private String payDate; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "文化程度",order = 13) |
|||
private String culture; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "量化积分",order = 14) |
|||
private String point; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "志愿者类别",order = 15) |
|||
private String volunteerCategory; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "备注",order = 16) |
|||
private String remark; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
package com.epmet.modules.partymember.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 核酸检测信息导入excel数据 |
|||
* @author Administrator |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberImportExcel { |
|||
|
|||
@NotBlank(message = "所属党组织为必填项") |
|||
@ExcelProperty("所属党组织") |
|||
private String sszb; |
|||
|
|||
@NotBlank(message = "姓名为必填项") |
|||
@ExcelProperty("姓名") |
|||
private String name; |
|||
|
|||
@NotBlank(message = "手机号为必填项") |
|||
@ExcelProperty("手机号") |
|||
@Length(max = 15, message = "手机号长度不正确,应小于15位") |
|||
private String mobile; |
|||
|
|||
@NotBlank(message = "身份证号为必填项") |
|||
@ExcelProperty("身份证号") |
|||
@Length(max = 18, message = "身份证号长度不正确,应小于18位") |
|||
private String idCard; |
|||
|
|||
@ExcelProperty("地址") |
|||
private String address; |
|||
|
|||
@ExcelProperty("入党时间") |
|||
private String rdsj; |
|||
|
|||
@ExcelProperty("流动党员") |
|||
private String isLd; |
|||
|
|||
@ExcelProperty("流动党员证号") |
|||
private String ldzh; |
|||
|
|||
@ExcelProperty("党员中心户") |
|||
private String isDyzxh; |
|||
|
|||
@ExcelProperty("免学习") |
|||
private String isMxx; |
|||
|
|||
@ExcelProperty("职务") |
|||
private String partyZw; |
|||
|
|||
@ExcelProperty("文化程度") |
|||
private String culture; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Data |
|||
public static class RowRemarkMessage { |
|||
|
|||
@ExcelProperty("姓名") |
|||
@ColumnWidth(20) |
|||
private String name; |
|||
|
|||
@ExcelProperty("手机号") |
|||
@ColumnWidth(20) |
|||
private String mobile; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty("身份证号") |
|||
private String idCard; |
|||
|
|||
@ColumnWidth(60) |
|||
@ExcelProperty("错误信息") |
|||
private String errorInfo; |
|||
} |
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
package com.epmet.modules.partymember.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberPayRecordDetailExcel { |
|||
|
|||
@ColumnWidth(10) |
|||
@ExcelProperty(value = "序号",order = 1) |
|||
private Integer index; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "所属党组织",order = 2) |
|||
private String orgName; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "姓名",order = 3) |
|||
private String name; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "身份证号",order = 4) |
|||
private String idCard; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "手机号",order = 5) |
|||
private String mobile; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "缴费次数",order = 6) |
|||
private String times; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "缴费金额",order = 7) |
|||
private BigDecimal money; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "备注",order = 8) |
|||
private String remark; |
|||
|
|||
// @Excel(name = "客户Id (customer.id)")
|
|||
// private String customerId;
|
|||
//
|
|||
// @Excel(name = "党员ID")
|
|||
// private String partyMemberId;
|
|||
//
|
|||
// @Excel(name = "党员缴费记录表ID")
|
|||
// private String recordId;
|
|||
//
|
|||
// @Excel(name = "缴费年度")
|
|||
// private String year;
|
|||
//
|
|||
// @Excel(name = "缴费季度")
|
|||
// private String quarter;
|
|||
|
|||
// @Excel(name = "删除标识:0.未删除 1.已删除")
|
|||
// private Integer delFlag;
|
|||
//
|
|||
// @Excel(name = "乐观锁")
|
|||
// private Integer revision;
|
|||
//
|
|||
// @Excel(name = "创建人")
|
|||
// private String createdBy;
|
|||
//
|
|||
// @Excel(name = "创建时间")
|
|||
// private Date createdTime;
|
|||
//
|
|||
// @Excel(name = "更新人")
|
|||
// private String updatedBy;
|
|||
//
|
|||
// @Excel(name = "更新时间")
|
|||
// private Date updatedTime;
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
package com.epmet.modules.partymember.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberPayRecordExcel { |
|||
|
|||
@Excel(name = "唯一标识") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户Id (customer.id)") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "党员ID") |
|||
private String partyMemberId; |
|||
|
|||
@Excel(name = "缴费日期") |
|||
private String payDate; |
|||
|
|||
@Excel(name = "缴费金额") |
|||
private BigDecimal money; |
|||
|
|||
@Excel(name = "缴费开始时间") |
|||
private String startDate; |
|||
|
|||
@Excel(name = "缴费结束时间") |
|||
private String endDate; |
|||
|
|||
@Excel(name = "删除标识:0.未删除 1.已删除") |
|||
private Integer delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
package com.epmet.modules.partymember.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import com.alibaba.excel.annotation.ExcelIgnore; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import kotlin.ExperimentalUnsignedTypes; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberPointExcel { |
|||
|
|||
@ColumnWidth(10) |
|||
@ExcelProperty(value = "序号",order = 1) |
|||
private Integer index; |
|||
|
|||
@ExcelIgnore |
|||
private String id; |
|||
|
|||
@ExcelIgnore |
|||
private String customerId; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "党员ID",order = 2) |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 所属党组织 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "所属党组织",order = 3) |
|||
private String partyOrg; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "姓名",order = 4) |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "手机号",order = 5) |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "身份证号",order = 6) |
|||
private String idCard; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "年份",order = 7) |
|||
private String year; |
|||
|
|||
@ExcelIgnore |
|||
private String quarter; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "基础积分分值",order = 8) |
|||
private Integer basePoint; |
|||
|
|||
@ExcelIgnore |
|||
private String baseOptions; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "民主评议积分分值",order = 9) |
|||
private Integer reviewPoint; |
|||
|
|||
@ExcelIgnore |
|||
private String reviewOptions; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "激励积分分值",order = 10) |
|||
private Integer inspirePoint; |
|||
|
|||
@ExcelIgnore |
|||
private String inspireOptions; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "警示扣分分值",order = 11) |
|||
private Integer warnPoint; |
|||
|
|||
@ExcelIgnore |
|||
private String warnOptions; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "总分" ,order = 12) |
|||
private Integer totalScore; |
|||
|
|||
|
|||
|
|||
@ExcelIgnore |
|||
private Integer delFlag; |
|||
|
|||
@ExcelIgnore |
|||
private Integer revision; |
|||
|
|||
@ExcelIgnore |
|||
private String createdBy; |
|||
|
|||
@ExcelIgnore |
|||
private Date createdTime; |
|||
|
|||
@ExcelIgnore |
|||
private String updatedBy; |
|||
|
|||
@ExcelIgnore |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,130 @@ |
|||
package com.epmet.modules.partymember.excel.handler; |
|||
|
|||
import com.alibaba.excel.context.AnalysisContext; |
|||
import com.alibaba.excel.read.listener.ReadListener; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.exception.ValidateException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
|||
import com.epmet.modules.partymember.excel.IcPartyMemberImportExcel; |
|||
import com.epmet.modules.partymember.service.impl.IcPartyMemberServiceImpl; |
|||
import lombok.Data; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 党员excel导入监听器 |
|||
* @author Administrator |
|||
*/ |
|||
@Data |
|||
@Slf4j |
|||
public class IcPartyMemberImportListener implements ReadListener<IcPartyMemberImportExcel> { |
|||
|
|||
/** |
|||
* 最大条数阈值 |
|||
*/ |
|||
public static final int MAX_THRESHOLD = 200; |
|||
|
|||
private String currentUserId; |
|||
/** |
|||
* 当前组织ID |
|||
*/ |
|||
private String currentAgencyId; |
|||
|
|||
private String currentAgencyPids; |
|||
|
|||
/** |
|||
* 数据 |
|||
*/ |
|||
private List<IcPartyMemberEntity> datas = new ArrayList<>(); |
|||
|
|||
/** |
|||
* 错误项列表 |
|||
*/ |
|||
private List<IcPartyMemberImportExcel.RowRemarkMessage> errorRows = new ArrayList<>(); |
|||
/** |
|||
* 其他被标记出来的列表列表 |
|||
*/ |
|||
private List<IcPartyMemberImportExcel.RowRemarkMessage> otherRows = new ArrayList<>(); |
|||
|
|||
private IcPartyMemberServiceImpl icPartyMemberService; |
|||
|
|||
public IcPartyMemberImportListener(String currentUserId, IcPartyMemberServiceImpl icPartyMemberService) { |
|||
this.currentUserId = currentUserId; |
|||
this.icPartyMemberService = icPartyMemberService; |
|||
} |
|||
|
|||
@Override |
|||
public void invoke(IcPartyMemberImportExcel data, AnalysisContext context) { |
|||
|
|||
try { |
|||
// 先校验数据
|
|||
ValidatorUtils.validateEntity(data); |
|||
if (StringUtils.isNotBlank(data.getSszb())) { |
|||
data.setSszb(data.getSszb().trim()); |
|||
} |
|||
if (StringUtils.isNotBlank(data.getName())) { |
|||
data.setName(data.getName().trim()); |
|||
} |
|||
if (StringUtils.isNotBlank(data.getMobile())) { |
|||
data.setMobile(data.getMobile().trim()); |
|||
} |
|||
if (StringUtils.isNotBlank(data.getIdCard())) { |
|||
data.setIdCard(data.getIdCard().trim()); |
|||
} |
|||
|
|||
IcPartyMemberEntity icPartyMemberEntity = ConvertUtils.sourceToTarget(data, IcPartyMemberEntity.class); |
|||
datas.add(icPartyMemberEntity); |
|||
|
|||
if (datas.size() == MAX_THRESHOLD) { |
|||
execPersist(); |
|||
} |
|||
} catch (Exception e) { |
|||
String errorMsg = null; |
|||
if (e instanceof ValidateException) { |
|||
errorMsg = ((ValidateException) e).getMsg(); |
|||
} else { |
|||
errorMsg = "未知错误"; |
|||
log.error("【党员信息导入】出错:{}", ExceptionUtils.getErrorStackTrace(e)); |
|||
} |
|||
|
|||
IcPartyMemberImportExcel.RowRemarkMessage errorRow = new IcPartyMemberImportExcel.RowRemarkMessage(); |
|||
errorRow.setName(data.getName()); |
|||
errorRow.setMobile(data.getMobile()); |
|||
errorRow.setIdCard(data.getIdCard()); |
|||
errorRow.setErrorInfo(errorMsg); |
|||
errorRows.add(errorRow); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void doAfterAllAnalysed(AnalysisContext context) { |
|||
// 最后几条达不到阈值,这里必须再调用一次
|
|||
execPersist(); |
|||
} |
|||
|
|||
/** |
|||
* 执行持久化 |
|||
*/ |
|||
private void execPersist() { |
|||
try { |
|||
if (datas != null && datas.size() > 0) { |
|||
icPartyMemberService.batchPersist(datas, this); |
|||
} |
|||
} finally { |
|||
datas.clear(); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 获取错误行 |
|||
* @return |
|||
*/ |
|||
public List<IcPartyMemberImportExcel.RowRemarkMessage> getErrorRows() { |
|||
return errorRows; |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.modules.partymember.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Component |
|||
public class IcPartyMemberPayRecordDetailRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.modules.partymember.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Component |
|||
public class IcPartyMemberPayRecordRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.modules.partymember.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Component |
|||
public class IcPartyMemberPointRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,89 @@ |
|||
package com.epmet.modules.partymember.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberPayRecordDetailFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
public interface IcPartyMemberPayRecordDetailService extends BaseService<IcPartyMemberPayRecordDetailEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcPartyMemberPayRecordDetailDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
PageData<IcPartyMemberPayRecordDetailDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 分页条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
PageData<IcPartyMemberPayRecordDetailDTO> getPhrasePage(Map<String, Object> params); |
|||
|
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcPartyMemberPayRecordDetailDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
List<IcPartyMemberPayRecordDetailDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcPartyMemberPayRecordDetailDTO |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
IcPartyMemberPayRecordDetailDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void save(IcPartyMemberPayRecordDetailDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void update(IcPartyMemberPayRecordDetailDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
package com.epmet.modules.partymember.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
public interface IcPartyMemberPayRecordService extends BaseService<IcPartyMemberPayRecordEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcPartyMemberPayRecordDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
PageData<IcPartyMemberPayRecordDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 分页条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
PageData<IcPartyMemberPayRecordDTO> getPhrasePage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcPartyMemberPayRecordDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
List<IcPartyMemberPayRecordDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcPartyMemberPayRecordDTO |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
IcPartyMemberPayRecordDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
Result save(IcPartyMemberPayRecordDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
Result update(IcPartyMemberPayRecordDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
package com.epmet.modules.partymember.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberExportFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointEchoFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
|
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
public interface IcPartyMemberPointService extends BaseService<IcPartyMemberPointEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcPartyMemberPointDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
PageData<IcPartyMemberPointDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcPartyMemberPointDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
List<IcPartyMemberPointDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcPartyMemberPointDTO |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
IcPartyMemberPointDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void save(IcPartyMemberPointDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void update(IcPartyMemberPointDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 量化积分统计 |
|||
* |
|||
* @param form |
|||
* @return java.util.List<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/17 17:19 |
|||
*/ |
|||
PageData<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto); |
|||
|
|||
/** |
|||
* 量化积分统计回显 |
|||
* |
|||
* @param form |
|||
* @return java.util.List<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/18 18:18 |
|||
*/ |
|||
List<PartyMemberPointEchoResultDTO> getEchoPartyMemberPoint(PartyMemberPointEchoFormDTO form, String customerId); |
|||
|
|||
/** |
|||
* 量化积分统计导出 |
|||
* |
|||
* @param form |
|||
* @return com.epmet.commons.tools.page.PageData<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/24 14:26 |
|||
*/ |
|||
PageData<PartyMemberPointListResultDTO> getExport(PartyMemberPointListFormDTO form, TokenDto tokenDto); |
|||
} |
|||
@ -0,0 +1,140 @@ |
|||
package com.epmet.modules.partymember.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.form.IcPartyMemberFormDTO; |
|||
import com.epmet.dto.form.IcPartyMemberListFormDTO; |
|||
import com.epmet.dto.result.PartyMemberAgeResultDTO; |
|||
import com.epmet.dto.result.PartyMemberEducationResultDTO; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberFromDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; |
|||
|
|||
import java.nio.file.Path; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 数字平台党员信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
public interface IcPartyMemberService extends BaseService<IcPartyMemberEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param formDTO |
|||
* @return PageData<IcPartyMemberDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
PageData<IcPartyMemberResultDTO> page(TokenDto tokenDto, IcPartyMemberFromDTO formDTO); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcPartyMemberDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
List<IcPartyMemberDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcPartyMemberDTO |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
IcPartyMemberDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
String save(IcPartyMemberDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void update(IcPartyMemberDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 党员信息同步 |
|||
* |
|||
* @Param dto |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/18 10:16 |
|||
*/ |
|||
void icPartyMemberSync(IcPartyMemberDTO dto); |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员学历统计 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:06 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>> |
|||
*/ |
|||
List<OptionDataResultDTO> partyMemberEducationStatistics(IcPartyMemberFormDTO formDTO); |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员年龄列表 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:20 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.result.PartyMemberAgeResultDTO>> |
|||
*/ |
|||
PageData<PartyMemberAgeResultDTO> getPartyMemberAgeList(IcPartyMemberListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员学历列表 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:19 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.result.PartyMemberEducationResultDTO>> |
|||
*/ |
|||
PageData<PartyMemberEducationResultDTO> getPartyMemberEducationList(IcPartyMemberListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @describe: 统计分析-党员年龄范围统计 |
|||
* @author wangtong |
|||
* @date 2022/5/23 10:19 |
|||
* @params [formDTO] |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>> |
|||
*/ |
|||
List<OptionDataResultDTO> partyMemberAgeStatistics(IcPartyMemberFormDTO formDTO); |
|||
|
|||
|
|||
/** |
|||
* 执行Excel导入 |
|||
* @param filePath |
|||
*/ |
|||
void execAsyncExcelImport(Path filePath, String importTaskId); |
|||
} |
|||
@ -0,0 +1,111 @@ |
|||
package com.epmet.modules.partymember.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.StrConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|||
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDetailDao; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; |
|||
import com.epmet.modules.partymember.entity.IcPartymemberStyleCategoryDictEntity; |
|||
import com.epmet.modules.partymember.entity.IcPartymemberStyleEntity; |
|||
import com.epmet.modules.partymember.redis.IcPartyMemberPayRecordDetailRedis; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPayRecordDetailService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartymemberStyleDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.IcPartyMemberPayRecordDetailFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberStyleFormDTO; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员缴费记录明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Service |
|||
public class IcPartyMemberPayRecordDetailServiceImpl extends BaseServiceImpl<IcPartyMemberPayRecordDetailDao, IcPartyMemberPayRecordDetailEntity> implements IcPartyMemberPayRecordDetailService { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPayRecordDetailRedis icPartyMemberPayRecordDetailRedis; |
|||
|
|||
@Override |
|||
public PageData<IcPartyMemberPayRecordDetailDTO> page(Map<String, Object> params) { |
|||
IPage<IcPartyMemberPayRecordDetailEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcPartyMemberPayRecordDetailDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<IcPartyMemberPayRecordDetailDTO> getPhrasePage(Map<String, Object> params) { |
|||
IPage<IcPartyMemberPayRecordDetailDTO> page = getPage(params); |
|||
List<IcPartyMemberPayRecordDetailDTO> list = baseDao.selectListInfo(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public List<IcPartyMemberPayRecordDetailDTO> list(Map<String, Object> params) { |
|||
List<IcPartyMemberPayRecordDetailEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcPartyMemberPayRecordDetailDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcPartyMemberPayRecordDetailEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcPartyMemberPayRecordDetailEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcPartyMemberPayRecordDetailDTO get(String id) { |
|||
IcPartyMemberPayRecordDetailEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcPartyMemberPayRecordDetailDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcPartyMemberPayRecordDetailDTO dto) { |
|||
IcPartyMemberPayRecordDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPayRecordDetailEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcPartyMemberPayRecordDetailDTO dto) { |
|||
IcPartyMemberPayRecordDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPayRecordDetailEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,212 @@ |
|||
package com.epmet.modules.partymember.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDao; |
|||
import com.epmet.modules.partymember.dao.IcPartyMemberPayRecordDetailDao; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordDetailEntity; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPayRecordEntity; |
|||
import com.epmet.modules.partymember.redis.IcPartyMemberPayRecordRedis; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPayRecordDetailService; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPayRecordService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPayRecordDetailDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.text.ParseException; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.*; |
|||
|
|||
/** |
|||
* 党员缴费记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Service |
|||
public class IcPartyMemberPayRecordServiceImpl extends BaseServiceImpl<IcPartyMemberPayRecordDao, IcPartyMemberPayRecordEntity> implements IcPartyMemberPayRecordService { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPayRecordRedis icPartyMemberPayRecordRedis; |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPayRecordDetailService icPartyMemberPayRecordDetailService; |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPayRecordDetailDao icPartyMemberPayRecordDetailDao; |
|||
|
|||
@Override |
|||
public PageData<IcPartyMemberPayRecordDTO> page(Map<String, Object> params) { |
|||
IPage<IcPartyMemberPayRecordEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcPartyMemberPayRecordDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<IcPartyMemberPayRecordDTO> getPhrasePage(Map<String, Object> params) { |
|||
String partyMemberId = params.get("partyMemberId") == null ? "" : params.get("partyMemberId").toString(); |
|||
if(StringUtils.isBlank(partyMemberId)){ |
|||
throw new RenException("党员ID不能为空"); |
|||
} |
|||
IPage<IcPartyMemberPayRecordDTO> page = getPage(params); |
|||
List<IcPartyMemberPayRecordDTO> list = baseDao.selectListInfo(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public List<IcPartyMemberPayRecordDTO> list(Map<String, Object> params) { |
|||
List<IcPartyMemberPayRecordEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcPartyMemberPayRecordDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcPartyMemberPayRecordEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcPartyMemberPayRecordEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcPartyMemberPayRecordDTO get(String id) { |
|||
IcPartyMemberPayRecordEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcPartyMemberPayRecordDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Result save(IcPartyMemberPayRecordDTO dto) { |
|||
// 根据起始时间转月份列表
|
|||
List<String> monthList = getMonthList(dto.getStartDate(),dto.getEndDate()); |
|||
|
|||
// 校验是否有月份已缴费
|
|||
List<IcPartyMemberPayRecordDetailDTO> payedList = icPartyMemberPayRecordDetailDao.getpayedList(monthList,dto.getPartyMemberId(),""); |
|||
if(payedList.size() > 0){ |
|||
return new Result().error("存在已缴费月份,请重新录入"); |
|||
} |
|||
|
|||
// 保存党员缴费记录表信息
|
|||
IcPartyMemberPayRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPayRecordEntity.class); |
|||
insert(entity); |
|||
|
|||
// 保存党员缴费记录明细
|
|||
saveDetailInfo(monthList,entity); |
|||
|
|||
return new Result(); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Result update(IcPartyMemberPayRecordDTO dto) { |
|||
// 根据起始时间转月份列表
|
|||
List<String> monthList = getMonthList(dto.getStartDate(),dto.getEndDate()); |
|||
|
|||
// 校验本次修改是否有月份已缴费(除该主键下的月份)
|
|||
List<IcPartyMemberPayRecordDetailDTO> payedList = icPartyMemberPayRecordDetailDao.getpayedList(monthList,dto.getPartyMemberId(),dto.getId()); |
|||
if(payedList.size() > 0){ |
|||
return new Result().error("存在已缴费月份,请重新录入"); |
|||
} |
|||
|
|||
// 更新党员缴费记录表信息
|
|||
IcPartyMemberPayRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPayRecordEntity.class); |
|||
updateById(entity); |
|||
|
|||
// 清空该记录表主键下的党员缴费记录明细
|
|||
icPartyMemberPayRecordDetailDao.deletePayDetailByRecordId(dto.getId()); |
|||
|
|||
// 保存党员缴费记录明细
|
|||
saveDetailInfo(monthList,entity); |
|||
|
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
|
|||
// 删除党员缴费记录明细
|
|||
icPartyMemberPayRecordDetailDao.deletePayDetailByRecordId(ids[0]); |
|||
} |
|||
|
|||
/** |
|||
* 根据起始时间获取该时间段所包含的所有月份,返回list |
|||
* |
|||
* @param startTime |
|||
* @param endTime |
|||
* @return |
|||
*/ |
|||
public List<String> getMonthList(String startTime, String endTime){ |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); |
|||
// 声明保存日期集合
|
|||
List<String> list = new ArrayList<String>(); |
|||
try { |
|||
// 转化成日期类型
|
|||
Date startDate = sdf.parse(startTime); |
|||
Date endDate = sdf.parse(endTime); |
|||
|
|||
//用Calendar 进行日期比较判断
|
|||
Calendar calendar = Calendar.getInstance(); |
|||
while (startDate.getTime()<=endDate.getTime()){ |
|||
// 把日期添加到集合
|
|||
list.add(sdf.format(startDate)); |
|||
// 设置日期
|
|||
calendar.setTime(startDate); |
|||
//把日期增加一天
|
|||
calendar.add(Calendar.MONTH, 1); |
|||
// 获取增加后的日期
|
|||
startDate=calendar.getTime(); |
|||
} |
|||
} catch (ParseException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return list; |
|||
|
|||
} |
|||
|
|||
public void saveDetailInfo(List<String> monthList,IcPartyMemberPayRecordEntity entity){ |
|||
// 组装党员缴费记录明细实体
|
|||
BigDecimal money = entity.getMoney(); |
|||
// 求本次缴费的月份平均缴费金额
|
|||
BigDecimal moneyDivide = money.divide(new BigDecimal(monthList.size()),2,BigDecimal.ROUND_HALF_UP); |
|||
List<IcPartyMemberPayRecordDetailEntity> detailList = new ArrayList<IcPartyMemberPayRecordDetailEntity>(); |
|||
for(int i = 0 ; i < monthList.size() ; i++){ |
|||
IcPartyMemberPayRecordDetailEntity detailEntity = new IcPartyMemberPayRecordDetailEntity(); |
|||
detailEntity.setCustomerId(entity.getCustomerId()); |
|||
detailEntity.setRecordId(entity.getId()); |
|||
detailEntity.setMoney(moneyDivide); |
|||
detailEntity.setPartyMemberId(entity.getPartyMemberId()); |
|||
String year = monthList.get(i).substring(0,4); |
|||
String month = monthList.get(i).substring(5,7); |
|||
detailEntity.setYear(year); |
|||
detailEntity.setMonth(month); |
|||
detailList.add(detailEntity); |
|||
} |
|||
|
|||
// 保存党员缴费记录明细表信息
|
|||
icPartyMemberPayRecordDetailService.insertBatch(detailList); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,172 @@ |
|||
package com.epmet.modules.partymember.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
|
|||
import com.epmet.modules.partymember.dao.IcPartyMemberPointDao; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|||
import com.epmet.modules.partymember.redis.IcPartyMemberPointRedis; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPointService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberExportFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointEchoFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.IcPartyMemberResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import jdk.nashorn.internal.parser.Token; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.sql.Time; |
|||
import java.time.Year; |
|||
import java.util.Arrays; |
|||
import java.util.Calendar; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Service |
|||
public class IcPartyMemberPointServiceImpl extends BaseServiceImpl<IcPartyMemberPointDao, IcPartyMemberPointEntity> implements IcPartyMemberPointService { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPointRedis icPartyMemberPointRedis; |
|||
|
|||
@Override |
|||
public PageData<IcPartyMemberPointDTO> page(Map<String, Object> params) { |
|||
IPage<IcPartyMemberPointEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcPartyMemberPointDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcPartyMemberPointDTO> list(Map<String, Object> params) { |
|||
List<IcPartyMemberPointEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcPartyMemberPointDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcPartyMemberPointEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcPartyMemberPointEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcPartyMemberPointDTO get(String id) { |
|||
IcPartyMemberPointEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcPartyMemberPointDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcPartyMemberPointDTO dto) { |
|||
dto.setTotalScore(dto.getBasePoint() + dto.getInspirePoint() + dto.getReviewPoint()); |
|||
if (dto.getWarnPoint() > 0) { |
|||
dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); |
|||
} else { |
|||
dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); |
|||
} |
|||
IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); |
|||
if(dto.getYear().equals(Year.now().toString())){ |
|||
baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); |
|||
} |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcPartyMemberPointDTO dto) { |
|||
dto.setTotalScore(dto.getBasePoint() + dto.getInspirePoint() + dto.getReviewPoint()); |
|||
if (dto.getWarnPoint() > 0) { |
|||
dto.setTotalScore(dto.getTotalScore() - dto.getWarnPoint()); |
|||
} else { |
|||
dto.setTotalScore(dto.getTotalScore() + dto.getWarnPoint()); |
|||
} |
|||
IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); |
|||
if(dto.getYear().equals(Year.now().toString())){ |
|||
baseDao.updateMember(dto.getPartyMemberId(), dto.getTotalScore()); |
|||
} |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 量化积分统计 |
|||
* |
|||
* @param form |
|||
* @param tokenDto |
|||
* @return java.util.List<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/18 18:20 |
|||
*/ |
|||
@Override |
|||
public PageData<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) { |
|||
PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); |
|||
List<PartyMemberPointListResultDTO> dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), |
|||
form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); |
|||
PageInfo<PartyMemberPointListResultDTO> pageInfo = new PageInfo<>(dto); |
|||
return new PageData<>(dto, pageInfo.getTotal()); |
|||
} |
|||
|
|||
/** |
|||
* 量化积分统计回显 |
|||
* |
|||
* @param form |
|||
* @return java.util.List<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointEchoResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/18 18:20 |
|||
*/ |
|||
@Override |
|||
public List<PartyMemberPointEchoResultDTO> getEchoPartyMemberPoint(PartyMemberPointEchoFormDTO form, String customerId) { |
|||
List<PartyMemberPointEchoResultDTO> dto = baseDao.getEchoPartyMemberPoint(form.getPartyMemberId(), form.getQuarter(), form.getYear(), customerId); |
|||
return dto; |
|||
} |
|||
|
|||
/** |
|||
* 量化积分统计导出 |
|||
* |
|||
* @param form |
|||
* @return com.epmet.commons.tools.page.PageData<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointExportResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/24 14:26 |
|||
*/ |
|||
@Override |
|||
public PageData<PartyMemberPointListResultDTO> getExport(PartyMemberPointListFormDTO form, TokenDto tokenDto) { |
|||
PageHelper.startPage(form.getPageNo(), form.getPageSize(), form.getIsPage()); |
|||
List<PartyMemberPointListResultDTO> dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), |
|||
form.getOrgId(), form.getYear(), tokenDto.getCustomerId()); |
|||
PageInfo<PartyMemberPointListResultDTO> pageInfo = new PageInfo<>(dto); |
|||
return new PageData<>(dto, pageInfo.getTotal()); |
|||
} |
|||
|
|||
|
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue