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 1d8d5ebc
authored
Jan 21, 2026
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'V5.5.3' into 'master'
上线合并 See merge request
!5
2 parents
d5af456b
2888eef8
Show whitespace changes
Inline
Side-by-side
Showing
82 changed files
with
4561 additions
and
181 deletions
rpc-dj-mindworkplate-api/pom.xml
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/CommonConstants.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/ConfigCenterConstants.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/DatePatternConstants.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/ListConstants.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/SymbolConstants.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/EmployeeBadgeDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/DigitalManagementStaffRecordDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/DigitalManagementTemplateSummaryDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/FormComponentConfig.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/ManagementTemplateContentDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/ManagementTemplateItemDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/MonthRange.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/MonthlyReportRecordReqDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/SaveStaffRecordRequestDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsRecordDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsStatisticsDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsTemplateReqDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsTemplateRespDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffMonthlyReportRecordDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffMonthlyReportRecordWrapper.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffRecordDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffWeeklyReportRecordDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffWeeklyReportRecordWrapper.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/SubmitCountDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/TemplateStaffRefDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/WeekRange.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/WeeklyReportRecordReqDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessageDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessagePopUpWindowDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessagePopUpWindowRespDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/DistinctDimensionalityEnum.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/GoodNewsTemplateCodeEnum.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/GoodNewsTemplateReportTypeEnum.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/MindWorkplateServiceErrorEnum.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/model/digitalmanagement/DigitalManagementTemplate.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/remote/DigitalManagementRecordRemote.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/remote/PadMessageBoxRemote.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/response/longcourse/StaffConfigDTO.java
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/response/warning/ReceptionMissingReportResponse.java
rpc-dj-mindworkplate/pom.xml
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/component/SpringContextHolder.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/config/RiskManageConfig.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/enums/GoodNewsTempMapGroupConfigEnum.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/handler/ReportUnSummitStatisticsHandler.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/DailyReportUnsubmittedSummaryJob.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/DailyReportUnsubmittedSummaryJob1.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/MonthlyReportUnSubmittedSummaryJob.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/mapper/PadMessageBoxMapper.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/mapper/digitalmanagement/DigitalManagementStaffRecordMapper.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/mapper/digitalmanagement/DigitalManagementTemplateStaffRefMapper.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/remote/DigitalManagementRecordRemoteImpl.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/remote/PadMessageBoxRemoteImpl.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/ConversationBatchService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/EmployeeBadgeService.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/digitalmanagement/DigitalManagementTemplateService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/StaffRecordSpecialHandler.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/BaseReportSaveStrategy.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/DailyReportSaveStrategy.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/OperationExecutiveMonthlyReportSaveStrategy.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/OperationExecutiveWeeklyReportSaveStrategy.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/RegionalManagerMonthlyReportSaveStrategy.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/RegionalManagerWeeklyReportSaveStrategy.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/ReportSaveFactory.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/ReportSaveStrategy.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/ValidationResult.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/longcourse/LongcourseSceneConfigService.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/main/resources/META-INF/orm/DigitalManagementStaffRecordMapper.xml
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/DigitalManagementTemplateMapper.xml
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/DigitalManagementTemplateStaffRefMapper.xml
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/EmployeeBadgeMapper.xml
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/PadMessageBoxMapper.xml
rpc-dj-mindworkplate/src/main/resources/templates/rec_template2.xlsx
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/handler/ReportUnSummitStatisticsHandlerTest.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/EmployeeBadgeServiceTest.java
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementStaffRecordServiceTest.java
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/service/digitalmenagement/DigitalManagementServiceTest.java
rpc-dj-mindworkplate-api/pom.xml
View file @
1d8d5eb
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</parent>
</parent>
<groupId>
cn.com.glsx
</groupId>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
rpc-dj-mindworkplate-api
</artifactId>
<artifactId>
rpc-dj-mindworkplate-api
</artifactId>
<version>
5.5.
1
-SNAPSHOT
</version>
<version>
5.5.
3
-SNAPSHOT
</version>
<name>
rpc-dj-mindworkplate-api
</name>
<name>
rpc-dj-mindworkplate-api
</name>
<properties>
<properties>
<deploy.scanPackage>
cn.com.glsx.remote
</deploy.scanPackage>
<deploy.scanPackage>
cn.com.glsx.remote
</deploy.scanPackage>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<dependency>
<dependency>
<groupId>
cn.com.glsx
</groupId>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
rpc-dj-mindworkplate-api
</artifactId>
<artifactId>
rpc-dj-mindworkplate-api
</artifactId>
<version>
5.
3.0
-SNAPSHOT
</version>
<version>
5.
5.3
-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</plugin>
</plugin>
...
...
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/CommonConstants.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
consts
;
/**
* 公共常量
* @author yangwei
* @version 1.0
* @since 2026/01/10 15:31
*/
public
interface
CommonConstants
{
/** 已变更 */
String
CHINESE_CHANGED
=
"已变更"
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/ConfigCenterConstants.java
View file @
1d8d5eb
...
@@ -19,4 +19,9 @@ public interface ConfigCenterConstants {
...
@@ -19,4 +19,9 @@ public interface ConfigCenterConstants {
*/
*/
String
DATA_AI_SPARRING_STAFF_WORK_WECHAT_MERCHANT_ID
=
"data.aiSparring.staff.work.wechat.merchant.id"
;
String
DATA_AI_SPARRING_STAFF_WORK_WECHAT_MERCHANT_ID
=
"data.aiSparring.staff.work.wechat.merchant.id"
;
/**
* 测试用-当前系统时间
*/
String
CURRENT_SYSTEM_TIME_FOR_TEST
=
"current.system.time.for.test"
;
}
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/DatePatternConstants.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
consts
;
/**
* 日期格式化
* @author yangwei
* @version 1.0
* @since 2026/01/10 16:02
*/
public
interface
DatePatternConstants
{
/** yyyy/MM/dd */
String
YYYY_MM_DD_SLASH
=
"yyyy/MM/dd"
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/ListConstants.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
consts
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateCodeEnum
;
import
com.google.common.collect.Lists
;
import
java.util.List
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/12 19:41
*/
public
interface
ListConstants
{
/**
* 日报模版代码
*/
List
<
String
>
DAILY_TEMPLATE_CODE_LIST
=
Lists
.
newArrayList
(
GoodNewsTemplateCodeEnum
.
DELAY_TEMPLATE_CODE_2_3
.
getCode
(),
GoodNewsTemplateCodeEnum
.
LIGHT_CHANGE_TEMPLATE_CODE_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_TEMPLATE_CODE_2_1
.
getCode
()
);
/**
* 周报模版代码
*/
List
<
String
>
WEEKLY_TEMPLATE_CODE_LIST
=
Lists
.
newArrayList
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_3
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_15_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_16_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_17_2_3
.
getCode
()
);
/**
* 月报模版代码
*/
List
<
String
>
MONTHLY_TEMPLATE_CODE_LIST
=
Lists
.
newArrayList
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_18_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_19_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_20_2_3
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__21_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__22_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_23_2_3
.
getCode
()
);
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/consts/SymbolConstants.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
consts
;
/**
* 符号常量接口
* @author yangwei
* @since 2026/1/10 14:09
*/
public
interface
SymbolConstants
{
String
SLASH
=
"/"
;
String
COLON
=
":"
;
String
COMMA
=
","
;
String
SEMICOLON
=
";"
;
/** \n */
String
NEW_LINE
=
"\n"
;
/**【 */
String
CHINESE_BRACKET_LEFT
=
"【"
;
/** 】 */
String
CHINESE_BRACKET_RIGHT
=
"】"
;
/** : */
String
CHINESE_COLON
=
":"
;
/** 无 */
String
NONE
=
"无"
;
/** - */
String
BLANK_DASH
=
" - "
;
/** "'" */
String
SINGLE_QUOTE
=
"'"
;
/** "、" */
String
CHINESE_COMMA
=
"、"
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/EmployeeBadgeDTO.java
View file @
1d8d5eb
...
@@ -209,4 +209,10 @@ public class EmployeeBadgeDTO extends EmployeeBadge implements Serializable {
...
@@ -209,4 +209,10 @@ public class EmployeeBadgeDTO extends EmployeeBadge implements Serializable {
@ApiModelProperty
(
notes
=
"接待手机号"
)
@ApiModelProperty
(
notes
=
"接待手机号"
)
private
List
<
String
>
phoneList
;
private
List
<
String
>
phoneList
;
/**
* 客户手机号
*/
@ApiModelProperty
(
notes
=
"客户手机号"
)
private
String
customerPhone
;
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/DigitalManagementStaffRecordDTO.java
View file @
1d8d5eb
...
@@ -61,6 +61,11 @@ public class DigitalManagementStaffRecordDTO extends DigitalManagementStaffRecor
...
@@ -61,6 +61,11 @@ public class DigitalManagementStaffRecordDTO extends DigitalManagementStaffRecor
@JsonIgnore
@JsonIgnore
private
Map
<
String
,
String
>
templateExtendField
;
private
Map
<
String
,
String
>
templateExtendField
;
/**
* 是否保存
*/
private
Boolean
save
;
public
void
appendTypes
(
DigitalManagementStaffRecordItemDTO
item
){
public
void
appendTypes
(
DigitalManagementStaffRecordItemDTO
item
){
if
(
CollectionUtils
.
isEmpty
(
types
))
{
if
(
CollectionUtils
.
isEmpty
(
types
))
{
types
=
new
ArrayList
<>();
types
=
new
ArrayList
<>();
...
...
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/DigitalManagementTemplateSummaryDTO.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplate
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplate
;
import
cn.hutool.core.map.MapUtil
;
import
com.google.common.collect.Lists
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.util.CollectionUtils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
@Data
@Data
public
class
DigitalManagementTemplateSummaryDTO
implements
Serializable
{
public
class
DigitalManagementTemplateSummaryDTO
implements
Serializable
{
...
@@ -23,16 +21,24 @@ public class DigitalManagementTemplateSummaryDTO implements Serializable {
...
@@ -23,16 +21,24 @@ public class DigitalManagementTemplateSummaryDTO implements Serializable {
private
String
code
;
private
String
code
;
@ApiModelProperty
(
notes
=
"应填数"
)
@ApiModelProperty
(
notes
=
"应填数"
)
private
Long
totalCount
;
private
Long
totalCount
=
0L
;
@ApiModelProperty
(
notes
=
"实填数"
)
@ApiModelProperty
(
notes
=
"实填数"
)
private
Long
finishCount
;
private
Long
finishCount
=
0L
;
@ApiModelProperty
(
notes
=
"未提交数"
)
@ApiModelProperty
(
notes
=
"未提交数"
)
private
Long
undoCount
;
private
Long
undoCount
=
0L
;
private
String
staffUuidListStr
;
private
String
staffUuidListStr
;
@ApiModelProperty
(
notes
=
"未提交人员"
)
private
String
unSubmittedStaffNamesStr
;
private
List
<
String
>
unSubmittedStaffNames
=
Lists
.
newArrayList
();
/** key uuid, value staffName */
private
Map
<
String
,
String
>
unSubmittedStaffUuidMapName
=
MapUtil
.<
String
,
String
>
builder
().
build
();
public
Integer
getIntOrDefault
(
Integer
target
){
public
Integer
getIntOrDefault
(
Integer
target
){
return
Objects
.
isNull
(
target
)
?
0
:
target
;
return
Objects
.
isNull
(
target
)
?
0
:
target
;
}
}
...
...
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/FormComponentConfig.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
java.util.List
;
/**
* 人员喜报填写前端组件配置实体
* @author yangwei
* @version 1.0
* @since 2026/01/10 14:14
*/
@Data
public
class
FormComponentConfig
{
/**
* 控件类型
*/
private
String
type
;
/**
* 宽度设置
*/
private
String
width
;
/**
* 添加HTML类型(textarea)
*/
private
String
addHtml
;
/**
* 排序类型
*/
private
String
sortable
;
/**
* 是否显示标签下划线
*/
private
Boolean
isLabelNoLine
;
/**
* 是否不设置单元格高度
*/
private
Boolean
noCellHeight
;
/**
* 验证规则集合
*/
private
List
<
Rule
>
rule
;
/**
* 输入限制配置
*/
private
InputLimit
inputLimit
;
/**
* 验证规则实体类
* @author yangwei
* @since 2026/1/10 14:15
*/
@Data
public
static
class
Rule
{
private
Boolean
required
;
private
String
message
;
}
/**
* 输入限制实体类
* @author yangwei
* @since 2026/1/10 14:15
*/
@Data
public
static
class
InputLimit
{
private
Integer
maxlength
;
}
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/ManagementTemplateContentDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplate
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
/**
* 模版配置内容
* @author yangwei
* @version 1.0
* @since 2026/01/09 17:55
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
ManagementTemplateContentDTO
extends
DigitalManagementTemplate
{
private
static
final
long
serialVersionUID
=
4431121600542401549L
;
/**
* 模板内容
*/
private
List
<
ManagementTemplateItemDTO
>
templateItemList
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/ManagementTemplateItemDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateItem
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
/**
* 模版配置内容,默认只有两级
* @author yangwei
* @version 1.0
* @since 2026/01/10 11:15
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
ManagementTemplateItemDTO
extends
DigitalManagementTemplateItem
{
private
static
final
long
serialVersionUID
=
-
1177892234642266947L
;
/**
* 子项
*/
private
List
<
DigitalManagementTemplateItem
>
childList
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/MonthRange.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* 月份范围
* @author yangwei
* @version 1.0
* @since 2026/01/12 11:18
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
MonthRange
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
523293264450045632L
;
/**
* 月份开始日期
*/
private
LocalDate
startDate
;
/**
* 月份结束日期
*/
private
LocalDate
endDate
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/MonthlyReportRecordReqDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* 获取员工月报填写记录
* @author yangwei
* @version 1.0
* @since 2026/01/08 17:57
*/
@Data
public
class
MonthlyReportRecordReqDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1366491639688272784L
;
/**
* 年
*/
private
String
year
;
/**
* 月份
*/
private
String
month
;
/**
* 开始日期
*/
private
LocalDate
startDate
;
/**
* 结束日期
*/
@NotNull
(
message
=
"结束日期不能为空"
)
private
LocalDate
endDate
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/SaveStaffRecordRequestDTO.java
View file @
1d8d5eb
...
@@ -6,6 +6,8 @@ import lombok.Data;
...
@@ -6,6 +6,8 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
lombok.ToString
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotEmpty
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -16,15 +18,18 @@ import java.util.Map;
...
@@ -16,15 +18,18 @@ import java.util.Map;
public
class
SaveStaffRecordRequestDTO
implements
Serializable
{
public
class
SaveStaffRecordRequestDTO
implements
Serializable
{
@ApiModelProperty
(
notes
=
"账号ID"
)
@ApiModelProperty
(
notes
=
"账号ID"
)
@NotBlank
(
message
=
"账号ID不能为空"
)
private
String
uuid
;
private
String
uuid
;
@ApiModelProperty
(
name
=
"loginRole"
,
notes
=
"登录角色 1-超管 2-商户管理员 3-区域督导 4-驻店人员 5-广联销售 6-飞行督导 7-技师"
)
@ApiModelProperty
(
name
=
"loginRole"
,
notes
=
"登录角色 1-超管 2-商户管理员 3-区域督导 4-驻店人员 5-广联销售 6-飞行督导 7-技师"
)
private
Integer
loginRole
;
private
Integer
loginRole
;
@ApiModelProperty
(
notes
=
"模板编号"
)
@ApiModelProperty
(
notes
=
"模板编号"
)
@NotBlank
(
message
=
"模板编号不能为空"
)
private
String
templateCode
;
private
String
templateCode
;
@ApiModelProperty
(
notes
=
"表单"
)
@ApiModelProperty
(
notes
=
"表单"
)
@NotEmpty
(
message
=
"表单不能为空"
)
private
Map
<
String
,
String
>
form
;
private
Map
<
String
,
String
>
form
;
public
SaveStaffRecordRequestDTO
(
Integer
loginRole
,
String
uuid
,
Map
<
String
,
String
>
form
)
{
public
SaveStaffRecordRequestDTO
(
Integer
loginRole
,
String
uuid
,
Map
<
String
,
String
>
form
)
{
...
@@ -32,4 +37,9 @@ public class SaveStaffRecordRequestDTO implements Serializable {
...
@@ -32,4 +37,9 @@ public class SaveStaffRecordRequestDTO implements Serializable {
this
.
uuid
=
uuid
;
this
.
uuid
=
uuid
;
this
.
loginRole
=
loginRole
;
this
.
loginRole
=
loginRole
;
}
}
/**
* 是否保存
*/
private
Boolean
save
;
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsRecordDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementStaffRecord
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementStaffRecordItem
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
/**
* 员工喜报记录
* @author yangwei
* @version 1.0
* @since 2026/01/09 18:16
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
StaffGoodNewsRecordDTO
extends
DigitalManagementStaffRecord
{
private
static
final
long
serialVersionUID
=
8709022404031690840L
;
/**
* 员工名称
*/
private
String
name
;
/**
* 手机号
*/
private
String
phone
;
/**
* 喜报记录项
*/
private
List
<
DigitalManagementStaffRecordItem
>
recordItemList
;
/**
* 模板内容
*/
private
ManagementTemplateContentDTO
template
;
/**
* 是否保存
*/
private
Boolean
save
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsStatisticsDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* 汇报统计
* @author yangwei
* @version 1.0
* @since 2026/01/12 18:08
*/
@Data
@Accessors
(
chain
=
true
)
public
class
StaffGoodNewsStatisticsDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2070874714769621031L
;
/**
* 开始时间
*/
@NotNull
(
message
=
"开始时间不能为空"
)
private
Date
startTime
;
/**
* 结束时间
*/
@NotNull
(
message
=
"结束时间不能为空"
)
private
Date
endTime
;
/**
* 员工uuid
*/
private
List
<
String
>
staffUuidList
;
/**
* 模版代码
*/
@NotNull
(
message
=
"模版代码不能为空"
)
private
String
code
;
/**
* 模版名称
*/
private
String
name
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsTemplateReqDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* 获取员工喜报模版请求对象
* @author yangwei
* @version 1.0
* @since 2026/01/08 19:11
*/
@Data
public
class
StaffGoodNewsTemplateReqDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8296747587815169072L
;
/**
* 场景类型:0-会员权益/升级,1-精品升级
*/
private
Integer
sceneType
;
/**
* 报告类型:1-日报,2-周报,3-月报
*/
private
Integer
reportType
;
/**
* 员工编号,如果不传入取当前登录用户
*/
@NotBlank
(
message
=
"员工编号不能为空"
)
private
String
uuid
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffGoodNewsTemplateRespDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 喜报模版响应数据对象
* @author yangwei
* @version 1.0
* @since 2026/01/08 17:57
*/
@Data
public
class
StaffGoodNewsTemplateRespDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2081857723317276564L
;
/**
* 报告类型:1-日报,2-周报,3-月报
*/
private
Integer
reportType
;
/**
* 模板类型
*/
private
String
type
;
/**
* 模板类型名称
*/
private
String
typeName
;
/**
* 模版唯一编号
*/
private
String
code
;
/**
* 模板名称
*/
private
String
name
;
/**
* id
*/
private
Integer
id
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffMonthlyReportRecordDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 获取员工月报填写记录
* @author yangwei
* @version 1.0
* @since 2026/01/08 17:57
*/
@Data
@Builder
public
class
StaffMonthlyReportRecordDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6519524672282618603L
;
/**
* 年
*/
private
String
year
;
/**
* 周唯一标识
*/
private
String
month
;
/**
* 能够提交,true 即可以提交,false 即不可以提交
*/
private
Boolean
beAbleSubmit
;
/**
* 是否提交
*/
private
Boolean
hasSubmit
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffMonthlyReportRecordWrapper.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotEmpty
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 获取员工周报填写记录
* @author yangwei
* @version 1.0
* @since 2026/01/08 20:16
*/
@Data
public
class
StaffMonthlyReportRecordWrapper
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7496738397096982231L
;
/**
* 用户uuid
*/
@NotBlank
(
message
=
"用户uuid不能为空"
)
private
String
uuid
;
/**
* 模版唯一编号
*/
@NotBlank
(
message
=
"模版唯一编号不能为空"
)
private
String
code
;
/**
* 当月周信息
*/
@NotEmpty
(
message
=
"月份信息不能为空"
)
private
List
<
@Valid
MonthlyReportRecordReqDTO
>
monthlyReportRecordReqList
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffRecordDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/08 20:43
*/
@Data
public
class
StaffRecordDTO
{
/**
* 主键
*/
private
Integer
id
;
/**
* 用户uuid
*/
private
String
staffUuid
;
/**
* 模板编码
*/
private
String
templateCode
;
/**
* 提交时间
*/
private
String
submitDate
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffWeeklyReportRecordDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 获取周信息响应对象
* @author yangwei
* @version 1.0
* @since 2026/01/08 17:57
*/
@Data
@ApiModel
(
"获取员工周报填写记录"
)
public
class
StaffWeeklyReportRecordDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6519524672282618603L
;
/**
* 周唯一标识
*/
private
String
weekCode
;
/**
* 能够提交,true 即可以提交,false 即不可以提交
*/
private
Boolean
beAbleSubmit
;
/**
* 是否提交
*/
private
Boolean
hasSubmit
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/StaffWeeklyReportRecordWrapper.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotEmpty
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 获取员工周报填写记录
* @author yangwei
* @version 1.0
* @since 2026/01/08 20:16
*/
@Data
public
class
StaffWeeklyReportRecordWrapper
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7496738397096982231L
;
/**
* 用户uuid
*/
@NotBlank
(
message
=
"用户uuid不能为空"
)
private
String
uuid
;
/**
* 模版唯一编号
*/
@NotBlank
(
message
=
"模版唯一编号不能为空"
)
private
String
code
;
/**
* 当月周信息
*/
@NotEmpty
(
message
=
"当月周信息不能为空"
)
private
List
<
@Valid
WeeklyReportRecordReqDTO
>
weeklyReportRecordReqList
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/SubmitCountDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/13 21:07
*/
@Data
public
class
SubmitCountDTO
{
/**
* 用户id
*/
private
String
uuid
;
/**
* 提交次数
*/
private
Integer
submitCount
;
/**
* 最近一次提交时间
*/
private
Date
recentlySubmitDate
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/TemplateStaffRefDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateStaffRef
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 模版员工关联信息
* @author yangwei
* @version 1.0
* @since 2026/01/12 20:03
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
TemplateStaffRefDTO
extends
DigitalManagementTemplateStaffRef
{
private
static
final
long
serialVersionUID
=
-
339891578518469012L
;
/**
* 指定日期
*/
private
String
targetDate
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/WeekRange.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.time.LocalDate
;
/**
* 周开始结束日期
* @author yangwei
* @version 1.0
* @since 2026/01/10 15:49
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
WeekRange
{
private
LocalDate
startDate
;
private
LocalDate
endDate
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/digitalmanagement/WeeklyReportRecordReqDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
digitalmanagement
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* 获取员工周报填写记录
* @author yangwei
* @version 1.0
* @since 2026/01/08 17:57
*/
@Data
public
class
WeeklyReportRecordReqDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1366491639688272784L
;
/**
* 年份
*/
private
String
year
;
/**
* 月份
*/
private
String
month
;
/**
* 周唯一标识
*/
@NotBlank
(
message
=
"周唯一标识不能为空"
)
private
String
weekCode
;
/**
* 周序号(从1开始)
*/
private
Integer
weekNumber
;
/**
* 周开始日期
*/
private
LocalDate
startDate
;
private
String
startDateStr
;
/**
* 周结束日期
*/
private
LocalDate
endDate
;
@NotBlank
(
message
=
"周结束日期不能为空"
)
private
String
endDateStr
;
/**
* 是否跨月
*/
@NotNull
(
message
=
"是否跨月不能为空"
)
private
Boolean
crossMonth
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessageDTO.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
messagebox
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
messagebox
;
import
cn.com.glsx.dj.mindworkplate.enums.messagebox.ModuleTypeEnums
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
...
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessagePopUpWindowDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
messagebox
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* 活动消息弹窗查询请求模型
*
* @author yangwei
* @version 1.0
* @since 2026/01/04 9:52
*/
@Data
public
class
ActivityMessagePopUpWindowDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7981687277778332484L
;
/**
* 业务场景:0-延保/权益,1-精品
*/
@NotNull
(
message
=
"业务场景不能为空"
)
private
Integer
businessType
;
/**
* uuid
*/
@NotBlank
(
message
=
"uuid不能为空"
)
private
String
uuid
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/dto/messagebox/ActivityMessagePopUpWindowRespDTO.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
dto
.
messagebox
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 活动消息弹窗响应模型
* @author yangwei
* @version 1.0
* @since 2026/1/04 10:55
*/
@Data
public
class
ActivityMessagePopUpWindowRespDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
4022752306429970419L
;
/**
* 消息id
*/
private
Integer
msgId
;
/**
* 关联id
*/
private
Long
relId
;
/**
* 活动id
*/
private
Long
activityId
;
/**
* 消息类型 0-活动消息 1-获奖名单消息
*/
private
String
type
;
/**
* 活动名称
*/
private
String
activityName
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/DistinctDimensionalityEnum.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
enums
;
/**
* 去重维度
* @author yangwei
* @version 1.0
* @since 2026/01/13 09:44
*/
public
enum
DistinctDimensionalityEnum
{
PHONE
,
UUID
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/GoodNewsTemplateCodeEnum.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 喜报模版代码
*
* @author yangwei
* @version 1.0
* @since 2026/01/09 15:46
*/
@Getter
@AllArgsConstructor
public
enum
GoodNewsTemplateCodeEnum
{
/**
* 2.3延保区域日报模版
*/
DELAY_TEMPLATE_CODE_2_3
(
"uuid-temp-001"
,
"2.3延保区域日报模版"
),
/**
* 1.1轻改区域日报模版
*/
LIGHT_CHANGE_TEMPLATE_CODE_1_1
(
"qinggai-temp-001"
,
"1.1轻改区域日报模版"
),
/**
* 2.1权益区域日报模版
*/
REGIONAL_TEMPLATE_CODE_2_1
(
"uuid-temp-011"
,
"1.1权益区域日报模版"
),
/**
* 2.1区域经理周报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_1
(
"uuid-temp-012"
,
"2.1区域经理周报模版"
),
/**
* 1.1区域经理周报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_1_1
(
"uuid-temp-013"
,
"1.1区域经理周报模版"
),
/**
* 2.3区域经理周报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_3
(
"uuid-temp-014"
,
"2.3区域经理周报模版"
),
/**
* 2.1运营主管周报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_15_2_1
(
"uuid-temp-015"
,
"2.1运营主管周报模版"
),
/**
* 1.1运营主管周报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_16_1_1
(
"uuid-temp-016"
,
"1.1运营主管周报模版"
),
/**
* 2.3运营主管周报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_17_2_3
(
"uuid-temp-017"
,
"2.3区域经理周报模版"
),
/**
* 1.1区域经理月报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_18_1_1
(
"uuid-temp-018"
,
"1.1区域经理月报模版"
),
/**
* 2.1区域经理月报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_19_2_1
(
"uuid-temp-019"
,
"2.1区域经理月报模版"
),
/**
* 2.3区域经理月报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_20_2_3
(
"uuid-temp-020"
,
"2.3区域经理月报模版"
),
/**
* 2.1运营主管月报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__21_2_1
(
"uuid-temp-021"
,
"2.1运营主管月报模版"
),
/**
* 1.1运营主管月报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__22_1_1
(
"uuid-temp-022"
,
"1.1运营主管月报模版"
),
/**
* 2.3运营主管月报模版
*/
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_23_2_3
(
"uuid-temp-023"
,
"2.3运营主管月报模版"
);
private
final
String
code
;
private
final
String
name
;
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/GoodNewsTemplateReportTypeEnum.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
enums
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 喜报模版类型枚举, 报告类型:1-日报,2-周报,3-月报
* @author yangwei
* @version 1.0
* @since 2026/01/09 16:05
*/
@Getter
@AllArgsConstructor
public
enum
GoodNewsTemplateReportTypeEnum
{
DAY
(
"1"
,
"日报"
),
WEEK
(
"2"
,
"周报"
),
MONTH
(
"3"
,
"月报"
);
private
final
String
code
;
private
final
String
name
;
public
static
GoodNewsTemplateReportTypeEnum
getReportType
(
String
code
)
{
for
(
GoodNewsTemplateReportTypeEnum
value
:
values
())
{
if
(
value
.
code
.
equals
(
code
))
{
return
value
;
}
}
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"不支持的模板类型"
);
}
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/enums/MindWorkplateServiceErrorEnum.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
enums
;
import
cn.com.glsx.framework.core.enums.ErrorEnum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* mindworkplate服务错误码枚举
* @author yangwei
* @version 1.0
* @since 2026/01/09 14:48
*/
@Getter
@AllArgsConstructor
public
enum
MindWorkplateServiceErrorEnum
implements
ErrorEnum
{
COMMON_ERROR
(
"10086"
,
"{}"
),
DATA_NOT_FULL_ERROR
(
"10001000"
,
"数据不完整!"
);
private
final
String
value
;
private
final
String
displayName
;
static
final
Map
<
String
,
CommonErrorEnum
>
ENUM_MAP
=
new
HashMap
<
String
,
CommonErrorEnum
>();
static
{
for
(
CommonErrorEnum
code:
CommonErrorEnum
.
values
()){
ENUM_MAP
.
put
(
code
.
getValue
(),
code
);
}
}
public
static
CommonErrorEnum
getEnum
(
String
value
){
return
ENUM_MAP
.
get
(
value
);
}
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/model/digitalmanagement/DigitalManagementTemplate.java
View file @
1d8d5eb
...
@@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonFormat;
...
@@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
javax.persistence.*
;
@Table
(
name
=
"digital_management_template"
)
@Table
(
name
=
"digital_management_template"
)
@Data
@Data
...
@@ -82,4 +82,31 @@ public class DigitalManagementTemplate implements Serializable {
...
@@ -82,4 +82,31 @@ public class DigitalManagementTemplate implements Serializable {
@Column
(
name
=
"extend_field"
)
@Column
(
name
=
"extend_field"
)
@ApiModelProperty
(
notes
=
"额外字段"
)
@ApiModelProperty
(
notes
=
"额外字段"
)
private
String
extendField
;
private
String
extendField
;
/**
* 场景类型:0-会员权益/升级,1-精品升级
*/
@Column
(
name
=
"scene_type"
)
private
String
sceneType
;
/**
* 业务类型:1-延保,2-权益
*/
@Column
(
name
=
"business_type"
)
private
Integer
businessType
;
/**
* 报告类型:1-日报,2-周报,3-月报
*/
@Column
(
name
=
"report_type"
)
private
Integer
reportType
;
/**
* 角色类型:1-区域经理(区域运营),2-运营主管(驻店人员)
*/
@Column
(
name
=
"role_type"
)
private
String
roleType
;
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/remote/DigitalManagementRecordRemote.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
remote
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
remote
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.framework.core.annotation.ApiMethod
;
import
cn.com.glsx.framework.core.annotation.ApiParam
;
import
cn.com.glsx.framework.core.annotation.ApiResponse
;
import
cn.com.glsx.framework.core.annotation.ApiService
;
import
cn.com.glsx.dj.mindworkplate.request.digitalmanagement.SubmittedDateRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.request.digitalmanagement.SubmittedDateRequestDTO
;
import
cn.com.glsx.framework.core.annotation.*
;
import
cn.com.glsx.framework.core.annotation.*
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
...
@@ -13,7 +9,6 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
...
@@ -13,7 +9,6 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @Description 数字化管理-员工日报服务
* @Description 数字化管理-员工日报服务
...
@@ -90,4 +85,18 @@ public interface DigitalManagementRecordRemote {
...
@@ -90,4 +85,18 @@ public interface DigitalManagementRecordRemote {
@ApiMethod
(
"查询所有员工"
)
@ApiMethod
(
"查询所有员工"
)
RpcResponse
<
RpcPagination
<
DigitalManagementStaffResponseDTO
>>
pageStaffInfo
(
RpcPagination
<
DigitalManagementStaffRequestDTO
>
req
);
RpcResponse
<
RpcPagination
<
DigitalManagementStaffResponseDTO
>>
pageStaffInfo
(
RpcPagination
<
DigitalManagementStaffRequestDTO
>
req
);
@ApiMethod
(
"查询员工周报提交"
)
@ApiParam
(
name
=
"request"
,
notes
=
"条件"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"查询员工周报提交"
)
RpcResponse
<
List
<
StaffWeeklyReportRecordDTO
>>
findStaffWeeklyReportSubmit
(
StaffWeeklyReportRecordWrapper
request
);
@ApiMethod
(
"查询员工月报提交"
)
@ApiParam
(
name
=
"request"
,
notes
=
"条件"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"查询员工月报提交"
)
RpcResponse
<
List
<
StaffMonthlyReportRecordDTO
>>
findStaffMonthlyReportSubmit
(
StaffMonthlyReportRecordWrapper
request
);
@ApiMethod
(
"获取员工喜报模版"
)
@ApiParam
(
name
=
"request"
,
notes
=
"条件"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"获取员工喜报模版"
)
RpcResponse
<
List
<
StaffGoodNewsTemplateRespDTO
>>
findStaffGoodNewsTemplate
(
StaffGoodNewsTemplateReqDTO
request
);
}
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/remote/PadMessageBoxRemote.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
remote
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
remote
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageRespDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.PadMsgBoxBatchDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.*
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
import
cn.com.glsx.dj.mindworkplate.model.WarningNotification
;
import
cn.com.glsx.dj.mindworkplate.model.WarningNotification
;
...
@@ -102,4 +100,14 @@ public interface PadMessageBoxRemote {
...
@@ -102,4 +100,14 @@ public interface PadMessageBoxRemote {
@ApiParam
(
name
=
"msgId"
,
notes
=
"消息id"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"msgId"
,
notes
=
"消息id"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"更新结果"
)
@ApiResponse
(
"更新结果"
)
RpcResponse
<
Boolean
>
updActivityMessageStatus
(
Integer
msgId
);
RpcResponse
<
Boolean
>
updActivityMessageStatus
(
Integer
msgId
);
@ApiMethod
(
"活动消息弹窗"
)
@ApiParam
(
name
=
"request"
,
notes
=
"请求参数"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"活动消息弹窗"
)
RpcResponse
<
ActivityMessagePopUpWindowRespDTO
>
getActivityMsgPopUpWindow
(
ActivityMessagePopUpWindowDTO
request
);
@ApiMethod
(
"更新活动弹窗状态"
)
@ApiParam
(
name
=
"msgId"
,
notes
=
"消息id"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"更新结果"
)
RpcResponse
<
Boolean
>
updActivityPopUpWindowStatus
(
Integer
msgId
);
}
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/response/longcourse/StaffConfigDTO.java
View file @
1d8d5eb
...
@@ -37,5 +37,8 @@ public class StaffConfigDTO implements Serializable {
...
@@ -37,5 +37,8 @@ public class StaffConfigDTO implements Serializable {
@ApiModelProperty
(
notes
=
"长课程配置任务ID"
)
@ApiModelProperty
(
notes
=
"长课程配置任务ID"
)
private
Integer
taskId
;
private
Integer
taskId
;
@ApiModelProperty
(
notes
=
"长课程配置任务状态 0未开始 1进行中 2已结束"
)
private
Byte
taskStatus
;
private
Date
createdDate
;
private
Date
createdDate
;
}
}
rpc-dj-mindworkplate-api/src/main/java/cn/com/glsx/dj/mindworkplate/response/warning/ReceptionMissingReportResponse.java
View file @
1d8d5eb
...
@@ -115,4 +115,7 @@ public class ReceptionMissingReportResponse implements Serializable {
...
@@ -115,4 +115,7 @@ public class ReceptionMissingReportResponse implements Serializable {
@ApiModelProperty
(
notes
=
"修改时间"
)
@ApiModelProperty
(
notes
=
"修改时间"
)
private
Date
updatedDate
;
private
Date
updatedDate
;
private
Integer
sceneType
;
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/pom.xml
View file @
1d8d5eb
...
@@ -14,6 +14,11 @@
...
@@ -14,6 +14,11 @@
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
cn.com.glsx.dj
</groupId>
<artifactId>
rpc-dj-riskmanage-api
</artifactId>
<version>
5.5.3-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.com.glsx.scrm
</groupId>
<groupId>
cn.com.glsx.scrm
</groupId>
<artifactId>
rpc-scrm-coupon-api
</artifactId>
<artifactId>
rpc-scrm-coupon-api
</artifactId>
<version>
4.50.0-SNAPSHOT
</version>
<version>
4.50.0-SNAPSHOT
</version>
...
@@ -41,12 +46,12 @@
...
@@ -41,12 +46,12 @@
<dependency>
<dependency>
<groupId>
cn.com.glsx
</groupId>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
rpc-dj-mindworkplate-api
</artifactId>
<artifactId>
rpc-dj-mindworkplate-api
</artifactId>
<version>
5.5.
1
-SNAPSHOT
</version>
<version>
5.5.
3
-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.com.glsx.dj
</groupId>
<groupId>
cn.com.glsx.dj
</groupId>
<artifactId>
rpc-dj-smartcarlife-api
</artifactId>
<artifactId>
rpc-dj-smartcarlife-api
</artifactId>
<version>
5.5.
1
-SNAPSHOT
</version>
<version>
5.5.
3
-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.com.glsx.dj
</groupId>
<groupId>
cn.com.glsx.dj
</groupId>
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/component/SpringContextHolder.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
component
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Component
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/09 15:15
*/
@Component
public
class
SpringContextHolder
implements
ApplicationContextAware
{
private
static
ApplicationContext
applicationContext
;
@Override
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
throws
BeansException
{
SpringContextHolder
.
applicationContext
=
applicationContext
;
}
public
static
<
T
>
T
getBean
(
Class
<
T
>
clazz
)
{
return
applicationContext
.
getBean
(
clazz
);
}
public
static
Object
getBean
(
String
name
)
{
return
applicationContext
.
getBean
(
name
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/config/RiskManageConfig.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
config
;
import
cn.com.glsx.dj.riskmanage.remote.ActivityRemote
;
import
lombok.RequiredArgsConstructor
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* riskManage rpc config
* @author yangwei
* @version 1.0
* @since 2026/01/04 11:06
*/
@Configuration
@RequiredArgsConstructor
public
class
RiskManageConfig
{
private
final
ReferenceBuilderFactory
factory
;
@Bean
(
"riskManageActivityRemote"
)
public
ActivityRemote
activityRemote
(){
return
factory
.
builder
(
ActivityRemote
.
class
)
.
check
(
false
)
.
timeout
(
30000
)
.
build
();
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/enums/GoodNewsTempMapGroupConfigEnum.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
enums
;
import
cn.com.glsx.dj.smartcarlife.enums.ActionReportTypeEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 喜报模版映射群配置
* @author yangwei
* @version 1.0
* @since 2026/01/10 10:45
*/
@Getter
@AllArgsConstructor
public
enum
GoodNewsTempMapGroupConfigEnum
{
/**
* 2.3延保区域日报模版
*/
DAILY_2_3
(
GoodNewsTemplateCodeEnum
.
DELAY_TEMPLATE_CODE_2_3
,
ActionReportTypeEnum
.
REGIONAL_OPERATIONS_DAILY
),
/**
* 1.1轻改区域日报模版
*/
DAILY_1_1
(
GoodNewsTemplateCodeEnum
.
LIGHT_CHANGE_TEMPLATE_CODE_1_1
,
ActionReportTypeEnum
.
LIGHT_REGIONAL_OPERATIONS_DAILY
),
/**
* 2.1权益区域日报模版
*/
DAILY_2_1
(
GoodNewsTemplateCodeEnum
.
REGIONAL_TEMPLATE_CODE_2_1
,
ActionReportTypeEnum
.
EQUITY_REGIONAL_OPERATIONS_DAILY_4_2_1
),
/**
* 2.1区域经理周报模版
*/
WEEKLY_2_1
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_1
,
ActionReportTypeEnum
.
EQUITY_REGIONAL_MANAGER_WEEKLY_REPORT_4_2_1
),
/**
* 1.1区域经理周报模版
*/
WEEKLY_1_1
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_1_1
,
ActionReportTypeEnum
.
REGIONAL_MANAGER_WEEKLY_REPORT_4_1_1
),
/**
* 2.3区域经理周报模版
*/
WEEKLY_2_3
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_3
,
ActionReportTypeEnum
.
EQUITY_REGIONAL_MANAGER_WEEKLY_REPORT_4_2_3
),
/**
* 2.1运营主管周报模版
*/
WEEKLY_2_1_OPERATION_SUPERVISOR
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_15_2_1
,
ActionReportTypeEnum
.
EQUITY_OPERATION_MANAGER_WEEKLY_REPORT_4_2_1
),
/**
* 1.1运营主管周报模版
*/
WEEKLY_1_1_OPERATION_SUPERVISOR
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_16_1_1
,
ActionReportTypeEnum
.
OPERATION_MANAGER_WEEKLY_REPORT_4_1_1
),
/**
* 2.3运营主管周报模版
*/
WEEKLY_2_3_OPERATION_SUPERVISOR
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_17_2_3
,
ActionReportTypeEnum
.
EQUITY_OPERATION_MANAGER_WEEKLY_REPORT_4_2_3
),
/**
* 1.1区域经理月报模版
*/
MONTHLY_1_1
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_18_1_1
,
ActionReportTypeEnum
.
REGIONAL_MANAGER_MONTHLY_REPORT_4_1_1
),
/**
* 2.1区域经理月报模版
*/
MONTHLY_2_1
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_19_2_1
,
ActionReportTypeEnum
.
EQUITY_REGIONAL_MANAGER_MONTHLY_REPORT_4_2_1
),
/**
* 2.3区域经理月报模版
*/
MONTHLY_2_3
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_20_2_3
,
ActionReportTypeEnum
.
EQUITY_REGIONAL_MANAGER_MONTHLY_REPORT_4_2_3
),
/**
* 2.1运营主管月报模版
*/
MONTHLY_2_1_OPERATION_SUPERVISOR
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__21_2_1
,
ActionReportTypeEnum
.
EQUITY_OPERATION_MANAGER_MONTHLY_REPORT_4_2_1
),
/**
* 1.1运营主管月报模版
*/
MONTHLY_1_1_OPERATION_SUPERVISOR
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__22_1_1
,
ActionReportTypeEnum
.
OPERATION_MANAGER_MONTHLY_REPORT_4_1_1
),
/**
* 2.3运营主管月报模版
*/
MONTHLY_2_3_OPERATION_SUPERVISOR
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_23_2_3
,
ActionReportTypeEnum
.
EQUITY_OPERATION_MANAGER_MONTHLY_REPORT_4_2_3
),
;
private
final
GoodNewsTemplateCodeEnum
templateCodeEnum
;
private
final
ActionReportTypeEnum
reportTypeEnum
;
/**
* 根据模板编号获取对应的报告类型
* @author yangwei
* @since 2026/1/10 11:00
* @param templateCode 模板编号
* @return cn.com.glsx.dj.smartcarlife.enums.ActionReportTypeEnum
*/
public
static
ActionReportTypeEnum
getReportTypeEnumByTemplateCode
(
String
templateCode
)
{
for
(
GoodNewsTempMapGroupConfigEnum
value
:
values
())
{
if
(
value
.
getTemplateCodeEnum
().
getCode
().
equals
(
templateCode
))
{
return
value
.
getReportTypeEnum
();
}
}
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"不支持的模板类型: "
+
templateCode
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/handler/ReportUnSummitStatisticsHandler.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
handler
;
import
cn.com.glsx.dj.mindworkplate.consts.SymbolConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateSummaryDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsStatisticsDTO
;
import
cn.com.glsx.dj.mindworkplate.enums.DistinctDimensionalityEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTempMapGroupConfigEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateMapper
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplate
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.StaffRecordSpecialHandler
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.goodnewssave.RegionalManagerMonthlyReportSaveStrategy
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.goodnewssave.RegionalManagerWeeklyReportSaveStrategy
;
import
cn.com.glsx.dj.mindworkplate.util.DateUtils
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.remote.ReportPushRecordRemote
;
import
cn.com.glsx.framework.core.beans.BaseModel
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.google.common.collect.Lists
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.UUID
;
/**
* 报告未提交统计
* @author yangwei
* @version 1.0
* @since 2026/01/13 14:24
*/
@Slf4j
@Component
@RequiredArgsConstructor
public
class
ReportUnSummitStatisticsHandler
{
private
final
static
String
UN_SUMMIT_REPORT_TEMPLATE
=
"【{}】未填写{}统计\n人数:{}\n名单:{}\n"
;
private
final
ReportPushRecordRemote
reportPushRecordRemote
;
private
final
StaffRecordSpecialHandler
staffRecordSpecialHandler
;
private
final
DigitalManagementTemplateMapper
digitalManagementTemplateMapper
;
private
final
DigitalManagementStaffRecordService
digitalManagementStaffRecordService
;
/**
* 统计然后推送
* @author yangwei
* @since 2026/1/13 15:06
* @param reportType 报告类型
*/
public
void
statisticsThenPush
(
GoodNewsTemplateReportTypeEnum
reportType
)
{
Example
example
=
new
Example
(
DigitalManagementTemplate
.
class
);
example
.
createCriteria
()
.
andEqualTo
(
"deletedFlag"
,
BaseModel
.
DeletedFlagEnum
.
N
.
name
())
.
andEqualTo
(
"reportType"
,
reportType
.
getCode
());
List
<
DigitalManagementTemplate
>
digitalManagementTemplates
=
digitalManagementTemplateMapper
.
selectByExample
(
example
);
if
(
CollUtil
.
isEmpty
(
digitalManagementTemplates
))
{
return
;
}
Date
now
=
staffRecordSpecialHandler
.
getCurrentSystemDate
();
List
<
String
>
dayRangeList
=
Lists
.
newArrayList
(
DateUtil
.
format
(
now
,
DateUtils
.
PATTERN_YYYY_MM_DD
));
digitalManagementTemplates
.
forEach
(
template
->
{
StaffGoodNewsStatisticsDTO
request
=
new
StaffGoodNewsStatisticsDTO
().
setCode
(
template
.
getCode
()).
setName
(
template
.
getName
());
DigitalManagementTemplateSummaryDTO
digitalManagementTemplateSummaryDTO
=
digitalManagementStaffRecordService
.
statisticsAssignDateDistinct
(
request
,
dayRangeList
,
DistinctDimensionalityEnum
.
PHONE
,
reportType
);
String
content
=
StrUtil
.
format
(
UN_SUMMIT_REPORT_TEMPLATE
,
dateBuilder
(
now
,
reportType
),
template
.
getName
(),
digitalManagementTemplateSummaryDTO
.
getUndoCount
(),
digitalManagementTemplateSummaryDTO
.
getUndoCount
()
==
0
?
SymbolConstants
.
NONE
:
StrUtil
.
join
(
SymbolConstants
.
CHINESE_COMMA
,
digitalManagementTemplateSummaryDTO
.
getUnSubmittedStaffNames
())
);
RecordRequestDTO
pushRequest
=
pushRequestBuilder
(
content
,
template
.
getCode
());
log
.
info
(
"推送模版配置对应的群消息请求参数:{}"
,
pushRequest
);
reportPushRecordRemote
.
addPushRecordRemote
(
pushRequest
);
});
}
/**
* 日期构建
* @author yangwei
* @since 2026/1/13 14:59
* @param now 当前时间
* @param reportType 模板类型
* @return java.lang.String
*/
public
String
dateBuilder
(
Date
now
,
GoodNewsTemplateReportTypeEnum
reportType
)
{
switch
(
reportType
)
{
case
DAY:
return
DateUtil
.
format
(
now
,
DateUtils
.
PATTERN_YYYY_MM_DD
);
case
WEEK:
return
RegionalManagerWeeklyReportSaveStrategy
.
getWeeklyRange
(
now
);
case
MONTH:
return
RegionalManagerMonthlyReportSaveStrategy
.
getMonthlyRange
(
now
);
default
:
return
StrUtil
.
EMPTY
;
}
}
/**
* 组装推送请求
* @author yangwei
* @since 2026/1/13 14:55
* @param content 提醒内容
* @param code 模版代码
* @return cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
*/
private
RecordRequestDTO
pushRequestBuilder
(
String
content
,
String
code
)
{
RecordRequestDTO
pushRequest
=
new
RecordRequestDTO
();
pushRequest
.
setMsgId
(
UUID
.
randomUUID
().
toString
());
pushRequest
.
setContent
(
content
);
pushRequest
.
setAttType
(
1
);
pushRequest
.
setPushType
(
GoodNewsTempMapGroupConfigEnum
.
getReportTypeEnumByTemplateCode
(
code
));
return
pushRequest
;
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/DailyReportUnsubmittedSummaryJob.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
job
.
digitalmanagement
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
job
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementStaffInfoDTO
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementStaffRecordDTO
;
import
cn.com.glsx.dj.mindworkplate.handler.ReportUnSummitStatisticsHandler
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateMapper
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementTemplateService
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.enums.ActionReportTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.enums.SceneTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.remote.ReportPushRecordRemote
;
import
cn.com.glsx.dj.smartcarlife.util.DateUtils
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.simple.SimpleJob
;
import
com.dangdang.ddframe.job.api.simple.SimpleJob
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf
;
import
org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
/**
/**
*
@Description 未填写日报人员统计及推送功能:需实现每日晚间23:00自动统计当日未提交轻改区域日报&延保区域日报的人员名单,并通过指定机器人推送至相关群
*
日报统计
* @
Author lyj
* @
author yangwei
* @
Date 2025/12/21
* @
version 1.0
* @
Version 1.0
* @
since 2026/01/13 16:03
*/
*/
@Slf4j
@Slf4j
@RequiredArgsConstructor
@ElasticJobConf
(
name
=
"DailyReportUnsubmittedSummaryJob"
,
cron
=
"0 0 23 * * ?"
,
description
=
"工作日报未填写统计推送"
,
overwrite
=
false
)
@ElasticJobConf
(
name
=
"DailyReportUnsubmittedSummaryJob"
,
cron
=
"0 0 23 * * ?"
,
description
=
"工作日报未填写统计推送"
,
overwrite
=
false
)
public
class
DailyReportUnsubmittedSummaryJob
implements
SimpleJob
{
public
class
DailyReportUnsubmittedSummaryJob
implements
SimpleJob
{
@Autowired
private
final
ReportUnSummitStatisticsHandler
reportUnSummitStatisticsHandler
;
private
DigitalManagementTemplateService
templateService
;
@Autowired
private
DigitalManagementStaffRecordService
staffRecordService
;
@Autowired
private
DigitalManagementTemplateMapper
templateMapper
;
@Autowired
private
ReportPushRecordRemote
reportPushRecordRemote
;
@Override
@Override
public
void
execute
(
ShardingContext
var1
)
{
public
void
execute
(
ShardingContext
shardingContext
)
{
log
.
info
(
"DailyReportUnsubmittedSummaryJob______
未填写日报人员统计
_______start"
);
log
.
info
(
"DailyReportUnsubmittedSummaryJob______
工作日报未填写统计推送
_______start"
);
try
{
try
{
RecordRequestDTO
requestDTO
=
new
RecordRequestDTO
();
reportUnSummitStatisticsHandler
.
statisticsThenPush
(
GoodNewsTemplateReportTypeEnum
.
DAY
);
requestDTO
.
setAttType
(
1
);
requestDTO
.
setScene
(
SceneTypeEnum
.
SCENE1_0
);
// 延保日报
requestDTO
.
setMsgId
(
UUID
.
randomUUID
().
toString
());
requestDTO
.
setContent
(
getTemplateContent
(
templateService
.
getRegionalTemplateCode
()));
requestDTO
.
setPushType
(
ActionReportTypeEnum
.
REGIONAL_OPERATIONS_DAILY
);
log
.
info
(
"未填写延保日报人员统计推送:{}"
,
requestDTO
);
reportPushRecordRemote
.
addPushRecordRemote
(
requestDTO
);
// 轻改日报
requestDTO
.
setMsgId
(
UUID
.
randomUUID
().
toString
());
requestDTO
.
setContent
(
getTemplateContent
(
templateService
.
getLightChangeTemplateCode
()));
requestDTO
.
setPushType
(
ActionReportTypeEnum
.
LIGHT_REGIONAL_OPERATIONS_DAILY
);
log
.
info
(
"未填写轻改日报人员统计推送:{}"
,
requestDTO
);
reportPushRecordRemote
.
addPushRecordRemote
(
requestDTO
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"未填写日报人员统计自动任务推送到外部群异常:{}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"工作月报未填写统计推送异常:"
,
e
);
}
log
.
info
(
"DailyReportUnsubmittedSummaryJob______未填写日报人员统计_______end"
);
}
private
String
getTemplateContent
(
String
templateCode
)
{
StringBuilder
content
=
new
StringBuilder
();
String
dateF
=
DateUtils
.
formatDate
(
new
Date
());
DigitalManagementTemplateDTO
template
=
templateMapper
.
findByCode
(
templateCode
);
String
titleF
=
String
.
format
(
"【%s】未填写%s统计"
,
dateF
,
template
.
getTypeName
());
Integer
count
=
0
;
String
unsubmittedStaffName
=
"无"
;
DigitalManagementStaffRecordDTO
staffRecordDTO
=
new
DigitalManagementStaffRecordDTO
();
staffRecordDTO
.
setTemplateCode
(
templateCode
);
staffRecordDTO
.
setStartTime
(
DateUtils
.
getStartTimeOfDay
(
new
Date
()));
staffRecordDTO
.
setEndTime
(
new
Date
());
// 今日未提交员工
Collection
<
DigitalManagementStaffInfoDTO
>
staffInfos
=
staffRecordService
.
getUnsubmittedStaffInfo
(
staffRecordDTO
);
if
(
CollectionUtils
.
isNotEmpty
(
staffInfos
))
{
// 根据手机号去重,保留每个手机号的第一条记录
staffInfos
=
new
ArrayList
<>(
staffInfos
.
stream
()
.
filter
(
p
->
StringUtils
.
isNotBlank
(
p
.
getUserPhone
()))
.
collect
(
Collectors
.
toMap
(
p
->
p
.
getUserPhone
(),
p
->
p
,
(
p1
,
p2
)
->
p1
))
.
values
());
}
if
(
CollectionUtils
.
isNotEmpty
(
staffInfos
))
{
count
=
staffInfos
.
size
();
unsubmittedStaffName
=
staffInfos
.
stream
().
map
(
p
->
p
.
getUserName
()).
collect
(
Collectors
.
joining
(
","
));
}
}
return
content
.
append
(
titleF
).
append
(
"\n"
)
log
.
info
(
"DailyReportUnsubmittedSummaryJob______工作日报未填写统计推送_______end"
);
.
append
(
"人数:"
).
append
(
count
).
append
(
"\n"
)
.
append
(
"名单:"
).
append
(
unsubmittedStaffName
).
append
(
"\n"
)
.
toString
();
}
}
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/DailyReportUnsubmittedSummaryJob1.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
job
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementStaffInfoDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementStaffRecordDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateMapper
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementTemplateService
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.enums.ActionReportTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.enums.SceneTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.remote.ReportPushRecordRemote
;
import
cn.com.glsx.dj.smartcarlife.util.DateUtils
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.simple.SimpleJob
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
/**
* @Description 未填写日报人员统计及推送功能:需实现每日晚间23:00自动统计当日未提交轻改区域日报&延保区域日报的人员名单,并通过指定机器人推送至相关群
* @Author lyj
* @Date 2025/12/21
* @Version 1.0
*/
@Slf4j
@Deprecated
// @ElasticJobConf(name = "DailyReportUnsubmittedSummaryJob", cron = "0 0 23 * * ?", description = "工作日报未填写统计推送", overwrite = false)
public
class
DailyReportUnsubmittedSummaryJob1
implements
SimpleJob
{
@Autowired
private
DigitalManagementTemplateService
templateService
;
@Autowired
private
DigitalManagementStaffRecordService
staffRecordService
;
@Autowired
private
DigitalManagementTemplateMapper
templateMapper
;
@Autowired
private
ReportPushRecordRemote
reportPushRecordRemote
;
@Override
public
void
execute
(
ShardingContext
var1
)
{
log
.
info
(
"DailyReportUnsubmittedSummaryJob______未填写日报人员统计_______start"
);
try
{
RecordRequestDTO
requestDTO
=
new
RecordRequestDTO
();
requestDTO
.
setAttType
(
1
);
requestDTO
.
setScene
(
SceneTypeEnum
.
SCENE1_0
);
// 延保日报
requestDTO
.
setMsgId
(
UUID
.
randomUUID
().
toString
());
requestDTO
.
setContent
(
getTemplateContent
(
templateService
.
getRegionalTemplateCode
()));
requestDTO
.
setPushType
(
ActionReportTypeEnum
.
REGIONAL_OPERATIONS_DAILY
);
log
.
info
(
"未填写延保日报人员统计推送:{}"
,
requestDTO
);
reportPushRecordRemote
.
addPushRecordRemote
(
requestDTO
);
// 轻改日报
requestDTO
.
setMsgId
(
UUID
.
randomUUID
().
toString
());
requestDTO
.
setContent
(
getTemplateContent
(
templateService
.
getLightChangeTemplateCode
()));
requestDTO
.
setPushType
(
ActionReportTypeEnum
.
LIGHT_REGIONAL_OPERATIONS_DAILY
);
log
.
info
(
"未填写轻改日报人员统计推送:{}"
,
requestDTO
);
reportPushRecordRemote
.
addPushRecordRemote
(
requestDTO
);
}
catch
(
Exception
e
)
{
log
.
error
(
"未填写日报人员统计自动任务推送到外部群异常:{}"
,
e
.
getMessage
(),
e
);
}
log
.
info
(
"DailyReportUnsubmittedSummaryJob______未填写日报人员统计_______end"
);
}
private
String
getTemplateContent
(
String
templateCode
)
{
StringBuilder
content
=
new
StringBuilder
();
String
dateF
=
DateUtils
.
formatDate
(
new
Date
());
DigitalManagementTemplateDTO
template
=
templateMapper
.
findByCode
(
templateCode
);
String
titleF
=
String
.
format
(
"【%s】未填写%s统计"
,
dateF
,
template
.
getTypeName
());
Integer
count
=
0
;
String
unsubmittedStaffName
=
"无"
;
DigitalManagementStaffRecordDTO
staffRecordDTO
=
new
DigitalManagementStaffRecordDTO
();
staffRecordDTO
.
setTemplateCode
(
templateCode
);
staffRecordDTO
.
setStartTime
(
DateUtils
.
getStartTimeOfDay
(
new
Date
()));
staffRecordDTO
.
setEndTime
(
new
Date
());
// 今日未提交员工
Collection
<
DigitalManagementStaffInfoDTO
>
staffInfos
=
staffRecordService
.
getUnsubmittedStaffInfo
(
staffRecordDTO
);
if
(
CollectionUtils
.
isNotEmpty
(
staffInfos
))
{
// 根据手机号去重,保留每个手机号的第一条记录
staffInfos
=
new
ArrayList
<>(
staffInfos
.
stream
()
.
filter
(
p
->
StringUtils
.
isNotBlank
(
p
.
getUserPhone
()))
.
collect
(
Collectors
.
toMap
(
p
->
p
.
getUserPhone
(),
p
->
p
,
(
p1
,
p2
)
->
p1
))
.
values
());
}
if
(
CollectionUtils
.
isNotEmpty
(
staffInfos
))
{
count
=
staffInfos
.
size
();
unsubmittedStaffName
=
staffInfos
.
stream
().
map
(
p
->
p
.
getUserName
()).
collect
(
Collectors
.
joining
(
","
));
}
return
content
.
append
(
titleF
).
append
(
"\n"
)
.
append
(
"人数:"
).
append
(
count
).
append
(
"\n"
)
.
append
(
"名单:"
).
append
(
unsubmittedStaffName
).
append
(
"\n"
)
.
toString
();
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/MonthlyReportUnSubmittedSummaryJob.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
job
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.handler.ReportUnSummitStatisticsHandler
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.StaffRecordSpecialHandler
;
import
cn.com.glsx.dj.mindworkplate.util.DateUtils
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.simple.SimpleJob
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf
;
import
java.time.LocalDate
;
/**
* 工作月报未填写统计推送
* @author yangwei
* @version 1.0
* @since 2026/01/13 14:15
*/
@Slf4j
@RequiredArgsConstructor
@ElasticJobConf
(
name
=
"MonthlyReportUnSubmittedSummaryJob"
,
cron
=
"0 0 23 ? * *"
,
description
=
"工作月报未填写统计推送"
,
overwrite
=
false
)
public
class
MonthlyReportUnSubmittedSummaryJob
implements
SimpleJob
{
private
final
StaffRecordSpecialHandler
staffRecordSpecialHandler
;
private
final
ReportUnSummitStatisticsHandler
reportUnSummitStatisticsHandler
;
@Override
public
void
execute
(
ShardingContext
shardingContext
)
{
log
.
info
(
"MonthlyReportUnSubmittedSummaryJob______工作月报未填写统计推送_______start"
);
try
{
LocalDate
currentDate
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
boolean
isLastDayOfMonth
=
DateUtils
.
isLastDayOfMonth
(
currentDate
);
if
(
isLastDayOfMonth
)
{
reportUnSummitStatisticsHandler
.
statisticsThenPush
(
GoodNewsTemplateReportTypeEnum
.
MONTH
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"工作月报未填写统计推送异常:"
,
e
);
}
log
.
info
(
"MonthlyReportUnSubmittedSummaryJob______工作月报未填写统计推送_______end"
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/job/digitalmanagement/WeeklyReportUnSubmittedSummaryJob.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
job
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.handler.ReportUnSummitStatisticsHandler
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.simple.SimpleJob
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf
;
/**
* 工作周报未填写统计推送
* @author yangwei
* @version 1.0
* @since 2026/01/13 14:15
*/
@Slf4j
@RequiredArgsConstructor
@ElasticJobConf
(
name
=
"WeeklyReportUnSubmittedSummaryJob"
,
cron
=
"0 0 23 ? * SUN"
,
description
=
"工作周报未填写统计推送"
,
overwrite
=
false
)
public
class
WeeklyReportUnSubmittedSummaryJob
implements
SimpleJob
{
private
final
ReportUnSummitStatisticsHandler
reportUnSummitStatisticsHandler
;
@Override
public
void
execute
(
ShardingContext
shardingContext
)
{
log
.
info
(
"WeeklyReportUnSubmittedSummaryJob______工作周报未填写统计推送_______start"
);
try
{
reportUnSummitStatisticsHandler
.
statisticsThenPush
(
GoodNewsTemplateReportTypeEnum
.
WEEK
);
}
catch
(
Exception
e
)
{
log
.
error
(
"工作月报未填写统计推送异常:"
,
e
);
}
log
.
info
(
"WeeklyReportUnSubmittedSummaryJob______工作周报未填写统计推送_______end"
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/mapper/PadMessageBoxMapper.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
mapper
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.*
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageRespDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.MsgStatusDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
...
@@ -60,4 +58,13 @@ public interface PadMessageBoxMapper extends OreMapper<PadMessageBox> {
...
@@ -60,4 +58,13 @@ public interface PadMessageBoxMapper extends OreMapper<PadMessageBox> {
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.messagebox.PadMessageSummaryDetail>
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.messagebox.PadMessageSummaryDetail>
*/
*/
List
<
PadMessageSummaryDetail
>
countMessageBoxByUuid
(
MsgStatusDTO
msgStatusDTO
);
List
<
PadMessageSummaryDetail
>
countMessageBoxByUuid
(
MsgStatusDTO
msgStatusDTO
);
/**
* 获取活动消息弹窗信息
* @author yangwei
* @since 2026/1/4 10:42
* @param request 查询参数
* @return cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessagePopUpWindowRespDTO
*/
ActivityMessagePopUpWindowRespDTO
getActivityMsgPopUpWindow
(
ActivityMessagePopUpWindowDTO
request
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/mapper/digitalmanagement/DigitalManagementStaffRecordMapper.java
View file @
1d8d5eb
...
@@ -12,6 +12,7 @@ import org.oreframework.datasource.mybatis.mapper.OreMapper;
...
@@ -12,6 +12,7 @@ import org.oreframework.datasource.mybatis.mapper.OreMapper;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
@Mapper
@Mapper
public
interface
DigitalManagementStaffRecordMapper
extends
OreMapper
<
DigitalManagementStaffRecord
>
{
public
interface
DigitalManagementStaffRecordMapper
extends
OreMapper
<
DigitalManagementStaffRecord
>
{
...
@@ -64,4 +65,41 @@ public interface DigitalManagementStaffRecordMapper extends OreMapper<DigitalMan
...
@@ -64,4 +65,41 @@ public interface DigitalManagementStaffRecordMapper extends OreMapper<DigitalMan
int
getMonthlyIsTrainingOrganizedCount
(
String
uuid
);
int
getMonthlyIsTrainingOrganizedCount
(
String
uuid
);
List
<
DigitalManagementStaffResponseDTO
>
selectStaffInfo
(
DigitalManagementStaffRequestDTO
condition
);
List
<
DigitalManagementStaffResponseDTO
>
selectStaffInfo
(
DigitalManagementStaffRequestDTO
condition
);
/**
* 查找指定用户 {@code uuid} 对应模版 {@code code} 所在天 {@code dates} 喜报记录
* @author yangwei
* @since 2026/1/9 11:10
* @param uuid 用户,不能为空
* @param code 模版代码
* @param dates 日期列表
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffRecordDTO>
*/
List
<
StaffRecordDTO
>
findReportByUuidAndDate
(
@Param
(
"uuid"
)
String
uuid
,
@Param
(
"code"
)
String
code
,
@Param
(
"dates"
)
List
<
String
>
dates
);
/**
* <pre>
* 获取员工喜报模版(最新的模版配置)
* - 最新定义,生效日期 effective_date 最新,生效日期一样,id最大即为最新
* </pre>
* @author yangwei
* @since 2026/1/9 11:09
* @param request 请求对象
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsTemplateRespDTO>
*/
List
<
StaffGoodNewsTemplateRespDTO
>
findStaffGoodNewsTemplate
(
StaffGoodNewsTemplateReqDTO
request
);
List
<
SubmitCountDTO
>
selectSubmitCountAssignRange
(
@Param
(
"uuids"
)
Set
<
String
>
uuids
,
@Param
(
"templateCode"
)
String
templateCode
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
List
<
SubmitCountDTO
>
selectRecentlySubmitDate
(
@Param
(
"uuids"
)
Set
<
String
>
strings
,
@Param
(
"templateCode"
)
String
templateCode
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/mapper/digitalmanagement/DigitalManagementTemplateStaffRefMapper.java
View file @
1d8d5eb
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateStaffRefDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateStaffRefDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.TemplateStaffRefDTO
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateStaffRef
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateStaffRef
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -24,4 +25,17 @@ public interface DigitalManagementTemplateStaffRefMapper extends OreMapper<Digit
...
@@ -24,4 +25,17 @@ public interface DigitalManagementTemplateStaffRefMapper extends OreMapper<Digit
* @param staffUuids 要进行匹配的员工编号
* @param staffUuids 要进行匹配的员工编号
*/
*/
Collection
<
String
>
getTemplateBindingStaff
(
@Param
(
"filterTemplateTypeName"
)
String
filterTemplateTypeName
,
@Param
(
"staffUuids"
)
List
<
String
>
staffUuids
);
Collection
<
String
>
getTemplateBindingStaff
(
@Param
(
"filterTemplateTypeName"
)
String
filterTemplateTypeName
,
@Param
(
"staffUuids"
)
List
<
String
>
staffUuids
);
/**
* 指定日期最新的模版记录
* @author yangwei
* @since 2026/1/12 19:55
* @param templateCode 模板编号
* @param targetDates 指定日期,格式yyyy-MM-dd
* @return java.util.List<cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateStaffRef>
*/
List
<
TemplateStaffRefDTO
>
findLatestRecordsByDates
(
@Param
(
"templateCode"
)
String
templateCode
,
@Param
(
"targetDates"
)
List
<
String
>
targetDates
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/remote/DigitalManagementRecordRemoteImpl.java
View file @
1d8d5eb
...
@@ -4,18 +4,21 @@ import cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*;
...
@@ -4,18 +4,21 @@ import cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*;
import
cn.com.glsx.dj.mindworkplate.request.digitalmanagement.SubmittedDateRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.request.digitalmanagement.SubmittedDateRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementTemplateService
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementTemplateService
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.goodnewssave.ReportSaveFactory
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.goodnewssave.ReportSaveStrategy
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.hutool.core.bean.BeanUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.core.task.TaskExecutor
;
import
javax.annotation.Resource
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @Description 数字化管理-员工日报服务
* @Description 数字化管理-员工日报服务
...
@@ -36,6 +39,9 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
...
@@ -36,6 +39,9 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
@Autowired
@Autowired
private
TaskExecutor
taskExecutor
;
private
TaskExecutor
taskExecutor
;
@Resource
private
ReportSaveFactory
reportSaveFactory
;
@Override
@Override
public
RpcResponse
<
List
<
DigitalManagementTemplateDTO
>>
typeList
(
DigitalManagementTemplateDTO
dto
){
public
RpcResponse
<
List
<
DigitalManagementTemplateDTO
>>
typeList
(
DigitalManagementTemplateDTO
dto
){
try
{
try
{
...
@@ -49,7 +55,9 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
...
@@ -49,7 +55,9 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
@Override
@Override
public
RpcResponse
<
DigitalManagementTemplateSummaryDTO
>
recordSummary
(
DigitalManagementTemplateDTO
dto
){
public
RpcResponse
<
DigitalManagementTemplateSummaryDTO
>
recordSummary
(
DigitalManagementTemplateDTO
dto
){
try
{
try
{
return
RpcResponse
.
success
(
templateService
.
recordSummary
(
dto
));
// return RpcResponse.success(templateService.recordSummary(dto));
StaffGoodNewsStatisticsDTO
staffGoodNewsStatisticsDTO
=
BeanUtil
.
copyProperties
(
dto
,
StaffGoodNewsStatisticsDTO
.
class
);
return
RpcResponse
.
success
(
staffRecordService
.
statistics
(
staffGoodNewsStatisticsDTO
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
e
);
return
RpcResponse
.
error
(
e
);
...
@@ -160,9 +168,19 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
...
@@ -160,9 +168,19 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
@Override
@Override
public
RpcResponse
<
Integer
>
save
(
SaveStaffRecordRequestDTO
dto
)
{
public
RpcResponse
<
Integer
>
save
(
SaveStaffRecordRequestDTO
dto
)
{
try
{
try
{
Integer
recordId
=
staffRecordService
.
save
(
dto
);
// Map<String, String> form = dto.getForm();
taskExecutor
.
execute
(()
->
staffRecordService
.
sendQwRobotMessage
(
recordId
));
// if (MapUtil.isNotEmpty(form)) {
return
RpcResponse
.
success
(
recordId
);
// for (String key : form.keySet()) {
// String value = form.get(key);
// if (ObjectUtil.isNotNull(value)) {
// form.remove(key);
// form.put(key, ObjectUtil.toString(value));
// }
// }
// }
ReportSaveStrategy
strategy
=
reportSaveFactory
.
getStrategy
(
dto
.
getTemplateCode
());
return
RpcResponse
.
success
(
strategy
.
save
(
dto
));
}
catch
(
RpcServiceException
e
)
{
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
...
@@ -185,4 +203,57 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
...
@@ -185,4 +203,57 @@ public class DigitalManagementRecordRemoteImpl implements DigitalManagementRecor
}
}
}
}
/**
* 查询员工周报提交
* @author yangwei
* @since 2026/1/8 20:14
* @param request 请求对象
* @return cn.com.glsx.framework.core.beans.rpc.RpcResponse<java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffWeeklyReportRecordDTO>>
*/
@Override
public
RpcResponse
<
List
<
StaffWeeklyReportRecordDTO
>>
findStaffWeeklyReportSubmit
(
StaffWeeklyReportRecordWrapper
request
)
{
try
{
return
RpcResponse
.
success
(
staffRecordService
.
findStaffWeeklyReportSubmit
(
request
));
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"查询员工周报提交接口调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"查询员工周报提交接口调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
}
@Override
public
RpcResponse
<
List
<
StaffMonthlyReportRecordDTO
>>
findStaffMonthlyReportSubmit
(
StaffMonthlyReportRecordWrapper
request
)
{
try
{
return
RpcResponse
.
success
(
staffRecordService
.
findStaffMonthlyReportSubmit
(
request
));
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"查询员工月报提交接口调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"查询员工月报提交接口调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
}
/**
* 获取员工喜报模版
* @author yangwei
* @since 2026/1/9 10:24
* @param request 请求对象
* @return cn.com.glsx.framework.core.beans.rpc.RpcResponse<java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsTemplateRespDTO>>
*/
@Override
public
RpcResponse
<
List
<
StaffGoodNewsTemplateRespDTO
>>
findStaffGoodNewsTemplate
(
StaffGoodNewsTemplateReqDTO
request
)
{
try
{
return
RpcResponse
.
success
(
staffRecordService
.
findStaffGoodNewsTemplate
(
request
));
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"获取员工喜报模版接口调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"获取员工喜报模版接口调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
}
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/remote/PadMessageBoxRemoteImpl.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
remote
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
remote
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessageRespDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.PadMsgBoxBatchDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.*
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
import
cn.com.glsx.dj.mindworkplate.model.WarningNotification
;
import
cn.com.glsx.dj.mindworkplate.model.WarningNotification
;
...
@@ -16,7 +14,6 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
...
@@ -16,7 +14,6 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.apache.dubbo.rpc.RpcException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
import
java.util.List
;
...
@@ -269,5 +266,34 @@ public class PadMessageBoxRemoteImpl implements PadMessageBoxRemote {
...
@@ -269,5 +266,34 @@ public class PadMessageBoxRemoteImpl implements PadMessageBoxRemote {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"更新活动状态异常"
,
e
);
log
.
error
(
"更新活动状态异常"
,
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
}
}
}
}
@Override
public
RpcResponse
<
ActivityMessagePopUpWindowRespDTO
>
getActivityMsgPopUpWindow
(
ActivityMessagePopUpWindowDTO
request
)
{
try
{
ActivityMessagePopUpWindowRespDTO
activityMessagePopUpWindowRespDTO
=
padMessageBoxService
.
getActivityMsgPopUpWindow
(
request
);
return
RpcResponse
.
success
(
activityMessagePopUpWindowRespDTO
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"活动消息弹窗调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"活动消息弹窗调用异常!"
,
e
);
return
RpcResponse
.
error
(
e
);
}
}
@Override
public
RpcResponse
<
Boolean
>
updActivityPopUpWindowStatus
(
Integer
msgId
)
{
try
{
return
RpcResponse
.
success
(
padMessageBoxService
.
updActivityPopUpWindowStatus
(
msgId
));
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"更新活动弹窗异常"
,
e
);
return
RpcResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"更新活动弹窗异常"
,
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
}
}
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/ConversationBatchService.java
View file @
1d8d5eb
...
@@ -101,12 +101,21 @@ public class ConversationBatchService {
...
@@ -101,12 +101,21 @@ public class ConversationBatchService {
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
merchantRopResponses
))
{
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
merchantRopResponses
))
{
merchantDTO
.
setMerchantName
(
merchantRopResponses
.
get
(
0
).
getMerchantName
());
merchantDTO
.
setMerchantName
(
merchantRopResponses
.
get
(
0
).
getMerchantName
());
}
}
merchantDTO
.
setPhoneNumber
(
maskPhoneNumber
(
merchantDTO
.
getPhoneNumber
()));
}
}
}
}
}
}
return
res
;
return
res
;
}
}
public
static
String
maskPhoneNumber
(
String
phone
)
{
if
(
phone
==
null
||
phone
.
length
()
!=
11
)
{
return
phone
;
// 或抛出异常、返回空字符串等,根据业务需求处理
}
return
phone
.
substring
(
0
,
3
)
+
"****"
+
phone
.
substring
(
7
);
}
public
String
generateFileUrlShortLink
(
ReceptionDetailRequestDTO
request
){
public
String
generateFileUrlShortLink
(
ReceptionDetailRequestDTO
request
){
ConversationBatch
conversationBatch
=
conversationBatchMapper
.
findHisFlagByBatchId
(
ConversationBatch
conversationBatch
=
conversationBatchMapper
.
findHisFlagByBatchId
(
request
.
getBatchId
());
request
.
getBatchId
());
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/EmployeeBadgeService.java
View file @
1d8d5eb
...
@@ -299,10 +299,20 @@ public class EmployeeBadgeService {
...
@@ -299,10 +299,20 @@ public class EmployeeBadgeService {
long
a
=
duration
==
null
?
0
l
:
Long
.
parseLong
(
duration
)
/
1000
;
long
a
=
duration
==
null
?
0
l
:
Long
.
parseLong
(
duration
)
/
1000
;
dto
.
setDuration
(
String
.
valueOf
(
a
));
dto
.
setDuration
(
String
.
valueOf
(
a
));
dto
.
setDefencePoint
(
formatDefenceScore
(
dto
.
getDefencePoint
()));
dto
.
setDefencePoint
(
formatDefenceScore
(
dto
.
getDefencePoint
()));
// phoneNumber脱敏显示为 139****8888 格式
dto
.
setPhoneNumber
(
maskPhoneNumber
(
dto
.
getPhoneNumber
()));
}
}
return
page
;
return
page
;
}
}
public
static
String
maskPhoneNumber
(
String
phone
)
{
if
(
phone
==
null
||
phone
.
length
()
!=
11
)
{
return
phone
;
// 或抛出异常、返回空字符串等,根据业务需求处理
}
return
phone
.
substring
(
0
,
3
)
+
"****"
+
phone
.
substring
(
7
);
}
public
String
formatDefenceScore
(
String
defenceScore
)
{
public
String
formatDefenceScore
(
String
defenceScore
)
{
if
(
defenceScore
==
null
||
defenceScore
.
trim
().
isEmpty
())
{
if
(
defenceScore
==
null
||
defenceScore
.
trim
().
isEmpty
())
{
return
null
;
return
null
;
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementStaffRecordService.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.consts.CommonConstants
;
import
cn.com.glsx.dj.mindworkplate.consts.SymbolConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.
mapper.digitalmanagement.DigitalManagementStaffRecordItemMapper
;
import
cn.com.glsx.dj.mindworkplate.
enums.DistinctDimensionalityEnum
;
import
cn.com.glsx.dj.mindworkplate.
mapper.digitalmanagement.DigitalManagementStaffRecordMapper
;
import
cn.com.glsx.dj.mindworkplate.
enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.
mapper.digitalmanagement.DigitalManagementTemplateItemMapper
;
import
cn.com.glsx.dj.mindworkplate.
enums.MindWorkplateServiceErrorEnum
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.
DigitalManagementTemplateMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.
*
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.request.digitalmanagement.SubmittedDateRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.request.digitalmanagement.SubmittedDateRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.util.validation.BeanValidationUtils
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.StaffRecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.StaffRecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.enums.ActionReportTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.enums.ActionReportTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.enums.SceneTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.enums.SceneTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.remote.ReportPushRecordRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.ReportPushRecordRemote
;
import
cn.com.glsx.framework.core.beans.BaseModel
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
...
@@ -21,17 +25,22 @@ import cn.com.glsx.framework.core.util.RpcAssert;
...
@@ -21,17 +25,22 @@ import cn.com.glsx.framework.core.util.RpcAssert;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.scrm.equity.enums.DeleteFlagEnum
;
import
cn.com.glsx.scrm.equity.enums.DeleteFlagEnum
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.BooleanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
...
@@ -39,14 +48,16 @@ import org.springframework.http.HttpEntity;
...
@@ -39,14 +48,16 @@ import org.springframework.http.HttpEntity;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.client.RestClientException
;
import
org.springframework.web.client.RestClientException
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
constant
.
DigitalManagementConstants
.*;
import
static
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
constant
.
DigitalManagementConstants
.*;
...
@@ -84,6 +95,13 @@ public class DigitalManagementStaffRecordService {
...
@@ -84,6 +95,13 @@ public class DigitalManagementStaffRecordService {
@Autowired
@Autowired
private
ReportPushRecordRemote
reportPushRecordRemote
;
private
ReportPushRecordRemote
reportPushRecordRemote
;
@Resource
private
StaffRecordSpecialHandler
staffRecordSpecialHandler
;
@Resource
private
DigitalManagementTemplateStaffRefMapper
templateStaffRefMapper
;
public
Page
<
DigitalManagementStaffRecordDTO
>
recordPage
(
RpcPagination
<
DigitalManagementStaffRecordDTO
>
pagination
)
{
public
Page
<
DigitalManagementStaffRecordDTO
>
recordPage
(
RpcPagination
<
DigitalManagementStaffRecordDTO
>
pagination
)
{
DigitalManagementStaffRecordDTO
condition
=
pagination
.
getCondition
();
DigitalManagementStaffRecordDTO
condition
=
pagination
.
getCondition
();
// 先查询模板快照,拿到 templateCode
// 先查询模板快照,拿到 templateCode
...
@@ -173,7 +191,8 @@ public class DigitalManagementStaffRecordService {
...
@@ -173,7 +191,8 @@ public class DigitalManagementStaffRecordService {
return
sequenceIdPage
;
return
sequenceIdPage
;
}
}
public
List
<
DigitalManagementStaffRecordSummaryDTO
>
staffRecordSummary
(
DigitalManagementStaffRecordDTO
dto
)
{
@Deprecated
public
List
<
DigitalManagementStaffRecordSummaryDTO
>
staffRecordSummary1
(
DigitalManagementStaffRecordDTO
dto
)
{
// 查询未提交员工
// 查询未提交员工
Collection
<
DigitalManagementStaffInfoDTO
>
staffInfos
=
getUnsubmittedStaffInfo
(
dto
);
Collection
<
DigitalManagementStaffInfoDTO
>
staffInfos
=
getUnsubmittedStaffInfo
(
dto
);
// 今日未提交员工为空,则返回
// 今日未提交员工为空,则返回
...
@@ -203,6 +222,73 @@ public class DigitalManagementStaffRecordService {
...
@@ -203,6 +222,73 @@ public class DigitalManagementStaffRecordService {
return
res
;
return
res
;
}
}
/**
* 员工未提交统计
* @author yangwei
* @since 2026/1/13 21:51
* @param dto 请求参数
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementStaffRecordSummaryDTO>
*/
public
List
<
DigitalManagementStaffRecordSummaryDTO
>
staffRecordSummary
(
DigitalManagementStaffRecordDTO
dto
)
{
StaffGoodNewsStatisticsDTO
staffGoodNewsStatisticsDTO
=
BeanUtil
.
copyProperties
(
dto
,
StaffGoodNewsStatisticsDTO
.
class
);
staffGoodNewsStatisticsDTO
.
setCode
(
dto
.
getTemplateCode
());
// 统计获取未提交人员列表
DigitalManagementTemplateSummaryDTO
statistics
=
this
.
statistics
(
staffGoodNewsStatisticsDTO
);
List
<
DigitalManagementStaffRecordSummaryDTO
>
result
=
Lists
.
newArrayList
();
Map
<
String
,
String
>
unSubmittedStaffUuidMapName
=
statistics
.
getUnSubmittedStaffUuidMapName
();
if
(
MapUtil
.
isEmpty
(
unSubmittedStaffUuidMapName
))
{
return
result
;
}
LocalDate
currentSystemLocalDate
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
// 本月提交数
MonthRange
monthRange
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
getMonthRange
(
currentSystemLocalDate
);
List
<
SubmitCountDTO
>
currentMonthSubmitCountAssignRange
=
staffRecordMapper
.
selectSubmitCountAssignRange
(
unSubmittedStaffUuidMapName
.
keySet
(),
dto
.
getTemplateCode
(),
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
monthRange
.
getStartDate
(),
DateUtils
.
DEFAULT_DATE_FORMAT5
),
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
monthRange
.
getEndDate
(),
DateUtils
.
DEFAULT_DATE_FORMAT5
));
Map
<
String
,
SubmitCountDTO
>
uuidMapCurrentMonthSubmitCount
=
currentMonthSubmitCountAssignRange
.
stream
()
.
collect
(
Collectors
.
toMap
(
SubmitCountDTO:
:
getUuid
,
Function
.
identity
(),
(
p
,
q
)
->
p
));
// 本周提交数
WeekRange
weekRange
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
getWeekRange
(
currentSystemLocalDate
);
List
<
SubmitCountDTO
>
currentWeekSubmitCountAssignRange
=
staffRecordMapper
.
selectSubmitCountAssignRange
(
unSubmittedStaffUuidMapName
.
keySet
(),
dto
.
getTemplateCode
(),
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
weekRange
.
getStartDate
(),
DateUtils
.
DEFAULT_DATE_FORMAT5
),
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
weekRange
.
getEndDate
(),
DateUtils
.
DEFAULT_DATE_FORMAT5
));
Map
<
String
,
SubmitCountDTO
>
uuidMapCurrentWeekSubmitCount
=
currentWeekSubmitCountAssignRange
.
stream
()
.
collect
(
Collectors
.
toMap
(
SubmitCountDTO:
:
getUuid
,
Function
.
identity
(),
(
p
,
q
)
->
p
));
// 最近提交时间
List
<
SubmitCountDTO
>
recentlySubmitDates
=
staffRecordMapper
.
selectRecentlySubmitDate
(
unSubmittedStaffUuidMapName
.
keySet
(),
dto
.
getTemplateCode
());
Map
<
String
,
SubmitCountDTO
>
uuidMapRecentlySubmitDate
=
recentlySubmitDates
.
stream
()
.
collect
(
Collectors
.
toMap
(
SubmitCountDTO:
:
getUuid
,
Function
.
identity
(),
(
p
,
q
)
->
p
));
List
<
DigitalManagementStaffRecordSummaryDTO
>
collect
=
unSubmittedStaffUuidMapName
.
entrySet
()
.
stream
()
.
map
(
entry
->
{
Integer
currMonthSubmitCount
=
Optional
.
ofNullable
(
uuidMapCurrentMonthSubmitCount
.
get
(
entry
.
getKey
()))
.
map
(
SubmitCountDTO:
:
getSubmitCount
)
.
orElse
(
0
);
Integer
currWeeklySubmitCount
=
Optional
.
ofNullable
(
uuidMapCurrentWeekSubmitCount
.
get
(
entry
.
getKey
()))
.
map
(
SubmitCountDTO:
:
getSubmitCount
)
.
orElse
(
0
);
Date
recentlySubmitDate
=
Optional
.
ofNullable
(
uuidMapRecentlySubmitDate
.
get
(
entry
.
getKey
()))
.
map
(
SubmitCountDTO:
:
getRecentlySubmitDate
)
.
orElse
(
null
);
return
new
DigitalManagementStaffRecordSummaryDTO
(
entry
.
getKey
(),
entry
.
getValue
(),
recentlySubmitDate
,
currWeeklySubmitCount
,
currMonthSubmitCount
);
})
.
collect
(
Collectors
.
toList
());
result
.
addAll
(
collect
);
return
result
;
}
/**
/**
* 查询未提交员工
* 查询未提交员工
*/
*/
...
@@ -340,8 +426,8 @@ public class DigitalManagementStaffRecordService {
...
@@ -340,8 +426,8 @@ public class DigitalManagementStaffRecordService {
return
convertTemplateToRecord
(
template
,
record
);
return
convertTemplateToRecord
(
template
,
record
);
}
}
@GlsxDistributeLockable
(
name
=
"'DigitalManagementStaffRecordService_save_' + #uuid"
,
time
=
30
,
timeoutException
=
RpcServiceException
.
class
)
//
@GlsxDistributeLockable(name = "'DigitalManagementStaffRecordService_save_' + #uuid", time = 30, timeoutException = RpcServiceException.class)
@Transactional
//
@Transactional
public
Integer
save
(
SaveStaffRecordRequestDTO
dto
)
{
public
Integer
save
(
SaveStaffRecordRequestDTO
dto
)
{
Map
<
String
,
String
>
form
=
dto
.
getForm
();
Map
<
String
,
String
>
form
=
dto
.
getForm
();
Integer
loginRole
=
dto
.
getLoginRole
();
Integer
loginRole
=
dto
.
getLoginRole
();
...
@@ -351,8 +437,8 @@ public class DigitalManagementStaffRecordService {
...
@@ -351,8 +437,8 @@ public class DigitalManagementStaffRecordService {
templateCode
=
templateService
.
getDefaultTemplateCode
();
templateCode
=
templateService
.
getDefaultTemplateCode
();
}
}
Date
reportDate
=
DateUtils
.
parseDate
(
form
.
get
(
RECORD_ITEM_KEY_REPORT_DATE
)
);
Date
reportDate
=
Optional
.
ofNullable
(
form
.
get
(
RECORD_ITEM_KEY_REPORT_DATE
)).
map
(
DateUtils:
:
parseDate
).
orElse
(
null
);
Date
today
=
reportDate
==
null
?
new
Date
()
:
reportDate
;
Date
today
=
reportDate
==
null
?
staffRecordSpecialHandler
.
getCurrentSystem
Date
()
:
reportDate
;
// 查圈人模板
// 查圈人模板
DigitalManagementTemplate
template
=
templateService
.
getTemplateByStaffUuid
(
loginRole
,
uuid
,
today
,
templateCode
);
DigitalManagementTemplate
template
=
templateService
.
getTemplateByStaffUuid
(
loginRole
,
uuid
,
today
,
templateCode
);
...
@@ -423,9 +509,11 @@ public class DigitalManagementStaffRecordService {
...
@@ -423,9 +509,11 @@ public class DigitalManagementStaffRecordService {
recordItems
.
forEach
(
item
->
item
.
setRecordId
(
staffRecordId
));
recordItems
.
forEach
(
item
->
item
.
setRecordId
(
staffRecordId
));
staffRecordItemMapper
.
insertList
(
recordItems
);
staffRecordItemMapper
.
insertList
(
recordItems
);
dto
.
setSave
(
true
);
}
else
{
}
else
{
staffRecordMapper
.
updateByPrimaryKey
(
staffRecord
);
staffRecordMapper
.
updateByPrimaryKey
(
staffRecord
);
recordItems
.
forEach
(
item
->
staffRecordItemMapper
.
updateByPrimaryKey
(
item
));
recordItems
.
forEach
(
item
->
staffRecordItemMapper
.
updateByPrimaryKey
(
item
));
dto
.
setSave
(
false
);
}
}
return
staffRecord
.
getId
();
return
staffRecord
.
getId
();
}
}
...
@@ -661,11 +749,16 @@ public class DigitalManagementStaffRecordService {
...
@@ -661,11 +749,16 @@ public class DigitalManagementStaffRecordService {
StringBuilder
contentBuilder
=
new
StringBuilder
();
StringBuilder
contentBuilder
=
new
StringBuilder
();
DigitalManagementTemplateDTO
templateDTO
=
recordDTO
.
getTemplateDTO
();
DigitalManagementTemplateDTO
templateDTO
=
recordDTO
.
getTemplateDTO
();
String
templateTypeName
=
templateDTO
.
getTypeName
();
String
templateTypeName
=
templateDTO
.
getTypeName
();
contentBuilder
.
append
(
templateTypeName
).
append
(
"("
).
append
(
userName
).
append
(
" "
).
append
(
DateUtils
.
formatDate
(
recordDTO
.
getCreatedDate
(),
"yyyy/MM/dd"
)).
append
(
"): "
).
append
(
"\n"
);
contentBuilder
.
append
(
templateTypeName
).
append
(
"("
).
append
(
userName
).
append
(
" "
).
append
(
DateUtils
.
formatDate
(
recordDTO
.
getCreatedDate
(),
"yyyy/MM/dd"
)).
append
(
")"
);
// 修改时间不为空且不为创建时间,默认本次是修改
if
(!
BooleanUtil
.
isTrue
(
recordDTO
.
getSave
()))
{
contentBuilder
.
append
(
CommonConstants
.
CHINESE_CHANGED
);
}
contentBuilder
.
append
(
":\n"
);
AtomicBoolean
dayOffStatus
=
new
AtomicBoolean
(
false
);
AtomicBoolean
dayOffStatus
=
new
AtomicBoolean
(
false
);
// 是否属于包含“当日休假”的模板,需要将字段上提
// 是否属于包含“当日休假”的模板,需要将字段上提
boolean
isRegionalTemplate
=
isDayOffStatusTemplate
(
recordDTO
.
getTemplateCode
())
;
boolean
isRegionalTemplate
=
Boolean
.
TRUE
/*isDayOffStatusTemplate(recordDTO.getTemplateCode())*/
;
if
(
isRegionalTemplate
)
{
if
(
isRegionalTemplate
)
{
for
(
DigitalManagementStaffRecordItemDTO
types
:
recordDTO
.
getTypes
())
{
for
(
DigitalManagementStaffRecordItemDTO
types
:
recordDTO
.
getTypes
())
{
if
(
CollectionUtils
.
isEmpty
(
types
.
getItems
()))
{
if
(
CollectionUtils
.
isEmpty
(
types
.
getItems
()))
{
...
@@ -834,4 +927,407 @@ public class DigitalManagementStaffRecordService {
...
@@ -834,4 +927,407 @@ public class DigitalManagementStaffRecordService {
staffRecordMapper
.
selectStaffInfo
(
req
.
getCondition
());
staffRecordMapper
.
selectStaffInfo
(
req
.
getCondition
());
return
res
;
return
res
;
}
}
/**
* 查询员工周报提交记录
* @author yangwei
* @since 2026/1/8 20:15
* @param request 请求对象
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffWeeklyReportRecordDTO>
*/
public
List
<
StaffWeeklyReportRecordDTO
>
findStaffWeeklyReportSubmit
(
StaffWeeklyReportRecordWrapper
request
)
{
BeanValidationUtils
.
validateAndThrow
(
request
);
List
<
WeeklyReportRecordReqDTO
>
weeklyReportRecordReqList
=
request
.
getWeeklyReportRecordReqList
();
// 查询员工周报提交记录
List
<
String
>
dates
=
weeklyReportRecordReqList
.
stream
()
.
map
(
WeeklyReportRecordReqDTO:
:
getEndDateStr
).
collect
(
Collectors
.
toList
());
List
<
StaffRecordDTO
>
staffRecords
=
staffRecordMapper
.
findReportByUuidAndDate
(
request
.
getUuid
(),
request
.
getCode
(),
dates
);
List
<
String
>
submitDate
=
staffRecords
.
stream
().
map
(
StaffRecordDTO:
:
getSubmitDate
).
collect
(
Collectors
.
toList
());
// 构建返回结果
LocalDate
now
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
return
weeklyReportRecordReqList
.
stream
()
.
map
(
el
->
{
StaffWeeklyReportRecordDTO
staffWeeklyReportRecordDTO
=
new
StaffWeeklyReportRecordDTO
();
staffWeeklyReportRecordDTO
.
setWeekCode
(
el
.
getWeekCode
());
staffWeeklyReportRecordDTO
.
setHasSubmit
(
submitDate
.
contains
(
el
.
getEndDateStr
()));
// 如果当前日期是所在周的周日且不是本月最后一天,便可以提交
LocalDate
endDate
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
parseDate
(
el
.
getEndDateStr
(),
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
PATTERN_YYYYMMDD
);
staffWeeklyReportRecordDTO
.
setBeAbleSubmit
(
now
.
isEqual
(
endDate
)
&&
!
onlySubmitMonthReport
(
endDate
,
request
.
getUuid
()));
return
staffWeeklyReportRecordDTO
;
})
.
collect
(
Collectors
.
toList
());
}
/**
* 判断当前日期是否为该员工需要提交的月报日期,如果需要提交月报,则无需提交本次周报
* @author yangwei
* @since 2026/1/8 20:15
* @param now 当前日期
* @param uuid 员工uuid
* @return boolean
*/
public
boolean
onlySubmitMonthReport
(
LocalDate
now
,
String
uuid
)
{
String
date
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
now
,
DateUtils
.
DEFAULT_DATE_FORMAT
);
Map
<
String
,
List
<
String
>>
dateMapUuidList
=
MapUtil
.<
String
,
List
<
String
>>
builder
().
put
(
date
,
Lists
.
newArrayList
(
uuid
)).
build
();
weeklyNeedSummitHandler
(
dateMapUuidList
);
// 如果为空,说明被剔除了,则只需要提交月报的即可
return
!
Optional
.
ofNullable
(
dateMapUuidList
.
get
(
date
))
.
map
(
CollUtil:
:
isNotEmpty
)
.
orElse
(
false
);
}
/**
* 获取员工月报提交记录
* @author yangwei
* @since 2026/1/8 20:15
* @param request 获取员工月报提交记录请求对象
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffMonthlyReportRecordDTO>
*/
public
List
<
StaffMonthlyReportRecordDTO
>
findStaffMonthlyReportSubmit
(
StaffMonthlyReportRecordWrapper
request
)
{
BeanValidationUtils
.
validateAndThrow
(
request
);
List
<
MonthlyReportRecordReqDTO
>
monthlyReportRecordReqList
=
request
.
getMonthlyReportRecordReqList
();
List
<
String
>
dates
=
monthlyReportRecordReqList
.
stream
()
.
map
(
el
->
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
el
.
getEndDate
(),
DateUtils
.
DEFAULT_DATE_FORMAT5
))
.
collect
(
Collectors
.
toList
());
List
<
StaffRecordDTO
>
staffRecords
=
staffRecordMapper
.
findReportByUuidAndDate
(
request
.
getUuid
(),
request
.
getCode
(),
dates
);
List
<
String
>
submitDate
=
staffRecords
.
stream
()
.
filter
(
el
->
StrUtil
.
isNotBlank
(
el
.
getSubmitDate
())
&&
el
.
getSubmitDate
().
length
()
>=
8
)
.
map
((
el
->
el
.
getSubmitDate
().
substring
(
0
,
8
))).
collect
(
Collectors
.
toList
());
LocalDate
now
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
return
monthlyReportRecordReqList
.
stream
()
.
map
(
el
->
StaffMonthlyReportRecordDTO
.
builder
()
.
year
(
el
.
getYear
())
.
month
(
el
.
getMonth
())
.
hasSubmit
(
submitDate
.
contains
(
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
el
.
getEndDate
(),
DateUtils
.
DEFAULT_DATE_FORMAT5
)))
// 如果是当前月的最后一天,便可以提交
.
beAbleSubmit
(
now
.
isEqual
(
el
.
getEndDate
()))
.
build
())
.
collect
(
Collectors
.
toList
());
}
/**
* 获取员工喜报模版
* @author yangwei
* @since 2026/1/9 10:54
* @param request 请求参数
* @return java.util.List<cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsTemplateRespDTO>
*/
public
List
<
StaffGoodNewsTemplateRespDTO
>
findStaffGoodNewsTemplate
(
StaffGoodNewsTemplateReqDTO
request
)
{
BeanValidationUtils
.
validateAndThrow
(
request
);
// 最新生效的模版
return
staffRecordMapper
.
findStaffGoodNewsTemplate
(
request
);
}
/**
* 指定日期区间统计,统计应填,实填,未填...
* @author yangwei
* @since 2026/1/12 18:16
* @param request 请求对象
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateSummaryDTO 统计结果
*/
public
DigitalManagementTemplateSummaryDTO
statistics
(
StaffGoodNewsStatisticsDTO
request
)
{
BeanValidationUtils
.
validateAndThrow
(
request
);
Example
example
=
new
Example
(
DigitalManagementTemplate
.
class
);
example
.
createCriteria
()
.
andEqualTo
(
"deletedFlag"
,
BaseModel
.
DeletedFlagEnum
.
N
.
name
())
.
andEqualTo
(
"code"
,
request
.
getCode
());
DigitalManagementTemplate
template
=
templateMapper
.
selectOneByExample
(
example
);
Integer
templateCode
=
Optional
.
ofNullable
(
template
)
.
map
(
DigitalManagementTemplate:
:
getReportType
)
.
orElseThrow
(()
->
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"模板不存在或未配置模版类型!"
));
GoodNewsTemplateReportTypeEnum
reportType
=
GoodNewsTemplateReportTypeEnum
.
getReportType
(
Integer
.
toString
(
templateCode
));
template
.
setName
(
template
.
getName
());
switch
(
reportType
)
{
case
DAY:
return
dailyRecordSummary
(
request
);
case
WEEK:
return
weeklyRecordSummary
(
request
);
case
MONTH:
return
monthlyRecordSummary
(
request
);
default
:
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"不支持的模板类型"
);
}
}
/**
* 日报统计
* @author yangwei
* @since 2026/1/13 0:40
* @param request 请求参数
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateSummaryDTO
*/
public
DigitalManagementTemplateSummaryDTO
dailyRecordSummary
(
StaffGoodNewsStatisticsDTO
request
)
{
List
<
String
>
dayRangeList
=
cn
.
com
.
glsx
.
dj
.
smartcarlife
.
util
.
DateUtils
.
getDateRangeList
(
DateUtil
.
format
(
request
.
getStartTime
(),
DateUtils
.
DEFAULT_DATE_FORMAT
),
DateUtil
.
format
(
request
.
getEndTime
(),
DateUtils
.
DEFAULT_DATE_FORMAT
));
if
(
CollUtil
.
isEmpty
(
dayRangeList
))
{
return
new
DigitalManagementTemplateSummaryDTO
();
}
return
statisticsAssignDateDistinct
(
request
,
dayRangeList
,
DistinctDimensionalityEnum
.
UUID
,
GoodNewsTemplateReportTypeEnum
.
DAY
);
}
/**
* 月报统计
* @author yangwei
* @since 2026/1/13 0:27
* @param request 统计参数
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateSummaryDTO
*/
public
DigitalManagementTemplateSummaryDTO
monthlyRecordSummary
(
StaffGoodNewsStatisticsDTO
request
)
{
List
<
String
>
monthEndsInRange
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
getMonthEndsInRange
(
DateUtil
.
format
(
request
.
getStartTime
(),
DateUtils
.
DEFAULT_DATE_FORMAT
),
DateUtil
.
format
(
request
.
getEndTime
(),
DateUtils
.
DEFAULT_DATE_FORMAT
));
if
(
CollUtil
.
isEmpty
(
monthEndsInRange
))
{
return
new
DigitalManagementTemplateSummaryDTO
();
}
return
statisticsAssignDateDistinct
(
request
,
monthEndsInRange
,
DistinctDimensionalityEnum
.
UUID
,
GoodNewsTemplateReportTypeEnum
.
MONTH
);
}
/**
* 周报统计
* @author yangwei
* @since 2026/1/13 0:27
* @param request 请求参数
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateSummaryDTO
*/
public
DigitalManagementTemplateSummaryDTO
weeklyRecordSummary
(
StaffGoodNewsStatisticsDTO
request
)
{
List
<
String
>
sundaysInRange
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
getSundaysInRange
(
DateUtil
.
format
(
request
.
getStartTime
(),
DateUtils
.
DEFAULT_DATE_FORMAT
),
DateUtil
.
format
(
request
.
getEndTime
(),
DateUtils
.
DEFAULT_DATE_FORMAT
));
if
(
CollUtil
.
isEmpty
(
sundaysInRange
))
{
return
new
DigitalManagementTemplateSummaryDTO
();
}
return
statisticsAssignDateDistinct
(
request
,
sundaysInRange
,
DistinctDimensionalityEnum
.
UUID
,
GoodNewsTemplateReportTypeEnum
.
WEEK
);
}
/**
* 指定提交日期去重统计
* @author yangwei
* @since 2026/1/13 0:17
* @param request 请求参数
* @param submitDate 提交日期,格式yyyy-MM-dd,日报随便传入日期列表,周报传入周日,月报传入当月最后一天,如果没有按照如此传入,周报数据统计异常
* @param distinct 去重维度,可以按照uuid或者手机号
* @param reportType 报告类型,周报需要特殊处理,排除掉与月报重复的提交
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateSummaryDTO
*/
public
DigitalManagementTemplateSummaryDTO
statisticsAssignDateDistinct
(
StaffGoodNewsStatisticsDTO
request
,
List
<
String
>
submitDate
,
DistinctDimensionalityEnum
distinct
,
GoodNewsTemplateReportTypeEnum
reportType
)
{
// 查找需要统计的人员
List
<
TemplateStaffRefDTO
>
latestRecordsByDates
=
templateStaffRefMapper
.
findLatestRecordsByDates
(
request
.
getCode
(),
submitDate
);
DigitalManagementTemplateSummaryDTO
totalSummary
=
new
DigitalManagementTemplateSummaryDTO
();
// 按目标日期分组,并将每个分组中的staffUuidListStr按逗号分割后合并为列表
Map
<
String
,
List
<
String
>>
groupedStaffUuids
=
latestRecordsByDates
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
TemplateStaffRefDTO:
:
getTargetDate
,
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
list
->
list
.
stream
()
.
flatMap
(
ref
->
StrUtil
.
split
(
ref
.
getStaffUuidListStr
(),
SymbolConstants
.
COMMA
).
stream
())
.
collect
(
Collectors
.
toList
())
)
));
// 周报需要特殊处理,排除掉与月报重复的提交
if
(
reportType
==
GoodNewsTemplateReportTypeEnum
.
WEEK
)
{
weeklyNeedSummitHandler
(
groupedStaffUuids
);
}
// 根据分组结果调用远程服务获取员工信息
List
<
String
>
uuidList
=
groupedStaffUuids
.
values
().
stream
().
flatMap
(
List:
:
stream
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
CollUtil
.
isEmpty
(
uuidList
))
{
return
totalSummary
;
}
RpcResponse
<
List
<
MerchantStaffResponse
>>
findStaffUuidResp
=
merchantStaffRemote
.
selectStaffListByStaffUUID
(
uuidList
);
if
(
findStaffUuidResp
.
isFailed
())
{
throw
new
RpcServiceException
(
findStaffUuidResp
.
getError
());
}
Map
<
String
,
MerchantStaffResponse
>
uuidMapInfo
=
Optional
.
ofNullable
(
findStaffUuidResp
.
getResult
()).
orElse
(
Collections
.
emptyList
())
.
stream
().
collect
(
Collectors
.
toMap
(
MerchantStaffResponse:
:
getUuid
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
// 每个周期填写的人
String
dateCondition
=
"DATE(created_date) IN ("
+
submitDate
.
stream
()
.
map
(
date
->
SymbolConstants
.
SINGLE_QUOTE
+
date
+
SymbolConstants
.
SINGLE_QUOTE
)
.
collect
(
Collectors
.
joining
(
SymbolConstants
.
COMMA
))
+
")"
;
Example
example
=
new
Example
(
DigitalManagementStaffRecord
.
class
);
example
.
orderBy
(
"createdDate"
).
desc
();
example
.
createCriteria
()
.
andEqualTo
(
"deletedFlag"
,
BaseModel
.
DeletedFlagEnum
.
N
.
name
())
.
andEqualTo
(
"templateCode"
,
request
.
getCode
())
.
andCondition
(
dateCondition
);
List
<
DigitalManagementStaffRecord
>
staffRecords
=
staffRecordMapper
.
selectByExample
(
example
);
Map
<
String
,
List
<
String
>>
submitDateMapUuidList
=
staffRecords
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
el
->
DateUtils
.
formatDate
(
el
.
getCreatedDate
(),
DateUtils
.
DEFAULT_DATE_FORMAT
),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
list
->
list
.
stream
()
.
map
(
DigitalManagementStaffRecord:
:
getStaffUuid
)
.
collect
(
Collectors
.
toList
())
)
));
// 计算单个周期
for
(
String
date
:
submitDate
)
{
List
<
String
>
needSubmitStaffUuids
=
groupedStaffUuids
.
get
(
date
);
List
<
String
>
submittedDateMapUuid
=
submitDateMapUuidList
.
get
(
date
);
DigitalManagementTemplateSummaryDTO
singleSummary
=
statisticsSingleCycle
(
request
,
submittedDateMapUuid
,
needSubmitStaffUuids
,
uuidMapInfo
,
distinct
);
totalSummary
.
setTotalCount
(
singleSummary
.
getTotalCount
()
+
totalSummary
.
getTotalCount
());
totalSummary
.
setFinishCount
(
singleSummary
.
getFinishCount
()
+
totalSummary
.
getFinishCount
());
totalSummary
.
setUndoCount
(
singleSummary
.
getUndoCount
()
+
totalSummary
.
getUndoCount
());
totalSummary
.
getUnSubmittedStaffNames
().
addAll
(
singleSummary
.
getUnSubmittedStaffNames
());
totalSummary
.
getUnSubmittedStaffUuidMapName
().
putAll
(
singleSummary
.
getUnSubmittedStaffUuidMapName
());
}
totalSummary
.
setUnSubmittedStaffNamesStr
(
StrUtil
.
join
(
SymbolConstants
.
COMMA
,
totalSummary
.
getUnSubmittedStaffNames
()));
return
totalSummary
;
}
/**
* 周报需要提交的人员需要特殊处理,如果提交日期刚好是月最后一天,且这个人配置了月报模版,则无需填写
* function: 剔除月底无需填写的人员
* @author yangwei
* @since 2026/1/12 20:34
* @param groupedStaffUuids 周报需要提交的人员
*/
public
void
weeklyNeedSummitHandler
(
Map
<
String
,
List
<
String
>>
groupedStaffUuids
)
{
// 查找月报模版
Example
example
=
new
Example
(
DigitalManagementTemplate
.
class
);
example
.
createCriteria
()
.
andEqualTo
(
"deletedFlag"
,
BaseModel
.
DeletedFlagEnum
.
N
.
name
())
.
andEqualTo
(
"reportType"
,
GoodNewsTemplateReportTypeEnum
.
MONTH
.
getCode
());
List
<
DigitalManagementTemplate
>
monthTemplates
=
templateMapper
.
selectByExample
(
example
);
if
(
CollUtil
.
isEmpty
(
monthTemplates
))
{
return
;
}
// 筛选出指定的日期刚好是每个月最后一天的日期
List
<
String
>
dates
=
groupedStaffUuids
.
keySet
().
stream
().
filter
(
date
->
{
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
);
}).
collect
(
Collectors
.
toList
());
if
(
CollUtil
.
isEmpty
(
dates
))
{
return
;
}
// 拿到每个日期月报填写的人
Map
<
String
,
Set
<
String
>>
assignDateMonthlyReportUuids
=
monthTemplates
.
parallelStream
()
.
flatMap
(
template
->
Optional
.
ofNullable
(
templateStaffRefMapper
.
findLatestRecordsByDates
(
template
.
getCode
(),
dates
))
.
orElseGet
(
Lists:
:
newArrayList
)
.
stream
())
.
collect
(
Collectors
.
groupingBy
(
TemplateStaffRefDTO:
:
getTargetDate
,
Collectors
.
collectingAndThen
(
Collectors
.
toSet
(),
sets
->
sets
.
stream
()
.
flatMap
(
ref
->
StrUtil
.
split
(
ref
.
getStaffUuidListStr
(),
SymbolConstants
.
COMMA
).
stream
())
.
collect
(
Collectors
.
toSet
())
)));
// 周报剔除掉月报填写的人,即月报和周报重复了则无需填写周报
groupedStaffUuids
.
forEach
((
date
,
uuids
)
->
uuids
.
removeAll
(
assignDateMonthlyReportUuids
.
getOrDefault
(
date
,
Collections
.
emptySet
())));
}
/**
* 统计单一周期汇报情况
* @author yangwei
* @since 2026/1/12 20:34
* @param request 请求对象
* @param submittedDateUuid 已提交的uuid
* @param needSubmitStaffUuids 需要提交的人员
* @param uuidMapInfo uuid 映射员工的信息
* @param distinct 去重维度
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateSummaryDTO
*/
public
DigitalManagementTemplateSummaryDTO
statisticsSingleCycle
(
StaffGoodNewsStatisticsDTO
request
,
List
<
String
>
submittedDateUuid
,
List
<
String
>
needSubmitStaffUuids
,
Map
<
String
,
MerchantStaffResponse
>
uuidMapInfo
,
DistinctDimensionalityEnum
distinct
)
{
DigitalManagementTemplateSummaryDTO
statistics
=
new
DigitalManagementTemplateSummaryDTO
();
statistics
.
setCode
(
request
.
getCode
());
statistics
.
setName
(
request
.
getName
());
submittedDateUuid
=
Optional
.
ofNullable
(
submittedDateUuid
).
filter
(
CollUtil:
:
isNotEmpty
).
orElseGet
(
ArrayList:
:
new
);
needSubmitStaffUuids
=
Optional
.
ofNullable
(
needSubmitStaffUuids
).
filter
(
CollUtil:
:
isNotEmpty
).
orElseGet
(
ArrayList:
:
new
);
// 如果带人员筛选,找出需要提交的人员
List
<
String
>
filterUuidList
=
request
.
getStaffUuidList
();
if
(
CollUtil
.
isNotEmpty
(
filterUuidList
))
{
needSubmitStaffUuids
=
needSubmitStaffUuids
.
stream
().
filter
(
filterUuidList:
:
contains
).
collect
(
Collectors
.
toList
());
if
(
CollUtil
.
isEmpty
(
needSubmitStaffUuids
))
{
return
statistics
;
}
}
Map
<
String
,
String
>
allMapStaffName
=
MapUtil
.<
String
,
String
>
builder
().
build
();
// 未提交的
Map
<
String
,
String
>
unSubmittedStaffUuidMapName
=
MapUtil
.<
String
,
String
>
builder
().
build
();
Set
<
String
>
submitted
=
Sets
.
newHashSet
();
List
<
String
>
finalSubmittedDateUuid
=
submittedDateUuid
;
if
(
distinct
==
DistinctDimensionalityEnum
.
PHONE
)
{
// 按照手机号维度统计
needSubmitStaffUuids
.
forEach
(
uuid
->
{
MerchantStaffResponse
merchantStaffResponse
=
Optional
.
ofNullable
(
uuidMapInfo
.
get
(
uuid
)).
orElseGet
(
MerchantStaffResponse:
:
new
);
String
staffPhone
=
merchantStaffResponse
.
getStaffPhone
();
allMapStaffName
.
putIfAbsent
(
staffPhone
,
merchantStaffResponse
.
getStaffName
());
if
(
finalSubmittedDateUuid
.
contains
(
uuid
))
{
submitted
.
add
(
staffPhone
);
}
else
{
unSubmittedStaffUuidMapName
.
put
(
uuid
,
merchantStaffResponse
.
getStaffName
());
}
});
}
else
{
// uuid 维度去重
needSubmitStaffUuids
.
forEach
(
uuid
->
{
MerchantStaffResponse
merchantStaffResponse
=
Optional
.
ofNullable
(
uuidMapInfo
.
get
(
uuid
)).
orElseGet
(
MerchantStaffResponse:
:
new
);
allMapStaffName
.
putIfAbsent
(
uuid
,
merchantStaffResponse
.
getStaffName
());
if
(
finalSubmittedDateUuid
.
contains
(
uuid
))
{
submitted
.
add
(
uuid
);
}
else
{
unSubmittedStaffUuidMapName
.
put
(
uuid
,
merchantStaffResponse
.
getStaffName
());
}
});
}
statistics
.
setTotalCount
(
Integer
.
toUnsignedLong
(
allMapStaffName
.
size
()));
statistics
.
setFinishCount
(
Integer
.
toUnsignedLong
(
submitted
.
size
()));
statistics
.
setUndoCount
(
statistics
.
getTotalCount
()
-
statistics
.
getFinishCount
());
List
<
Map
.
Entry
<
String
,
String
>>
entries
=
allMapStaffName
.
entrySet
()
.
stream
()
.
filter
(
entry
->
!
submitted
.
contains
(
entry
.
getKey
()))
.
collect
(
Collectors
.
toList
());
statistics
.
setUnSubmittedStaffNames
(
entries
.
stream
()
.
map
(
Map
.
Entry
::
getValue
)
.
collect
(
Collectors
.
toList
()));
statistics
.
getUnSubmittedStaffUuidMapName
().
putAll
(
unSubmittedStaffUuidMapName
);
return
statistics
;
}
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementTemplateService.java
View file @
1d8d5eb
...
@@ -4,6 +4,7 @@ import cn.com.glsx.dj.businessschool.remote.TeachTaskRecordRemote;
...
@@ -4,6 +4,7 @@ import cn.com.glsx.dj.businessschool.remote.TeachTaskRecordRemote;
import
cn.com.glsx.dj.mindworkplate.constant.DigitalManagementConstants
;
import
cn.com.glsx.dj.mindworkplate.constant.DigitalManagementConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.enums.DigitalManagementErrorEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.DigitalManagementErrorEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementStaffRecordMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementStaffRecordMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateItemMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateItemMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateMapper
;
...
@@ -11,10 +12,8 @@ import cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTe
...
@@ -11,10 +12,8 @@ import cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTe
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplate
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplate
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateItem
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateItem
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateStaffRef
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateStaffRef
;
import
cn.com.glsx.dj.smartcarlife.dto.ShopMerchantDirectorConfigDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MentorBaseInfoDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MentorBaseInfoDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.StaffBaseInfoDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.StaffBaseInfoDTO
;
import
cn.com.glsx.dj.smartcarlife.enums.DirectorTypeEnum
;
import
cn.com.glsx.dj.smartcarlife.remote.ShopMerchantDirectorConfigRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.ShopMerchantDirectorConfigRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffBaseInfoRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffBaseInfoRemote
;
import
cn.com.glsx.dj.smartcarlife.util.DateUtils
;
import
cn.com.glsx.dj.smartcarlife.util.DateUtils
;
...
@@ -24,7 +23,6 @@ import cn.com.glsx.framework.core.util.RpcAssert;
...
@@ -24,7 +23,6 @@ import cn.com.glsx.framework.core.util.RpcAssert;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -81,7 +79,21 @@ public class DigitalManagementTemplateService {
...
@@ -81,7 +79,21 @@ public class DigitalManagementTemplateService {
private
DigitalManagementStaffRecordService
staffRecordService
;
private
DigitalManagementStaffRecordService
staffRecordService
;
public
List
<
DigitalManagementTemplateDTO
>
typeList
(
DigitalManagementTemplateDTO
dto
)
{
public
List
<
DigitalManagementTemplateDTO
>
typeList
(
DigitalManagementTemplateDTO
dto
)
{
return
templateMapper
.
findAllType
();
Example
example
=
new
Example
(
DigitalManagementTemplate
.
class
);
example
.
orderBy
(
"code"
).
asc
();
example
.
createCriteria
()
.
andEqualTo
(
"deletedFlag"
,
BaseModel
.
DeletedFlagEnum
.
N
.
name
())
.
andIn
(
"reportType"
,
Arrays
.
stream
(
GoodNewsTemplateReportTypeEnum
.
values
()).
map
(
GoodNewsTemplateReportTypeEnum:
:
getCode
).
collect
(
Collectors
.
toList
()));
List
<
DigitalManagementTemplate
>
digitalManagementTemplates
=
templateMapper
.
selectByExample
(
example
);
return
digitalManagementTemplates
.
stream
()
.
map
(
digitalManagementTemplate
->
{
DigitalManagementTemplateDTO
managementTemplateDTO
=
new
DigitalManagementTemplateDTO
();
managementTemplateDTO
.
setCode
(
digitalManagementTemplate
.
getCode
());
managementTemplateDTO
.
setName
(
digitalManagementTemplate
.
getName
());
managementTemplateDTO
.
setType
(
digitalManagementTemplate
.
getType
());
managementTemplateDTO
.
setTypeName
(
digitalManagementTemplate
.
getTypeName
());
return
managementTemplateDTO
;
}).
collect
(
Collectors
.
toList
());
}
}
public
DigitalManagementTemplateDTO
templateDetail
(
DigitalManagementTemplateDTO
dto
)
{
public
DigitalManagementTemplateDTO
templateDetail
(
DigitalManagementTemplateDTO
dto
)
{
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/StaffRecordSpecialHandler.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
;
import
cn.com.glsx.dj.mindworkplate.consts.ConfigCenterConstants
;
import
cn.com.glsx.dj.mindworkplate.util.DateUtils
;
import
cn.hutool.core.util.StrUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.core.env.Environment
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.Date
;
import
java.util.Optional
;
/**
* 员工喜报特殊逻辑处理器
* @author yangwei
* @version 1.0
* @since 2026/01/12 14:02
*/
@Slf4j
@Service
@RequiredArgsConstructor
public
class
StaffRecordSpecialHandler
{
private
final
Environment
env
;
/**
* 获取当前系统时间,为了测试当前系统时间支持配置化,如果未配置,取服务器时间
* @author yangwei
* @since 2026/1/12 14:04
* @return java.time.LocalDate
*/
public
LocalDate
getCurrentSystemLocalDate
()
{
return
Optional
.
ofNullable
(
env
.
getProperty
(
ConfigCenterConstants
.
CURRENT_SYSTEM_TIME_FOR_TEST
))
.
filter
(
StrUtil:
:
isNotBlank
)
.
map
(
sysTimeForTest
->
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
parseDate
(
sysTimeForTest
,
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
PATTERN_YYYYMMDD
))
.
orElseGet
(
LocalDate:
:
now
);
}
/**
* 获取当前系统时间, 为了测试当前系统时间支持配置化,如果未配置,取服务器时间
* @author yangwei
* @since 2026/1/12 14:04
* @return java.util.Date
*/
public
Date
getCurrentSystemDate
()
{
return
Optional
.
ofNullable
(
env
.
getProperty
(
ConfigCenterConstants
.
CURRENT_SYSTEM_TIME_FOR_TEST
))
.
filter
(
StrUtil:
:
isNotBlank
)
.
map
(
sysTimeForTest
->
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
parseDate
(
sysTimeForTest
,
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
PATTERN_YYYYMMDD
))
.
map
(
sysTimeForTest
->
DateUtils
.
toDate
(
DateUtils
.
combineWithCurrentTime
(
sysTimeForTest
),
ZoneId
.
of
(
"Asia/Shanghai"
)))
.
orElseGet
(
Date:
:
new
);
}
/**
* 获取当前系统时间,为了测试当前系统时间支持配置化,如果未配置,取服务器时间
* @author yangwei
* @since 2026/1/12 14:04
* @return java.time.LocalDateTime
*/
public
LocalDateTime
getCurrentSystemLocalDateTime
()
{
return
Optional
.
ofNullable
(
env
.
getProperty
(
ConfigCenterConstants
.
CURRENT_SYSTEM_TIME_FOR_TEST
))
.
filter
(
StrUtil:
:
isNotBlank
)
.
map
(
sysTimeForTest
->
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
parseDate
(
sysTimeForTest
,
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
PATTERN_YYYYMMDD
))
.
map
(
DateUtils:
:
combineWithCurrentTime
)
.
orElseGet
(
LocalDateTime:
:
now
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/BaseReportSaveStrategy.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.component.SpringContextHolder
;
import
cn.com.glsx.dj.mindworkplate.consts.SymbolConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.enums.CommonErrorEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTempMapGroupConfigEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.MindWorkplateServiceErrorEnum
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementStaffRecordItemMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementStaffRecordMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateItemMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.digitalmanagement.DigitalManagementTemplateMapper
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementStaffRecord
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementStaffRecordItem
;
import
cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplateItem
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.StaffRecordSpecialHandler
;
import
cn.com.glsx.dj.mindworkplate.util.validation.BeanValidationUtils
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.StaffRecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.remote.ReportPushRecordRemote
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.scrm.equity.enums.DeleteFlagEnum
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
org.springframework.transaction.TransactionDefinition
;
import
org.springframework.transaction.TransactionStatus
;
import
org.springframework.transaction.support.DefaultTransactionDefinition
;
import
tk.mybatis.mapper.entity.Example
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
* <pre>
* 喜报保存策略抽象类
* - 抽象类,提供默认的保存逻辑
* - 子类实现具体的保存逻辑
* - 由于业务定义不同场景下的模版都一样
* - 日报所有模版都一样
* - 周报子类以报告类型{@link GoodNewsTemplateReportTypeEnum}以及模版对应的区域经理和运营主管模版进行区分
* </pre>
*
* @author yangwei
* @version 1.0
* @since 2026/01/09 14:36
*/
@Slf4j
public
abstract
class
BaseReportSaveStrategy
implements
ReportSaveStrategy
{
/**
* 喜报内容头部
*/
public
static
final
String
CONTENT_HEAD_TEMPLATE
=
"{}({} {}) {}:"
;
/**
* 喜报第一级页签
*/
public
static
final
String
CONTENT_FIRST_LVL_TEMPLATE
=
"【{}】"
;
@Resource
protected
TaskExecutor
taskExecutor
;
@Resource
protected
DigitalManagementTemplateMapper
templateMapper
;
@Resource
protected
DigitalManagementTemplateItemMapper
templateItemMapper
;
@Resource
protected
DigitalManagementStaffRecordMapper
staffRecordMapper
;
@Resource
protected
DigitalManagementStaffRecordItemMapper
staffRecordItemMapper
;
@Resource
protected
MerchantStaffRemote
merchantStaffRemote
;
@Resource
protected
ReportPushRecordRemote
reportPushRecordRemote
;
@Resource
protected
StaffRecordSpecialHandler
staffRecordSpecialHandler
;
@Override
public
Integer
save
(
SaveStaffRecordRequestDTO
request
)
{
// 验证数据
ValidationResult
validationResult
=
validate
(
request
);
if
(
ObjectUtil
.
isNotNull
(
validationResult
)
&&
!
validationResult
.
isValid
())
{
throw
new
RpcServiceException
(
CommonErrorEnum
.
VALIDATION_ERROR
,
validationResult
.
getMessage
());
}
// 持久化人员喜报记录
PlatformTransactionManager
transactionManager
=
SpringContextHolder
.
getBean
(
PlatformTransactionManager
.
class
);
DefaultTransactionDefinition
def
=
new
DefaultTransactionDefinition
();
def
.
setPropagationBehavior
(
TransactionDefinition
.
PROPAGATION_REQUIRED
);
TransactionStatus
status
=
transactionManager
.
getTransaction
(
def
);
Integer
staffRecordId
;
try
{
staffRecordId
=
persistence
(
request
);
transactionManager
.
commit
(
status
);
}
catch
(
Exception
e
)
{
log
.
info
(
"喜报持久化失败!"
,
e
);
transactionManager
.
rollback
(
status
);
throw
e
;
}
// 后续操作
asyncPostProcess
(
staffRecordId
,
request
);
return
staffRecordId
;
}
/**
* 保存和修改都集合在改方法中
*
* @param request 请求参数
* @return java.lang.Integer
* @author yangwei
* @since 2026/1/10 14:54
*/
@GlsxDistributeLockable
(
name
=
"'DigitalManagementStaffRecordService_save_' + #uuid"
,
time
=
30
,
timeoutException
=
RpcServiceException
.
class
)
public
Integer
persistence
(
SaveStaffRecordRequestDTO
request
)
{
// 判断是否存在
Date
now
=
staffRecordSpecialHandler
.
getCurrentSystemDate
();
DigitalManagementStaffRecord
staffRecord
=
staffRecordMapper
.
myRecordDetail
(
request
.
getUuid
(),
now
,
null
,
request
.
getTemplateCode
());
// 持久化喜报记录
DigitalManagementStaffRecord
persistence
;
if
(
ObjectUtil
.
isNull
(
staffRecord
))
{
persistence
=
createSaveReportData
(
request
,
now
);
staffRecordMapper
.
insertUseGeneratedKeys
(
persistence
);
List
<
DigitalManagementStaffRecordItem
>
saveRecordItem
=
createSaveRecordItem
(
request
,
persistence
.
getId
(),
now
);
staffRecordItemMapper
.
insertList
(
saveRecordItem
);
request
.
setSave
(
true
);
}
else
{
persistence
=
createEditReportData
(
request
,
staffRecord
,
now
);
staffRecordMapper
.
updateByPrimaryKeySelective
(
persistence
);
List
<
DigitalManagementStaffRecordItem
>
recordItems
=
staffRecordItemMapper
.
selectByRecordId
(
staffRecord
.
getId
());
recordItems
.
forEach
(
item
->
{
DigitalManagementStaffRecordItem
editRecordItem
=
createEditRecordItem
(
request
,
item
,
now
);
staffRecordItemMapper
.
updateByPrimaryKeySelective
(
editRecordItem
);
});
request
.
setSave
(
false
);
}
return
persistence
.
getId
();
}
/**
* 创建修改的喜报记录
*
* @param request 请求参数
* @param recordItem 记录项
* @param assignDate 指定时间
* @return cn.com.glsx.digitalmanagement.entity.DigitalManagementStaffRecordItem
* @author yangwei
* @since 2026/1/9 17:05
*/
private
DigitalManagementStaffRecordItem
createEditRecordItem
(
SaveStaffRecordRequestDTO
request
,
DigitalManagementStaffRecordItem
recordItem
,
Date
assignDate
)
{
DigitalManagementStaffRecordItem
editRecordItem
=
new
DigitalManagementStaffRecordItem
();
editRecordItem
.
setId
(
recordItem
.
getId
());
editRecordItem
.
setUpdatedBy
(
request
.
getUuid
());
editRecordItem
.
setUpdatedDate
(
assignDate
);
editRecordItem
.
setValue
(
request
.
getForm
().
get
(
recordItem
.
getKey
()));
return
editRecordItem
;
}
/**
* 创建保存的喜报记录项
* @author yangwei
* @since 2026/1/10 15:25
* @param request 请求参数
* @param recordId 记录id
* @param assignDate 指定时间
* @return java.util.List<cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementStaffRecordItem>
*/
private
List
<
DigitalManagementStaffRecordItem
>
createSaveRecordItem
(
SaveStaffRecordRequestDTO
request
,
Integer
recordId
,
Date
assignDate
)
{
List
<
DigitalManagementTemplateItemDTO
>
templateItems
=
templateItemMapper
.
findByCode
(
request
.
getTemplateCode
());
Map
<
String
,
String
>
form
=
request
.
getForm
();
return
templateItems
.
stream
().
map
(
item
->
{
DigitalManagementStaffRecordItem
recordItem
=
BeanUtil
.
copyProperties
(
item
,
DigitalManagementStaffRecordItem
.
class
);
recordItem
.
setRecordId
(
recordId
);
recordItem
.
setValue
(
form
.
get
(
item
.
getKey
()));
recordItem
.
setCreatedBy
(
request
.
getUuid
());
recordItem
.
setUpdatedBy
(
request
.
getUuid
());
recordItem
.
setCreatedDate
(
assignDate
);
recordItem
.
setUpdatedDate
(
assignDate
);
recordItem
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
return
recordItem
;
}).
collect
(
Collectors
.
toList
());
}
/**
* 创建保存的喜报记录
*
* @param request 请求参数
* @param assignDate 指定时间
* @return cn.com.glsx.digitalmanagement.entity.DigitalManagementStaffRecord
* @author yangwei
* @since 2026/1/9 17:05
*/
private
DigitalManagementStaffRecord
createSaveReportData
(
SaveStaffRecordRequestDTO
request
,
Date
assignDate
)
{
DigitalManagementStaffRecord
staffRecord
=
new
DigitalManagementStaffRecord
();
staffRecord
.
setStaffUuid
(
request
.
getUuid
());
staffRecord
.
setTemplateCode
(
request
.
getTemplateCode
());
staffRecord
.
setCreatedBy
(
request
.
getUuid
());
staffRecord
.
setCreatedDate
(
assignDate
);
staffRecord
.
setDeletedFlag
(
DeleteFlagEnum
.
N
.
getValue
());
return
staffRecord
;
}
/**
* 创建修改的喜报记录
*
* @param request 请求参数
* @param staffRecord 喜报记录
* @param assignDate 指定时间
* @return cn.com.glsx.digitalmanagement.entity.DigitalManagementStaffRecord
* @author yangwei
* @since 2026/1/10 17:05
*/
private
DigitalManagementStaffRecord
createEditReportData
(
SaveStaffRecordRequestDTO
request
,
DigitalManagementStaffRecord
staffRecord
,
Date
assignDate
)
{
DigitalManagementStaffRecord
editStaffRecord
=
new
DigitalManagementStaffRecord
();
editStaffRecord
.
setId
(
staffRecord
.
getId
());
editStaffRecord
.
setUpdatedBy
(
request
.
getUuid
());
editStaffRecord
.
setUpdatedDate
(
assignDate
);
return
editStaffRecord
;
}
/**
* 基础校验,只做 jsr303 参数校验
*
* @param request 验证参数
* @return cn.com.glsx.dj.mindworkplate.model.common.ValidationResult
* @author yangwei
* @since 2026/1/12 11:25
*/
@Override
public
ValidationResult
validate
(
SaveStaffRecordRequestDTO
request
)
{
BeanValidationUtils
.
validateAndThrow
(
request
);
return
ValidationResult
.
success
();
}
/**
* 保存喜报后续处理
*
* @param staffRecordId 保存之后的记录ID
* @param request 请求参数
* @author yangwei
* @since 2026/1/9 17:15
*/
protected
void
asyncPostProcess
(
Integer
staffRecordId
,
SaveStaffRecordRequestDTO
request
)
{
// this.postProcess(staffRecordId, request);
taskExecutor
.
execute
(()
->
this
.
postProcess
(
staffRecordId
,
request
));
}
/**
* 保存喜报后续处理
*
* @param staffRecordId 喜报记录ID
* @author yangwei
* @since 2026/1/9 17:15
*/
@Override
public
void
postProcess
(
Integer
staffRecordId
,
SaveStaffRecordRequestDTO
request
)
{
try
{
// 构建消息需要的数据对象, 1. 获取填写的喜报记录
DigitalManagementStaffRecord
staffRecord
=
Optional
.
ofNullable
(
staffRecordMapper
.
selectByPrimaryKey
(
staffRecordId
))
.
orElseThrow
(()
->
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
String
.
format
(
"查询喜报记录失败,recordId:%s"
,
staffRecordId
)));
Example
example
=
new
Example
(
DigitalManagementStaffRecordItem
.
class
);
example
.
createCriteria
()
.
andEqualTo
(
"recordId"
,
staffRecordId
)
.
andEqualTo
(
"deletedFlag"
,
"N"
);
List
<
DigitalManagementStaffRecordItem
>
digitalManagementStaffRecordItems
=
staffRecordItemMapper
.
selectByExample
(
example
);
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
=
BeanUtil
.
copyProperties
(
staffRecord
,
StaffGoodNewsRecordDTO
.
class
);
staffGoodNewsRecordDTO
.
setRecordItemList
(
digitalManagementStaffRecordItems
).
setSave
(
request
.
getSave
());
// 2. 获取喜报填写人员信息
String
uuid
=
staffRecord
.
getStaffUuid
();
RpcResponse
<
List
<
MerchantStaffResponse
>>
staffInfoListRsp
=
merchantStaffRemote
.
selectStaffListByStaffUUID
(
Lists
.
newArrayList
(
uuid
));
if
(
staffInfoListRsp
.
hasError
()
||
!
staffInfoListRsp
.
hasResult
())
{
log
.
error
(
"查询员工信息失败 uuid:{} res:{}"
,
uuid
,
staffInfoListRsp
);
return
;
}
MerchantStaffResponse
merchantStaffResponse
=
Optional
.
ofNullable
(
staffInfoListRsp
.
getResult
())
.
filter
(
CollUtil:
:
isNotEmpty
)
.
map
(
list
->
list
.
get
(
0
))
.
orElseGet
(
MerchantStaffResponse:
:
new
);
String
staffName
=
merchantStaffResponse
.
getStaffName
();
String
staffPhone
=
merchantStaffResponse
.
getStaffPhone
();
// 3. 获取模板内容
String
templateCode
=
Optional
.
ofNullable
(
staffRecord
.
getTemplateCode
()).
orElseThrow
(()
->
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
DATA_NOT_FULL_ERROR
));
ManagementTemplateContentDTO
templateItems
=
getTemplateItems
(
templateCode
);
staffGoodNewsRecordDTO
.
setName
(
staffName
).
setPhone
(
staffPhone
).
setTemplate
(
templateItems
);
// 构建发送内容,由于有些报告需要特殊化处理,自定义实现
String
content
=
contentBuilder
(
staffGoodNewsRecordDTO
);
// 企微消息发送
if
(
StrUtil
.
isNotBlank
(
content
))
{
enterpriseWeChatGroupPush
(
staffRecordId
,
pushRequestBuilder
(
content
,
staffGoodNewsRecordDTO
),
staffPushRequestBuilder
(
content
,
staffGoodNewsRecordDTO
));
}
}
catch
(
Exception
e
)
{
log
.
warn
(
"喜报群消息失败,失败原因!"
,
e
);
}
}
/**
* 构建内容头部,基本都需要定制
*
* @return java.lang.String
* @author yangwei
* @since 2026/1/9 17:20
*/
protected
abstract
String
contentHeadBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
);
/**
* <pre>
* 通用构建内容主体,如果不同的模版策略需要定制,则需要实现该方法
* 该通用方法生成的内容如下
* pattern:
* 【第一级标题1】
* 涉及店铺:1家
* 涉及金额:1000
* 【第一级标题2】
* 产值:100元
* 人员:张三
* </pre>
*
* @return java.lang.String
* @author yangwei
* @since 2026/1/9 17:20
*/
public
String
contentBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
String
headBuilder
=
contentHeadBuilder
(
staffGoodNewsRecordDTO
);
// 消息内容构建通用逻辑
List
<
String
>
contentList
=
Lists
.
newArrayList
();
contentList
.
add
(
headBuilder
);
ManagementTemplateContentDTO
template
=
staffGoodNewsRecordDTO
.
getTemplate
();
List
<
ManagementTemplateItemDTO
>
templateItemList
=
template
.
getTemplateItemList
();
if
(
CollUtil
.
isEmpty
(
templateItemList
))
{
return
StrUtil
.
EMPTY
;
}
// 获取当前填写的喜报记录项
Map
<
String
,
DigitalManagementStaffRecordItem
>
keyMapRecordItem
=
Optional
.
ofNullable
(
staffGoodNewsRecordDTO
.
getRecordItemList
())
.
orElseGet
(
Lists:
:
newArrayList
)
.
stream
()
.
collect
(
Collectors
.
toMap
(
DigitalManagementStaffRecordItem:
:
getKey
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
// 通用构建
for
(
ManagementTemplateItemDTO
managementTemplateItemDTO
:
templateItemList
)
{
// 第一级目录,value为空
String
firstLvlContent
=
StrUtil
.
format
(
CONTENT_FIRST_LVL_TEMPLATE
,
managementTemplateItemDTO
.
getName
());
contentList
.
add
(
firstLvlContent
);
Optional
.
ofNullable
(
managementTemplateItemDTO
.
getChildList
())
.
orElseGet
(
Lists:
:
newArrayList
)
.
forEach
(
child
->
{
String
key
=
child
.
getKey
();
DigitalManagementStaffRecordItem
staffSubmitRecord
=
Optional
.
ofNullable
(
keyMapRecordItem
.
get
(
key
)).
orElseGet
(
DigitalManagementStaffRecordItem:
:
new
);
String
value
=
Optional
.
ofNullable
(
staffSubmitRecord
.
getValue
())
.
map
(
el
->
el
+
Optional
.
ofNullable
(
staffSubmitRecord
.
getSuffix
()).
orElse
(
StrUtil
.
EMPTY
))
.
orElse
(
SymbolConstants
.
NONE
);
// 多行文本 textarea 需要换行
Boolean
needNewLine
=
Optional
.
ofNullable
(
staffSubmitRecord
.
getFrontRule
())
.
map
(
frontRule
->
JSONUtil
.
toBean
(
frontRule
,
FormComponentConfig
.
class
))
.
map
(
el
->
"textarea"
.
equals
(
el
.
getAddHtml
()))
.
orElse
(
false
);
if
(
needNewLine
)
{
// 工作日报:\n 我是工作日报
contentList
.
add
(
staffSubmitRecord
.
getName
()
+
SymbolConstants
.
CHINESE_COLON
);
contentList
.
add
(
value
);
}
else
{
// 工作日报:我是工作日报
contentList
.
add
(
staffSubmitRecord
.
getName
()
+
SymbolConstants
.
CHINESE_COLON
+
value
);
}
});
}
List
<
String
>
finallyContentList
=
contentList
.
stream
().
filter
(
StrUtil:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
return
StrUtil
.
join
(
SymbolConstants
.
NEW_LINE
,
finallyContentList
);
}
/**
* 按照模版推送消息请求构建逻辑,定制化子类重写
*
* @param content 推送内容
* @param staffGoodNewsRecordDTO 喜报记录
* @return cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
* @author yangwei
* @since 2026/1/10 10:41
*/
private
RecordRequestDTO
pushRequestBuilder
(
String
content
,
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
RecordRequestDTO
pushRequest
=
new
RecordRequestDTO
();
pushRequest
.
setMsgId
(
UUID
.
randomUUID
().
toString
());
pushRequest
.
setContent
(
content
);
pushRequest
.
setAttType
(
1
);
pushRequest
.
setPushType
(
GoodNewsTempMapGroupConfigEnum
.
getReportTypeEnumByTemplateCode
(
staffGoodNewsRecordDTO
.
getTemplate
().
getCode
()));
return
pushRequest
;
}
/**
* 按照人员配置推送消息请求构建逻辑,定制化子类重写
*
* @param content 推送内容
* @param staffGoodNewsRecordDTO 喜报记录
* @return cn.com.glsx.dj.smartcarlife.dto.worktoolpush.StaffRecordRequestDTO
* @author yangwei
* @since 2026/1/10 11:01
*/
private
StaffRecordRequestDTO
staffPushRequestBuilder
(
String
content
,
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
StaffRecordRequestDTO
staffPushRequest
=
new
StaffRecordRequestDTO
();
staffPushRequest
.
setMsgId
(
UUID
.
randomUUID
().
toString
());
staffPushRequest
.
setContent
(
content
);
staffPushRequest
.
setAttType
(
1
);
staffPushRequest
.
setResidentStaffPhone
(
staffGoodNewsRecordDTO
.
getPhone
());
staffPushRequest
.
setPushType
(
GoodNewsTempMapGroupConfigEnum
.
getReportTypeEnumByTemplateCode
(
staffGoodNewsRecordDTO
.
getTemplate
().
getCode
()));
return
staffPushRequest
;
}
@Override
public
void
enterpriseWeChatGroupPush
(
Integer
staffRecordId
,
RecordRequestDTO
pushRequest
,
StaffRecordRequestDTO
staffPushRequest
)
{
log
.
info
(
"喜报记录id:{}推送人员配置对应的喜报请求参数:{}"
,
staffRecordId
,
staffPushRequest
);
reportPushRecordRemote
.
addStaffPushRecordRemote
(
staffPushRequest
);
log
.
info
(
"喜报记录id:{}推送模版配置对应的群消息请求参数:{}"
,
staffRecordId
,
pushRequest
);
reportPushRecordRemote
.
addPushRecordRemote
(
pushRequest
);
}
/**
* 提供模版公共获取,如果需要定制化,请重写
*
* @param templateCode 模版代码
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.ManagementTemplateContentDTO
* @author yangwei
* @since 2026/1/10 13:51
*/
@Override
public
ManagementTemplateContentDTO
getTemplateItems
(
String
templateCode
)
{
DigitalManagementTemplateDTO
managementTemplateDTO
=
Optional
.
ofNullable
(
templateMapper
.
findByCode
(
templateCode
))
.
orElseThrow
(()
->
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
DATA_NOT_FULL_ERROR
,
String
.
format
(
"模板不存在 templateCode:%s"
,
templateCode
)));
ManagementTemplateContentDTO
managementTemplateContentDTO
=
BeanUtil
.
copyProperties
(
managementTemplateDTO
,
ManagementTemplateContentDTO
.
class
);
Example
example
=
new
Example
(
DigitalManagementTemplateItem
.
class
);
example
.
excludeProperties
(
"placeholder"
,
"createdBy"
,
"createdDate"
,
"updatedBy"
,
"updatedDate"
,
"deletedFlag"
);
example
.
createCriteria
()
.
andEqualTo
(
"templateCode"
,
templateCode
)
.
andEqualTo
(
"deletedFlag"
,
"N"
);
List
<
DigitalManagementTemplateItem
>
digitalManagementTemplateItems
=
Optional
.
ofNullable
(
templateItemMapper
.
selectByExample
(
example
))
.
filter
(
CollUtil:
:
isNotEmpty
)
.
orElseThrow
(()
->
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
DATA_NOT_FULL_ERROR
,
String
.
format
(
"模板templateCode:%s未配置模版项"
,
templateCode
)));
// 列表项,构建子项,默认定制化两级
List
<
ManagementTemplateItemDTO
>
templateItemDTOList
=
digitalManagementTemplateItems
.
stream
()
.
filter
(
el
->
StrUtil
.
isBlank
(
el
.
getParentCode
()))
.
sorted
(
Comparator
.
comparingInt
(
DigitalManagementTemplateItem:
:
getOrder
))
.
map
(
el
->
{
List
<
DigitalManagementTemplateItem
>
childList
=
digitalManagementTemplateItems
.
stream
()
.
filter
(
item
->
el
.
getCode
().
equals
(
item
.
getParentCode
()))
.
sorted
(
Comparator
.
comparingInt
(
DigitalManagementTemplateItem:
:
getOrder
))
.
collect
(
Collectors
.
toList
());
ManagementTemplateItemDTO
managementTemplateItemDTO
=
BeanUtil
.
copyProperties
(
el
,
ManagementTemplateItemDTO
.
class
);
managementTemplateItemDTO
.
setChildList
(
childList
);
return
managementTemplateItemDTO
;
}).
collect
(
Collectors
.
toList
());
managementTemplateContentDTO
.
setTemplateItemList
(
templateItemDTOList
);
return
managementTemplateContentDTO
;
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/DailyReportSaveStrategy.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.*
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateCodeEnum
;
import
cn.com.glsx.dj.mindworkplate.enums.MindWorkplateServiceErrorEnum
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.hutool.core.util.StrUtil
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Optional
;
/**
* 日报保存
* @author yangwei
* @version 1.0
* @since 2026/01/09 16:42
*/
@Component
public
class
DailyReportSaveStrategy
extends
BaseReportSaveStrategy
{
private
static
final
List
<
String
>
DAILY_TEMPLATES
=
Arrays
.
asList
(
GoodNewsTemplateCodeEnum
.
DELAY_TEMPLATE_CODE_2_3
.
getCode
(),
GoodNewsTemplateCodeEnum
.
LIGHT_CHANGE_TEMPLATE_CODE_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_TEMPLATE_CODE_2_1
.
getCode
()
);
@Resource
private
DigitalManagementStaffRecordService
staffRecordService
;
@Override
public
boolean
supports
(
String
templateCode
)
{
return
DAILY_TEMPLATES
.
contains
(
templateCode
);
}
/**
* 日报持久化使用历史代码
* @author yangwei
* @since 2026/1/9 16:48
* @param request 请求对象
* @return java.lang.Integer
*/
@Override
public
Integer
persistence
(
SaveStaffRecordRequestDTO
request
)
{
return
staffRecordService
.
save
(
request
);
}
@Override
protected
String
contentHeadBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
// 日报沿用历史代码,头部直接沿用
return
StrUtil
.
EMPTY
;
}
@Override
public
String
contentBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
// 日报提醒群推消息构建逻辑
DigitalManagementStaffRecordDTO
staffRecordDTO
=
staffRecordService
.
getDigitalManagementStaffRecordDTO
(
staffGoodNewsRecordDTO
);
staffRecordDTO
.
setSave
(
staffGoodNewsRecordDTO
.
getSave
());
StringBuilder
recordContent
=
Optional
.
ofNullable
(
staffRecordService
.
getRecordContent
(
staffGoodNewsRecordDTO
.
getName
(),
staffRecordDTO
))
.
orElseThrow
(()
->
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
String
.
format
(
"构建日报推送内容失败,recordId:%s"
,
staffGoodNewsRecordDTO
.
getId
())));
return
recordContent
.
toString
();
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/OperationExecutiveMonthlyReportSaveStrategy.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.consts.CommonConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsRecordDTO
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateCodeEnum
;
import
cn.com.glsx.dj.mindworkplate.util.DateUtils
;
import
cn.hutool.core.util.BooleanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDate
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
* 运营主管(驻店人员)月报保存策略
* @author yangwei
* @version 1.0
* @since 2026/01/12 11:28
*/
@Slf4j
@Component
public
class
OperationExecutiveMonthlyReportSaveStrategy
extends
BaseReportSaveStrategy
{
private
static
final
List
<
String
>
OPERATION_EXECUTIVE_WEEKLY_TEMPLATES
=
Arrays
.
asList
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__21_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY__22_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_23_2_3
.
getCode
()
);
@Override
public
boolean
supports
(
String
templateCode
)
{
return
OPERATION_EXECUTIVE_WEEKLY_TEMPLATES
.
contains
(
templateCode
);
}
@Override
public
ValidationResult
validate
(
SaveStaffRecordRequestDTO
request
)
{
ValidationResult
validate
=
super
.
validate
(
request
);
if
(!
validate
.
isValid
())
{
return
validate
;
}
// 月报只能每个月最后一天填写
LocalDate
now
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
boolean
isLastDayOfMonth
=
DateUtils
.
isLastDayOfMonth
(
now
);
if
(!
isLastDayOfMonth
)
{
validate
.
setValid
(
false
);
validate
.
setMessage
(
"月报只能在本月的最后一天填写!"
);
}
return
validate
;
}
/**
* 企微消息推送头部构建,月报
*
* @author yangwei
* @since 2026/1/12 11:36
* @param staffGoodNewsRecordDTO 员工喜报业务数据对象
* @return java.lang.String
*/
@Override
protected
String
contentHeadBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
Date
createdDate
=
staffGoodNewsRecordDTO
.
getCreatedDate
();
return
StrUtil
.
format
(
CONTENT_HEAD_TEMPLATE
,
staffGoodNewsRecordDTO
.
getTemplate
().
getName
(),
staffGoodNewsRecordDTO
.
getName
(),
RegionalManagerMonthlyReportSaveStrategy
.
getMonthlyRange
(
createdDate
),
BooleanUtil
.
isTrue
(
staffGoodNewsRecordDTO
.
getSave
())
?
StrUtil
.
EMPTY
:
CommonConstants
.
CHINESE_CHANGED
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/OperationExecutiveWeeklyReportSaveStrategy.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.consts.CommonConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsRecordDTO
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateCodeEnum
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.dj.mindworkplate.util.DateUtils
;
import
cn.hutool.core.util.BooleanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
* 运营主管(驻店人员)周报保存策略
* @author yangwei
* @version 1.0
* @since 2026/01/09 16:10
*/
@Component
public
class
OperationExecutiveWeeklyReportSaveStrategy
extends
BaseReportSaveStrategy
{
@Resource
private
DigitalManagementStaffRecordService
staffRecordService
;
private
static
final
List
<
String
>
OPERATION_EXECUTIVE_WEEKLY_TEMPLATES
=
Arrays
.
asList
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_15_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_16_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_17_2_3
.
getCode
()
);
@Override
public
boolean
supports
(
String
templateCode
)
{
return
OPERATION_EXECUTIVE_WEEKLY_TEMPLATES
.
contains
(
templateCode
);
}
@Override
public
ValidationResult
validate
(
SaveStaffRecordRequestDTO
request
)
{
ValidationResult
validate
=
super
.
validate
(
request
);
if
(!
validate
.
isValid
())
{
return
validate
;
}
// 周报只能周日填写
LocalDate
now
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
validationDate
(
now
,
request
.
getUuid
(),
validate
);
return
validate
;
}
/**
* 校验日期
* @author yangwei
* @since 2026/1/12 16:26
* @param assignDate 当前系统时间
* @param validate 校验对象
*/
public
void
validationDate
(
LocalDate
assignDate
,
String
uuid
,
ValidationResult
validate
)
{
boolean
isSunday
=
DateUtils
.
isSunday
(
assignDate
);
if
(!
isSunday
)
{
validate
.
setValid
(
false
);
validate
.
setMessage
(
"周报只能周日填写!"
);
return
;
}
// 如果周日刚好是每个月最后一天且配置了月报,则无需填写周报
if
(
staffRecordService
.
onlySubmitMonthReport
(
assignDate
,
uuid
))
{
validate
.
setValid
(
false
);
validate
.
setMessage
(
"填写本月月报即可,周报无需填写!"
);
}
}
@Override
protected
String
contentHeadBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
Date
createdDate
=
staffGoodNewsRecordDTO
.
getCreatedDate
();
return
StrUtil
.
format
(
CONTENT_HEAD_TEMPLATE
,
staffGoodNewsRecordDTO
.
getTemplate
().
getName
(),
staffGoodNewsRecordDTO
.
getName
(),
RegionalManagerWeeklyReportSaveStrategy
.
getWeeklyRange
(
createdDate
),
BooleanUtil
.
isTrue
(
staffGoodNewsRecordDTO
.
getSave
())
?
StrUtil
.
EMPTY
:
CommonConstants
.
CHINESE_CHANGED
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/RegionalManagerMonthlyReportSaveStrategy.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.consts.CommonConstants
;
import
cn.com.glsx.dj.mindworkplate.consts.DatePatternConstants
;
import
cn.com.glsx.dj.mindworkplate.consts.SymbolConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.MonthRange
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsRecordDTO
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateCodeEnum
;
import
cn.com.glsx.framework.core.util.DateUtils
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.BooleanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDate
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
* 区域经理(区域运营)月报保存策略
* @author yangwei
* @version 1.0
* @since 2026/01/12 11:11
*/
@Slf4j
@Component
public
class
RegionalManagerMonthlyReportSaveStrategy
extends
BaseReportSaveStrategy
{
private
static
final
List
<
String
>
REGIONAL_MANAGER_MONTHLY_TEMPLATES
=
Arrays
.
asList
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_18_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_19_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_MONTHLY_20_2_3
.
getCode
()
);
@Override
public
boolean
supports
(
String
templateCode
)
{
return
REGIONAL_MANAGER_MONTHLY_TEMPLATES
.
contains
(
templateCode
);
}
@Override
public
ValidationResult
validate
(
SaveStaffRecordRequestDTO
request
)
{
ValidationResult
validate
=
super
.
validate
(
request
);
if
(!
validate
.
isValid
())
{
return
validate
;
}
// 月报只能每个月最后一天填写
LocalDate
now
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
boolean
isLastDayOfMonth
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
isLastDayOfMonth
(
now
);
if
(!
isLastDayOfMonth
)
{
validate
.
setValid
(
false
);
validate
.
setMessage
(
"月报只能在本月的最后一天填写!"
);
}
return
validate
;
}
@Override
protected
String
contentHeadBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
Date
createdDate
=
staffGoodNewsRecordDTO
.
getCreatedDate
();
return
StrUtil
.
format
(
CONTENT_HEAD_TEMPLATE
,
staffGoodNewsRecordDTO
.
getTemplate
().
getName
(),
staffGoodNewsRecordDTO
.
getName
(),
getMonthlyRange
(
createdDate
),
BooleanUtil
.
isTrue
(
staffGoodNewsRecordDTO
.
getSave
())
?
StrUtil
.
EMPTY
:
CommonConstants
.
CHINESE_CHANGED
);
}
public
static
String
getMonthlyRange
(
Date
createdDate
)
{
String
format
=
DateUtil
.
format
(
createdDate
,
DateUtils
.
DEFAULT_DATE_FORMAT5
);
MonthRange
monthRange
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
getMonthRange
(
format
,
DateUtils
.
DEFAULT_DATE_FORMAT5
);
return
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
monthRange
.
getStartDate
(),
DatePatternConstants
.
YYYY_MM_DD_SLASH
)
+
SymbolConstants
.
BLANK_DASH
+
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
monthRange
.
getEndDate
(),
DatePatternConstants
.
YYYY_MM_DD_SLASH
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/RegionalManagerWeeklyReportSaveStrategy.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.consts.CommonConstants
;
import
cn.com.glsx.dj.mindworkplate.consts.DatePatternConstants
;
import
cn.com.glsx.dj.mindworkplate.consts.SymbolConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsRecordDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.WeekRange
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateCodeEnum
;
import
cn.com.glsx.dj.mindworkplate.service.digitalmanagement.DigitalManagementStaffRecordService
;
import
cn.com.glsx.framework.core.util.DateUtils
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.BooleanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDate
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
* 区域经理(区域运营)周报保存策略
* @author yangwei
* @version 1.0
* @since 2026/01/09 15:42
*/
@Slf4j
@Component
public
class
RegionalManagerWeeklyReportSaveStrategy
extends
BaseReportSaveStrategy
{
@Autowired
private
DigitalManagementStaffRecordService
staffRecordService
;
private
static
final
List
<
String
>
REGIONAL_MANAGER_WEEKLY_TEMPLATES
=
Arrays
.
asList
(
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_1_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_1
.
getCode
(),
GoodNewsTemplateCodeEnum
.
REGIONAL_MANAGER_TEMPLATE_CODE_WEEKLY_2_3
.
getCode
()
);
@Override
public
boolean
supports
(
String
templateCode
)
{
return
REGIONAL_MANAGER_WEEKLY_TEMPLATES
.
contains
(
templateCode
);
}
@Override
public
ValidationResult
validate
(
SaveStaffRecordRequestDTO
request
)
{
ValidationResult
validate
=
super
.
validate
(
request
);
if
(!
validate
.
isValid
())
{
return
validate
;
}
// 周报只能周日填写
LocalDate
now
=
staffRecordSpecialHandler
.
getCurrentSystemLocalDate
();
validationDate
(
now
,
request
.
getUuid
(),
validate
);
return
validate
;
}
public
void
validationDate
(
LocalDate
assignDate
,
String
uuid
,
ValidationResult
validate
)
{
boolean
isSunday
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
isSunday
(
assignDate
);
if
(!
isSunday
)
{
validate
.
setValid
(
false
);
validate
.
setMessage
(
"周报只能周日填写!"
);
return
;
}
// 如果周日刚好是每个月最后一天且配置了月报,则无需填写周报
if
(
staffRecordService
.
onlySubmitMonthReport
(
assignDate
,
uuid
))
{
validate
.
setValid
(
false
);
validate
.
setMessage
(
"填写本月月报即可,周报无需填写!"
);
}
}
/**
* 周报需要获取填写周报的区间
* @author yangwei
* @since 2026/1/10 15:42
* @param staffGoodNewsRecordDTO 请求参数
* @return java.lang.String
*/
@Override
protected
String
contentHeadBuilder
(
StaffGoodNewsRecordDTO
staffGoodNewsRecordDTO
)
{
Date
createdDate
=
staffGoodNewsRecordDTO
.
getCreatedDate
();
return
StrUtil
.
format
(
CONTENT_HEAD_TEMPLATE
,
staffGoodNewsRecordDTO
.
getTemplate
().
getName
(),
staffGoodNewsRecordDTO
.
getName
(),
getWeeklyRange
(
createdDate
),
BooleanUtil
.
isTrue
(
staffGoodNewsRecordDTO
.
getSave
())
?
StrUtil
.
EMPTY
:
CommonConstants
.
CHINESE_CHANGED
);
}
/**
* 获取周报填写的区间
* @author yangwei
* @since 2026/1/10 15:42
* @param createdDate 创建时间
* @return java.lang.String
*/
public
static
String
getWeeklyRange
(
Date
createdDate
)
{
String
format
=
DateUtil
.
format
(
createdDate
,
DateUtils
.
DEFAULT_DATE_FORMAT5
);
WeekRange
weekRange
=
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
getWeekRange
(
format
,
DateUtils
.
DEFAULT_DATE_FORMAT5
);
return
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
weekRange
.
getStartDate
(),
DatePatternConstants
.
YYYY_MM_DD_SLASH
)
+
SymbolConstants
.
BLANK_DASH
+
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
.
DateUtils
.
formatLocalDate
(
weekRange
.
getEndDate
(),
DatePatternConstants
.
YYYY_MM_DD_SLASH
);
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/ReportSaveFactory.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.enums.MindWorkplateServiceErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* 喜报保存工厂
* @author yangwei
* @version 1.0
* @since 2026/01/09 15:57
*/
@Component
public
class
ReportSaveFactory
{
/** 策略列表 */
private
final
List
<
ReportSaveStrategy
>
strategies
;
@Autowired
public
ReportSaveFactory
(
List
<
ReportSaveStrategy
>
strategies
)
{
this
.
strategies
=
strategies
;
}
public
ReportSaveStrategy
getStrategy
(
String
templateCode
)
{
return
strategies
.
stream
()
.
filter
(
strategy
->
strategy
.
supports
(
templateCode
))
.
findFirst
()
.
orElseThrow
(()
->
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"不支持的模板类型: "
+
templateCode
));
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/ReportSaveStrategy.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.ManagementTemplateContentDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.RecordRequestDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.worktoolpush.StaffRecordRequestDTO
;
/**
* 汇报保存策略
* 包含:验证、保存、推送、统计
* 支持多个模板,涵盖 日报,周报,月报
* @author yangwei
* @version 1.0
* @since 2026/01/09 14:32
*/
public
interface
ReportSaveStrategy
{
/**
* 判断是否支持该模板
* @author yangwei
* @since 2026/1/9 15:38
* @param templateCode 模版代码
* @return boolean
*/
boolean
supports
(
String
templateCode
);
/**
* 保存报告并推送消息
* @author yangwei
* @since 2026/1/9 15:37
* @param request 请求对象
* @return java.lang.Integer 保存之后的用户喜报id
*/
Integer
save
(
SaveStaffRecordRequestDTO
request
);
/**
* 验证报告数据
* @author yangwei
* @since 2026/1/9 15:37
* @param request 请求对象
* @return cn.com.glsx.dj.mindworkplate.service.digitalmanagement.goodnewssave.ValidationResult
*/
ValidationResult
validate
(
SaveStaffRecordRequestDTO
request
);
/**
* 获取模板配置
* @author yangwei
* @since 2026/1/9 15:37
* @param templateCode 模版代码
* @return cn.com.glsx.dj.mindworkplate.model.digitalmanagement.DigitalManagementTemplate
*/
ManagementTemplateContentDTO
getTemplateItems
(
String
templateCode
);
/**
* 喜报后续处理
* @author yangwei
* @since 2026/1/9 17:18
* @param staffRecordId 喜报记录ID
* @param request 请求参数
*/
void
postProcess
(
Integer
staffRecordId
,
SaveStaffRecordRequestDTO
request
);
/**
* 企微群推送
* @author yangwei
* @since 2026/1/10 10:21
* @param staffRecordId 喜报记录ID
* @param pushRequest 按照模版推送
* @param staffRecordRequest 按照员工推送
*/
void
enterpriseWeChatGroupPush
(
Integer
staffRecordId
,
RecordRequestDTO
pushRequest
,
StaffRecordRequestDTO
staffRecordRequest
);
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/goodnewssave/ValidationResult.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
digitalmanagement
.
goodnewssave
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/09 14:35
*/
@Data
@AllArgsConstructor
public
class
ValidationResult
{
private
boolean
valid
;
private
String
message
;
private
Map
<
String
,
String
>
errors
;
public
static
ValidationResult
success
()
{
return
new
ValidationResult
(
true
,
"验证通过"
,
null
);
}
public
static
ValidationResult
error
(
String
message
)
{
return
new
ValidationResult
(
false
,
message
,
new
HashMap
<>());
}
public
static
ValidationResult
error
(
String
message
,
Map
<
String
,
String
>
errors
)
{
return
new
ValidationResult
(
false
,
message
,
errors
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/longcourse/LongcourseSceneConfigService.java
View file @
1d8d5eb
...
@@ -783,6 +783,13 @@ public class LongcourseSceneConfigService {
...
@@ -783,6 +783,13 @@ public class LongcourseSceneConfigService {
.
max
(
Integer:
:
compareTo
)
.
max
(
Integer:
:
compareTo
)
.
orElse
(
null
));
.
orElse
(
null
));
// 取最大值或第一个即可(看你业务需要)
merged
.
setTaskStatus
(
group
.
stream
()
.
map
(
StaffConfigDTO:
:
getTaskStatus
)
.
filter
(
Objects:
:
nonNull
)
.
max
(
Byte:
:
compareTo
)
.
orElse
(
null
));
return
merged
;
return
merged
;
})
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
...
@@ -825,6 +832,7 @@ public class LongcourseSceneConfigService {
...
@@ -825,6 +832,7 @@ public class LongcourseSceneConfigService {
if
(
CollectionUtils
.
isNotEmpty
(
contentManagerTaskStaffDTOS
)){
if
(
CollectionUtils
.
isNotEmpty
(
contentManagerTaskStaffDTOS
)){
oneMonthOrderStaffDTO
.
setCourseConfigFlag
(
1
);
oneMonthOrderStaffDTO
.
setCourseConfigFlag
(
1
);
oneMonthOrderStaffDTO
.
setTaskId
(
contentManagerTaskStaffDTOS
.
get
(
0
).
getCmtId
());
oneMonthOrderStaffDTO
.
setTaskId
(
contentManagerTaskStaffDTOS
.
get
(
0
).
getCmtId
());
oneMonthOrderStaffDTO
.
setTaskStatus
(
contentManagerTaskStaffDTOS
.
get
(
0
).
getTaskStatus
());
}
}
Optional
<
StaffConfigDTO
>
staffConfigDTO
=
list
.
stream
()
Optional
<
StaffConfigDTO
>
staffConfigDTO
=
list
.
stream
()
.
filter
(
item
->
Objects
.
equals
(
item
.
getPhone
(),
oneMonthOrderStaffDTO
.
getPhone
()))
.
filter
(
item
->
Objects
.
equals
(
item
.
getPhone
(),
oneMonthOrderStaffDTO
.
getPhone
()))
...
...
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/script/PadMessageBoxService.java
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
script
;
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
service
.
script
;
import
cn.com.glsx.dj.mindworkplate.dto.aiagent.AiAgentInfoDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.aiagent.AiAgentInfoDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.*
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.StatusRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.messagebox.*
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.dto.script.*
;
import
cn.com.glsx.dj.mindworkplate.dto.sop.SopTaskDetailInsertDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.sop.SopTaskDetailInsertDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.sop.SopTaskInfoDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.sop.SopTaskInfoDTO
;
...
@@ -16,18 +16,17 @@ import cn.com.glsx.dj.mindworkplate.mapper.script.ExtractRecordPadPushMapper;
...
@@ -16,18 +16,17 @@ import cn.com.glsx.dj.mindworkplate.mapper.script.ExtractRecordPadPushMapper;
import
cn.com.glsx.dj.mindworkplate.mapper.script.SopTaskPadPushMapper
;
import
cn.com.glsx.dj.mindworkplate.mapper.script.SopTaskPadPushMapper
;
import
cn.com.glsx.dj.mindworkplate.model.ActivityMsgRelation
;
import
cn.com.glsx.dj.mindworkplate.model.ActivityMsgRelation
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
import
cn.com.glsx.dj.mindworkplate.model.PadMessageBox
;
import
cn.com.glsx.dj.mindworkplate.model.WarningNotification
;
import
cn.com.glsx.dj.mindworkplate.model.script.ExtractRecord
;
import
cn.com.glsx.dj.mindworkplate.model.script.ExtractRecord
;
import
cn.com.glsx.dj.mindworkplate.model.script.ExtractRecordPadPush
;
import
cn.com.glsx.dj.mindworkplate.model.script.ExtractRecordPadPush
;
import
cn.com.glsx.dj.mindworkplate.model.script.SopTaskPadPush
;
import
cn.com.glsx.dj.mindworkplate.model.script.SopTaskPadPush
;
import
cn.com.glsx.dj.mindworkplate.model.sop.SopTaskDetailInfo
;
import
cn.com.glsx.dj.mindworkplate.model.sop.SopTaskInfo
;
import
cn.com.glsx.dj.mindworkplate.service.aiagent.AiAgentAccountInfoService
;
import
cn.com.glsx.dj.mindworkplate.service.aiagent.AiAgentAccountInfoService
;
import
cn.com.glsx.dj.mindworkplate.service.warning.WarningNotificationService
;
import
cn.com.glsx.dj.mindworkplate.service.warning.WarningNotificationService
;
import
cn.com.glsx.dj.mindworkplate.util.validation.BeanValidationUtils
;
import
cn.com.glsx.dj.mindworkplate.util.validation.BeanValidationUtils
;
import
cn.com.glsx.dj.riskmanage.dto.activity.ActivityRespDTO
;
import
cn.com.glsx.dj.riskmanage.dto.activity.FindActivityByIdOrCycleIdQry
;
import
cn.com.glsx.dj.riskmanage.remote.ActivityRemote
;
import
cn.com.glsx.dj.smartcarlife.dto.contentManager.ContentManagerTaskDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.contentManager.ContentManagerTaskDTO
;
import
cn.com.glsx.dj.smartcarlife.enums.ContentManagerEnum
;
import
cn.com.glsx.dj.smartcarlife.enums.ContentManagerEnum
;
import
cn.com.glsx.dj.smartcarlife.enums.RpcErrorEnum
;
import
cn.com.glsx.dj.smartcarlife.remote.ContentManagerTaskRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.ContentManagerTaskRemote
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
...
@@ -38,13 +37,12 @@ import cn.com.glsx.framework.core.util.RpcAssert;
...
@@ -38,13 +37,12 @@ import cn.com.glsx.framework.core.util.RpcAssert;
import
cn.com.glsx.scrm.equity.enums.DeleteFlagEnum
;
import
cn.com.glsx.scrm.equity.enums.DeleteFlagEnum
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjUtil
;
import
cn.hutool.core.util.ObjUtil
;
import
c
om.alibaba.fastjson.JSON
;
import
c
n.hutool.core.util.ObjectUtil
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -57,7 +55,6 @@ import tk.mybatis.mapper.entity.Example;
...
@@ -57,7 +55,6 @@ import tk.mybatis.mapper.entity.Example;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
@Service
@Service
@Slf4j
@Slf4j
...
@@ -90,6 +87,9 @@ public class PadMessageBoxService {
...
@@ -90,6 +87,9 @@ public class PadMessageBoxService {
@Resource
@Resource
private
ActivityMsgRelationMapper
activityMsgRelationMapper
;
private
ActivityMsgRelationMapper
activityMsgRelationMapper
;
@Resource
(
name
=
"riskManageActivityRemote"
)
private
ActivityRemote
activityRemote
;
/**
/**
* 查询未阅读的优秀话术接口
* 查询未阅读的优秀话术接口
...
@@ -628,4 +628,62 @@ public class PadMessageBoxService {
...
@@ -628,4 +628,62 @@ public class PadMessageBoxService {
}
}
return
true
;
return
true
;
}
}
/**
* 获取活动消息弹窗
* @author yangwei
* @since 2026/1/4 10:37
* @param request 活动消息弹窗参数
* @return cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessagePopUpWindowRespDTO
*/
public
ActivityMessagePopUpWindowRespDTO
getActivityMsgPopUpWindow
(
ActivityMessagePopUpWindowDTO
request
)
{
BeanValidationUtils
.
validateAndThrow
(
request
);
ActivityMessagePopUpWindowRespDTO
activityMsgPopUpWindow
=
padMessageBoxMapper
.
getActivityMsgPopUpWindow
(
request
);
if
(
ObjectUtil
.
isNull
(
activityMsgPopUpWindow
))
{
return
null
;
}
FindActivityByIdOrCycleIdQry
qryActivityInfo
=
FindActivityByIdOrCycleIdQry
.
builder
()
.
id
(
activityMsgPopUpWindow
.
getRelId
())
.
type
(
activityMsgPopUpWindow
.
getType
())
.
build
();
RpcResponse
<
ActivityRespDTO
>
rpcResponse
=
activityRemote
.
getActivityInfoByAssignId
(
qryActivityInfo
);
// 不影响主业务,如果没查询到,直接不进行弹窗
if
(!
rpcResponse
.
isSuccess
())
{
log
.
warn
(
"根据活动id或者周期id查询活动调用异常!"
);
return
null
;
}
ActivityRespDTO
result
=
rpcResponse
.
getResult
();
if
(
ObjectUtil
.
isNull
(
result
))
{
log
.
warn
(
"关联id:{}未查询到对应活动信息!"
,
activityMsgPopUpWindow
.
getRelId
());
return
null
;
}
activityMsgPopUpWindow
.
setActivityName
(
result
.
getName
());
activityMsgPopUpWindow
.
setActivityId
(
result
.
getId
());
return
activityMsgPopUpWindow
;
}
/**
* 更新活动消息弹窗状态
* @author yangwei
* @since 2026/1/4 10:37
* @param msgId 活动消息id
* @return java.lang.Boolean
*/
public
Boolean
updActivityPopUpWindowStatus
(
Integer
msgId
)
{
PadMessageBox
padMessageBox
=
new
PadMessageBox
();
padMessageBox
.
setId
(
msgId
);
padMessageBox
.
setStatus
(
1
);
padMessageBox
.
setPopupCount
(
1
);
padMessageBox
.
setLatestReadTime
(
new
Date
());
int
result
=
padMessageBoxMapper
.
updateByPrimaryKeySelective
(
padMessageBox
);
if
(
result
==
0
)
{
throw
new
RpcServiceException
(
DefaultErrorEnum
.
DATABASE_ERROR
,
"更新活动消息状态失败!"
);
}
return
true
;
}
}
}
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/util/DateUtils.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
util
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.MonthRange
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.WeekRange
;
import
cn.com.glsx.dj.mindworkplate.enums.MindWorkplateServiceErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
lombok.extern.slf4j.Slf4j
;
import
java.time.*
;
import
java.time.format.DateTimeFormatter
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.TemporalAdjusters
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/08 20:50
*/
@Slf4j
public
class
DateUtils
{
// 支持的各种日期格式
public
static
final
String
PATTERN_YYYYMMDD
=
"yyyyMMdd"
;
public
static
final
String
PATTERN_YYYY_MM_DD
=
"yyyy-MM-dd"
;
public
static
final
String
PATTERN_YYYY_MM_DD_HH_MM_SS
=
"yyyy-MM-dd HH:mm:ss"
;
public
static
final
String
PATTERN_YYYY
年
MM
月
DD
日
=
"yyyy年MM月dd日"
;
// 线程安全的日期格式化器缓存
private
static
final
Map
<
String
,
DateTimeFormatter
>
FORMATTER_CACHE
=
new
ConcurrentHashMap
<>();
private
static
final
ZoneId
SYSTEM_ZONE
=
ZoneId
.
systemDefault
();
/***
* 格式化日期
* @author yangwei
* @since 2026/1/8 20:52
* @param localDate 日期
* @param format 格式化
* @return java.lang.String
*/
public
static
String
formatLocalDate
(
LocalDate
localDate
,
String
format
)
{
if
(
localDate
==
null
||
format
==
null
)
{
return
null
;
}
DateTimeFormatter
dtf
=
DateTimeFormatter
.
ofPattern
(
format
);
return
dtf
.
format
(
localDate
);
}
/**
* <pre>
* 获取当前周的周日
* 如果今天是周日,返回今天
* 如果今天是其他日期,返回本周的周日
* </pre>
* @author yangwei
* @since 2026/1/8 21:04
* @return java.time.LocalDate
*/
public
static
LocalDate
getCurrentSunday
()
{
LocalDate
today
=
LocalDate
.
now
();
return
getSundayOfWeek
(
today
);
}
/**
* 获取当前月份的最后一天
* @author yangwei
* @since 2026/1/8 21:46
* @return java.time.LocalDate
*/
public
static
LocalDate
getCurrentMonthLastDay
()
{
LocalDate
today
=
LocalDate
.
now
();
return
getLastDayOfMonth
(
today
);
}
/**
* 获取指定日期所在周的周日
* @author yangwei
* @since 2026/1/8 21:04
* @param date 日期
* @return java.time.LocalDate
*/
public
static
LocalDate
getSundayOfWeek
(
LocalDate
date
)
{
if
(
date
==
null
)
{
date
=
LocalDate
.
now
();
}
return
date
.
with
(
TemporalAdjusters
.
nextOrSame
(
DayOfWeek
.
SUNDAY
));
}
/**
* 判断日期是否是所在周的周日
* @author yangwei
* @since 2026/1/12 15:40
* @param date 指定日期
* @return boolean
*/
public
static
boolean
isSunday
(
LocalDate
date
)
{
if
(
date
==
null
)
{
return
false
;
}
return
date
.
getDayOfWeek
()
==
DayOfWeek
.
SUNDAY
;
}
/**
* 获取指定月份的最后一天
* @author yangwei
* @since 2026/1/8 21:46
* @param date 指定日期
* @return java.time.LocalDate 月份最后一天
*/
public
static
LocalDate
getLastDayOfMonth
(
LocalDate
date
)
{
return
date
.
with
(
TemporalAdjusters
.
lastDayOfMonth
());
}
/**
* 获取日期格式化器
*/
private
static
DateTimeFormatter
getFormatter
(
String
pattern
)
{
return
FORMATTER_CACHE
.
computeIfAbsent
(
pattern
,
DateTimeFormatter:
:
ofPattern
);
}
/**
* 解析字符串日期
*/
public
static
LocalDate
parseDate
(
String
dateStr
,
String
pattern
)
{
try
{
DateTimeFormatter
formatter
=
getFormatter
(
pattern
);
return
LocalDate
.
parse
(
dateStr
,
formatter
);
}
catch
(
Exception
e
)
{
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"日期格式错误: "
+
dateStr
+
",期望格式: "
+
pattern
,
e
);
}
}
/**
* 获取指定日期所在周的范围
* @param dateStr 日期字符串
* @param inputPattern 输入日期格式
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.WeekRange
*/
public
static
WeekRange
getWeekRange
(
String
dateStr
,
String
inputPattern
)
{
LocalDate
date
=
parseDate
(
dateStr
,
inputPattern
);
return
getWeekRange
(
date
);
}
/**
* 获取指定日期所在周的范围(周一至周日)
* @author yangwei
* @since 2026/1/10 15:53
* @param date 日期
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.WeekRange
*/
public
static
WeekRange
getWeekRange
(
LocalDate
date
)
{
LocalDate
monday
=
date
.
with
(
TemporalAdjusters
.
previousOrSame
(
DayOfWeek
.
MONDAY
));
LocalDate
sunday
=
date
.
with
(
TemporalAdjusters
.
nextOrSame
(
DayOfWeek
.
SUNDAY
));
return
new
WeekRange
(
monday
,
sunday
);
}
/**
* 获取指定日期所在月份的范围
* @author yangwei
* @since 2026/1/12 11:19
* @param date 日期
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.MonthRange 月份范围
*/
public
static
MonthRange
getMonthRange
(
LocalDate
date
)
{
LocalDate
firstDay
=
date
.
with
(
TemporalAdjusters
.
firstDayOfMonth
());
LocalDate
lastDay
=
date
.
with
(
TemporalAdjusters
.
lastDayOfMonth
());
return
new
MonthRange
(
firstDay
,
lastDay
);
}
/**
* 获取指定日期字符串所在月份的范围
* @author yangwei
* @since 2026/1/12 11:19
* @param dateStr 日期字符串
* @param inputPattern 输入日期格式
* @return cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.MonthRange 月份范围
*/
public
static
MonthRange
getMonthRange
(
String
dateStr
,
String
inputPattern
)
{
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
inputPattern
);
LocalDate
date
=
LocalDate
.
parse
(
dateStr
,
formatter
);
return
getMonthRange
(
date
);
}
/**
* 将指定 LocalDate 与当前服务器时间拼接成 LocalDateTime
* @author yangwei
* @since 2026/1/12 14:13
* @param date 指定日期
* @return java.time.LocalDateTime 拼接后的 LocalDateTime
*/
public
static
LocalDateTime
combineWithCurrentTime
(
LocalDate
date
)
{
if
(
date
==
null
)
{
throw
new
IllegalArgumentException
(
"LocalDate 不能为 null"
);
}
LocalTime
currentTime
=
LocalTime
.
now
();
return
LocalDateTime
.
of
(
date
,
currentTime
);
}
// ============ 转换方法 ============
/**
* LocalDateTime 转 Date(使用系统默认时区)
*/
public
static
Date
toDate
(
LocalDateTime
dateTime
)
{
return
toDate
(
dateTime
,
SYSTEM_ZONE
);
}
/**
* LocalDateTime 转 Date(指定时区)
*/
public
static
Date
toDate
(
LocalDateTime
dateTime
,
ZoneId
zoneId
)
{
if
(
dateTime
==
null
)
{
return
null
;
}
if
(
zoneId
==
null
)
{
zoneId
=
SYSTEM_ZONE
;
}
return
Date
.
from
(
dateTime
.
atZone
(
zoneId
).
toInstant
());
}
/**
* Date 转 LocalDateTime(使用系统默认时区)
*/
public
static
LocalDateTime
toLocalDateTime
(
Date
date
)
{
return
toLocalDateTime
(
date
,
SYSTEM_ZONE
);
}
/**
* Date 转 LocalDateTime(指定时区)
*/
public
static
LocalDateTime
toLocalDateTime
(
Date
date
,
ZoneId
zoneId
)
{
if
(
date
==
null
)
{
return
null
;
}
if
(
zoneId
==
null
)
{
zoneId
=
SYSTEM_ZONE
;
}
return
LocalDateTime
.
ofInstant
(
date
.
toInstant
(),
zoneId
);
}
/**
* 判断指定日期是否是所在月份的最后一天
* @author yangwei
* @since 2026/1/12 14:23
* @param date 日期
* @return boolean true: 是最后一天,false: 不是最后一天
*/
public
static
boolean
isLastDayOfMonth
(
LocalDate
date
)
{
return
Optional
.
ofNullable
(
date
)
.
map
(
el
->
el
.
getDayOfMonth
()
==
el
.
lengthOfMonth
())
.
orElse
(
false
);
}
/**
* 获取指定区间的所有周日
* @author yangwei
* @since 2026/1/12 19:28
* @param startDateStr 起始日期 yyyy-MM-dd
* @param endDateStr 结束日期 yyyy-MM-dd
* @return java.util.List<java.lang.String>
*/
public
static
List
<
String
>
getSundaysInRange
(
String
startDateStr
,
String
endDateStr
)
{
List
<
String
>
sundays
=
new
ArrayList
<>();
try
{
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
PATTERN_YYYY_MM_DD
);
LocalDate
startDate
=
LocalDate
.
parse
(
startDateStr
,
formatter
);
LocalDate
endDate
=
LocalDate
.
parse
(
endDateStr
,
formatter
);
if
(
startDate
.
isAfter
(
endDate
))
{
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"开始日期不能晚于结束日期"
);
}
// 使用 TemporalAdjusters 找到第一个周日
LocalDate
firstSunday
=
startDate
.
with
(
TemporalAdjusters
.
nextOrSame
(
DayOfWeek
.
SUNDAY
));
// 计算有多少个完整的周
long
daysBetween
=
ChronoUnit
.
DAYS
.
between
(
firstSunday
,
endDate
);
int
weeksBetween
=
(
int
)
(
daysBetween
/
7
);
// 使用 for 循环遍历所有周日
for
(
int
week
=
0
;
week
<=
weeksBetween
;
week
++)
{
LocalDate
sunday
=
firstSunday
.
plusWeeks
(
week
);
if
(!
sunday
.
isAfter
(
endDate
))
{
sundays
.
add
(
sunday
.
format
(
formatter
));
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"日期解析错误: "
,
e
);
throw
e
;
}
return
sundays
;
}
/**
* 获取指定日期所在月份的所有月末
* @author yangwei
* @since 2026/1/12 19:28
* @param startDateStr 起始日期 yyyy-MM-dd
* @param endDateStr 结束日期 yyyy-MM-dd
* @return java.util.List<java.lang.String>
*/
public
static
List
<
String
>
getMonthEndsInRange
(
String
startDateStr
,
String
endDateStr
)
{
List
<
String
>
monthEnds
=
new
ArrayList
<>();
try
{
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
PATTERN_YYYY_MM_DD
);
LocalDate
startDate
=
LocalDate
.
parse
(
startDateStr
,
formatter
);
LocalDate
endDate
=
LocalDate
.
parse
(
endDateStr
,
formatter
);
if
(
startDate
.
isAfter
(
endDate
))
{
throw
new
RpcServiceException
(
MindWorkplateServiceErrorEnum
.
COMMON_ERROR
,
"开始日期不能晚于结束日期"
);
}
// 获取起始月份和结束月份的 YearMonth
YearMonth
startMonth
=
YearMonth
.
from
(
startDate
);
YearMonth
endMonth
=
YearMonth
.
from
(
endDate
);
// 计算月份差,使用 for 循环
long
monthsBetween
=
ChronoUnit
.
MONTHS
.
between
(
startMonth
,
endMonth
)
+
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
)
{
log
.
error
(
"日期解析错误: "
,
e
);
throw
e
;
}
return
monthEnds
;
}
}
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/DigitalManagementStaffRecordMapper.xml
View file @
1d8d5eb
...
@@ -326,4 +326,94 @@
...
@@ -326,4 +326,94 @@
order by si.register_time, si.created_date desc
order by si.register_time, si.created_date desc
</select>
</select>
<select
id=
"findReportByUuidAndDate"
resultType=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffRecordDTO"
>
select id, staff_uuid staffUuid, template_code templateCode, DATE_FORMAT(created_date, '%Y%m%d') as submitDate
from digital_management_staff_record
<where>
deleted_flag = 'N'
and template_code = #{code}
<if
test=
"dates != null and dates.size() > 0"
>
and DATE_FORMAT(created_date, '%Y%m%d') in
<foreach
collection=
"dates"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
and staff_uuid = #{uuid}
</where>
</select>
<select
id=
"findStaffGoodNewsTemplate"
resultType=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.StaffGoodNewsTemplateRespDTO"
>
SELECT
t3.code ,
t3.name ,
t3.`type`,
t3.type_name as typeName,
t3.scene_type sceneType,
t3.business_type businessType,
t3.report_type reportType,
t3.id
FROM (
SELECT t1.*
FROM digital_management_template_staff_ref t1
where
NOT EXISTS (
SELECT 1
FROM digital_management_template_staff_ref t2
WHERE t2.template_code = t1.template_code
AND t2.deleted_flag = 'N'
AND (
t2.effective_date > t1.effective_date
OR (t2.effective_date = t1.effective_date AND t2.id > t1.id)
)
)
AND t1.deleted_flag = 'N'
) AS latest_templates
join digital_management_template t3 on latest_templates.template_code = t3.code and t3.deleted_flag = 'N'
<where>
<if
test=
"uuid != null and uuid != ''"
>
and FIND_IN_SET(#{uuid}, staff_uuid_list) > 0
</if>
<if
test=
"sceneType != null"
>
and t3.scene_type = #{sceneType}
</if>
<if
test=
"reportType != null"
>
and t3.report_type = #{reportType}
</if>
</where>
ORDER BY t3.report_type, t3.code
</select>
<select
id=
"selectSubmitCountAssignRange"
resultType=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SubmitCountDTO"
>
select
staff_uuid uuid, count(0) submitCount
from digital_management_staff_record
where
staff_uuid in
<foreach
item=
"item"
collection=
"uuids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
and deleted_flag = 'N'
and DATE_FORMAT(created_date, '%Y%m%d') between #{startDate} and #{endDate}
and template_code = #{templateCode}
group by staff_uuid
</select>
<select
id=
"selectRecentlySubmitDate"
resultType=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SubmitCountDTO"
>
select
staff_uuid uuid, created_date recentlySubmitDate
from digital_management_staff_record
where
staff_uuid in
<foreach
item=
"item"
collection=
"uuids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
and template_code = #{templateCode}
and deleted_flag = 'N'
group by staff_uuid
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/DigitalManagementTemplateMapper.xml
View file @
1d8d5eb
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"display_summary"
property=
"displaySummary"
jdbcType=
"INTEGER"
/>
<result
column=
"display_summary"
property=
"displaySummary"
jdbcType=
"INTEGER"
/>
<result
column=
"extend_field"
property=
"extendField"
jdbcType=
"VARCHAR"
/>
<result
column=
"extend_field"
property=
"extendField"
jdbcType=
"VARCHAR"
/>
<result
column=
"scene_type"
property=
"sceneType"
jdbcType=
"INTEGER"
/>
<result
column=
"business_type"
property=
"businessType"
jdbcType=
"INTEGER"
/>
<result
column=
"report_type"
property=
"reportType"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<resultMap
id=
"SimpleDTOResult"
type=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO"
extends=
"BaseResultMap"
/>
<resultMap
id=
"SimpleDTOResult"
type=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO"
extends=
"BaseResultMap"
/>
<resultMap
id=
"DTOResult"
type=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO"
extends=
"BaseResultMap"
>
<resultMap
id=
"DTOResult"
type=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO"
extends=
"BaseResultMap"
>
...
@@ -29,7 +32,7 @@
...
@@ -29,7 +32,7 @@
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
id, code, name, type, type_name, created_by, created_date, updated_by, updated_date,
id, code, name, type, type_name, created_by, created_date, updated_by, updated_date,
deleted_flag,extend_field, display_summary
deleted_flag,extend_field, display_summary
,scene_type ,business_type ,report_type
</sql>
</sql>
<select
id=
"findAllType"
resultMap=
"SimpleDTOResult"
>
<select
id=
"findAllType"
resultMap=
"SimpleDTOResult"
>
...
...
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/DigitalManagementTemplateStaffRefMapper.xml
View file @
1d8d5eb
...
@@ -115,4 +115,32 @@
...
@@ -115,4 +115,32 @@
</if>
</if>
</where>
</where>
</select>
</select>
<resultMap
id=
"TemplateStaffRefDTO"
type=
"cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.TemplateStaffRefDTO"
extends=
"BaseResultMap"
>
<result
column=
"target_date"
property=
"targetDate"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"findLatestRecordsByDates"
resultMap=
"TemplateStaffRefDTO"
>
SELECT
d.*,
tmp.target_date
FROM (
<foreach
collection=
"targetDates"
item=
"date"
index=
"index"
separator=
" UNION ALL "
>
SELECT #{date} AS target_date
</foreach>
) tmp
LEFT JOIN digital_management_template_staff_ref d ON d.id = (
SELECT d1.id
FROM digital_management_template_staff_ref d1
WHERE d1.deleted_flag = 'N'
AND d1.template_code = #{templateCode}
AND d1.effective_date
<
= tmp.target_date
ORDER BY d1.effective_date DESC
LIMIT 1
)
WHERE d.id IS NOT NULL
ORDER BY tmp.target_date
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/EmployeeBadgeMapper.xml
View file @
1d8d5eb
...
@@ -125,11 +125,9 @@
...
@@ -125,11 +125,9 @@
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
<if
test=
"condition.storePhoneList != null and condition.storePhoneList.size>0"
>
AND t1.phone_number in
<if
test=
"condition.customerPhone != null"
>
<foreach
close=
")"
collection=
"condition.storePhoneList"
item=
"item"
open=
"("
separator=
","
>
AND re.phone_number like concat('%', #{condition.customerPhone}, '%')
#{item}
</foreach>
</if>
</if>
<if
test=
"condition.recDevList != null and condition.recDevList.size>0"
>
<if
test=
"condition.recDevList != null and condition.recDevList.size>0"
>
AND t1.badge_id in
AND t1.badge_id in
...
@@ -459,6 +457,9 @@
...
@@ -459,6 +457,9 @@
<if
test=
"condition.enterpriseCustomerFlag != null and condition.enterpriseCustomerFlag ==1 "
>
<if
test=
"condition.enterpriseCustomerFlag != null and condition.enterpriseCustomerFlag ==1 "
>
and t1.customer_name like concat('%','公司','%')
and t1.customer_name like concat('%','公司','%')
</if>
</if>
<if
test=
"condition.customerPhone != null and condition.customerPhone != ''"
>
and t1.phone_number like concat('%',#{condition.customerPhone},'%')
</if>
and t2.badge_id is not null
and t2.badge_id is not null
</select>
</select>
...
...
rpc-dj-mindworkplate/src/main/resources/META-INF/orm/PadMessageBoxMapper.xml
View file @
1d8d5eb
...
@@ -328,4 +328,23 @@
...
@@ -328,4 +328,23 @@
group by module_type
group by module_type
</where>
</where>
</select>
</select>
<select
id=
"getActivityMsgPopUpWindow"
resultType=
"cn.com.glsx.dj.mindworkplate.dto.messagebox.ActivityMessagePopUpWindowRespDTO"
>
select
t2.rel_id as relId,
t2.`type`,
t1.id as msgId
from pad_message_box t1
inner join activity_msg_relation t2 on t1.id = t2.msg_box_id
where
t1.del_flag = 'N'
and t1.module_type = '5'
and t1.uuid = #{uuid}
and t1.business_type = #{businessType}
and t1.status = 0
and t1.created_time >= DATE_SUB(CURDATE(), interval 6 day)
order by t2.`type` desc, t1.created_time desc
limit 1
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-mindworkplate/src/main/resources/templates/rec_template2.xlsx
View file @
1d8d5eb
No preview for this file type
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/handler/ReportUnSummitStatisticsHandlerTest.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
handler
;
import
cn.com.glsx.dj.mindworkplate.enums.GoodNewsTemplateReportTypeEnum
;
import
cn.com.glsx.dj.mindworkplate.service.BaseServiceTest
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/13 15:17
*/
public
class
ReportUnSummitStatisticsHandlerTest
extends
BaseServiceTest
{
@Autowired
private
ReportUnSummitStatisticsHandler
reportUnSummitStatisticsHandler
;
@Test
public
void
statisticsThenPushTest
()
{
// GoodNewsTemplateReportTypeEnum reportType = GoodNewsTemplateReportTypeEnum.DAY;
// reportUnSummitStatisticsHandler.statisticsThenPush(reportType);
GoodNewsTemplateReportTypeEnum
reportType2
=
GoodNewsTemplateReportTypeEnum
.
MONTH
;
reportUnSummitStatisticsHandler
.
statisticsThenPush
(
reportType2
);
// GoodNewsTemplateReportTypeEnum reportType3 = GoodNewsTemplateReportTypeEnum.WEEK;
// reportUnSummitStatisticsHandler.statisticsThenPush(reportType3);
}
}
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/remote/DigitalManagementRecordRemoteImplTest.java
0 → 100644
View file @
1d8d5eb
package
cn
.
com
.
glsx
.
dj
.
mindworkplate
.
remote
;
import
cn.com.glsx.dj.mindworkplate.constant.DigitalManagementConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.DigitalManagementTemplateDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.service.BaseServiceTest
;
import
cn.hutool.core.date.DateUtil
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/10 16:36
*/
public
class
DigitalManagementRecordRemoteImplTest
extends
BaseServiceTest
{
@Autowired
private
DigitalManagementRecordRemote
digitalManagementRecordRemote
;
@Test
public
void
testSave
()
throws
InterruptedException
{
String
uuid
=
"8d554ca1acd44dcd9739e159591d4c99"
;
int
loginRole
=
DigitalManagementConstants
.
LOGIN_ROLE_FLIGHT_SUPERVISION
;
Map
<
String
,
String
>
form
=
new
HashMap
<>();
// form.put("key", "value");
// uuid-temp-001
form
.
put
(
"managedStoreCount"
,
"32"
);
form
.
put
(
"equityStoreAverageCartValue"
,
"99999"
);
form
.
put
(
"equityStorePenetrationAverage"
,
"100"
);
form
.
put
(
"warrantyStoreAverageCartValue"
,
"323"
);
form
.
put
(
"warrantyStorePenetrationAverage"
,
"31"
);
form
.
put
(
"boutiqueStoreAverageCartValue"
,
"31"
);
form
.
put
(
"boutiqueStorePenetrationAverage"
,
"100"
);
form
.
put
(
"isTrainingOrganized"
,
"是"
);
form
.
put
(
"trainingTitle"
,
"321313"
);
form
.
put
(
"attendingStaff"
,
"ttt,张桂芬,八戒"
);
form
.
put
(
"trainingMode"
,
"线上培训"
);
form
.
put
(
"tencentMeetingRecordingLink"
,
"321213213"
);
form
.
put
(
"trainingPhotos"
,
"http://qcimg01.glsx.com.cn/group1/M00/08/F6/wKgD3meE3xuABFu4AAGYwZrRrPU631.png"
);
form
.
put
(
"todayInterview"
,
"32"
);
form
.
put
(
"interviewPassed"
,
"32"
);
form
.
put
(
"thisMonthOnboarding"
,
"32"
);
form
.
put
(
"thisMonthPendingRecruits"
,
"43"
);
form
.
put
(
"todayReception"
,
"43"
);
form
.
put
(
"todayTransactions"
,
"43"
);
form
.
put
(
"todaySummary"
,
"dsadshadsjadjksajdkla"
);
form
.
put
(
"tomorrowPlan"
,
"dadsadsadsad"
);
form
.
put
(
"dayOffStatus"
,
"是"
);
form
.
put
(
"reportDate"
,
"2025-04-08"
);
SaveStaffRecordRequestDTO
saveStaffRecordRequestDTO
=
new
SaveStaffRecordRequestDTO
(
loginRole
,
uuid
,
form
);
saveStaffRecordRequestDTO
.
setTemplateCode
(
"uuid-temp-011"
);
System
.
out
.
println
(
digitalManagementRecordRemote
.
save
(
saveStaffRecordRequestDTO
));
// uuid-temp-012
// Map<String, String> form = temp012();
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO = new SaveStaffRecordRequestDTO(loginRole, uuid, form);
// saveStaffRecordRequestDTO.setTemplateCode("uuid-temp-012");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO));
// Map<String, String> form2 = new HashMap<>(temp013());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO2 = new SaveStaffRecordRequestDTO(loginRole, uuid, form2);
// saveStaffRecordRequestDTO2.setTemplateCode("uuid-temp-013");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO2));
// Map<String, String> form1 = new HashMap<>(temp014());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO3 = new SaveStaffRecordRequestDTO(loginRole, uuid, form1);
// saveStaffRecordRequestDTO3.setTemplateCode("uuid-temp-014");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO3));
// Map<String, String> form = temp015();
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO = new SaveStaffRecordRequestDTO(loginRole, uuid, form);
// saveStaffRecordRequestDTO.setTemplateCode("uuid-temp-015");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO));
//
//
// Map<String, String> form2 = new HashMap<>(temp016());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO2 = new SaveStaffRecordRequestDTO(loginRole, uuid, form2);
// saveStaffRecordRequestDTO2.setTemplateCode("uuid-temp-014");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO2));
// Map<String, String> form1 = new HashMap<>(temp017());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO3 = new SaveStaffRecordRequestDTO(loginRole, uuid, form1);
// saveStaffRecordRequestDTO3.setTemplateCode("uuid-temp-017");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO3));
// Map<String, String> form1 = temp018();
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO = new SaveStaffRecordRequestDTO(loginRole, uuid, form1);
// saveStaffRecordRequestDTO.setTemplateCode("uuid-temp-018");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO));
// Map<String, String> form2 = new HashMap<>(temp019());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO2 = new SaveStaffRecordRequestDTO(loginRole, uuid, form2);
// saveStaffRecordRequestDTO2.setTemplateCode("uuid-temp-019");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO2));
//
// Map<String, String> form3 = new HashMap<>(temp020());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO3 = new SaveStaffRecordRequestDTO(loginRole, uuid, form3);
// saveStaffRecordRequestDTO3.setTemplateCode("uuid-temp-020");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO3));
// Map<String, String> form4 = temp021();
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO4 = new SaveStaffRecordRequestDTO(loginRole, uuid, form4);
// saveStaffRecordRequestDTO4.setTemplateCode("uuid-temp-021");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO4));
// Map<String, String> form5 = new HashMap<>(temp022());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO5 = new SaveStaffRecordRequestDTO(loginRole, uuid, form5);
// saveStaffRecordRequestDTO5.setTemplateCode("uuid-temp-022");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO5));
//
// Map<String, String> form6 = new HashMap<>(temp023());
// SaveStaffRecordRequestDTO saveStaffRecordRequestDTO6 = new SaveStaffRecordRequestDTO(loginRole, uuid, form6);
// saveStaffRecordRequestDTO6.setTemplateCode("uuid-temp-023");
// System.out.println(digitalManagementRecordRemote.save(saveStaffRecordRequestDTO6));
Thread
.
sleep
(
1000
*
60
*
60
);
}
@Test
public
void
testRecordSummary
()
throws
InterruptedException
{
// DigitalManagementTemplateDTO templateDTO1 = new DigitalManagementTemplateDTO();
// templateDTO1.setCode("uuid-temp-001");
// templateDTO1.setStartTime(DateUtil.parse("2026-01-01 00:00:00", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// templateDTO1.setEndTime(DateUtil.parse("2026-01-13 23:59:59", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// System.out.println(digitalManagementRecordRemote.recordSummary(templateDTO1));
//
// DigitalManagementTemplateDTO templateDTO2 = new DigitalManagementTemplateDTO();
// templateDTO2.setCode("uuid-temp-014");
// templateDTO2.setStartTime(DateUtil.parse("2026-01-11 00:00:00", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// templateDTO2.setEndTime(DateUtil.parse("2026-01-11 23:59:59", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// System.out.println(digitalManagementRecordRemote.recordSummary(templateDTO2));
//
// DigitalManagementTemplateDTO templateDTO3 = new DigitalManagementTemplateDTO();
// templateDTO3.setCode("uuid-temp-019");
// templateDTO3.setStartTime(DateUtil.parse("2026-01-01 00:00:00", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// templateDTO3.setEndTime(DateUtil.parse("2026-01-13 23:59:59", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// System.out.println(digitalManagementRecordRemote.recordSummary(templateDTO3));
// DigitalManagementStaffRecordDTO templateDTO4 = new DigitalManagementStaffRecordDTO();
// templateDTO4.setTemplateCode("uuid-temp-014");
// templateDTO4.setStartTime(DateUtil.parse("2025-12-23 00:00:00", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// templateDTO4.setEndTime(DateUtil.parse("2026-01-14 23:59:59", cn.com.glsx.framework.core.util.DateUtils.DEFAULT_DATE_FORMAT4));
// System.out.println(digitalManagementRecordRemote.staffRecordSummary(templateDTO4));
DigitalManagementTemplateDTO
templateDTO5
=
new
DigitalManagementTemplateDTO
();
templateDTO5
.
setCode
(
"uuid-temp-018"
);
templateDTO5
.
setStartTime
(
DateUtil
.
parse
(
"2025-11-01 00:00:00"
,
cn
.
com
.
glsx
.
framework
.
core
.
util
.
DateUtils
.
DEFAULT_DATE_FORMAT4
));
templateDTO5
.
setEndTime
(
DateUtil
.
parse
(
"2025-11-30 23:59:59"
,
cn
.
com
.
glsx
.
framework
.
core
.
util
.
DateUtils
.
DEFAULT_DATE_FORMAT4
));
System
.
out
.
println
(
digitalManagementRecordRemote
.
recordSummary
(
templateDTO5
));
Thread
.
sleep
(
1000
*
60
*
60
);
}
/**
* 临时数据 uuid-temp-021
* @author yangwei
* @since 2026/1/11 16:33
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public
Map
<
String
,
String
>
temp021
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"monthlyStoreLocation021"
,
"明明塘朗4s店"
);
form
.
put
(
"monthlyCustomerTalk021"
,
"287"
);
form
.
put
(
"monthlyTransaction021"
,
"15"
);
form
.
put
(
"monthlyOutput021"
,
"8000000"
);
form
.
put
(
"monthlyTransactionRate021"
,
"99.99"
);
form
.
put
(
"workSummaryContent021"
,
"我是工作总结总结总结"
);
return
form
;
}
/**
* 临时数据 uuid-temp-022
* @author yangwei
* @since 2026/1/11 16:33
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public
Map
<
String
,
String
>
temp022
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"monthlyStoreLocation022"
,
"明明塘朗4s店"
);
form
.
put
(
"monthlyCustomerTalk022"
,
"287"
);
form
.
put
(
"monthlyTransaction022"
,
"15"
);
form
.
put
(
"monthlyOutput022"
,
"8000000"
);
form
.
put
(
"monthlyTransactionRate022"
,
"99.99"
);
form
.
put
(
"workSummaryContent022"
,
"我是工作总结总结总结"
);
return
form
;
}
/**
* 临时数据 uuid-temp-023
* @author yangwei
* @since 2026/1/11 16:33
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public
Map
<
String
,
String
>
temp023
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"monthlyStoreLocation023"
,
"明明塘朗4s店"
);
form
.
put
(
"monthlyCustomerTalk023"
,
"287"
);
form
.
put
(
"monthlyTransaction023"
,
"15"
);
form
.
put
(
"monthlyOutput023"
,
"8000000"
);
form
.
put
(
"monthlyTransactionRate023"
,
"99.99"
);
form
.
put
(
"workSummaryContent023"
,
"我是工作总结总结总结"
);
return
form
;
}
/**
* 临时数据 uuid-temp-019
* @author yangwei
* @since 2026/1/11 16:33
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public
Map
<
String
,
String
>
temp019
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"directStores019"
,
"5"
);
form
.
put
(
"target019"
,
"400"
);
form
.
put
(
"actualAchievement019"
,
"50"
);
form
.
put
(
"completionRate019"
,
"8"
);
form
.
put
(
"operationProblemReviewContent019"
,
"火花,一稿"
);
form
.
put
(
"operationStrategy019"
,
"运营策略策略"
);
form
.
put
(
"humanResourceReserve019"
,
"储备储备储备"
);
return
form
;
}
/**
* 临时数据 uuid-temp-020
* @author yangwei
* @since 2026/1/11 16:33
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public
Map
<
String
,
String
>
temp020
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"directStores020"
,
"5"
);
form
.
put
(
"target020"
,
"400"
);
form
.
put
(
"actualAchievement020"
,
"50"
);
form
.
put
(
"completionRate020"
,
"8"
);
form
.
put
(
"operationProblemReviewContent020"
,
"火花,一稿"
);
form
.
put
(
"operationStrategy020"
,
"运营策略策略"
);
form
.
put
(
"humanResourceReserve020"
,
"储备储备储备"
);
return
form
;
}
/**
* 临时数据 uuid-temp-018
* @author yangwei
* @since 2026/1/11 16:33
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public
Map
<
String
,
String
>
temp018
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"directStores018"
,
"5"
);
form
.
put
(
"target018"
,
"400"
);
form
.
put
(
"actualAchievement018"
,
"50"
);
form
.
put
(
"completionRate018"
,
"8"
);
form
.
put
(
"operationProblemReviewContent018"
,
"火花,一稿"
);
form
.
put
(
"operationStrategy018"
,
"运营策略策略"
);
form
.
put
(
"humanResourceReserve018"
,
"储备储备储备"
);
return
form
;
}
/**
* 区域经理数据
* @author yangwei
* @since 2026/1/11 16:33
* @return java.util.Map<java.lang.String,java.lang.String>
*/
public
Map
<
String
,
String
>
temp012
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"weeklyStartedStores012"
,
"1"
);
form
.
put
(
"weeklyLostStores012"
,
"4"
);
form
.
put
(
"weeklyNewStoreRevenue012"
,
"534.32"
);
form
.
put
(
"monthlyStoreOutputTarget012"
,
"500000"
);
form
.
put
(
"monthlyStoreCumulativeAchievement012"
,
"5000"
);
form
.
put
(
"monthlyTimeProgress012"
,
"56.78"
);
form
.
put
(
"monthlyOutputAchievementRate012"
,
"76.45"
);
form
.
put
(
"monthlyAchievementGap012"
,
"11.23"
);
form
.
put
(
"weeklyNewHires012"
,
"6"
);
form
.
put
(
"weeklyDepartures012"
,
"7"
);
form
.
put
(
"weeklyPendingRecruitment012"
,
"132"
);
form
.
put
(
"workSummaryContent012"
,
"我是区域总结总结总结"
);
return
form
;
}
public
Map
<
String
,
String
>
temp013
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"weeklyStartedStores013"
,
"1"
);
form
.
put
(
"weeklyLostStores013"
,
"4"
);
form
.
put
(
"weeklyNewStoreRevenue013"
,
"534.32"
);
form
.
put
(
"monthlyStoreOutputTarget013"
,
"500000"
);
form
.
put
(
"monthlyStoreCumulativeAchievement013"
,
"5000"
);
form
.
put
(
"monthlyTimeProgress013"
,
"56.78"
);
form
.
put
(
"monthlyOutputAchievementRate013"
,
"76.45"
);
form
.
put
(
"monthlyAchievementGap013"
,
"11.23"
);
form
.
put
(
"weeklyNewHires013"
,
"6"
);
form
.
put
(
"weeklyDepartures013"
,
"7"
);
form
.
put
(
"weeklyPendingRecruitment013"
,
"132"
);
form
.
put
(
"workSummaryContent013"
,
"我是区域总结总结总结013013013013013013"
);
return
form
;
}
public
Map
<
String
,
String
>
temp014
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"weeklyStartedStores014"
,
"1"
);
form
.
put
(
"weeklyLostStores014"
,
"4"
);
form
.
put
(
"weeklyNewStoreRevenue014"
,
"534.32"
);
form
.
put
(
"monthlyStoreOutputTarget014"
,
"500000"
);
form
.
put
(
"monthlyStoreCumulativeAchievement014"
,
"5000"
);
form
.
put
(
"monthlyTimeProgress014"
,
"56.78"
);
form
.
put
(
"monthlyOutputAchievementRate014"
,
"76.45"
);
form
.
put
(
"monthlyAchievementGap014"
,
"11.23"
);
form
.
put
(
"weeklyNewHires014"
,
"6"
);
form
.
put
(
"weeklyDepartures014"
,
"7"
);
form
.
put
(
"weeklyPendingRecruitment014"
,
"132"
);
form
.
put
(
"workSummaryContent014"
,
"我是区域总结总结总结013013013013013013"
);
return
form
;
}
public
Map
<
String
,
String
>
temp015
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"weeklyStoreLocation015"
,
"明明长岭4s店"
);
form
.
put
(
"weeklyCarDelivery015"
,
"4"
);
form
.
put
(
"weeklyCustomerContact015"
,
"32"
);
form
.
put
(
"weeklyTransaction015"
,
"2"
);
form
.
put
(
"weeklyOutput015"
,
"50321.5"
);
form
.
put
(
"monthlyCustomerTalk015"
,
"78"
);
form
.
put
(
"monthlyTransaction015"
,
"6"
);
form
.
put
(
"monthlyOutput015"
,
"90321.5"
);
form
.
put
(
"workSummaryContent015"
,
"我是运营主管总结总结总结异步异步异步015015015015015015"
);
return
form
;
}
public
Map
<
String
,
String
>
temp016
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"weeklyStoreLocation016"
,
"明明长岭4s店"
);
form
.
put
(
"weeklyCarDelivery016"
,
"4"
);
form
.
put
(
"weeklyCustomerContact016"
,
"32"
);
form
.
put
(
"weeklyTransaction016"
,
"21"
);
form
.
put
(
"weeklyOutput016"
,
"50321.5"
);
form
.
put
(
"monthlyCustomerTalk016"
,
"78"
);
form
.
put
(
"monthlyTransaction016"
,
"61"
);
form
.
put
(
"monthlyOutput016"
,
"90321.52"
);
form
.
put
(
"workSummaryContent016"
,
"一步一步一步我是运营主管总结总结总结016016016016016016016016测试修改"
);
return
form
;
}
public
Map
<
String
,
String
>
temp017
()
{
Map
<
String
,
String
>
form
=
new
HashMap
<>();
form
.
put
(
"weeklyStoreLocation017"
,
"明明长岭4s店_update"
);
form
.
put
(
"weeklyCarDelivery017"
,
"4"
);
form
.
put
(
"weeklyCustomerContact017"
,
"32"
);
form
.
put
(
"weeklyTransaction017"
,
"2"
);
form
.
put
(
"weeklyOutput017"
,
"50321.5"
);
form
.
put
(
"monthlyCustomerTalk017"
,
"78"
);
form
.
put
(
"monthlyTransaction017"
,
"6"
);
form
.
put
(
"monthlyOutput017"
,
"90321.5"
);
form
.
put
(
"workSummaryContent017"
,
"一步一步走到哪最高的赵高,测试修改"
);
return
form
;
}
}
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/service/EmployeeBadgeServiceTest.java
View file @
1d8d5eb
...
@@ -117,12 +117,6 @@ public class EmployeeBadgeServiceTest extends BaseServiceTest{
...
@@ -117,12 +117,6 @@ public class EmployeeBadgeServiceTest extends BaseServiceTest{
employeeBadgeDTO
.
setSearchStartDate
(
"2024-06-01"
);
employeeBadgeDTO
.
setSearchStartDate
(
"2024-06-01"
);
employeeBadgeDTO
.
setSearchEndDate
(
"2024-06-30"
);
employeeBadgeDTO
.
setSearchEndDate
(
"2024-06-30"
);
employeeBadgeDTO
.
setBussinessType
(
1
);
employeeBadgeDTO
.
setBussinessType
(
1
);
employeeBadgeDTO
.
setQualityTestScoreBegin
(
1
);
employeeBadgeDTO
.
setQualityTestScoreEnd
(
30
);
employeeBadgeDTO
.
setOrderTransactionFlag
(
1
);
employeeBadgeDTO
.
setOrderAxbTransactionFlag
(
1
);
employeeBadgeDTO
.
setOrderTransactionAmount
(
new
BigDecimal
(
10
));
employeeBadgeDTO
.
setCarBrandIds
(
Arrays
.
asList
(
1
,
2
));
String
s
=
employeeBadgeService
.
customerBaseListExportV2
(
employeeBadgeDTO
);
String
s
=
employeeBadgeService
.
customerBaseListExportV2
(
employeeBadgeDTO
);
log
.
info
(
"返回结果{}"
,
JSONObject
.
toJSONString
(
s
));
log
.
info
(
"返回结果{}"
,
JSONObject
.
toJSONString
(
s
));
}
}
...
...
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementStaffRecordServiceTest.java
View file @
1d8d5eb
...
@@ -3,6 +3,7 @@ package cn.com.glsx.dj.mindworkplate.service.digitalmanagement;
...
@@ -3,6 +3,7 @@ package cn.com.glsx.dj.mindworkplate.service.digitalmanagement;
import
cn.com.glsx.dj.mindworkplate.constant.DigitalManagementConstants
;
import
cn.com.glsx.dj.mindworkplate.constant.DigitalManagementConstants
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.dto.digitalmanagement.SaveStaffRecordRequestDTO
;
import
cn.com.glsx.dj.mindworkplate.service.BaseServiceTest
;
import
cn.com.glsx.dj.mindworkplate.service.BaseServiceTest
;
import
cn.hutool.json.JSONUtil
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,6 +21,14 @@ public class DigitalManagementStaffRecordServiceTest extends BaseServiceTest {
...
@@ -20,6 +21,14 @@ public class DigitalManagementStaffRecordServiceTest extends BaseServiceTest {
@Autowired
@Autowired
private
DigitalManagementStaffRecordService
digitalManagementStaffRecordService
;
private
DigitalManagementStaffRecordService
digitalManagementStaffRecordService
;
@Autowired
private
DigitalManagementTemplateService
digitalManagementTemplateService
;
@Test
public
void
testTypeList
()
{
System
.
out
.
println
(
JSONUtil
.
toJsonStr
(
digitalManagementTemplateService
.
typeList
(
null
)));
}
@Test
@Test
public
void
testSave
()
{
public
void
testSave
()
{
String
uuid
=
"b8039dc086c34f54966e425f6f789737"
;
String
uuid
=
"b8039dc086c34f54966e425f6f789737"
;
...
...
rpc-dj-mindworkplate/src/test/java/cn/com/glsx/dj/mindworkplate/service/digitalmenagement/DigitalManagementServiceTest.java
View file @
1d8d5eb
...
@@ -19,7 +19,6 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
...
@@ -19,7 +19,6 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import
cn.com.glsx.framework.core.util.DateUtils
;
import
cn.com.glsx.framework.core.util.DateUtils
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
...
@@ -239,8 +238,9 @@ public class DigitalManagementServiceTest extends BaseServiceTest {
...
@@ -239,8 +238,9 @@ public class DigitalManagementServiceTest extends BaseServiceTest {
RpcPagination
<
DigitalManagementStaffRecordDTO
>
req
=
new
RpcPagination
<>();
RpcPagination
<
DigitalManagementStaffRecordDTO
>
req
=
new
RpcPagination
<>();
DigitalManagementStaffRecordDTO
condition
=
new
DigitalManagementStaffRecordDTO
();
DigitalManagementStaffRecordDTO
condition
=
new
DigitalManagementStaffRecordDTO
();
condition
.
setTypeName
(
"督导培训日报模板"
);
condition
.
setTypeName
(
"督导培训日报模板"
);
condition
.
setStartTime
(
DateUtil
.
parse
(
"2025-04-08"
,
"yyyy-MM-dd"
));
condition
.
setTemplateCode
(
"uuid-temp-001"
);
condition
.
setEndTime
(
DateUtil
.
parse
(
"2025-04-08"
,
"yyyy-MM-dd"
));
condition
.
setStartTime
(
DateUtil
.
parse
(
"2026-01-12 00:00:00"
,
"yyyy-MM-dd HH:mm:ss"
));
condition
.
setEndTime
(
DateUtil
.
parse
(
"2026-01-12 23:59:59"
,
"yyyy-MM-dd HH:mm:ss"
));
// condition.setOrderByType(2);
// condition.setOrderByType(2);
// condition.setOrderByKey("managedStoreCount");
// condition.setOrderByKey("managedStoreCount");
req
.
setCondition
(
condition
);
req
.
setCondition
(
condition
);
...
@@ -248,29 +248,29 @@ public class DigitalManagementServiceTest extends BaseServiceTest {
...
@@ -248,29 +248,29 @@ public class DigitalManagementServiceTest extends BaseServiceTest {
req
.
setPageNum
(
1
);
req
.
setPageNum
(
1
);
Page
<
DigitalManagementStaffRecordDTO
>
res
=
staffRecordService
.
recordPage
(
req
);
Page
<
DigitalManagementStaffRecordDTO
>
res
=
staffRecordService
.
recordPage
(
req
);
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
condition
.
setOrderByKey
(
"managedStoreCount"
);
//
condition.setOrderByKey("managedStoreCount");
res
=
staffRecordService
.
recordPage
(
req
);
//
res = staffRecordService.recordPage(req);
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
//
System.out.println(JSON.toJSONString(res));
condition
.
setOrderByKey
(
"equityStoreAverageCartValue"
);
//
condition.setOrderByKey("equityStoreAverageCartValue");
res
=
staffRecordService
.
recordPage
(
req
);
//
res = staffRecordService.recordPage(req);
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
//
System.out.println(JSON.toJSONString(res));
condition
.
setOrderByKey
(
"equityStorePenetrationAverage"
);
//
condition.setOrderByKey("equityStorePenetrationAverage");
res
=
staffRecordService
.
recordPage
(
req
);
//
res = staffRecordService.recordPage(req);
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
//
System.out.println(JSON.toJSONString(res));
condition
.
setOrderByKey
(
"warrantyStoreAverageCartValue"
);
//
condition.setOrderByKey("warrantyStoreAverageCartValue");
res
=
staffRecordService
.
recordPage
(
req
);
//
res = staffRecordService.recordPage(req);
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
//
System.out.println(JSON.toJSONString(res));
condition
.
setOrderByKey
(
"boutiqueStorePenetrationAverage"
);
//
condition.setOrderByKey("boutiqueStorePenetrationAverage");
res
=
staffRecordService
.
recordPage
(
req
);
//
res = staffRecordService.recordPage(req);
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
//
System.out.println(JSON.toJSONString(res));
}
}
@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