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
b97b703f
Commit
b97b703f
authored
Dec 06, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机场人员 导出 导入 下载模板 部门级用户可查看本单位人员
parent
c55931b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
6 deletions
+65
-6
OrgUsrDlExcelDto.java
...oin/amos/boot/module/common/api/dto/OrgUsrDlExcelDto.java
+0
-0
ExcelEnums.java
...om/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
+1
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+13
-1
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+13
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+34
-3
application.properties
...boot-system-jcs/src/main/resources/application.properties
+4
-2
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/OrgUsrDlExcelDto.java
0 → 100644
View file @
b97b703f
This diff is collapsed.
Click to expand it.
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 @
b97b703f
...
...
@@ -20,6 +20,7 @@ public enum ExcelEnums {
KEYSITE
(
"重点部位"
,
"重点部位"
,
"com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto"
,
"KEYSITE"
),
//{"KEYSITE":}
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","机场单位")
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-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
b97b703f
...
...
@@ -80,6 +80,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
private
static
final
String
COMPANY_FIELD_CODE
=
"companyLocation,longitude,latitude"
;
private
static
final
String
COMPANY_VALUE
=
"COMPANY"
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Autowired
DynamicFormInstanceServiceImpl
alertFormValueServiceImpl
;
@Autowired
...
...
@@ -2859,9 +2862,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
List
<
OrgMenuDto
>
companyTreeByUserNumber
(
ReginParams
reginParams
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
// 权限处理
if
(!
logic
){
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
reginParams
.
getPersonIdentity
().
getCompanyId
());
//判断登陆人是否已经是顶级节点单位
if
(!
ObjectUtils
.
isEmpty
(
orgUsr
)
&&
orgUsr
.
getParentId
()
!=
null
)
{
orgUsr
=
this
.
selectParentOrgUsr
(
orgUsr
);
bizOrgCode
=
orgUsr
.
getBizOrgCode
()
!=
null
?
orgUsr
.
getBizOrgCode
():
bizOrgCode
;
}
}
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
param
.
put
(
"bizOrgCode"
,
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
);
param
.
put
(
"bizOrgCode"
,
bizOrgCode
);
List
<
OrgUsr
>
list
=
orgUsrMapper
.
companyDeptListWithPersonCount
(
param
);
return
buildTreeParallel
(
list
);
}
...
...
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 @
b97b703f
...
...
@@ -5,6 +5,7 @@ import java.util.Map;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -55,6 +56,9 @@ public class ExcelController extends BaseController {
@Autowired
Sequence
sequence
;
@Value
(
"${logic}"
)
Boolean
logic
;
private
static
final
String
NOT_DUTY
=
"休班"
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
...
...
@@ -74,6 +78,9 @@ public class ExcelController extends BaseController {
@GetMapping
(
"/download/template/{type}"
)
public
void
downloadTemplate
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
try
{
if
(
type
.
equals
(
"JCDWRY"
)
&&
!
logic
){
type
=
"DLDWRY"
;
}
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
...
...
@@ -100,6 +107,9 @@ public class ExcelController extends BaseController {
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
try
{
if
(
type
.
equals
(
"JCDWRY"
)
&&
!
logic
){
type
=
"DLDWRY"
;
}
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
...
...
@@ -119,6 +129,9 @@ public class ExcelController extends BaseController {
long
uuid
=
sequence
.
nextId
();
String
uuidString
=
Long
.
toString
(
uuid
);
redisUtils
.
set
(
uuidString
,
0
);
if
(
type
.
equals
(
"JCDWRY"
)
&&
!
logic
){
type
=
"DLDWRY"
;
}
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
...
...
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 @
b97b703f
...
...
@@ -30,6 +30,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -192,6 +193,9 @@ public class ExcelServiceImpl {
@Autowired
private
OrgUsrMapper
orgUsrMapper
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Autowired
SignServiceImpl
signServiceImpl
;
...
...
@@ -391,6 +395,19 @@ public class ExcelServiceImpl {
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
orgUsrList
,
OrgUsrExcelDto
.
class
,
null
,
false
);
break
;
case
"DLDWRY"
:
if
(!
authFlag
)
{
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
null
,
OrgUsrDlExcelDto
.
class
,
null
,
false
);
break
;
}
List
<
OrgUsrExcelDto
>
orgUsrDlList
=
orgUsrService
.
exportToExcel
(
par
);
String
content
=
JSONObject
.
toJSONString
(
orgUsrDlList
);
List
<
OrgUsrDlExcelDto
>
dtoList
=
JSONObject
.
parseArray
(
content
,
OrgUsrDlExcelDto
.
class
);
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
dtoList
,
OrgUsrDlExcelDto
.
class
,
null
,
false
);
break
;
case
"LDDW"
:
List
<
LinkageUnitDto
>
LinkageUnitDtoList
=
null
;
String
inAgreement
=
par
.
containsKey
(
"inAgreement"
)&&!(
par
.
get
(
"inAgreement"
).
toString
()).
equals
(
"null"
)?
par
.
get
(
"inAgreement"
).
toString
():
""
;
...
...
@@ -489,6 +506,7 @@ public class ExcelServiceImpl {
excelImportKeySite
(
multipartFile
);
break
;
case
"JCDWRY"
:
case
"DLDWRY"
:
// excelImportOrgUsrExcelDto(multipartFile);
excelImportOrgUsrExcelDtoNew
(
multipartFile
);
break
;
...
...
@@ -755,7 +773,20 @@ public class ExcelServiceImpl {
}
private
void
excelImportOrgUsrExcelDtoNew
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
OrgUsrExcelDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
OrgUsrExcelDto
.
class
,
1
);
List
<
OrgUsrExcelDto
>
excelDtoList
=
new
ArrayList
<>();
if
(!
logic
){
List
<
OrgUsrDlExcelDto
>
list
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
OrgUsrDlExcelDto
.
class
,
1
);
if
(
list
.
size
()
>
0
)
{
String
s
=
JSONObject
.
toJSONString
(
list
);
List
<
OrgUsrExcelDto
>
list1
=
JSONObject
.
parseArray
(
s
,
OrgUsrExcelDto
.
class
);
excelDtoList
.
addAll
(
list1
);
}
}
else
{
List
<
OrgUsrExcelDto
>
list
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
OrgUsrExcelDto
.
class
,
1
);
if
(
list
.
size
()
>
0
){
excelDtoList
.
addAll
(
list
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
excelDtoList
))
{
Set
<
String
>
set
=
new
HashSet
<>();
Set
<
String
>
set1
=
new
HashSet
<>();
...
...
@@ -811,7 +842,7 @@ public class ExcelServiceImpl {
dynamicFormValue
.
forEach
(
dynamicFormInstanceDto
->
{
String
key
=
dynamicFormInstanceDto
.
getFieldCode
();
if
(
map1
.
containsKey
(
key
)){
if
(
map1
.
containsKey
(
key
)
&&
!
ObjectUtils
.
isEmpty
(
map1
.
get
(
key
))
){
String
value
=
map1
.
get
(
key
).
toString
();
if
(
value
.
contains
(
"@"
))
{
String
[]
certificates
=
value
.
split
(
"@"
);
...
...
@@ -839,7 +870,7 @@ public class ExcelServiceImpl {
DynamicFormInstance
dynamicFormInstance
=
new
DynamicFormInstance
();
BeanUtils
.
copyProperties
(
dynamicFormInstanceDto
,
dynamicFormInstance
);
String
fieldCode
=
dynamicFormInstance
.
getFieldCode
();
if
(
map1
.
containsKey
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
))){
if
(
map1
.
containsKey
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
))
&&
map1
.
get
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
))
!=
null
){
dynamicFormInstance
.
setFieldValueLabel
(
map1
.
get
(
fieldCode
.
substring
(
0
,
fieldCode
.
length
()-
4
)).
toString
());
}
if
(
"gender"
.
equals
(
dynamicFormInstance
.
getFieldCode
())
&&
!
ObjectUtils
.
isEmpty
(
dynamicFormInstance
.
getFieldValue
())){
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
b97b703f
...
...
@@ -136,4 +136,7 @@ mqtt.topic.command.car.jw=carCoordinates
management.security.enabled
=
true
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
\ No newline at end of file
spring.security.user.password
=
a1234560
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
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