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
f9652d0b
Commit
f9652d0b
authored
Aug 18, 2022
by
wujiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_unit_register' of…
Merge branch 'develop_unit_register' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_unit_register
parents
dea5a75f
20e86cf2
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
145 additions
and
15 deletions
+145
-15
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
TzBaseEnterpriseInfoMapper.java
...oot/module/tzs/api/mapper/TzBaseEnterpriseInfoMapper.java
+15
-0
ITzBaseEnterpriseInfoService.java
.../module/tzs/api/service/ITzBaseEnterpriseInfoService.java
+4
-0
IRegUnitInfoService.java
.../boot/module/tzs/flc/api/service/IRegUnitInfoService.java
+7
-0
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+22
-2
TzBaseEnterpriseInfoController.java
...le/tzs/biz/controller/TzBaseEnterpriseInfoController.java
+22
-0
TzBaseEnterpriseInfoServiceImpl.java
...tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+33
-0
RegUnitInfoController.java
.../module/tzs/flc/biz/controller/RegUnitInfoController.java
+5
-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 @
f9652d0b
...
...
@@ -13,12 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.PathVariable
;
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.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -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 @
f9652d0b
...
...
@@ -23,4 +23,6 @@ public interface IDataDictionaryService {
public
List
<
DataDictionary
>
getByType
(
String
type
);
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 @
f9652d0b
...
...
@@ -156,7 +156,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
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
>();
wrapper
.
eq
(
DataDictionary:
:
getIsDelete
,
false
);
wrapper
.
eq
(
DataDictionary:
:
getType
,
type
);
...
...
@@ -165,4 +166,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
}
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/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
f9652d0b
...
...
@@ -27,5 +27,20 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
*/
List
<
EquEnterDto
>
getInfo
(
String
sequenceNbr
);
/**
* 根据企业名称查找设备
*
* @param useUnit 企业名称
* @return
*/
List
<
EquEnterDto
>
getInfoByUseUnit
(
String
useUnit
);
/**
* 根据企业名称查找企业详情信息
* @param useUnit
* @return
*/
TzBaseEnterpriseInfo
selectByUseUnit
(
String
useUnit
);
IPage
<
TzBaseEnterpriseInfoDto
>
page
(
Page
<
TzBaseEnterpriseInfoDto
>
page
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
);
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/ITzBaseEnterpriseInfoService.java
View file @
f9652d0b
...
...
@@ -28,4 +28,8 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
IPage
<
TzBaseEnterpriseInfoDto
>
page
(
PageParam
pageParam
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
);
TzBaseEnterpriseInfoDto
detail
(
Long
id
);
List
<
EquEnterDto
>
getInfoByUseUnit
(
String
useUnit
);
TzBaseEnterpriseInfoDto
selectByUseUnit
(
String
useUnit
);
}
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 @
f9652d0b
...
...
@@ -50,4 +50,11 @@ public interface IRegUnitInfoService {
* @return 是否成功
*/
Boolean
unitLogOut
(
String
unitCode
);
/**
* 校验是否已经存在相同的账号
* @param userName 账号
* @return true 已存在相同账号,不能注册 false 不存在账号,可以注册
*/
Boolean
checkRepeatAccount
(
String
userName
);
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
f9652d0b
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.yeejoin.amos.boot.module.tzs.api.mapper.TzBaseEnterpriseInfoMapper"
>
<select
id=
"getInfo"
<select
id=
"getInfo
ByUseUnit
"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.EquEnterDto"
>
SELECT
RI.sequence_nbr,
...
...
@@ -14,11 +14,27 @@
FROM
tz_jg_registration_info AS RI
LEFT JOIN tz_jg_use_info UI ON RI.sequence_code = UI.sequence_code
LEFT JOIN tz_base_enterprise_info EI ON EI.
sequence_nbr = #{sequenceNbr
}
LEFT JOIN tz_base_enterprise_info EI ON EI.
use_unit = #{useUnit
}
WHERE
EI.use_code = RI.organization_code
</select>
<select
id=
"getInfo"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.EquEnterDto"
>
SELECT
RI.sequence_nbr,
RI.use_org_code,
RI.equ_category,
RI.product_name,
UI.address
FROM
tz_jg_registration_info AS RI
LEFT JOIN tz_jg_use_info UI ON RI.sequence_code = UI.sequence_code
LEFT JOIN tz_base_enterprise_info EI ON EI.sequence_nbr = #{sequenceNbr}
WHERE
EI.use_code = RI.organization_code
</select>
<select
id=
"page"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.TzBaseEnterpriseInfoDto"
>
SELECT
...
...
@@ -64,4 +80,8 @@
</where>
</select>
<select
id=
"selectByUseUnit"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo"
>
select * from tz_base_enterprise_info where use_unit = #{useUnit}
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzBaseEnterpriseInfoController.java
View file @
f9652d0b
...
...
@@ -150,6 +150,14 @@ public class TzBaseEnterpriseInfoController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getEquInfoByUseUnit"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过企业名称查询设备"
,
notes
=
"通过企业名称查询设备"
)
public
ResponseModel
<
List
<
EquEnterDto
>>
getInfoByUseUnit
(
String
useUnit
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
getInfoByUseUnit
(
useUnit
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
IPage
<
TzBaseEnterpriseInfoDto
>>
page
(
PageParam
pageParam
,
...
...
@@ -157,4 +165,18 @@ public class TzBaseEnterpriseInfoController {
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
page
(
pageParam
,
tzBaseEnterpriseInfoDto
));
}
/**
* 根据企业名称查询企业详情
*
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
TzBaseEnterpriseInfoDto
>
selectByUseUnit
(
HttpServletRequest
request
,
String
useUnit
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
selectByUseUnit
(
useUnit
));
}
}
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 @
f9652d0b
...
...
@@ -95,4 +95,37 @@ public class TzBaseEnterpriseInfoServiceImpl
tzBaseEnterpriseInfoDto
.
setRegUnitIcDto
(
regUnitIcDto
);
return
tzBaseEnterpriseInfoDto
;
}
@Override
public
List
<
EquEnterDto
>
getInfoByUseUnit
(
String
userUnit
)
{
return
tzBaseEnterpriseInfoMapper
.
getInfoByUseUnit
(
userUnit
);
}
@Override
public
TzBaseEnterpriseInfoDto
selectByUseUnit
(
String
useUnit
)
{
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
=
new
TzBaseEnterpriseInfoDto
();
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
=
tzBaseEnterpriseInfoMapper
.
selectByUseUnit
(
useUnit
);
if
(
tzBaseEnterpriseInfo
!=
null
)
{
BeanUtils
.
copyProperties
(
tzBaseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
}
// 许可信息
List
<
BaseUnitLicence
>
unitLicences
=
baseUnitLicenceService
.
list
(
new
LambdaQueryWrapper
<
BaseUnitLicence
>()
.
eq
(
BaseUnitLicence:
:
getUnitCode
,
tzBaseEnterpriseInfo
.
getUseCode
()));
List
<
BaseUnitLicenceDto
>
unitLicenceDtos
=
new
ArrayList
<
BaseUnitLicenceDto
>();
for
(
BaseUnitLicence
baseUnitLicence
:
unitLicences
)
{
BaseUnitLicenceDto
baseUnitLicenceDto
=
new
BaseUnitLicenceDto
();
BeanUtils
.
copyProperties
(
baseUnitLicence
,
baseUnitLicenceDto
);
unitLicenceDtos
.
add
(
baseUnitLicenceDto
);
}
tzBaseEnterpriseInfoDto
.
setUnitLicences
(
unitLicenceDtos
);
// 工商信息
RegUnitIc
regUnitIc
=
regUnitIcService
.
getOne
(
new
LambdaQueryWrapper
<
RegUnitIc
>().
eq
(
RegUnitIc:
:
getUnitCode
,
tzBaseEnterpriseInfo
.
getUseCode
()));
RegUnitIcDto
regUnitIcDto
=
new
RegUnitIcDto
();
if
(
regUnitIc
!=
null
)
{
BeanUtils
.
copyProperties
(
regUnitIc
,
regUnitIcDto
);
}
tzBaseEnterpriseInfoDto
.
setRegUnitIcDto
(
regUnitIcDto
);
return
tzBaseEnterpriseInfoDto
;
}
}
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 @
f9652d0b
...
...
@@ -96,7 +96,7 @@ public class RegUnitInfoController extends BaseController {
throw
new
BadRequest
(
"手机号不能为空"
);
}
Boolean
isReg
=
(
Boolean
)
Privilege
.
authClient
.
mobileVerify
(
tel
).
getResult
();
if
(
isReg
)
{
if
(
isReg
)
{
throw
new
RuntimeException
(
"该手机号已注册!"
);
}
Boolean
flag
;
...
...
@@ -151,12 +151,13 @@ public class RegUnitInfoController extends BaseController {
@GetMapping
(
value
=
"/{userName}/hasExistUser"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户是否存在"
,
notes
=
"判断用户是否存在"
)
public
ResponseModel
<
Boolean
>
hasExistUser
(
@PathVariable
(
value
=
"userName"
)
String
userName
)
{
boolean
flag
=
false
;
// 1.先看平台是否已经存在相同用户名用户
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserName
(
userName
).
getResult
();
if
(
user
!=
null
)
{
flag
=
true
;
return
ResponseHelper
.
buildResponse
(
false
)
;
}
return
ResponseHelper
.
buildResponse
(
flag
);
// 2.再校验本地是否,有其他企业注册过
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 @
f9652d0b
...
...
@@ -118,12 +118,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
Bean
.
copyExistPropertis
(
model
.
getRegUnitIc
(),
regUnitIc
);
regUnitIcService
.
saveOrUpdate
(
regUnitIc
);
// 3.调用平台进行创建单位、用户信息,同步用户信息
if
(
UnitReviewStateEnum
.
NO_NEED_REVIEW
.
getCode
().
equals
(
model
.
getState
()))
{
//
if (UnitReviewStateEnum.NO_NEED_REVIEW.getCode().equals(model.getState())) {
// 3.1 创建企业信息
this
.
createBaseEnterpriseInfo
(
model
);
// 3.2 自动创建:调用平台进行创建单位、用户信息
this
.
createCompanyAndUser
(
regUnitInfo
);
}
//
}
// 4.插入注册单位基本信息表:tz_flc_reg_unit_info
this
.
save
(
regUnitInfo
);
// 5.组织返回数据
...
...
@@ -281,6 +281,11 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
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
)
{
cm
.
setChildren
(
this
.
getFilterChild
(
cm
.
getChildren
()
!=
null
?
cm
.
getChildren
()
:
new
ArrayList
()));
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 @
f9652d0b
...
...
@@ -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');
</sql>
</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>
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