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
86444680
Commit
86444680
authored
Jul 03, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(综合搜索):增量数据刷库增加口
1.企业、单位、人员增加
parent
cb456ee1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
112 additions
and
6 deletions
+112
-6
CommonPublisher.java
...in/amos/boot/module/common/biz/event/CommonPublisher.java
+24
-0
DataRefreshEvent.java
...amos/boot/module/common/biz/refresh/DataRefreshEvent.java
+6
-0
EquipRefreshHandler.java
...ot/module/jg/biz/refresh/handler/EquipRefreshHandler.java
+1
-1
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+6
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+24
-2
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+7
-0
TzsBaseIndividualityServiceImpl.java
...tcm/biz/service/impl/TzsBaseIndividualityServiceImpl.java
+9
-1
TzsBaseInstitutionServiceImpl.java
...e/tcm/biz/service/impl/TzsBaseInstitutionServiceImpl.java
+10
-1
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+17
-0
RegUnitInfoServiceImpl.java
...dule/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+8
-1
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/event/CommonPublisher.java
0 → 100644
View file @
86444680
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
event
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.ApplicationEventPublisherAware
;
import
org.springframework.stereotype.Component
;
/**
* @author Administrator
*/
@Component
public
class
CommonPublisher
implements
ApplicationEventPublisherAware
{
private
ApplicationEventPublisher
publisher
;
@Override
public
void
setApplicationEventPublisher
(
ApplicationEventPublisher
applicationEventPublisher
)
{
this
.
publisher
=
applicationEventPublisher
;
}
public
void
publish
(
ApplicationEvent
event
)
{
publisher
.
publishEvent
(
event
);
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/refresh/DataRefreshEvent.java
View file @
86444680
...
@@ -41,4 +41,10 @@ public class DataRefreshEvent extends ApplicationEvent {
...
@@ -41,4 +41,10 @@ public class DataRefreshEvent extends ApplicationEvent {
UPDATE
,
UPDATE
,
DELETE
DELETE
}
}
public
enum
DataType
{
equipment
,
enterprise
,
user
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/refresh/handler/EquipRefreshHandler.java
View file @
86444680
...
@@ -47,7 +47,7 @@ public class EquipRefreshHandler implements IDataRefreshHandler {
...
@@ -47,7 +47,7 @@ public class EquipRefreshHandler implements IDataRefreshHandler {
@Override
@Override
public
String
supportType
()
{
public
String
supportType
()
{
return
"
company
"
;
return
"
equipment
"
;
}
}
@Override
@Override
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgProjectContraptionServiceImplService.java
View file @
86444680
...
@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
...
@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
...
@@ -30,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
...
@@ -30,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.core.BaseEntityService
;
import
com.yeejoin.amos.boot.module.jg.biz.core.BaseEntityService
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgProjectContraptionService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgProjectContraptionService
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
...
@@ -141,6 +143,9 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -141,6 +143,9 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
@Autowired
@Autowired
private
CommonMapper
commonMapper
;
private
CommonMapper
commonMapper
;
@Autowired
private
EventPublisher
eventPublisher
;
@Override
@Override
public
boolean
saveOrUpdateData
(
IdxBizJgProjectContraption
projectContraption
)
{
public
boolean
saveOrUpdateData
(
IdxBizJgProjectContraption
projectContraption
)
{
return
super
.
saveOrUpdateWithNull
(
projectContraption
);
return
super
.
saveOrUpdateWithNull
(
projectContraption
);
...
@@ -203,6 +208,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -203,6 +208,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
// 删除装置表信息
// 删除装置表信息
this
.
removeById
(
sequenceNbr
);
this
.
removeById
(
sequenceNbr
);
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
useInfos
.
stream
().
map
(
IdxBizJgUseInfo:
:
getRecord
).
collect
(
Collectors
.
toList
()),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
DELETE
));
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
86444680
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.EquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.EquipmentCategoryService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
...
@@ -435,21 +436,40 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -435,21 +436,40 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ResponseModel
responseModel
=
this
.
pipelineEquipCreateOrUpdate
(
paramMap
);
ResponseModel
responseModel
=
this
.
pipelineEquipCreateOrUpdate
(
paramMap
);
Long
projectContraptionId
=
(
Long
)
responseModel
.
getResult
();
Long
projectContraptionId
=
(
Long
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
Sets
.
newHashSet
(
projectContraptionId
.
toString
()),
EquipCreateOrEditEvent
.
EquipType
.
project
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_PROJECT
.
name
(),
Sets
.
newHashSet
(
projectContraptionId
.
toString
()),
EquipCreateOrEditEvent
.
EquipType
.
project
));
this
.
sendDataRefreshMsgProjectContraption
(
projectContraptionId
);
return
responseModel
;
return
responseModel
;
}
}
if
(
dataSource
.
contains
(
"black"
)){
if
(
dataSource
.
contains
(
"black"
)){
ResponseModel
responseModel
=
this
.
blackEquipCreateOrUpdate
(
paramMap
);
ResponseModel
responseModel
=
this
.
blackEquipCreateOrUpdate
(
paramMap
);
String
record
=
(
String
)
responseModel
.
getResult
();
String
record
=
(
String
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
this
.
sendDataRefreshMsgEquip
(
record
);
return
responseModel
;
return
responseModel
;
}
else
{
}
else
{
ResponseModel
responseModel
=
this
.
otherEquipCreateOrUpdate
(
paramMap
);
ResponseModel
responseModel
=
this
.
otherEquipCreateOrUpdate
(
paramMap
);
String
record
=
(
String
)
responseModel
.
getResult
();
String
record
=
(
String
)
responseModel
.
getResult
();
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
eventPublisher
.
publish
(
new
EquipCreateOrEditEvent
(
this
,
BusinessTypeEnum
.
JG_NEW_EQUIP
.
name
(),
Sets
.
newHashSet
(
record
),
EquipCreateOrEditEvent
.
EquipType
.
equip
));
this
.
sendDataRefreshMsgEquip
(
record
);
return
responseModel
;
return
responseModel
;
}
}
}
}
private
void
sendDataRefreshMsgEquip
(
String
record
)
{
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
record
),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
/**
*
* 发送管道编辑信息-用于将装置下管道同步到
* @param projectContraptionId 装置id
*/
private
void
sendDataRefreshMsgProjectContraption
(
Long
projectContraptionId
)
{
List
<
IdxBizJgUseInfo
>
useInfos
=
idxBizJgUseInfoService
.
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>()
.
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionId
)
.
select
(
IdxBizJgUseInfo:
:
getRecord
));
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
useInfos
.
stream
().
map
(
IdxBizJgUseInfo:
:
getRecord
).
collect
(
Collectors
.
toList
()),
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
/**
/**
* 管道设备新增或更新
* 管道设备新增或更新
*
*
...
@@ -1067,10 +1087,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1067,10 +1087,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
/**
/**
* 删除设备注册信息(批量删除)
* 删除设备注册信息(批量删除)
*
*
* @param map
* @param map
records
* @return
* @return
是否成功
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
batchDeleteByRecord
(
Map
<
String
,
Object
>
map
)
{
public
boolean
batchDeleteByRecord
(
Map
<
String
,
Object
>
map
)
{
Object
recordList
=
map
.
get
(
"recordList"
);
Object
recordList
=
map
.
get
(
"recordList"
);
List
<
String
>
records
=
new
ArrayList
<>();
List
<
String
>
records
=
new
ArrayList
<>();
...
@@ -1101,6 +1122,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1101,6 +1122,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 删除es中的数据
// 删除es中的数据
esEquipmentCategory
.
deleteAll
(
list
);
esEquipmentCategory
.
deleteAll
(
list
);
}
}
eventPublisher
.
publish
(
new
DataRefreshEvent
(
this
,
records
,
DataRefreshEvent
.
DataType
.
equipment
.
name
(),
DataRefreshEvent
.
Operation
.
DELETE
));
return
true
;
return
true
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
86444680
...
@@ -18,6 +18,8 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
...
@@ -18,6 +18,8 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RequestContextWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.RequestContextWrapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.UserPermissionDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.UserPermissionDto
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.BaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.BaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
...
@@ -132,6 +134,9 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -132,6 +134,9 @@ public class TzBaseEnterpriseInfoServiceImpl
@Qualifier
(
"tcmTaskExecutor"
)
@Qualifier
(
"tcmTaskExecutor"
)
private
ThreadPoolTaskExecutor
threadPoolTaskExecutor
;
private
ThreadPoolTaskExecutor
threadPoolTaskExecutor
;
@Autowired
private
CommonPublisher
publisher
;
/**
/**
* 公司类型下的资质类型map:key为登录人的公司类型、value为包含的资质枚举
* 公司类型下的资质类型map:key为登录人的公司类型、value为包含的资质枚举
*/
*/
...
@@ -718,6 +723,7 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -718,6 +723,7 @@ public class TzBaseEnterpriseInfoServiceImpl
updateUserInfo
(
newData
,
String
.
valueOf
(
map
.
get
(
"useCode"
)));
updateUserInfo
(
newData
,
String
.
valueOf
(
map
.
get
(
"useCode"
)));
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
=
new
TzBaseEnterpriseInfoDto
();
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
=
new
TzBaseEnterpriseInfoDto
();
BeanUtils
.
copyProperties
(
tzBaseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
BeanUtils
.
copyProperties
(
tzBaseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
tzBaseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
tzBaseEnterpriseInfoDto
;
return
tzBaseEnterpriseInfoDto
;
}
else
{
}
else
{
return
null
;
return
null
;
...
@@ -1178,6 +1184,7 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -1178,6 +1184,7 @@ public class TzBaseEnterpriseInfoServiceImpl
BeanUtils
.
copyProperties
(
tzBaseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
BeanUtils
.
copyProperties
(
tzBaseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
// 更新完成后清理缓存
// 更新完成后清理缓存
redisUtil
.
del
(
RedisKey
.
buildReginRoleKey
(
agencyUserModel
.
getUserId
()));
redisUtil
.
del
(
RedisKey
.
buildReginRoleKey
(
agencyUserModel
.
getUserId
()));
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
tzBaseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
tzBaseEnterpriseInfoDto
;
return
tzBaseEnterpriseInfoDto
;
}
else
{
}
else
{
return
null
;
return
null
;
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsBaseIndividualityServiceImpl.java
View file @
86444680
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.AccountDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.AccountDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.BasePersonRegisterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.BasePersonRegisterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseIndividualityDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseIndividualityDto
;
...
@@ -28,6 +30,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -28,6 +30,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -46,6 +49,9 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
...
@@ -46,6 +49,9 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
@Autowired
@Autowired
StartPlatformTokenService
startPlatformTokenService
;
StartPlatformTokenService
startPlatformTokenService
;
@Autowired
private
CommonPublisher
publisher
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -63,6 +69,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
...
@@ -63,6 +69,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
personRegister
(
BasePersonRegisterDto
dto
)
{
public
void
personRegister
(
BasePersonRegisterDto
dto
)
{
TzBaseEnterpriseInfo
baseEnterpriseInfo
;
startPlatformTokenService
.
setRequestContext
();
startPlatformTokenService
.
setRequestContext
();
dto
.
setName
(
dto
.
getRealName
());
dto
.
setName
(
dto
.
getRealName
());
dto
.
setUnitCode
(
dto
.
getCredentialsType
()
+
"_"
+
dto
.
getCredentialsNum
());
dto
.
setUnitCode
(
dto
.
getCredentialsType
()
+
"_"
+
dto
.
getCredentialsNum
());
...
@@ -94,7 +101,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
...
@@ -94,7 +101,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
dto
.
setAdminUserId
(
user
.
getUserId
());
dto
.
setAdminUserId
(
user
.
getUserId
());
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
TzBaseEnterpriseInfo
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
GR_ZT
.
getType
());
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
GR_ZT
.
getType
());
TzsBaseIndividuality
tzsBaseIndividuality
=
new
TzsBaseIndividuality
();
TzsBaseIndividuality
tzsBaseIndividuality
=
new
TzsBaseIndividuality
();
BeanUtils
.
copyProperties
(
dto
,
tzsBaseIndividuality
);
BeanUtils
.
copyProperties
(
dto
,
tzsBaseIndividuality
);
tzsBaseIndividuality
.
setEnterpriseId
(
baseEnterpriseInfo
.
getSequenceNbr
());
tzsBaseIndividuality
.
setEnterpriseId
(
baseEnterpriseInfo
.
getSequenceNbr
());
...
@@ -122,6 +129,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
...
@@ -122,6 +129,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
}
}
throw
new
RuntimeException
(
"个体单位注册失败: "
+
e
.
getMessage
()
+
" 请联系管理员!"
);
throw
new
RuntimeException
(
"个体单位注册失败: "
+
e
.
getMessage
()
+
" 请联系管理员!"
);
}
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
baseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
}
}
public
RegUnitInfoDto
adminInfo
(
String
unitCode
)
{
public
RegUnitInfoDto
adminInfo
(
String
unitCode
)
{
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsBaseInstitutionServiceImpl.java
View file @
86444680
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.AccountDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.AccountDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.BaseInstitutionRegisterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.BaseInstitutionRegisterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseInstitutionDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseInstitutionDto
;
...
@@ -29,6 +31,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -29,6 +31,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -51,6 +54,10 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
...
@@ -51,6 +54,10 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
@Autowired
@Autowired
StartPlatformTokenService
startPlatformTokenService
;
StartPlatformTokenService
startPlatformTokenService
;
@Autowired
private
CommonPublisher
publisher
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -86,6 +93,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
...
@@ -86,6 +93,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
companyInfo
.
setCompanyType
(
unitType
);
companyInfo
.
setCompanyType
(
unitType
);
companyInfo
.
setLandlinePhone
(
dto
.
getLegalPersonTel
());
companyInfo
.
setLandlinePhone
(
dto
.
getLegalPersonTel
());
dto
.
setName
(
dto
.
getRegUnitMessage
().
getUnitName
());
dto
.
setName
(
dto
.
getRegUnitMessage
().
getUnitName
());
TzBaseEnterpriseInfo
baseEnterpriseInfo
;
try
{
try
{
startPlatformTokenService
.
setRequestContext
();
startPlatformTokenService
.
setRequestContext
();
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
...
@@ -105,7 +113,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
...
@@ -105,7 +113,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
dto
.
setAdminUserId
(
user
.
getUserId
());
dto
.
setAdminUserId
(
user
.
getUserId
());
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
TzBaseEnterpriseInfo
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
SY_DW
.
getType
());
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
SY_DW
.
getType
());
TzsBaseInstitution
tzsBaseInstitution
=
new
TzsBaseInstitution
();
TzsBaseInstitution
tzsBaseInstitution
=
new
TzsBaseInstitution
();
BeanUtils
.
copyProperties
(
dto
.
getRegUnitMessage
(),
tzsBaseInstitution
);
BeanUtils
.
copyProperties
(
dto
.
getRegUnitMessage
(),
tzsBaseInstitution
);
tzsBaseInstitution
.
setUseCode
(
dto
.
getUnitCode
());
tzsBaseInstitution
.
setUseCode
(
dto
.
getUnitCode
());
...
@@ -161,6 +169,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
...
@@ -161,6 +169,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
throw
new
RuntimeException
(
"事业单位注册失败,请联系管理员!"
);
throw
new
RuntimeException
(
"事业单位注册失败,请联系管理员!"
);
}
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
baseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
86444680
...
@@ -17,6 +17,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -17,6 +17,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.base.Functions
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
@@ -28,6 +30,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
...
@@ -28,6 +30,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.common.api.dto.UserPermissionDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.UserPermissionDto
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.*
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.*
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.*
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.*
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum
;
...
@@ -128,6 +132,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -128,6 +132,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Autowired
@Autowired
private
RegUnitInfoServiceImpl
regUnitInfoService
;
private
RegUnitInfoServiceImpl
regUnitInfoService
;
@Autowired
private
CommonPublisher
publisher
;
private
static
Map
<
String
,
String
>
statusColorMap
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
statusColorMap
=
new
HashMap
<>();
static
{
static
{
...
@@ -311,13 +318,16 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -311,13 +318,16 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfo
.
setIsDelete
(
true
);
tzsUserInfo
.
setIsDelete
(
true
);
tzsUserInfoMapper
.
update
(
tzsUserInfo
,
lambda
);
tzsUserInfoMapper
.
update
(
tzsUserInfo
,
lambda
);
List
<
TzsUserInfo
>
tzsUserInfos
=
tzsUserInfoMapper
.
selectList
(
lambda
);
List
<
TzsUserInfo
>
tzsUserInfos
=
tzsUserInfoMapper
.
selectList
(
lambda
);
List
<
String
>
ids
=
new
ArrayList
<>();
for
(
TzsUserInfo
userInfo
:
tzsUserInfos
)
{
for
(
TzsUserInfo
userInfo
:
tzsUserInfos
)
{
ids
.
add
(
userInfo
.
getSequenceNbr
()
+
""
);
tzsUserEquipMapper
.
delete
(
new
QueryWrapper
<
TzsUserEquip
>().
eq
(
"user_seq"
,
userInfo
.
getSequenceNbr
()));
tzsUserEquipMapper
.
delete
(
new
QueryWrapper
<
TzsUserEquip
>().
eq
(
"user_seq"
,
userInfo
.
getSequenceNbr
()));
if
(!
ObjectUtils
.
isEmpty
(
userInfo
.
getAmosUserId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
userInfo
.
getAmosUserId
()))
{
Privilege
.
agencyUserClient
.
multDeleteUser
(
userInfo
.
getAmosUserId
());
Privilege
.
agencyUserClient
.
multDeleteUser
(
userInfo
.
getAmosUserId
());
deleteGroupAndPersonRelation
(
userInfo
.
getPostName
(),
userInfo
.
getAmosUserId
());
deleteGroupAndPersonRelation
(
userInfo
.
getPostName
(),
userInfo
.
getAmosUserId
());
}
}
}
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
ids
,
DataRefreshEvent
.
DataType
.
user
.
name
(),
DataRefreshEvent
.
Operation
.
DELETE
));
}
}
...
@@ -822,6 +832,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -822,6 +832,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
* @return res
* @return res
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
personnelTransferOut
(
String
userSeqNbrs
)
{
public
Boolean
personnelTransferOut
(
String
userSeqNbrs
)
{
List
<
Long
>
seqNbrs
=
new
ArrayList
<>(
Arrays
.
asList
(
userSeqNbrs
.
split
(
","
))).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
List
<
Long
>
seqNbrs
=
new
ArrayList
<>(
Arrays
.
asList
(
userSeqNbrs
.
split
(
","
))).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
// 逻辑删除用户+标识转出操作时间
// 逻辑删除用户+标识转出操作时间
...
@@ -842,6 +853,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -842,6 +853,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
Optional
.
of
(
deleteUserIds
)
Optional
.
of
(
deleteUserIds
)
.
filter
(
ids
->
!
ObjectUtils
.
isEmpty
(
ids
))
.
filter
(
ids
->
!
ObjectUtils
.
isEmpty
(
ids
))
.
ifPresent
(
ids
->
Privilege
.
agencyUserClient
.
multDeleteUser
(
ids
));
.
ifPresent
(
ids
->
Privilege
.
agencyUserClient
.
multDeleteUser
(
ids
));
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Lists
.
transform
(
seqNbrs
,
Functions
.
toStringFunction
()),
DataRefreshEvent
.
DataType
.
user
.
name
(),
DataRefreshEvent
.
Operation
.
DELETE
));
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
@@ -973,6 +985,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -973,6 +985,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
Privilege
.
agencyUserClient
.
modifyMobile
(
userModel
,
userModel
.
getUserId
());
Privilege
.
agencyUserClient
.
modifyMobile
(
userModel
,
userModel
.
getUserId
());
}
}
}
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
individualityDto
.
getEnterpriseId
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
individualityDto
;
return
individualityDto
;
}
}
...
@@ -1123,6 +1136,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1123,6 +1136,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfo
=
this
.
createWithModel
(
tzsUserInfo
);
tzsUserInfo
=
this
.
createWithModel
(
tzsUserInfo
);
// 保存资质
// 保存资质
tzsUserPermissionServiceImpl
.
savePermissionData
(
tzsUserInfo
);
tzsUserPermissionServiceImpl
.
savePermissionData
(
tzsUserInfo
);
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
tzsUserInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
user
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
return
tzsUserInfo
;
return
tzsUserInfo
;
}
}
...
@@ -1272,6 +1286,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1272,6 +1286,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
this
.
updateWithModel
(
tzsUserInfoDto
);
this
.
updateWithModel
(
tzsUserInfoDto
);
// 更新人员信息同步平台
// 更新人员信息同步平台
syncNewPost
(
tzsUserInfoDto
);
syncNewPost
(
tzsUserInfoDto
);
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
rowId
+
""
),
DataRefreshEvent
.
DataType
.
user
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
tzsUserInfoDto
;
return
tzsUserInfoDto
;
}
}
...
@@ -1817,6 +1832,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -1817,6 +1832,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
userInfoMap
.
keySet
().
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
toList
()),
DataRefreshEvent
.
DataType
.
user
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
return
ResponseHelper
.
buildResponse
(
"succese"
);
return
ResponseHelper
.
buildResponse
(
"succese"
);
}
}
...
@@ -2279,6 +2295,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -2279,6 +2295,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
TzIndividualityDto
individualityDto
=
new
TzIndividualityDto
();
TzIndividualityDto
individualityDto
=
new
TzIndividualityDto
();
BeanUtils
.
copyProperties
(
individuality
,
individualityDto
);
BeanUtils
.
copyProperties
(
individuality
,
individualityDto
);
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
individualityDto
.
getEnterpriseId
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
return
individualityDto
;
return
individualityDto
;
}
}
...
...
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 @
86444680
...
@@ -16,6 +16,8 @@ import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
...
@@ -16,6 +16,8 @@ import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.tcm.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.tcm.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.AccountDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.AccountDto
;
...
@@ -165,6 +167,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -165,6 +167,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
private
boolean
isUgp
;
private
boolean
isUgp
;
@Autowired
@Autowired
private
CommonPublisher
publisher
;
@Autowired
DataDictionaryServiceImpl
dataDictionaryService
;
DataDictionaryServiceImpl
dataDictionaryService
;
@Override
@Override
...
@@ -176,6 +181,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -176,6 +181,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
model
.
setUnitCode
(
model
.
getForm
().
getString
(
"unitCode"
));
model
.
setUnitCode
(
model
.
getForm
().
getString
(
"unitCode"
));
}
}
RegUnitInfo
regUnitInfo
=
new
RegUnitInfo
();
RegUnitInfo
regUnitInfo
=
new
RegUnitInfo
();
TzBaseEnterpriseInfo
baseEnterpriseInfo
;
try
{
try
{
startPlatformTokenService
.
setRequestContext
();
startPlatformTokenService
.
setRequestContext
();
// 注册用统一信用码注册,默认证件类型为营业执照,数据来源:cb_data_dictionary code = 1060
// 注册用统一信用码注册,默认证件类型为营业执照,数据来源:cb_data_dictionary code = 1060
...
@@ -219,7 +225,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -219,7 +225,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
regUnitIcService
.
saveOrUpdate
(
regUnitIc
);
regUnitIcService
.
saveOrUpdate
(
regUnitIc
);
// 5.创建企业信息:tz_base_enterprise_info
// 5.创建企业信息:tz_base_enterprise_info
model
.
setAppId
(
regUnitInfo
.
getAppId
());
model
.
setAppId
(
regUnitInfo
.
getAppId
());
this
.
createBaseEnterpriseInfo
(
model
,
EnterpriseEnums
.
QY_DW
.
getType
());
baseEnterpriseInfo
=
this
.
createBaseEnterpriseInfo
(
model
,
EnterpriseEnums
.
QY_DW
.
getType
());
if
(!
ObjectUtils
.
isEmpty
(
regUnitInfo
.
getAdminName
()))
{
if
(!
ObjectUtils
.
isEmpty
(
regUnitInfo
.
getAdminName
()))
{
regUnitInfo
.
setContactPerson
(
regUnitInfo
.
getAdminName
());
regUnitInfo
.
setContactPerson
(
regUnitInfo
.
getAdminName
());
}
}
...
@@ -270,6 +276,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -270,6 +276,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
throw
new
BadRequest
(
"企业注册失败,请联系管理员!"
);
throw
new
BadRequest
(
"企业注册失败,请联系管理员!"
);
}
}
}
}
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
baseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
return
model
;
return
model
;
}
}
...
...
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