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
ec22bd72
Commit
ec22bd72
authored
Dec 26, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新登记证接口返回值
parent
8c98492b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+2
-1
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+2
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+10
-10
equipment-registration-certificate-report.ftl
...s/templates/equipment-registration-certificate-report.ftl
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTransferNoticeController.java
View file @
ec22bd72
...
@@ -21,6 +21,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -21,6 +21,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.File
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -159,7 +160,7 @@ public class JgTransferNoticeController extends BaseController {
...
@@ -159,7 +160,7 @@ public class JgTransferNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"特种设备登记证导出"
,
notes
=
"特种设备登记证导出"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"特种设备登记证导出"
,
notes
=
"特种设备登记证导出"
)
@GetMapping
(
value
=
"/certificate/report"
)
@GetMapping
(
value
=
"/certificate/report"
)
public
ResponseModel
<
String
>
generateCertificateReport
()
{
public
ResponseModel
<
File
>
generateCertificateReport
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
// 组装模板变量
// 组装模板变量
map
.
put
(
"useRegistrationCode"
,
"20231225123"
);
// 编号
map
.
put
(
"useRegistrationCode"
,
"20231225123"
);
// 编号
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
ec22bd72
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
java.io.File
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -33,5 +34,5 @@ public interface ICommonService {
...
@@ -33,5 +34,5 @@ public interface ICommonService {
List
<
Map
<
String
,
Object
>>
getEnterpriseEmployee
(
String
unitCode
);
List
<
Map
<
String
,
Object
>>
getEnterpriseEmployee
(
String
unitCode
);
String
generateCertificateReport
(
Map
<
String
,
Object
>
map
);
File
generateCertificateReport
(
Map
<
String
,
Object
>
map
);
}
}
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 @
ec22bd72
...
@@ -286,7 +286,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -286,7 +286,7 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
@Override
public
String
generateCertificateReport
(
Map
<
String
,
Object
>
map
)
{
public
File
generateCertificateReport
(
Map
<
String
,
Object
>
map
)
{
if
(
CollectionUtils
.
isEmpty
(
map
))
{
if
(
CollectionUtils
.
isEmpty
(
map
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
}
...
@@ -316,16 +316,16 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -316,16 +316,16 @@ public class CommonServiceImpl implements ICommonService {
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
// 上传pdf至文件服务器
//
// 上传pdf至文件服务器
String
url
=
this
.
uploadFile
(
pdfFile
);
//
String url = this.uploadFile(pdfFile);
// 删除临时文件
// 删除临时文件
try
{
//
try {
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
//
Files.deleteIfExists(pdfFile.toPath());
}
catch
(
IOException
e
)
{
//
} catch (IOException e) {
log
.
error
(
"删除临时文件失败:{}"
,
e
);
//
log.error("删除临时文件失败:{}", e);
}
//
}
return
url
;
return
pdfFile
;
}
}
/**
/**
...
@@ -336,7 +336,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -336,7 +336,7 @@ public class CommonServiceImpl implements ICommonService {
private
File
wordToPdf
(
String
wordPath
,
Map
<
String
,
Object
>
placeholders
)
throws
Exception
{
private
File
wordToPdf
(
String
wordPath
,
Map
<
String
,
Object
>
placeholders
)
throws
Exception
{
Assert
.
hasText
(
wordPath
,
"word文件路径不能为空"
);
Assert
.
hasText
(
wordPath
,
"word文件路径不能为空"
);
String
tempFileName
=
"
移装告知单
_"
+
System
.
currentTimeMillis
()
+
"_temp.pdf"
;
String
tempFileName
=
"
特种设备使用登记证
_"
+
System
.
currentTimeMillis
()
+
"_temp.pdf"
;
WordTemplateUtils
instance
=
WordTemplateUtils
.
getInstance
();
WordTemplateUtils
instance
=
WordTemplateUtils
.
getInstance
();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/equipment-registration-certificate-report.ftl
View file @
ec22bd72
...
@@ -1915,7 +1915,7 @@
...
@@ -1915,7 +1915,7 @@
<w:sz
w:val=
"31"
/>
<w:sz
w:val=
"31"
/>
<w:sz-cs
w:val=
"31"
/>
<w:sz-cs
w:val=
"31"
/>
</w:rPr>
</w:rPr>
<w:t>
年
</w:t>
<w:t>
年
</w:t>
</w:r>
</w:r>
<w:r>
<w:r>
<w:rPr>
<w:rPr>
...
...
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