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
10a49d1a
Commit
10a49d1a
authored
Mar 18, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新96333码
parent
5c4b04c2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
31 deletions
+62
-31
EquInfoDto.java
.../com/yeejoin/amos/boot/module/tzs/api/dto/EquInfoDto.java
+13
-0
CategoryOtherInfo.java
...in/amos/boot/module/tzs/api/entity/CategoryOtherInfo.java
+1
-1
CategoryOtherInfoMapper.java
...s/boot/module/tzs/api/mapper/CategoryOtherInfoMapper.java
+1
-1
CategoryOtherInfoMapper.xml
...api/src/main/resources/mapper/CategoryOtherInfoMapper.xml
+8
-2
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+39
-27
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/EquInfoDto.java
View file @
10a49d1a
...
...
@@ -29,6 +29,19 @@ public class EquInfoDto {
*/
private
String
record
;
/**
* 电梯96333识别码
*/
private
String
code
;
/**
* 监管码
*/
private
String
supervisor
;
/**
* 设备认领状态
*/
private
String
status
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/CategoryOtherInfo.java
View file @
10a49d1a
...
...
@@ -58,7 +58,7 @@ public class CategoryOtherInfo{
@TableField
(
"SUPERVISORY_CODE"
)
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"认领状态:
1代表已认领,0代表待认领,2
代表拒领"
)
@ApiModelProperty
(
value
=
"认领状态:
6035代表已认领,6036代表待认领,6037
代表拒领"
)
@TableField
(
"CLAIM_STATUS"
)
private
String
claimStatus
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/CategoryOtherInfoMapper.java
View file @
10a49d1a
...
...
@@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Param;
*/
public
interface
CategoryOtherInfoMapper
extends
BaseMapper
<
CategoryOtherInfo
>
{
int
updateSupervisorCode
(
String
supervisorCode
,
String
code
,
String
sequenceNbr
);
int
updateSupervisorCode
(
String
supervisorCode
,
String
code
,
String
record
);
CategoryOtherInfo
selectSupervisorCode
(
@Param
(
"supervisorCode"
)
String
supervisorCode
);
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CategoryOtherInfoMapper.xml
View file @
10a49d1a
...
...
@@ -17,12 +17,16 @@
<update
id=
"updateSupervisorCode"
>
UPDATE idx_biz_jg_other_info
SET "SUPERVISORY_CODE" = #{supervisorCode}
SET
"RECORE" = #{record}
<if
test=
"supervisorCode != null and supervisorCode != ''"
>
, "SUPERVISORY_CODE" = #{supervisorCode}
</if>
<if
test=
"code != null and code != ''"
>
, "CODE96333" = #{code}
</if>
WHERE
"
SEQUENCE_NBR" = #{sequenceNbr
}
"
REOCRD" = #{reocrd
}
</update>
<select
id=
"selectElevatorCode"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo"
>
...
...
@@ -43,6 +47,8 @@
"COUNTY",
"EQU_LIST" equipList,
"EQU_CATEGORY" equipCategory,
ibjoi."CODE96333" code,
ibjoi."CLAIM_STATUS" STATUS,
ibjoi."RECORD"
FROM
idx_biz_jg_other_info ibjoi
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
10a49d1a
...
...
@@ -140,19 +140,26 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
equipList
=
map
.
get
(
"EQU_LIST"
).
toString
();
}
else
{
EquInfoDto
equInfoDto
=
categoryOtherInfoMapper
.
selectEquipInfo
(
record
);
city
=
equInfoDto
.
getCity
();
county
=
equInfoDto
.
getCounty
();
equipCategory
=
equInfoDto
.
getEquipCategory
();
equipList
=
equInfoDto
.
getEquipList
();
//判断这条数据是否已经有电梯96333码和监管码
//如果都有则直接返回
if
(
ObjectUtils
.
isEmpty
(
equInfoDto
.
getSupervisor
())
||
ObjectUtils
.
isEmpty
(
equInfoDto
.
getCode
()))
{
city
=
equInfoDto
.
getCity
();
county
=
equInfoDto
.
getCounty
();
equipCategory
=
equInfoDto
.
getEquipCategory
();
equipList
=
equInfoDto
.
getEquipList
();
}
else
{
return
0
;
}
}
//生成码
Map
<
String
,
String
>
codeMap
=
new
HashMap
<>();
synchronized
(
EquipmentCategoryServiceImpl
.
class
)
{
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
equipList
,
record
);
}
//查询最后一条数据并进行修改
CategoryOtherInfo
otherInfo
=
categoryOtherInfoMapper
.
selectOne
(
new
QueryWrapper
<
CategoryOtherInfo
>().
orderByDesc
(
"REC_DATE"
).
last
(
"limit 1"
));
return
categoryOtherInfoMapper
.
updateSupervisorCode
(
codeMap
.
get
(
"supervisorCode"
),
codeMap
.
get
(
"elevatorCode"
),
otherInfo
.
getSequenceNbr
());
if
(
ObjectUtils
.
isEmpty
(
codeMap
))
{
return
0
;
}
return
categoryOtherInfoMapper
.
updateSupervisorCode
(
codeMap
.
get
(
"supervisorCode"
),
codeMap
.
get
(
"elevatorCode"
),
record
);
}
@Override
...
...
@@ -226,33 +233,35 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
supervisorCode
.
append
(
division
).
append
(
equipCategory
);
//获取行政区划区县、市是否存在历史监管码
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
//生成对应监管码
if
(!
ObjectUtils
.
isEmpty
(
supervisor
))
{
if
(
supervisor
.
getSupervisoryCode
()
!=
null
)
{
//获取补零位长度
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
4
);
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
int
numLength
=
String
.
valueOf
(
num
).
length
();
int
a
=
7
-
numLength
;
StringBuilder
zero
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
a
;
i
++)
{
zero
.
append
(
EquipmentCategoryEnum
.
BLW
.
getCode
());
//查询对应record对应数据
CategoryOtherInfo
otherInfo
=
categoryOtherInfoMapper
.
selectOne
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"RECORD"
,
record
));
if
(!
ObjectUtils
.
isEmpty
(
otherInfo
)
&&
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
//生成对应监管码
if
(!
ObjectUtils
.
isEmpty
(
supervisor
))
{
if
(
supervisor
.
getSupervisoryCode
()
!=
null
)
{
//获取补零位长度
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
4
);
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
int
numLength
=
String
.
valueOf
(
num
).
length
();
int
a
=
7
-
numLength
;
StringBuilder
zero
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
a
;
i
++)
{
zero
.
append
(
EquipmentCategoryEnum
.
BLW
.
getCode
());
}
zero
.
append
(
num
);
supervisorCode
.
append
(
zero
);
}
else
{
supervisorCode
.
append
(
EquipmentCategoryEnum
.
JGM
.
getCode
());
}
zero
.
append
(
num
);
supervisorCode
.
append
(
zero
);
}
else
{
supervisorCode
.
append
(
EquipmentCategoryEnum
.
JGM
.
getCode
());
}
}
else
{
supervisorCode
.
append
(
EquipmentCategoryEnum
.
JGM
.
getCode
());
}
StringBuilder
elevatorCode
=
new
StringBuilder
();
//判断是否是否需要生成96333电梯码
if
(
EquipmentClassifityEnum
.
DT
.
getCode
().
equals
(
equipList
))
{
//查询最后一条数据并进行修改
CategoryOtherInfo
otherInfo
=
categoryOtherInfoMapper
.
selectOne
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"RECORD"
,
record
));
if
(!
ObjectUtils
.
isEmpty
(
otherInfo
))
{
if
(!
ObjectUtils
.
isEmpty
(
otherInfo
)
&&
ObjectUtils
.
isEmpty
(
otherInfo
.
getCode
()))
{
List
<
CategoryOtherInfo
>
codeList
=
categoryOtherInfoMapper
.
selectList
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"CODE96333"
,
otherInfo
.
getCode
()));
if
(
ObjectUtils
.
isEmpty
(
codeList
))
{
//生成生成96333电梯码前缀
...
...
@@ -284,8 +293,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
}
resultMap
.
put
(
"supervisorCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
.
toString
())
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"elevatorCode"
,
ObjectUtils
.
isEmpty
(
elevatorCode
.
toString
())
?
null
:
elevatorCode
.
toString
());
if
(
ObjectUtils
.
isEmpty
(
supervisorCode
)
&&
ObjectUtils
.
isEmpty
(
elevatorCode
))
{
return
null
;
}
resultMap
.
put
(
"supervisorCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"elevatorCode"
,
ObjectUtils
.
isEmpty
(
elevatorCode
)
?
null
:
elevatorCode
.
toString
());
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