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 | 138 +++++++++++++++++++++++++++++++++------------
1 files changed, 100 insertions(+), 38 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 f639b93..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
@@ -9,6 +9,8 @@
import com.panzhihua.service_dangjian.service.StreetBigScreenService;
import org.springframework.stereotype.Service;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
@@ -77,12 +79,21 @@
else if(StringUtils.equals(type,"2"))
{
//按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- LocalDate localDate = LocalDate.parse(starTime);
+ 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");
@@ -178,21 +189,37 @@
}
else if(StringUtils.equals(type,"2"))
{
- //按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- LocalDate localDate = LocalDate.parse(starTime);
- // 获取当前月份的第一天
- String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter);
- // 获取当前月份的最后一天
- String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter);
- partyAffairsNum=baseMapper.getThreeNum(streetId,communityId,"党务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
- serviceNum=baseMapper.getThreeNum(streetId,communityId,"服务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
- financeNum=baseMapper.getThreeNum(streetId,communityId,"财务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
- fundNum=baseMapper.getThreeNum(streetId,communityId,"资金公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
- propertyNum=baseMapper.getThreeNum(streetId,communityId,"资产公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
- naturalResourcesNum=baseMapper.getThreeNum(streetId,communityId,"资源公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
- villageEconomyNum=baseMapper.getThreeNum(streetId,communityId,"村集体经济组织项目",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ try {
+ //按月份
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date date = sdf.parse(starTime+"-01");
+ 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 = starTime+"-01";
+// // 获取当前月份的最后一天
+ String lastDayOfMonth = sdf.format(lastDay);
+
+ partyAffairsNum=baseMapper.getThreeNum(streetId,communityId,"党务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ serviceNum=baseMapper.getThreeNum(streetId,communityId,"服务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ financeNum=baseMapper.getThreeNum(streetId,communityId,"财务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ fundNum=baseMapper.getThreeNum(streetId,communityId,"资金公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ propertyNum=baseMapper.getThreeNum(streetId,communityId,"资产公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ naturalResourcesNum=baseMapper.getThreeNum(streetId,communityId,"资源公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+ villageEconomyNum=baseMapper.getThreeNum(streetId,communityId,"村集体经济组织项目",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59");
+
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+
+ // 获取并打印第一天的日期
+
+
+
+
}
else if(StringUtils.equals(type,"3"))
{
@@ -240,8 +267,8 @@
threeNumData.setNaturalResourcesNum(naturalResourcesNum);
threeNumData.setVillageEconomyNum(villageEconomyNum);
- threeNumData.setThreeFundNum(partyAffairsNum+serviceNum+financeNum);
- threeNumData.setThreeServiceNum(fundNum+propertyNum+naturalResourcesNum);
+ threeNumData.setThreeServiceNum(partyAffairsNum+serviceNum+financeNum);
+ threeNumData.setThreeFundNum(fundNum+propertyNum+naturalResourcesNum);
return R.ok(threeNumData);
@@ -282,6 +309,8 @@
//报到党员总计数据
Integer MemberNum=0;
+ Integer fuwuNum=0;
+
if(StringUtils.equals(type,"1"))
{
//按年份
@@ -302,16 +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");
- LocalDate localDate = LocalDate.parse(starTime);
+ 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");
@@ -329,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"))
{
@@ -352,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"))
{
@@ -372,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
@@ -392,6 +435,7 @@
UnitNum=baseMapper.getUnitNum(streetId,communityId,null,null);
//报到党员总计数据
MemberNum=baseMapper.getMemberNum(streetId,communityId,null,null);
+ fuwuNum=baseMapper.getRegistNum(streetId,communityId,null,null);
}
@@ -417,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);
@@ -465,12 +509,21 @@
else if(StringUtils.equals(type,"2"))
{
//按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- LocalDate localDate = LocalDate.parse(starTime);
+ 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");
@@ -622,12 +675,21 @@
else if(StringUtils.equals(type,"2"))
{
//按月份
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
- LocalDate localDate = LocalDate.parse(starTime);
+ 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