Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
2d08394a
Commit
2d08394a
authored
May 31, 2021
by
zhangch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件上传相关
parent
88df379b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
SrvProgramServiceImpl.java
...im/ltc/governance/service/impl/SrvProgramServiceImpl.java
+21
-1
No files found.
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvProgramServiceImpl.java
View file @
2d08394a
...
...
@@ -20,10 +20,12 @@ import com.hungraim.ltc.util.AttachType;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -64,7 +66,22 @@ public class SrvProgramServiceImpl implements SrvProgramService {
@Override
public
ProgramDetailVo
getProgramDetail
(
Long
programId
)
{
return
chSrvProgramMapper
.
getProgramDetail
(
programId
);
ProgramDetailVo
programDetail
=
chSrvProgramMapper
.
getProgramDetail
(
programId
);
// 返回对应的附件列表
Result
<
List
<
AttachVo
>>
listResult
=
attachFeignService
.
selectAttachs
(
programId
,
AttachType
.
PROGRAM
.
getUploadType
());
if
(!
listResult
.
getCode
().
equals
(
ResultCode
.
SUCCESS
.
getCode
()))
{
log
.
info
(
"请求获取附件列表错误:错误码{},错误信息:{}"
,
listResult
.
getCode
(),
listResult
.
getMsg
());
}
else
{
List
<
AttachVo
>
data
=
listResult
.
getData
();
List
<
ChFndAttach
>
attachList
=
new
ArrayList
<>();
for
(
AttachVo
attachVo
:
data
)
{
ChFndAttach
attach
=
new
ChFndAttach
();
BeanUtils
.
copyProperties
(
attachVo
,
attach
);
attachList
.
add
(
attach
);
}
programDetail
.
setFileDataList
(
attachList
);
}
return
programDetail
;
}
@Override
...
...
@@ -101,6 +118,7 @@ public class SrvProgramServiceImpl implements SrvProgramService {
}
this
.
addProgramSet
(
programDetailVo
,
date
,
newProgramId
,
programSetAndProjectVo
);
}
this
.
updateAttachs
(
programDetailVo
.
getFileDataList
(),
chSrvProgram
.
getProgramId
());
}
else
{
// 修改操作,修改操作就是对服务方案项目进行修改,两种情况
List
<
ProgramSetAndProjectVo
>
programSetAndProjectVos
=
programDetailVo
.
getProgramSetAndProjectVos
();
...
...
@@ -127,7 +145,9 @@ public class SrvProgramServiceImpl implements SrvProgramService {
this
.
addProgramSet
(
programDetailVo
,
date
,
programId
,
programSetAndProjectVo
);
}
}
this
.
updateAttachs
(
programDetailVo
.
getFileDataList
(),
programId
);
}
//修改附件
this
.
updateAttachs
(
programDetailVo
.
getFileDataList
(),
programId
);
}
...
...
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