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
19b297aa
Commit
19b297aa
authored
Nov 07, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):96333重复问题修复,安装告知作废功能修改,处理错误数据接口开发
parent
67bb138e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
8 deletions
+109
-8
Test.java
.../src/main/java/com/yeejoin/amos/boot/biz/common/Test.java
+54
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+6
-6
IEquipmentCategoryService.java
...oot/module/ymt/api/service/IEquipmentCategoryService.java
+2
-0
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+13
-0
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+34
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/Test.java
View file @
19b297aa
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"ddddrrdddd"
);
// 找出重复数据
//findDuplicateIds(idList, idsToRemove);
//剔除重复数据
notInIdList
(
idList
,
idsToRemove
);
}
// 要剔除的ID集合
static
List
<
String
>
idsToRemove
=
Arrays
.
asList
(
"fdd757d9-c28a-4b7b-8567-882ffe0874be"
,
"86a7c5cb-cef6-442c-acde-408052ea92d2"
);
// 初始的 ID 列表
static
List
<
String
>
idList
=
new
ArrayList
<>(
Arrays
.
asList
(
"a73a47e0-e5bd-4d82-b4fa-db56ff5e1aec"
,
"71cd3623-a5ab-4e29-9c6d-6962af6ec7ae"
,
"56eda391-6b63-4512-9ca3-a2e91cd0bd1c"
,
"4b73d406-ef36-4249-8bb9-7a0f9fc0bc83"
));
private
static
void
removeDuplicateIds
(
List
<
String
>
idList
,
List
<
String
>
idsToRemove
)
{
// 剔除多个 ID
System
.
out
.
println
(
"初始集合总数: "
+
idList
.
size
());
System
.
out
.
println
(
"对比集合总数: "
+
idsToRemove
.
size
());
idList
.
removeAll
(
idsToRemove
);
System
.
out
.
println
(
"剔除重复的ID总数: "
+
idList
.
size
());
System
.
out
.
println
(
"剩余 ID:"
);
idList
.
forEach
(
id
->
System
.
out
.
println
(
"'"
+
id
+
"',"
));
}
private
static
void
findDuplicateIds
(
List
<
String
>
idList
,
List
<
String
>
idsToRemove
)
{
// 找出重复的 ID
System
.
out
.
println
(
"初始集合总数: "
+
idList
.
size
());
System
.
out
.
println
(
"对比集合总数: "
+
idsToRemove
.
size
());
List
<
String
>
duplicateIds
=
new
ArrayList
<>(
idList
);
duplicateIds
.
retainAll
(
idsToRemove
);
System
.
out
.
println
(
"重复ID 总数: "
+
duplicateIds
.
size
());
System
.
out
.
println
(
"重复的 ID:"
);
duplicateIds
.
forEach
(
id
->
System
.
out
.
println
(
"\""
+
id
+
"\","
));
}
private
static
void
notInIdList
(
List
<
String
>
idList
,
List
<
String
>
idsToRemove
)
{
// 复制 idsToRemove 并移除所有在 idList 中存在的元素
List
<
String
>
notInIdList
=
new
ArrayList
<>(
idList
);
notInIdList
.
removeAll
(
idsToRemove
);
// 输出结果
System
.
out
.
println
(
"idsToRemove 中不在 idList 中的 ID 总数: "
+
notInIdList
.
size
());
System
.
out
.
println
(
"不在 idList 中的 ID:"
);
notInIdList
.
forEach
(
id
->
System
.
out
.
println
(
"\""
+
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/JgInstallationNoticeServiceImpl.java
View file @
19b297aa
...
...
@@ -1604,17 +1604,17 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jgInstallationNoticeEqs
.
forEach
(
jgRelationEquip
->
{
// 1.use_info 回退
this
.
rollBackUseInfo
(
jgRelationEquip
);
// 2.other_info 回退
// 2.释放96333码为 未使用状态
this
.
release96333Code
(
jgRelationEquip
);
// 3.other_info 回退
this
.
rollBackOtherInfo
(
jgRelationEquip
);
//
3
.supervise_info回退
//
4
.supervise_info回退
this
.
rollBackSuperviseInfo
(
jgRelationEquip
);
//
4
.设备代码 回退
//
5
.设备代码 回退
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
=
getIdxBizJgRegisterInfo2
(
jgRelationEquip
);
this
.
rollBackRegisterInfo
(
jgRelationEquip
,
idxBizJgRegisterInfo
);
//
5
.es 回退
//
6
.es 回退
this
.
rollBackEsInfo
(
jgRelationEquip
,
idxBizJgRegisterInfo
);
//6.释放96333码为 未使用状态
this
.
release96333Code
(
jgRelationEquip
);
});
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/service/IEquipmentCategoryService.java
View file @
19b297aa
...
...
@@ -47,4 +47,6 @@ public interface IEquipmentCategoryService {
Map
<
String
,
Object
>
commonUpdateEsDataByIds
(
Map
<
String
,
Map
<
String
,
Object
>>
paramMap
);
String
selectExceedElevatorCode
(
String
prefix
);
String
handleErrorElevatorCode
(
String
supervisorCode
,
String
elevatorCode
);
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/EquipmentCategoryController.java
View file @
19b297aa
...
...
@@ -644,4 +644,17 @@ public class EquipmentCategoryController extends BaseController {
public
ResponseModel
<
String
>
selectExceedElevatorCode
(
@RequestParam
(
"prefix"
)
String
prefix
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
selectExceedElevatorCode
(
prefix
));
}
/**
* 根据前缀查询96333空余序列码
*
* @return s
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/handleErrorElevatorCode"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"处理错误96333码"
,
notes
=
"处理错误96333码"
)
public
ResponseModel
<
String
>
handleErrorElevatorCode
(
@RequestParam
(
"supervisorCode"
)
String
supervisorCode
,
@RequestParam
(
"elevatorCode"
)
String
elevatorCode
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
handleErrorElevatorCode
(
supervisorCode
,
elevatorCode
));
}
}
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 @
19b297aa
...
...
@@ -682,7 +682,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
// 判断是否需要生成96333电梯码
if
(
equipCategory
.
startsWith
(
"3"
)
&&
(((
XIAN
.
equals
(
city
)
||
XIAN_YANG
.
equals
(
city
))
&&
"1"
.
equals
(
isNotXiXian
))
||
!
XIAN
.
equals
(
city
)))
{
// 判断数据是否携带96333电梯码,携带则使用,不携带则生成
if
(
"null"
.
equals
(
code96333
))
{
if
(
"null"
.
equals
(
code96333
)
||
code96333
.
isEmpty
()
)
{
if
(((
XIAN
.
equals
(
city
)
||
XIAN_YANG
.
equals
(
city
))
&&
"1"
.
equals
(
isNotXiXian
)))
{
prefix
=
EquipmentCategoryEnum
.
XXCSM
.
getValue
();
}
else
{
...
...
@@ -785,6 +785,39 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
elevatorCode
.
toString
();
}
@Override
public
String
handleErrorElevatorCode
(
String
supervisorCode
,
String
elevatorCode
)
{
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
// 查询目标记录
IdxBizJgOtherInfo
otherInfo
=
idxBizJgOtherInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>()
.
eq
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
,
supervisorCode
)
);
if
(
otherInfo
!=
null
)
{
// 更新其他信息表
otherInfo
.
setCode96333
(
elevatorCode
);
idxBizJgOtherInfoService
.
update
(
otherInfo
,
new
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>().
eq
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
,
supervisorCode
)
);
// 更新码表信息
SupervisoryCodeInfo
supervisoryCodeInfo
=
new
SupervisoryCodeInfo
().
setCode96333
(
elevatorCode
);
supervisoryCodeInfoMapper
.
update
(
supervisoryCodeInfo
,
new
QueryWrapper
<
SupervisoryCodeInfo
>()
.
eq
(
"supervisory_code"
,
supervisorCode
)
);
// 更新 ES 数据
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"CODE96333"
,
elevatorCode
);
objMap
.
put
(
otherInfo
.
getRecord
(),
param
);
this
.
commonUpdateEsDataByIds
(
objMap
);
}
return
"96333码修复成功!"
;
}
/**
* 生成监管码
*
...
...
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