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
a89fa922
Commit
a89fa922
authored
Dec 26, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
0863bd3d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
IJgChangeRegistrationTransferService.java
.../jg/api/service/IJgChangeRegistrationTransferService.java
+2
-1
JgChangeRegistrationTransferController.java
...iz/controller/JgChangeRegistrationTransferController.java
+2
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+7
-0
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+4
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgChangeRegistrationTransferService.java
View file @
a89fa922
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
/**
...
...
@@ -31,5 +32,5 @@ public interface IJgChangeRegistrationTransferService extends IService<JgChangeR
void
revocation
(
String
instanceId
);
String
exportUseRegistrationCertificate
(
String
sequenceNbr
);
void
exportUseRegistrationCertificate
(
String
sequenceNbr
,
HttpServletResponse
response
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationTransferController.java
View file @
a89fa922
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.netflix.ribbon.proxy.annotation.Http
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -148,7 +149,7 @@ public class JgChangeRegistrationTransferController extends BaseController {
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出使用登记证"
,
notes
=
"导出使用登记证"
)
public
void
exportImageZip
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
){
jgChangeRegistrationTransferService
.
exportUseRegistrationCertificate
(
sequenceNbr
);
jgChangeRegistrationTransferService
.
exportUseRegistrationCertificate
(
sequenceNbr
,
response
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
a89fa922
...
...
@@ -34,6 +34,7 @@ import java.io.ByteArrayInputStream;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.InputStream
;
import
java.nio.file.Files
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -328,6 +329,12 @@ public class CommonServiceImpl implements ICommonService {
FileExporter
.
exportFile
(
FileExporter
.
FileType
.
valueOf
(
"pdf"
),
docTitle
,
bytes
,
response
);
}
catch
(
Exception
e
)
{
log
.
error
(
"pdf文件转换失败:{}"
,
e
);
}
finally
{
try
{
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
}
catch
(
Exception
e
)
{
log
.
error
(
"文件找不到,删除失败:{}"
,
e
);
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgChangeRegistrationTransferServiceImpl.java
View file @
a89fa922
...
...
@@ -61,6 +61,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
...
...
@@ -828,7 +829,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
*
* @param sequenceNbr
*/
public
String
exportUseRegistrationCertificate
(
String
sequenceNbr
)
{
public
void
exportUseRegistrationCertificate
(
String
sequenceNbr
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
//查询移装变更详情
JgChangeRegistrationTransfer
transfer
=
this
.
getById
(
sequenceNbr
);
...
...
@@ -927,6 +928,6 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
exportParamsMap
.
put
(
"factoryNum"
,
factoryInfo
.
getFactoryNum
());
}
//调用生成使用登记证
return
commonService
.
generateCertificateReport
(
exportParamsMap
);
commonService
.
generateCertificateReport
(
exportParamsMap
,
response
);
}
}
\ No newline at end of file
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