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
3b39edbb
Commit
3b39edbb
authored
Jul 07, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信扫一扫代码提交
parent
58310d3c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
399 additions
and
24 deletions
+399
-24
ElevatorBaseInfoForWXModel.java
...s/boot/module/tzs/api/dto/ElevatorBaseInfoForWXModel.java
+37
-0
InspectionDetectionInfoModelForWX.java
...module/tzs/api/dto/InspectionDetectionInfoModelForWX.java
+22
-0
MaintenanceInfoModelForWX.java
...os/boot/module/tzs/api/dto/MaintenanceInfoModelForWX.java
+23
-0
OtherEquBaseInfoForWXModel.java
...s/boot/module/tzs/api/dto/OtherEquBaseInfoForWXModel.java
+35
-0
LoginController.java
.../amos/boot/module/tzs/biz/controller/LoginController.java
+123
-0
TzsAppController.java
...amos/boot/module/tzs/biz/controller/TzsAppController.java
+12
-0
TzsAppService.java
.../amos/boot/module/tzs/biz/service/impl/TzsAppService.java
+140
-22
application-dev3.properties
...le-tzs-biz/src/main/resources/application-dev3.properties
+7
-2
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/ElevatorBaseInfoForWXModel.java
0 → 100644
View file @
3b39edbb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"ElevatorBaseInfoForWXModel"
,
description
=
""
)
public
class
ElevatorBaseInfoForWXModel
{
@ApiModelProperty
(
value
=
"电梯识别码"
)
private
String
code96333
;
@ApiModelProperty
(
value
=
"设备代码"
)
private
String
equCode
;
@ApiModelProperty
(
value
=
"使用登记证编号"
)
private
String
useOrgCode
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
@ApiModelProperty
(
value
=
"制造单位名"
)
private
String
produceUnitName
;
@ApiModelProperty
(
value
=
"出厂编号"
)
private
String
factoryNum
;
@ApiModelProperty
(
value
=
"所属区域"
)
private
String
area
;
@ApiModelProperty
(
value
=
"使用地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"单位内编号"
)
private
String
intraUnitNumber
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/InspectionDetectionInfoModelForWX.java
0 → 100644
View file @
3b39edbb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"InspectionDetectionInfoModelForWX"
,
description
=
""
)
public
class
InspectionDetectionInfoModelForWX
{
@ApiModelProperty
(
value
=
"检验机构名称"
)
private
String
inspectOrgName
;
@ApiModelProperty
(
value
=
"检验结论"
)
private
String
inspectConclusion
;
@ApiModelProperty
(
value
=
"下次检验日期"
)
private
Date
nextInspectDate
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/MaintenanceInfoModelForWX.java
0 → 100644
View file @
3b39edbb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"maintenanceRecordInfo"
,
description
=
""
)
public
class
MaintenanceInfoModelForWX
{
@ApiModelProperty
(
value
=
"最近维保日期"
)
private
Date
recentTime
;
@ApiModelProperty
(
value
=
"维保单位"
)
private
String
meUnitName
;
@ApiModelProperty
(
value
=
"维保电话"
)
private
String
me24Telephone
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/OtherEquBaseInfoForWXModel.java
0 → 100644
View file @
3b39edbb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"OtherEquBaseInfoForWXModel"
,
description
=
""
)
public
class
OtherEquBaseInfoForWXModel
{
@ApiModelProperty
(
value
=
"设备代码"
)
private
String
equCode
;
@ApiModelProperty
(
value
=
"使用登记证编号"
)
private
String
useOrgCode
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
@ApiModelProperty
(
value
=
"制造单位名"
)
private
String
produceUnitName
;
@ApiModelProperty
(
value
=
"出厂编号"
)
private
String
factoryNum
;
@ApiModelProperty
(
value
=
"所属区域"
)
private
String
area
;
@ApiModelProperty
(
value
=
"使用地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"单位内编号"
)
private
String
intraUnitNumber
;
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/LoginController.java
0 → 100644
View file @
3b39edbb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.component.feign.config.TokenOperation
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.ApplicationModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.IdPasswordAuthModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
/**
* @author zjw
* @date 2020-03-30
*/
@RestController
@RequestMapping
(
value
=
"/api/loginBytoken"
)
@Api
(
tags
=
"通过userName登录Api"
)
public
class
LoginController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
LoginController
.
class
);
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
@Value
(
"${outSystem.user.password}"
)
private
String
password
;
@Value
(
"${amos.system.user.product}"
)
private
String
product
;
@Value
(
"${amos.system.user.app-key}"
)
private
String
appKey
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"通过userId登录"
,
notes
=
"查询设备指标"
)
@GetMapping
(
value
=
"/{userId}"
)
synchronized
public
ReginParams
getBindEquipment
(
@PathVariable
(
"userId"
)
String
userId
)
throws
Exception
{
if
(
ObjectUtils
.
isEmpty
(
userId
)){
throw
new
Exception
(
"用户信息不存在"
);
}
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
token
=
"wxxcxdl"
;
ReginParams
reginParams
;
reginParams
=
JSON
.
parseObject
(
redisTemplate
.
opsForValue
().
get
(
buildKey
(
userId
,
token
)),
ReginParams
.
class
);
if
(
reginParams
==
null
){
reginParams
=
getLogin
(
userId
,
token
);
}
else
{
RequestContext
.
setProduct
(
product
);
if
(!
TokenOperation
.
refresh
(
reginParams
.
getToken
()))
{
reginParams
=
getLogin
(
userId
,
token
);
}
}
return
reginParams
;
}
private
ReginParams
getLogin
(
String
userId
,
String
token
)
throws
Exception
{
ReginParams
reginParams
=
new
ReginParams
();
IdPasswordAuthModel
dPasswordAuthModel
=
new
IdPasswordAuthModel
();
dPasswordAuthModel
.
setLoginId
(
userId
);
dPasswordAuthModel
.
setPassword
(
DesUtil
.
encode
(
password
,
"qaz"
));
RequestContext
.
setProduct
(
product
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
if
(
ObjectUtils
.
isEmpty
(
feignClientResult
.
getResult
())){
throw
new
Exception
(
"缺失登录信息"
);
}
// 调用平台授权接口
Map
<
String
,
String
>
re
=
(
Map
<
String
,
String
>)
feignClientResult
.
getResult
();
String
amosToken
=
re
.
get
(
"token"
);
logger
.
info
(
"应用授权开始======================================"
+
amosToken
);
RequestContext
.
setToken
(
amosToken
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
List
<
ApplicationModel
>
fd
=
Privilege
.
applicationClient
.
queryUserService
().
getResult
();
logger
.
info
(
"应用授权结束======================================"
+
JSON
.
toJSONString
(
fd
)+
amosToken
);
AgencyUserModel
userModel
=
(
AgencyUserModel
)
Privilege
.
agencyUserClient
.
getme
().
getResult
();
CompanyModel
companyModel
=
userModel
.
getCompanys
().
get
(
0
);
reginParams
.
setToken
(
amosToken
);
reginParams
.
setUserModel
(
userModel
);
redisTemplate
.
opsForValue
().
set
(
buildKey
(
userId
,
token
),
JSONObject
.
toJSONString
(
reginParams
),
28
,
TimeUnit
.
DAYS
);
return
reginParams
;
}
private
String
buildKey
(
String
userId
,
String
token
)
{
return
"region_"
+
userId
+
"_"
+
token
;
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzsAppController.java
View file @
3b39edbb
...
...
@@ -76,6 +76,18 @@ public class TzsAppController {
}
/**
* 小程序获取设备详情-微信扫一扫
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/equipmentInfoWX"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"小程序获取设备详情"
,
notes
=
"小程序获取设备详情"
)
public
ResponseModel
<
Object
>
getEquipmentInfoWX
(
String
record
)
{
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipmentInfoWX
(
record
));
}
/**
* 根据监管码查询设备详情
* @return
*/
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzsAppService.java
View file @
3b39edbb
...
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.*;
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.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.ViewJgClaimMapper
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.JsonUtils
;
...
...
@@ -32,6 +33,7 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
liquibase.pro.packaged.O
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -193,8 +195,8 @@ public class TzsAppService {
// 出厂
JSONObject
exFactoryJsonObject
=
new
JSONObject
();
List
exFactoryList
=
new
ArrayList
();
getGroupList
(
record
,
DesignInfo
.
class
,
DesignInfoModel
.
class
,
designInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
ProduceInfo
.
class
,
ProduceInfoModel
.
class
,
produceInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
DesignInfo
.
class
,
DesignInfoModel
.
class
,
designInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
ProduceInfo
.
class
,
ProduceInfoModel
.
class
,
produceInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
exFactoryJsonObject
.
put
(
"title"
,
"出厂"
);
exFactoryJsonObject
.
put
(
"tabValue"
,
exFactoryList
);
jsonArray
.
add
(
exFactoryJsonObject
);
...
...
@@ -202,7 +204,7 @@ public class TzsAppService {
// 施工
JSONObject
constructionJsonObject
=
new
JSONObject
();
List
constructionList
=
new
ArrayList
();
getGroupList
(
record
,
ConstructionInfo
.
class
,
ConstructionInfoModel
.
class
,
constructionInfoService
,
constructionList
,
true
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
ConstructionInfo
.
class
,
ConstructionInfoModel
.
class
,
constructionInfoService
,
constructionList
,
true
,
dictionaryList
,
equipmentCategories
);
constructionJsonObject
.
put
(
"title"
,
"施工"
);
constructionJsonObject
.
put
(
"tabValue"
,
constructionList
);
jsonArray
.
add
(
constructionJsonObject
);
...
...
@@ -210,17 +212,17 @@ public class TzsAppService {
// 注册
JSONObject
registrationJsonObject
=
new
JSONObject
();
List
registrationList
=
new
ArrayList
();
getGroupList
(
record
,
RegistrationInfo
.
class
,
RegistrationInfoModel
.
class
,
registrationInfoService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamBoiler
.
class
,
EquipTechParamBoilerModel
.
class
,
boilerService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamElevator
.
class
,
EquipTechParamElevatorModel
.
class
,
elevatorService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamLifting
.
class
,
EquipTechParamLiftingModel
.
class
,
elevatorService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamPipeline
.
class
,
EquipTechParamPipelineModel
.
class
,
pipelineService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamRides
.
class
,
EquipTechParamRidesModel
.
class
,
ridesService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamRopeway
.
class
,
EquipTechParamRopewayModel
.
class
,
ropewayService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamVehicle
.
class
,
EquipTechParamVehicleModel
.
class
,
vehicleService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
EquipTechParamVessel
.
class
,
EquipTechParamVesselModel
.
class
,
vesselService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
MainParts
.
class
,
MainPartsModel
.
class
,
mainPartsService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
record
,
ProtectionDevices
.
class
,
ProtectionDevicesModel
.
class
,
protectionDevicesService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
RegistrationInfo
.
class
,
RegistrationInfoModel
.
class
,
registrationInfoService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamBoiler
.
class
,
EquipTechParamBoilerModel
.
class
,
boilerService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamElevator
.
class
,
EquipTechParamElevatorModel
.
class
,
elevatorService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamLifting
.
class
,
EquipTechParamLiftingModel
.
class
,
elevatorService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamPipeline
.
class
,
EquipTechParamPipelineModel
.
class
,
pipelineService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamRides
.
class
,
EquipTechParamRidesModel
.
class
,
ridesService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamRopeway
.
class
,
EquipTechParamRopewayModel
.
class
,
ropewayService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamVehicle
.
class
,
EquipTechParamVehicleModel
.
class
,
vehicleService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
EquipTechParamVessel
.
class
,
EquipTechParamVesselModel
.
class
,
vesselService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
MainParts
.
class
,
MainPartsModel
.
class
,
mainPartsService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
ProtectionDevices
.
class
,
ProtectionDevicesModel
.
class
,
protectionDevicesService
,
registrationList
,
false
,
dictionaryList
,
equipmentCategories
);
registrationJsonObject
.
put
(
"title"
,
"注册"
);
registrationJsonObject
.
put
(
"tabValue"
,
registrationList
);
jsonArray
.
add
(
registrationJsonObject
);
...
...
@@ -228,7 +230,7 @@ public class TzsAppService {
// 使用
JSONObject
useJsonObject
=
new
JSONObject
();
List
useList
=
new
ArrayList
();
getGroupList
(
record
,
UseInfo
.
class
,
UseInfoModel
.
class
,
unseInfoService
,
useList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
UseInfo
.
class
,
UseInfoModel
.
class
,
unseInfoService
,
useList
,
false
,
dictionaryList
,
equipmentCategories
);
useJsonObject
.
put
(
"title"
,
"使用"
);
useJsonObject
.
put
(
"tabValue"
,
useList
);
jsonArray
.
add
(
useJsonObject
);
...
...
@@ -236,7 +238,7 @@ public class TzsAppService {
// 维保
JSONObject
maintenanceJsonObject
=
new
JSONObject
();
List
maintenanceList
=
new
ArrayList
();
getGroupList
(
record
,
MaintenanceInfo
.
class
,
MaintenanceInfoModel
.
class
,
maintenanceInfoService
,
maintenanceList
,
true
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
MaintenanceInfo
.
class
,
MaintenanceInfoModel
.
class
,
maintenanceInfoService
,
maintenanceList
,
true
,
dictionaryList
,
equipmentCategories
);
maintenanceJsonObject
.
put
(
"title"
,
"维保"
);
maintenanceJsonObject
.
put
(
"tabValue"
,
maintenanceList
);
jsonArray
.
add
(
maintenanceJsonObject
);
...
...
@@ -244,7 +246,7 @@ public class TzsAppService {
// 检验
JSONObject
inspectionJsonObject
=
new
JSONObject
();
List
inspectionList
=
new
ArrayList
();
getGroupList
(
record
,
InspectionDetectionInfo
.
class
,
InspectionDetectionInfoModel
.
class
,
inspectionDetectionInfoService
,
inspectionList
,
true
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
InspectionDetectionInfo
.
class
,
InspectionDetectionInfoModel
.
class
,
inspectionDetectionInfoService
,
inspectionList
,
true
,
dictionaryList
,
equipmentCategories
);
inspectionJsonObject
.
put
(
"title"
,
"检验"
);
inspectionJsonObject
.
put
(
"tabValue"
,
inspectionList
);
jsonArray
.
add
(
inspectionJsonObject
);
...
...
@@ -252,7 +254,7 @@ public class TzsAppService {
// 其他
JSONObject
otherJsonObject
=
new
JSONObject
();
List
otherList
=
new
ArrayList
();
getGroupList
(
record
,
OtherInfo
.
class
,
OtherInfoModel
.
class
,
otherInfoService
,
otherList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
null
,
record
,
OtherInfo
.
class
,
OtherInfoModel
.
class
,
otherInfoService
,
otherList
,
false
,
dictionaryList
,
equipmentCategories
);
otherJsonObject
.
put
(
"title"
,
"其他"
);
otherJsonObject
.
put
(
"tabValue"
,
otherList
);
jsonArray
.
add
(
otherJsonObject
);
...
...
@@ -261,7 +263,118 @@ public class TzsAppService {
return
map
;
}
public
void
getGroupList
(
String
record
,
Class
entity
,
Class
dto
,
BaseService
service
,
List
list
,
boolean
isOne
,
List
<
DataDictionary
>
dictionaryList
,
List
<
EquipmentCategory
>
equipmentCategories
)
{
public
Map
<
String
,
Object
>
getEquipmentInfoWX
(
String
record
)
{
List
<
DataDictionary
>
dictionaryList
=
getDictionary
();
List
<
EquipmentCategory
>
equipmentCategories
=
equipmentCategoryMapper
.
selectList
(
null
);
Map
<
String
,
Object
>
map
=
new
HashMap
();
map
.
put
(
"SEQUENCE_NBR"
,
record
);
map
.
put
(
"tableName"
,
"idx_biz_view_jg_claim"
);
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
model
=
idxFeignService
.
getPage
(
map
);
List
<
Map
<
String
,
Object
>>
detialMapList
=
model
.
getResult
().
getRecords
();
if
(!
ValidationUtil
.
isEmpty
(
detialMapList
))
{
map
=
detialMapList
.
iterator
().
next
();
}
map
.
putAll
(
getQRCode
(
record
));
if
(
map
.
get
(
"EQU_LIST_CODE"
).
equals
(
"3000"
))
{
JSONArray
jsonArray
=
new
JSONArray
();
// 基本信息
JSONObject
exFactoryJsonObject
=
new
JSONObject
();
List
exFactoryList
=
new
ArrayList
();
HashMap
putMap
=
new
HashMap
();
Field
[]
fields
=
ElevatorBaseInfoForWXModel
.
class
.
getDeclaredFields
();
for
(
Field
f
:
fields
)
{
putMap
.
put
(
f
.
getName
(),
""
);
}
getGroupList
(
putMap
,
record
,
RegistrationInfo
.
class
,
ElevatorBaseInfoForWXModel
.
class
,
registrationInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
DesignInfo
.
class
,
ElevatorBaseInfoForWXModel
.
class
,
designInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
OtherInfo
.
class
,
ElevatorBaseInfoForWXModel
.
class
,
otherInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
UseInfo
.
class
,
ElevatorBaseInfoForWXModel
.
class
,
unseInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
ProduceInfo
.
class
,
ElevatorBaseInfoForWXModel
.
class
,
produceInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
if
(
exFactoryList
.
size
()
>
0
)
{
String
area
=
map
.
get
(
"USE_PLACE"
).
toString
();
JSONObject
jsonObject
=
(
JSONObject
)
exFactoryList
.
get
(
0
);
List
<
HashMap
<
String
,
Object
>>
groupValue
=
(
List
<
HashMap
<
String
,
Object
>>)
jsonObject
.
get
(
"groupValue"
);
groupValue
.
forEach
(
e
->{
e
.
put
(
"fieldValue"
,
putMap
.
get
(
e
.
get
(
"fieldKey"
)));
if
(
e
.
get
(
"fieldKey"
).
equals
(
"area"
))
{
e
.
put
(
"fieldValue"
,
area
);
}
});
Object
ob
=
exFactoryList
.
get
(
0
);
exFactoryList
.
clear
();
exFactoryList
.
add
(
ob
);
}
exFactoryJsonObject
.
put
(
"title"
,
"基本信息"
);
exFactoryJsonObject
.
put
(
"tabValue"
,
exFactoryList
);
jsonArray
.
add
(
exFactoryJsonObject
);
// 最近检验信息
JSONObject
constructionJsonObject
=
new
JSONObject
();
List
constructionList
=
new
ArrayList
();
getGroupList
(
null
,
record
,
InspectionDetectionInfo
.
class
,
InspectionDetectionInfoModelForWX
.
class
,
constructionInfoService
,
constructionList
,
true
,
dictionaryList
,
equipmentCategories
);
constructionJsonObject
.
put
(
"title"
,
"最近检验信息"
);
constructionJsonObject
.
put
(
"tabValue"
,
constructionList
);
jsonArray
.
add
(
constructionJsonObject
);
// 设备维保信息
JSONObject
useJsonObject
=
new
JSONObject
();
List
useList
=
new
ArrayList
();
getGroupList
(
null
,
record
,
MaintenanceInfo
.
class
,
MaintenanceInfoModelForWX
.
class
,
unseInfoService
,
useList
,
false
,
dictionaryList
,
equipmentCategories
);
useJsonObject
.
put
(
"title"
,
"设备维保信息"
);
useJsonObject
.
put
(
"tabValue"
,
useList
);
jsonArray
.
add
(
useJsonObject
);
map
.
put
(
"tab"
,
jsonArray
);
}
else
{
JSONArray
jsonArray
=
new
JSONArray
();
// 基本信息
JSONObject
exFactoryJsonObject
=
new
JSONObject
();
List
exFactoryList
=
new
ArrayList
();
HashMap
putMap
=
new
HashMap
();
Field
[]
fields
=
OtherEquBaseInfoForWXModel
.
class
.
getDeclaredFields
();
for
(
Field
f
:
fields
)
{
putMap
.
put
(
f
.
getName
(),
""
);
}
getGroupList
(
putMap
,
record
,
RegistrationInfo
.
class
,
OtherEquBaseInfoForWXModel
.
class
,
registrationInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
DesignInfo
.
class
,
OtherEquBaseInfoForWXModel
.
class
,
designInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
OtherInfo
.
class
,
OtherEquBaseInfoForWXModel
.
class
,
otherInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
UseInfo
.
class
,
OtherEquBaseInfoForWXModel
.
class
,
unseInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
getGroupList
(
putMap
,
record
,
ProduceInfo
.
class
,
OtherEquBaseInfoForWXModel
.
class
,
produceInfoService
,
exFactoryList
,
false
,
dictionaryList
,
equipmentCategories
);
if
(
exFactoryList
.
size
()
>
0
)
{
JSONObject
jsonObject
=
(
JSONObject
)
exFactoryList
.
get
(
0
);
List
<
HashMap
<
String
,
Object
>>
groupValue
=
(
List
<
HashMap
<
String
,
Object
>>)
jsonObject
.
get
(
"groupValue"
);
groupValue
.
forEach
(
e
->{
e
.
put
(
"fieldValue"
,
putMap
.
get
(
e
.
get
(
"fieldKey"
)));
});
Object
ob
=
exFactoryList
.
get
(
0
);
exFactoryList
.
clear
();
exFactoryList
.
add
(
ob
);
}
exFactoryJsonObject
.
put
(
"title"
,
"基本信息"
);
exFactoryJsonObject
.
put
(
"tabValue"
,
exFactoryList
);
jsonArray
.
add
(
exFactoryJsonObject
);
// 最近检验信息
JSONObject
constructionJsonObject
=
new
JSONObject
();
List
constructionList
=
new
ArrayList
();
getGroupList
(
null
,
record
,
InspectionDetectionInfo
.
class
,
InspectionDetectionInfoModelForWX
.
class
,
constructionInfoService
,
constructionList
,
true
,
dictionaryList
,
equipmentCategories
);
constructionJsonObject
.
put
(
"title"
,
"最近检验信息"
);
constructionJsonObject
.
put
(
"tabValue"
,
constructionList
);
jsonArray
.
add
(
constructionJsonObject
);
}
return
map
;
}
public
void
getGroupList
(
HashMap
putMap
,
String
record
,
Class
entity
,
Class
dto
,
BaseService
service
,
List
list
,
boolean
isOne
,
List
<
DataDictionary
>
dictionaryList
,
List
<
EquipmentCategory
>
equipmentCategories
)
{
TableInfoHelper
.
initTableInfo
(
new
MapperBuilderAssistant
(
new
MybatisConfiguration
(),
""
),
entity
);
QueryWrapper
wrapper
=
new
QueryWrapper
();
wrapper
.
eq
(
"RECORD"
,
record
);
...
...
@@ -277,7 +390,7 @@ public class TzsAppService {
if
(
entityList
.
size
()>
0
)
{
while
(
iterator
.
hasNext
())
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
iterator
.
next
()));
result
=
getFieldList
(
dto
,
jsonObject
,
null
,
dictionaryList
,
equipmentCategories
);
result
=
getFieldList
(
putMap
,
dto
,
jsonObject
,
null
,
dictionaryList
,
equipmentCategories
);
list
.
add
(
result
);
}
...
...
@@ -293,7 +406,7 @@ public class TzsAppService {
}
else
{
jsonObject
=
new
JSONObject
();
}
result
=
getFieldList
(
dto
,
jsonObject
,
count
,
dictionaryList
,
equipmentCategories
);
result
=
getFieldList
(
putMap
,
dto
,
jsonObject
,
count
,
dictionaryList
,
equipmentCategories
);
list
.
add
(
result
);
}
...
...
@@ -301,7 +414,7 @@ public class TzsAppService {
}
public
JSONObject
getFieldList
(
Class
clazz
,
JSONObject
jsonObject
,
Integer
count
,
List
<
DataDictionary
>
dictionaryList
,
List
<
EquipmentCategory
>
equipmentCategories
)
{
public
JSONObject
getFieldList
(
HashMap
putMap
,
Class
clazz
,
JSONObject
jsonObject
,
Integer
count
,
List
<
DataDictionary
>
dictionaryList
,
List
<
EquipmentCategory
>
equipmentCategories
)
{
JSONObject
result
=
new
JSONObject
();
JSONObject
ApiModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
clazz
.
getAnnotation
(
ApiModel
.
class
)));
String
groupName
=
ApiModel
.
getString
(
"description"
);
...
...
@@ -323,6 +436,11 @@ public class TzsAppService {
map
.
put
(
"fieldValue"
,
""
);
}
if
(
null
!=
putMap
&&
putMap
.
containsKey
(
field
.
getName
()))
{
if
(
null
!=
map
.
get
(
"fieldValue"
))
{
putMap
.
put
(
field
.
getName
(),
map
.
get
(
"fieldValue"
));
}
}
list
.
add
(
map
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev3.properties
View file @
3b39edbb
...
...
@@ -151,4 +151,9 @@ tzs.cylinder.fill.cron=0 0 12 * * ?
tzs.cylinder.info.cron
=
0 0 1 * * ?
# ??????????
minio.url.path
=
http://172.16.10.210:9000/
\ No newline at end of file
minio.url.path
=
http://172.16.10.210:9000/
outSystem.user.password
=
a1234560
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
STUDIO_APP_WEB
\ 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