Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
574d0a01
Commit
574d0a01
authored
Oct 19, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化项目资源代码
parent
a78651d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
ProjectResourceEnum.java
...in/amos/boot/module/ugp/api/Enum/ProjectResourceEnum.java
+14
-14
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+6
-7
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/ProjectResourceEnum.java
View file @
574d0a01
...
...
@@ -8,37 +8,37 @@ public enum ProjectResourceEnum {
设备资源
(
"设备"
,
"equipment"
),
管材资源
(
"管材"
,
"material"
);
private
String
status
;
private
String
name
;
public
String
get
Status
()
{
return
status
;
public
String
get
Name
()
{
return
name
;
}
public
void
set
Status
(
String
status
)
{
this
.
status
=
status
;
public
void
set
Name
(
String
name
)
{
this
.
name
=
name
;
}
public
String
get
Stat
e
()
{
return
stat
e
;
public
String
get
Cod
e
()
{
return
cod
e
;
}
public
void
set
State
(
String
stat
e
)
{
this
.
state
=
stat
e
;
public
void
set
Code
(
String
cod
e
)
{
this
.
code
=
cod
e
;
}
ProjectResourceEnum
(
String
status
,
String
stat
e
)
{
this
.
status
=
status
;
this
.
state
=
stat
e
;
ProjectResourceEnum
(
String
name
,
String
cod
e
)
{
this
.
name
=
name
;
this
.
code
=
cod
e
;
}
private
String
stat
e
;
private
String
cod
e
;
public
static
final
Map
<
String
,
String
>
map
=
new
HashMap
<>();
static
{
for
(
ProjectResourceEnum
projectResourceEnum:
ProjectResourceEnum
.
values
()){
map
.
put
(
projectResourceEnum
.
status
,
projectResourceEnum
.
stat
e
);
map
.
put
(
projectResourceEnum
.
name
,
projectResourceEnum
.
cod
e
);
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectResourceServiceImpl.java
View file @
574d0a01
...
...
@@ -20,7 +20,6 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -129,14 +128,14 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
Long
SequenceNbr
=
Long
.
valueOf
(
jsonObject
.
getString
(
"sequenceNbr"
));
String
type
=
jsonObject
.
getString
(
"type"
);
//判断资源类型并插入
if
(
type
.
equals
(
设备资源
.
get
Status
()))
{
projectResource
.
setType
(
设备资源
.
get
Stat
e
());
if
(
type
.
equals
(
设备资源
.
get
Name
()))
{
projectResource
.
setType
(
设备资源
.
get
Cod
e
());
}
if
(
type
.
equals
(
焊工资源
.
get
Status
()))
{
projectResource
.
setType
(
焊工资源
.
get
Stat
e
());
if
(
type
.
equals
(
焊工资源
.
get
Name
()))
{
projectResource
.
setType
(
焊工资源
.
get
Cod
e
());
}
if
(
type
.
equals
(
管材资源
.
get
Status
()))
{
projectResource
.
setType
(
管材资源
.
get
Stat
e
());
if
(
type
.
equals
(
管材资源
.
get
Name
()))
{
projectResource
.
setType
(
管材资源
.
get
Cod
e
());
}
projectResource
.
setProjectId
(
SequenceNbr
);
...
...
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