From 46b63638e8d7311021d6d78512221eff9be5c29d Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 4 May 2023 12:41:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E5=B0=8F=E7=BB=84=E3=80=91?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=9F=A5=E8=AF=A2=E5=B0=8F=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/group/service/impl/ResiGroupServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 7fd6933a1e..70527fbda9 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -2009,7 +2009,8 @@ public class ResiGroupServiceImpl extends BaseServiceImpl query = new LambdaQueryWrapper<>(); query.eq(ResiGroupEntity::getCustomerId, EpmetRequestHolder.getLoginUserCustomerId()); - query.eq(ResiGroupEntity::getPids, PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids())); + query.eq(ResiGroupEntity::getGroupType, "branch"); // 党小组 + query.likeRight(ResiGroupEntity::getOrgIdPath, PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids())); return baseDao.selectCount(query); } } From 1b7c69afc22e9fdc6387afe8423522e3ed2b893d Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 4 May 2023 15:08:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AF=81=E6=AD=A3=E5=88=99=E8=A7=A3=E6=9E=90=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=B1=BB=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=87=BA=E7=94=9F=E6=97=A5?= =?UTF-8?q?=E6=9C=9F[LocalDate=E7=B1=BB=E5=9E=8B]=E7=9A=84=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/utils/DateUtils.java | 37 +++++++++++++++++++ .../commons/tools/utils/IdCardRegexUtils.java | 7 +++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java index 8ddbea5066..f13ecd1297 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java @@ -22,6 +22,8 @@ import org.joda.time.format.DateTimeFormatter; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.LocalDateTime; import java.time.ZoneId; import java.util.*; @@ -1112,4 +1114,39 @@ public class DateUtils { cal.setTime(date); return str.contains(String.valueOf(cal.get(Calendar.DAY_OF_WEEK))); } + + /** + * @description: java.time.LocalDate转Date + * @param localDate: + * @return + * @author: WangXianZhang + * @date: 2023/5/4 3:00 PM + */ + public static Date localDate2Date(java.time.LocalDate localDate) { + Instant instant = localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant(); + return Date.from(instant); + } + + /** + * @description: java.time.LocalDateTime转Date + * @param localDate: + * @return + * @author: WangXianZhang + * @date: 2023/5/4 3:00 PM + */ + public static Date localDateTime2Date(java.time.LocalDateTime localDate) { + Instant instant = localDate.atZone(ZoneId.systemDefault()).toInstant(); + return Date.from(instant); + } + + /** + * @description: date转化为DateTime + * @param date: + * @return + * @author: WangXianZhang + * @date: 2023/5/4 3:04 PM + */ + public static java.time.LocalDateTime date2LocalDateTime(Date date) { + return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); + } } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IdCardRegexUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IdCardRegexUtils.java index ff1f0b0549..78c061b395 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IdCardRegexUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IdCardRegexUtils.java @@ -10,6 +10,7 @@ import lombok.NoArgsConstructor; import java.time.DateTimeException; import java.time.LocalDate; import java.time.Period; +import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -56,6 +57,7 @@ public class IdCardRegexUtils { private String birthdayDay; private String sex; private Integer age; + private LocalDate birthday; } /** @@ -122,17 +124,18 @@ public class IdCardRegexUtils { String month = matcher.group("month"); String day = matcher.group("day"); String sex = matcher.group("sex"); + LocalDate birthday; // ------- 年龄Start---------- Integer age; try { - LocalDate birthday = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); + birthday = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); age = Period.between(birthday, LocalDate.now()).getYears(); } catch (DateTimeException e) { throw new EpmetException("身份证号解析年龄失败:" + ExceptionUtils.getErrorStackTrace(e)); } // ------- 年龄End---------- - return new ParsedContent(year, month, day, sex, age); + return new ParsedContent(year, month, day, sex, age, birthday); } // 其他类型暂时不可解析 From 4f442eff01e5b4e803f84e1a4454432b3ec8aebe Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 4 May 2023 15:26:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98addstaffv2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=96=87=E5=8C=96?= =?UTF-8?q?=E7=A8=8B=E5=BA=A6=E7=9A=84=E5=AD=97=E6=AE=B5=E3=80=81idCard?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=B9=B6=E4=B8=94=E5=86=85?= =?UTF-8?q?=E9=83=A8=E9=80=BB=E8=BE=91=E4=B8=AD=EF=BC=8C=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E8=A7=A3=E6=9E=90idCard=E5=BE=97=E5=88=B0=E5=87=BA=E7=94=9F?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=EF=BC=8C=E5=B9=B6=E4=B8=94=E5=AD=98=E5=82=A8?= =?UTF-8?q?=202.=E4=BF=AE=E6=94=B9=EF=BC=9A=E7=BC=96=E8=BE=91=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E4=BA=BA=E5=91=98editstaff=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E5=8C=96=E7=A8=8B=E5=BA=A6=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E3=80=81idCard=E7=9A=84=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=B8=94=E5=86=85=E9=83=A8=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E9=80=9A=E8=BF=87=E8=A7=A3=E6=9E=90idCard?= =?UTF-8?q?=E5=BE=97=E5=88=B0=E5=87=BA=E7=94=9F=E6=97=A5=E6=9C=9F=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E4=B8=94=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/AddStaffV2FromDTO.java | 7 +++++++ .../epmet/dto/form/StaffSubmitFromDTO.java | 13 +++++++++++++ .../com/epmet/entity/CustomerStaffEntity.java | 10 ++++++++++ .../impl/CustomerStaffServiceImpl.java | 19 +++++++++++++++++++ 4 files changed, 49 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java index 7bc3b93076..413e9af58a 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddStaffV2FromDTO.java @@ -78,4 +78,11 @@ public class AddStaffV2FromDTO implements Serializable { * 烟台用:当前登录用户 */ private String currentUserId; + + /** + * 文化程度。0小学及文盲,1初中,2高中,3大专,4本科,5硕士,6博士,7中专 + */ + private String culture; + + private String idCard; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java index f39bde7aab..ded840ad19 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffSubmitFromDTO.java @@ -8,6 +8,7 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import java.io.Serializable; +import java.util.Date; import java.util.List; /** @@ -74,4 +75,16 @@ public class StaffSubmitFromDTO implements Serializable { * 社会自组织: community_org */ private String deptType; + + private String idCard; + + /** + * 文化程度。0小学及文盲,1初中,2高中,3大专,4本科,5硕士,6博士,7中专 + */ + private String culture; + + // /** + // * 出生日期 + // */ + // private Date birthday; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java index aa19464f9e..99ba05e16c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java @@ -111,4 +111,14 @@ public class CustomerStaffEntity extends BaseEpmetEntity { * 身份证号 */ private String idCard; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 文化程度。0小学及文盲,1初中,2高中,3大专,4本科,5硕士,6博士,7中专 + */ + private String culture; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 1ff4560c99..fcc7fdba67 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -37,6 +37,8 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.IdCardRegexUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerStaffConstant; import com.epmet.constant.RoleKeyConstants; @@ -73,6 +75,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.time.LocalDate; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.stream.Collectors; @@ -370,6 +373,14 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl