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
7fafe95b
Commit
7fafe95b
authored
Aug 01, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(开通):bug修改
1.整机刷数据接口
parent
684b91df
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
208 additions
and
2 deletions
+208
-2
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
+4
-0
TzsUserInfoMapper.java
...in/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
+2
-0
RegUnitInfoMapper.java
...mos/boot/module/tcm/flc/api/mapper/RegUnitInfoMapper.java
+2
-0
RegUnitInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/RegUnitInfoMapper.xml
+14
-2
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+16
-0
HisDataHandlerController.java
...t/module/tcm/biz/controller/HisDataHandlerController.java
+43
-0
HisDataHandlerServiceImpl.java
...odule/tcm/biz/service/impl/HisDataHandlerServiceImpl.java
+127
-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/api/dto/TzsUserInfoDto.java
View file @
7fafe95b
...
@@ -155,4 +155,8 @@ public class TzsUserInfoDto extends BaseDto {
...
@@ -155,4 +155,8 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
protected
Date
createDate
;
protected
Date
createDate
;
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitType
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
View file @
7fafe95b
...
@@ -61,4 +61,6 @@ public interface TzsUserInfoMapper extends BaseMapper<TzsUserInfo> {
...
@@ -61,4 +61,6 @@ public interface TzsUserInfoMapper extends BaseMapper<TzsUserInfo> {
* @return 对象列表
* @return 对象列表
*/
*/
List
<
UserPermissionDto
>
queryUserByPermissionOfOneCompany
(
@Param
(
"filter"
)
UserPermissionDto
filter
);
List
<
UserPermissionDto
>
queryUserByPermissionOfOneCompany
(
@Param
(
"filter"
)
UserPermissionDto
filter
);
List
<
TzsUserInfoDto
>
select6616User
();
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/api/mapper/RegUnitInfoMapper.java
View file @
7fafe95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
flc
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
flc
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -19,4 +20,5 @@ public interface RegUnitInfoMapper extends BaseMapper<RegUnitInfo> {
...
@@ -19,4 +20,5 @@ public interface RegUnitInfoMapper extends BaseMapper<RegUnitInfo> {
RegUnitInfo
userIdINfo
(
String
userId
);
RegUnitInfo
userIdINfo
(
String
userId
);
List
<
RegUnitInfo
>
selectAdminUserOfJyjc
();
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/RegUnitInfoMapper.xml
View file @
7fafe95b
...
@@ -119,8 +119,20 @@
...
@@ -119,8 +119,20 @@
admin_user_id=#{userId}
admin_user_id=#{userId}
</select>
</select>
<select
id=
"selectAdminUserOfJyjc"
resultType=
"com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo"
>
SELECT
ui.admin_user_id,
e.unit_type
FROM
"tz_flc_reg_unit_info" ui,
"tz_base_enterprise_info" e
where
ui.unit_code = e.use_code
and ui.admin_user_id
<![CDATA[<>]]>
''
and e.is_delete = false
and (e.unit_type like '%检验机构%' or e.unit_type like '%检测机构%')
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
7fafe95b
...
@@ -373,4 +373,19 @@
...
@@ -373,4 +373,19 @@
</if>
</if>
a.uid desc
a.uid desc
</select>
</select>
<select
id=
"select6616User"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto"
>
SELECT
u.amos_user_id,
e.unit_type
FROM
"tzs_user_info" u,
"tz_base_enterprise_info" e
where
u.unit_code = e.use_code
and u.amos_user_id
<![CDATA[<>]]>
''
and e.is_delete = false
and u.is_delete = false
and (e.unit_type like '%检验机构%' or e.unit_type like '%检测机构%')
and u.post like '%6616%'
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/HisDataHandlerController.java
0 → 100644
View file @
7fafe95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.tcm.biz.service.impl.HisDataHandlerServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@RequestMapping
(
value
=
"/hisData"
)
@Api
(
tags
=
"历史数据处理"
)
@RequiredArgsConstructor
public
class
HisDataHandlerController
{
private
final
HisDataHandlerServiceImpl
hisDataHandlerService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验检测开通历史数据处理-将企业的管理员增加到检验机构或者检测机构用户组"
)
@PutMapping
(
value
=
"/v1/addAdminUser2JyjcGroup"
)
public
ResponseModel
<
Long
>
addAdminUser2JyjcGroup
()
{
return
ResponseHelper
.
buildResponse
(
hisDataHandlerService
.
addAdminUser2JyjcGroup
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验检测开通历史数据处理-将企业的业务办理人员且已经开通账号的增加到检验机构业务办理人员或者检测业务办理人员用户组"
)
@PutMapping
(
value
=
"/v1/addBizUser2NewBizGroup"
)
public
ResponseModel
<
Long
>
addBizUser2NewBizGroup
()
{
return
ResponseHelper
.
buildResponse
(
hisDataHandlerService
.
addBizUser2NewBizGroup
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验检测开通历史数据处理-将企业的单位类型由检验检测机构改为检验机构或者检测机构"
)
@PutMapping
(
value
=
"/v1/companyType/update"
)
public
ResponseModel
<
Long
>
companyTypeUpdate
()
{
return
ResponseHelper
.
buildResponse
(
hisDataHandlerService
.
companyTypeUpdate
());
}
}
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/HisDataHandlerServiceImpl.java
0 → 100644
View file @
7fafe95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo
;
import
com.yeejoin.amos.boot.module.tcm.flc.biz.service.impl.RegUnitInfoServiceImpl
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
@RequiredArgsConstructor
public
class
HisDataHandlerServiceImpl
{
private
final
TzBaseEnterpriseInfoServiceImpl
tzBaseEnterpriseInfoService
;
private
final
TzsUserInfoServiceImpl
userInfoService
;
private
final
RegUnitInfoServiceImpl
regUnitInfoService
;
private
final
String
UNIT_TYPE_JYJG
=
"检验机构"
;
private
final
String
UNIT_TYPE_JCJG
=
"检测机构"
;
/**
* 检测机构-用户组
*/
@Value
(
"${jcjg.permission.group.id:1945047210483806209}"
)
private
Long
jcjgGroupId
;
/**
* 检验机构-用户组
*/
@Value
(
"${jyjg.permission.group.id:1945047035287728129}"
)
private
Long
jyjgGroupId
;
/**
* 检验机构业务办理人员-用户组
*/
@Value
(
"${jyywy.permission.group.id:1947231335688990722}"
)
private
Long
jyywyGroupId
;
/**
* 检测机构业务办理人员-用户组
*/
@Value
(
"${jcywy.permission.group.id:1947231362847109122}"
)
private
Long
jcywyGroupId
;
/**
* 将检验或者检测机构的管理员增加到对应的用户组
*
* @return 处理的条数
*/
public
Long
addAdminUser2JyjcGroup
()
{
List
<
String
>
jyjgUserIds
=
new
ArrayList
<>();
List
<
String
>
jcjgUserIds
=
new
ArrayList
<>();
List
<
RegUnitInfo
>
unitInfoDtos
=
regUnitInfoService
.
getBaseMapper
().
selectAdminUserOfJyjc
();
unitInfoDtos
.
forEach
(
unitInfoDto
->
{
if
(
unitInfoDto
.
getUnitType
().
contains
(
UNIT_TYPE_JYJG
))
{
jyjgUserIds
.
add
(
unitInfoDto
.
getAdminUserId
());
}
if
(
unitInfoDto
.
getUnitType
().
contains
(
UNIT_TYPE_JCJG
))
{
jcjgUserIds
.
add
(
unitInfoDto
.
getAdminUserId
());
}
});
if
(!
jyjgUserIds
.
isEmpty
())
{
Privilege
.
groupUserClient
.
create
(
jyjgGroupId
,
jyjgUserIds
);
}
if
(!
jcjgUserIds
.
isEmpty
())
{
Privilege
.
groupUserClient
.
create
(
jcjgGroupId
,
jcjgUserIds
);
}
return
(
long
)
(
jyjgUserIds
.
size
()
+
jcjgUserIds
.
size
());
}
/**
* 将已经创建平台账号的检验或者检测业务办理人员增加到对应的用户组
*
* @return 处理的条数
*/
public
Long
addBizUser2NewBizGroup
()
{
List
<
String
>
jyywyUserIds
=
new
ArrayList
<>();
List
<
String
>
jcywyUserIds
=
new
ArrayList
<>();
List
<
TzsUserInfoDto
>
userInfoDtos
=
userInfoService
.
getBaseMapper
().
select6616User
();
userInfoDtos
.
forEach
(
userInfoDto
->
{
if
(
userInfoDto
.
getUnitType
().
contains
(
UNIT_TYPE_JYJG
))
{
jyywyUserIds
.
add
(
userInfoDto
.
getAmosUserId
());
}
if
(
userInfoDto
.
getUnitType
().
contains
(
UNIT_TYPE_JCJG
))
{
jcywyUserIds
.
add
(
userInfoDto
.
getAmosUserId
());
}
});
if
(!
jyywyUserIds
.
isEmpty
())
{
Privilege
.
groupUserClient
.
create
(
jyywyGroupId
,
jyywyUserIds
);
}
if
(!
jcywyUserIds
.
isEmpty
())
{
Privilege
.
groupUserClient
.
create
(
jcywyGroupId
,
jcywyUserIds
);
}
return
(
long
)
(
jyywyUserIds
.
size
()
+
jcywyUserIds
.
size
());
}
public
Long
companyTypeUpdate
()
{
List
<
TzBaseEnterpriseInfo
>
enterpriseInfos
=
tzBaseEnterpriseInfoService
.
list
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>()
.
eq
(
BaseEntity:
:
getIsDelete
,
false
)
.
and
(
e
->
e
.
like
(
TzBaseEnterpriseInfo:
:
getUnitType
,
UNIT_TYPE_JYJG
).
or
()
.
like
(
TzBaseEnterpriseInfo:
:
getUnitType
,
UNIT_TYPE_JCJG
))
.
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getUseCode
,
TzBaseEnterpriseInfo:
:
getUnitType
));
enterpriseInfos
.
forEach
(
enterpriseInfo
->
{
// 业务多个单位类型按照# 隔开, 平台已, 隔开
String
unitType
=
enterpriseInfo
.
getUnitType
().
replace
(
"#"
,
","
);
CompanyModel
companyModel
=
Privilege
.
companyClient
.
queryByCompanyCode
(
enterpriseInfo
.
getUseCode
()).
getResult
();
// 平台更新时 业务有公司 平台无公司时会报错所以进行判断
if
(
companyModel
!=
null
)
{
Privilege
.
companyClient
.
updateCompanyType
(
enterpriseInfo
.
getUseCode
(),
unitType
);
}
});
return
(
long
)
enterpriseInfos
.
size
();
}
}
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