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
0289ad85
Commit
0289ad85
authored
Aug 10, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.单位注册接口参数修改
parent
b09736b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
RegUnitInfoController.java
.../module/tzs/flc/biz/controller/RegUnitInfoController.java
+1
-1
RegUnitInfoServiceImpl.java
...dule/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+11
-5
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/RegUnitInfoController.java
View file @
0289ad85
...
...
@@ -53,7 +53,7 @@ public class RegUnitInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"
新增单位注册信息表"
,
notes
=
"新增单位注册信息表
"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"
单位注册"
,
notes
=
"单位注册
"
)
public
ResponseModel
<
RegUnitInfoDto
>
save
(
@RequestBody
RegUnitInfoDto
model
)
{
model
=
iRegUnitInfoService
.
registerUnit
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
0289ad85
...
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.BaseUnitLicence;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RegUnitInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IRegUnitInfoService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.BaseUnitLicenceServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.RegUnitIcDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.RegUnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.RegUnitIc
;
...
...
@@ -56,6 +57,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
@Autowired
RegUnitIcServiceImpl
regUnitIcService
;
@Autowired
private
TzsAuthServiceImpl
tzsAuthServiceImpl
;
/**
* 使用单位的类型,数据来源:cb_data_dictionary code = 1051
*/
...
...
@@ -70,15 +74,17 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
RegUnitInfoDto
registerUnit
(
RegUnitInfoDto
model
)
{
tzsAuthServiceImpl
.
setRequestContext
();
// 1.插入注册单位基本信息表:tz_flc_reg_unit_info
RegUnitInfo
regUnitInfo
=
new
RegUnitInfo
();
// 注册用统一信用码注册,默认证件类型为营业执照,数据来源:cb_data_dictionary code = 1060
model
.
setUnitType
(
"营业执照"
);
model
.
setUnitTypeCode
(
"1060"
);
model
.
setUnitCodeType
(
"1060"
);
Bean
.
copyExistPropertis
(
model
,
regUnitInfo
);
// 2.插入单位注册许可信息表:tz_base_unit_licence
List
<
BaseUnitLicenceDto
>
unitLicenceDtos
=
model
.
getUnitLicences
();
List
<
BaseUnitLicence
>
baseUnitLicences
=
unitLicenceDtos
.
stream
().
map
(
s
->
{
s
.
setUnitCode
(
model
.
getUnitCode
());
s
.
setUnitName
(
model
.
getName
());
BaseUnitLicence
target
=
new
BaseUnitLicence
();
Bean
.
copyExistPropertis
(
s
,
target
);
return
target
;
...
...
@@ -149,7 +155,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
return
"headquarter"
.
equals
(
c
.
getLevel
())
||
"prefecture-level"
.
equals
(
c
.
getLevel
())
||
"county"
.
equals
(
c
.
getLevel
());
}).
peek
(
n
->{
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
n
),
CompanyModel
.
class
);
dealChildCompany
(
c
.
getChildren
());
dealChildCompany
(
c
.
getChildren
()
!=
null
?
new
ArrayList
()
:
c
.
getChildren
()
);
}).
collect
(
Collectors
.
toList
());
}
...
...
@@ -188,7 +194,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
String
unitTypeCode
=
regUnitInfo
.
getUnitTypeCode
();
// 根据unitTypeCode 获取应用和角色 数据字典配置
DataDictionary
unitType
=
iDataDictionaryService
.
getOne
(
new
LambdaQueryWrapper
<
DataDictionary
>().
eq
(
DataDictionary:
:
getCode
,
unitTypeCode
));
String
appCode
=
unitType
.
getTypeDesc
();
String
appCode
=
unitType
.
getTypeDesc
()
!=
null
?
unitType
.
getTypeDesc
():
""
;
String
[]
appCodes
=
appCode
.
split
(
","
);
Set
<
String
>
appCodesSet
=
new
HashSet
<>();
Collections
.
addAll
(
appCodesSet
,
appCodes
);
...
...
@@ -199,9 +205,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
roleIds
.
add
(
r
.
getSequenceNbr
());
});
roleSeqMap
.
put
(
companyInfo
.
getSequenceNbr
(),
roleIds
);
agencyUserModel
.
setAppCodes
(
new
ArrayList
<>(
appCodesSet
));
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
orgRoles
.
put
(
companyInfo
.
getSequenceNbr
(),
userRoleList
);
agencyUserModel
.
setAppCodes
(
new
ArrayList
<>(
appCodesSet
));
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
FeignClientResult
<
AgencyUserModel
>
userResult
;
...
...
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