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
f4ce035f
Commit
f4ce035f
authored
Oct 18, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试修改项目资源接口
parent
939b7500
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+10
-10
No files found.
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 @
f4ce035f
...
...
@@ -6,7 +6,6 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
...
...
@@ -17,7 +16,6 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -25,10 +23,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.Map
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
.
ProjectResourceEnum
.*;
...
...
@@ -123,13 +119,13 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
*/
public
ProjectResource
saveIds
(
JSONObject
jsonObject
)
{
JSONArray
subForm
=
jsonObject
.
getJSONArray
(
"subForm"
);
ProjectResource
project
Resource
=
new
ProjectResource
();
ProjectResource
Resource
=
new
ProjectResource
();
for
(
Object
json2
:
subForm
)
{
ProjectResource
projectResource
=
new
ProjectResource
();
String
select
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
json2
)).
getString
(
"select"
);
// if (!jsonObject.getString("sequenceNbr").isEmpty()){
// jsonObject.getString("sequenceNbr");
// }
Long
SequenceNbr
=
Long
.
valueOf
(
jsonObject
.
getString
(
"sequenceNbr"
));
String
type
=
jsonObject
.
getString
(
"type"
);
//判断资源类型并插入
...
...
@@ -142,12 +138,16 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
if
(
type
.
equals
(
管材资源
.
getStatus
()))
{
projectResource
.
setType
(
管材资源
.
getState
());
}
projectResource
.
setProjectId
(
SequenceNbr
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
select
));
this
.
save
(
projectResource
);
Equipment
equipment
=
equipmentMapper
.
selectById
(
Long
.
valueOf
(
select
));
projectResource
.
setName
(
equipment
.
getName
());
BeanUtils
.
copyProperties
(
projectResource
,
Resource
);
this
.
save
(
projectResource
);
}
return
project
Resource
;
return
Resource
;
}
...
...
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