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
48fd74f2
Commit
48fd74f2
authored
Mar 05, 2026
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_test' into develop_tzs_register
parents
fb7ed861
fd1fee8a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
229 additions
and
66 deletions
+229
-66
TzBaseEnterpriseInfoDto.java
...mos/boot/module/jczs/api/dto/TzBaseEnterpriseInfoDto.java
+5
-0
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+7
-0
TzBaseEnterpriseInfoController.java
...e/jczs/biz/controller/TzBaseEnterpriseInfoController.java
+10
-0
CommonMapper.java
.../yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
+2
-0
BaseEnterpriseVo.java
.../module/jg/api/vo/tableDataExportVo/BaseEnterpriseVo.java
+1
-2
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+11
-0
StringColumnDiffHandler.java
...t/module/jg/biz/edit/factory/StringColumnDiffHandler.java
+2
-2
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+6
-6
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+3
-4
TcmServiceFeignClient.java
.../amos/boot/module/jg/biz/feign/TcmServiceFeignClient.java
+8
-0
BaseEquipUsedCheckService.java
...module/jg/biz/service/impl/BaseEquipUsedCheckService.java
+113
-16
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+10
-1
JgTableDataExportServiceImpl.java
...ule/jg/biz/service/impl/JgTableDataExportServiceImpl.java
+47
-31
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+0
-0
equipment-registration-certificate-report.ftl
...s/templates/equipment-registration-certificate-report.ftl
+3
-3
IdxBizJgUseInfo.java
...join/amos/boot/module/ymt/api/entity/IdxBizJgUseInfo.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-api/src/main/java/com/yeejoin/amos/boot/module/jczs/api/dto/TzBaseEnterpriseInfoDto.java
View file @
48fd74f2
...
...
@@ -320,4 +320,9 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
*/
@ApiModelProperty
(
value
=
"创建时间"
)
protected
Date
createDateEnd
;
/**
* 单位类型集合
*/
private
List
<
String
>
unitTypeList
;
}
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
48fd74f2
...
...
@@ -116,6 +116,13 @@
test=
"tzBaseEnterpriseInfoDto.useUnit!=null and tzBaseEnterpriseInfoDto.useUnit!='' "
>
AND use_unit LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useUnit},'%')
</if>
<if
test=
"tzBaseEnterpriseInfoDto.unitTypeList != null and !tzBaseEnterpriseInfoDto.unitTypeList.isEmpty()"
>
AND (
<foreach
collection=
"tzBaseEnterpriseInfoDto.unitTypeList"
item=
"unit"
separator=
" OR "
>
FIND_IN_SET(#{unit}, REPLACE(unit_type, '#', ','))
</foreach>
)
</if>
<if
test=
"tzBaseEnterpriseInfoDto.useUnitCertificate!=null and tzBaseEnterpriseInfoDto.useUnitCertificate!='' "
>
AND use_unit_certificate = #{tzBaseEnterpriseInfoDto.useUnitCertificate}
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/biz/controller/TzBaseEnterpriseInfoController.java
View file @
48fd74f2
...
...
@@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 企业数据信息
...
...
@@ -211,6 +212,15 @@ public class TzBaseEnterpriseInfoController {
}
catch
(
Exception
e
)
{
}
}
tzBaseEnterpriseInfoDto
.
setUnitTypeList
(
Optional
.
ofNullable
((
String
)
map
.
get
(
"unitTypeList"
))
.
filter
(
ObjectUtils:
:
isNotEmpty
)
.
map
(
s
->
Arrays
.
stream
(
s
.
split
(
","
))
.
map
(
String:
:
trim
)
.
filter
(
ObjectUtils:
:
isNotEmpty
)
.
collect
(
Collectors
.
toList
()))
.
orElse
(
Collections
.
emptyList
())
);
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
page
(
pageParam
,
tzBaseEnterpriseInfoDto
,
sort
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
View file @
48fd74f2
...
...
@@ -382,5 +382,7 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
List
<
String
>
querySupervisionCompanyCode
();
Map
<
String
,
String
>
queryUseRegistrationByRecord
(
String
record
);
String
queryTcmUnitNameByCreditCode
(
@Param
(
"unitCreditCode"
)
String
unitCreditCode
,
@Param
(
"unitType"
)
String
unitType
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/tableDataExportVo/BaseEnterpriseVo.java
View file @
48fd74f2
...
...
@@ -3,9 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.jg.api.annotation.DictCode2DictName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
...
...
@@ -79,6 +77,7 @@ public class BaseEnterpriseVo {
String
registrationAuthority
;
@ExcelProperty
(
value
=
"核准时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
approvalTime
;
@ExcelProperty
(
value
=
"经营状态"
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
48fd74f2
...
...
@@ -4600,4 +4600,15 @@
where eq.equ_id = #{record}
limit 1
</select>
<select
id=
"queryTcmUnitNameByCreditCode"
resultType=
"java.lang.String"
>
select unit_name from tzs_tcm_unit_info where unit_code = #{unitCreditCode}
<if
test=
"unitType != null and unitType != ''"
>
and unit_type in
<foreach
item=
"item"
index=
"index"
collection=
"unitType.split(',')"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
limit 1
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/factory/StringColumnDiffHandler.java
View file @
48fd74f2
...
...
@@ -54,8 +54,8 @@ public class StringColumnDiffHandler implements ColumnDiff {
fieldChangeMeta
.
setColumnOldValue
(
Boolean
.
toString
((
Boolean
)
oldVal
));
fieldChangeMeta
.
setColumnNewValue
(
Boolean
.
toString
((
Boolean
)
newVal
));
}
else
{
fieldChangeMeta
.
setColumnOldValue
(
Objects
.
toString
(
oldVal
,
nul
l
));
fieldChangeMeta
.
setColumnNewValue
(
Objects
.
toString
(
newVal
,
nul
l
));
fieldChangeMeta
.
setColumnOldValue
(
Objects
.
isNull
(
oldVal
)
?
null
:
Objects
.
toString
(
oldVa
l
));
fieldChangeMeta
.
setColumnNewValue
(
Objects
.
isNull
(
newVal
)
?
null
:
Objects
.
toString
(
newVa
l
));
}
fieldChangeMeta
.
setDisplayOldValue
(
formatService
.
format
(
displayDefine
,
fieldChangeMeta
.
getColumnOldValue
()));
fieldChangeMeta
.
setDisplayNewValue
(
formatService
.
format
(
displayDefine
,
fieldChangeMeta
.
getColumnNewValue
()));
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/CommonEquipDataProcessService.java
View file @
48fd74f2
...
...
@@ -17,9 +17,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.enums.TcmUnitTypeEnum
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
...
...
@@ -40,8 +40,8 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.utils.DiffUtils;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -75,7 +75,6 @@ import java.util.function.Function;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
CertificateStatusEnum
.
YIDENGJI
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
core
.
SubClassFinder
.
getAllSubClasses
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
utils
.
ReflectiveFieldAccessor
.
getAllFields
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
IdxBizJgProjectContraptionServiceImplService
.
PROJECT_CONTRAPTION
;
...
...
@@ -828,7 +827,8 @@ public class CommonEquipDataProcessService {
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
registerInfo
.
getUseOrgCode
())
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
YIDENGJI
.
getName
())
.
orderByDesc
(
JgUseRegistrationManage:
:
getRecDate
)
.
last
(
"limit 1"
)
.
select
(
JgUseRegistrationManage:
:
getSequenceNbr
,
JgUseRegistrationManage:
:
getReceiveCompanyCode
,
JgUseRegistrationManage:
:
getRegDate
).
one
();
if
(!
ValidationUtil
.
isEmpty
(
jgUseRegistrationManage
))
{
result
.
put
(
"receiveCompanyCode"
,
jgUseRegistrationManage
.
getReceiveCompanyCode
());
...
...
@@ -1138,8 +1138,8 @@ public class CommonEquipDataProcessService {
// 2.产权单位名称冗余
// 产权单位信息
if
(
StringUtils
.
isNotEmpty
(
useInfoNew
.
getEstateUnitCreditCode
()))
{
CompanyBo
companyBo
=
this
.
getCommonMapper
().
queryCompanyByCode
(
useInfoNew
.
getEstateUnitCredi
tCode
());
Optional
.
ofNullable
(
companyBo
).
ifPresent
(
item
->
useInfoNew
.
setEstateUnitName
(
companyBo
.
getCompanyName
())
);
String
propertyUnitName
=
commonService
.
queryTcmUnitNameByCreditCode
(
useInfoNew
.
getEstateUnitCreditCode
(),
TcmUnitTypeEnum
.
CQ
.
ge
tCode
());
useInfoNew
.
setEstateUnitName
(
propertyUnitName
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
View file @
48fd74f2
...
...
@@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.annotation.EnableEsRollback
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
...
...
@@ -30,8 +29,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
CertificateStatusEnum
.
YIDENGJI
;
/**
* 单个维护设备-策略实现类
*/
...
...
@@ -73,7 +70,9 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
JgUseRegistrationManage
jgUseRegistrationManage
=
commonEquipDataProcessService
.
getJgUseRegistrationManageService
().
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
registerInfoOld
.
getUseOrgCode
())
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
YIDENGJI
.
getName
())
// .eq(JgUseRegistrationManage::getCertificateStatus, YIDENGJI.getName())
.
orderByDesc
(
JgUseRegistrationManage:
:
getRecDate
)
.
last
(
"limit 1"
)
.
select
(
JgUseRegistrationManage:
:
getSequenceNbr
,
JgUseRegistrationManage:
:
getReceiveCompanyCode
).
one
();
useInfoOld
.
setReceiveCompanyCode
(
jgUseRegistrationManage
.
getReceiveCompanyCode
());
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/feign/TcmServiceFeignClient.java
View file @
48fd74f2
...
...
@@ -29,4 +29,12 @@ public interface TcmServiceFeignClient {
@RequestParam
(
required
=
false
,
defaultValue
=
"all"
)
String
type
,
@RequestBody
Map
<
String
,
Object
>
map
);
/**
* 企业信息列表分页查询
*/
@RequestMapping
(
value
=
"/baseEnterprise/getPageList"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
(
@RequestParam
(
"current"
)
int
current
,
@RequestParam
(
"size"
)
int
size
,
@RequestParam
(
"keyword"
)
String
keyword
,
@RequestParam
Map
<
String
,
Object
>
map
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/BaseEquipUsedCheckService.java
View file @
48fd74f2
...
...
@@ -55,38 +55,92 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
}
private
void
setUsingData2Redis
(
String
record
,
String
companyCode
,
Set
<
String
>
equipListOfUsed
)
{
if
(
equipListOfUsed
==
null
||
equipListOfUsed
.
isEmpty
())
{
equipListOfUsed
=
new
TreeSet
<>();
String
redisKey
=
this
.
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
());
log
.
info
(
"【setUsingData2Redis】start, record={}, companyCode={}, redisKey={}, thread={}"
,
record
,
companyCode
,
redisKey
,
Thread
.
currentThread
().
getName
());
log
.
info
(
"【setUsingData2Redis】before handle, incoming equipListOfUsed={}"
,
equipListOfUsed
);
try
{
if
(
equipListOfUsed
==
null
||
equipListOfUsed
.
isEmpty
())
{
log
.
info
(
"【setUsingData2Redis】equipListOfUsed is null or empty, init new TreeSet"
);
equipListOfUsed
=
new
TreeSet
<>();
}
boolean
added
=
equipListOfUsed
.
add
(
record
);
log
.
info
(
"【setUsingData2Redis】after add, added={}, currentSet={}"
,
added
,
equipListOfUsed
);
getRedisClient
()
.
getBucket
(
redisKey
)
.
set
(
equipListOfUsed
);
log
.
info
(
"【setUsingData2Redis】redis set success, redisKey={}, value={}"
,
redisKey
,
equipListOfUsed
);
FlowingEquipRedisContext
.
setRedisKeyInfo
(
new
FlowingEquipRedisKeyDTO
(
redisKey
,
Collections
.
singletonList
(
record
))
);
log
.
info
(
"【setUsingData2Redis】FlowingEquipRedisContext set success, redisKey={}, record={}"
,
redisKey
,
record
);
}
catch
(
Exception
e
)
{
log
.
error
(
"【setUsingData2Redis】Exception, record={}, redisKey={}"
,
record
,
redisKey
,
e
);
throw
e
;
}
equipListOfUsed
.
add
(
record
);
getRedisClient
().
getBucket
(
this
.
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
())).
set
(
equipListOfUsed
);
FlowingEquipRedisContext
.
setRedisKeyInfo
(
new
FlowingEquipRedisKeyDTO
(
this
.
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
()),
Collections
.
singletonList
(
record
)));
log
.
info
(
"【setUsingData2Redis】end, record={}, redisKey={}"
,
record
,
redisKey
);
}
@Override
public
void
registrationRepeatUsedCheck
(
String
record
,
String
companyCode
)
{
RLock
lock
=
getRedisClient
().
getLock
(
this
.
getRepeatUsedCheckLockKey
(
companyCode
,
getApplyBizType
(),
record
));
String
lockKey
=
this
.
getRepeatUsedCheckLockKey
(
companyCode
,
getApplyBizType
(),
record
);
String
redisKey
=
this
.
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
());
log
.
info
(
"【registrationRepeatUsedCheck】start, record={}, companyCode={}, lockKey={}, redisKey={}"
,
record
,
companyCode
,
lockKey
,
redisKey
);
RLock
lock
=
getRedisClient
().
getLock
(
lockKey
);
try
{
boolean
isLocked
=
lock
.
tryLock
(
0
,
180
,
TimeUnit
.
SECONDS
);
log
.
info
(
"【registrationRepeatUsedCheck】tryLock result={}, record={}, thread={}"
,
isLocked
,
record
,
Thread
.
currentThread
().
getName
());
if
(!
isLocked
)
{
log
.
error
(
"使用登记证:{}在被其他业务使用,加锁失败
"
,
record
);
log
.
error
(
"使用登记证:{}在被其他业务使用,加锁失败
,lockKey={}"
,
record
,
lockKey
);
throw
new
BadRequest
(
"使用登记证已被其他流程使用,请刷新后重试!"
);
}
RBucket
<
Set
<
String
>>
RBucket
=
getRedisClient
().
getBucket
(
this
.
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
()));
Set
<
String
>
equipListOfUsed
=
RBucket
.
get
();
RBucket
<
Set
<
String
>>
rBucket
=
getRedisClient
().
getBucket
(
redisKey
);
Set
<
String
>
equipListOfUsed
=
rBucket
.
get
();
log
.
info
(
"【registrationRepeatUsedCheck】redis before check, redisKey={}, currentValue={}"
,
redisKey
,
equipListOfUsed
);
// 查询当前设备在用的申请单号列表
if
(
equipListOfUsed
!=
null
&&
equipListOfUsed
.
contains
(
record
))
{
log
.
error
(
"使用登记证已被其他流程使用,不允许重复提交,使用登记证ID:{}"
,
record
);
log
.
error
(
"使用登记证已被其他流程使用,不允许重复提交,使用登记证ID={}, redisKey={}, redisValue={}"
,
record
,
redisKey
,
equipListOfUsed
);
throw
new
BadRequest
(
"使用登记证已被其他流程使用,不允许重复提交,请联系管理员!"
);
}
log
.
info
(
"【registrationRepeatUsedCheck】准备写入redis, record={}, redisKey={}"
,
record
,
redisKey
);
setUsingData2Redis
(
record
,
companyCode
,
equipListOfUsed
);
Set
<
String
>
afterSet
=
rBucket
.
get
();
log
.
info
(
"【registrationRepeatUsedCheck】redis after write, redisKey={}, value={}"
,
redisKey
,
afterSet
);
}
catch
(
InterruptedException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
"【registrationRepeatUsedCheck】InterruptedException, record={}"
,
record
,
e
);
Thread
.
currentThread
().
interrupt
();
}
catch
(
Exception
e
)
{
log
.
error
(
"【registrationRepeatUsedCheck】Exception, record={}"
,
record
,
e
);
throw
e
;
}
finally
{
if
(
lock
.
isHeldByCurrentThread
())
{
lock
.
unlock
();
log
.
info
(
"【registrationRepeatUsedCheck】unlock success, record={}, lockKey={}"
,
record
,
lockKey
);
}
else
{
log
.
warn
(
"【registrationRepeatUsedCheck】current thread not holding lock, record={}, lockKey={}"
,
record
,
lockKey
);
}
}
log
.
info
(
"【registrationRepeatUsedCheck】end, record={}"
,
record
);
}
private
String
getRepeatUsedCheckLockKey
(
String
companyCode
,
String
bizType
,
String
record
)
{
...
...
@@ -122,11 +176,54 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
*/
@Override
public
void
delDataForCheckEquipRepeatUsed
(
List
<
String
>
records
,
String
companyCode
)
{
RBucket
<
Set
<
String
>>
rBucket
=
getRedisClient
().
getBucket
(
this
.
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
()));
Set
<
String
>
equipListOfUsed
=
rBucket
.
get
();
if
(
equipListOfUsed
!=
null
){
equipListOfUsed
=
equipListOfUsed
.
stream
().
filter
(
record
->
!
records
.
contains
(
record
)).
collect
(
Collectors
.
toSet
());
rBucket
.
set
(
equipListOfUsed
);
if
(
records
==
null
||
records
.
isEmpty
())
{
log
.
info
(
"delData: records is null or empty"
);
return
;
}
String
lockKey
=
"lock:"
+
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
());
RLock
lock
=
getRedisClient
().
getLock
(
lockKey
);
boolean
locked
=
false
;
try
{
locked
=
lock
.
tryLock
(
5
,
10
,
TimeUnit
.
SECONDS
);
if
(!
locked
)
{
log
.
warn
(
"delData: cannot acquire lock, key={}"
,
lockKey
);
return
;
}
RBucket
<
Set
<
String
>>
rBucket
=
getRedisClient
()
.
getBucket
(
getFlowingEquipRedisKey
(
companyCode
,
getApplyBizType
()));
Set
<
String
>
equipListOfUsed
=
rBucket
.
get
();
log
.
info
(
"delData: redis original set={}"
,
equipListOfUsed
);
if
(
equipListOfUsed
==
null
)
{
return
;
}
Set
<
String
>
after
=
equipListOfUsed
.
stream
()
.
filter
(
record
->
!
records
.
contains
(
record
))
.
collect
(
Collectors
.
toSet
());
log
.
info
(
"delData: after filter set={}"
,
after
);
rBucket
.
set
(
after
);
Set
<
String
>
verify
=
rBucket
.
get
();
log
.
info
(
"delData: after set verify redis set={}"
,
verify
);
}
catch
(
Exception
e
)
{
log
.
error
(
"delData error"
,
e
);
}
finally
{
if
(
locked
)
{
try
{
lock
.
unlock
();
}
catch
(
Exception
e
)
{
log
.
error
(
"unlock error"
,
e
);
}
}
}
}
...
...
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 @
48fd74f2
...
...
@@ -3337,7 +3337,7 @@ public class CommonServiceImpl implements ICommonService {
* @return 单位信用代码_单位名称
*/
public
String
queryTcmUnitCreditCodeBySeq
(
String
unitSeq
,
String
unitType
)
{
Map
<
String
,
String
>
map
=
commonMapper
.
queryTcmUnitInfoBySeq
(
unitSeq
,
unitType
);
Map
<
String
,
String
>
map
=
this
.
queryTcmUnitInfoBySeq
(
unitSeq
,
unitType
);
return
MapUtil
.
getStr
(
map
,
"unitCode"
);
}
...
...
@@ -3515,4 +3515,12 @@ public class CommonServiceImpl implements ICommonService {
.
build
())
.
collect
(
Collectors
.
toList
()));
}
public
String
queryTcmUnitNameByCreditCode
(
String
unitCreditCode
,
String
unitType
)
{
if
(!
ValidationUtil
.
isEmpty
(
unitCreditCode
))
{
String
unitName
=
commonMapper
.
queryTcmUnitNameByCreditCode
(
unitCreditCode
,
unitType
);
return
ValidationUtil
.
isEmpty
(
unitName
)
?
unitCreditCode
:
unitName
;
}
return
null
;
}
}
\ No newline at end of file
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/JgTableDataExportServiceImpl.java
View file @
48fd74f2
...
...
@@ -19,7 +19,6 @@ import com.yeejoin.amos.boot.module.jg.api.enums.RegTypeEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.*
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.CbDataDictTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.JczsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TcmServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IJgTableDataExportService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.DictUtil
;
...
...
@@ -31,6 +30,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
...
...
@@ -39,7 +39,6 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
...
...
@@ -104,8 +103,6 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
@Autowired
IdxBizJgProjectContraptionServiceImplService
idxBizJgProjectContraptionService
;
@Autowired
JczsServiceFeignClient
jczsServiceFeignClient
;
@Autowired
TcmServiceFeignClient
tcmServiceFeignClient
;
@Autowired
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
...
...
@@ -777,45 +774,45 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
}
private
List
<
String
>
getEnterSeqs
(
String
ids
,
Map
<
String
,
Object
>
map
)
{
private
List
<
Map
<
String
,
String
>>
getEnterList
(
String
ids
,
Map
<
String
,
Object
>
map
)
{
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
List
<
String
>
ids
List
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
result
List
=
new
ArrayList
<>();
if
(
StringUtils
.
isEmpty
(
ids
))
{
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
=
jczsServiceFeignClient
.
page
(
1
,
PAGE_SIZE
,
null
,
map
);
// 查询第一页
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
=
tcmServiceFeignClient
.
page
(
1
,
PAGE_SIZE
,
null
,
map
);
Page
<
Map
<
String
,
String
>>
pageResult
=
page
.
getResult
();
int
totalPage
=
(
int
)
Math
.
ceil
((
double
)
pageResult
.
getTotal
()
/
PAGE_SIZE
);
List
<
CompletableFuture
<
List
<
String
>>>
futures
=
new
ArrayList
<>();
List
<
String
>
idsCollected
=
pageResult
.
getRecords
().
stream
()
.
map
(
item
->
item
.
getOrDefault
(
"sequenceNbr"
,
""
))
.
map
(
String:
:
valueOf
)
.
collect
(
Collectors
.
toList
());
resultList
.
addAll
(
pageResult
.
getRecords
());
List
<
CompletableFuture
<
List
<
Map
<
String
,
String
>>>>
futures
=
new
ArrayList
<>();
for
(
int
i
=
2
;
i
<=
totalPage
;
i
++)
{
int
pageIndex
=
i
;
CompletableFuture
<
List
<
String
>>
future
=
CompletableFuture
.
supplyAsync
(()
->
{
contextWrapper
.
apply
();
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page1
=
jczsServiceFeignClient
.
page
(
pageIndex
,
PAGE_SIZE
,
null
,
map
);
Page
<
Map
<
String
,
String
>>
resultPage
=
page1
.
getResult
();
return
resultPage
.
getRecords
().
stream
()
.
map
(
item
->
item
.
getOrDefault
(
"sequenceNbr"
,
""
))
.
map
(
String:
:
valueOf
)
.
collect
(
Collectors
.
toList
());
},
executorService
);
CompletableFuture
<
List
<
Map
<
String
,
String
>>>
future
=
CompletableFuture
.
supplyAsync
(()
->
{
contextWrapper
.
apply
();
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
pageData
=
tcmServiceFeignClient
.
page
(
pageIndex
,
PAGE_SIZE
,
null
,
map
);
return
pageData
.
getResult
().
getRecords
();
},
executorService
);
futures
.
add
(
future
);
}
for
(
CompletableFuture
<
List
<
String
>>
future
:
futures
)
{
// 等待所有线程完成
for
(
CompletableFuture
<
List
<
Map
<
String
,
String
>>>
future
:
futures
)
{
try
{
idsCollected
.
addAll
(
future
.
get
());
resultList
.
addAll
(
future
.
get
());
}
catch
(
InterruptedException
|
ExecutionException
e
)
{
log
.
error
(
"分页查询线程执行失败"
,
e
);
}
}
idsList
.
addAll
(
idsCollected
);
}
else
{
idsList
.
addAll
(
Arrays
.
asList
(
ids
.
split
(
","
)));
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
=
tcmServiceFeignClient
.
page
(
1
,
PAGE_SIZE
,
ids
,
map
);
resultList
.
addAll
(
page
.
getResult
().
getRecords
());
}
return
ids
List
;
return
result
List
;
}
public
static
<
T
,
R
>
List
<
R
>
batchQuery
(
List
<
T
>
list
,
int
batchSize
,
Function
<
List
<
T
>,
List
<
R
>>
function
)
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
Collections
.
emptyList
();
...
...
@@ -840,10 +837,29 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
@Override
public
void
enterpriseInformationExport
(
String
uuid
,
String
ids
,
Map
<
String
,
Object
>
map
)
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
List
<
String
>
enterSeqs
=
getEnterSeqs
(
ids
,
map
);
List
<
Map
<
String
,
String
>>
enterInfoWithExport
=
batchQuery
(
enterSeqs
,
500
,
sequenceNbrs
->
tzBaseEnterpriseInfoMapper
.
getEnterInfoWithExport
(
sequenceNbrs
));
List
<
BaseEnterpriseVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
enterInfoWithExport
),
BaseEnterpriseVo
.
class
);
List
<
Map
<
String
,
String
>>
enterSeqs
=
getEnterList
(
ids
,
map
);
List
<
Map
<
String
,
String
>>
source
=
enterSeqs
;
boolean
hasUseUnit
=
Optional
.
ofNullable
(
map
.
get
(
"unitTypeList"
))
.
map
(
Object:
:
toString
)
.
filter
(
ObjectUtils:
:
isNotEmpty
)
.
map
(
s
->
Arrays
.
stream
(
s
.
split
(
","
))
.
map
(
String:
:
trim
)
.
anyMatch
(
t
->
t
.
contains
(
"使用单位"
)
||
t
.
contains
(
"个人主体"
)))
.
orElse
(
false
);
if
(!
hasUseUnit
)
{
source
=
batchQuery
(
enterSeqs
,
500
,
batch
->
{
List
<
String
>
sequenceNbrs
=
batch
.
stream
()
.
map
(
m
->
m
.
get
(
"sequenceNbr"
))
.
filter
(
ObjectUtils:
:
isNotEmpty
)
.
collect
(
Collectors
.
toList
());
return
tzBaseEnterpriseInfoMapper
.
getEnterInfoWithExport
(
sequenceNbrs
);
}
);
}
List
<
BaseEnterpriseVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
source
),
BaseEnterpriseVo
.
class
);
exportData
.
forEach
(
item
->
{
String
categoryJson
=
item
.
getEquipCategory
();
if
(
categoryJson
!=
null
&&
!
categoryJson
.
isEmpty
())
{
...
...
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 @
48fd74f2
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/equipment-registration-certificate-report.ftl
View file @
48fd74f2
...
...
@@ -1006,7 +1006,7 @@
<w:sz
w:val=
"24"
/>
</w:rPr>
<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: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:shape
id=
"文本框 17"
o:spid=
"_x0000_s1032"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:394pt;margin-top:
485
.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:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
...
@@ -1106,7 +1106,7 @@
<w:sz
w:val=
"24"
/>
</w:rPr>
<w:pict>
<v:shape
id=
"文本框 16"
o:spid=
"_x0000_s1033"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:393.25pt;margin-top:45
5
.45pt;height:53.25pt;width:134.3pt;z-index:251671552;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:shape
id=
"文本框 16"
o:spid=
"_x0000_s1033"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:393.25pt;margin-top:45
2
.45pt;height:53.25pt;width:134.3pt;z-index:251671552;mso-width-relative:page;mso-height-relative:page;"
fillcolor=
"#FFFFFF"
filled=
"t"
stroked=
"f"
coordsize=
"21600,21600"
>
<v:path/>
<v:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
...
@@ -1772,7 +1772,7 @@
<w:sz
w:val=
"24"
/>
</w:rPr>
<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.7
pt;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:shape
id=
"文本框 18"
o:spid=
"_x0000_s1036"
o:spt=
"202"
type=
"#_x0000_t202"
style=
"position:absolute;left:0pt;margin-left:135.25pt;margin-top:
485.95
pt;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:fill
on=
"t"
color2=
"#FFFFFF"
focussize=
"0,0"
/>
<v:stroke
on=
"f"
weight=
"0.5pt"
/>
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgUseInfo.java
View file @
48fd74f2
...
...
@@ -64,7 +64,7 @@ public class IdxBizJgUseInfo extends TzsBaseEntity implements IBaseChangeData {
*
*/
@TableField
(
"\"ESTATE_UNIT_CREDIT_CODE\""
)
@FieldDisplayDefine
(
value
=
"产权单位统一信用代码"
,
typeHandler
=
"estateUnitTypeHandler"
)
@FieldDisplayDefine
(
value
=
"产权单位统一信用代码"
,
isRepeatColumn
=
true
)
private
String
estateUnitCreditCode
;
/**
...
...
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