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
bbd589a1
Commit
bbd589a1
authored
Aug 21, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(statistics):接口迁移
parent
ea45f266
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
334 additions
and
45 deletions
+334
-45
EnterpriseBizMapper.java
...oot/module/statistics/api/mapper/EnterpriseBizMapper.java
+20
-0
EnterpriseBizMapper.xml
...ics-api/src/main/resources/mapper/EnterpriseBizMapper.xml
+9
-0
EnterpriseBizController.java
...ule/statistcs/biz/controller/EnterpriseBizController.java
+7
-11
EquipmentBizController.java
...dule/statistcs/biz/controller/EquipmentBizController.java
+2
-18
StCommonController.java
...t/module/statistcs/biz/controller/StCommonController.java
+1
-15
EnterpriseBizServiceImpl.java
.../statistcs/biz/service/impl/EnterpriseBizServiceImpl.java
+7
-1
EquipmentBizServiceImpl.java
...e/statistcs/biz/service/impl/EquipmentBizServiceImpl.java
+288
-0
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/EnterpriseBizMapper.java
0 → 100644
View file @
bbd589a1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-12-13
*/
@Mapper
public
interface
EnterpriseBizMapper
{
Map
<
String
,
Object
>
getProblemInfoBySourceId
(
@Param
(
"sourceId"
)
String
sourceId
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/EnterpriseBizMapper.xml
0 → 100644
View file @
bbd589a1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.statistics.api.mapper.EnterpriseBizMapper"
>
<select
id=
"getProblemInfoBySourceId"
resultType=
"java.util.Map"
>
select * from tzs_safety_problem_tracing where source_id = #{sourceId} order by rec_date desc limit 1
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/EnterpriseBizController.java
View file @
bbd589a1
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EnterpriseBizServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EnterpriseBizServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -27,13 +26,10 @@ import java.util.Map;
...
@@ -27,13 +26,10 @@ import java.util.Map;
public
class
EnterpriseBizController
{
public
class
EnterpriseBizController
{
private
final
EnterpriseBizServiceImpl
enterpriseBizService
;
private
final
EnterpriseBizServiceImpl
enterpriseBizService
;
private
final
ITzBaseEnterpriseInfoService
iTzBaseEnterpriseInfoService
;
@Autowired
@Autowired
public
EnterpriseBizController
(
EnterpriseBizServiceImpl
enterpriseBizService
,
public
EnterpriseBizController
(
EnterpriseBizServiceImpl
enterpriseBizService
)
{
ITzBaseEnterpriseInfoService
iTzBaseEnterpriseInfoService
)
{
this
.
enterpriseBizService
=
enterpriseBizService
;
this
.
enterpriseBizService
=
enterpriseBizService
;
this
.
iTzBaseEnterpriseInfoService
=
iTzBaseEnterpriseInfoService
;
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
@@ -44,10 +40,10 @@ public class EnterpriseBizController {
...
@@ -44,10 +40,10 @@ public class EnterpriseBizController {
return
ResponseHelper
.
buildResponse
(
enterpriseBizService
.
page
(
pageParam
,
tzBaseEnterpriseInfoDto
));
return
ResponseHelper
.
buildResponse
(
enterpriseBizService
.
page
(
pageParam
,
tzBaseEnterpriseInfoDto
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
//
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping
(
value
=
"/getInfoByUseCode/map"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/getInfoByUseCode/map", method = RequestMethod.GET)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据统一信用代码查询企业详情返回map"
,
notes
=
"根据统一信用代码查询企业详情返回map"
)
//
@ApiOperation(httpMethod = "GET", value = "根据统一信用代码查询企业详情返回map", notes = "根据统一信用代码查询企业详情返回map")
public
ResponseModel
<
Map
<
String
,
Object
>>
getInfoByUseCodeMap
(
String
useCode
)
{
//
public ResponseModel<Map<String, Object>> getInfoByUseCodeMap(String useCode) {
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfo
Service
.
getInfoByUseCodeMap
(
useCode
));
// return ResponseHelper.buildResponse(enterpriseBiz
Service.getInfoByUseCodeMap(useCode));
}
//
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/EquipmentBizController.java
View file @
bbd589a1
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.statistcs.biz.controller;
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EquipmentBizServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EquipmentBizServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.service.IEquipmentCategoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -23,14 +22,12 @@ import java.util.Map;
...
@@ -23,14 +22,12 @@ import java.util.Map;
@Api
(
tags
=
"大屏-设备相关-业务API"
)
@Api
(
tags
=
"大屏-设备相关-业务API"
)
public
class
EquipmentBizController
{
public
class
EquipmentBizController
{
private
final
IEquipmentCategoryService
equipmentCategoryService
;
private
final
EquipmentBizServiceImpl
equipmentBizServiceImpl
;
private
final
EquipmentBizServiceImpl
equipmentBizServiceImpl
;
@Autowired
@Autowired
public
EquipmentBizController
(
IEquipmentCategoryService
equipmentCategoryService
,
EquipmentBizServiceImpl
equipmentBizServiceImpl
)
{
public
EquipmentBizController
(
EquipmentBizServiceImpl
equipmentBizServiceImpl
)
{
this
.
equipmentCategoryService
=
equipmentCategoryService
;
this
.
equipmentBizServiceImpl
=
equipmentBizServiceImpl
;
this
.
equipmentBizServiceImpl
=
equipmentBizServiceImpl
;
}
}
...
@@ -38,7 +35,7 @@ public class EquipmentBizController {
...
@@ -38,7 +35,7 @@ public class EquipmentBizController {
@RequestMapping
(
value
=
"/getFormRecordById/map"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getFormRecordById/map"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"表格查询详情"
,
notes
=
"表格查询详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"表格查询详情"
,
notes
=
"表格查询详情"
)
public
ResponseModel
<
Object
>
getFormRecordByIdMap
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
public
ResponseModel
<
Object
>
getFormRecordByIdMap
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
equipment
CategoryService
.
getFormRecordByIdMap
(
map
));
return
ResponseHelper
.
buildResponse
(
equipment
BizServiceImpl
.
getFormRecordByIdMap
(
map
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -48,17 +45,4 @@ public class EquipmentBizController {
...
@@ -48,17 +45,4 @@ public class EquipmentBizController {
return
ResponseHelper
.
buildResponse
(
equipmentBizServiceImpl
.
getChildren
(
code
));
return
ResponseHelper
.
buildResponse
(
equipmentBizServiceImpl
.
getChildren
(
code
));
}
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/creatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
creatTree
()
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getTree
());
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/StCommonController.java
View file @
bbd589a1
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.service.IRegUnitInfoService
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -14,7 +13,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -14,7 +13,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
...
@@ -23,12 +21,9 @@ import java.util.List;
...
@@ -23,12 +21,9 @@ import java.util.List;
public
class
StCommonController
extends
BaseController
{
public
class
StCommonController
extends
BaseController
{
private
StCommonServiceImpl
commonService
;
private
StCommonServiceImpl
commonService
;
private
IRegUnitInfoService
iregUnitInfoService
;
public
StCommonController
(
StCommonServiceImpl
commonService
,
public
StCommonController
(
StCommonServiceImpl
commonService
)
{
IRegUnitInfoService
iregUnitInfoService
)
{
this
.
commonService
=
commonService
;
this
.
commonService
=
commonService
;
this
.
iregUnitInfoService
=
iregUnitInfoService
;
}
}
/**
/**
...
@@ -54,13 +49,4 @@ public class StCommonController extends BaseController {
...
@@ -54,13 +49,4 @@ public class StCommonController extends BaseController {
objects
.
add
(
commonService
.
getEquCategoryTree
(
paramDto
));
objects
.
add
(
commonService
.
getEquCategoryTree
(
paramDto
));
return
ResponseHelper
.
buildResponse
(
objects
);
return
ResponseHelper
.
buildResponse
(
objects
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/management-unit/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管辖机构树"
,
notes
=
"管辖机构树"
)
public
ResponseModel
<
Collection
>
managementUnitTree
(
@RequestParam
(
required
=
false
)
String
orgCode
)
{
Collection
result
=
iregUnitInfoService
.
getManagementUnitTree
(
orgCode
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/EnterpriseBizServiceImpl.java
View file @
bbd589a1
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.EnterpriseBizMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
...
@@ -32,10 +33,15 @@ public class EnterpriseBizServiceImpl {
...
@@ -32,10 +33,15 @@ public class EnterpriseBizServiceImpl {
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
public
EnterpriseBizServiceImpl
(
RedisUtils
redisUtils
,
StCommonServiceImpl
stCommonService
,
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
)
{
private
EnterpriseBizMapper
enterpriseBizMapper
;
public
EnterpriseBizServiceImpl
(
RedisUtils
redisUtils
,
StCommonServiceImpl
stCommonService
,
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
,
EnterpriseBizMapper
enterpriseBizMapper
)
{
this
.
redisUtils
=
redisUtils
;
this
.
redisUtils
=
redisUtils
;
this
.
stCommonService
=
stCommonService
;
this
.
stCommonService
=
stCommonService
;
this
.
tzBaseEnterpriseInfoMapper
=
tzBaseEnterpriseInfoMapper
;
this
.
tzBaseEnterpriseInfoMapper
=
tzBaseEnterpriseInfoMapper
;
this
.
enterpriseBizMapper
=
enterpriseBizMapper
;
}
}
public
IPage
<
TzBaseEnterpriseInfoDto
>
page
(
PageParam
pageParam
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
)
{
public
IPage
<
TzBaseEnterpriseInfoDto
>
page
(
PageParam
pageParam
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
)
{
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/EquipmentBizServiceImpl.java
View file @
bbd589a1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author Administrator
* @author Administrator
...
@@ -13,6 +21,9 @@ import java.util.List;
...
@@ -13,6 +21,9 @@ import java.util.List;
@Service
@Service
public
class
EquipmentBizServiceImpl
{
public
class
EquipmentBizServiceImpl
{
// 一码通复制功能url参数key
private
static
final
String
COPY_KEY
=
"stashType"
;
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
public
EquipmentBizServiceImpl
(
EquipmentCategoryMapper
equipmentCategoryMapper
)
{
public
EquipmentBizServiceImpl
(
EquipmentCategoryMapper
equipmentCategoryMapper
)
{
...
@@ -31,4 +42,281 @@ public class EquipmentBizServiceImpl {
...
@@ -31,4 +42,281 @@ public class EquipmentBizServiceImpl {
List
<
EquipmentCategory
>
equipmentCategories
=
equipmentCategoryMapper
.
selectList
(
wrapper2
);
List
<
EquipmentCategory
>
equipmentCategories
=
equipmentCategoryMapper
.
selectList
(
wrapper2
);
return
equipmentCategories
;
return
equipmentCategories
;
}
}
public
Map
<
String
,
Object
>
getFormRecordByIdMap
(
Map
<
String
,
Object
>
map
)
{
String
alias
=
String
.
valueOf
(
map
.
get
(
"alias"
));
if
(
ObjectUtils
.
isEmpty
(
alias
))
{
return
new
HashMap
<>();
}
EquipmentTypeEnum
equipmentMessage
=
EquipmentTypeEnum
.
getEnumByCode
(
alias
);
if
(
equipmentMessage
==
null
&&
ObjectUtils
.
isEmpty
(
equipmentMessage
))
{
return
new
HashMap
<>();
}
HashMap
<
String
,
Map
<
String
,
Object
>>
result
=
new
HashMap
<>();
// 使用信息
Map
<
String
,
Object
>
useInfo
=
getUseInfo
(
map
);
result
.
put
(
equipmentMessage
.
getUseInfo
(),
useInfo
);
// 设计信息
Map
<
String
,
Object
>
desInfo
=
getDesInfo
(
map
);
result
.
put
(
equipmentMessage
.
getDesInfo
(),
desInfo
);
// 监督管理信息
Map
<
String
,
Object
>
supInfo
=
getSupInfo
(
map
);
if
(!
ValidationUtil
.
isEmpty
(
supInfo
.
get
(
"produceDate"
))){
LocalDate
produceDate
=
LocalDate
.
parse
(
supInfo
.
get
(
"produceDate"
).
toString
().
substring
(
0
,
10
),
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
LocalDate
localDate
=
LocalDate
.
now
().
minusYears
(
15
);
if
(
produceDate
.
isBefore
(
localDate
)){
supInfo
.
put
(
"OVER_FIFTEEN_YEARS"
,
"0"
);
}
else
{
supInfo
.
put
(
"OVER_FIFTEEN_YEARS"
,
"1"
);
}
}
if
(
"1"
.
equals
(
useInfo
.
get
(
"IS_NOT_XIXIAN"
)))
{
supInfo
.
put
(
"CITY"
,
"咸阳"
);
}
else
{
supInfo
.
put
(
"CITY"
,
useInfo
.
get
(
"CITY_NAME"
));
}
result
.
put
(
equipmentMessage
.
getSupInfo
(),
supInfo
);
// 施工信息
Map
<
String
,
Object
>
comInfo
=
getComInfo
(
map
);
result
.
put
(
equipmentMessage
.
getComInfo
(),
comInfo
);
// 维保信息(只有电梯有)
if
(!
ObjectUtils
.
isEmpty
(
map
)
&&
EquipmentTypeEnum
.
DT
.
getCode
().
equals
(
alias
))
{
Map
<
String
,
Object
>
mainInfo
=
getMainInfo
(
map
);
result
.
put
(
equipmentMessage
.
getMainInfo
(),
mainInfo
);
}
// 检验检测信息
Map
<
String
,
Object
>
insInfo
=
getInsInfo
(
map
);
result
.
put
(
equipmentMessage
.
getInsInfo
(),
insInfo
);
// 注册信息
Map
<
String
,
Object
>
jriInfo
=
getJriInfo
(
map
,
equipmentMessage
);
result
.
put
(
equipmentMessage
.
getJriInfo
(),
jriInfo
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
COPY_KEY
)))
{
result
.
get
(
EquipmentTypeEnum
.
DT
.
getSupInfo
()).
remove
(
"CLAIM_STATUS"
);
result
.
get
(
EquipmentTypeEnum
.
DT
.
getSupInfo
()).
remove
(
"CODE96333"
);
result
.
get
(
EquipmentTypeEnum
.
DT
.
getSupInfo
()).
remove
(
"SUPERVISORY_CODE"
);
}
Map
<
String
,
Object
>
resultMapNew
=
new
HashMap
<>();
result
.
forEach
((
key
,
value
)
->
{
resultMapNew
.
putAll
(
value
);
});
return
resultMapNew
;
}
/**
* 使用信息
*
* @param map
* @return
*/
private
Map
<
String
,
Object
>
getUseInfo
(
Map
<
String
,
Object
>
map
)
{
Map
<
String
,
Object
>
useInfo
=
equipmentCategoryMapper
.
selectTzsUseInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
if
(
ObjectUtils
.
isEmpty
(
useInfo
))
{
return
new
HashMap
<>();
}
useInfo
.
put
(
"LONGITUDE_LATITUDE"
,
JSON
.
parse
(
String
.
valueOf
(
useInfo
.
get
(
"LONGITUDE_LATITUDE"
))));
return
useInfo
;
}
/**
* 施工信息
*
* @param map
* @return
*/
private
Map
<
String
,
Object
>
getComInfo
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
comList
=
equipmentCategoryMapper
.
selectTzsConInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
if
(
ObjectUtils
.
isEmpty
(
comList
))
{
return
new
HashMap
<>();
}
HashMap
<
String
,
Object
>
comMap
=
new
HashMap
<>();
comList
.
forEach
(
item
->
{
if
(!
comMap
.
containsKey
(
"id"
))
{
comMap
.
put
(
"id"
,
item
.
get
(
"RECORD"
));
}
if
(!
comMap
.
containsKey
(
"sequenceNbr"
))
{
comMap
.
put
(
"sequenceNbr"
,
item
.
get
(
"SEQUENCE_NBR"
));
}
item
.
put
(
"Symbol_key"
,
item
.
get
(
"SEQUENCE_NBR"
));
});
comMap
.
put
(
"subForm_b2x2wmcy2s"
,
comList
);
return
comMap
;
}
/**
* 设计信息
*
* @param map
* @return
*/
private
Map
<
String
,
Object
>
getDesInfo
(
Map
<
String
,
Object
>
map
)
{
Map
<
String
,
Object
>
desInfo
=
equipmentCategoryMapper
.
selectTzsDesInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
if
(
ObjectUtils
.
isEmpty
(
desInfo
))
{
return
new
HashMap
<>();
}
desInfo
.
put
(
"DESIGN_DOC"
,
JSON
.
parseArray
(
String
.
valueOf
(
desInfo
.
get
(
"DESIGN_DOC"
))));
desInfo
.
put
(
"SUPERVISION_AGENCY_CREDENTIAL"
,
JSON
.
parseArray
(
String
.
valueOf
(
desInfo
.
get
(
"SUPERVISION_AGENCY_CREDENTIAL"
))));
desInfo
.
put
(
"INS_USE_MAINTAIN_EXPLAIN"
,
JSON
.
parseArray
(
String
.
valueOf
(
desInfo
.
get
(
"INS_USE_MAINTAIN_EXPLAIN"
))));
desInfo
.
put
(
"TYPE_TEST_CREDENTIAL"
,
JSON
.
parseArray
(
String
.
valueOf
(
desInfo
.
get
(
"TYPE_TEST_CREDENTIAL"
))));
desInfo
.
put
(
"FACTORY_STANDARD"
,
JSON
.
parseArray
(
String
.
valueOf
(
desInfo
.
get
(
"FACTORY_STANDARD"
))));
desInfo
.
put
(
"DESIGN_STANDARD"
,
JSON
.
parseArray
(
String
.
valueOf
(
desInfo
.
get
(
"DESIGN_STANDARD"
))));
desInfo
.
put
(
"PRODUCT_QUALITY_YIELD_PROVE"
,
JSON
.
parseArray
(
String
.
valueOf
(
desInfo
.
get
(
"PRODUCT_QUALITY_YIELD_PROVE"
))));
return
desInfo
;
}
/**
* 检验检测信息
*
* @param map
* @return
*/
private
Map
<
String
,
Object
>
getInsInfo
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
InsInfo
=
equipmentCategoryMapper
.
selectTzsInsInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
if
(
ObjectUtils
.
isEmpty
(
InsInfo
))
{
return
new
HashMap
<>();
}
HashMap
<
String
,
Object
>
insInfoMap
=
new
HashMap
<>();
InsInfo
.
forEach
(
item
->
{
item
.
put
(
"INSPECT_REPORT"
,
JSON
.
parseArray
(
String
.
valueOf
(
item
.
get
(
"INSPECT_REPORT"
))));
if
(!
insInfoMap
.
containsKey
(
"id"
))
{
insInfoMap
.
put
(
"id"
,
item
.
get
(
"RECORD"
));
}
if
(!
insInfoMap
.
containsKey
(
"sequenceNbr"
))
{
insInfoMap
.
put
(
"sequenceNbr"
,
item
.
get
(
"SEQUENCE_NBR"
));
}
item
.
put
(
"Symbol_key"
,
item
.
get
(
"SEQUENCE_NBR"
));
});
insInfoMap
.
put
(
"subForm_pbim1pfid8"
,
InsInfo
);
return
insInfoMap
;
}
/**
* 维保信息
*
* @param map
* @return
*/
private
Map
<
String
,
Object
>
getMainInfo
(
Map
<
String
,
Object
>
map
)
{
List
<
Map
<
String
,
Object
>>
mainInfo
=
equipmentCategoryMapper
.
selectTzsMainInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
if
(
ObjectUtils
.
isEmpty
(
mainInfo
))
{
return
new
HashMap
<>();
}
HashMap
<
String
,
Object
>
mainInfoMap
=
new
HashMap
<>();
mainInfo
.
forEach
(
item
->
{
item
.
put
(
"REPAIR_INFORM"
,
JSON
.
parseArray
(
String
.
valueOf
(
item
.
get
(
"REPAIR_INFORM"
))));
if
(!
mainInfoMap
.
containsKey
(
"id"
))
{
mainInfoMap
.
put
(
"id"
,
item
.
get
(
"RECORD"
));
}
if
(!
mainInfoMap
.
containsKey
(
"sequenceNbr"
))
{
mainInfoMap
.
put
(
"sequenceNbr"
,
item
.
get
(
"SEQUENCE_NBR"
));
}
item
.
put
(
"Symbol_key"
,
item
.
get
(
"SEQUENCE_NBR"
));
});
mainInfoMap
.
put
(
"subForm_6i16fox27e"
,
mainInfo
);
return
mainInfoMap
;
}
/**
* 监督管理信息
*
* @param map
* @return
*/
private
Map
<
String
,
Object
>
getSupInfo
(
Map
<
String
,
Object
>
map
)
{
Map
<
String
,
Object
>
supInfo
=
equipmentCategoryMapper
.
selectTzsSupInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
return
supInfo
;
}
/**
* 注册信息
*
* @param map
* @return
*/
private
Map
<
String
,
Object
>
getJriInfo
(
Map
<
String
,
Object
>
map
,
EquipmentTypeEnum
equipmentMessage
)
{
Map
<
String
,
Object
>
result
;
switch
(
equipmentMessage
.
getCode
())
{
case
"3000"
:
// 电梯
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
result
.
put
(
"EXPLOSIONPROOF_SIGN_COMPLETE"
,
JSON
.
parseArray
(
String
.
valueOf
(
result
.
get
(
"EXPLOSIONPROOF_SIGN_COMPLETE"
))));
break
;
case
"4000"
:
// 起重机械
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
List
<
Map
<
String
,
Object
>>
lbjJriInfo
=
equipmentCategoryMapper
.
selectTzslbjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
List
<
Map
<
String
,
Object
>>
aqfjJriInfo
=
equipmentCategoryMapper
.
selectTzsaqfjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
result
.
put
(
"subForm_bqirdyvztt"
,
lbjJriInfo
);
result
.
put
(
"subForm_29yy3pdzhl"
,
aqfjJriInfo
);
result
.
put
(
"subForm_h5h4x0zhur"
,
aqfjJriInfo
);
break
;
case
"5000"
:
// 厂车
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
List
<
Map
<
String
,
Object
>>
celbjJriInfo
=
equipmentCategoryMapper
.
selectTzslbjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
result
.
put
(
"subForm_sey164b51a"
,
celbjJriInfo
);
result
.
put
(
"subForm_tef7yf5fbr"
,
celbjJriInfo
);
break
;
case
"1000"
:
// 锅炉
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
List
<
Map
<
String
,
Object
>>
glaqfjJriInfo
=
equipmentCategoryMapper
.
selectTzsaqfjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
result
.
put
(
"subForm_1hh88r4m69"
,
glaqfjJriInfo
);
break
;
case
"2000"
:
// 压力容器
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
List
<
Map
<
String
,
Object
>>
ylrqaqfjJriInfo
=
equipmentCategoryMapper
.
selectTzsaqfjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
List
<
Map
<
String
,
Object
>>
ylrqjJriInfo
=
equipmentCategoryMapper
.
selectTzslbjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
result
.
put
(
"subForm_fie04854f2"
,
ylrqjJriInfo
);
result
.
put
(
"subForm_d4xdzhsgdj"
,
ylrqaqfjJriInfo
);
break
;
case
"8000"
:
// 压力容器
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
List
<
Map
<
String
,
Object
>>
ylgdjJriInfo
=
equipmentCategoryMapper
.
selectTzslbjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
result
.
put
(
"subForm_9n7nu55z8r"
,
ylgdjJriInfo
);
break
;
case
"6000"
:
// 游乐设施
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
break
;
case
"9000"
:
// 游乐设施
result
=
equipmentCategoryMapper
.
selectTzsqzjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)),
equipmentMessage
.
getTableName
());
if
(
ObjectUtils
.
isEmpty
(
result
))
{
return
new
HashMap
<>();
}
List
<
Map
<
String
,
Object
>>
sdJriLbjInfo
=
equipmentCategoryMapper
.
selectTzslbjJriInfo
(
String
.
valueOf
(
map
.
get
(
"id"
)));
result
.
put
(
"subForm_5fi0jewuyh"
,
sdJriLbjInfo
);
break
;
default
:
result
=
new
HashMap
<>();
}
result
.
put
(
"PRODUCT_PHOTO"
,
JSON
.
parseArray
(
String
.
valueOf
(
result
.
get
(
"PRODUCT_PHOTO"
))));
result
.
put
(
"USE_REGISTRATION_CERTIFICATE"
,
JSON
.
parseArray
(
String
.
valueOf
(
result
.
get
(
"USE_REGISTRATION_CERTIFICATE"
))));
result
.
put
(
"USE_SIGN"
,
JSON
.
parseArray
(
String
.
valueOf
(
result
.
get
(
"USE_SIGN"
))));
return
result
;
}
}
}
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