Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-operation-api
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-operation
so-operation-api
Commits
ab73f082
You need to sign in or sign up before continuing.
Commit
ab73f082
authored
Jul 26, 2023
by
李科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 我的预警工单,回显使用:内部字段对外覆盖处理
parent
6be97b44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
src/controller/work_order_manage.go
src/controller/work_order_manage.go
+5
-2
src/pkg/beagle/constant/constant.go
src/pkg/beagle/constant/constant.go
+17
-0
No files found.
src/controller/work_order_manage.go
View file @
ab73f082
...
@@ -5,6 +5,7 @@ import (
...
@@ -5,6 +5,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"github.com/spf13/cast"
"github.com/spf13/cast"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/bean/vo/request"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/bean/vo/request"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/resp"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/resp"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/service"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/service"
...
@@ -263,8 +264,10 @@ func WorkOrderListAlert(c *gin.Context) {
...
@@ -263,8 +264,10 @@ func WorkOrderListAlert(c *gin.Context) {
// disposed_list[].is_disposed --映射--> is_disposed
// disposed_list[].is_disposed --映射--> is_disposed
for
i
:=
0
;
i
<
len
(
data
.
List
);
i
++
{
for
i
:=
0
;
i
<
len
(
data
.
List
);
i
++
{
for
j
:=
0
;
j
<
len
(
data
.
List
[
i
]
.
DisposedList
);
j
++
{
for
j
:=
0
;
j
<
len
(
data
.
List
[
i
]
.
DisposedList
);
j
++
{
if
data
.
List
[
i
]
.
DisposedList
[
j
]
.
DisposalUser
==
user
.
SystemAccount
{
if
data
.
List
[
i
]
.
IsDisposed
!=
constant
.
IsDisposedYes
{
data
.
List
[
i
]
.
IsDisposed
=
1
if
data
.
List
[
i
]
.
DisposedList
[
j
]
.
DisposalUser
==
user
.
SystemAccount
{
data
.
List
[
i
]
.
IsDisposed
=
constant
.
IsDisposedYes
}
}
}
}
}
}
}
...
...
src/pkg/beagle/constant/constant.go
View file @
ab73f082
...
@@ -152,3 +152,20 @@ const (
...
@@ -152,3 +152,20 @@ const (
AlertNotRecovered
AlertNotRecovered
AlertClosed
AlertClosed
)
)
// 是否处置(工单管理),1:已处置,2:未处置
const
(
IsDisposedYes
=
1
IsDisposedNo
=
2
)
func
DisposedStatusText
(
code
int
)
string
{
switch
code
{
case
IsDisposedYes
:
return
"已处置"
case
IsDisposedNo
:
return
"未处置"
default
:
return
"未知状态"
}
}
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