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
2a85e412
Commit
2a85e412
authored
May 23, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):使用登记表功能开发
parent
e339736a
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
186 additions
and
15 deletions
+186
-15
EquipBasicInfoDto.java
...eejoin/amos/boot/module/jg/api/dto/EquipBasicInfoDto.java
+36
-0
TaskV2FeignService.java
...amos/boot/module/jg/flc/api/fegin/TaskV2FeignService.java
+1
-1
WorkFlowFeignService.java
...os/boot/module/jg/flc/api/fegin/WorkFlowFeignService.java
+1
-1
XidFeignConfiguration.java
...s/boot/module/jg/flc/api/fegin/XidFeignConfiguration.java
+24
-2
JgVehicleInformationController.java
...ule/jg/biz/controller/JgVehicleInformationController.java
+16
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+1
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+1
-0
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+0
-1
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+1
-1
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+99
-0
equipment-registration-certificate-report.ftl
...s/templates/equipment-registration-certificate-report.ftl
+5
-5
flag3-use-equip.ftl
...e-jg-biz/src/main/resources/templates/flag3-use-equip.ftl
+1
-1
use-flag-model-vehicle.pdf
...z/src/main/resources/templates/use-flag-model-vehicle.pdf
+0
-0
use-registration-form.doc
...iz/src/main/resources/templates/use-registration-form.doc
+0
-0
use-registration-form.ftl
...iz/src/main/resources/templates/use-registration-form.ftl
+0
-0
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/dto/EquipBasicInfoDto.java
0 → 100644
View file @
2a85e412
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @apiNote 设备基本情况
* @author LiuLin
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
EquipBasicInfoDto
{
/**
* 制造单位名称
*/
private
String
produceUnitName
;
/**
* 制造日期
*/
private
String
produceDate
;
/**
* 产品编号
*/
private
String
factoryNum
;
/**
* 单位内部编号
*/
private
String
useInnerCode
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/flc/api/fegin/TaskV2FeignService.java
View file @
2a85e412
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
* @apiNote 待办Feign调用
* @apiNote 待办Feign调用
* @date 2024-05-16
* @date 2024-05-16
*/
*/
@FeignClient
(
name
=
"AMOS-API-PRIVILEGE"
,
path
=
"/systemctl/v2/task"
,
configuration
=
{
FeignConfiguration
.
class
})
@FeignClient
(
name
=
"AMOS-API-PRIVILEGE"
,
path
=
"/systemctl/v2/task"
,
configuration
=
{
Xid
FeignConfiguration
.
class
})
public
interface
TaskV2FeignService
{
public
interface
TaskV2FeignService
{
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/flc/api/fegin/WorkFlowFeignService.java
View file @
2a85e412
...
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
FeignConfiguration
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
Xid
FeignConfiguration
.
class
})
public
interface
WorkFlowFeignService
{
public
interface
WorkFlowFeignService
{
/***
/***
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/flc/api/fegin/FeignConfiguration.java
→
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/flc/api/fegin/
Xid
FeignConfiguration.java
View file @
2a85e412
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
flc
.
api
.
fegin
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
flc
.
api
.
fegin
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
feign.RequestInterceptor
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
feign.RequestTemplate
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
io.seata.core.context.RootContext
;
import
io.seata.core.context.RootContext
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.context.request.RequestContextListener
;
@Configuration
@Configuration
public
class
FeignConfiguration
extends
MultipartSupportConfig
implements
RequestInterceptor
{
public
class
XidFeignConfiguration
implements
RequestInterceptor
{
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public
RequestContextListener
requestInterceptor
()
{
return
new
RequestContextListener
();
}
@Override
@Override
public
void
apply
(
RequestTemplate
template
)
{
public
void
apply
(
RequestTemplate
template
)
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgVehicleInformationController.java
View file @
2a85e412
...
@@ -171,7 +171,7 @@ public class JgVehicleInformationController extends BaseController {
...
@@ -171,7 +171,7 @@ public class JgVehicleInformationController extends BaseController {
}
}
/**
/**
*
*
导出车用气瓶使用标志、使用登记证
* @param response response
* @param response response
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @param printType 打印类型
* @param printType 打印类型
...
@@ -179,11 +179,25 @@ public class JgVehicleInformationController extends BaseController {
...
@@ -179,11 +179,25 @@ public class JgVehicleInformationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/export"
)
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出车用气瓶使用标志、使用登记证"
,
notes
=
"普打、套打"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出车用气瓶使用标志、使用登记证"
,
notes
=
"普打、套打"
)
public
void
export
ImageZip
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
public
void
export
VehicleUseRegistrationCertificate
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
value
=
"printType"
,
defaultValue
=
"0"
)
String
printType
)
{
@RequestParam
(
value
=
"printType"
,
defaultValue
=
"0"
)
String
printType
)
{
jgVehicleInformationServiceImpl
.
exportVehicleUseRegistrationCertificate
(
sequenceNbr
,
response
,
printType
);
jgVehicleInformationServiceImpl
.
exportVehicleUseRegistrationCertificate
(
sequenceNbr
,
response
,
printType
);
}
}
/**
* 导出车用气瓶使用登记表
* @param response response
* @param sequenceNbr 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/exportVehicleUseRegistrationForm"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出车用气瓶使用登记表"
)
public
void
exportVehicleUseRegistrationForm
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
value
=
"printType"
,
defaultValue
=
"0"
)
String
printType
)
{
jgVehicleInformationServiceImpl
.
exportVehicleUseRegistrationForm
(
sequenceNbr
,
response
,
printType
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"车用气瓶使用登记单条作废"
,
notes
=
"车用气瓶使用登记单条作废"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"车用气瓶使用登记单条作废"
,
notes
=
"车用气瓶使用登记单条作废"
)
@PutMapping
(
value
=
"/cancel/application"
)
@PutMapping
(
value
=
"/cancel/application"
)
...
...
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 @
2a85e412
...
@@ -1000,7 +1000,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1000,7 +1000,7 @@ public class CommonServiceImpl implements ICommonService {
*
*
* @param wordPath word文件路径
* @param wordPath word文件路径
*/
*/
p
rivate
File
wordToPdf
(
String
filePrefix
,
String
wordPath
,
Map
<
String
,
Object
>
placeholders
)
throws
Exception
{
p
ublic
File
wordToPdf
(
String
filePrefix
,
String
wordPath
,
Map
<
String
,
Object
>
placeholders
)
throws
Exception
{
Assert
.
hasText
(
wordPath
,
"word文件路径不能为空"
);
Assert
.
hasText
(
wordPath
,
"word文件路径不能为空"
);
String
tempFileName
=
filePrefix
+
System
.
currentTimeMillis
()
+
Thread
.
currentThread
().
getName
()
+
"_temp.pdf"
;
String
tempFileName
=
filePrefix
+
System
.
currentTimeMillis
()
+
Thread
.
currentThread
().
getName
()
+
"_temp.pdf"
;
...
...
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 @
2a85e412
...
@@ -1262,6 +1262,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1262,6 +1262,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
JgInstallationNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
)
{
public
JgInstallationNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
)
{
// 1.更新为已作废
// 1.更新为已作废
JgInstallationNotice
installationNotice
=
this
.
getById
(
sequenceNbr
);
JgInstallationNotice
installationNotice
=
this
.
getById
(
sequenceNbr
);
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
2a85e412
...
@@ -549,7 +549,6 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -549,7 +549,6 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
,
ProcessTaskDTO
processTaskDTO
)
{
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
,
ProcessTaskDTO
processTaskDTO
)
{
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
...
...
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 @
2a85e412
...
@@ -844,8 +844,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -844,8 +844,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
}
}
}
}
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgUseRegistration
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgUseRegistration
));
}
}
public
JgUseRegistration
updateData
(
Long
sequenceNbr
,
String
operate
,
WorkflowResultDto
workflowResultDto
,
String
carNumber
,
Boolean
isFirst
)
{
public
JgUseRegistration
updateData
(
Long
sequenceNbr
,
String
operate
,
WorkflowResultDto
workflowResultDto
,
String
carNumber
,
Boolean
isFirst
)
{
...
...
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/JgVehicleInformationServiceImpl.java
View file @
2a85e412
...
@@ -31,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
...
@@ -31,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory
;
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.FileExporter
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
...
@@ -65,6 +66,10 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -65,6 +66,10 @@ 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
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.nio.file.Files
;
import
java.time.LocalDate
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -984,6 +989,100 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -984,6 +989,100 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
this
.
generateReport
(
vehicleInformation
,
printType
,
exportParamsMap
,
response
);
this
.
generateReport
(
vehicleInformation
,
printType
,
exportParamsMap
,
response
);
}
}
public
void
exportVehicleUseRegistrationForm
(
String
sequenceNbr
,
HttpServletResponse
response
,
String
printType
)
{
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
JgVehicleInformation
vehicleInformation
=
this
.
getById
(
sequenceNbr
);
List
<
JgVehicleInformationEq
>
vehicleInformationEqList
=
jgVehicleInformationEqMapper
.
selectList
(
new
QueryWrapper
<
JgVehicleInformationEq
>().
lambda
().
eq
(
JgVehicleInformationEq:
:
getVehicleId
,
sequenceNbr
));
if
(
vehicleInformationEqList
.
isEmpty
())
{
throw
new
BadRequest
(
"使用登记证导出失败,请稍后重试或检查数据完整性!"
);
}
List
<
IdxBizJgRegisterInfo
>
registerInfoList
=
idxBizJgRegisterInfoMapper
.
selectList
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
in
(
"RECORD"
,
vehicleInformationEqList
.
stream
()
.
map
(
JgVehicleInformationEq:
:
getEquId
)
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
toList
())));
Optional
<
IdxBizJgRegisterInfo
>
optionalRegisterInfo
=
registerInfoList
.
stream
().
findFirst
();
String
equDefine
=
""
;
if
(
optionalRegisterInfo
.
isPresent
())
{
IdxBizJgRegisterInfo
registerInfo
=
optionalRegisterInfo
.
get
();
equDefine
=
registerInfo
.
getEquDefine
();
}
List
<
EquipBasicInfoDto
>
equipBasicInfoList
=
this
.
baseMapper
.
queryForUnitVesselEquipment
(
Long
.
valueOf
(
sequenceNbr
),
vehicleInformationEqList
.
stream
()
.
map
(
JgVehicleInformationEq:
:
getEquId
)
.
collect
(
Collectors
.
toList
())).
stream
()
.
map
(
map
->
{
String
useInnerCode
=
Objects
.
toString
(
map
.
get
(
"useInnerCode"
),
""
);
String
produceUnitName
=
Objects
.
toString
(
map
.
get
(
"produceUnitName"
),
""
);
String
factoryNum
=
Objects
.
toString
(
map
.
get
(
"factoryNum"
),
""
);
String
produceDate
=
Objects
.
toString
(
map
.
get
(
"produceDate"
),
""
);
double
nominalWorkingPressure
=
map
.
get
(
"nominalWorkingPressure"
)
!=
null
?
Double
.
parseDouble
(
map
.
get
(
"nominalWorkingPressure"
).
toString
())
:
0.0
;
exportParamsMap
.
merge
(
"workPressure"
,
nominalWorkingPressure
,
(
oldVal
,
newVal
)
->
(
double
)
oldVal
+
(
double
)
newVal
);
return
new
EquipBasicInfoDto
(
produceUnitName
,
produceDate
,
factoryNum
,
useInnerCode
);
})
.
collect
(
Collectors
.
toList
());
//填写本次办理使用登记的事由, 如新设备首次启用、 停用后启用、 改造、 使用单位更名、 使用地址变更、 过户、 移装、 达到设计使用年限等。
exportParamsMap
.
put
(
"registrationType"
,
"新设备首次启用"
);
exportParamsMap
.
put
(
"equDefineName"
,
CylinderTypeEnum
.
of
(
equDefine
));
exportParamsMap
.
put
(
"equipDefine"
,
"车用气瓶"
);
exportParamsMap
.
put
(
"gasNum"
,
vehicleInformation
.
getGasNum
());
exportParamsMap
.
put
(
"chargingMedium"
,
vehicleInformation
.
getFillingMedium
());
exportParamsMap
.
put
(
"volume"
,
vehicleInformation
.
getVolume
());
exportParamsMap
.
put
(
"equipBasicInfoList"
,
equipBasicInfoList
);
exportParamsMap
.
put
(
"installUnitName"
,
vehicleInformation
.
getInstallUnitName
());
exportParamsMap
.
put
(
"inspectUnitName"
,
vehicleInformation
.
getInspectUnitName
());
exportParamsMap
.
put
(
"useUnitName"
,
vehicleInformation
.
getUseUnitName
());
exportParamsMap
.
put
(
"useUnitAddress"
,
vehicleInformation
.
getUseUnitAddress
());
exportParamsMap
.
put
(
"useUnitCreditCode"
,
vehicleInformation
.
getUseUnitCreditCode
());
exportParamsMap
.
put
(
"carNumber"
,
vehicleInformation
.
getCarNumber
());
exportParamsMap
.
put
(
"identificationCode"
,
vehicleInformation
.
getIdentificationCode
());
exportParamsMap
.
put
(
"safetyManagerName"
,
vehicleInformation
.
getSafetyManagerName
());
exportParamsMap
.
put
(
"phone"
,
vehicleInformation
.
getPhone
());
handleAuditPassedDate
(
vehicleInformation
.
getAuditPassDate
(),
exportParamsMap
);
exportParamsMap
.
put
(
"useRegistrationCode"
,
vehicleInformation
.
getUseRegistrationCode
());
String
wordPath
=
"use-registration-form.ftl"
;
// word转pdf
File
pdfFile
;
try
{
pdfFile
=
commonService
.
wordToPdf
(
"车用气瓶使用登记表_"
,
wordPath
,
exportParamsMap
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
try
{
byte
[]
bytes
=
CommonServiceImpl
.
file2byte
(
pdfFile
);
String
docTitle
=
pdfFile
.
getName
();
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
);
}
}
}
/**
* @param auditPassDate 通过时间
* @param exportParamsMap 参数map
*/
static
void
handleAuditPassedDate
(
Date
auditPassDate
,
Map
<
String
,
Object
>
exportParamsMap
)
{
LocalDate
today
;
if
(
ValidationUtil
.
isEmpty
(
auditPassDate
))
{
// 发证日期为空取当前时间
today
=
LocalDate
.
now
();
}
else
{
today
=
auditPassDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
();
}
exportParamsMap
.
put
(
"year"
,
today
.
getYear
()+
""
);
exportParamsMap
.
put
(
"mon"
,
today
.
getMonthValue
());
exportParamsMap
.
put
(
"day"
,
today
.
getDayOfMonth
());
}
private
void
generatePdfPrint
(
Map
<
String
,
Object
>
map
,
HttpServletResponse
response
)
{
private
void
generatePdfPrint
(
Map
<
String
,
Object
>
map
,
HttpServletResponse
response
)
{
// 设置默认值
// 设置默认值
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/equipment-registration-certificate-report.ftl
View file @
2a85e412
...
@@ -488,7 +488,7 @@
...
@@ -488,7 +488,7 @@
</v:textbox>
</v:textbox>
</v:shape>
</v:shape>
<
#elseif printingType == 2>
<
#elseif printingType == 2>
<v:shape
id=
"_x0000_s1026"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:313pt;margin-top:
58
3.9pt;height:37.45pt;width:215.9pt;z-index:269484032;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:shape
id=
"_x0000_s1026"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:313pt;margin-top:
63
3.9pt;height:37.45pt;width:215.9pt;z-index:269484032;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:path/>
<v:path/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
@@ -538,7 +538,7 @@
...
@@ -538,7 +538,7 @@
<w:sz
w:val=
"24"
/>
<w:sz
w:val=
"24"
/>
</w:rPr>
</w:rPr>
<w:pict>
<w:pict>
<v:shape
id=
"文本框 14"
o:spid=
"_x0000_s1027"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:205.05pt;margin-top:6
2
5.65pt;height:30.25pt;width:320.7pt;z-index:251664384;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:shape
id=
"文本框 14"
o:spid=
"_x0000_s1027"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:205.05pt;margin-top:6
7
5.65pt;height:30.25pt;width:320.7pt;z-index:251664384;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:path/>
<v:path/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
@@ -848,7 +848,7 @@
...
@@ -848,7 +848,7 @@
<w:sz
w:val=
"24"
/>
<w:sz
w:val=
"24"
/>
</w:rPr>
</w:rPr>
<w:pict>
<w:pict>
<v:shape
id=
"文本框 17"
o:spid=
"_x0000_s1032"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:394pt;margin-top:501.95pt;height:
53
.25pt;width:132.05pt;z-index:251672576;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:shape
id=
"文本框 17"
o:spid=
"_x0000_s1032"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:394pt;margin-top:501.95pt;height:
150
.25pt;width:132.05pt;z-index:251672576;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:path/>
<v:path/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
@@ -1441,7 +1441,7 @@
...
@@ -1441,7 +1441,7 @@
<w:sz
w:val=
"24"
/>
<w:sz
w:val=
"24"
/>
</w:rPr>
</w:rPr>
<w:pict>
<w:pict>
<v:shape
id=
"文本框 18"
o:spid=
"_x0000_s1036"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:135.25pt;margin-top:502.7pt;height:
53
.25pt;width:135.7pt;z-index:251673600;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:shape
id=
"文本框 18"
o:spid=
"_x0000_s1036"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:135.25pt;margin-top:502.7pt;height:
150
.25pt;width:135.7pt;z-index:251673600;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:path/>
<v:path/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
@@ -130577,7 +130577,7 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAHCEWdd8QA8gAAAAASUVORK5CYII=
...
@@ -130577,7 +130577,7 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAHCEWdd8QA8gAAAAASUVORK5CYII=
<w:sz
w:val=
"24"
/>
<w:sz
w:val=
"24"
/>
</w:rPr>
</w:rPr>
<w:pict>
<w:pict>
<v:shape
id=
"文本框 19"
o:spid=
"_x0000_s1041"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:205.05pt;margin-top:
58
1.75pt;height:34.5pt;width:113pt;z-index:251674624;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:shape
id=
"文本框 19"
o:spid=
"_x0000_s1041"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:205.05pt;margin-top:
63
1.75pt;height:34.5pt;width:113pt;z-index:251674624;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:path/>
<v:path/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/flag3-use-equip.ftl
View file @
2a85e412
...
@@ -1037,7 +1037,7 @@
...
@@ -1037,7 +1037,7 @@
<w:sz
w:val=
"26"
/>
<w:sz
w:val=
"26"
/>
</w:rPr>
</w:rPr>
<w:pict>
<w:pict>
<v:shape
id=
"文本框 9"
o:spid=
"_x0000_s1033"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:296.65pt;margin-top:8.05pt;height:
3
1.6pt;width:111pt;z-index:251670528;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:shape
id=
"文本框 9"
o:spid=
"_x0000_s1033"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:296.65pt;margin-top:8.05pt;height:
10
1.6pt;width:111pt;z-index:251670528;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:path/>
<v:path/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
opacity=
"0f"
focussize=
"0,0"
/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
opacity=
"0f"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/use-flag-model-vehicle.pdf
View file @
2a85e412
No preview for this file type
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/use-registration-form.doc
0 → 100644
View file @
2a85e412
File added
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/use-registration-form.ftl
0 → 100644
View file @
2a85e412
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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