Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
3fb70194
Commit
3fb70194
authored
Jul 21, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息提醒 & 派单批量操作优化 & 消息提醒
parent
d8532726
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
163 additions
and
15 deletions
+163
-15
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+5
-1
MsgTask.java
...main/java/com/yifu/cloud/plus/v1/job/compont/MsgTask.java
+34
-3
MsgInfoController.java
.../yifu/cloud/plus/v1/msg/controller/MsgInfoController.java
+31
-2
MsgInfoMapper.java
...java/com/yifu/cloud/plus/v1/msg/mapper/MsgInfoMapper.java
+5
-0
MsgInfoService.java
...va/com/yifu/cloud/plus/v1/msg/service/MsgInfoService.java
+5
-0
MsgInfoServiceImpl.java
...fu/cloud/plus/v1/msg/service/impl/MsgInfoServiceImpl.java
+50
-7
MsgInfoMapper.xml
.../yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
+33
-2
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
3fb70194
...
...
@@ -2453,7 +2453,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
TEmployeeInfo
tEmployeeInfoCompare
=
baseMapper
.
selectById
(
tEmployeeInfo
.
getId
());
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
+
CommonConstants
.
ONE_INT
);
if
(
Common
.
isNotNull
(
tEmployeeInfo
.
getProjectNum
())){
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
+
CommonConstants
.
ONE_INT
);
}
else
{
tEmployeeInfo
.
setProjectNum
(
CommonConstants
.
ONE_INT
);
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/MsgTask.java
View file @
3fb70194
...
...
@@ -26,16 +26,47 @@ public class MsgTask {
/**
* @Author fxj
* @Description 每
29
分钟刷新 超时待办提醒
* @Description 每
1
分钟刷新 超时待办提醒
* @Date 20:01 2023/5/30
* @Param
* @return
**/
public
void
createOderOverTimeMsg
()
{
log
.
info
(
"-------------每
29
分钟刷新 超时待办提醒-定时任务开始------------"
);
log
.
info
(
"-------------每
1
分钟刷新 超时待办提醒-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprMsgProperties
.
getAppUrl
(),
daprMsgProperties
.
getAppId
(),
"/msg/inner/updateOverTimeMsg"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每29分钟刷新 超时待办提醒定时任务结束------------"
);
log
.
info
(
"-------------每1分钟刷新 超时待办提醒定时任务结束------------"
);
}
/**
* @Author wzb
* @Description 每29分钟刷新 薪资状态变更待支出提醒
* @Date 17:23 2023/7/3
* @Param
* @return
**/
public
void
statusChangeTimeMsg
()
{
log
.
info
(
"-------------每29分钟刷新 薪资状态变更待支出提醒-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprMsgProperties
.
getAppUrl
(),
daprMsgProperties
.
getAppId
(),
"/msg/inner/statusChangeTimeMsg"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每29分钟刷新 薪资状态变更待支出提醒定时任务结束------------"
);
}
/**
* @Author fxj
* @Description 每5分钟刷新 超时待办提醒
* @Date 20:01 2023/5/30
* @Param
* @return
**/
public
void
cancelHandledMsg
()
{
log
.
info
(
"-------------每5分钟刷新 更新待办任务-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprMsgProperties
.
getAppUrl
(),
daprMsgProperties
.
getAppId
(),
"/msg/inner/cancelHandledMsg"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每5分钟刷新 更新待办任务-定时任务结束------------"
);
}
}
\ No newline at end of file
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/controller/MsgInfoController.java
View file @
3fb70194
...
...
@@ -78,15 +78,44 @@ public class MsgInfoController {
/**
* @Author fxj
* @Description 每
29
分钟刷新 超时待办提醒
* @Description 每
1
分钟刷新 超时待办提醒
* @Date 20:05 2023/5/30
* @Param
* @return
**/
@Operation
(
summary
=
"每
29分钟刷新 超时待办提醒"
,
description
=
"每29
分钟刷新 超时待办提醒"
)
@Operation
(
summary
=
"每
1分钟刷新 超时待办提醒"
,
description
=
"每1
分钟刷新 超时待办提醒"
)
@Inner
@PostMapping
(
"/inner/updateOverTimeMsg"
)
public
void
updateOverTimeMsg
()
{
msgInfoService
.
updateOverTimeMsg
();
}
/**
* @Author wzb
* @Description 每29分钟刷新 薪资状态变更待支出提醒
* @Date 14:29 2023/7/3
* @Param
* @return
**/
@Operation
(
summary
=
"每29分钟刷新 -薪资状态变更待支出提醒"
,
description
=
"每29分钟刷新 薪资状态变更待支出提醒"
)
@Inner
@PostMapping
(
"/inner/statusChangeTimeMsg"
)
public
void
statusChangeTimeMsg
()
{
msgInfoService
.
statusChangeTimeMsg
();
}
/**
* @Author fxj
* @Description 每5秒 处理订单待办提醒
* @Date 15:58 2023/7/17
* @Param
* @return
**/
@Operation
(
summary
=
"每5秒 处理订单待办提醒"
,
description
=
"每5秒 处理订单待办提醒"
)
@Inner
@PostMapping
(
"/inner/cancelHandledMsg"
)
public
void
cancelHandledMsg
()
{
msgInfoService
.
cancelHandledMsg
();
}
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/mapper/MsgInfoMapper.java
View file @
3fb70194
...
...
@@ -45,5 +45,10 @@ public interface MsgInfoMapper extends BaseMapper<MsgInfo> {
List
<
MsgInfo
>
getMsgByTask
();
List
<
MsgInfo
>
getMsgByTaskOne
();
List
<
MsgInfo
>
getMsgInfo
(
@Param
(
"msgInfo"
)
MsgInfo
msgInfo
);
int
deleteHandledMsg
();
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/MsgInfoService.java
View file @
3fb70194
...
...
@@ -44,4 +44,9 @@ public interface MsgInfoService extends IService<MsgInfo> {
R
<
Boolean
>
createMsg
(
EkpAlertVo
vo
);
void
updateOverTimeMsg
();
void
statusChangeTimeMsg
();
void
cancelHandledMsg
();
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/impl/MsgInfoServiceImpl.java
View file @
3fb70194
...
...
@@ -38,6 +38,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
*
...
...
@@ -121,13 +122,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
@Transactional
@Override
public
void
updateOverTimeMsg
()
{
// 1. 删除未读的超时,如果有继续生成
baseMapper
.
delete
(
Wrappers
.<
MsgInfo
>
query
().
lambda
()
.
eq
(
MsgInfo:
:
getReadStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
ONE_STRING
));
// 获取所有已经产生的数据 后面直接排除
List
<
MsgInfo
>
temps
=
baseMapper
.
selectList
(
Wrappers
.<
MsgInfo
>
query
().
lambda
()
.
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
ONE_STRING
)
.
eq
(
MsgInfo:
:
getReadStatus
,
CommonConstants
.
ONE_STRING
));
.
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
ONE_STRING
));
Map
<
String
,
MsgInfo
>
tempMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
temps
)){
for
(
MsgInfo
msg:
temps
){
...
...
@@ -150,7 +147,7 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
saves
.
add
(
ms
);
}
if
(
Common
.
isNotNull
(
tempMap
)){
this
.
removeByIds
(
tempMap
.
values
());
this
.
removeByIds
(
tempMap
.
values
()
.
stream
().
map
(
MsgInfo:
:
getId
).
collect
(
Collectors
.
toList
())
);
}
if
(
Common
.
isNotNull
(
saves
)){
this
.
saveBatch
(
saves
);
...
...
@@ -169,4 +166,50 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
}
}
}
/**
* @Author wzb
* @Description 薪资状态变更待支出提醒
* @Date 14:58 2023/7/3
* @Param
* @return
**/
@Transactional
@Override
public
void
statusChangeTimeMsg
(){
List
<
MsgInfo
>
temps
=
baseMapper
.
selectList
(
Wrappers
.<
MsgInfo
>
query
().
lambda
()
.
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
THREE_STRING
));
Map
<
String
,
MsgInfo
>
tempMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
temps
)){
for
(
MsgInfo
msg:
temps
){
tempMap
.
put
(
msg
.
getOrderNo
(),
msg
);
}
}
List
<
MsgInfo
>
msgInfos
=
baseMapper
.
getMsgByTaskOne
();
List
<
MsgInfo
>
saves
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
msgInfos
)){
//2. 重新生成
MsgInfo
temp
;
for
(
MsgInfo
ms:
msgInfos
){
temp
=
tempMap
.
get
(
ms
.
getOrderNo
());
if
(
Common
.
isNotNull
(
temp
)){
tempMap
.
remove
(
ms
.
getOrderNo
());
continue
;
}
ms
.
setCreateTime
(
LocalDateTime
.
now
());
ms
.
setUrl
(
MesConstants
.
orderUrl
+
ms
.
getOrderId
());
saves
.
add
(
ms
);
}
if
(
Common
.
isNotNull
(
tempMap
)){
this
.
removeByIds
(
tempMap
.
values
().
stream
().
map
(
MsgInfo:
:
getId
).
collect
(
Collectors
.
toList
()));
}
this
.
saveBatch
(
saves
);
}
}
@Override
public
void
cancelHandledMsg
()
{
baseMapper
.
deleteHandledMsg
();
}
}
yifu-msg/yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
View file @
3fb70194
...
...
@@ -102,7 +102,7 @@
'0' as ALERT_TYPE
FROM
ekp_ea33075576149bb8a4f5 a
LEFT JOIN sys_org_element p on a.fd_3b
f25d6ff39bc
6 = p.fd_id
LEFT JOIN sys_org_element p on a.fd_3b
0aff6781fa8
6 = p.fd_id
WHERE
a.fd_id = #{orderId} limit 1
</select>
...
...
@@ -127,6 +127,37 @@
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
) x
where x.date1 > date2
where x.date1 > date2
GROUP BY x.ORDER_NO
</select>
<select
id=
"getMsgByTaskOne"
resultMap=
"msgInfoMap"
>
SELECT
b1.fd_3ac901ba3b9d3e domain_name,
o.fd_no ALERT_USER,
b1.fd_3ac901c5184274 ORDER_NO,
b1.fd_id ORDER_ID,
'3' AS ALERT_TYPE,
b1.fd_3bddc3d6c8a734
FROM
ekp_ea33075576149bb8a4f5 b1
LEFT JOIN sys_org_element o ON o.fd_id = b1.fd_3bf1511f1d618e
WHERE
b1.fd_3bddc3d6c8a734 = '待支出'
AND b1.fd_id IS NOT NULL and o.fd_id is not null
</select>
<delete
id=
"deleteHandledMsg"
>
DELETE FROM msg_info where ALERT_TYPE ='0' and ORDER_NO not in (
SELECT
b1.fd_3ac901c5184274 ORDER_NO
FROM
lbpm_workitem a
LEFT JOIN lbpm_node e ON e.fd_id = a.fd_node_id
LEFT JOIN lbpm_process p ON p.fd_id = e.fd_process_id
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 ON p.fd_model_id = b1.fd_id
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
)
</delete>
</mapper>
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