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
16185060
Commit
16185060
authored
Apr 03, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl
parents
c252f347
bf162e3a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
293 additions
and
13 deletions
+293
-13
OrgUserVO.java
...om/yeejoin/amos/boot/module/common/api/dto/OrgUserVO.java
+65
-0
OrgUsrTPDlExcelDto.java
...n/amos/boot/module/common/api/dto/OrgUsrTPDlExcelDto.java
+0
-0
UserVO.java
...a/com/yeejoin/amos/boot/module/common/api/dto/UserVO.java
+56
-0
PrivilegeFeignClient.java
...os/boot/module/common/api/feign/PrivilegeFeignClient.java
+39
-0
ExcelEnums.java
...om/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
+1
-0
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+60
-6
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+23
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+0
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+1
-1
application-dev.properties
...-system-jcs/src/main/resources/application-dev.properties
+11
-6
userData.json
amos-boot-system-jcs/src/main/resources/json/userData.json
+37
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/OrgUserVO.java
0 → 100644
View file @
16185060
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
*
*
* 请求参数类
*
*/
@Data
@ApiModel
(
value
=
"请求参数类"
,
description
=
"人员请求参数类"
)
public
class
OrgUserVO
{
@ApiModelProperty
(
value
=
"关联应用appkey"
)
private
List
<
String
>
appCodes
;
@ApiModelProperty
(
value
=
"平台单位id"
)
private
String
companySeqs
;
@ApiModelProperty
(
value
=
"平台部门id"
)
private
String
deptSeqs
;
@ApiModelProperty
(
value
=
"邮箱"
)
private
String
email
;
@ApiModelProperty
(
value
=
"固话号码"
)
private
String
landlinePhone
;
@ApiModelProperty
(
value
=
"是否启用"
)
private
String
lockStatus
;
@ApiModelProperty
(
value
=
"手机号码"
)
private
String
mobile
;
@ApiModelProperty
(
value
=
"组装参数"
)
private
Map
<
String
,
List
<
String
>>
orgRoleSeqs
;
@ApiModelProperty
(
value
=
"密码"
)
private
String
password
;
@ApiModelProperty
(
value
=
"二次密码"
)
private
String
rePassword
;
@ApiModelProperty
(
value
=
"姓名"
)
private
String
realName
;
@ApiModelProperty
(
value
=
"角色权限"
)
private
List
<
String
>
roleSeqs
;
@ApiModelProperty
(
value
=
"用户名"
)
private
String
userName
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/OrgUsrTPDlExcelDto.java
0 → 100644
View file @
16185060
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/UserVO.java
0 → 100644
View file @
16185060
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构/部门/人员表
*
* @author tb
* @date 2021-06-18
*/
@Data
@ApiModel
(
value
=
"UserVO"
,
description
=
"平台信息"
)
public
class
UserVO
{
/*************************平台***********************/
@ExcelIgnore
@ApiModelProperty
(
value
=
"关联应用appkey"
)
private
List
<
String
>
appCodes
;
@ApiModelProperty
(
value
=
"角色权限"
)
private
List
<
String
>
roleSeqs
;
@ApiModelProperty
(
value
=
"平台权限组id"
)
private
String
group
;
@ApiModelProperty
(
value
=
"类型"
)
private
String
type
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/PrivilegeFeignClient.java
0 → 100644
View file @
16185060
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUserVO
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.GroupUserModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @description:
* @author: tw
* @createDate: 2023/3/29
*/
@FeignClient
(
name
=
"${privilege.fegin.name:AMOS-API-PRIVILEGE}"
,
path
=
""
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
PrivilegeFeignClient
{
@RequestMapping
(
value
=
"/privilege/v1/agencyuser"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Object
>
create
(
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
,
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
OrgUserVO
var1
);
@RequestMapping
(
value
=
"/privilege/v1/groupUser"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Object
>
groupUser
(
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
,
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"groupSeq"
)
Long
groupSeq
,
@RequestBody
List
<
String
>
var2
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
View file @
16185060
...
...
@@ -21,6 +21,7 @@ public enum ExcelEnums {
CLZQ
(
"车辆执勤"
,
"车辆执勤"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyCarExcelDto"
,
"CLZQ"
),
//("CLZQ","车辆执勤")
JCDWRY
(
"单位人员"
,
"单位人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto"
,
"JCDWRY"
),
//("JCDW","机场单位")
DLDWRY
(
"单位人员"
,
"单位人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDlExcelDto"
,
"DLDWRY"
),
//("JCDW","机场单位")
JCDWRYTP
(
"单位人员同步平台"
,
"单位人员同步平台"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrTPDlExcelDto"
,
"JCDWRYTP"
),
//("JCDW","机场单位")
LDDW
(
"联动单位"
,
"联动单位"
,
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
,
"LDDW"
),
//("JCDW","机场单位")
RYZB
(
"人员值班"
,
"人员值班"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto"
,
"RYZB"
),
//("RYZB","人员值班")
// BUG 2455 相关代码 bykongfm
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
16185060
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.boot.module.common.api.enums.ExceptionEnum
;
...
...
@@ -58,11 +59,15 @@ public class ExcelController extends BaseController {
@Autowired
Sequence
sequence
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Value
(
"${logic}"
)
private
Boolean
logic
;
private
static
String
JCDWRY
=
"JCDWRY"
;
private
static
String
DLDWRY
=
"DLDWRY"
;
//同步机场单位
private
static
String
JCDWRYTP
=
"JCDWRYTP"
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取上传excle文件是否成功"
)
...
...
@@ -108,7 +113,7 @@ public class ExcelController extends BaseController {
@ApiOperation
(
value
=
"导出公用类"
)
@GetMapping
(
"/export/{type}"
)
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
@RequestParam
Map
<
String
,
Object
>
par
)
{
try
{
if
(
type
.
equals
(
JCDWRY
)
&&
logic
!=
null
&&!
logic
){
type
=
DLDWRY
;
...
...
@@ -127,7 +132,7 @@ public class ExcelController extends BaseController {
@ApiOperation
(
value
=
"导入公用"
)
@PostMapping
(
"/upload/{type}"
)
public
ResponseModel
<
Object
>
upload
(
@RequestPart
(
"file"
)
MultipartFile
multipartFile
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
@PathVariable
(
value
=
"type"
)
String
type
,
HttpServletRequest
equest
)
{
try
{
long
uuid
=
sequence
.
nextId
();
String
uuidString
=
Long
.
toString
(
uuid
);
...
...
@@ -138,7 +143,7 @@ public class ExcelController extends BaseController {
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
uuidString
);
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
uuidString
,
equest
);
return
ResponseHelper
.
buildResponse
(
uuidString
);
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
...
...
@@ -214,4 +219,53 @@ public class ExcelController extends BaseController {
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
());
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取导入接口"
)
@GetMapping
(
value
=
"/getexport/{key}"
)
public
ResponseModel
<
Object
>
getexport
(
@PathVariable
(
value
=
"key"
)
String
key
)
{
Object
ob
=
redisUtils
.
get
(
key
);
return
ResponseHelper
.
buildResponse
(
ob
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导入公用"
)
@PostMapping
(
"/uploadNew"
)
public
ResponseModel
<
Object
>
uploadNew
(
@RequestPart
(
"file"
)
MultipartFile
multipartFile
,
HttpServletRequest
equest
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
JCDWRYTP
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
Object
ob
=
excelService
.
commonUpload
(
multipartFile
,
excelDto
,
null
,
equest
);
return
ResponseHelper
.
buildResponse
(
ob
);
}
catch
(
RuntimeException
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
e
.
getMessage
());
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"文件格式不正确或excel 模板不匹配!"
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"下载模板"
)
@GetMapping
(
"/downloadnew/template"
)
public
void
downloadnew
(
HttpServletResponse
response
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
JCDWRYTP
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
templateExport
(
response
,
excelDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
());
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
16185060
...
...
@@ -32,6 +32,8 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
net.sf.cglib.beans.BeanMap
;
...
...
@@ -206,12 +208,33 @@ public class DataSourcesImpl implements DataSources {
case
"getListByEquipmentCode"
:
str
=
getListByEquipmentCode
();
break
;
case
"getdeptSeqsList"
:
str
=
getdeptSeqsList
();
break
;
}
}
return
str
;
}
private
String
[]
getdeptSeqsList
()
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
Long
sequenceNbr
=
reginParams
.
getCompany
().
getSequenceNbr
();
FeignClientResult
<
Collection
<
DepartmentModel
>>
date
=
Privilege
.
departmentClient
.
queryDeptTree
(
null
,
sequenceNbr
);
Collection
<
DepartmentModel
>
depts
=
date
.
getResult
();
List
<
String
>
carNameList
=
Lists
.
newArrayList
();
depts
.
forEach
(
dept
->
{
carNameList
.
add
(
dept
.
getDepartmentName
()
+
"@"
+
dept
.
getSequenceNbr
());
});
String
[]
str
=
carNameList
.
toArray
(
new
String
[
carNameList
.
size
()]);
return
str
;
}
private
String
[]
getCarList
()
{
ResponseModel
<
Object
>
response
=
equipFeignClient
.
getFireCarListAll
();
List
<
Map
<
String
,
Object
>>
carList
=
(
List
<
Map
<
String
,
Object
>>)
response
.
getResult
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
16185060
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
16185060
...
...
@@ -3904,7 +3904,7 @@
<select
id=
"selectAlarmList"
resultType=
"java.util.Map"
>
select
a1.*,
(a1.num - a1.alarm_equip_num) as normalEquipNum,
ABS
(a1.num - a1.alarm_equip_num) as normalEquipNum,
concat(FORMAT( (abs( ( (a1.num - a1.alarm_equip_num) / IF ( a1.num = 0, 1, a1.num ) ) ) * 100
),2), '%') as normalEquipPercent,
...
...
amos-boot-system-jcs/src/main/resources/application-dev.properties
View file @
16185060
## DB properties:
spring.datasource.url
=
jdbc:mysql://172.16.1
0.215
:3306/dl_amos_common_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://172.16.1
1.201
:3306/dl_amos_common_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
## eureka properties:
eureka.client.serviceUrl.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@172.16.1
0.215
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@172.16.1
1.201
:10001/eureka/
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
## redis properties:danger/list
spring.redis.database
=
1
spring.redis.host
=
172.16.1
0.215
spring.redis.host
=
172.16.1
1.201
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
## ES properties:
biz.elasticsearch.address
=
172.16.1
0.215
biz.elasticsearch.address
=
172.16.1
1.201
spring.data.elasticsearch.cluster-name
=
elasticsearch
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris
=
http://${biz.elasticsearch.address}:9200
...
...
@@ -28,7 +28,7 @@ elasticsearch.password= Yeejoin@2020
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.1
0.215
:1883
emqx.broker
=
tcp://172.16.1
1.201
:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
@@ -42,9 +42,13 @@ rule.definition.default-agency=jcs
#spring.data.mongodb.uri=mongodb://172.16.6.60:27017/command_db
## file properties:
file.url
=
http://
39.98.45.134
:9000/
file.url
=
http://
172.16.11.201
:9000/
video.url
=
https://11.11.16.4:443/
ifc.url
=
http://11.11.16.17/IFCInterface
ifc.call-back.localIp
=
11.11.16.1
#ƽ̨Ӧ
privilege.fegin.name
=
AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout
=
20000
feign.client.config.default.read-timeout
=
20000
\ No newline at end of file
amos-boot-system-jcs/src/main/resources/json/userData.json
0 → 100644
View file @
16185060
[
{
"type"
:
"管理员"
,
"group"
:
"1476527581793099777"
,
"roleSeqs"
:
[
"1242292537276882946"
,
"1262313307763683330"
,
"1262313395743404033"
,
"1232939411144667138"
],
"appCodes"
:
[
"studio_normalapp_3056965"
,
"studio_normalapp_3532826"
,
"studio_normalapp_3143547"
,
"AMOS_STUDIO"
,
"AMOS_ADMIN"
]
},
{
"type"
:
"非管理员"
,
"group"
:
"1476527581793099777"
,
"roleSeqs"
:
[
"1242292537276882946"
,
"1262313307763683330"
,
"1262313395743404033"
,
"1232939411144667138"
],
"appCodes"
:
[
"studio_normalapp_3056965"
,
"studio_normalapp_3532826"
,
"studio_normalapp_3143547"
,
"AMOS_STUDIO"
,
"AMOS_ADMIN"
]
}
]
\ 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