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
5eddb4ea
Commit
5eddb4ea
authored
Aug 18, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一码通新增功能修改
parent
330b48b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+14
-15
No files found.
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 @
5eddb4ea
...
...
@@ -536,7 +536,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"supervisory_code"
,
selectOne
.
getSupervisoryCode
()));
}
//使用UUID生成一个record,多表关联关系用
resultMap
.
put
(
"record"
,
UUID
.
randomUUID
().
toString
());
resultMap
.
put
(
"superviseCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"code96333"
,
ObjectUtils
.
isEmpty
(
elevatorCode
)
?
null
:
elevatorCode
.
toString
());
resultMap
.
put
(
"qrCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
...
...
@@ -1311,8 +1310,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
LinkedHashMap
supervisionMap
=
(
LinkedHashMap
)
map
.
get
(
supervision_form_id
);
boolean
saveFlag
=
false
;
String
record
=
null
;
LinkedHashMap
superviseMap
=
(
LinkedHashMap
)
map
.
get
(
"data"
);
String
equCategory
=
String
.
valueOf
(
superviseMap
.
get
(
"equCategory"
));
try
{
LinkedHashMap
superviseMap
=
(
LinkedHashMap
)
map
.
get
(
"data"
);
String
claimStatus
=
String
.
valueOf
(
superviseMap
.
get
(
"claimStatus"
));
String
code96333
=
String
.
valueOf
(
superviseMap
.
get
(
"code96333"
));
String
operateType
=
String
.
valueOf
(
superviseMap
.
get
(
"operateType"
));
...
...
@@ -1322,7 +1322,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
log
.
info
(
"准备生成监管码或96333电梯识别码"
);
String
city
=
String
.
valueOf
(
superviseMap
.
get
(
"city"
));
String
county
=
String
.
valueOf
(
superviseMap
.
get
(
"county"
));
String
equCategory
=
String
.
valueOf
(
superviseMap
.
get
(
"equCategory"
))
;
;
String
supervisionCode
=
String
.
valueOf
(
superviseMap
.
get
(
"supervisionCode"
));
EquipmentCategoryServiceImpl
categoryService
=
(
EquipmentCategoryServiceImpl
)
AopContext
.
currentProxy
();
//生成码
...
...
@@ -1340,7 +1340,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(
lock
.
tryLock
(
3
,
5
,
TimeUnit
.
SECONDS
))
{
codeMap
=
categoryService
.
creatCode
(
city
,
county
,
equCategory
,
code96333
,
supervisionCode
);
log
.
info
(
"已生成对应监管码或96333电梯识别码"
);
record
=
codeMap
.
get
(
"record"
);
flag
=
true
;
}
if
(
flag
){
...
...
@@ -1359,12 +1358,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
StopWatch
stopWatch1
=
new
StopWatch
();
stopWatch1
.
start
();
// 根据操作状态判断是调用新增还是修改接口
saveFlag
=
"save"
.
equals
(
operateType
)
?
batchSubmit
(
map
,
equCategory
,
record
)
:
false
;
record
=
"save"
.
equals
(
operateType
)
?
batchSubmit
(
map
,
equCategory
)
:
null
;
stopWatch1
.
stop
();
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"业务存数据耗时:{} 秒"
,
stopWatch1
.
getTotalTimeSeconds
());
}
if
(
saveFlag
)
{
if
(
!
ObjectUtils
.
isEmpty
(
record
)
)
{
supervisoryCodeInfo
.
setStatus
(
EquipmentCategoryEnum
.
YSY
.
getCode
());
}
else
{
equipmentCategoryMapper
.
updateIsNotEs
(
String
.
valueOf
(
supervisionMap
.
get
(
"SUPERVISORY_CODE"
)));
...
...
@@ -1375,15 +1374,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
supervisionMap
.
put
(
"CODE96333"
,
"null"
.
equals
(
code96333
)
?
null
:
code96333
);
map
.
put
(
supervision_form_id
,
supervisionMap
);
//根据操作状态判断是调用新增还是修改接口
responseModel
=
"save"
.
equals
(
operateType
)
?
idxFeignService
.
batchSubmit
(
null
,
map
)
:
idxFeignService
.
batchUpdate
(
null
,
map
);
record
=
"save"
.
equals
(
operateType
)
?
batchSubmit
(
map
,
equCategory
)
:
null
;
}
else
{
map
.
remove
(
"data"
);
re
sponseModel
=
idxFeignService
.
batchUpdate
(
null
,
map
)
;
re
cord
=
null
;
}
StopWatch
stopWatch4
=
new
StopWatch
();
stopWatch4
.
start
();
if
(
saveFlag
)
{
if
(
!
ObjectUtils
.
isEmpty
(
record
)
)
{
checkEsData
(
record
);
}
stopWatch4
.
stop
();
...
...
@@ -1414,11 +1412,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
equipmentCategoryMapper
.
updateIsNotEs
(
String
.
valueOf
(
supervisionMap
.
get
(
"SUPERVISORY_CODE"
)));
if
(!
ObjectUtils
.
isEmpty
(
re
sponseModel
)
&&
"200"
.
equals
(
String
.
valueOf
(
responseModel
.
getStatus
())
))
{
if
(!
ObjectUtils
.
isEmpty
(
re
cord
))
{
List
<
String
>
records
=
new
ArrayList
<>();
records
.
add
(
String
.
valueOf
(
responseModel
.
getResult
())
);
records
.
add
(
record
);
superviseInfoMapper
.
deleteDataAll
(
records
);
esEquipmentCategory
.
deleteById
(
String
.
valueOf
(
responseModel
.
getResult
())
);
esEquipmentCategory
.
deleteById
(
record
);
}
supervisoryCodeInfo
.
setStatus
(
EquipmentCategoryEnum
.
BF
.
getCode
());
ResponseModel
<
Object
>
response
=
new
ResponseModel
<>();
...
...
@@ -1489,8 +1487,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
IdxBizJgProtectionDevicesServiceImpl
idxBizJgProtectionDevicesService
;
private
boolean
batchSubmit
(
Map
<
String
,
Object
>
map
,
String
equCategory
,
String
record
)
{
private
String
batchSubmit
(
Map
<
String
,
Object
>
map
,
String
equCategory
)
{
Date
date
=
new
Date
();
String
record
=
UUID
.
randomUUID
().
toString
();
// 使用信息
LinkedHashMap
useInfoForm
=
(
LinkedHashMap
)
map
.
get
(
use_info_form_id
);
IdxBizJgUseInfo
useInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
useInfoForm
),
IdxBizJgUseInfo
.
class
);
...
...
@@ -1675,7 +1674,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
idxBizJgMainPartsService
.
saveBatch
(
mainPartsList
);
idxBizJgProtectionDevicesService
.
saveBatch
(
protectionDevicesList
);
return
true
;
return
record
;
}
private
List
getAccessoryEntity
(
Map
<
String
,
Object
>
map
,
List
<
String
>
list
,
String
type
,
String
record
,
Date
date
)
{
...
...
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