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
fe29bcf0
Commit
fe29bcf0
authored
Jan 26, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):改造告知,设备移交详情接口修改,一码通添加锁
parent
4d755a19
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
20 deletions
+46
-20
JgEquipTransferMapper.xml
...g-api/src/main/resources/mapper/JgEquipTransferMapper.xml
+2
-1
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+2
-1
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+12
-2
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+22
-8
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+8
-8
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgEquipTransferMapper.xml
View file @
fe29bcf0
...
@@ -163,7 +163,8 @@
...
@@ -163,7 +163,8 @@
tec2.name AS equCategory,
tec2.name AS equCategory,
tec1.name AS equList,
tec1.name AS equList,
tec.name AS equDefine,
tec.name AS equDefine,
oi.SUPERVISORY_CODE AS supervisoryCode
oi.SUPERVISORY_CODE AS supervisoryCode,
ete.equ_id AS equId
FROM
FROM
tzs_jg_equip_transfer jet
tzs_jg_equip_transfer jet
LEFT JOIN tzs_jg_equip_transfer_eq ete ON ete.equip_transfer_id = jet.sequence_nbr
LEFT JOIN tzs_jg_equip_transfer_eq ete ON ete.equip_transfer_id = jet.sequence_nbr
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
fe29bcf0
...
@@ -131,7 +131,8 @@
...
@@ -131,7 +131,8 @@
tec2.name AS equCategory,
tec2.name AS equCategory,
tec1.name AS equList,
tec1.name AS equList,
tec.name AS equDefine,
tec.name AS equDefine,
oi.SUPERVISORY_CODE AS supervisoryCode
oi.SUPERVISORY_CODE AS supervisoryCode,
re.equ_id AS equId
FROM tzs_jg_reform_notice isn
FROM tzs_jg_reform_notice isn
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
...
...
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/JgEquipTransferServiceImpl.java
View file @
fe29bcf0
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgEquipTransferMapper;
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgEquipTransferMapper;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgEquipTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgEquipTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.common.BaseException
;
import
com.yeejoin.amos.boot.module.ymt.api.common.BaseException
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
@@ -60,6 +61,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -60,6 +61,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
private
final
CommonServiceImpl
commonService
;
private
final
CommonServiceImpl
commonService
;
private
final
CmWorkflowServiceImpl
cmWorkflowService
;
private
final
CmWorkflowServiceImpl
cmWorkflowService
;
private
final
IJgInstallationNoticeService
jrmInstallationNoticeService
;
private
final
IJgInstallationNoticeService
jrmInstallationNoticeService
;
private
final
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
/**
/**
* 保存和保存并提交
* 保存和保存并提交
...
@@ -480,13 +482,21 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -480,13 +482,21 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
"proxyStatementAttachment"
,
"installContractAttachment"
};
"proxyStatementAttachment"
,
"installContractAttachment"
};
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
this
.
baseMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
this
.
baseMapper
.
queryEquipInformation
(
sequenceNbr
);
Map
<
String
,
Object
>
equipMap
=
null
;
if
(
equipmentInfos
!=
null
&&
!
equipmentInfos
.
isEmpty
())
{
String
equId
=
(
String
)
equipmentInfos
.
get
(
0
).
get
(
"equId"
);
if
(
equId
!=
null
)
{
equipMap
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
equId
);
}
}
Map
<
String
,
Object
>
equipTransferInfo
=
createEquipTransferInfo
(
equipTransfer
);
Map
<
String
,
Object
>
equipTransferInfo
=
createEquipTransferInfo
(
equipTransfer
);
handleJsonArrayFields
(
equipTransferInfo
,
fields
);
handleJsonArrayFields
(
equipTransferInfo
,
fields
);
handleJsonArrayFields
(
equip
mentInfos
.
get
(
0
)
,
fields
);
handleJsonArrayFields
(
equip
Map
,
fields
);
return
Stream
.
concat
(
equipTransferInfo
.
entrySet
().
stream
(),
return
Stream
.
concat
(
equipTransferInfo
.
entrySet
().
stream
(),
equip
mentInfos
.
get
(
0
)
.
entrySet
().
stream
())
equip
Map
.
entrySet
().
stream
())
.
filter
(
entry
->
entry
.
getValue
()
!=
null
)
.
filter
(
entry
->
entry
.
getValue
()
!=
null
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,
(
existing
,
replacement
)
->
existing
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,
(
existing
,
replacement
)
->
existing
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
View file @
fe29bcf0
...
@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeEqMapper;
...
@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeEqMapper;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgReformNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgReformNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgReformNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
...
@@ -93,6 +94,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -93,6 +94,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
CommonServiceImpl
commonService
;
private
CommonServiceImpl
commonService
;
@Autowired
@Autowired
private
CmWorkflowServiceImpl
cmWorkflowService
;
private
CmWorkflowServiceImpl
cmWorkflowService
;
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
...
@@ -126,18 +129,29 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -126,18 +129,29 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
"proxyStatementAttachment"
,
"installContractAttachment"
};
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
Map
<
String
,
Object
>
equipMap
=
null
;
if
(
installationInfo
.
containsKey
(
s
))
{
if
(
equipmentInfos
!=
null
&&
!
equipmentInfos
.
isEmpty
())
{
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
String
equId
=
(
String
)
equipmentInfos
.
get
(
0
).
get
(
"equId"
);
}
if
(
equipmentInfos
.
get
(
0
).
containsKey
(
s
))
{
if
(
equId
!=
null
)
{
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
equipMap
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
equId
);
equipMap
.
put
(
"useUnitCreditCodeUse"
,
equipMap
.
getOrDefault
(
"useUnitCreditCode"
,
""
));
equipMap
.
put
(
"useUnitNameUse"
,
equipMap
.
getOrDefault
(
"useUnitName"
,
""
));
for
(
String
s
:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
}
if
(
equipMap
.
containsKey
(
s
))
{
equipMap
.
put
(
s
,
JSON
.
parseArray
(
equipMap
.
get
(
s
).
toString
()));
}
}
}
}
}
}
installationInfo
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
installationInfo
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
return
Stream
.
concat
(
return
Stream
.
concat
(
installationInfo
.
entrySet
().
stream
(),
installationInfo
.
entrySet
().
stream
(),
equip
mentInfos
.
get
(
0
)
.
entrySet
().
stream
()
equip
Map
.
entrySet
().
stream
()
)
)
.
filter
(
entry
->
entry
.
getValue
()
!=
null
)
.
filter
(
entry
->
entry
.
getValue
()
!=
null
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,
(
existing
,
replacement
)
->
existing
));
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,
(
existing
,
replacement
)
->
existing
));
...
@@ -258,7 +272,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -258,7 +272,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
noticeDto
.
setNoticeStatusDesc
(
noticeStatusDesc
);
noticeDto
.
setNoticeStatusDesc
(
noticeStatusDesc
);
}
}
return
noticeDto
;
return
noticeDto
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
noticeDtoPage
.
setRecords
(
records
);
noticeDtoPage
.
setRecords
(
records
);
return
noticeDtoPage
;
return
noticeDtoPage
;
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
fe29bcf0
...
@@ -734,12 +734,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -734,12 +734,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
* 具体生成监管码和电梯96333识别码逻辑
* 具体生成监管码和电梯96333识别码逻辑
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
public
Map
<
String
,
String
>
creatCode
(
String
isNotXiXian
,
String
city
,
String
county
,
String
equipCategory
,
String
code96333
,
String
supervisionCode
)
{
public
synchronized
Map
<
String
,
String
>
creatCode
(
String
isNotXiXian
,
String
city
,
String
county
,
String
equipCategory
,
String
code96333
,
String
supervisionCode
)
{
//
RLock lock = redissonClient.getLock(LOCK_KEY);
RLock
lock
=
redissonClient
.
getLock
(
LOCK_KEY
);
Map
<
String
,
String
>
resultMap
=
null
;
Map
<
String
,
String
>
resultMap
=
null
;
try
{
try
{
//
lock.lock(); // 获取锁
lock
.
lock
();
// 获取锁
//
log.info("加锁成功");
log
.
info
(
"加锁成功"
);
resultMap
=
new
HashMap
<>();
resultMap
=
new
HashMap
<>();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
StringBuilder
elevatorCode
=
new
StringBuilder
();
...
@@ -803,10 +803,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -803,10 +803,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
//
finally {
finally
{
//
lock.unlock(); // 释放锁
lock
.
unlock
();
// 释放锁
//
log.info("释放锁");
log
.
info
(
"释放锁"
);
//
}
}
return
resultMap
;
return
resultMap
;
}
}
...
...
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