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
19f04899
Commit
19f04899
authored
Aug 18, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.企业注册变更需求
parent
9c6e3f0f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
13 deletions
+47
-13
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+11
-6
IDataDictionaryService.java
.../amos/boot/biz/common/service/IDataDictionaryService.java
+2
-0
DataDictionaryServiceImpl.java
...ot/biz/common/service/impl/DataDictionaryServiceImpl.java
+10
-1
IRegUnitInfoService.java
.../boot/module/tzs/flc/api/service/IRegUnitInfoService.java
+7
-0
RegUnitInfoController.java
.../module/tzs/flc/biz/controller/RegUnitInfoController.java
+3
-4
RegUnitInfoServiceImpl.java
...dule/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+7
-2
tzs-1.0.0.1.xml
...e-tzs-biz/src/main/resources/db/changelog/tzs-1.0.0.1.xml
+7
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
19f04899
...
@@ -13,12 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -13,12 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
@@ -394,4 +389,14 @@ public class DataDictionaryController extends BaseController {
...
@@ -394,4 +389,14 @@ public class DataDictionaryController extends BaseController {
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/child-list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型type和desc查询字典列表"
,
notes
=
"根据字典类型type和desc查询字典列表"
)
public
ResponseModel
<
List
<
DataDictionary
>>
getChildList
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"group"
)
String
group
){
return
ResponseHelper
.
buildResponse
(
iDataDictionaryService
.
getChildList
(
type
,
group
));
}
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/IDataDictionaryService.java
View file @
19f04899
...
@@ -23,4 +23,6 @@ public interface IDataDictionaryService {
...
@@ -23,4 +23,6 @@ public interface IDataDictionaryService {
public
List
<
DataDictionary
>
getByType
(
String
type
);
public
List
<
DataDictionary
>
getByType
(
String
type
);
public
List
<
DataDictionary
>
getAllChildNodes
(
String
type
,
Long
parent
)
throws
Exception
;
public
List
<
DataDictionary
>
getAllChildNodes
(
String
type
,
Long
parent
)
throws
Exception
;
List
<
DataDictionary
>
getChildList
(
String
type
,
String
group
);
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/DataDictionaryServiceImpl.java
View file @
19f04899
...
@@ -156,7 +156,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
...
@@ -156,7 +156,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
return
list
;
return
list
;
}
}
public
List
<
DataDictionary
>
getAllChildNodes
(
String
type
,
Long
parent
)
throws
Exception
{
@Override
public
List
<
DataDictionary
>
getAllChildNodes
(
String
type
,
Long
parent
)
throws
Exception
{
LambdaQueryWrapper
<
DataDictionary
>
wrapper
=
new
LambdaQueryWrapper
<
DataDictionary
>();
LambdaQueryWrapper
<
DataDictionary
>
wrapper
=
new
LambdaQueryWrapper
<
DataDictionary
>();
wrapper
.
eq
(
DataDictionary:
:
getIsDelete
,
false
);
wrapper
.
eq
(
DataDictionary:
:
getIsDelete
,
false
);
wrapper
.
eq
(
DataDictionary:
:
getType
,
type
);
wrapper
.
eq
(
DataDictionary:
:
getType
,
type
);
...
@@ -165,4 +166,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
...
@@ -165,4 +166,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
}
}
return
this
.
baseMapper
.
selectList
(
wrapper
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
}
@Override
public
List
<
DataDictionary
>
getChildList
(
String
type
,
String
group
)
{
LambdaQueryWrapper
<
DataDictionary
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
DataDictionary:
:
getType
,
type
);
wrapper
.
eq
(
DataDictionary:
:
getTypeDesc
,
group
);
return
this
.
list
(
wrapper
);
}
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/IRegUnitInfoService.java
View file @
19f04899
...
@@ -50,4 +50,11 @@ public interface IRegUnitInfoService {
...
@@ -50,4 +50,11 @@ public interface IRegUnitInfoService {
* @return 是否成功
* @return 是否成功
*/
*/
Boolean
unitLogOut
(
String
unitCode
);
Boolean
unitLogOut
(
String
unitCode
);
/**
* 校验是否已经存在相同的账号
* @param userName 账号
* @return true 已存在相同账号,不能注册 false 不存在账号,可以注册
*/
Boolean
checkRepeatAccount
(
String
userName
);
}
}
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 @
19f04899
...
@@ -96,7 +96,7 @@ public class RegUnitInfoController extends BaseController {
...
@@ -96,7 +96,7 @@ public class RegUnitInfoController extends BaseController {
throw
new
BadRequest
(
"手机号不能为空"
);
throw
new
BadRequest
(
"手机号不能为空"
);
}
}
Boolean
isReg
=
(
Boolean
)
Privilege
.
authClient
.
mobileVerify
(
tel
).
getResult
();
Boolean
isReg
=
(
Boolean
)
Privilege
.
authClient
.
mobileVerify
(
tel
).
getResult
();
if
(
isReg
)
{
if
(
isReg
)
{
throw
new
RuntimeException
(
"该手机号已注册!"
);
throw
new
RuntimeException
(
"该手机号已注册!"
);
}
}
Boolean
flag
;
Boolean
flag
;
...
@@ -151,12 +151,11 @@ public class RegUnitInfoController extends BaseController {
...
@@ -151,12 +151,11 @@ public class RegUnitInfoController extends BaseController {
@GetMapping
(
value
=
"/{userName}/hasExistUser"
)
@GetMapping
(
value
=
"/{userName}/hasExistUser"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户是否存在"
,
notes
=
"判断用户是否存在"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户是否存在"
,
notes
=
"判断用户是否存在"
)
public
ResponseModel
<
Boolean
>
hasExistUser
(
@PathVariable
(
value
=
"userName"
)
String
userName
)
{
public
ResponseModel
<
Boolean
>
hasExistUser
(
@PathVariable
(
value
=
"userName"
)
String
userName
)
{
boolean
flag
=
false
;
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserName
(
userName
).
getResult
();
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserName
(
userName
).
getResult
();
if
(
user
!=
null
)
{
if
(
user
!=
null
)
{
flag
=
true
;
return
ResponseHelper
.
buildResponse
(
false
)
;
}
}
return
ResponseHelper
.
buildResponse
(
flag
);
return
ResponseHelper
.
buildResponse
(
iRegUnitInfoService
.
checkRepeatAccount
(
userName
)
);
}
}
...
...
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 @
19f04899
...
@@ -118,12 +118,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -118,12 +118,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
Bean
.
copyExistPropertis
(
model
.
getRegUnitIc
(),
regUnitIc
);
Bean
.
copyExistPropertis
(
model
.
getRegUnitIc
(),
regUnitIc
);
regUnitIcService
.
saveOrUpdate
(
regUnitIc
);
regUnitIcService
.
saveOrUpdate
(
regUnitIc
);
// 3.调用平台进行创建单位、用户信息,同步用户信息
// 3.调用平台进行创建单位、用户信息,同步用户信息
if
(
UnitReviewStateEnum
.
NO_NEED_REVIEW
.
getCode
().
equals
(
model
.
getState
()))
{
//
if (UnitReviewStateEnum.NO_NEED_REVIEW.getCode().equals(model.getState())) {
// 3.1 创建企业信息
// 3.1 创建企业信息
this
.
createBaseEnterpriseInfo
(
model
);
this
.
createBaseEnterpriseInfo
(
model
);
// 3.2 自动创建:调用平台进行创建单位、用户信息
// 3.2 自动创建:调用平台进行创建单位、用户信息
this
.
createCompanyAndUser
(
regUnitInfo
);
this
.
createCompanyAndUser
(
regUnitInfo
);
}
//
}
// 4.插入注册单位基本信息表:tz_flc_reg_unit_info
// 4.插入注册单位基本信息表:tz_flc_reg_unit_info
this
.
save
(
regUnitInfo
);
this
.
save
(
regUnitInfo
);
// 5.组织返回数据
// 5.组织返回数据
...
@@ -281,6 +281,11 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -281,6 +281,11 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
@Override
public
Boolean
checkRepeatAccount
(
String
userName
)
{
return
this
.
count
(
new
LambdaQueryWrapper
<
RegUnitInfo
>().
eq
(
RegUnitInfo:
:
getAdminLoginName
,
userName
))
>
0
;
}
private
CompanyModel
dealChildCompany
(
CompanyModel
cm
)
{
private
CompanyModel
dealChildCompany
(
CompanyModel
cm
)
{
cm
.
setChildren
(
this
.
getFilterChild
(
cm
.
getChildren
()
!=
null
?
cm
.
getChildren
()
:
new
ArrayList
()));
cm
.
setChildren
(
this
.
getFilterChild
(
cm
.
getChildren
()
!=
null
?
cm
.
getChildren
()
:
new
ArrayList
()));
cm
.
getChildren
().
stream
().
filter
(
n
->
{
cm
.
getChildren
().
stream
().
filter
(
n
->
{
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/db/changelog/tzs-1.0.0.1.xml
View file @
19f04899
...
@@ -718,5 +718,12 @@
...
@@ -718,5 +718,12 @@
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1202', '1202', '充装单位', 'zslx', NULL, NULL, NULL, NULL, NULL, b'0', '1');
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1202', '1202', '充装单位', 'zslx', NULL, NULL, NULL, NULL, NULL, b'0', '1');
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1660546840856-12"
>
<comment>
设备品种字典维护
</comment>
<sql>
DELETE FROM `cb_data_dictionary` where type = 'sbpz';
REPLACE INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1600', '1000', '移动式压力容器气瓶充装', 'sbpz', NULL, NULL, NULL, NULL, NULL, b'0', '1');
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
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