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
8eb340bf
Commit
8eb340bf
authored
Jun 13, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业信息添加设置标签操作
parent
c170dd05
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
5 deletions
+55
-5
TzBaseEnterpriseInfoDto.java
...amos/boot/module/tzs/api/dto/TzBaseEnterpriseInfoDto.java
+2
-1
TzBaseEnterpriseInfo.java
...amos/boot/module/tzs/api/entity/TzBaseEnterpriseInfo.java
+3
-0
ITzBaseEnterpriseInfoService.java
.../module/tzs/api/service/ITzBaseEnterpriseInfoService.java
+2
-0
TzBaseEnterpriseInfoController.java
...le/tzs/biz/controller/TzBaseEnterpriseInfoController.java
+21
-4
TzBaseEnterpriseInfoServiceImpl.java
...tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+27
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/TzBaseEnterpriseInfoDto.java
View file @
8eb340bf
...
...
@@ -299,5 +299,6 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
private
RegUnitInfoDto
regUnitInfoDto
;
@ApiModelProperty
(
value
=
"企业标签信息"
)
private
String
regulatoryLabels
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/TzBaseEnterpriseInfo.java
View file @
8eb340bf
...
...
@@ -181,4 +181,7 @@ public class TzBaseEnterpriseInfo extends BaseEntity {
@ApiModelProperty
(
value
=
"行业主管部门"
)
private
String
industrySupervisor
;
@ApiModelProperty
(
value
=
"企业标签信息"
)
private
String
regulatoryLabels
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/ITzBaseEnterpriseInfoService.java
View file @
8eb340bf
...
...
@@ -42,4 +42,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
Map
<
String
,
Object
>
adminInfoUpdate
(
Map
<
String
,
Object
>
map
);
TzBaseEnterpriseInfoDto
getInfoByUseCode
(
String
useCode
);
String
setLabel
(
List
<
Long
>
enterpriseIds
,
List
<
String
>
enterpriseLabels
);
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzBaseEnterpriseInfoController.java
View file @
8eb340bf
...
...
@@ -27,6 +27,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -175,7 +176,7 @@ public class TzBaseEnterpriseInfoController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业端当前登录人所在企业详情"
,
notes
=
"查询企业端当前登录人所在企业详情"
)
public
ResponseModel
<
IPage
<
TzBaseEnterpriseInfoDto
>>
pageInfo
(
PageParam
pageParam
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
}
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
page
(
pageParam
,
reginParams
.
getCompany
().
getCompanyName
()));
...
...
@@ -191,14 +192,14 @@ public class TzBaseEnterpriseInfoController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyInfoUpdate"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改企业信息"
,
notes
=
"修改企业信息"
)
public
ResponseModel
<
TzBaseEnterpriseInfoDto
>
companyInfoUpdate
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
public
ResponseModel
<
TzBaseEnterpriseInfoDto
>
companyInfoUpdate
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
companyInfoUpdate
(
map
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/adminInfoUpdate"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改企业信息"
,
notes
=
"修改企业信息"
)
public
ResponseModel
<
Object
>
adminInfoUpdate
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
public
ResponseModel
<
Object
>
adminInfoUpdate
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Map
<
String
,
Object
>
result
=
iTzBaseEnterpriseInfoService
.
adminInfoUpdate
(
map
);
if
(
result
.
containsKey
(
"fail"
))
{
ResponseModel
responseModel
=
new
ResponseModel
();
...
...
@@ -225,12 +226,28 @@ public class TzBaseEnterpriseInfoController {
/**
* 将监管系统全量用户导入 业务企业表 和 平台企业表
*
* @return OK
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/syncUnitData"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"同步企业信息"
,
notes
=
"同步企业信息"
)
public
ResponseModel
<
String
>
syncUnitData
()
{
public
ResponseModel
<
String
>
syncUnitData
()
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
syncEnterpriseInfo
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/setLabel"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设置企业标签"
,
notes
=
"设置企业标签"
)
public
ResponseModel
<
Object
>
setLabel
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
ArrayList
<
String
>
enterpriseLabel
=
new
ArrayList
<>();
ArrayList
<
Long
>
enterpriseIds
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
map
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"enterpriseLabel"
))
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"enterpriseIds"
)))
{
enterpriseLabel
=
(
ArrayList
)
map
.
get
(
"enterpriseLabel"
);
enterpriseIds
=
(
ArrayList
)
map
.
get
(
"enterpriseIds"
);
}
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
setLabel
(
enterpriseIds
,
enterpriseLabel
));
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
8eb340bf
...
...
@@ -46,6 +46,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 企业数据信息 服务实现类
...
...
@@ -475,6 +476,32 @@ public class TzBaseEnterpriseInfoServiceImpl
}
@Override
public
String
setLabel
(
List
<
Long
>
enterpriseIds
,
List
<
String
>
enterpriseLabels
)
{
List
<
TzBaseEnterpriseInfo
>
tzBaseEnterpriseInfos
=
tzBaseEnterpriseInfoMapper
.
selectBatchIds
(
enterpriseIds
);
for
(
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
:
tzBaseEnterpriseInfos
)
{
// 标签递增逻辑
// if (!ObjectUtils.isEmpty(tzBaseEnterpriseInfo.getRegulatoryLabels())) {
// String result = checkLabel(enterpriseLabels, tzBaseEnterpriseInfo.getRegulatoryLabels());
// tzBaseEnterpriseInfo.setRegulatoryLabels(result);
// } else {
// String labels = String.join(",", enterpriseLabels);
// tzBaseEnterpriseInfo.setRegulatoryLabels(labels);
// }
String
labels
=
String
.
join
(
","
,
enterpriseLabels
);
tzBaseEnterpriseInfo
.
setRegulatoryLabels
(
labels
);
}
this
.
updateBatchById
(
tzBaseEnterpriseInfos
);
return
"success"
;
}
private
String
checkLabel
(
List
<
String
>
enterpriseLabels
,
String
result
)
{
List
<
String
>
strings
=
Arrays
.
asList
(
result
.
split
(
","
));
ArrayList
<
String
>
res
=
new
ArrayList
<>(
strings
);
List
<
String
>
collect
=
enterpriseLabels
.
stream
().
filter
(
item
->
!
strings
.
contains
(
item
)).
collect
(
Collectors
.
toList
());
res
.
addAll
(
collect
);
return
String
.
join
(
","
,
res
);
}
public
Map
<
String
,
Object
>
adminInfoUpdate
(
Map
<
String
,
Object
>
map
)
{
//每一个企业只有一个管理员,所以当前登录用户即管理员用户
...
...
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