Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
57eebe38
Commit
57eebe38
authored
Apr 11, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加消息发送系统
parent
e23f369d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
2 deletions
+92
-2
portal-manager/src/main/java/com/mortals/xhx/common/code/AppSourceEnum.java
.../main/java/com/mortals/xhx/common/code/AppSourceEnum.java
+66
-0
portal-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
...ortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
+1
-1
portal-manager/src/main/java/com/mortals/xhx/module/message/service/impl/MessageConfigServiceImpl.java
...module/message/service/impl/MessageConfigServiceImpl.java
+25
-1
No files found.
portal-manager/src/main/java/com/mortals/xhx/common/code/AppSourceEnum.java
0 → 100644
View file @
57eebe38
package
com.mortals.xhx.common.code
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
/**
* 消息类型(等待超时预警,办理超时预警,差评预警)枚举类
*
* @author zxfei
*/
public
enum
AppSourceEnum
{
等待超时预警
(
"等待超时预警"
,
"排号系统"
),
办理超时预警
(
"办理超时预警"
,
"排号系统"
),
差评预警
(
"差评预警"
,
"评价系统"
);
private
String
value
;
private
String
desc
;
AppSourceEnum
(
String
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
String
getValue
()
{
return
this
.
value
;
}
public
String
getDesc
()
{
return
this
.
desc
;
}
public
static
AppSourceEnum
getByValue
(
String
value
)
{
for
(
AppSourceEnum
messageTypeEnum
:
AppSourceEnum
.
values
())
{
if
(
messageTypeEnum
.
getValue
()
==
value
)
{
return
messageTypeEnum
;
}
}
return
null
;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public
static
Map
<
String
,
String
>
getEnumMap
(
String
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
<>();
for
(
AppSourceEnum
item
:
AppSourceEnum
.
values
())
{
try
{
boolean
hasE
=
false
;
for
(
String
e
:
eItem
)
{
if
(
item
.
getValue
()
==
e
)
{
hasE
=
true
;
break
;
}
}
if
(!
hasE
)
{
resultMap
.
put
(
item
.
getValue
()
+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
ex
)
{
}
}
return
resultMap
;
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
View file @
57eebe38
...
@@ -239,7 +239,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
...
@@ -239,7 +239,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
//业务:XX,流水号:XX,窗口:XX,工作人员:XX,已办理超时
//业务:XX,流水号:XX,窗口:XX,工作人员:XX,已办理超时
String
alarmContent
=
String
.
format
(
"业务:%s,流水号:%s,窗口:%s,工作人员:%s,办理时间为%.1f分钟,超过了平均办理时长%.1f分钟!"
,
String
alarmContent
=
String
.
format
(
"业务:%s,流水号:%s,窗口:%s,工作人员:%s,办理时间为%.1f分钟,超过了平均办理时长%.1f分钟!"
,
item
.
getBussinessName
(),
item
.
getQueueNo
(),
item
.
getBussinessName
(),
item
.
getQueueNo
(),
item
.
getWindowN
ame
(),
item
.
getWorkman
(),
item
.
getWindowN
um
(),
item
.
getWorkman
(),
doTime
,
upTime
);
doTime
,
upTime
);
MessageTaskEntity
messageTaskEntity
=
new
MessageTaskEntity
();
MessageTaskEntity
messageTaskEntity
=
new
MessageTaskEntity
();
messageTaskEntity
.
initAttrValue
();
messageTaskEntity
.
initAttrValue
();
...
...
portal-manager/src/main/java/com/mortals/xhx/module/message/service/impl/MessageConfigServiceImpl.java
View file @
57eebe38
package
com.mortals.xhx.module.message.service.impl
;
package
com.mortals.xhx.module.message.service.impl
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.common.code.AppSourceEnum
;
import
com.mortals.xhx.common.code.MessageTypeEnum
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -10,6 +12,8 @@ import com.mortals.xhx.module.message.dao.MessageConfigDao;
...
@@ -10,6 +12,8 @@ import com.mortals.xhx.module.message.dao.MessageConfigDao;
import
com.mortals.xhx.module.message.model.MessageConfigEntity
;
import
com.mortals.xhx.module.message.model.MessageConfigEntity
;
import
com.mortals.xhx.module.message.service.MessageConfigService
;
import
com.mortals.xhx.module.message.service.MessageConfigService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
/**
/**
* MessageConfigService
* MessageConfigService
* 消息发送配置 service实现
* 消息发送配置 service实现
...
@@ -20,5 +24,25 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -20,5 +24,25 @@ import lombok.extern.slf4j.Slf4j;
@Service
(
"messageConfigService"
)
@Service
(
"messageConfigService"
)
@Slf4j
@Slf4j
public
class
MessageConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
MessageConfigDao
,
MessageConfigEntity
,
Long
>
implements
MessageConfigService
{
public
class
MessageConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
MessageConfigDao
,
MessageConfigEntity
,
Long
>
implements
MessageConfigService
{
@Override
protected
void
saveBefore
(
MessageConfigEntity
entity
,
Context
context
)
throws
AppException
{
updateAppName
(
entity
);
super
.
saveBefore
(
entity
,
context
);
}
@Override
protected
void
updateBefore
(
MessageConfigEntity
entity
,
Context
context
)
throws
AppException
{
updateAppName
(
entity
);
}
private
void
updateAppName
(
MessageConfigEntity
entity
)
{
AppSourceEnum
appSourceEnum
=
AppSourceEnum
.
getByValue
(
entity
.
getMessageType
());
if
(!
ObjectUtils
.
isEmpty
(
appSourceEnum
)){
entity
.
setAppName
(
appSourceEnum
.
getDesc
());
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment