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
1b2003ac
Commit
1b2003ac
authored
Oct 22, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.企业、事业注册增加信用代码唯一性检验
parent
3e736972
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
15 deletions
+78
-15
IRegUnitInfoService.java
.../boot/module/tcm/flc/api/service/IRegUnitInfoService.java
+24
-8
RegUnitInfoController.java
.../module/tcm/flc/biz/controller/RegUnitInfoController.java
+54
-7
RegUnitInfoServiceImpl.java
...dule/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+0
-0
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 @
1b2003ac
...
@@ -25,14 +25,6 @@ public interface IRegUnitInfoService {
...
@@ -25,14 +25,6 @@ public interface IRegUnitInfoService {
*/
*/
RegUnitInfoDto
registerUnit
(
RegUnitInfoDto
model
);
RegUnitInfoDto
registerUnit
(
RegUnitInfoDto
model
);
/**
* 单位校验
* @param unitCode 单位唯一编号
* @return RegUnitInfoDto
*/
RegUnitInfoDto
unitCheck
(
String
unitCode
,
String
companyName
,
String
registerType
,
String
cardType
);
/**
/**
* 单位类型列表字典
* 单位类型列表字典
* @return List<DataDictionary>
* @return List<DataDictionary>
...
@@ -84,4 +76,28 @@ public interface IRegUnitInfoService {
...
@@ -84,4 +76,28 @@ public interface IRegUnitInfoService {
List
<
DataDictionary
>
getDictionaryListByType
(
String
type
)
throws
Exception
;
List
<
DataDictionary
>
getDictionaryListByType
(
String
type
)
throws
Exception
;
List
<
DataDictionary
>
getXkItemList
(
String
type
);
List
<
DataDictionary
>
getXkItemList
(
String
type
);
/**
* 企业类型单位注册检验
* @param unitCode 单位code
* @param isNationwide 是否省外
* @return RegUnitInfoDto
*/
RegUnitInfoDto
regBeforeCheckForEnterprises
(
String
unitCode
,
Boolean
isNationwide
);
/**
* 事业单位类型注册检验
* @param unitCode 单位code
* @param isNationwide 是否省外
* @return RegUnitInfoDto
*/
RegUnitInfoDto
regBeforeCheckForCause
(
String
unitCode
,
Boolean
isNationwide
);
/**
* 个人类型注册检验
* @param unitCode 单位code
* @param cardType 证件类型
* @return RegUnitInfoDto
*/
RegUnitInfoDto
regBeforeCheckForPerson
(
String
unitCode
,
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 @
1b2003ac
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
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
;
...
@@ -110,18 +111,40 @@ public class RegUnitInfoController extends BaseController {
...
@@ -110,18 +111,40 @@ public class RegUnitInfoController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iRegUnitInfoService
.
adminInfo
(
unitCode
));
return
ResponseHelper
.
buildResponse
(
iRegUnitInfoService
.
adminInfo
(
unitCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/enterprises/{unitCode}/check"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业单位注册校验"
,
notes
=
"企业单位注册校验"
)
public
ResponseModel
<
RegUnitInfoDto
>
regBeforeCheckForEnterprises
(
@PathVariable
String
unitCode
,
@ApiParam
(
value
=
"是否省外"
)
@RequestParam
Boolean
isNationwide
)
{
if
(
ValidationUtil
.
isEmpty
(
unitCode
))
{
throw
new
BadRequest
(
"注册编码不能为空"
);
}
try
{
RegUnitInfoDto
regUnitInfoDto
=
iRegUnitInfoService
.
regBeforeCheckForEnterprises
(
unitCode
,
isNationwide
);
return
ResponseHelper
.
buildResponse
(
regUnitInfoDto
);
}
catch
(
Exception
e
)
{
ResponseModel
<
RegUnitInfoDto
>
response
=
new
ResponseModel
<>();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
response
.
setResult
(
null
);
response
.
setDevMessage
(
e
.
getMessage
());
response
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
response
.
setTraceId
(
RequestContext
.
getTraceId
());
response
.
setPath
(
request
.
getServletPath
());
return
response
;
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/{unitCode}/check"
)
@GetMapping
(
value
=
"/cause/{unitCode}/check"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"单位注册校验"
,
notes
=
"单位注册校验"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"事业单位注册校验"
,
notes
=
"事业单位注册校验"
)
public
ResponseModel
<
RegUnitInfoDto
>
unitCheck
(
@PathVariable
String
unitCode
,
public
ResponseModel
<
RegUnitInfoDto
>
regBeforeCheckForCause
(
@PathVariable
String
unitCode
,
@RequestParam
(
required
=
false
)
String
registerType
,
@ApiParam
(
value
=
"是否省外"
)
@RequestParam
Boolean
isNationwide
)
{
@RequestParam
(
required
=
false
)
String
cardType
,
@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
,
companyName
,
registerType
,
cardTyp
e
);
RegUnitInfoDto
regUnitInfoDto
=
iRegUnitInfoService
.
regBeforeCheckForCause
(
unitCode
,
isNationwid
e
);
return
ResponseHelper
.
buildResponse
(
regUnitInfoDto
);
return
ResponseHelper
.
buildResponse
(
regUnitInfoDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
ResponseModel
<
RegUnitInfoDto
>
response
=
new
ResponseModel
<>();
ResponseModel
<
RegUnitInfoDto
>
response
=
new
ResponseModel
<>();
...
@@ -136,6 +159,30 @@ public class RegUnitInfoController extends BaseController {
...
@@ -136,6 +159,30 @@ public class RegUnitInfoController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/person/{unitCode}/check"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"个人注册校验"
,
notes
=
"个人注册校验"
)
public
ResponseModel
<
RegUnitInfoDto
>
regBeforeCheckForPerson
(
@PathVariable
String
unitCode
,
@RequestParam
(
required
=
false
)
String
cardType
)
{
if
(
ValidationUtil
.
isEmpty
(
unitCode
))
{
throw
new
BadRequest
(
"注册编码不能为空"
);
}
try
{
RegUnitInfoDto
regUnitInfoDto
=
iRegUnitInfoService
.
regBeforeCheckForPerson
(
unitCode
,
cardType
);
return
ResponseHelper
.
buildResponse
(
regUnitInfoDto
);
}
catch
(
Exception
e
)
{
ResponseModel
<
RegUnitInfoDto
>
response
=
new
ResponseModel
<>();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
response
.
setResult
(
null
);
response
.
setDevMessage
(
e
.
getMessage
());
response
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
response
.
setTraceId
(
RequestContext
.
getTraceId
());
response
.
setPath
(
request
.
getServletPath
());
return
response
;
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/unit-type/list"
)
@GetMapping
(
value
=
"/unit-type/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"单位类型列表"
,
notes
=
"单位类型列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"单位类型列表"
,
notes
=
"单位类型列表"
)
public
ResponseModel
<
List
<
DataDictionary
>>
unitTypeList
()
{
public
ResponseModel
<
List
<
DataDictionary
>>
unitTypeList
()
{
...
...
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 @
1b2003ac
This diff is collapsed.
Click to expand it.
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