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
7c046bfc
Commit
7c046bfc
authored
Mar 08, 2024
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、使用登记证按设备品种代码中间两位生成(没有设备品种的用设备类别代码中间两位)
2、告知类告知书下载及模板修改
parent
946c650d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
116 additions
and
232 deletions
+116
-232
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+8
-7
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+9
-6
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+8
-6
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+8
-7
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+35
-16
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+1
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+1
-1
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+1
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+23
-19
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+5
-50
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+10
-60
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+6
-57
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+1
-1
installation-notification-report.ftl
.../resources/templates/installation-notification-report.ftl
+0
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
7c046bfc
...
@@ -122,14 +122,14 @@
...
@@ -122,14 +122,14 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ei
.use_contact AS safetyManager,
useUnit
.use_contact AS safetyManager,
ei
.contact_phone AS safetyManagerPhone,
useUnit
.contact_phone AS safetyManagerPhone,
ei
.use_code AS useCode,
useUnit
.use_code AS useCode,
i
sn.install_unit_credit
_code AS installUnitCreditCode,
i
nstallUnit.use
_code AS installUnitCreditCode,
idi.INSPECT_REPORT as inspectReport,
idi.INSPECT_REPORT as inspectReport,
ei
.address as useUnitLeaderAddress,
useUnit
.address as useUnitLeaderAddress,
re.equ_id as equId,
re.equ_id as equId,
(select address from tz_base_enterprise_info where isn.install_unit_credit_code = use_unit_code)
installUnitAddress
installUnit.address
installUnitAddress
FROM
FROM
tzs_jg_installation_notice isn
tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
...
@@ -138,7 +138,8 @@
...
@@ -138,7 +138,8 @@
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 idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.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 amos_tzs_biz.tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
7c046bfc
...
@@ -111,12 +111,15 @@
...
@@ -111,12 +111,15 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ei
.legal_person AS safetyManager,
useUnit
.legal_person AS safetyManager,
ei
.legal_phone AS safetyManagerPhone,
useUnit
.legal_phone AS safetyManagerPhone,
ui.CITY_NAME AS useUnitCityName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.COUNTY_NAME AS useUnitCountyName,
ei.ADDRESS AS useUnitAddress,
useUnit.ADDRESS AS useUnitAddress,
eio.use_code AS useCode
useUnit.ADDRESS AS useUnitLeaderAddress,
installUnit.use_code AS useCode,
installUnit.use_code AS installUnitCreditCode,
installUnit.address AS installUnitAddress
FROM tzs_jg_maintain_notice isn
FROM tzs_jg_maintain_notice isn
LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
...
@@ -124,8 +127,8 @@
...
@@ -124,8 +127,8 @@
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 idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info
ei ON ei
.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
eio ON eio
.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 isn.sequence_nbr = #{sequenceNbr} LIMIT 1
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
7c046bfc
...
@@ -125,10 +125,12 @@
...
@@ -125,10 +125,12 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ei.legal_person AS safetyManager,
useUnit.legal_person AS safetyManager,
ei.legal_phone AS safetyManagerPhone,
useUnit.legal_phone AS safetyManagerPhone,
ei.ADDRESS AS useUnitAddress,
useUnit.ADDRESS AS useUnitLeaderAddress,
ei2.use_code AS useCode,
installUnit.use_code AS useCode,
installUnit.use_code AS installUnitCreditCode,
installUnit.address AS installUnitAddress,
tec2.name AS equCategory,
tec2.name AS equCategory,
tec1.name AS equList,
tec1.name AS equList,
tec.name AS equDefine,
tec.name AS equDefine,
...
@@ -140,8 +142,8 @@
...
@@ -140,8 +142,8 @@
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
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 idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info
ei ON ei
.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
ei2 ON ei2
.use_code = isn.install_unit_credit_code
LEFT JOIN tz_base_enterprise_info
installUnit ON installUnit
.use_code = isn.install_unit_credit_code
LEFT JOIN tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
LEFT JOIN tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
7c046bfc
...
@@ -105,7 +105,6 @@
...
@@ -105,7 +105,6 @@
tjtn.county,
tjtn.county,
tjtn.address AS address,
tjtn.address AS address,
tjtn.use_unit_name AS useUnitName,
tjtn.use_unit_name AS useUnitName,
tjtn.install_unit_credit_code AS installUnitCreditCode,
tjtn.install_unit_name AS installUnitName,
tjtn.install_unit_name AS installUnitName,
tjtn.equip_num AS equipName,
tjtn.equip_num AS equipName,
tjtn.rec_date AS recDate,
tjtn.rec_date AS recDate,
...
@@ -155,16 +154,18 @@
...
@@ -155,16 +154,18 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ei
.use_contact AS safetyManager,
useUnit
.use_contact AS safetyManager,
ei
.contact_phone AS safetyManagerPhone,
useUnit
.contact_phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.CITY_NAME AS useUnitCityName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress,
ui.ADDRESS AS useUnitAddress,
eio.use_code AS useCode,
installUnit.use_code AS useCode,
installUnit.use_code AS installUnitCreditCode,
idi.INSPECT_REPORT as inspectReport,
idi.INSPECT_REPORT as inspectReport,
re.equ_id as equId,
re.equ_id as equId,
ei.address as useUnitLeaderAddress
useUnit.address as useUnitLeaderAddress,
installUnit.address installUnitAddress
FROM
FROM
tzs_jg_transfer_notice tjtn
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
...
@@ -174,8 +175,8 @@
...
@@ -174,8 +175,8 @@
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
left join idx_biz_jg_other_info oi on oi.RECORD = re.equ_id
left join idx_biz_jg_other_info oi on oi.RECORD = re.equ_id
LEFT JOIN tz_base_enterprise_info
ei ON ei
.use_code = tjtn.use_unit_credit_code
LEFT JOIN tz_base_enterprise_info
useUnit ON useUnit
.use_code = tjtn.use_unit_credit_code
LEFT JOIN tz_base_enterprise_info
eio ON eio
.use_code = tjtn.install_unit_credit_code
LEFT JOIN tz_base_enterprise_info
installUnit ON installUnit
.use_code = tjtn.install_unit_credit_code
LEFT JOIN amos_tzs_biz.tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
...
...
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 @
7c046bfc
...
@@ -1336,27 +1336,46 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1336,27 +1336,46 @@ public class CommonServiceImpl implements ICommonService {
/**
/**
* 生成使用登记编号
* 生成使用登记编号
*
*
* @param
supervisoryCode 监管码
* @param
equipId 设备id
* @param supervisoryCompanyCode 接收机构单位代码
* @param supervisoryCompanyCode 接收机构单位代码
* @return 使用登记编号
* @return 使用登记编号
*/
*/
public
String
generateRegistrationCode
(
String
supervisoryCode
,
String
supervisoryCompanyCode
)
{
public
String
generateRegistrationCode
(
String
equipId
,
String
supervisoryCode
,
String
supervisoryCompanyCode
)
{
if
(!
ObjectUtils
.
isEmpty
(
supervisoryCode
)
&&
supervisoryCode
.
length
()
>
5
)
{
// 根据设备id查询设备类别、品种
String
name
=
EquipTypeEnum
.
getMessage
(
supervisoryCode
.
substring
(
1
,
2
));
LambdaQueryWrapper
<
RegistrationInfo
>
equipWrapper
=
new
LambdaQueryWrapper
<>();
String
type
=
supervisoryCode
.
substring
(
2
,
4
);
equipWrapper
.
eq
(
RegistrationInfo:
:
getRecord
,
equipId
);
String
city
=
supervisoryCode
.
substring
(
0
,
1
);
RegistrationInfo
equipRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
equipWrapper
);
// 西咸新区监管码对应的设备使用登记证还按咸阳(D)生成
if
(!
ValidationUtil
.
isEmpty
(
equipRegistrationInfo
))
{
if
(
"X"
.
equals
(
city
))
{
String
equCategory
=
equipRegistrationInfo
.
getEquCategory
();
// 设备类别 "3100"
city
=
"D"
;
String
equDefine
=
equipRegistrationInfo
.
getEquDefine
();
// 设备品种 "3110"
}
if
(!
ObjectUtils
.
isEmpty
(
equCategory
))
{
if
(!
ValidationUtil
.
isEmpty
(
supervisoryCompanyCode
))
{
// 设备种类简称
DataDictionary
specialRegionCode
=
dataDictionaryService
.
getByCode
(
supervisoryCompanyCode
,
SPECIAL_REGION_CODE
);
String
equCategoryAbbrName
=
EquipTypeEnum
.
getMessage
(
equCategory
.
substring
(
0
,
1
));
if
(!
ValidationUtil
.
isEmpty
(
specialRegionCode
))
{
city
=
specialRegionCode
.
getName
();
// 设备代码中间两位
String
equipType2MidDigits
;
if
(
ValidationUtil
.
isEmpty
(
equDefine
))
{
// 没有设备品种的设备取设备类别代码中间两位
equipType2MidDigits
=
equCategory
.
substring
(
1
,
3
);
}
else
{
// 设备品种代码中间两位
equipType2MidDigits
=
equDefine
.
substring
(
1
,
3
);
}
// 登记机关代号
String
city
=
supervisoryCode
.
substring
(
0
,
1
);
// 西咸新区监管码对应的设备使用登记证还按咸阳(D)生成
if
(
"X"
.
equals
(
city
))
{
city
=
"D"
;
}
if
(!
ValidationUtil
.
isEmpty
(
supervisoryCompanyCode
))
{
DataDictionary
specialRegionCode
=
dataDictionaryService
.
getByCode
(
supervisoryCompanyCode
,
SPECIAL_REGION_CODE
);
if
(!
ValidationUtil
.
isEmpty
(
specialRegionCode
))
{
city
=
specialRegionCode
.
getName
();
}
}
}
ResponseModel
<
String
>
stringResponseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
equCategoryAbbrName
+
equipType2MidDigits
+
"陕"
+
city
);
return
stringResponseModel
.
getResult
();
}
}
ResponseModel
<
String
>
stringResponseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
name
+
type
+
"陕"
+
city
);
return
stringResponseModel
.
getResult
();
}
}
return
null
;
return
null
;
}
}
...
...
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/JgChangeRegistrationReformServiceImpl.java
View file @
7c046bfc
...
@@ -343,7 +343,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -343,7 +343,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgChangeRegistrationReform
.
setStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
// String newUseRegistrationCertificateNumber = getCode(jgChangeRegistrationReform.getSupervisoryCode());
// String newUseRegistrationCertificateNumber = getCode(jgChangeRegistrationReform.getSupervisoryCode());
String
newUseRegistrationCertificateNumber
=
commonServiceImpl
.
generateRegistrationCode
(
jgChangeRegistrationReform
.
getSupervisoryCode
(),
jgChangeRegistrationReform
.
getReceiveCompanyCode
());
String
newUseRegistrationCertificateNumber
=
commonServiceImpl
.
generateRegistrationCode
(
jgChangeRegistrationReform
Eq
.
getEquId
(),
jgChangeRegistrationReform
.
getSupervisoryCode
(),
jgChangeRegistrationReform
.
getReceiveCompanyCode
());
jgChangeRegistrationReform
.
setUseRegistrationCode
(
newUseRegistrationCertificateNumber
);
jgChangeRegistrationReform
.
setUseRegistrationCode
(
newUseRegistrationCertificateNumber
);
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
newUseRegistrationCertificateNumber
,
jgChangeRegistrationReform
.
getApplyNo
());
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
newUseRegistrationCertificateNumber
,
jgChangeRegistrationReform
.
getApplyNo
());
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
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 @
7c046bfc
...
@@ -752,7 +752,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -752,7 +752,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
updateData
.
setRegPersonName
(
reginParams
.
getUserModel
().
getUserName
());
updateData
.
setRegPersonName
(
reginParams
.
getUserModel
().
getUserName
());
//使用登记证编号
//使用登记证编号
// String useRegistrationCode = this.getCode(supervisoryCode);
// String useRegistrationCode = this.getCode(supervisoryCode);
String
useRegistrationCode
=
commonServiceImpl
.
generateRegistrationCode
(
supervisoryCode
,
updateData
.
getReceiveCompanyCode
());
String
useRegistrationCode
=
commonServiceImpl
.
generateRegistrationCode
(
transferEq
.
getEquId
(),
supervisoryCode
,
updateData
.
getReceiveCompanyCode
());
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationCode
))
{
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationCode
))
{
updateData
.
setUseRegistrationCode
(
useRegistrationCode
);
updateData
.
setUseRegistrationCode
(
useRegistrationCode
);
}
}
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
7c046bfc
...
@@ -805,7 +805,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -805,7 +805,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
// String code = getCode(tzsJgOtherInfo.getSupervisoryCode());
// String code = getCode(tzsJgOtherInfo.getSupervisoryCode());
String
code
=
commonServiceImpl
.
generateRegistrationCode
(
tzsJgOtherInfo
.
getSupervisoryCode
(),
dto
.
getReceiveCompanyCode
());
String
code
=
commonServiceImpl
.
generateRegistrationCode
(
jgChangeRegistrationUnitEq
.
getEquId
(),
tzsJgOtherInfo
.
getSupervisoryCode
(),
dto
.
getReceiveCompanyCode
());
if
(
ValidationUtil
.
isEmpty
(
code
))
{
if
(
ValidationUtil
.
isEmpty
(
code
))
{
log
.
error
(
"生成新的使用登记证编号失败"
);
log
.
error
(
"生成新的使用登记证编号失败"
);
return
;
return
;
...
...
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 @
7c046bfc
...
@@ -424,11 +424,25 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -424,11 +424,25 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
Objects
.
isNull
(
jgInstallationNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
jgInstallationNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"安装告知单不存在"
);
throw
new
IllegalArgumentException
(
"安装告知单不存在"
);
}
}
Map
<
String
,
Object
>
installation
=
informationList
.
get
(
0
);
Map
<
String
,
Object
>
placeholders
=
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
()
);
String
useCode
=
String
.
valueOf
(
installation
.
get
(
"installUnitCreditCode"
));
String
tempFileName
=
"安装告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
// String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders);
//
// // 更新到数据库
// jgInstallationNotice.setNoticeReportUrl(url);
// this.updateById(jgInstallationNotice);
WordTemplateUtils
.
templateToPdfDownload
(
tempFileName
,
"installation-notification-report.ftl"
,
placeholders
,
response
);
}
public
Map
<
String
,
Object
>
fullFillTemplateObj
(
List
<
Map
<
String
,
Object
>>
informationList
,
String
businessType
)
{
Map
<
String
,
Object
>
informObj
=
informationList
.
get
(
0
);
String
useCode
=
String
.
valueOf
(
informObj
.
get
(
"installUnitCreditCode"
));
LambdaQueryWrapper
<
TzBaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TzBaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzBaseUnitLicence:
:
getUnitCode
,
useCode
);
wrapper
.
eq
(
TzBaseUnitLicence:
:
getUnitCode
,
useCode
);
wrapper
.
last
(
" LIMIT 3"
);
List
<
TzBaseUnitLicence
>
list
=
baseUnitLicenceMapper
.
selectList
(
wrapper
);
List
<
TzBaseUnitLicence
>
list
=
baseUnitLicenceMapper
.
selectList
(
wrapper
);
ArrayList
<
String
>
installLicenseNoList
=
new
ArrayList
<>();
ArrayList
<
String
>
installLicenseNoList
=
new
ArrayList
<>();
...
@@ -443,7 +457,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -443,7 +457,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
});
});
}
}
Function
<
String
,
String
>
getValue
=
key
->
in
stallation
.
getOrDefault
(
key
,
""
).
toString
();
Function
<
String
,
String
>
getValue
=
key
->
in
formObj
.
getOrDefault
(
key
,
""
).
toString
();
// 组装模板变量
// 组装模板变量
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
...
@@ -453,14 +467,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -453,14 +467,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"factoryNum"
));
//
TODO:
出厂编号
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"factoryNum"
));
//出厂编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"installUnitAddress"
));
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"installUnitAddress"
));
// 施工单位地址
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installType"
,
"安装告知"
);
// TODO: 施工类别
placeholders
.
put
(
"installType"
,
businessType
);
// 施工类别
placeholders
.
put
(
"installLicenseNo"
,
getValue
.
apply
(
"installLicenseNo"
));
placeholders
.
put
(
"installLicenseExpirationDate"
,
getValue
.
apply
(
"installLicenseExpirationDate"
));
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
...
@@ -469,22 +481,14 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -469,22 +481,14 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitLeaderAddress"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitLeaderAddress"
));
// 安装单位许可信息
placeholders
.
put
(
"installLicenseNoList"
,
installLicenseNoList
);
placeholders
.
put
(
"installLicenseNoList"
,
installLicenseNoList
);
placeholders
.
put
(
"installLicenseExpirationDateList"
,
installLicenseExpirationDateList
);
placeholders
.
put
(
"installLicenseExpirationDateList"
,
installLicenseExpirationDateList
);
// 生成二维码
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
placeholders
.
get
(
"informNumber"
)+
""
,
300
,
300
);
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"informNumber"
)
,
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
return
placeholders
;
// String url = WordTemplateUtils.templateToPdf("installation-notification-report.ftl", placeholders);
// 更新到数据库
// jgInstallationNotice.setNoticeReportUrl(url);
// this.updateById(jgInstallationNotice);
//
// return url;
String
tempFileName
=
"安装告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
WordTemplateUtils
.
templateToPdfDownload
(
tempFileName
,
"installation-notification-report.ftl"
,
placeholders
,
response
);
}
}
@Override
@Override
...
...
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 @
7c046bfc
...
@@ -26,10 +26,8 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
...
@@ -26,10 +26,8 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseUnitLicence
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
...
@@ -51,7 +49,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -51,7 +49,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -109,6 +106,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -109,6 +106,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@Autowired
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
@Autowired
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
...
@@ -353,53 +352,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -353,53 +352,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(
Objects
.
isNull
(
JgMaintainNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
JgMaintainNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"维修告知单不存在"
);
throw
new
IllegalArgumentException
(
"维修告知单不存在"
);
}
}
Map
<
String
,
Object
>
installation
=
informationList
.
get
(
0
);
Map
<
String
,
Object
>
placeholders
=
jgInstallationNoticeService
.
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getName
());
String
useCode
=
String
.
valueOf
(
installation
.
get
(
"useCode"
));
LambdaQueryWrapper
<
TzBaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
String
tempFileName
=
"维修告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
// 因模板许可证编号配置最多支持三个,再多样式混乱,目前返回三个
wrapper
.
eq
(
TzBaseUnitLicence:
:
getUnitCode
,
useCode
).
last
(
"limit 3"
);
List
<
TzBaseUnitLicence
>
list
=
baseUnitLicenceMapper
.
selectList
(
wrapper
);
ArrayList
<
String
>
installLicenseNoList
=
new
ArrayList
<>();
ArrayList
<
String
>
installLicenseExpirationDateList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
list
.
forEach
(
tzBaseUnitLicence
->
{
installLicenseNoList
.
add
(
tzBaseUnitLicence
.
getCertNo
());
installLicenseExpirationDateList
.
add
(
DateUtils
.
convertDateToString
(
tzBaseUnitLicence
.
getExpiryDate
(),
DateUtils
.
DATE_PATTERN
));
});
}
Function
<
String
,
String
>
getValue
=
key
->
installation
.
getOrDefault
(
key
,
""
).
toString
();
// 组装模板变量
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
placeholders
.
put
(
"sequenceNbr"
,
getValue
.
apply
(
"sequenceNbr"
));
placeholders
.
put
(
"installUnitName"
,
getValue
.
apply
(
"installUnitName"
));
placeholders
.
put
(
"informNumber"
,
Objects
.
toString
(
getValue
.
apply
(
"informNumber"
),
getValue
.
apply
(
"applyNo"
)));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installType"
,
"维修告知"
);
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
// 施工负责人
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
// 施工负责人手机
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitProvinceName"
)
+
getValue
.
apply
(
"useUnitCityName"
)
+
getValue
.
apply
(
"useUnitCountyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"useUnitAddress"
));
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"informNumber"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"installLicenseNoList"
,
installLicenseNoList
);
//许可证编号
placeholders
.
put
(
"installLicenseExpirationDateList"
,
installLicenseExpirationDateList
);
//许可证有效期
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
);
...
...
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/JgReformNoticeServiceImpl.java
View file @
7c046bfc
...
@@ -22,15 +22,16 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper;
...
@@ -22,15 +22,16 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgReformNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgReformNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseUnitLicence
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -44,9 +45,9 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -44,9 +45,9 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
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
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
...
@@ -97,6 +98,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -97,6 +98,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Autowired
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
@Autowired
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
...
@@ -327,63 +331,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -327,63 +331,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
}
}
Map
<
String
,
Object
>
installation
=
informationList
.
get
(
0
);
Map
<
String
,
Object
>
placeholders
=
jgInstallationNoticeService
.
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getName
());
String
useCode
=
String
.
valueOf
(
installation
.
get
(
"useCode"
));
LambdaQueryWrapper
<
TzBaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzBaseUnitLicence:
:
getUnitCode
,
useCode
);
wrapper
.
last
(
" LIMIT 3"
);
List
<
TzBaseUnitLicence
>
list
=
baseUnitLicenceMapper
.
selectList
(
wrapper
);
ArrayList
<
String
>
installLicenseNoList
=
new
ArrayList
<>();
ArrayList
<
String
>
installLicenseExpirationDateList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
list
.
forEach
(
tzBaseUnitLicence
->
{
// 因模板许可证编号配置最多支持三个,再多样式混乱,目前返回三个
if
(
installLicenseNoList
.
size
()
<
3
)
{
installLicenseNoList
.
add
(
tzBaseUnitLicence
.
getCertNo
());
installLicenseExpirationDateList
.
add
(
DateUtils
.
convertDateToString
(
tzBaseUnitLicence
.
getExpiryDate
(),
DateUtils
.
DATE_PATTERN
));
}
});
}
Function
<
String
,
String
>
getValue
=
key
->
installation
.
getOrDefault
(
key
,
""
).
toString
();
String
tempFileName
=
"改造告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
// 组装模板变量
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
placeholders
.
put
(
"sequenceNbr"
,
getValue
.
apply
(
"sequenceNbr"
));
placeholders
.
put
(
"installUnitName"
,
getValue
.
apply
(
"installUnitName"
));
placeholders
.
put
(
"informNumber"
,
Objects
.
toString
(
getValue
.
apply
(
"informNumber"
),
getValue
.
apply
(
"applyNo"
)));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号 - 设备出厂编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installType"
,
"改造告知"
);
// TODO: 施工类别
placeholders
.
put
(
"installLicenseNo"
,
getValue
.
apply
(
"installLicenseNo"
));
placeholders
.
put
(
"installLicenseExpirationDate"
,
getValue
.
apply
(
"installLicenseExpirationDate"
));
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
// 施工负责人
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
// 施工负责人手机
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitProvinceName"
)
+
getValue
.
apply
(
"useUnitCityName"
)
+
getValue
.
apply
(
"useUnitCountyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"useUnitAddress"
));
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"informNumber"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"installLicenseNoList"
,
installLicenseNoList
);
placeholders
.
put
(
"installLicenseExpirationDateList"
,
installLicenseExpirationDateList
);
log
.
info
(
"改造告知单 => {}"
,
JSON
.
toJSONString
(
placeholders
));
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
);
// 更新到数据库
// 更新到数据库
...
...
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/JgTransferNoticeServiceImpl.java
View file @
7c046bfc
...
@@ -24,11 +24,9 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
...
@@ -24,11 +24,9 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseUnitLicence
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
...
@@ -51,7 +49,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -51,7 +49,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -78,7 +75,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -78,7 +75,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Autowired
@Autowired
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Autowired
@Autowired
private
CommonServiceImpl
commonService
;
private
CommonServiceImpl
commonService
;
...
@@ -92,9 +88,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -92,9 +88,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
@Autowired
private
TzBaseUnitLicenceMapper
baseUnitLicenceMapper
;
@Autowired
JgUseRegistrationMapper
jgUseRegistrationMapper
;
JgUseRegistrationMapper
jgUseRegistrationMapper
;
@Autowired
@Autowired
...
@@ -104,6 +97,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -104,6 +97,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Autowired
@Autowired
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
@Autowired
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
...
@@ -201,57 +197,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -201,57 +197,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
if
(
Objects
.
isNull
(
jgTransferNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
jgTransferNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"移装告知单不存在"
);
throw
new
IllegalArgumentException
(
"移装告知单不存在"
);
}
}
Map
<
String
,
Object
>
maintain
=
informationList
.
get
(
0
);
String
useCode
=
String
.
valueOf
(
maintain
.
get
(
"installUnitCreditCode"
));
LambdaQueryWrapper
<
TzBaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzBaseUnitLicence:
:
getUnitCode
,
useCode
);
List
<
TzBaseUnitLicence
>
list
=
baseUnitLicenceMapper
.
selectList
(
wrapper
);
ArrayList
<
String
>
installLicenseNoList
=
new
ArrayList
<>();
ArrayList
<
String
>
installLicenseExpirationDateList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
list
.
forEach
(
tzBaseUnitLicence
->
{
// 因模板许可证编号配置最多支持三个,再多样式混乱,目前返回三个
if
(
installLicenseNoList
.
size
()
<
3
)
{
installLicenseNoList
.
add
(
tzBaseUnitLicence
.
getCertNo
());
installLicenseExpirationDateList
.
add
(
DateUtils
.
convertDateToString
(
tzBaseUnitLicence
.
getExpiryDate
(),
DateUtils
.
DATE_PATTERN
));
}
});
}
Function
<
String
,
String
>
getValue
=
key
->
maintain
.
getOrDefault
(
key
,
""
).
toString
();
Map
<
String
,
Object
>
placeholders
=
jgInstallationNoticeService
.
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getName
());
// 组装模板变量
String
tempFileName
=
"移装告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
placeholders
.
put
(
"sequenceNbr"
,
getValue
.
apply
(
"sequenceNbr"
));
placeholders
.
put
(
"installUnitName"
,
getValue
.
apply
(
"installUnitName"
));
placeholders
.
put
(
"informNumber"
,
Objects
.
toString
(
getValue
.
apply
(
"informNumber"
),
getValue
.
apply
(
"applyNo"
)));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"factoryNum"
));
// TODO: 制造编号 - 设备出厂编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installType"
,
"移装"
);
// TODO: 施工类别
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
// 施工负责人
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
// 施工负责人手机
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitLeaderAddress"
));
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"informNumber"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"installLicenseNoList"
,
installLicenseNoList
);
placeholders
.
put
(
"installLicenseExpirationDateList"
,
installLicenseExpirationDateList
);
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
);
// 更新到数据库
// 更新到数据库
...
...
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/JgUseRegistrationServiceImpl.java
View file @
7c046bfc
...
@@ -518,7 +518,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -518,7 +518,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
updateEquipMessage
(
String
.
valueOf
(
sequenceNbr
),
jgUseRegistration
,
mapData
,
registerInfo
,
otherInfo
);
updateEquipMessage
(
String
.
valueOf
(
sequenceNbr
),
jgUseRegistration
,
mapData
,
registerInfo
,
otherInfo
);
// 生成使用登记证编号
// 生成使用登记证编号
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getSupervisoryCode
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getSupervisoryCode
()))
{
String
code
=
commonServiceImpl
.
generateRegistrationCode
(
jgUseRegistration
.
getSupervisoryCode
(),
jgUseRegistration
.
getReceiveCompanyCode
());
String
code
=
commonServiceImpl
.
generateRegistrationCode
(
jgUseRegistration
Eq
.
getEquId
(),
jgUseRegistration
.
getSupervisoryCode
(),
jgUseRegistration
.
getReceiveCompanyCode
());
jgUseRegistration
.
setUseRegistrationCode
(
code
);
jgUseRegistration
.
setUseRegistrationCode
(
code
);
jgUseRegistration
.
setAuditPassDate
(
new
Date
());
jgUseRegistration
.
setAuditPassDate
(
new
Date
());
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/installation-notification-report.ftl
View file @
7c046bfc
This diff is collapsed.
Click to expand it.
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