From 08f1b1f1804a8bd833d42f257908d80e88387b55 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期五, 14 三月 2025 11:27:47 +0800
Subject: [PATCH] 3.5增加登录验证、修改密码、人员列表调整
---
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/StreetBigScreenServiceImpl.java | 92 +++++++++++++++++++++++++++++++++-------------
1 files changed, 66 insertions(+), 26 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/StreetBigScreenServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/StreetBigScreenServiceImpl.java
index e9e8a8d..03fe86a 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/StreetBigScreenServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/StreetBigScreenServiceImpl.java
@@ -79,13 +79,21 @@
else if(StringUtils.equals(type,"2"))
{
//按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM");
- LocalDate localDate = LocalDate.parse(starTime, formatter2);
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date date = null;
+ try {
+ date = sdf.parse(starTime+"-01");
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+ Date lastDay = calendar.getTime();
// 获取当前月份的第一天
- String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter);
- // 获取当前月份的最后一天
- String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter);
+ String firstDayOfMonth = starTime+"-01";
+// // 获取当前月份的最后一天
+ String lastDayOfMonth = sdf.format(lastDay);
//获取小程序用户数量
userNum= baseMapper.getUserNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
@@ -301,6 +309,8 @@
//报到党员总计数据
Integer MemberNum=0;
+ Integer fuwuNum=0;
+
if(StringUtils.equals(type,"1"))
{
//按年份
@@ -321,17 +331,27 @@
UnitNum=baseMapper.getUnitNum(streetId,communityId,starTime+"-01-01 00:00:00",starTime+"-12-31 23:59:59");
//报到党员总计数据
MemberNum=baseMapper.getMemberNum(streetId,communityId,starTime+"-01-01 00:00:00",starTime+"-12-31 23:59:59");
+
+ fuwuNum=baseMapper.getRegistNum(streetId,communityId,starTime+"-01-01 00:00:00",starTime+"-12-31 23:59:59");
}
else if(StringUtils.equals(type,"2"))
{
//按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM");
- LocalDate localDate = LocalDate.parse(starTime, formatter2);
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date date = null;
+ try {
+ date = sdf.parse(starTime+"-01");
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+ Date lastDay = calendar.getTime();
// 获取当前月份的第一天
- String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter);
- // 获取当前月份的最后一天
- String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter);
+ String firstDayOfMonth = starTime+"-01";
+// // 获取当前月份的最后一天
+ String lastDayOfMonth = sdf.format(lastDay);
//旧的报道需求问题统计数 2.问题清单 3.需求清单
OleProblemNum=baseMapper.getOleNeedProblemNum("2",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
@@ -349,6 +369,7 @@
UnitNum=baseMapper.getUnitNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
//报到党员总计数据
MemberNum=baseMapper.getMemberNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ fuwuNum=baseMapper.getRegistNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
}
else if(StringUtils.equals(type,"3"))
{
@@ -372,6 +393,7 @@
UnitNum=baseMapper.getUnitNum(streetId,communityId,starTime+" 00:00:00",starTime+" 23:59:59");
//报到党员总计数据
MemberNum=baseMapper.getMemberNum(streetId,communityId,starTime+" 00:00:00",starTime+" 23:59:59");
+ fuwuNum=baseMapper.getRegistNum(streetId,communityId,starTime+" 00:00:00",starTime+" 23:59:59");
}
else if(StringUtils.equals(type,"4"))
{
@@ -392,6 +414,7 @@
UnitNum=baseMapper.getUnitNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59");
//报到党员总计数据
MemberNum=baseMapper.getMemberNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59");
+ fuwuNum=baseMapper.getRegistNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59");
}
else
@@ -412,6 +435,7 @@
UnitNum=baseMapper.getUnitNum(streetId,communityId,null,null);
//报到党员总计数据
MemberNum=baseMapper.getMemberNum(streetId,communityId,null,null);
+ fuwuNum=baseMapper.getRegistNum(streetId,communityId,null,null);
}
@@ -437,8 +461,8 @@
doubleRegistrationData.setUnitNum(UnitNum);
//报到党员总计数据
doubleRegistrationData.setMemberNum(MemberNum);
-
- doubleRegistrationData.setAllNum(NewNeedNum+OleNeedNum+OleProblemNum+NewProblemNum);
+ //报到服务次数
+ doubleRegistrationData.setAllNum(NewNeedNum+OleNeedNum+OleProblemNum+NewProblemNum+fuwuNum);
return R.ok(doubleRegistrationData);
@@ -485,13 +509,21 @@
else if(StringUtils.equals(type,"2"))
{
//按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM");
- LocalDate localDate = LocalDate.parse(starTime, formatter2);
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date date = null;
+ try {
+ date = sdf.parse(starTime+"-01");
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+ Date lastDay = calendar.getTime();
// 获取当前月份的第一天
- String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter);
- // 获取当前月份的最后一天
- String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter);
+ String firstDayOfMonth = starTime+"-01";
+// // 获取当前月份的最后一天
+ String lastDayOfMonth = sdf.format(lastDay);
photoList=baseMapper.getPhotoMicroWishData("1","%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
microWishList=baseMapper.getPhotoMicroWishData("2","%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
@@ -643,13 +675,21 @@
else if(StringUtils.equals(type,"2"))
{
//按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM");
- LocalDate localDate = LocalDate.parse(starTime, formatter2);
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date date = null;
+ try {
+ date = sdf.parse(starTime+"-01");
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+ Date lastDay = calendar.getTime();
// 获取当前月份的第一天
- String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter);
- // 获取当前月份的最后一天
- String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter);
+ String firstDayOfMonth = starTime+"-01";
+// // 获取当前月份的最后一天
+ String lastDayOfMonth = sdf.format(lastDay);
//* 社区活动统计
nommunityActNumList=baseMapper.getNommunityActNumList("%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
--
Gitblit v1.7.1