Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-hmhj
Overview
Overview
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
wangweidong
patzn-cloud-service-hmhj
Commits
4da0f9c7
Commit
4da0f9c7
authored
Jul 18, 2021
by
ghxdhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取打印文件的objectkey
parent
c6d559b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
EntrustAnnexController.java
.../service/lims/hmhj/controller/EntrustAnnexController.java
+4
-3
IEntrustAnnexService.java
...cloud/service/lims/hmhj/service/IEntrustAnnexService.java
+2
-1
EntrustAnnexServiceImpl.java
...rvice/lims/hmhj/service/impl/EntrustAnnexServiceImpl.java
+4
-2
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustAnnexController.java
View file @
4da0f9c7
...
@@ -18,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -18,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 委托附件表 前端控制器
* 委托附件表 前端控制器
...
@@ -109,9 +110,9 @@ public class EntrustAnnexController extends ServiceController {
...
@@ -109,9 +110,9 @@ public class EntrustAnnexController extends ServiceController {
@ApiOperation
(
value
=
"根据委托id获取ObjectKey"
,
notes
=
"获取key"
)
@ApiOperation
(
value
=
"根据委托id获取ObjectKey"
,
notes
=
"获取key"
)
@Login
(
action
=
Action
.
Skip
)
@Login
(
action
=
Action
.
Skip
)
@PostMapping
(
"/get_key_by_businessId"
)
@PostMapping
(
"/get_key_by_businessId
/{businessId}
"
)
RestResult
<
String
>
getKeyByBusinessId
(
@RequestBody
String
businessId
){
Map
<
String
,
String
>
getKeyByBusinessId
(
@PathVariable
(
"businessId"
)
String
businessId
){
return
success
(
entrustAnnexService
.
getLastKey
(
businessId
)
);
return
entrustAnnexService
.
getLastKey
(
businessId
);
}
}
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustAnnexService.java
View file @
4da0f9c7
...
@@ -9,6 +9,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
...
@@ -9,6 +9,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 服务类
* 服务类
...
@@ -31,5 +32,5 @@ public interface IEntrustAnnexService extends IBaseService<EntrustAnnex> {
...
@@ -31,5 +32,5 @@ public interface IEntrustAnnexService extends IBaseService<EntrustAnnex> {
boolean
uploadBath
(
MultipartHttpServletRequest
httpServletRequest
,
Long
entrustId
,
Account
account
);
boolean
uploadBath
(
MultipartHttpServletRequest
httpServletRequest
,
Long
entrustId
,
Account
account
);
/* 获取最近时间的附件的key */
/* 获取最近时间的附件的key */
String
getLastKey
(
String
businessId
);
Map
<
String
,
String
>
getLastKey
(
String
businessId
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustAnnexServiceImpl.java
View file @
4da0f9c7
...
@@ -106,7 +106,7 @@ public class EntrustAnnexServiceImpl extends BaseServiceImpl<EntrustAnnexMapper,
...
@@ -106,7 +106,7 @@ public class EntrustAnnexServiceImpl extends BaseServiceImpl<EntrustAnnexMapper,
}
}
@Override
@Override
public
String
getLastKey
(
String
businessId
)
{
public
Map
<
String
,
String
>
getLastKey
(
String
businessId
)
{
if
(
StringUtils
.
isNotBlank
(
businessId
))
{
if
(
StringUtils
.
isNotBlank
(
businessId
))
{
List
<
EntrustAnnex
>
entrustAnnexes
=
new
ArrayList
<>();
List
<
EntrustAnnex
>
entrustAnnexes
=
new
ArrayList
<>();
String
[]
entrustIdAndType
=
businessId
.
split
(
"#"
);
String
[]
entrustIdAndType
=
businessId
.
split
(
"#"
);
...
@@ -118,7 +118,9 @@ public class EntrustAnnexServiceImpl extends BaseServiceImpl<EntrustAnnexMapper,
...
@@ -118,7 +118,9 @@ public class EntrustAnnexServiceImpl extends BaseServiceImpl<EntrustAnnexMapper,
.
ge
(
"ctime"
,
DateUtils
.
toDate
(
DateUtils
.
toYearMonthDay
(
new
Date
())))
.
ge
(
"ctime"
,
DateUtils
.
toDate
(
DateUtils
.
toYearMonthDay
(
new
Date
())))
.
orderBy
(
"ctime"
,
false
));
.
orderBy
(
"ctime"
,
false
));
if
(
CollectionUtils
.
isNotEmpty
(
entrustAnnexes
))
{
if
(
CollectionUtils
.
isNotEmpty
(
entrustAnnexes
))
{
return
entrustAnnexes
.
get
(
0
).
getObjectKey
();
HashMap
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"key"
,
entrustAnnexes
.
get
(
0
).
getObjectKey
());
return
map
;
}
}
}
}
}
}
...
...
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