Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
748332ed
Commit
748332ed
authored
Mar 16, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成监管码和96333电梯码
parent
54232d71
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
191 additions
and
61 deletions
+191
-61
EquInfoDto.java
.../com/yeejoin/amos/boot/module/tzs/api/dto/EquInfoDto.java
+34
-0
CategoryOtherInfoMapper.java
...s/boot/module/tzs/api/mapper/CategoryOtherInfoMapper.java
+3
-0
IEquipmentCategoryService.java
...oot/module/tzs/api/service/IEquipmentCategoryService.java
+3
-1
PrivilegeFeginService.java
.../boot/module/tzs/flc/api/feign/PrivilegeFeginService.java
+17
-2
CategoryOtherInfoMapper.xml
...api/src/main/resources/mapper/CategoryOtherInfoMapper.xml
+15
-1
AmosTzsApplication.java
...iz/src/main/java/com/yeejoin/amos/AmosTzsApplication.java
+5
-5
EquipmentCategoryController.java
...odule/tzs/biz/controller/EquipmentCategoryController.java
+14
-2
PrivilegeFeign.java
...eejoin/amos/boot/module/tzs/biz/fegin/PrivilegeFeign.java
+0
-15
AmosMqttListener.java
...n/amos/boot/module/tzs/biz/listener/AmosMqttListener.java
+29
-0
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+71
-35
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
0 → 100644
View file @
748332ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
EquInfoDto
{
/**
* 城市编码
*/
private
String
city
;
/**
* 区县编码
*/
private
String
county
;
/**
* 设备类别
*/
private
String
equipCategory
;
/**
* 设备种类
*/
private
String
equipList
;
/**
* record
*/
private
String
record
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/CategoryOtherInfoMapper.java
View file @
748332ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -17,4 +18,6 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> {
...
@@ -17,4 +18,6 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> {
CategoryOtherInfo
selectSupervisorCode
(
@Param
(
"supervisorCode"
)
String
supervisorCode
);
CategoryOtherInfo
selectSupervisorCode
(
@Param
(
"supervisorCode"
)
String
supervisorCode
);
CategoryOtherInfo
selectElevatorCode
(
@Param
(
"elevatorCode"
)
String
elevatorCode
);
CategoryOtherInfo
selectElevatorCode
(
@Param
(
"elevatorCode"
)
String
elevatorCode
);
EquInfoDto
selectEquipInfo
(
String
record
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IEquipmentCategoryService.java
View file @
748332ed
...
@@ -19,7 +19,9 @@ public interface IEquipmentCategoryService {
...
@@ -19,7 +19,9 @@ public interface IEquipmentCategoryService {
Page
equipClaimOverview
();
Page
equipClaimOverview
();
int
createSupervisorCode
(
Map
<
String
,
Object
>
map
);
int
createSupervisorCode
(
Map
<
String
,
Object
>
map
,
String
record
);
List
<
LinkedHashMap
>
creatTree
();
List
<
LinkedHashMap
>
creatTree
();
List
<
LinkedHashMap
>
getRegion
(
String
level
,
String
parentId
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/feign/PrivilegeFeginService.java
View file @
748332ed
...
@@ -2,15 +2,30 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.feign;
...
@@ -2,15 +2,30 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.feign;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@FeignClient
(
value
=
"AMOS-API-PRIVILEGE"
,
path
=
"privilege"
)
@FeignClient
(
value
=
"AMOS-API-PRIVILEGE"
,
configuration
=
{
FeignConfiguration
.
class
}
)
public
interface
PrivilegeFeginService
{
public
interface
PrivilegeFeginService
{
@RequestMapping
(
value
=
"/v1/agencyuser/me"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/
privilege/
v1/agencyuser/me"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
AgencyUserModel
>
getMe
();
ResponseModel
<
AgencyUserModel
>
getMe
();
//获取单位树
@RequestMapping
(
value
=
"/privilege/v1/company/tree"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
tree
();
//获取省级行政区划
@RequestMapping
(
value
=
"systemctl/v1/region/level"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
getProvince
(
@RequestParam
String
level
);
//获取行政区划树
@RequestMapping
(
value
=
"systemctl/v1/region/tree"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
getTree
();
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CategoryOtherInfoMapper.xml
View file @
748332ed
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<select
id=
"selectElevatorCode"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo"
>
<select
id=
"selectElevatorCode"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo"
>
SELECT
SELECT
CODE96333
CODE96333
code
FROM
FROM
idx_biz_jg_other_info oi
idx_biz_jg_other_info oi
WHERE
WHERE
...
@@ -36,4 +36,18 @@
...
@@ -36,4 +36,18 @@
RIGHT ( CODE96333, 2 ) DESC
RIGHT ( CODE96333, 2 ) DESC
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"selectEquipInfo"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.EquInfoDto"
>
SELECT
"CITY",
"COUNTY",
"EQU_LIST" equipList,
"EQU_CATEGORY" equipCategory,
ibjoi."RECORD"
FROM
idx_biz_jg_other_info ibjoi
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjoi.RECORD = ibjri.RECORD
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjoi.RECORD = ibjui.RECORD
WHERE ibjoi."RECORD" = #{record}
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/AmosTzsApplication.java
View file @
748332ed
package
com
.
yeejoin
.
amos
;
package
com
.
yeejoin
.
amos
;
import
com.yeejoin.amos.boot.biz.common.utils.oConvertUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.oConvertUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.listener.BaseEnterpriseMqTtlListener
;
import
com.yeejoin.amos.boot.module.tzs.biz.listener.*
;
import
com.yeejoin.amos.boot.module.tzs.biz.listener.CarcylUnitInspectMqTtlListener
;
import
com.yeejoin.amos.boot.module.tzs.biz.listener.FillingRecordSyncListener
;
import
com.yeejoin.amos.boot.module.tzs.biz.listener.PrivilegeCompanyDeleteListener
;
import
com.yeejoin.amos.boot.module.tzs.biz.listener.PrivilegeCompanyUpdateAddListener
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.StartPlatformTokenService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.StartPlatformTokenService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.ICylinderInfoService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.ICylinderInfoService
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
...
@@ -76,6 +72,9 @@ public class AmosTzsApplication {
...
@@ -76,6 +72,9 @@ public class AmosTzsApplication {
private
FillingRecordSyncListener
fillingRecordSyncListener
;
private
FillingRecordSyncListener
fillingRecordSyncListener
;
@Autowired
@Autowired
private
AmosMqttListener
amosMqTtlListener
;
@Autowired
ICylinderInfoService
cylinderInfoServiceImpl
;
ICylinderInfoService
cylinderInfoServiceImpl
;
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
...
@@ -102,6 +101,7 @@ public class AmosTzsApplication {
...
@@ -102,6 +101,7 @@ public class AmosTzsApplication {
emqKeeper
.
getMqttClient
().
subscribe
(
"/tz/privilege_company_add_update"
,
1
,
privilegeCompanyUpdateAddListener
);
emqKeeper
.
getMqttClient
().
subscribe
(
"/tz/privilege_company_add_update"
,
1
,
privilegeCompanyUpdateAddListener
);
emqKeeper
.
getMqttClient
().
subscribe
(
"/tz/privilege_company_delete"
,
1
,
privilegeCompanyDeleteListener
);
emqKeeper
.
getMqttClient
().
subscribe
(
"/tz/privilege_company_delete"
,
1
,
privilegeCompanyDeleteListener
);
emqKeeper
.
getMqttClient
().
subscribe
(
"/tzs/sync/fillingRecord"
,
1
,
fillingRecordSyncListener
);
emqKeeper
.
getMqttClient
().
subscribe
(
"/tzs/sync/fillingRecord"
,
1
,
fillingRecordSyncListener
);
emqKeeper
.
getMqttClient
().
subscribe
(
"tzs/oneCodePass/deviceSave"
,
0
,
amosMqTtlListener
);
// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam", 1, examMqTtlListener);
// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam", 1, examMqTtlListener);
// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam_record", 1, examMqTtRecordListener);
// emqKeeper.getMqttClient().subscribe("topic_mqtt_exam_record", 1, examMqTtRecordListener);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/EquipmentCategoryController.java
View file @
748332ed
...
@@ -8,7 +8,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -8,7 +8,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.JgAllDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService
;
...
@@ -190,7 +189,7 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -190,7 +189,7 @@ public class EquipmentCategoryController extends BaseController {
@PostMapping
(
value
=
"/createSupervisorCode"
)
@PostMapping
(
value
=
"/createSupervisorCode"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"生成监管码和96333码"
,
notes
=
"生成监管码和96333码"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"生成监管码和96333码"
,
notes
=
"生成监管码和96333码"
)
public
ResponseModel
<
Object
>
createSupervisorCode
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
public
ResponseModel
<
Object
>
createSupervisorCode
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
createSupervisorCode
(
map
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
createSupervisorCode
(
map
,
null
));
}
}
...
@@ -233,4 +232,17 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -233,4 +232,17 @@ public class EquipmentCategoryController extends BaseController {
}
}
/**
* 生成管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getRegion"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成管辖分局树"
,
notes
=
"生成管辖分局树"
)
public
ResponseModel
<
Object
>
getRegion
(
@RequestParam
(
value
=
"level"
,
required
=
false
)
String
level
,
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getRegion
(
level
,
parentId
));
}
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/fegin/PrivilegeFeign.java
deleted
100644 → 0
View file @
54232d71
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
fegin
;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
@FeignClient
(
name
=
"${privilege.fegin.name}"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
PrivilegeFeign
{
//获取单位树
@RequestMapping
(
value
=
"/privilege/v1/company/tree"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
tree
();
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/listener/AmosMqttListener.java
0 → 100644
View file @
748332ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
listener
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
/**
* @author Administrator
*/
@Component
public
class
AmosMqttListener
extends
EmqxListener
{
@Autowired
IEquipmentCategoryService
equipmentCategoryService
;
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
mqttMessage
){
byte
[]
payload
=
mqttMessage
.
getPayload
();
String
str
=
new
String
(
payload
);
String
msg
=
JSON
.
parse
(
str
).
toString
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
msg
);
String
id
=
jsonObject
.
get
(
"id"
).
toString
();
equipmentCategoryService
.
createSupervisorCode
(
null
,
id
);
}
}
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 @
748332ed
...
@@ -4,17 +4,16 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -4,17 +4,16 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RescueStation
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EquipmentCategoryEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EquipmentCategoryEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.tzs.biz.fegin.PrivilegeFeign
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.PrivilegeFeginService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.PrivilegeFeginService
;
...
@@ -51,9 +50,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -51,9 +50,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private
Resource
equipStatus
;
private
Resource
equipStatus
;
@Autowired
@Autowired
PrivilegeFeign
privilegeFeign
;
@Autowired
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
@Autowired
@Autowired
...
@@ -141,24 +137,30 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -141,24 +137,30 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
* 生成监管码和电梯96333识别码
* 生成监管码和电梯96333识别码
*/
*/
@Override
@Override
public
int
createSupervisorCode
(
Map
<
String
,
Object
>
map
)
{
public
int
createSupervisorCode
(
Map
<
String
,
Object
>
map
,
String
record
)
{
String
city
=
null
;
LinkedHashMap
value
=
(
LinkedHashMap
)
map
.
get
(
"value"
);
String
county
=
null
;
//获取对应城市、区县值
String
equipCategory
=
null
;
LinkedHashMap
o
=
(
LinkedHashMap
)
value
.
get
(
"1627903393253056514"
);
String
equipList
=
null
;
String
city
=
o
.
get
(
"CITY"
).
toString
();
if
(
ObjectUtils
.
isEmpty
(
record
))
{
String
county
=
o
.
get
(
"COUNTY"
).
toString
();
//获取对应城市、区县值
//获取对应种类、类别值
city
=
map
.
get
(
"CITY"
).
toString
();
LinkedHashMap
o1
=
(
LinkedHashMap
)
value
.
get
(
"1630483430028369922"
);
county
=
map
.
get
(
"COUNTY"
).
toString
();
String
equipCategory
=
o1
.
get
(
"EQU_CATEGORY"
).
toString
();
//获取对应种类、类别值
String
equipList
=
o1
.
get
(
"EQU_LIST"
).
toString
();
equipCategory
=
map
.
get
(
"EQU_CATEGORY"
).
toString
();
//测试数据 暂时保留
equipList
=
map
.
get
(
"EQU_LIST"
).
toString
();
// String city = "610400";
}
else
{
// String county = "610401";
EquInfoDto
equInfoDto
=
categoryOtherInfoMapper
.
selectEquipInfo
(
record
);
// String equipCategory = "3200";
city
=
equInfoDto
.
getCity
();
// String equipList = "3000";
county
=
equInfoDto
.
getCounty
();
equipCategory
=
equInfoDto
.
getEquipCategory
();
equipList
=
equInfoDto
.
getEquipList
();
}
//生成码
//生成码
Map
<
String
,
String
>
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
equipList
);
Map
<
String
,
String
>
codeMap
=
new
HashMap
<>();
synchronized
(
EquipmentCategoryServiceImpl
.
class
)
{
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
equipList
);
}
//查询最后一条数据并进行修改
//查询最后一条数据并进行修改
CategoryOtherInfo
otherInfo
=
categoryOtherInfoMapper
.
selectOne
(
new
QueryWrapper
<
CategoryOtherInfo
>().
orderByDesc
(
"REC_DATE"
).
last
(
"limit 1"
));
CategoryOtherInfo
otherInfo
=
categoryOtherInfoMapper
.
selectOne
(
new
QueryWrapper
<
CategoryOtherInfo
>().
orderByDesc
(
"REC_DATE"
).
last
(
"limit 1"
));
return
categoryOtherInfoMapper
.
updateSupervisorCode
(
codeMap
.
get
(
"supervisorCode"
),
codeMap
.
get
(
"elevatorCode"
),
otherInfo
.
getSequenceNbr
());
return
categoryOtherInfoMapper
.
updateSupervisorCode
(
codeMap
.
get
(
"supervisorCode"
),
codeMap
.
get
(
"elevatorCode"
),
otherInfo
.
getSequenceNbr
());
...
@@ -166,27 +168,61 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -166,27 +168,61 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
@Override
public
List
<
LinkedHashMap
>
creatTree
()
{
public
List
<
LinkedHashMap
>
creatTree
()
{
FeignClientResult
tree
=
privilegeFe
ign
.
tree
();
FeignClientResult
tree
=
privilegeFe
ginService
.
tree
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
deleteTreeData
(
result
);
List
<
LinkedHashMap
>
treeData
=
deleteTreeData
(
result
,
null
);
List
<
LinkedHashMap
>
resultTree
=
new
ArrayList
<>();
List
<
LinkedHashMap
>
resultTree
=
new
ArrayList
<>();
resultTree
.
add
(
treeData
.
get
(
5
));
resultTree
.
add
(
treeData
.
get
(
5
));
return
resultTree
;
return
resultTree
;
}
}
private
List
<
LinkedHashMap
>
deleteTreeData
(
List
<
LinkedHashMap
>
result
)
{
@Override
public
List
<
LinkedHashMap
>
getRegion
(
String
level
,
String
parentId
)
{
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>();
if
(
ObjectUtils
.
isEmpty
(
parentId
))
{
FeignClientResult
result
=
privilegeFeginService
.
getProvince
(
level
);
list
=
(
List
<
LinkedHashMap
>)
result
.
getResult
();
list
.
get
(
0
).
put
(
"sequenceNbr"
,
list
.
get
(
0
).
get
(
"regionCode"
));
}
else
{
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
list
=
deleteTreeData
(
result
,
parentId
);
}
return
list
;
}
private
List
<
LinkedHashMap
>
deleteTreeData
(
List
<
LinkedHashMap
>
result
,
String
type
)
{
Iterator
it
=
result
.
iterator
();
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
if
(
ObjectUtils
.
isEmpty
(
type
))
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
while
(
it
.
hasNext
())
{
//删除使用单位
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
if
(
"company"
.
equals
(
e
.
get
(
"level"
)))
{
//删除使用单位
it
.
remove
();
if
(
"company"
.
equals
(
e
.
get
(
"level"
)))
{
it
.
remove
();
}
if
(!
ObjectUtils
.
isEmpty
(
e
.
get
(
"children"
)))
{
deleteTreeData
((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
),
null
);
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
e
.
get
(
"children"
)))
{
return
result
;
deleteTreeData
((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
));
}
else
{
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>();
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
//修改数据
if
(
type
.
equals
(
e
.
get
(
"parentRegionCode"
).
toString
()))
{
e
.
put
(
"children"
,
null
);
e
.
put
(
"sequenceNbr"
,
e
.
get
(
"regionCode"
));
list
.
add
(
e
);
}
if
(!
ObjectUtils
.
isEmpty
(
e
.
get
(
"children"
)))
{
List
<
LinkedHashMap
>
children
=
deleteTreeData
((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
),
type
);
list
.
addAll
(
children
);
}
}
}
return
list
;
}
}
return
result
;
}
}
/**
/**
...
@@ -356,5 +392,4 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -356,5 +392,4 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List
<
EquipmentCategory
>
equipmentCategories
=
baseMapper
.
selectList
(
wrapper2
);
List
<
EquipmentCategory
>
equipmentCategories
=
baseMapper
.
selectList
(
wrapper2
);
return
equipmentCategories
;
return
equipmentCategories
;
}
}
}
}
\ No newline at end of file
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