Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
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
耿迪迪
precision-effect
Commits
8e6e78be
Commit
8e6e78be
authored
Jul 08, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息通知修改
parent
8025bc57
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
37 deletions
+35
-37
SysNoticeController.java
...com/zehong/web/controller/system/SysNoticeController.java
+14
-5
SysNotice.java
...tem/src/main/java/com/zehong/system/domain/SysNotice.java
+0
-10
OperatorButton.vue
...-effect-web/src/views/debit/components/OperatorButton.vue
+3
-3
index.vue
precision-effect-web/src/views/debit/index.vue
+2
-2
OperatorButton.vue
...fect-web/src/views/purchase/components/OperatorButton.vue
+3
-4
index.vue
precision-effect-web/src/views/purchase/index.vue
+2
-2
OperatorButton.vue
...ffect-web/src/views/service/components/OperatorButton.vue
+3
-3
index.vue
precision-effect-web/src/views/service/index.vue
+2
-2
OperatorButton.vue
...-effect-web/src/views/trade/components/OperatorButton.vue
+4
-4
index.vue
precision-effect-web/src/views/trade/index.vue
+2
-2
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/system/SysNoticeController.java
View file @
8e6e78be
...
...
@@ -144,8 +144,14 @@ public class SysNoticeController extends BaseController
@PostMapping
(
"/deleteNoticeByRelationId"
)
public
AjaxResult
deleteNoticeByRelationId
(
@RequestBody
SysNotice
notice
){
SysNotice
noticeInfo
=
new
SysNotice
();
noticeInfo
.
setStatus
(
"0"
);
noticeInfo
.
setRelationId
(
notice
.
getRelationId
());
List
<
SysNotice
>
noticeList
=
noticeService
.
selectNoticeList
(
noticeInfo
);
int
rows
=
noticeService
.
deleteNoticeByRelationId
(
notice
.
getRelationId
());
webSocketServer
.
sendMessage
(
String
.
valueOf
(
notice
.
getCurrentUserId
()));
noticeList
.
forEach
(
item
->{
webSocketServer
.
sendMessage
(
String
.
valueOf
(
item
.
getUserId
()));
});
return
toAjax
(
rows
);
}
...
...
@@ -156,14 +162,17 @@ public class SysNoticeController extends BaseController
private
int
updateNoticeByRelationId
(
SysNotice
notice
){
if
(
StringUtils
.
isNotEmpty
(
String
.
valueOf
(
notice
.
getRelationId
()))
&&
!
notice
.
isStart
()){
SysNotice
noticeInfo
=
new
SysNotice
();
noticeInfo
.
setStatus
(
"0"
);
noticeInfo
.
setRelationId
(
notice
.
getRelationId
());
List
<
SysNotice
>
noticeList
=
noticeService
.
selectNoticeList
(
noticeInfo
);
SysNotice
deleteNotice
=
new
SysNotice
();
deleteNotice
.
setStatus
(
"1"
);
deleteNotice
.
setRelationId
(
notice
.
getRelationId
());
int
rows
=
noticeService
.
updateNoticeByRelationId
(
deleteNotice
);
String
currentUserId
=
String
.
valueOf
(
notice
.
getCurrentUserId
());
if
(
StringUtils
.
isNotEmpty
(
currentUserId
)){
webSocketServer
.
sendMessage
(
currentUserId
);
}
noticeList
.
forEach
(
item
->{
webSocketServer
.
sendMessage
(
String
.
valueOf
(
item
.
getUserId
()));
});
return
rows
;
}
return
0
;
...
...
precision-effect-system/src/main/java/com/zehong/system/domain/SysNotice.java
View file @
8e6e78be
...
...
@@ -58,8 +58,6 @@ public class SysNotice extends BaseEntity
private
boolean
isStart
;
/**用于消息刷新*/
private
Long
currentUserId
;
public
void
setNoticeId
(
Integer
noticeId
)
{
...
...
@@ -156,14 +154,6 @@ public class SysNotice extends BaseEntity
isStart
=
start
;
}
public
Long
getCurrentUserId
()
{
return
currentUserId
;
}
public
void
setCurrentUserId
(
Long
currentUserId
)
{
this
.
currentUserId
=
currentUserId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
precision-effect-web/src/views/debit/components/OperatorButton.vue
View file @
8e6e78be
...
...
@@ -82,9 +82,9 @@
if
(
this
.
debitData
.
debitStatus
==
"1"
){
settlementDebitCredit
(
this
.
$refs
.
currentCom
.
submitSuggestion
()).
then
(
res
=>
{
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
debitStatus
==
'4'
){
sendNotice
({
noticeTitle
:
"您的借贷申请被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您的借贷申请被驳回"
,
userId
:
this
.
debitInfo
.
operatorId
,
relationType
:
"4"
,
relationId
:
this
.
debitInfo
.
debitId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
sendNotice
({
noticeTitle
:
"您的借贷申请被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您的借贷申请被驳回"
,
userId
:
this
.
debitInfo
.
operatorId
,
relationType
:
"4"
,
relationId
:
this
.
debitInfo
.
debitId
});
}
else
{
noticeIsReadByRelationId
({
relationId
:
this
.
debitInfo
.
debitId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
noticeIsReadByRelationId
({
relationId
:
this
.
debitInfo
.
debitId
});
}
this
.
dealResponse
(
res
);
})
...
...
@@ -99,7 +99,7 @@
}
updateCredit
(
this
.
$refs
.
currentCom
.
submitSuggestion
()).
then
(
res
=>
{
this
.
dealResponse
(
res
);
sendNotice
({
noticeTitle
:
"您有新借贷待审核"
,
noticeType
:
"1"
,
noticeContent
:
"您有新借贷待审核"
,
roles
:
"calculator"
,
relationType
:
"4"
,
relationId
:
this
.
debitInfo
.
debitId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
sendNotice
({
noticeTitle
:
"您有新借贷待审核"
,
noticeType
:
"1"
,
noticeContent
:
"您有新借贷待审核"
,
roles
:
"calculator"
,
relationType
:
"4"
,
relationId
:
this
.
debitInfo
.
debitId
})
})
},
...
...
precision-effect-web/src/views/debit/index.vue
View file @
8e6e78be
...
...
@@ -497,7 +497,7 @@ export default {
//通知下一个人
noticeNext
(
res
){
sendNotice
({
noticeTitle
:
"您有新借贷待确认"
,
noticeType
:
"1"
,
noticeContent
:
"您有新借贷待确认"
,
deptId
:
this
.
form
.
lendDeptId
,
roles
:
"deptLeader"
,
relationType
:
"4"
,
relationId
:
res
.
data
.
debitId
,
isStart
:
true
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
deptId
:
this
.
form
.
lendDeptId
,
roles
:
"deptLeader"
,
relationType
:
"4"
,
relationId
:
res
.
data
.
debitId
,
isStart
:
true
})
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
...
...
@@ -509,7 +509,7 @@ export default {
}).
then
(
function
()
{
return
delCredit
(
debitIds
);
}).
then
(()
=>
{
deleteNoticeByRelationId
({
relationId
:
debitIds
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
deleteNoticeByRelationId
({
relationId
:
debitIds
});
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
...
...
precision-effect-web/src/views/purchase/components/OperatorButton.vue
View file @
8e6e78be
...
...
@@ -80,10 +80,9 @@
this
.
$emit
(
"getList"
);
this
.
$message
.
success
(
"审核成功!"
);
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
purchaseStatus
==
'3'
){
sendNotice
({
noticeTitle
:
"您的物品采购申请被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您的物品采购申请被驳回"
,
userId
:
this
.
purchaseInfo
.
handledByUserId
,
relationType
:
"2"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
sendNotice
({
noticeTitle
:
"您的物品采购申请被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您的物品采购申请被驳回"
,
userId
:
this
.
purchaseInfo
.
handledByUserId
,
relationType
:
"2"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
});
}
else
{
console
.
log
(
"sfsfdsfd------"
)
noticeIsReadByRelationId
({
relationId
:
this
.
purchaseInfo
.
purchaseId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
noticeIsReadByRelationId
({
relationId
:
this
.
purchaseInfo
.
purchaseId
});
}
}
else
{
this
.
$message
.
error
(
"审核失败!"
);
...
...
@@ -97,7 +96,7 @@
this
.
open
=
false
;
this
.
$emit
(
"getList"
);
this
.
$message
.
success
(
"提交成功!"
);
sendNotice
({
noticeTitle
:
"您有新物品采购信息待审批"
,
noticeType
:
"1"
,
noticeContent
:
"您有新物品采购信息待审批"
,
roles
:
"calculator"
,
relationType
:
"2"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
sendNotice
({
noticeTitle
:
"您有新物品采购信息待审批"
,
noticeType
:
"1"
,
noticeContent
:
"您有新物品采购信息待审批"
,
roles
:
"calculator"
,
relationType
:
"2"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
})
}
else
{
this
.
$message
.
error
(
"提交失败!"
);
}
...
...
precision-effect-web/src/views/purchase/index.vue
View file @
8e6e78be
...
...
@@ -506,7 +506,7 @@ export default {
//通知下一个人
noticeNext
(
res
){
sendNotice
({
noticeTitle
:
"您有新物品采购信息待确认"
,
noticeType
:
"1"
,
noticeContent
:
"您有新物品采购信息待确认"
,
deptId
:
this
.
$store
.
state
.
user
.
deptId
,
roles
:
"deptLeader"
,
relationType
:
"2"
,
relationId
:
res
.
data
.
purchaseId
,
isStart
:
true
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
}
)
deptId
:
this
.
$store
.
state
.
user
.
deptId
,
roles
:
"deptLeader"
,
relationType
:
"2"
,
relationId
:
res
.
data
.
purchaseId
,
isStart
:
true
}
)
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
...
...
@@ -518,7 +518,7 @@ export default {
}
).
then
(
function
()
{
return
delPurchase
(
purchaseIds
);
}
).
then
(()
=>
{
deleteNoticeByRelationId
({
relationId
:
purchaseIds
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
}
);
deleteNoticeByRelationId
({
relationId
:
purchaseIds
}
);
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
...
...
precision-effect-web/src/views/service/components/OperatorButton.vue
View file @
8e6e78be
...
...
@@ -80,9 +80,9 @@
this
.
$emit
(
"getList"
);
this
.
$message
.
success
(
"审核成功!"
);
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
purchaseStatus
==
'3'
){
sendNotice
({
noticeTitle
:
"您的服务费用申请被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您的服务费用申请被驳回"
,
userId
:
this
.
purchaseInfo
.
handledByUserId
,
relationType
:
"3"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
sendNotice
({
noticeTitle
:
"您的服务费用申请被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您的服务费用申请被驳回"
,
userId
:
this
.
purchaseInfo
.
handledByUserId
,
relationType
:
"3"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
});
}
else
{
noticeIsReadByRelationId
({
relationId
:
this
.
purchaseInfo
.
purchaseId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
noticeIsReadByRelationId
({
relationId
:
this
.
purchaseInfo
.
purchaseId
});
}
}
else
{
this
.
$message
.
error
(
"审核失败!"
);
...
...
@@ -96,7 +96,7 @@
this
.
open
=
false
;
this
.
$emit
(
"getList"
);
this
.
$message
.
success
(
"提交成功!"
);
sendNotice
({
noticeTitle
:
"您有新服务费用信息待审批"
,
noticeType
:
"1"
,
noticeContent
:
"您有新服务费用信息待审批"
,
roles
:
"calculator"
,
relationType
:
"3"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
sendNotice
({
noticeTitle
:
"您有新服务费用信息待审批"
,
noticeType
:
"1"
,
noticeContent
:
"您有新服务费用信息待审批"
,
roles
:
"calculator"
,
relationType
:
"3"
,
relationId
:
this
.
purchaseInfo
.
purchaseId
})
}
else
{
this
.
$message
.
error
(
"提交失败!"
);
}
...
...
precision-effect-web/src/views/service/index.vue
View file @
8e6e78be
...
...
@@ -393,7 +393,7 @@ export default {
//通知下一个人
noticeNext
(
res
){
sendNotice
({
noticeTitle
:
"您有新服务费用信息待确认"
,
noticeType
:
"1"
,
noticeContent
:
"您有新服务费用信息待确认"
,
deptId
:
this
.
$store
.
state
.
user
.
deptId
,
roles
:
"deptLeader"
,
relationType
:
"3"
,
relationId
:
res
.
data
.
purchaseId
,
isStart
:
true
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
}
)
deptId
:
this
.
$store
.
state
.
user
.
deptId
,
roles
:
"deptLeader"
,
relationType
:
"3"
,
relationId
:
res
.
data
.
purchaseId
,
isStart
:
true
}
)
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
...
...
@@ -405,7 +405,7 @@ export default {
}
).
then
(
function
()
{
return
delPurchase
(
purchaseIds
);
}
).
then
(()
=>
{
deleteNoticeByRelationId
({
relationId
:
purchaseIds
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
}
);
deleteNoticeByRelationId
({
relationId
:
purchaseIds
}
);
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
...
...
precision-effect-web/src/views/trade/components/OperatorButton.vue
View file @
8e6e78be
...
...
@@ -115,9 +115,9 @@
this
.
$emit
(
"getList"
);
this
.
$message
.
success
(
"复核成功!"
);
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
tradeStatus
==
"4"
){
sendNotice
({
noticeTitle
:
"您有新交易项目被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目被驳回"
,
userId
:
this
.
tradeInfo
.
applyId
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
sendNotice
({
noticeTitle
:
"您有新交易项目被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目被驳回"
,
userId
:
this
.
tradeInfo
.
applyId
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
})
}
else
{
noticeIsReadByRelationId
({
relationId
:
this
.
tradeInfo
.
tradeId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
noticeIsReadByRelationId
({
relationId
:
this
.
tradeInfo
.
tradeId
});
}
}
else
{
this
.
$message
.
error
(
"复核失败!"
);
...
...
@@ -133,12 +133,12 @@
that
.
$message
.
success
(
"提交成功!"
);
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
tradeStatus
==
"1"
){
sendNotice
({
noticeTitle
:
"您有新交易项目待确认"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待确认"
,
deptId
:
this
.
tradeInfo
.
tradeDeptId
,
roles
:
"deptLeader"
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
deptId
:
this
.
tradeInfo
.
tradeDeptId
,
roles
:
"deptLeader"
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
})
}
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
tradeStatus
==
"2"
){
sendNotice
({
noticeTitle
:
"您有新交易项目待确认"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待确认"
,
deptId
:
this
.
tradeInfo
.
applyDeptId
,
roles
:
"deptLeader"
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
deptId
:
this
.
tradeInfo
.
applyDeptId
,
roles
:
"deptLeader"
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
})
}
}
else
{
...
...
precision-effect-web/src/views/trade/index.vue
View file @
8e6e78be
...
...
@@ -581,7 +581,7 @@ export default {
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
sendNotice
({
noticeTitle
:
"您有新交易项目待评价"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待评价"
,
userId
:
this
.
form
.
tradeTransactor
,
relationType
:
"1"
,
relationId
:
res
.
data
.
tradeId
,
isStart
:
true
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
})
sendNotice
({
noticeTitle
:
"您有新交易项目待评价"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待评价"
,
userId
:
this
.
form
.
tradeTransactor
,
relationType
:
"1"
,
relationId
:
res
.
data
.
tradeId
,
isStart
:
true
})
});
}
}
...
...
@@ -603,7 +603,7 @@ export default {
return
delProject
(
tradeIds
);
})
.
then
(()
=>
{
deleteNoticeByRelationId
({
relationId
:
tradeIds
,
currentUserId
:
this
.
$store
.
state
.
user
.
userId
});
deleteNoticeByRelationId
({
relationId
:
tradeIds
});
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
})
...
...
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