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
4548321e
Commit
4548321e
authored
Nov 17, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新FLC相关代码
parent
182fe054
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
287 additions
and
115 deletions
+287
-115
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+25
-0
RedisKey.java
...java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
+3
-0
TzsCommonParam.java
...eejoin/amos/boot/module/tzs/api/enums/TzsCommonParam.java
+7
-0
UnitInfoChangeDto.java
...n/amos/boot/module/tzs/flc/api/dto/UnitInfoChangeDto.java
+3
-0
UnitInfoDto.java
...yeejoin/amos/boot/module/tzs/flc/api/dto/UnitInfoDto.java
+36
-4
UnitInfo.java
...yeejoin/amos/boot/module/tzs/flc/api/entity/UnitInfo.java
+21
-8
UnitInfoChange.java
...n/amos/boot/module/tzs/flc/api/entity/UnitInfoChange.java
+14
-8
IUnitInfoService.java
...mos/boot/module/tzs/flc/api/service/IUnitInfoService.java
+11
-0
TzsAuthServiceImpl.java
.../boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
+112
-44
VoiceRecordLogServiceImpl.java
...odule/tzs/biz/service/impl/VoiceRecordLogServiceImpl.java
+5
-25
BeanDtoVoUtils.java
...eejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
+35
-0
UnitInfoApproveController.java
...ule/tzs/flc/biz/controller/UnitInfoApproveController.java
+9
-24
UnitInfoController.java
...oot/module/tzs/flc/biz/controller/UnitInfoController.java
+0
-0
UnitInfoServiceImpl.java
.../module/tzs/flc/biz/service/impl/UnitInfoServiceImpl.java
+0
-0
application-dev.properties
...-system-tzs/src/main/resources/application-dev.properties
+4
-2
application-qa.properties
...t-system-tzs/src/main/resources/application-qa.properties
+2
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
4548321e
...
...
@@ -349,4 +349,29 @@ public class DataDictionaryController extends BaseController {
return
ResponseHelper
.
buildResponse
(
type
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/gwmcDataDictionaryNotoken/{type}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典不验证token"
,
notes
=
"根据字典类型查询字典不验证token"
)
public
ResponseModel
<
Object
>
gwmcDataDictionaryNotoken
(
@PathVariable
String
type
)
throws
Exception
{
// 数据字典生成树方法 原先通过getCode做主键 现修改为 getSequenceNbr 后期数据字典parent字段保存id 而不要保存code by
// kongfm 2021-09-08
// 数据字典还原 by kongfm 2021-09-09
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
))
{
Object
obj
=
redisUtils
.
get
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
else
{
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
View file @
4548321e
...
...
@@ -39,6 +39,9 @@ public class RedisKey {
/**联通CTIuser token */
public
static
final
String
CTI_USER_TOKEN
=
"cti_user_token"
;
/** 企业用户注册前缀 */
public
static
final
String
FLC_USER_TEL
=
"flc_tel_"
;
/** 驼峰转下划线(简单写法,效率低于 ) */
public
static
String
humpToLine
(
String
str
)
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/TzsCommonParam.java
View file @
4548321e
...
...
@@ -37,4 +37,11 @@ public class TzsCommonParam {
public
static
final
String
APPJJ
=
"APPJJ"
;
public
static
final
String
DD
=
"DD"
;
public
static
final
String
JC
=
"JC"
;
public
static
final
String
LICENCE_PIC
=
"licencePic"
;
public
static
final
String
ADMIN_LICENSE_PIC
=
"adminLicensePic"
;
public
static
final
String
QR_CODE
=
"qrCode"
;
public
static
final
String
UNIT_TYPE
=
"UNIT_TYPE"
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/UnitInfoChangeDto.java
View file @
4548321e
...
...
@@ -36,6 +36,9 @@ public class UnitInfoChangeDto extends BaseDto {
@ApiModelProperty
(
value
=
"单位类型code"
)
private
String
unitTypeCode
;
@ApiModelProperty
(
value
=
"组织机构编码"
)
private
String
organizationCode
;
@ApiModelProperty
(
value
=
"主管部门"
)
private
String
comptentDept
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/UnitInfoDto.java
View file @
4548321e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* 企业信息表
...
...
@@ -25,10 +28,13 @@ public class UnitInfoDto extends BaseDto {
private
String
orgName
;
@ApiModelProperty
(
value
=
"证照类型"
)
private
String
licen
s
eType
;
private
String
licen
c
eType
;
@ApiModelProperty
(
value
=
"证照类型code"
)
private
String
licenseTypeCode
;
private
String
licenceTypeCode
;
@ApiModelProperty
(
value
=
"组织机构编码"
)
private
String
organizationCode
;
@ApiModelProperty
(
value
=
"单位类型"
)
private
String
unitType
;
...
...
@@ -94,10 +100,10 @@ public class UnitInfoDto extends BaseDto {
private
Date
createTime
;
@ApiModelProperty
(
value
=
"单位法人"
)
private
String
leg
e
lPerson
;
private
String
leg
a
lPerson
;
@ApiModelProperty
(
value
=
"法人电话"
)
private
String
leg
e
lPersonTel
;
private
String
leg
a
lPersonTel
;
@ApiModelProperty
(
value
=
"单位联系人"
)
private
String
contactPerson
;
...
...
@@ -126,4 +132,30 @@ public class UnitInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"审批状态 0 审批中 1 审批结束 2 驳回"
)
private
Integer
unitStatus
;
@ApiModelProperty
(
value
=
"证照图片"
)
private
List
<
AttachmentDto
>
licencePic
;
@ApiModelProperty
(
value
=
"管理员身份证"
)
private
List
<
AttachmentDto
>
adminLicensePic
;
@ApiModelProperty
(
value
=
"是否变更 0 未变更 1 变更中"
)
private
Boolean
isChange
;
@ApiModelProperty
(
value
=
"提交时间开始"
)
private
Date
submitTimeStart
;
@ApiModelProperty
(
value
=
"接警时间结束"
)
private
Date
submitTimeEnd
;
@ApiModelProperty
(
value
=
"分类名称"
)
private
String
typeStr
;
@ApiModelProperty
(
value
=
"状态名称"
)
private
String
statusStr
;
@ApiModelProperty
(
value
=
"企业二维码"
)
private
List
<
AttachmentDto
>
qrcode
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/entity/UnitInfo.java
View file @
4548321e
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -31,14 +32,20 @@ public class UnitInfo extends BaseEntity {
/**
* 证照类型
*/
@TableField
(
"licen
s
e_type"
)
private
String
licen
s
eType
;
@TableField
(
"licen
c
e_type"
)
private
String
licen
c
eType
;
/**
* 证照类型code
*/
@TableField
(
"license_type_code"
)
private
String
licenseTypeCode
;
@TableField
(
"licence_type_code"
)
private
String
licenceTypeCode
;
/**
* 组织机构编码
*/
@TableField
(
"organization_code"
)
private
String
organizationCode
;
/**
* 单位类型
...
...
@@ -169,14 +176,14 @@ public class UnitInfo extends BaseEntity {
/**
* 单位法人
*/
@TableField
(
"leg
e
l_person"
)
private
String
leg
e
lPerson
;
@TableField
(
"leg
a
l_person"
)
private
String
leg
a
lPerson
;
/**
* 法人电话
*/
@TableField
(
"leg
e
l_person_tel"
)
private
String
leg
e
lPersonTel
;
@TableField
(
"leg
a
l_person_tel"
)
private
String
leg
a
lPersonTel
;
/**
* 单位联系人
...
...
@@ -232,4 +239,10 @@ public class UnitInfo extends BaseEntity {
@TableField
(
"unit_status"
)
private
Integer
unitStatus
;
/**
* 是否变更 0 未变更 1 变更中
*/
@TableField
(
value
=
"is_change"
)
private
Boolean
isChange
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/entity/UnitInfoChange.java
View file @
4548321e
...
...
@@ -31,14 +31,20 @@ public class UnitInfoChange extends BaseEntity {
/**
* 证照类型
*/
@TableField
(
"licen
s
e_type"
)
private
String
licen
s
eType
;
@TableField
(
"licen
c
e_type"
)
private
String
licen
c
eType
;
/**
* 证照类型code
*/
@TableField
(
"license_type_code"
)
private
String
licenseTypeCode
;
@TableField
(
"licence_type_code"
)
private
String
licenceTypeCode
;
/**
* 组织机构编码
*/
@TableField
(
"organization_code"
)
private
String
organizationCode
;
/**
* 单位类型
...
...
@@ -169,14 +175,14 @@ public class UnitInfoChange extends BaseEntity {
/**
* 单位法人
*/
@TableField
(
"leg
e
l_person"
)
private
String
leg
e
lPerson
;
@TableField
(
"leg
a
l_person"
)
private
String
leg
a
lPerson
;
/**
* 法人电话
*/
@TableField
(
"leg
e
l_person_tel"
)
private
String
leg
e
lPersonTel
;
@TableField
(
"leg
a
l_person_tel"
)
private
String
leg
a
lPersonTel
;
/**
* 单位联系人
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/IUnitInfoService.java
View file @
4548321e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
service
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
/**
* 企业信息表接口类
*
...
...
@@ -9,4 +12,12 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
*/
public
interface
IUnitInfoService
{
/**
* 审批企业注册信息
* @param approveDto
* @return
*/
UnitInfoDto
approve
(
UnitInfoApproveDto
approveDto
);
UnitInfoDto
getDtoById
(
Long
sequenceNbr
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
View file @
4548321e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.
boot.module.tzs.biz.utils.BeanDtoVoUtils
;
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.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.model.IdPasswordAuthModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* 特种设备权限服务实现类
...
...
@@ -70,6 +39,22 @@ import java.util.stream.Collectors;
@Service
public
class
TzsAuthServiceImpl
implements
TzsAuthService
{
@Autowired
RedisUtils
redisUtils
;
@Value
(
"${cti.user.name}"
)
private
String
ctiUserName
;
@Value
(
"${cti.user.pwd}"
)
private
String
ctiUserPwd
;
/**
* saveUserRedis设置过期时间
*/
@Value
(
"${redis.cache.failure.time}"
)
private
Long
redisRegionTimeSecond
;
@Override
public
List
<
String
>
getUserRegionCode
()
{
...
...
@@ -154,4 +139,86 @@ public class TzsAuthServiceImpl implements TzsAuthService {
}
}
private
void
loginCtiUser
()
{
String
passwd
=
DesUtil
.
encode
(
ctiUserPwd
,
"qaz"
);
IdPasswordAuthModel
loninData
=
new
IdPasswordAuthModel
();
loninData
.
setLoginId
(
ctiUserName
);
loninData
.
setPassword
(
passwd
);
FeignClientResult
loginResult
=
Privilege
.
authClient
.
idpassword
(
loninData
);
if
(
loginResult
.
getStatus
()
==
200
)
{
HashMap
resultMap
=
(
HashMap
)
loginResult
.
getResult
();
redisUtils
.
set
(
RedisKey
.
CTI_USER_TOKEN
,
resultMap
.
get
(
"token"
).
toString
(),
redisRegionTimeSecond
);
}
}
public
void
setRequestContext
()
{
// 需要登录后台账号
RequestContext
.
setAppKey
(
"AMOS_STUDIO"
);
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
CTI_USER_TOKEN
))
{
// 验证token
boolean
validToken
=
TokenOperation
.
refresh
(
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
());
if
(!
validToken
)
{
// 登陆
this
.
loginCtiUser
();
}
}
else
{
// 登陆
this
.
loginCtiUser
();
}
String
ctiToken
=
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
();
RequestContext
.
setToken
(
ctiToken
);
try
{
FeignClientResult
<
AgencyUserModel
>
agencyUserModel
=
Privilege
.
agencyUserClient
.
queryByUserName
(
ctiUserName
);
AgencyUserModel
userModel
=
agencyUserModel
.
getResult
();
RequestContext
.
setExeUserId
(
userModel
.
getUserId
());
if
(
userModel
==
null
)
{
throw
new
Exception
(
"无法获取用户信息"
);
}
saveUserRedis
(
userModel
,
ctiToken
);
}
catch
(
Exception
e
)
{
//删除失效token缓存
throw
new
RuntimeException
(
e
.
getMessage
());
}
}
private
void
saveUserRedis
(
AgencyUserModel
user
,
String
token
)
{
String
authToken
=
RedisKey
.
buildReginKey
(
user
.
getUserId
(),
token
);
if
(
redisUtils
.
hasKey
(
authToken
))
{
return
;
}
CompanyBo
company
=
new
CompanyBo
();
DepartmentBo
department
=
new
DepartmentBo
();
RoleBo
role
=
new
RoleBo
();
CompanyModel
companyM
=
user
.
getCompanys
()
!=
null
?
user
.
getCompanys
().
get
(
0
)
:
null
;
Bean
.
copyExistPropertis
(
companyM
,
company
);
Map
<
Long
,
List
<
DepartmentModel
>>
mapDepartments
=
user
.
getCompanyDepartments
();
DepartmentModel
departmentM
=
companyM
!=
null
?
mapDepartments
.
get
(
companyM
.
getSequenceNbr
()).
get
(
0
)
:
null
;
Bean
.
copyExistPropertis
(
departmentM
,
department
);
Map
<
Long
,
List
<
RoleModel
>>
roles
=
user
.
getOrgRoles
();
Long
sequenceNbr
;
if
(
departmentM
==
null
)
{
sequenceNbr
=
null
;
}
else
{
sequenceNbr
=
departmentM
.
getSequenceNbr
();
}
RoleModel
roleM
=
null
;
if
(
sequenceNbr
==
null
)
{
roleM
=
companyM
!=
null
?
roles
.
get
(
companyM
.
getSequenceNbr
()).
get
(
0
)
:
null
;
}
else
{
roleM
=
roles
.
get
(
sequenceNbr
).
get
(
0
);
}
Bean
.
copyExistPropertis
(
roleM
,
role
);
ReginParams
reginParams
=
new
ReginParams
();
reginParams
.
setCompany
(
company
);
reginParams
.
setRole
(
role
);
reginParams
.
setDepartment
(
department
);
reginParams
.
setUserModel
(
user
);
redisUtils
.
set
(
authToken
,
JSONObject
.
toJSONString
(
reginParams
),
redisRegionTimeSecond
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/VoiceRecordLogServiceImpl.java
View file @
4548321e
...
...
@@ -73,22 +73,13 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
@Autowired
private
VoiceRecordFileServiceImpl
voiceRecordFileServiceImpl
;
@Autowired
private
TzsAuthServiceImpl
tzsAuthServiceImpl
;
@Scheduled
(
fixedDelay
=
ONE_Minute
)
public
void
fixedDelayJob
(){
// 需要登录后台账号
RequestContext
.
setAppKey
(
"AMOS_STUDIO"
);
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
CTI_USER_TOKEN
))
{
// 验证token
boolean
validToken
=
TokenOperation
.
refresh
(
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
());
if
(!
validToken
)
{
// 登陆
loginCtiUser
();
}
}
else
{
// 登陆
loginCtiUser
();
}
String
ctiToken
=
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
();
RequestContext
.
setToken
(
ctiToken
);
// 设置token
tzsAuthServiceImpl
.
setRequestContext
();
// 首先查找未完成 且失败次数少于5 的 记录
List
<
VoiceRecordLog
>
logList
=
this
.
list
(
new
LambdaQueryWrapper
<
VoiceRecordLog
>().
eq
(
VoiceRecordLog:
:
getIsDeal
,
false
).
lt
(
VoiceRecordLog:
:
getDealTimes
,
5
));
if
(
logList
!=
null
&&
logList
.
size
()
>
0
)
{
...
...
@@ -176,17 +167,6 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
}
private
void
loginCtiUser
()
{
String
passwd
=
DesUtil
.
encode
(
ctiUserPwd
,
"qaz"
);
IdPasswordAuthModel
loninData
=
new
IdPasswordAuthModel
();
loninData
.
setLoginId
(
ctiUserName
);
loninData
.
setPassword
(
passwd
);
FeignClientResult
loginResult
=
Privilege
.
authClient
.
idpassword
(
loninData
);
if
(
loginResult
.
getStatus
()
==
200
)
{
HashMap
resultMap
=
(
HashMap
)
loginResult
.
getResult
();
redisUtils
.
set
(
RedisKey
.
CTI_USER_TOKEN
,
resultMap
.
get
(
"token"
).
toString
(),
25920000
l
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
View file @
4548321e
...
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -237,4 +239,36 @@ public class BeanDtoVoUtils {
}
});
}
/**
* 将企业注册实体类转换为Vo
*
* @param page 原分页对象
* @return 转换后的分页对象
*/
public
static
IPage
<
UnitInfoDto
>
unitInfoIPageDto
(
IPage
<
UnitInfo
>
page
)
{
return
page
.
convert
(
item
->
{
try
{
UnitInfoDto
target
=
new
UnitInfoDto
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
item
,
target
);
if
(
item
.
getIsChange
())
{
target
.
setTypeStr
(
"变更"
);
}
else
{
target
.
setTypeStr
(
"注册"
);
}
if
(
0
==
item
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批中"
);
}
else
if
(
1
==
item
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批结束"
);
}
else
if
(
2
==
item
.
getUnitStatus
())
{
target
.
setStatusStr
(
"已驳回"
);
}
return
target
;
}
catch
(
Exception
e
)
{
return
null
;
}
});
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/UnitInfoApproveController.java
View file @
4548321e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoApproveServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -66,19 +73,6 @@ public class UnitInfoApproveController extends BaseController {
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除企业信息审批意见表"
,
notes
=
"根据sequenceNbr删除企业信息审批意见表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoApproveServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
...
...
@@ -109,15 +103,6 @@ public class UnitInfoApproveController extends BaseController {
return
ResponseHelper
.
buildResponse
(
unitInfoApproveServiceImpl
.
queryForFlcUnitInfoApprovePage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息审批意见表列表全部数据查询"
,
notes
=
"企业信息审批意见表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
UnitInfoApproveDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
unitInfoApproveServiceImpl
.
queryForFlcUnitInfoApproveList
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/UnitInfoController.java
View file @
4548321e
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/UnitInfoServiceImpl.java
View file @
4548321e
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/src/main/resources/application-dev.properties
View file @
4548321e
...
...
@@ -75,4 +75,6 @@ mqtt.topic.cti.push=/cti/record
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
\ No newline at end of file
cti.user.pwd
=
a1234567
flc.sms.tempCode
=
SMS_TZS_0001
\ No newline at end of file
amos-boot-system-tzs/src/main/resources/application-qa.properties
View file @
4548321e
...
...
@@ -81,3 +81,5 @@ mqtt.topic.cti.push=/cti/record
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
flc.sms.tempCode
=
SMS_TZS_0001
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