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
3246ce83
Commit
3246ce83
authored
May 15, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):气瓶基本信息汇总表导出zip接口
parent
7bd193bf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
280 additions
and
42 deletions
+280
-42
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+9
-0
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+2
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+52
-32
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+217
-10
SummaryOfBasicCylinderInformation.docx
...esources/templates/SummaryOfBasicCylinderInformation.docx
+0
-0
SummaryOfBasicCylinderInformation.ftl
...resources/templates/SummaryOfBasicCylinderInformation.ftl
+0
-0
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/JgUseRegistrationController.java
View file @
3246ce83
...
@@ -175,6 +175,15 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -175,6 +175,15 @@ public class JgUseRegistrationController extends BaseController {
jgUseRegistrationServiceImpl
.
exportUseRegistrationCertificate
(
sequenceNbr
,
response
,
printType
);
jgUseRegistrationServiceImpl
.
exportUseRegistrationCertificate
(
sequenceNbr
,
response
,
printType
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/summaryBasicInfo/{category}/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出基本信息汇总表(工业管道/气瓶)"
,
notes
=
"导出基本信息汇总表(工业管道/气瓶)"
)
public
void
exportSummaryBasicInfo
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@PathVariable
(
value
=
"category"
)
String
category
)
{
jgUseRegistrationServiceImpl
.
exportSummaryBasicInfo
(
sequenceNbr
,
response
,
category
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getRegion"
)
@GetMapping
(
value
=
"/getRegion"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
...
...
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 @
3246ce83
...
@@ -47,6 +47,8 @@ public interface ICommonService {
...
@@ -47,6 +47,8 @@ public interface ICommonService {
void
generatePdfPrint
(
Map
<
String
,
Object
>
map
,
HttpServletResponse
response
);
void
generatePdfPrint
(
Map
<
String
,
Object
>
map
,
HttpServletResponse
response
);
byte
[]
generateSummaryOfCylinderInfo
(
Map
<
String
,
Object
>
map
,
String
wordPath
,
String
filePrefix
);
List
<
LinkedHashMap
>
creatApproveTree
();
List
<
LinkedHashMap
>
creatApproveTree
();
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
);
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
);
...
...
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 @
3246ce83
...
@@ -106,6 +106,8 @@ import java.util.stream.Collectors;
...
@@ -106,6 +106,8 @@ import java.util.stream.Collectors;
public
class
CommonServiceImpl
implements
ICommonService
{
public
class
CommonServiceImpl
implements
ICommonService
{
public
static
final
String
SPECIAL_REGION_CODE
=
"SpecialRegionCode"
;
public
static
final
String
SPECIAL_REGION_CODE
=
"SpecialRegionCode"
;
public
static
final
String
YWCJ
=
"YWCJ"
;
public
static
final
String
DICT_DATA_KEY
=
"dictDataKey"
;
// 行政区划redis缓存key
// 行政区划redis缓存key
private
static
final
String
PROVINCE
=
"PROVINCE"
;
private
static
final
String
PROVINCE
=
"PROVINCE"
;
private
static
final
String
CITY
=
"CITY"
;
private
static
final
String
CITY
=
"CITY"
;
...
@@ -130,7 +132,6 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -130,7 +132,6 @@ public class CommonServiceImpl implements ICommonService {
private
static
final
String
REGULATOR_UNIT_TREE_ALL
=
"REGULATOR_UNIT_TREE_ALL"
;
private
static
final
String
REGULATOR_UNIT_TREE_ALL
=
"REGULATOR_UNIT_TREE_ALL"
;
// 行政审批局redis缓存key
// 行政审批局redis缓存key
private
static
final
String
ADMINISTRATION_UNIT_TREE
=
"ADMINISTRATION_UNIT_TREE"
;
private
static
final
String
ADMINISTRATION_UNIT_TREE
=
"ADMINISTRATION_UNIT_TREE"
;
private
static
final
String
XZSB
=
"XZSB"
;
private
static
final
String
XZSB
=
"XZSB"
;
private
static
final
String
CODE
=
"code"
;
private
static
final
String
CODE
=
"code"
;
private
static
final
String
PL_DR
=
"PL_DR"
;
private
static
final
String
PL_DR
=
"PL_DR"
;
...
@@ -160,18 +161,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -160,18 +161,7 @@ public class CommonServiceImpl implements ICommonService {
private
static
final
String
SBZX_PAGE_ID
=
"jgScrapCancelAdd"
;
private
static
final
String
SBZX_PAGE_ID
=
"jgScrapCancelAdd"
;
// 业务通用发起——更名变更表单key
// 业务通用发起——更名变更表单key
private
static
final
String
GMBG_PAGE_ID
=
"jgRegistrationInfo"
;
private
static
final
String
GMBG_PAGE_ID
=
"jgRegistrationInfo"
;
private
static
final
String
SELECTED_ROLE_SEQS
=
"selectRoleSeqs"
;
private
static
final
String
SELECTED_ROLE_SEQS
=
"selectRoleSeqs"
;
public
static
final
String
YWCJ
=
"YWCJ"
;
public
static
final
String
DICT_DATA_KEY
=
"dictDataKey"
;
@Value
(
"${redis.cache.failure.time}"
)
private
Long
redisRegionTimeSecond
;
@Autowired
@Autowired
EquipmentCategoryMapper
equipmentCategoryMapper
;
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
@Autowired
...
@@ -215,6 +205,8 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -215,6 +205,8 @@ public class CommonServiceImpl implements ICommonService {
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
@Autowired
@Autowired
RedissonClient
redissonClient
;
RedissonClient
redissonClient
;
@Value
(
"${redis.cache.failure.time}"
)
private
Long
redisRegionTimeSecond
;
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
@Value
(
"classpath:/json/superviseBusinessCategory.json"
)
@Value
(
"classpath:/json/superviseBusinessCategory.json"
)
...
@@ -306,6 +298,17 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -306,6 +298,17 @@ public class CommonServiceImpl implements ICommonService {
return
sb
.
toString
();
return
sb
.
toString
();
}
}
private
static
String
getSelectedRoleRedisKey
()
{
return
RequestContext
.
getToken
()
+
"_"
+
SELECTED_ROLE_SEQS
;
}
private
static
void
convertAndAddToUnitList
(
DictionarieValueModel
x
,
List
<
Map
<
String
,
Object
>>
unitList
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"useCode"
,
x
.
getDictDataKey
());
map
.
put
(
"useUnit"
,
x
.
getDictDataValue
());
unitList
.
add
(
map
);
}
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
companyCodeRegNameMap
=
JsonUtils
.
getResourceJson
(
regNameJson
);
companyCodeRegNameMap
=
JsonUtils
.
getResourceJson
(
regNameJson
);
...
@@ -433,7 +436,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -433,7 +436,7 @@ public class CommonServiceImpl implements ICommonService {
Object
roleSeqs
=
redisUtils
.
get
(
getSelectedRoleRedisKey
());
Object
roleSeqs
=
redisUtils
.
get
(
getSelectedRoleRedisKey
());
Collection
<
PermissionModel
>
permissionModels
;
Collection
<
PermissionModel
>
permissionModels
;
// 监管单位
// 监管单位
if
(!
"company"
.
equals
(
company
.
getLevel
())
||
null
==
roleSeqs
){
if
(!
"company"
.
equals
(
company
.
getLevel
())
||
null
==
roleSeqs
)
{
permissionModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
permissionClient
.
currentPermissionTree
(
menuAgent
,
permissionType
,
null
,
path
));
permissionModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
permissionClient
.
currentPermissionTree
(
menuAgent
,
permissionType
,
null
,
path
));
}
else
{
}
else
{
permissionModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
permissionClient
.
treeByRoles
(
roleSeqs
.
toString
(),
menuAgent
,
permissionType
,
path
,
RequestContext
.
getAppKey
()));
permissionModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
permissionClient
.
treeByRoles
(
roleSeqs
.
toString
(),
menuAgent
,
permissionType
,
path
,
RequestContext
.
getAppKey
()));
...
@@ -443,10 +446,6 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -443,10 +446,6 @@ public class CommonServiceImpl implements ICommonService {
return
result
;
return
result
;
}
}
private
static
String
getSelectedRoleRedisKey
()
{
return
RequestContext
.
getToken
()
+
"_"
+
SELECTED_ROLE_SEQS
;
}
@Override
@Override
public
void
useFlagGenerate
(
UseFlagParamDto
useFlagParamDto
,
HttpServletResponse
response
)
{
public
void
useFlagGenerate
(
UseFlagParamDto
useFlagParamDto
,
HttpServletResponse
response
)
{
Objects
.
requireNonNull
(
useFlagParamDto
,
"参数不能为空"
);
Objects
.
requireNonNull
(
useFlagParamDto
,
"参数不能为空"
);
...
@@ -614,7 +613,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -614,7 +613,7 @@ public class CommonServiceImpl implements ICommonService {
public
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
)
{
public
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
superviseBusinessCategory
);
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
superviseBusinessCategory
);
if
(
XZSB
.
equals
(
businessType
)
&&
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())){
if
(
XZSB
.
equals
(
businessType
)
&&
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
Iterator
<
Map
<
String
,
Object
>>
iterator
=
resourceJson
.
get
(
businessType
).
iterator
();
Iterator
<
Map
<
String
,
Object
>>
iterator
=
resourceJson
.
get
(
businessType
).
iterator
();
while
(
iterator
.
hasNext
())
{
while
(
iterator
.
hasNext
())
{
Map
<
String
,
Object
>
item
=
iterator
.
next
();
Map
<
String
,
Object
>
item
=
iterator
.
next
();
...
@@ -631,8 +630,8 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -631,8 +630,8 @@ public class CommonServiceImpl implements ICommonService {
public
List
<
Map
<
String
,
Object
>>
businessScenarios
(
String
type
)
{
public
List
<
Map
<
String
,
Object
>>
businessScenarios
(
String
type
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
superviseBusinessCategory
);
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
superviseBusinessCategory
);
//新增设备 或者 安改维单位 只有按照设备种类选择的业务
//
新增设备 或者 安改维单位 只有按照设备种类选择的业务
if
(
PL_DR
.
equals
(
type
)
||
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())){
if
(
PL_DR
.
equals
(
type
)
||
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
Iterator
<
Map
<
String
,
Object
>>
iterator
=
resourceJson
.
get
(
YWCJ
).
iterator
();
Iterator
<
Map
<
String
,
Object
>>
iterator
=
resourceJson
.
get
(
YWCJ
).
iterator
();
while
(
iterator
.
hasNext
())
{
while
(
iterator
.
hasNext
())
{
Map
<
String
,
Object
>
item
=
iterator
.
next
();
Map
<
String
,
Object
>
item
=
iterator
.
next
();
...
@@ -721,25 +720,17 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -721,25 +720,17 @@ public class CommonServiceImpl implements ICommonService {
// 检验检测机构 追加车用气瓶
// 检验检测机构 追加车用气瓶
if
(
"检验检测机构"
.
equals
(
type
)
&&
"gasCylindersForCars"
.
equals
(
business
))
{
if
(
"检验检测机构"
.
equals
(
type
)
&&
"gasCylindersForCars"
.
equals
(
business
))
{
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
"OLD_INSPECTION_TESTING_UNIT"
).
getResult
();
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
"OLD_INSPECTION_TESTING_UNIT"
).
getResult
();
result
.
forEach
(
x
->
convertAndAddToUnitList
(
x
,
unitList
));
result
.
forEach
(
x
->
convertAndAddToUnitList
(
x
,
unitList
));
}
}
if
(
"安装改造维修单位"
.
equals
(
type
)
&&
"gasCylindersForCars"
.
equals
(
business
))
{
if
(
"安装改造维修单位"
.
equals
(
type
)
&&
"gasCylindersForCars"
.
equals
(
business
))
{
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
"OLD_INSTALLATION_UNIT"
).
getResult
();
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
"OLD_INSTALLATION_UNIT"
).
getResult
();
result
.
forEach
(
x
->
convertAndAddToUnitList
(
x
,
unitList
));
result
.
forEach
(
x
->
convertAndAddToUnitList
(
x
,
unitList
));
}
}
List
<
Map
<
String
,
Object
>>
unitListByType
=
commonMapper
.
getUnitListByType
(
type
);
List
<
Map
<
String
,
Object
>>
unitListByType
=
commonMapper
.
getUnitListByType
(
type
);
unitList
.
addAll
(
unitListByType
);
unitList
.
addAll
(
unitListByType
);
return
unitList
;
return
unitList
;
}
}
private
static
void
convertAndAddToUnitList
(
DictionarieValueModel
x
,
List
<
Map
<
String
,
Object
>>
unitList
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"useCode"
,
x
.
getDictDataKey
());
map
.
put
(
"useUnit"
,
x
.
getDictDataValue
());
unitList
.
add
(
map
);
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
,
String
companyCode
)
{
public
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
,
String
companyCode
)
{
if
(
ObjectUtils
.
isEmpty
(
companyCode
))
{
if
(
ObjectUtils
.
isEmpty
(
companyCode
))
{
...
@@ -919,6 +910,35 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -919,6 +910,35 @@ public class CommonServiceImpl implements ICommonService {
this
.
fillParamValueToPdf
(
map
,
response
,
"templates/use-registration-model.pdf"
,
"套打使用登记证.pdf"
,
12.0f
);
this
.
fillParamValueToPdf
(
map
,
response
,
"templates/use-registration-model.pdf"
,
"套打使用登记证.pdf"
,
12.0f
);
}
}
@Override
public
byte
[]
generateSummaryOfCylinderInfo
(
Map
<
String
,
Object
>
map
,
String
wordPath
,
String
filePrefix
)
{
if
(
CollectionUtils
.
isEmpty
(
map
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
// 默认普打
map
.
put
(
"printingType"
,
PrintingTypeEnum
.
REGULAR
.
getCode
());
// word转pdf
File
pdfFile
;
try
{
pdfFile
=
this
.
wordToPdf
(
""
,
wordPath
,
map
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
// file转字节流
try
{
return
file2byte
(
pdfFile
);
}
catch
(
Exception
e
)
{
log
.
error
(
"pdf文件转换失败:{}"
,
e
);
}
finally
{
try
{
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
}
catch
(
Exception
e
)
{
log
.
error
(
"文件找不到,删除失败:{}"
,
e
);
}
}
return
new
byte
[
0
];
}
/**
/**
* 根据参数填充PDF文本域
* 根据参数填充PDF文本域
*
*
...
@@ -992,7 +1012,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -992,7 +1012,7 @@ public class CommonServiceImpl implements ICommonService {
private
File
wordToPdf
(
String
filePrefix
,
String
wordPath
,
Map
<
String
,
Object
>
placeholders
)
throws
Exception
{
private
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
()
+
"_temp.pdf"
;
String
tempFileName
=
filePrefix
+
System
.
currentTimeMillis
()
+
Thread
.
currentThread
().
getName
()
+
"_temp.pdf"
;
WordTemplateUtils
instance
=
WordTemplateUtils
.
getInstance
();
WordTemplateUtils
instance
=
WordTemplateUtils
.
getInstance
();
...
@@ -1711,7 +1731,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1711,7 +1731,7 @@ public class CommonServiceImpl implements ICommonService {
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
jgRegistrationHistory
!=
null
)
{
if
(
jgRegistrationHistory
!=
null
)
{
String
changeData
=
jgRegistrationHistory
.
getChangeData
();
String
changeData
=
jgRegistrationHistory
.
getChangeData
();
try
{
try
{
// 尝试解析为JSONArray
// 尝试解析为JSONArray
...
...
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 @
3246ce83
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -3,6 +3,7 @@ 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.map.MapBuilder
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -53,6 +54,7 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
...
@@ -53,6 +54,7 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -70,12 +72,19 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -70,12 +72,19 @@ 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.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.IntStream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
/**
/**
* 服务实现类
* 服务实现类
...
@@ -88,6 +97,7 @@ import java.util.stream.Collectors;
...
@@ -88,6 +97,7 @@ import java.util.stream.Collectors;
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
{
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
{
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
@Autowired
@Autowired
WorkFlowFeignService
workFlowFeginService
;
WorkFlowFeignService
workFlowFeginService
;
@Autowired
@Autowired
...
@@ -143,12 +153,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -143,12 +153,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
IdxBizJgInspectionDetectionInfoServiceImpl
idxBizJgInspectionDetectionInfoService
;
private
IdxBizJgInspectionDetectionInfoServiceImpl
idxBizJgInspectionDetectionInfoService
;
@Autowired
@Autowired
private
JgUseRegistrationMapper
jgUseRegistrationMapper
;
private
JgUseRegistrationMapper
jgUseRegistrationMapper
;
@Autowired
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
private
ESEquipmentCategory
esEquipmentCategory
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
/**
/**
* @param auditPassDate 通过时间
* @param auditPassDate 通过时间
* @param exportParamsMap 参数map
* @param exportParamsMap 参数map
...
@@ -166,6 +173,33 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -166,6 +173,33 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
exportParamsMap
.
put
(
"giveOutDay"
,
today
.
getDayOfMonth
());
exportParamsMap
.
put
(
"giveOutDay"
,
today
.
getDayOfMonth
());
}
}
private
static
void
toZipFile
(
HttpServletResponse
response
,
List
<
CompletableFuture
<
byte
[]>>
futures
,
String
filePrefix
,
String
customFileName
)
{
// 打包zip
try
(
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ZipOutputStream
zip
=
new
ZipOutputStream
(
outputStream
))
{
for
(
int
i
=
0
;
i
<
futures
.
size
();
i
++)
{
try
{
zip
.
putNextEntry
(
new
ZipEntry
(
filePrefix
+
"第"
+
(
i
+
1
)
+
"页"
+
".pdf"
));
IOUtils
.
write
(
futures
.
get
(
i
).
join
(),
zip
);
zip
.
closeEntry
();
}
catch
(
IOException
e
)
{
log
.
error
(
"打包zip失败:"
+
e
.
getMessage
());
throw
new
BadRequest
(
"打包zip失败"
);
}
}
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setHeader
(
"content-Type"
,
"application/zip"
);
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
"Content-Disposition"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename*=UTF-8''"
+
java
.
net
.
URLEncoder
.
encode
(
customFileName
,
StandardCharsets
.
UTF_8
.
toString
()));
IOUtils
.
write
(
outputStream
.
toByteArray
(),
response
.
getOutputStream
());
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"导出异常:"
,
e
);
}
}
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
);
...
@@ -476,7 +510,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -476,7 +510,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List
<
WorkflowResultDto
>
resultDto
=
commonServiceImpl
.
buildWorkFlowInfo
(
processTaskDTOS
);
List
<
WorkflowResultDto
>
resultDto
=
commonServiceImpl
.
buildWorkFlowInfo
(
processTaskDTOS
);
if
(!
ObjectUtils
.
isEmpty
(
resultDto
)
&&
!
ObjectUtils
.
isEmpty
(
resultDto
.
get
(
0
)))
{
if
(!
ObjectUtils
.
isEmpty
(
resultDto
)
&&
!
ObjectUtils
.
isEmpty
(
resultDto
.
get
(
0
)))
{
WorkflowResultDto
workflowResultDto
=
resultDto
.
get
(
0
);
WorkflowResultDto
workflowResultDto
=
resultDto
.
get
(
0
);
updateData
(
jgUseRegistration
.
getSequenceNbr
(),
"0"
,
workflowResultDto
,
""
,
Boolean
.
TRUE
);
updateData
(
jgUseRegistration
.
getSequenceNbr
(),
"0"
,
workflowResultDto
,
""
,
Boolean
.
TRUE
);
}
}
}
}
...
@@ -806,7 +840,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -806,7 +840,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
this
.
getBaseMapper
().
updateById
(
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
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
role
=
workflowResultDto
.
getNextExecutorRoleIds
();
String
role
=
workflowResultDto
.
getNextExecutorRoleIds
();
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
...
@@ -843,7 +877,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -843,7 +877,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 避免出现以下情况:
// 避免出现以下情况:
// 厂车使用登记 -》 使用单位提交 -》 一级填写了厂车车牌号,例如:场内陕AB1234,通过 -》 到二级或者三级,驳回到使用单位
// 厂车使用登记 -》 使用单位提交 -》 一级填写了厂车车牌号,例如:场内陕AB1234,通过 -》 到二级或者三级,驳回到使用单位
// -》 使用单位重新编辑提交,并且换了另一个设备 —-》 一级审批继续使用车牌号:场内陕AB1234,会出现车牌号已存在
// -》 使用单位重新编辑提交,并且换了另一个设备 —-》 一级审批继续使用车牌号:场内陕AB1234,会出现车牌号已存在
if
(
WorkFlowStatusEnum
.
USE_SUBMIT
.
getCode
().
equals
(
taskCode
)
&&
!
ObjectUtils
.
isEmpty
(
carNumber
))
{
if
(
WorkFlowStatusEnum
.
USE_SUBMIT
.
getCode
().
equals
(
taskCode
)
&&
!
ObjectUtils
.
isEmpty
(
carNumber
))
{
idxBizJgRegisterInfoMapper
.
update
(
null
,
new
UpdateWrapper
<
IdxBizJgRegisterInfo
>().
lambda
()
idxBizJgRegisterInfoMapper
.
update
(
null
,
new
UpdateWrapper
<
IdxBizJgRegisterInfo
>().
lambda
()
.
set
(
IdxBizJgRegisterInfo:
:
getCarNumber
,
null
)
.
set
(
IdxBizJgRegisterInfo:
:
getCarNumber
,
null
)
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgUseRegistrationEq
.
getEquId
()));
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgUseRegistrationEq
.
getEquId
()));
...
@@ -1132,7 +1166,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1132,7 +1166,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(
"unit"
.
equals
(
manageType
))
{
if
(
"unit"
.
equals
(
manageType
))
{
this
.
updateUseRegUnitData
(
jgUseRegistration
.
getSequenceNbr
(),
operate
,
workflowResultDto
,
false
);
this
.
updateUseRegUnitData
(
jgUseRegistration
.
getSequenceNbr
(),
operate
,
workflowResultDto
,
false
);
}
else
{
}
else
{
this
.
updateData
(
jgUseRegistration
.
getSequenceNbr
(),
operate
,
workflowResultDto
,
carNumber
,
false
);
this
.
updateData
(
jgUseRegistration
.
getSequenceNbr
(),
operate
,
workflowResultDto
,
carNumber
,
false
);
}
}
}
}
this
.
clearDataForCheckEquipRepeatUsed
(
jgUseRegistration
);
this
.
clearDataForCheckEquipRepeatUsed
(
jgUseRegistration
);
...
@@ -1419,7 +1453,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1419,7 +1453,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(
ValidationUtil
.
isEmpty
(
useRegistration
.
getUseUnitName
()))
{
if
(
ValidationUtil
.
isEmpty
(
useRegistration
.
getUseUnitName
()))
{
throw
new
BadRequest
(
"使用登记证导出失败,使用单位名称为空!"
);
throw
new
BadRequest
(
"使用登记证导出失败,使用单位名称为空!"
);
}
}
exportParamsMap
.
put
(
"useUnitName"
,
useRegistration
.
getUseUnitName
());
exportParamsMap
.
put
(
"useUnitName"
,
useRegistration
.
getUseUnitName
());
// 监管码
// 监管码
if
(
ValidationUtil
.
isEmpty
(
useRegistration
.
getSupervisoryCode
()))
{
if
(
ValidationUtil
.
isEmpty
(
useRegistration
.
getSupervisoryCode
()))
{
...
@@ -1517,6 +1551,178 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1517,6 +1551,178 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
/**
/**
* 导出基本信息汇总表(工业管道/气瓶)
*
* @param sequenceNbr
* @param response
*/
public
void
exportSummaryBasicInfo
(
String
sequenceNbr
,
HttpServletResponse
response
,
String
category
)
{
// 总数
double
total
;
// 每页显示条数,默认 10
int
size
=
10
;
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
JSONArray
equipmentLists
=
(
JSONArray
)
jsonObject
.
get
(
"equipmentLists"
);
total
=
equipmentLists
.
size
();
JgUseRegistration
jgUseRegistration
=
jgUseRegistrationMapper
.
selectOne
(
new
QueryWrapper
<
JgUseRegistration
>().
lambda
()
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
sequenceNbr
));
if
(
"0"
.
equals
(
category
))
{
// 压力管道基本信息汇总表
// 模板
String
wordPath
=
"PressurePipeBasicInformationSummary.ftl"
;
// 文件名前缀
String
filePrefix
=
"压力管道基本信息汇总表_"
;
// 压力包名称
String
customFileName
=
filePrefix
+
jgUseRegistration
.
getApplyNo
()
+
".zip"
;
// 总页数
int
page
=
(
int
)
Math
.
ceil
(
total
/
size
);
List
<
CompletableFuture
<
byte
[]>>
futures
=
pressurePipeDataPreparation
(
page
,
jsonObject
,
size
,
total
,
equipmentLists
,
wordPath
,
filePrefix
);
toZipFile
(
response
,
futures
,
filePrefix
,
customFileName
);
}
else
if
(
"1"
.
equals
(
category
))
{
// 气瓶基本信息汇总表
// 模板
String
wordPath
=
"SummaryOfBasicCylinderInformation.ftl"
;
// 文件名前缀
String
filePrefix
=
"气瓶基本信息汇总表_"
;
// 压力包名称
String
customFileName
=
filePrefix
+
jgUseRegistration
.
getApplyNo
()
+
".zip"
;
// 总页数
int
page
=
(
int
)
Math
.
ceil
(
total
/
size
);
List
<
CompletableFuture
<
byte
[]>>
futures
=
cylinderDataPreparation
(
page
,
jsonObject
,
size
,
total
,
equipmentLists
,
wordPath
,
filePrefix
);
toZipFile
(
response
,
futures
,
filePrefix
,
customFileName
);
}
}
/**
* 气瓶数据
*
* @return
*/
private
List
<
CompletableFuture
<
byte
[]>>
cylinderDataPreparation
(
int
page
,
JSONObject
jsonObject
,
int
size
,
double
total
,
JSONArray
equipmentLists
,
String
wordPath
,
String
filePrefix
)
{
List
<
CompletableFuture
<
byte
[]>>
futures
=
IntStream
.
rangeClosed
(
1
,
page
)
.
mapToObj
(
current
->
CompletableFuture
.
supplyAsync
(()
->
{
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
exportParamsMap
.
put
(
"current"
,
current
);
exportParamsMap
.
put
(
"page"
,
page
);
exportParamsMap
.
put
(
"printDate"
,
new
Date
());
// 使用单位
exportParamsMap
.
put
(
"useUnitName"
,
jsonObject
.
get
(
"useUnitName"
));
// 联系电话
exportParamsMap
.
put
(
"phone"
,
""
);
// 经办人
exportParamsMap
.
put
(
"agent"
,
""
);
// 电子邮箱
exportParamsMap
.
put
(
"email"
,
""
);
// 数据分页
int
start
=
(
current
-
1
)
*
size
;
int
end
=
((
current
-
1
)
*
size
+
size
)
<
total
?
(
current
-
1
)
*
size
+
size
:
(
int
)
total
;
List
<
Object
>
equData
=
equipmentLists
.
subList
(
start
,
end
);
// 设备数据填充
this
.
fillInCylinderEquData
(
exportParamsMap
,
equData
,
size
);
return
commonService
.
generateSummaryOfCylinderInfo
(
exportParamsMap
,
wordPath
,
filePrefix
);
})).
collect
(
Collectors
.
toList
());
CompletableFuture
.
allOf
(
futures
.
toArray
(
new
CompletableFuture
[
page
])).
join
();
return
futures
;
}
/**
* 压力管道数据
*
* @return
*/
private
List
<
CompletableFuture
<
byte
[]>>
pressurePipeDataPreparation
(
int
page
,
JSONObject
jsonObject
,
int
size
,
double
total
,
JSONArray
equipmentLists
,
String
wordPath
,
String
filePrefix
)
{
List
<
CompletableFuture
<
byte
[]>>
futures
=
IntStream
.
rangeClosed
(
1
,
page
)
.
mapToObj
(
current
->
CompletableFuture
.
supplyAsync
(()
->
{
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
exportParamsMap
.
put
(
"current"
,
current
);
exportParamsMap
.
put
(
"page"
,
page
);
exportParamsMap
.
put
(
"printDate"
,
new
Date
());
// 使用单位
exportParamsMap
.
put
(
"useUnitName"
,
jsonObject
.
get
(
"useUnitName"
));
// 使用单位地址
exportParamsMap
.
put
(
""
,
jsonObject
.
get
(
""
));
// 工程(装置)名称
// 安全管理部门
// 安全管理员
// 联系电话
exportParamsMap
.
put
(
"phone"
,
"13209090909"
);
// 经办人
exportParamsMap
.
put
(
"agent"
,
"张三"
);
// 电子邮箱
exportParamsMap
.
put
(
"email"
,
"htt@yeah.net"
);
// 数据分页
int
start
=
(
current
-
1
)
*
size
;
int
end
=
((
current
-
1
)
*
size
+
size
)
<
total
?
(
current
-
1
)
*
size
+
size
:
(
int
)
total
;
List
<
Object
>
equData
=
equipmentLists
.
subList
(
start
,
end
);
// 设备数据填充
this
.
pressurePipeEquData
(
exportParamsMap
,
equData
,
size
);
return
commonService
.
generateSummaryOfCylinderInfo
(
exportParamsMap
,
wordPath
,
filePrefix
);
})).
collect
(
Collectors
.
toList
());
CompletableFuture
.
allOf
(
futures
.
toArray
(
new
CompletableFuture
[
page
])).
join
();
return
futures
;
}
/**
* 气瓶设备数据填充
*/
public
void
fillInCylinderEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Object
>
equData
,
int
size
)
{
String
[]
fieldNames
=
{
"equDefineName"
,
"factoryNum"
,
"chargingMedium"
,
"produceUnitName"
,
"produceDate"
,
"nominalWorkingPressure"
,
"singleBottleVolume"
,
"inspectDate"
,
"nextInspectDate"
,
"useInnerCode"
};
// 填充有效数据
for
(
int
curr
=
0
;
curr
<
equData
.
size
();
curr
++)
{
JSONObject
obj
=
(
JSONObject
)
equData
.
get
(
curr
);
int
serialNum
=
curr
+
1
;
for
(
String
fieldName
:
fieldNames
)
{
exportParamsMap
.
put
(
fieldName
+
serialNum
,
obj
.
get
(
fieldName
));
}
}
// 填充剩余空白项至指定总页数
for
(
int
curr
=
equData
.
size
();
curr
<
size
;
curr
++)
{
int
serialNum
=
curr
+
1
;
for
(
String
fieldName
:
fieldNames
)
{
exportParamsMap
.
put
(
fieldName
+
serialNum
,
""
);
// 使用空字符串填充空白项
}
}
}
/**
* 压力管道设备数据填充
*/
public
void
pressurePipeEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Object
>
equData
,
int
size
)
{
String
[]
fieldNames
=
{
"productName"
,
"pipelineNumber"
,
"deviceLevel"
,
"designUnitName"
,
"uscUnitName"
,
"uscDate"
,
"useDate"
,
"nominalDiameter"
,
"wallThickness"
,
"pipeLength"
,
"pressure"
,
"temperature"
,
"medium"
,
"inspectConclusion"
,
"inspectOrgName"
,
"nextInspectDate"
,
"inspectConclusion"
,
"remark"
};
// 填充有效数据
for
(
int
curr
=
0
;
curr
<
equData
.
size
();
curr
++)
{
JSONObject
obj
=
(
JSONObject
)
equData
.
get
(
curr
);
int
serialNum
=
curr
+
1
;
for
(
String
fieldName
:
fieldNames
)
{
exportParamsMap
.
put
(
fieldName
+
serialNum
,
obj
.
get
(
fieldName
));
}
}
// 填充剩余空白项至指定总页数
for
(
int
curr
=
equData
.
size
();
curr
<
size
;
curr
++)
{
int
serialNum
=
curr
+
1
;
for
(
String
fieldName
:
fieldNames
)
{
exportParamsMap
.
put
(
fieldName
+
serialNum
,
""
);
// 使用空字符串填充空白项
}
}
}
/**
* 填充设备最新的数据至历史json
* 填充设备最新的数据至历史json
*
*
* @param jsonObject 历史json
* @param jsonObject 历史json
...
@@ -1597,7 +1803,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1597,7 +1803,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 生成监管码、96333码
* 生成监管码、96333码
*/
*/
public
void
createCode
(
JSONObject
dataMap
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgUseInfo
useInfo
,
IdxBizJgOtherInfo
otherInfo
)
{
public
void
createCode
(
JSONObject
dataMap
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgUseInfo
useInfo
,
IdxBizJgOtherInfo
otherInfo
)
{
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
if
(
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
// 生成监管码、96333码
// 生成监管码、96333码
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -1717,7 +1924,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1717,7 +1924,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
idxBizJgRegisterInfoService
.
update
(
updateWrapper
);
idxBizJgRegisterInfoService
.
update
(
updateWrapper
);
}
}
private
void
rollBackUseInfo
(
String
record
)
{
private
void
rollBackUseInfo
(
String
record
)
{
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getCity
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getCity
,
null
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/SummaryOfBasicCylinderInformation.docx
0 → 100644
View file @
3246ce83
File added
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/SummaryOfBasicCylinderInformation.ftl
0 → 100644
View file @
3246ce83
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