Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-mindworkplate
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 253197f8
authored
Jan 19, 2026
by
林永健
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/V5.5.3' into V5.5.3
2 parents
a2cb7bc1
0750ca98
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
28 deletions
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessagePopUpWindowRespDTO.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/WeeklyReportUnSubmittedSummaryJob.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementStaffRecordService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/script/PadMessageBoxService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/util/DateUtils.java
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/remote/DigitalManagementRecordRemoteImplTest.java
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/service/digitalmenagement/DigitalManagementServiceTest.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessagePopUpWindowRespDTO.java
View file @
253197f
...
@@ -26,6 +26,11 @@ public class ActivityMessagePopUpWindowRespDTO implements Serializable {
...
@@ -26,6 +26,11 @@ public class ActivityMessagePopUpWindowRespDTO implements Serializable {
private
Long
relId
;
private
Long
relId
;
/**
/**
* 活动id
*/
private
Long
activityId
;
/**
* 消息类型 0-活动消息 1-获奖名单消息
* 消息类型 0-活动消息 1-获奖名单消息
*/
*/
private
String
type
;
private
String
type
;
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/WeeklyReportUnSubmittedSummaryJob.java
View file @
253197f
...
@@ -25,7 +25,7 @@ public class WeeklyReportUnSubmittedSummaryJob implements SimpleJob {
...
@@ -25,7 +25,7 @@ public class WeeklyReportUnSubmittedSummaryJob implements SimpleJob {
public
void
execute
(
ShardingContext
shardingContext
)
{
public
void
execute
(
ShardingContext
shardingContext
)
{
log
.
info
(
"WeeklyReportUnSubmittedSummaryJob______工作周报未填写统计推送_______start"
);
log
.
info
(
"WeeklyReportUnSubmittedSummaryJob______工作周报未填写统计推送_______start"
);
try
{
try
{
reportUnSummitStatisticsHandler
.
statisticsThenPush
(
GoodNewsTemplateReportTypeEnum
.
MONTH
);
reportUnSummitStatisticsHandler
.
statisticsThenPush
(
GoodNewsTemplateReportTypeEnum
.
WEEK
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"工作月报未填写统计推送异常:"
,
e
);
log
.
error
(
"工作月报未填写统计推送异常:"
,
e
);
}
}
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementStaffRecordService.java
View file @
253197f
...
@@ -273,10 +273,10 @@ public class DigitalManagementStaffRecordService {
...
@@ -273,10 +273,10 @@ public class DigitalManagementStaffRecordService {
.
map
(
entry
->
{
.
map
(
entry
->
{
Integer
currMonthSubmitCount
=
Optional
.
ofNullable
(
uuidMapCurrentMonthSubmitCount
.
get
(
entry
.
getKey
()))
Integer
currMonthSubmitCount
=
Optional
.
ofNullable
(
uuidMapCurrentMonthSubmitCount
.
get
(
entry
.
getKey
()))
.
map
(
SubmitCountDTO:
:
getSubmitCount
)
.
map
(
SubmitCountDTO:
:
getSubmitCount
)
.
orElse
(
null
);
.
orElse
(
0
);
Integer
currWeeklySubmitCount
=
Optional
.
ofNullable
(
uuidMapCurrentWeekSubmitCount
.
get
(
entry
.
getKey
()))
Integer
currWeeklySubmitCount
=
Optional
.
ofNullable
(
uuidMapCurrentWeekSubmitCount
.
get
(
entry
.
getKey
()))
.
map
(
SubmitCountDTO:
:
getSubmitCount
)
.
map
(
SubmitCountDTO:
:
getSubmitCount
)
.
orElse
(
null
);
.
orElse
(
0
);
Date
recentlySubmitDate
=
Optional
.
ofNullable
(
uuidMapRecentlySubmitDate
.
get
(
entry
.
getKey
()))
Date
recentlySubmitDate
=
Optional
.
ofNullable
(
uuidMapRecentlySubmitDate
.
get
(
entry
.
getKey
()))
.
map
(
SubmitCountDTO:
:
getRecentlySubmitDate
)
.
map
(
SubmitCountDTO:
:
getRecentlySubmitDate
)
.
orElse
(
null
);
.
orElse
(
null
);
...
@@ -1230,6 +1230,9 @@ public class DigitalManagementStaffRecordService {
...
@@ -1230,6 +1230,9 @@ public class DigitalManagementStaffRecordService {
LocalDate
localDate
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
parseDate
(
date
,
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
PATTERN_YYYY_MM_DD
);
LocalDate
localDate
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
parseDate
(
date
,
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
PATTERN_YYYY_MM_DD
);
return
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
isLastDayOfMonth
(
localDate
);
return
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
isLastDayOfMonth
(
localDate
);
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
if
(
CollUtil
.
isEmpty
(
dates
))
{
return
;
}
// 拿到每个日期月报填写的人
// 拿到每个日期月报填写的人
Map
<
String
,
Set
<
String
>>
assignDateMonthlyReportUuids
=
monthTemplates
.
parallelStream
()
Map
<
String
,
Set
<
String
>>
assignDateMonthlyReportUuids
=
monthTemplates
.
parallelStream
()
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/script/PadMessageBoxService.java
View file @
253197f
...
@@ -662,6 +662,7 @@ public class PadMessageBoxService {
...
@@ -662,6 +662,7 @@ public class PadMessageBoxService {
return
null
;
return
null
;
}
}
activityMsgPopUpWindow
.
setActivityName
(
result
.
getName
());
activityMsgPopUpWindow
.
setActivityName
(
result
.
getName
());
activityMsgPopUpWindow
.
setActivityId
(
result
.
getId
());
return
activityMsgPopUpWindow
;
return
activityMsgPopUpWindow
;
}
}
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/util/DateUtils.java
View file @
253197f
...
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
import
java.time.*
;
import
java.time.*
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.TemporalAdjusters
;
import
java.time.temporal.TemporalAdjusters
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
...
@@ -269,28 +270,27 @@ public class DateUtils {
...
@@ -269,28 +270,27 @@ public class DateUtils {
List
<
String
>
sundays
=
new
ArrayList
<>();
List
<
String
>
sundays
=
new
ArrayList
<>();
try
{
try
{
// 解析日期
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
PATTERN_YYYY_MM_DD
);
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
PATTERN_YYYY_MM_DD
);
LocalDate
startDate
=
LocalDate
.
parse
(
startDateStr
,
formatter
);
LocalDate
startDate
=
LocalDate
.
parse
(
startDateStr
,
formatter
);
LocalDate
endDate
=
LocalDate
.
parse
(
endDateStr
,
formatter
);
LocalDate
endDate
=
LocalDate
.
parse
(
endDateStr
,
formatter
);
// 验证日期范围
if
(
startDate
.
isAfter
(
endDate
))
{
if
(
startDate
.
isAfter
(
endDate
))
{
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"开始日期不能晚于结束日期"
);
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"开始日期不能晚于结束日期"
);
}
}
// 找到第一个周日
// 使用 TemporalAdjusters 找到第一个周日
LocalDate
currentDate
=
startDate
;
LocalDate
firstSunday
=
startDate
.
with
(
TemporalAdjusters
.
nextOrSame
(
DayOfWeek
.
SUNDAY
));
// 计算距离下一个周日还有几天
int
daysToNextSunday
=
(
DayOfWeek
.
SUNDAY
.
getValue
()
-
currentDate
.
getDayOfWeek
().
getValue
()
+
7
)
%
7
;
// 计算有多少个完整的周
if
(
daysToNextSunday
>
0
)
{
long
daysBetween
=
ChronoUnit
.
DAYS
.
between
(
firstSunday
,
endDate
);
currentDate
=
currentDate
.
plusDays
(
daysToNextSunday
);
int
weeksBetween
=
(
int
)
(
daysBetween
/
7
);
}
// 遍历所有周日
// 使用 for 循环遍历所有周日
while
(!
currentDate
.
isAfter
(
endDate
))
{
for
(
int
week
=
0
;
week
<=
weeksBetween
;
week
++)
{
sundays
.
add
(
currentDate
.
format
(
formatter
));
LocalDate
sunday
=
firstSunday
.
plusWeeks
(
week
);
currentDate
=
currentDate
.
plusWeeks
(
1
);
if
(!
sunday
.
isAfter
(
endDate
))
{
sundays
.
add
(
sunday
.
format
(
formatter
));
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -321,13 +321,22 @@ public class DateUtils {
...
@@ -321,13 +321,22 @@ public class DateUtils {
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"开始日期不能晚于结束日期"
);
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"开始日期不能晚于结束日期"
);
}
}
// 从起始日期所在月份的下一个月开始计算
// 获取起始月份和结束月份的 YearMonth
LocalDate
current
=
startDate
.
withDayOfMonth
(
1
).
plusMonths
(
1
).
minusDays
(
1
);
YearMonth
startMonth
=
YearMonth
.
from
(
startDate
);
YearMonth
endMonth
=
YearMonth
.
from
(
endDate
);
// 遍历直到超过结束日期
// 计算月份差,使用 for 循环
while
(!
current
.
isBefore
(
startDate
)
&&
!
current
.
isAfter
(
endDate
))
{
long
monthsBetween
=
ChronoUnit
.
MONTHS
.
between
(
startMonth
,
endMonth
)
+
1
;
monthEnds
.
add
(
current
.
format
(
formatter
));
current
=
current
.
plusMonths
(
1
).
withDayOfMonth
(
1
).
minusDays
(
1
);
for
(
int
i
=
0
;
i
<
monthsBetween
;
i
++)
{
YearMonth
currentMonth
=
startMonth
.
plusMonths
(
i
);
LocalDate
monthEnd
=
currentMonth
.
atEndOfMonth
();
// 如果月末日期在有效范围内
if
(!
monthEnd
.
isBefore
(
startDate
)
&&
!
monthEnd
.
isAfter
(
endDate
))
{
monthEnds
.
add
(
monthEnd
.
format
(
formatter
));
log
.
info
(
"当前月份最后一天: "
+
monthEnd
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/remote/DigitalManagementRecordRemoteImplTest.java
View file @
253197f
...
@@ -157,9 +157,9 @@ public class DigitalManagementRecordRemoteImplTest extends BaseServiceTest {
...
@@ -157,9 +157,9 @@ public class DigitalManagementRecordRemoteImplTest extends BaseServiceTest {
// System.out.println(digitalManagementRecordRemote.staffRecordSummary(templateDTO4));
// System.out.println(digitalManagementRecordRemote.staffRecordSummary(templateDTO4));
DigitalManagementTemplateDTO
templateDTO5
=
new
DigitalManagementTemplateDTO
();
DigitalManagementTemplateDTO
templateDTO5
=
new
DigitalManagementTemplateDTO
();
templateDTO5
.
setCode
(
"uuid-temp-01
4
"
);
templateDTO5
.
setCode
(
"uuid-temp-01
8
"
);
templateDTO5
.
setStartTime
(
DateUtil
.
parse
(
"202
6-05-17
00:00:00"
,
cn
.
com
.
glsx
.
framework
.
core
.
util
.
DateUtils
.
DEFAULT_DATE_FORMAT4
));
templateDTO5
.
setStartTime
(
DateUtil
.
parse
(
"202
5-11-01
00:00:00"
,
cn
.
com
.
glsx
.
framework
.
core
.
util
.
DateUtils
.
DEFAULT_DATE_FORMAT4
));
templateDTO5
.
setEndTime
(
DateUtil
.
parse
(
"202
6-06-14
23:59:59"
,
cn
.
com
.
glsx
.
framework
.
core
.
util
.
DateUtils
.
DEFAULT_DATE_FORMAT4
));
templateDTO5
.
setEndTime
(
DateUtil
.
parse
(
"202
5-11-30
23:59:59"
,
cn
.
com
.
glsx
.
framework
.
core
.
util
.
DateUtils
.
DEFAULT_DATE_FORMAT4
));
System
.
out
.
println
(
digitalManagementRecordRemote
.
recordSummary
(
templateDTO5
));
System
.
out
.
println
(
digitalManagementRecordRemote
.
recordSummary
(
templateDTO5
));
Thread
.
sleep
(
1000
*
60
*
60
);
Thread
.
sleep
(
1000
*
60
*
60
);
}
}
...
...
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/service/digitalmenagement/DigitalManagementServiceTest.java
View file @
253197f
...
@@ -268,9 +268,9 @@ public class DigitalManagementServiceTest extends BaseServiceTest {
...
@@ -268,9 +268,9 @@ public class DigitalManagementServiceTest extends BaseServiceTest {
@Test
@Test
public
void
staffRecordSummaryTest
()
{
public
void
staffRecordSummaryTest
()
{
DigitalManagementStaffRecordDTO
condition
=
new
DigitalManagementStaffRecordDTO
();
DigitalManagementStaffRecordDTO
condition
=
new
DigitalManagementStaffRecordDTO
();
condition
.
setTemplateCode
(
"uuid-temp-0
03
"
);
condition
.
setTemplateCode
(
"uuid-temp-0
18
"
);
condition
.
setStartTime
(
DateUtil
.
parse
(
"2025-
04-08
"
,
"yyyy-MM-dd"
));
condition
.
setStartTime
(
DateUtil
.
parse
(
"2025-
11-01
"
,
"yyyy-MM-dd"
));
condition
.
setEndTime
(
DateUtil
.
parse
(
"2025-
04-08
"
,
"yyyy-MM-dd"
));
condition
.
setEndTime
(
DateUtil
.
parse
(
"2025-
11-30
"
,
"yyyy-MM-dd"
));
List
<
DigitalManagementStaffRecordSummaryDTO
>
res
=
staffRecordService
.
staffRecordSummary
(
condition
);
List
<
DigitalManagementStaffRecordSummaryDTO
>
res
=
staffRecordService
.
staffRecordSummary
(
condition
);
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment