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
effb3b94
Commit
effb3b94
authored
Jun 30, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://39.100.92.250:5000/moa/amos-boot-biz
into develop_tzs_register
parents
6f74f827
39bd6f44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
227 additions
and
41 deletions
+227
-41
JgChangeRegistrationNameController.java
...jg/biz/controller/JgChangeRegistrationNameController.java
+2
-1
JgChangeRegistrationReformController.java
.../biz/controller/JgChangeRegistrationReformController.java
+5
-2
JgTableDataExportController.java
...module/jg/biz/controller/JgTableDataExportController.java
+3
-3
JczsServiceFeignClient.java
...amos/boot/module/jg/biz/feign/JczsServiceFeignClient.java
+1
-1
TcmServiceFeignClient.java
.../amos/boot/module/jg/biz/feign/TcmServiceFeignClient.java
+2
-2
IJgTableDataExportService.java
...boot/module/jg/biz/service/IJgTableDataExportService.java
+3
-3
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+39
-1
JgTableDataExportServiceImpl.java
...ule/jg/biz/service/impl/JgTableDataExportServiceImpl.java
+5
-5
AdvanceSearchEnum.java
...s/boot/module/statistics/api/enums/AdvanceSearchEnum.java
+3
-2
UnitTypeEnum.java
...n/amos/boot/module/statistics/api/enums/UnitTypeEnum.java
+14
-0
ComprehensiveStatisticalAnalysisController.java
...ontroller/ComprehensiveStatisticalAnalysisController.java
+70
-4
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+0
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+1
-1
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+79
-16
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationNameController.java
View file @
effb3b94
...
@@ -162,7 +162,8 @@ public class JgChangeRegistrationNameController extends BaseController {
...
@@ -162,7 +162,8 @@ public class JgChangeRegistrationNameController extends BaseController {
dto
.
setUseUnitCreditCode
(
getSelectedOrgInfo
().
getCompany
().
getCompanyCode
());
dto
.
setUseUnitCreditCode
(
getSelectedOrgInfo
().
getCompany
().
getCompanyCode
());
}
}
}
}
dto
.
setCertificateStatus
(
"已登记"
);
// 错误注使用销业务导出后续业务无法做,故放开限制 @2025-06-27
// dto.setCertificateStatus("已登记");
dto
.
setIsDoBusiness
(
"1"
);
dto
.
setIsDoBusiness
(
"1"
);
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationNameService
.
getTableData
(
dto
));
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationNameService
.
getTableData
(
dto
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationReformController.java
View file @
effb3b94
...
@@ -203,8 +203,11 @@ public class JgChangeRegistrationReformController extends BaseController {
...
@@ -203,8 +203,11 @@ public class JgChangeRegistrationReformController extends BaseController {
if
(!
ObjectUtils
.
isEmpty
(
transferType
))
{
if
(!
ObjectUtils
.
isEmpty
(
transferType
))
{
dto
.
setIsScrap
(
"0"
);
dto
.
setIsScrap
(
"0"
);
}
}
//区外移装查询已注销状态的证
// 错误注使用销业务导出后续业务无法做,故放开限制 @2025-06-27
dto
.
setCertificateStatus
(
"1"
.
equals
(
transferType
)
?
"已注销"
:
"已登记"
);
if
(!
ValidationUtil
.
isEmpty
(
transferType
)
&&
"1"
.
equals
(
transferType
))
{
//区外移装查询已注销状态的证
dto
.
setCertificateStatus
(
"已注销"
);
}
dto
.
setIsDoBusiness
(
"1"
);
//默认可以做业务
dto
.
setIsDoBusiness
(
"1"
);
//默认可以做业务
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getUseRegistrationCodeData
(
page
,
dto
));
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getUseRegistrationCodeData
(
page
,
dto
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTableDataExportController.java
View file @
effb3b94
...
@@ -263,7 +263,7 @@ public class JgTableDataExportController extends BaseController {
...
@@ -263,7 +263,7 @@ public class JgTableDataExportController extends BaseController {
@GetMapping
(
value
=
"/enterpriseInformationExport"
)
@GetMapping
(
value
=
"/enterpriseInformationExport"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"基础设置-企业信息列表数据导出"
,
notes
=
"基础设置-企业信息列表数据导出"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"基础设置-企业信息列表数据导出"
,
notes
=
"基础设置-企业信息列表数据导出"
)
public
ResponseModel
<
String
>
managePipe
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
String
ids
,
public
ResponseModel
<
String
>
managePipe
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
String
ids
,
@RequestParam
Map
<
String
,
String
>
map
)
{
@RequestParam
Map
<
String
,
Object
>
map
)
{
String
uuid
=
UUID
.
randomUUID
().
toString
();
String
uuid
=
UUID
.
randomUUID
().
toString
();
iJgTableDataExportService
.
startDownLoadMsg
(
"企业信息列表"
,
uuid
);
iJgTableDataExportService
.
startDownLoadMsg
(
"企业信息列表"
,
uuid
);
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
...
@@ -279,7 +279,7 @@ public class JgTableDataExportController extends BaseController {
...
@@ -279,7 +279,7 @@ public class JgTableDataExportController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"基础设置-企业-人员信息列表数据导出"
,
notes
=
"基础设置-企业-人员信息列表数据导出"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"基础设置-企业-人员信息列表数据导出"
,
notes
=
"基础设置-企业-人员信息列表数据导出"
)
public
ResponseModel
<
String
>
userInfoExport
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
String
ids
,
public
ResponseModel
<
String
>
userInfoExport
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
String
ids
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
Map
<
String
,
String
>
map
)
{
@RequestParam
Map
<
String
,
Object
>
map
)
{
String
uuid
=
UUID
.
randomUUID
().
toString
();
String
uuid
=
UUID
.
randomUUID
().
toString
();
iJgTableDataExportService
.
startDownLoadMsg
(
"人员信息列表"
,
uuid
);
iJgTableDataExportService
.
startDownLoadMsg
(
"人员信息列表"
,
uuid
);
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
...
@@ -294,7 +294,7 @@ public class JgTableDataExportController extends BaseController {
...
@@ -294,7 +294,7 @@ public class JgTableDataExportController extends BaseController {
@PostMapping
(
value
=
"/userInfoExportWithAdmin"
)
@PostMapping
(
value
=
"/userInfoExportWithAdmin"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"基础设置-监管单位-人员信息列表数据导出"
,
notes
=
"基础设置-监管单位-人员信息列表数据导出"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"基础设置-监管单位-人员信息列表数据导出"
,
notes
=
"基础设置-监管单位-人员信息列表数据导出"
)
public
ResponseModel
<
String
>
userInfoExportWithAdmin
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
String
ids
,
public
ResponseModel
<
String
>
userInfoExportWithAdmin
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
String
ids
,
@RequestBody
Map
<
String
,
String
>
map
)
{
@RequestBody
Map
<
String
,
Object
>
map
)
{
String
uuid
=
UUID
.
randomUUID
().
toString
();
String
uuid
=
UUID
.
randomUUID
().
toString
();
iJgTableDataExportService
.
startDownLoadMsg
(
"人员信息列表"
,
uuid
);
iJgTableDataExportService
.
startDownLoadMsg
(
"人员信息列表"
,
uuid
);
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/feign/JczsServiceFeignClient.java
View file @
effb3b94
...
@@ -21,6 +21,6 @@ public interface JczsServiceFeignClient {
...
@@ -21,6 +21,6 @@ public interface JczsServiceFeignClient {
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
(
@RequestParam
(
"current"
)
int
current
,
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
(
@RequestParam
(
"current"
)
int
current
,
@RequestParam
(
"size"
)
int
size
,
@RequestParam
(
"size"
)
int
size
,
@RequestParam
(
"keyword"
)
String
keyword
,
@RequestParam
(
"keyword"
)
String
keyword
,
@RequestParam
Map
<
String
,
String
>
map
);
@RequestParam
Map
<
String
,
Object
>
map
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/feign/TcmServiceFeignClient.java
View file @
effb3b94
...
@@ -20,13 +20,13 @@ public interface TcmServiceFeignClient {
...
@@ -20,13 +20,13 @@ public interface TcmServiceFeignClient {
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
(
@RequestParam
(
value
=
"current"
)
String
current
,
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
page
(
@RequestParam
(
value
=
"current"
)
String
current
,
@RequestParam
(
value
=
"size"
)
String
size
,
@RequestParam
(
value
=
"size"
)
String
size
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
Map
<
String
,
String
>
dto
);
@RequestParam
Map
<
String
,
Object
>
dto
);
@RequestMapping
(
value
=
"/userInfo/permission-page"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/userInfo/permission-page"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
getUserByPermission
(
@RequestParam
(
value
=
"current"
)
long
current
,
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
getUserByPermission
(
@RequestParam
(
value
=
"current"
)
long
current
,
@RequestParam
(
value
=
"size"
)
long
size
,
@RequestParam
(
value
=
"size"
)
long
size
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
required
=
false
,
defaultValue
=
"all"
)
String
type
,
@RequestParam
(
required
=
false
,
defaultValue
=
"all"
)
String
type
,
@RequestBody
Map
<
String
,
String
>
map
);
@RequestBody
Map
<
String
,
Object
>
map
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IJgTableDataExportService.java
View file @
effb3b94
...
@@ -59,9 +59,9 @@ public interface IJgTableDataExportService {
...
@@ -59,9 +59,9 @@ public interface IJgTableDataExportService {
void
unregulatedPipe
(
String
uuid
,
Map
<
String
,
String
>
params
,
String
sort
,
ReginParams
reginParams
);
void
unregulatedPipe
(
String
uuid
,
Map
<
String
,
String
>
params
,
String
sort
,
ReginParams
reginParams
);
void
enterpriseInformationExport
(
String
uuid
,
String
ids
,
Map
<
String
,
String
>
map
);
void
enterpriseInformationExport
(
String
uuid
,
String
ids
,
Map
<
String
,
Object
>
map
);
void
userInfoExport
(
String
uuid
,
String
ids
,
Map
<
String
,
String
>
map
);
void
userInfoExport
(
String
uuid
,
String
ids
,
Map
<
String
,
Object
>
map
);
void
userInfoExportWithAdmin
(
String
uuid
,
String
ids
,
Map
<
String
,
String
>
map
);
void
userInfoExportWithAdmin
(
String
uuid
,
String
ids
,
Map
<
String
,
Object
>
map
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
effb3b94
...
@@ -148,6 +148,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -148,6 +148,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
public
static
final
String
EQU_CATEGORY_CODE
=
"EQU_CATEGORY_CODE"
;
public
static
final
String
EQU_CATEGORY_CODE
=
"EQU_CATEGORY_CODE"
;
public
static
final
String
EQU_LIST_CODE
=
"EQU_LIST_CODE"
;
public
static
final
String
EQU_LIST_CODE
=
"EQU_LIST_CODE"
;
public
static
final
String
PROJECT_CONTRAPTION
=
"PROJECT_CONTRAPTION"
;
// 工程装置名称
public
static
final
String
PROJECT_CONTRAPTION
=
"PROJECT_CONTRAPTION"
;
// 工程装置名称
public
static
final
String
CREATE_DATE_RANGE
=
"CREATE_DATE_RANGE"
;
// 创建时间范围查询
public
static
final
String
CREATE_DATE
=
"CREATE_DATE"
;
// 创建时间范围查询
/**
/**
* 业务类型 0:单个新增 1:批量导入
* 业务类型 0:单个新增 1:批量导入
*/
*/
...
@@ -2397,7 +2399,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2397,7 +2399,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(
map
.
containsKey
(
"flag"
)
&&
!
map
.
containsKey
(
"USE_UNIT_CREDIT_CODE"
))
{
if
(
map
.
containsKey
(
"flag"
)
&&
!
map
.
containsKey
(
"USE_UNIT_CREDIT_CODE"
))
{
return
new
Page
<>();
return
new
Page
<>();
}
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Integer
pageNumber
=
ObjectUtils
.
isEmpty
(
map
.
getInteger
(
"number"
))
?
1
:
map
.
getInteger
(
"number"
);
Integer
pageNumber
=
ObjectUtils
.
isEmpty
(
map
.
getInteger
(
"number"
))
?
1
:
map
.
getInteger
(
"number"
);
Integer
size
=
ObjectUtils
.
isEmpty
(
map
.
getInteger
(
"size"
))
?
20
:
map
.
getInteger
(
"size"
);
Integer
size
=
ObjectUtils
.
isEmpty
(
map
.
getInteger
(
"size"
))
?
20
:
map
.
getInteger
(
"size"
);
Page
<
JSONObject
>
result
=
new
Page
<>(
pageNumber
,
size
);
Page
<
JSONObject
>
result
=
new
Page
<>(
pageNumber
,
size
);
...
@@ -2769,6 +2771,37 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2769,6 +2771,37 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
map
.
getString
(
"ORG_BRANCH_CODE"
))
+
"*"
));
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
map
.
getString
(
"ORG_BRANCH_CODE"
))
+
"*"
));
}
}
}
}
// 创建时间范围查询
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
CREATE_DATE_RANGE
)))
{
String
createDateRangeObj
=
map
.
getString
(
CREATE_DATE_RANGE
);
String
[]
split
=
createDateRangeObj
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
split
(
","
);
String
startDateStr
=
split
[
0
];
String
endDateStr
=
split
[
1
];
try
{
Date
startDate
=
sdf
.
parse
(
startDateStr
);
Date
endDate
=
sdf
.
parse
(
endDateStr
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
endDate
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
calendar
.
set
(
Calendar
.
MINUTE
,
59
);
calendar
.
set
(
Calendar
.
SECOND
,
59
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
999
);
endDate
=
calendar
.
getTime
();
long
startDateMillis
=
startDate
.
getTime
();
long
endDateMillis
=
endDate
.
getTime
();
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
pBuilder
.
must
(
QueryBuilders
.
rangeQuery
(
"CREATE_DATE"
)
.
gte
(
startDateMillis
)
// 大于等于开始日期的时间戳
.
lte
(
endDateMillis
)
// 小于等于结束日期的时间戳
);
boolMust
.
must
(
pBuilder
);
}
catch
(
Exception
e
)
{
log
.
error
(
"日期转化异常:{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
}
// 字段排序
// 字段排序
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"sort"
))){
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"sort"
))){
String
[]
sorts
=
Objects
.
toString
(
map
.
get
(
"sort"
)).
split
(
","
);
String
[]
sorts
=
Objects
.
toString
(
map
.
get
(
"sort"
)).
split
(
","
);
...
@@ -2860,6 +2893,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2860,6 +2893,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
item
.
put
(
"REC_DATE"
,
Instant
.
ofEpochMilli
(
Long
.
parseLong
(
item
.
getString
(
"REC_DATE"
)))
item
.
put
(
"REC_DATE"
,
Instant
.
ofEpochMilli
(
Long
.
parseLong
(
item
.
getString
(
"REC_DATE"
)))
.
atZone
(
ZoneId
.
systemDefault
())
.
atZone
(
ZoneId
.
systemDefault
())
.
toLocalDate
());
.
toLocalDate
());
if
(!
ValidationUtil
.
isEmpty
(
item
.
getString
(
CREATE_DATE
))){
item
.
put
(
CREATE_DATE
,
Instant
.
ofEpochMilli
(
Long
.
parseLong
(
item
.
getString
(
CREATE_DATE
)))
.
atZone
(
ZoneId
.
systemDefault
())
.
toLocalDate
());
}
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
SEQUENCE_NBR
));
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
SEQUENCE_NBR
));
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
item
.
put
(
"CAN_EDIT"
,
this
.
checkEquipIsCanEdit
(
item
.
getString
(
SEQUENCE_NBR
)));
item
.
put
(
"CAN_EDIT"
,
this
.
checkEquipIsCanEdit
(
item
.
getString
(
SEQUENCE_NBR
)));
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgTableDataExportServiceImpl.java
View file @
effb3b94
...
@@ -757,7 +757,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
...
@@ -757,7 +757,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
}
}
private
List
<
String
>
getEnterSeqs
(
String
ids
,
Map
<
String
,
String
>
map
)
{
private
List
<
String
>
getEnterSeqs
(
String
ids
,
Map
<
String
,
Object
>
map
)
{
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
List
<
String
>
idsList
=
new
ArrayList
<>();
List
<
String
>
idsList
=
new
ArrayList
<>();
if
(
StringUtils
.
isEmpty
(
ids
))
{
if
(
StringUtils
.
isEmpty
(
ids
))
{
...
@@ -803,7 +803,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
...
@@ -803,7 +803,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
* @param ids
* @param ids
*/
*/
@Override
@Override
public
void
enterpriseInformationExport
(
String
uuid
,
String
ids
,
Map
<
String
,
String
>
map
)
{
public
void
enterpriseInformationExport
(
String
uuid
,
String
ids
,
Map
<
String
,
Object
>
map
)
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
List
<
String
>
enterSeqs
=
getEnterSeqs
(
ids
,
map
);
List
<
String
>
enterSeqs
=
getEnterSeqs
(
ids
,
map
);
List
<
Map
<
String
,
String
>>
enterInfoWithExport
=
tzBaseEnterpriseInfoMapper
.
getEnterInfoWithExport
(
enterSeqs
);
List
<
Map
<
String
,
String
>>
enterInfoWithExport
=
tzBaseEnterpriseInfoMapper
.
getEnterInfoWithExport
(
enterSeqs
);
...
@@ -835,7 +835,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
...
@@ -835,7 +835,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
}
}
private
List
<
String
>
getUserInfoSeqs
(
boolean
isAdmin
,
String
ids
,
Map
<
String
,
String
>
map
)
{
private
List
<
String
>
getUserInfoSeqs
(
boolean
isAdmin
,
String
ids
,
Map
<
String
,
Object
>
map
)
{
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
List
<
String
>
idsList
=
new
ArrayList
<>();
List
<
String
>
idsList
=
new
ArrayList
<>();
if
(
StringUtils
.
isEmpty
(
ids
))
{
if
(
StringUtils
.
isEmpty
(
ids
))
{
...
@@ -881,7 +881,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
...
@@ -881,7 +881,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
@Override
@Override
public
void
userInfoExport
(
String
uuid
,
String
ids
,
Map
<
String
,
String
>
map
)
{
public
void
userInfoExport
(
String
uuid
,
String
ids
,
Map
<
String
,
Object
>
map
)
{
List
<
String
>
userInfoSeqs
=
getUserInfoSeqs
(
false
,
ids
,
map
);
List
<
String
>
userInfoSeqs
=
getUserInfoSeqs
(
false
,
ids
,
map
);
List
<
Map
<
String
,
String
>>
enterInfoWithExport
=
tzsUserInfoMapper
.
getUserInfoWithExport
(
userInfoSeqs
);
List
<
Map
<
String
,
String
>>
enterInfoWithExport
=
tzsUserInfoMapper
.
getUserInfoWithExport
(
userInfoSeqs
);
List
<
UserInfoVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
enterInfoWithExport
),
UserInfoVo
.
class
);
List
<
UserInfoVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
enterInfoWithExport
),
UserInfoVo
.
class
);
...
@@ -897,7 +897,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
...
@@ -897,7 +897,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
}
}
@Override
@Override
public
void
userInfoExportWithAdmin
(
String
uuid
,
String
ids
,
Map
<
String
,
String
>
map
)
{
public
void
userInfoExportWithAdmin
(
String
uuid
,
String
ids
,
Map
<
String
,
Object
>
map
)
{
List
<
String
>
userInfoSeqs
=
getUserInfoSeqs
(
true
,
ids
,
map
);
List
<
String
>
userInfoSeqs
=
getUserInfoSeqs
(
true
,
ids
,
map
);
List
<
Map
<
String
,
String
>>
enterInfoWithExport
=
tzsUserInfoMapper
.
getUserInfoWithExport
(
userInfoSeqs
);
List
<
Map
<
String
,
String
>>
enterInfoWithExport
=
tzsUserInfoMapper
.
getUserInfoWithExport
(
userInfoSeqs
);
List
<
UserInfoVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
enterInfoWithExport
),
UserInfoVo
.
class
);
List
<
UserInfoVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
enterInfoWithExport
),
UserInfoVo
.
class
);
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/AdvanceSearchEnum.java
View file @
effb3b94
...
@@ -50,8 +50,9 @@ public enum AdvanceSearchEnum {
...
@@ -50,8 +50,9 @@ public enum AdvanceSearchEnum {
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
jsonArray
=
new
JSONArray
();
for
(
AdvanceSearchEnum
item
:
values
())
{
for
(
AdvanceSearchEnum
item
:
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"name"
,
item
.
name
);
jsonObject
.
put
(
"label"
,
item
.
name
);
jsonObject
.
put
(
"code"
,
item
.
code
);
jsonObject
.
put
(
"value"
,
item
.
code
);
jsonObject
.
put
(
"key"
,
item
.
code
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"isMulti"
,
false
);
jsonObject
.
put
(
"isMulti"
,
false
);
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
)){
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
)){
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/UnitTypeEnum.java
View file @
effb3b94
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
enums
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
enums
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
...
@@ -35,4 +37,16 @@ public enum UnitTypeEnum {
...
@@ -35,4 +37,16 @@ public enum UnitTypeEnum {
getCode
.
put
(
e
.
name
,
e
.
code
);
getCode
.
put
(
e
.
name
,
e
.
code
);
}
}
}
}
public
static
JSONArray
getAll
(){
JSONArray
jsonArray
=
new
JSONArray
();
for
(
UnitTypeEnum
e
:
UnitTypeEnum
.
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
code
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonArray
.
add
(
jsonObject
);
}
return
jsonArray
;
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/ComprehensiveStatisticalAnalysisController.java
View file @
effb3b94
...
@@ -53,7 +53,7 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
...
@@ -53,7 +53,7 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/select/queryEquipmentSearchData"
)
@PostMapping
(
value
=
"/select/queryEquipmentSearchData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询设备查询条件"
,
notes
=
"查询设备查询条件"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询设备查询条件"
,
notes
=
"查询设备查询条件"
)
public
ResponseModel
<
JSON
Object
>
queryEquipmentSearchData
(
@RequestBody
JSONObject
jsonObject
)
{
public
ResponseModel
<
JSON
Array
>
queryEquipmentSearchData
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryEquipmentSearchData
(
jsonObject
.
getString
(
"value"
)));
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryEquipmentSearchData
(
jsonObject
.
getString
(
"value"
)));
}
}
...
@@ -62,10 +62,76 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
...
@@ -62,10 +62,76 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryAdvancedSearch"
)
@GetMapping
(
value
=
"/select/queryAdvancedSearch
/{type}
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询高级筛选"
,
notes
=
"查询高级筛选"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询高级筛选"
,
notes
=
"查询高级筛选"
)
public
ResponseModel
<
JSONArray
>
query
()
{
public
ResponseModel
<
JSONArray
>
query
(
@PathVariable
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryAdvancedSearch
());
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryAdvancedSearch
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryCompanySearchData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业条件"
,
notes
=
"查询企业条件"
)
public
ResponseModel
<
JSONObject
>
queryCompanySearchData
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryCompanySearchData
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryPersonSearchData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询个人条件"
,
notes
=
"查询个人条件"
)
public
ResponseModel
<
JSONObject
>
queryPersonSearchData
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryPersonSearchData
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryUnitType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单位类型"
,
notes
=
"查询单位类型"
)
public
ResponseModel
<
JSONArray
>
queryUnitType
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryUnitType
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryXK"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询许可"
,
notes
=
"查询许可"
)
public
ResponseModel
<
JSONArray
>
queryXK
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryXK
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryRYLX"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询人员类型"
,
notes
=
"查询人员类型"
)
public
ResponseModel
<
JSONArray
>
queryRYLX
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryRYLX
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryZZZT"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询资质状态"
,
notes
=
"查询资质状态"
)
public
ResponseModel
<
JSONArray
>
queryZZZT
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryZZZT
());
}
}
/**
/**
...
...
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/ComprehensiveStatisticalAnalysisServiceImpl.java
View file @
effb3b94
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
effb3b94
...
@@ -382,7 +382,7 @@ public class TzsUserInfoController extends BaseController {
...
@@ -382,7 +382,7 @@ public class TzsUserInfoController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/company/import"
)
@PostMapping
(
value
=
"/company/import"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"企业人员导入"
,
httpMethod
=
"POST"
,
notes
=
"企业人员导入"
)
@ApiOperation
(
value
=
"企业人员导入"
,
httpMethod
=
"POST"
,
notes
=
"企业人员导入"
)
public
ResponseModel
<?>
importCompanyUser
(
@RequestBody
MultipartFile
file
)
{
public
ResponseModel
<?>
importCompanyUser
(
@RequestBody
MultipartFile
file
)
{
return
tzsUserInfoService
.
importCompanyUser
(
file
,
getSelectedOrgInfo
());
return
tzsUserInfoService
.
importCompanyUser
(
file
,
getSelectedOrgInfo
());
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
effb3b94
...
@@ -51,6 +51,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
...
@@ -51,6 +51,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import
com.yeejoin.amos.feign.privilege.model.GroupModel
;
import
com.yeejoin.amos.feign.privilege.model.GroupModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.ehcache.impl.internal.concurrent.ConcurrentHashMap
;
import
org.ehcache.impl.internal.concurrent.ConcurrentHashMap
;
...
@@ -58,11 +59,13 @@ import org.springframework.beans.BeanUtils;
...
@@ -58,11 +59,13 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -76,6 +79,8 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -76,6 +79,8 @@ import javax.servlet.http.HttpServletResponse;
import
javax.validation.ConstraintViolation
;
import
javax.validation.ConstraintViolation
;
import
javax.validation.Validator
;
import
javax.validation.Validator
;
import
java.io.*
;
import
java.io.*
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.file.Files
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -116,6 +121,8 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -116,6 +121,8 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
private
TzsUserQualificationsServiceImpl
tzsUserQualificationsService
;
private
TzsUserQualificationsServiceImpl
tzsUserQualificationsService
;
@Autowired
@Autowired
private
TzsUserPermissionServiceImpl
tzsUserPermissionServiceImpl
;
private
TzsUserPermissionServiceImpl
tzsUserPermissionServiceImpl
;
@Autowired
private
EmqKeeper
emqKeeper
;
@Autowired
@Autowired
private
RegUnitInfoServiceImpl
regUnitInfoService
;
private
RegUnitInfoServiceImpl
regUnitInfoService
;
...
@@ -1345,6 +1352,56 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1345,6 +1352,56 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
return
errors
;
return
errors
;
}
}
private
final
String
DOWN_LOAD_START_TEMP
=
"{\"id\":\"%s\",\"status\":\"starting\",\"fileName\":\"%s\",\"time\":\"%s\"}"
;
private
final
String
DOWNLOAD_TOPIC
=
"/topic/download/excel/%s"
;
private
final
String
BUCKET_NAME
=
"upload"
;
private
final
String
UPLOAD_PATH
=
"/tzs/excelTempFile"
;
/**
* 开始下载 发送消息
*/
public
void
startDownLoadMsg
(
String
fileName
,
String
uuid
)
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
DOWNLOAD_TOPIC
,
RequestContext
.
getToken
()),
String
.
format
(
DOWN_LOAD_START_TEMP
,
uuid
,
fileName
,
new
Date
().
getTime
()).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
}
}
/**
* 发送主题消息,给企业推送excel 结束下载提醒
*
* @param topic 主体格式为: /download/excel/${token}
* @param jsonObject 文件名称 + excel文件路径(minio)
*/
public
void
sendDownLoadExcelMsg
(
String
topic
,
JSONObject
jsonObject
)
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
topic
,
JSONObject
.
toJSONString
(
jsonObject
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
}
}
/**
* 上传excel文件到minio服务器
*
* @param templateExcelFile 文件
* @return minio文件路径
*/
private
String
uploadExcelFile
(
MultipartFile
templateExcelFile
)
{
FeignClientResult
<
Map
<
String
,
String
>>
uploadResult
=
Systemctl
.
fileStorageClient
.
updateBucketFile
(
templateExcelFile
,
BUCKET_NAME
,
UPLOAD_PATH
);
String
urlString
=
""
;
if
(
uploadResult
!=
null
&&
uploadResult
.
getResult
()
!=
null
)
{
for
(
String
s
:
uploadResult
.
getResult
().
keySet
())
{
urlString
=
s
;
}
}
return
urlString
;
}
/**
/**
* 企业人员导入
* 企业人员导入
*
*
...
@@ -1356,7 +1413,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1356,7 +1413,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
public
ResponseModel
<?>
importCompanyUser
(
MultipartFile
multipartFile
,
ReginParams
reginParams
)
{
public
ResponseModel
<?>
importCompanyUser
(
MultipartFile
multipartFile
,
ReginParams
reginParams
)
{
CompanyBo
company
=
reginParams
.
getCompany
();
CompanyBo
company
=
reginParams
.
getCompany
();
List
<
CompanyUserImportDto
>
dataList
=
new
ArrayList
<>();
List
<
CompanyUserImportDto
>
dataList
=
new
ArrayList
<>();
JSONArray
resultError
=
new
JSONArray
();
ArrayList
<
String
>
sheetError
=
new
ArrayList
();
// 用于手机号唯一判断 key:姓名-身份证号 value :手机号
// 用于手机号唯一判断 key:姓名-身份证号 value :手机号
// key保证数据唯一性
// key保证数据唯一性
Map
<
String
,
String
>
phoneOnly
=
new
HashMap
<>();
Map
<
String
,
String
>
phoneOnly
=
new
HashMap
<>();
...
@@ -1372,7 +1429,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1372,7 +1429,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(
sheetName
.
contains
(
"企业人员录入限制"
))
{
if
(
sheetName
.
contains
(
"企业人员录入限制"
))
{
continue
;
continue
;
}
}
ArrayList
<
String
>
sheetError
=
new
ArrayList
<>();
// 人员信息 sheet页
// 人员信息 sheet页
if
(
sheetName
.
contains
(
"人员信息"
))
{
if
(
sheetName
.
contains
(
"人员信息"
))
{
EasyExcel
.
read
(
multipartFile
.
getInputStream
(),
CompanyUserImportDto
.
class
,
new
AnalysisEventListener
<
CompanyUserImportDto
>()
{
EasyExcel
.
read
(
multipartFile
.
getInputStream
(),
CompanyUserImportDto
.
class
,
new
AnalysisEventListener
<
CompanyUserImportDto
>()
{
...
@@ -1383,9 +1439,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1383,9 +1439,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
if
(!
ValidationUtil
.
isEmpty
(
sheetError
))
{
resultError
.
add
(
sheetError
);
}
}
}
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}
}
...
@@ -1400,9 +1453,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1400,9 +1453,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
if
(!
ValidationUtil
.
isEmpty
(
sheetError
))
{
resultError
.
add
(
sheetError
);
}
}
}
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}
}
...
@@ -1417,9 +1467,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1417,9 +1467,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
if
(!
ValidationUtil
.
isEmpty
(
sheetError
))
{
resultError
.
add
(
sheetError
);
}
}
}
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}
}
...
@@ -1434,16 +1481,32 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1434,16 +1481,32 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
if
(!
ValidationUtil
.
isEmpty
(
sheetError
))
{
resultError
.
add
(
sheetError
);
}
}
}
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}).
headRowNumber
(
2
).
sheet
(
sheetNo
,
sheetName
).
doRead
();
}
}
}
}
// 存在检验不通过的数据则返回错误信息,不在向下写入库
// 存在检验不通过的数据则返回错误信息,不在向下写入库
if
(!
resultError
.
isEmpty
())
{
if
(!
sheetError
.
isEmpty
())
{
return
ResponseHelper
.
buildResponse
(
resultError
);
// 发送错误文件
String
uuid
=
UUID
.
randomUUID
().
toString
();
startDownLoadMsg
(
"人员导入错误文件"
,
uuid
);
File
tempFile
=
File
.
createTempFile
(
"errors"
,
".txt"
);
try
(
FileWriter
writer
=
new
FileWriter
(
tempFile
))
{
for
(
String
error
:
sheetError
)
{
writer
.
write
(
error
+
System
.
lineSeparator
());
}
}
byte
[]
fileContent
=
Files
.
readAllBytes
(
tempFile
.
toPath
());
MultipartFile
mockMultipartFile
=
new
MockMultipartFile
(
"errors.txt"
,
"errors.txt"
,
"text/plain"
,
fileContent
);
String
urlString
=
this
.
uploadExcelFile
(
mockMultipartFile
);
sendDownLoadExcelMsg
(
String
.
format
(
DOWNLOAD_TOPIC
,
RequestContext
.
getToken
()),
new
JSONObject
()
.
fluentPut
(
"id"
,
uuid
)
.
fluentPut
(
"status"
,
"done"
)
.
fluentPut
(
"fileName"
,
"人员导入错误文件"
)
.
fluentPut
(
"url"
,
urlString
)
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
tempFile
.
delete
();
throw
new
BadRequest
(
"校验出错,请查看错误文件!"
);
}
}
// 3.数据入库
// 3.数据入库
dataList
.
forEach
(
data
->
{
dataList
.
forEach
(
data
->
{
...
...
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