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
c9ddd67b
Commit
c9ddd67b
authored
Aug 31, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单位注册校验修改
parent
2f8e3a67
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
IRegUnitInfoService.java
.../boot/module/tcm/flc/api/service/IRegUnitInfoService.java
+1
-1
RegUnitInfoController.java
.../module/tcm/flc/biz/controller/RegUnitInfoController.java
+4
-2
RegUnitInfoServiceImpl.java
...dule/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+13
-12
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/api/service/IRegUnitInfoService.java
View file @
c9ddd67b
...
@@ -32,7 +32,7 @@ public interface IRegUnitInfoService {
...
@@ -32,7 +32,7 @@ public interface IRegUnitInfoService {
* @param unitType 单位类型
* @param unitType 单位类型
* @return RegUnitInfoDto
* @return RegUnitInfoDto
*/
*/
RegUnitInfoDto
unitCheck
(
String
unitCode
,
String
unitType
,
String
companyName
);
RegUnitInfoDto
unitCheck
(
String
unitCode
,
String
unitType
,
String
companyName
,
String
registerType
,
String
cardType
);
/**
/**
* 单位类型列表字典
* 单位类型列表字典
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/controller/RegUnitInfoController.java
View file @
c9ddd67b
...
@@ -115,12 +115,14 @@ public class RegUnitInfoController extends BaseController {
...
@@ -115,12 +115,14 @@ public class RegUnitInfoController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"单位注册校验"
,
notes
=
"单位注册校验"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"单位注册校验"
,
notes
=
"单位注册校验"
)
public
ResponseModel
<
RegUnitInfoDto
>
unitCheck
(
@PathVariable
String
unitCode
,
public
ResponseModel
<
RegUnitInfoDto
>
unitCheck
(
@PathVariable
String
unitCode
,
@RequestParam
String
unitType
,
@RequestParam
String
unitType
,
@RequestParam
String
registerType
,
@RequestParam
(
required
=
false
)
String
cardType
,
@RequestParam
(
required
=
false
)
String
companyName
)
{
@RequestParam
(
required
=
false
)
String
companyName
)
{
if
(
ValidationUtil
.
isEmpty
(
unitCode
))
{
if
(
ValidationUtil
.
isEmpty
(
unitCode
))
{
throw
new
BadRequest
(
"
单位
编码不能为空"
);
throw
new
BadRequest
(
"
注册
编码不能为空"
);
}
}
try
{
try
{
RegUnitInfoDto
regUnitInfoDto
=
iRegUnitInfoService
.
unitCheck
(
unitCode
,
unitType
,
companyName
);
RegUnitInfoDto
regUnitInfoDto
=
iRegUnitInfoService
.
unitCheck
(
unitCode
,
unitType
,
companyName
,
registerType
,
cardType
);
return
ResponseHelper
.
buildResponse
(
regUnitInfoDto
);
return
ResponseHelper
.
buildResponse
(
regUnitInfoDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
ResponseModel
<
RegUnitInfoDto
>
response
=
new
ResponseModel
<>();
ResponseModel
<
RegUnitInfoDto
>
response
=
new
ResponseModel
<>();
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
c9ddd67b
...
@@ -347,21 +347,20 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -347,21 +347,20 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
}
@Override
@Override
public
RegUnitInfoDto
unitCheck
(
String
unitCode
,
String
unitType
,
String
companyName
)
{
public
RegUnitInfoDto
unitCheck
(
String
unitCode
,
String
unitType
,
String
companyName
,
String
registerType
,
String
cardType
)
{
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
startPlatformTokenService
.
getToken
();
startPlatformTokenService
.
getToken
();
if
(!
ValidationUtil
.
isEmpty
(
companyName
))
{
// if (!ValidationUtil.isEmpty(companyName)) {
FeignClientResult
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
queryByCompanyName
(
companyName
);
// FeignClientResult<CompanyModel> result = Privilege.companyClient.queryByCompanyName(companyName);
if
(
result
.
getResult
()!=
null
)
// if (result.getResult() != null) {
{
// throw new BadRequest("重复的公司名称");
throw
new
BadRequest
(
"重复的公司名称"
);
// }
}
// }
}
if
(!
ValidationUtil
.
isEmpty
(
unitCode
))
{
if
(!
ValidationUtil
.
isEmpty
(
unitCode
))
{
FeignClientResult
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
queryByCompanyCode
(
unitCode
)
;
unitCode
=
ObjectUtils
.
isEmpty
(
cardType
)
?
unitCode
:
cardType
+
"_"
+
unitCode
;
if
(
result
.
getResult
()!=
null
)
FeignClientResult
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
queryByCompanyCode
(
unitCode
);
{
if
(
result
.
getResult
()
!=
null
)
{
throw
new
BadRequest
(
"重复的公司
编码"
);
throw
new
BadRequest
(
"重复的注册
编码"
);
}
}
}
}
// 1.校验重复性
// 1.校验重复性
...
@@ -371,6 +370,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -371,6 +370,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// throw new RuntimeException("该单位已注册,请联系企业管理员!");
// throw new RuntimeException("该单位已注册,请联系企业管理员!");
// }
// }
// 2.组织返回数据
// 2.组织返回数据
if
(
ObjectUtils
.
isEmpty
(
registerType
)){
//2.1 工商信息查询
//2.1 工商信息查询
Map
<
String
,
Object
>
resultMap
=
accessFeignService
.
getData
(
unitCode
).
getResult
();
Map
<
String
,
Object
>
resultMap
=
accessFeignService
.
getData
(
unitCode
).
getResult
();
if
(
resultMap
==
null
){
if
(
resultMap
==
null
){
...
@@ -431,6 +431,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -431,6 +431,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
else
{
}
else
{
regUnitInfoDto
.
setRegUnitIc
(
new
RegUnitIcDto
());
regUnitInfoDto
.
setRegUnitIc
(
new
RegUnitIcDto
());
}
}
}
// 2.3 许可信息组装
// 2.3 许可信息组装
List
<
BaseUnitLicence
>
unitLicences
=
baseUnitLicenceService
List
<
BaseUnitLicence
>
unitLicences
=
baseUnitLicenceService
...
...
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