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
3b074585
Commit
3b074585
authored
Jul 25, 2024
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维修告知单下载
parent
ce504948
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+2
-2
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+0
-3
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+14
-5
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
3b074585
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
isn.plan_date AS installStartDate,
isn.plan_date AS installStartDate,
isn.construction_manager AS installLeaderName,
isn.construction_manager AS installLeaderName,
isn.construction_manager_phone AS installLeaderPhone,
isn.construction_manager_phone AS installLeaderPhone,
isn
.inform_number AS informNumber,
re
.inform_number AS informNumber,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.EQU_DEFINE AS equDefine,
...
@@ -199,7 +199,7 @@
...
@@ -199,7 +199,7 @@
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN tz_base_enterprise_info useUnit ON useUnit.use_code = isn.use_unit_credit_code
LEFT JOIN tz_base_enterprise_info useUnit ON useUnit.use_code = isn.use_unit_credit_code
LEFT JOIN tz_base_enterprise_info installUnit ON installUnit.use_code = isn.install_unit_credit_code
LEFT JOIN tz_base_enterprise_info installUnit ON installUnit.use_code = isn.install_unit_credit_code
WHERE
isn.sequence_nbr = #{sequenceNbr} LIMIT 1
WHERE
re.sequence_nbr = #{sequenceNbr}
</select>
</select>
<select
id=
"getEquipInfoByRecord"
resultType=
"java.util.Map"
>
<select
id=
"getEquipInfoByRecord"
resultType=
"java.util.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/JgInstallationNoticeServiceImpl.java
View file @
3b074585
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
...
@@ -29,7 +28,6 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper;
...
@@ -29,7 +28,6 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgRegistrationHistoryService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
...
@@ -77,7 +75,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -77,7 +75,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.lang.reflect.Field
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
3b074585
...
@@ -459,18 +459,27 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -459,18 +459,27 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
}
JgMaintainNotice
JgMaintainNotice
=
this
.
getById
(
sequenceNbr
);
JgMaintainNotice
JgMaintainNotice
=
this
.
getById
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
jgMaintainNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
JgMaintainNoticeEq
>
list
=
jgMaintainNoticeEqService
.
lambdaQuery
().
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
sequenceNbr
).
list
();
if
(
Objects
.
isNull
(
JgMaintainNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
throw
new
IllegalArgumentException
(
"维修告知单不存在"
);
List
<
Map
<
String
,
Object
>>
placeholderList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
)){
for
(
JgMaintainNoticeEq
jgMaintainNoticeEq
:
list
)
{
List
<
Map
<
String
,
Object
>>
informationList
=
jgMaintainNoticeMapper
.
queryEquipInformation
(
jgMaintainNoticeEq
.
getSequenceNbr
());
if
(
Objects
.
isNull
(
JgMaintainNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"维修告知单不存在"
);
}
Map
<
String
,
Object
>
placeholders
=
jgInstallationNoticeService
.
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
placeholderList
.
add
(
placeholders
);
}
}
}
Map
<
String
,
Object
>
placeholders
=
jgInstallationNoticeService
.
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getName
().
substring
(
0
,
2
)
);
map
.
put
(
"equipBasicInfoList"
,
placeholderList
);
String
tempFileName
=
"维修告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
String
tempFileName
=
"维修告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
// String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders);
// String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders);
// // 更新到数据库
// // 更新到数据库
// JgMaintainNotice.setNoticeReportUrl(url);
// JgMaintainNotice.setNoticeReportUrl(url);
// this.updateById(JgMaintainNotice);
// this.updateById(JgMaintainNotice);
WordTemplateUtils
.
templateToPdfDownload
(
tempFileName
,
"installation-notification-report.ftl"
,
placeholders
,
response
);
WordTemplateUtils
.
templateToPdfDownload
(
tempFileName
,
"installation-notification-report.ftl"
,
map
,
response
);
}
}
@Override
@Override
...
...
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