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
01f9d1a7
Commit
01f9d1a7
authored
Sep 02, 2022
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交添加用户组代码
parent
6936134e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
6 deletions
+28
-6
BaseEnterpriseMqTtlListener.java
.../module/tzs/biz/listener/BaseEnterpriseMqTtlListener.java
+5
-1
CarcylUnitInspectMqTtlListener.java
...dule/tzs/biz/listener/CarcylUnitInspectMqTtlListener.java
+7
-1
RegUnitInfoServiceImpl.java
...dule/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+8
-0
application-dev.properties
...ule-tzs-biz/src/main/resources/application-dev.properties
+4
-2
application-dev2.properties
...le-tzs-biz/src/main/resources/application-dev2.properties
+4
-2
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/listener/BaseEnterpriseMqTtlListener.java
View file @
01f9d1a7
...
@@ -56,6 +56,8 @@ public class BaseEnterpriseMqTtlListener extends EmqxListener {
...
@@ -56,6 +56,8 @@ public class BaseEnterpriseMqTtlListener extends EmqxListener {
@Autowired
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
DataDictionaryServiceImpl
iDataDictionaryService
;
@Value
(
"${org.filter.group.seq}"
)
private
Long
groupSeq
;
@Override
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
throws
Exception
{
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
throws
Exception
{
...
@@ -138,7 +140,9 @@ public class BaseEnterpriseMqTtlListener extends EmqxListener {
...
@@ -138,7 +140,9 @@ public class BaseEnterpriseMqTtlListener extends EmqxListener {
}
}
userModel
.
setAppCodes
(
new
ArrayList
<>(
appCodesSet
));
userModel
.
setAppCodes
(
new
ArrayList
<>(
appCodesSet
));
userModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userModel
.
setOrgRoleSeqs
(
roleSeqMap
);
Privilege
.
agencyUserClient
.
create
(
userModel
);
FeignClientResult
<
AgencyUserModel
>
userResult
=
Privilege
.
agencyUserClient
.
create
(
userModel
);
String
[]
userIds
=
{
userResult
.
getResult
().
getUserId
()};
Privilege
.
groupUserClient
.
create
(
groupSeq
,
Arrays
.
asList
(
userIds
)
);
}
}
}
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/listener/CarcylUnitInspectMqTtlListener.java
View file @
01f9d1a7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
listener
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
listener
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -46,6 +47,9 @@ public class CarcylUnitInspectMqTtlListener extends EmqxListener {
...
@@ -46,6 +47,9 @@ public class CarcylUnitInspectMqTtlListener extends EmqxListener {
@Autowired
@Autowired
RedisUtil
redisUtil
;
RedisUtil
redisUtil
;
@Value
(
"${org.filter.group.seq}"
)
private
Long
groupSeq
;
@Override
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
throws
Exception
{
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
throws
Exception
{
System
.
out
.
println
(
message
);
System
.
out
.
println
(
message
);
...
@@ -99,7 +103,9 @@ public class CarcylUnitInspectMqTtlListener extends EmqxListener {
...
@@ -99,7 +103,9 @@ public class CarcylUnitInspectMqTtlListener extends EmqxListener {
orgRoles
.
put
(
id
,
roleIds
);
orgRoles
.
put
(
id
,
roleIds
);
userModel
.
setAppCodes
(
appCodes
);
userModel
.
setAppCodes
(
appCodes
);
userModel
.
setOrgRoleSeqs
(
orgRoles
);
userModel
.
setOrgRoleSeqs
(
orgRoles
);
Privilege
.
agencyUserClient
.
create
(
userModel
);
FeignClientResult
<
AgencyUserModel
>
userResult
=
Privilege
.
agencyUserClient
.
create
(
userModel
);
String
[]
userIds
=
{
userResult
.
getResult
().
getUserId
()};
Privilege
.
groupUserClient
.
create
(
groupSeq
,
Arrays
.
asList
(
userIds
)
);
}
}
}
}
}
}
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 @
01f9d1a7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -14,6 +15,7 @@ import java.util.stream.Collectors;
...
@@ -14,6 +15,7 @@ import java.util.stream.Collectors;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -88,6 +90,10 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -88,6 +90,10 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
* 单位类型,数据来源:cb_data_dictionary type = UNIT_TYPE
* 单位类型,数据来源:cb_data_dictionary type = UNIT_TYPE
*/
*/
private
static
String
DICT_TYPE_UNIT_TYPE
=
"UNIT_TYPE_NEW"
;
private
static
String
DICT_TYPE_UNIT_TYPE
=
"UNIT_TYPE_NEW"
;
@Value
(
"${org.filter.group.seq}"
)
private
Long
groupSeq
;
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -420,6 +426,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -420,6 +426,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
if
(
userResult
==
null
||
userResult
.
getResult
()
==
null
)
{
if
(
userResult
==
null
||
userResult
.
getResult
()
==
null
)
{
throw
new
BadRequest
(
"单位注册失败"
);
throw
new
BadRequest
(
"单位注册失败"
);
}
}
String
[]
userIds
=
{
userResult
.
getResult
().
getUserId
()};
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAdminUserId
(
userResult
.
getResult
().
getUserId
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
().
toString
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
().
toString
());
// 3.3 org_user 创建组织机构
// 3.3 org_user 创建组织机构
...
@@ -433,6 +440,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -433,6 +440,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
org
.
setAmosOrgId
(
companyInfo
.
getSequenceNbr
()
+
""
);
org
.
setAmosOrgId
(
companyInfo
.
getSequenceNbr
()
+
""
);
org
.
setAmosOrgCode
(
companyInfo
.
getOrgCode
());
org
.
setAmosOrgCode
(
companyInfo
.
getOrgCode
());
iOrgUsrService
.
save
(
org
);
iOrgUsrService
.
save
(
org
);
Privilege
.
groupUserClient
.
create
(
groupSeq
,
Arrays
.
asList
(
userIds
)
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
// 删除已经创建的 企业信息
// 删除已经创建的 企业信息
if
(
companyInfo
!=
null
&&
companyInfo
.
getSequenceNbr
()
!=
null
)
{
if
(
companyInfo
!=
null
&&
companyInfo
.
getSequenceNbr
()
!=
null
)
{
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev.properties
View file @
01f9d1a7
...
@@ -51,4 +51,6 @@ tzs.cti.url=http://172.16.10.90:8000
...
@@ -51,4 +51,6 @@ tzs.cti.url=http://172.16.10.90:8000
rule.definition.load
=
false
rule.definition.load
=
false
rule.definition.model-package
=
com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.model-package
=
com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.default-agency
=
tzs
rule.definition.default-agency
=
tzs
rule.definition.localIp
=
172.16.3.39
rule.definition.localIp
=
172.16.3.39
\ No newline at end of file
org.filter.group.seq
=
1564150103147573249
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev2.properties
View file @
01f9d1a7
...
@@ -51,4 +51,6 @@ tzs.cti.url=http://113.134.211.174:8000
...
@@ -51,4 +51,6 @@ tzs.cti.url=http://113.134.211.174:8000
rule.definition.load
=
false
rule.definition.load
=
false
rule.definition.model-package
=
com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.model-package
=
com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.default-agency
=
tzs
rule.definition.default-agency
=
tzs
#
rule.definition.localIp
=
172.16.3.34
#rule.definition.localIp=172.16.3.34
\ No newline at end of file
org.filter.group.seq
=
1564150103147573249
\ No newline at end of file
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