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
1b06b1ee
Commit
1b06b1ee
authored
Aug 11, 2025
by
hcing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
27e184c9
475d6f65
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
82 deletions
+70
-82
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+13
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+0
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+15
-1
InspectionEquipInfoModel.java
.../boot/module/jyjc/api/model/InspectionEquipInfoModel.java
+3
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+18
-63
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+2
-2
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+19
-16
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
1b06b1ee
...
...
@@ -29,6 +29,19 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"client"
)
String
client
);
List
<
Map
<
String
,
Object
>>
getListPage1
(
@Param
(
"size"
)
Long
size
,
@Param
(
"offset"
)
Long
offset
,
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"client"
)
String
client
);
Long
getListPageCount
(
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"client"
)
String
client
);
List
<
RegistrationVo
>
queryRegistrationInIds
(
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"client"
)
String
client
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
1b06b1ee
This diff is collapsed.
Click to expand it.
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/JgUseRegistrationServiceImpl.java
View file @
1b06b1ee
...
...
@@ -78,6 +78,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -139,6 +141,8 @@ import static java.util.stream.Collectors.toSet;
@Getter
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
,
ICompensateFlowDataOfRedis
<
JgUseRegistration
>,
ApplicationContextAware
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
JgUseRegistrationServiceImpl
.
class
);
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
...
...
@@ -349,7 +353,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
,
String
client
)
{
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversionNoToUnderline
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
client
);
// 统计查询时间
long
startTime
=
System
.
currentTimeMillis
();
logger
.
info
(
"使用登记单据-列表查询"
);
List
<
Map
<
String
,
Object
>>
resultRecords
=
this
.
baseMapper
.
getListPage1
(
page
.
getSize
(),
page
.
getSize
()
*
(
page
.
getCurrent
()
-
1
),
sortMap
,
dto
,
roleIds
,
client
);
logger
.
info
(
"使用登记单据-列表查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
page
.
setRecords
(
resultRecords
);
logger
.
info
(
"使用登记单据-列表总数查询"
);
startTime
=
System
.
currentTimeMillis
();
page
.
setTotal
(
this
.
baseMapper
.
getListPageCount
(
sortMap
,
dto
,
roleIds
,
client
));
logger
.
info
(
"使用登记单据-列表总数查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
return
page
;
}
public
Page
<
Map
<
String
,
Object
>>
getEquipList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
factoryNum
,
String
equList
,
String
equCategory
)
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/InspectionEquipInfoModel.java
View file @
1b06b1ee
...
...
@@ -40,4 +40,7 @@ public class InspectionEquipInfoModel implements Serializable {
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
private
String
componentKey
;
@ApiModelProperty
(
value
=
"申请报检单位信用代码"
)
private
String
unitCode
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
1b06b1ee
...
...
@@ -77,6 +77,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -105,8 +106,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
SUMMIT_TYPE
=
"0"
;
private
static
final
String
FIRST_INSPECT
=
"firstInspect"
;
private
static
final
String
SUPERVISE
=
"supervise"
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
...
...
@@ -158,17 +157,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
private
RedisUtils
redisUtils
;
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
@Autowired
private
IdxBizJgProjectContraptionMapper
idxBizJgProjectContraptionMapper
;
@Autowired
private
IdxBizJgProjectConstructionMapper
idxBizJgProjectConstructionMapper
;
@Autowired
private
JyjcInspectionResultParamServiceImpl
jyjcInspectionResultParamServiceImpl
;
@Resource
private
SnowflakeIdUtil
sequence
;
...
...
@@ -250,18 +242,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
setNameAndIsMustAccept
(
model
);
}
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
List
<
JyjcOpeningApplication
>
jyjcOpeningApplications
=
jyjcOpeningApplicationService
.
getBaseMapper
().
selectList
(
wa
);
if
(
CollectionUtils
.
isNotEmpty
(
jyjcOpeningApplications
))
{
//检验检测结果方式
if
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
()
!=
null
)
{
model
.
setResultType
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
());
// 报检时冗余检验检测机构厂商编号,推送厂商报检信息时需要
model
.
setDockingUnitCode
(
jyjcOpeningApplications
.
get
(
0
).
getDockingUnitCode
());
}
}
this
.
setResultTypeAndDockInfo
(
model
);
model
.
setApplicationDate
(
new
Date
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setApplicationUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
...
@@ -339,16 +320,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
else
{
// 保存并提交
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
List
<
JyjcOpeningApplication
>
jyjcOpeningApplications
=
jyjcOpeningApplicationService
.
getBaseMapper
().
selectList
(
wa
);
if
(
CollectionUtils
.
isNotEmpty
(
jyjcOpeningApplications
))
{
//检验检测结果方式
if
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
()
!=
null
)
{
model
.
setResultType
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
());
// 报检时冗余检验检测机构厂商编号,推送厂商报检信息时需要
model
.
setDockingUnitCode
(
jyjcOpeningApplications
.
get
(
0
).
getDockingUnitCode
());
}
}
this
.
setResultTypeAndDockInfo
(
model
);
this
.
setNameAndIsMustAccept
(
model
);
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
if
(!
model
.
getEquip
().
isEmpty
())
{
...
...
@@ -515,7 +487,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationPushLogService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
}
return
true
;
}
public
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
String
equipClassify
)
{
...
...
@@ -778,7 +749,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModel
.
setIsExistNc
(
false
);
resultModel
.
setManageType
(
"batch"
);
this
.
setResultTypeByBizTypeV2
(
resultModel
,
model
.
getBiz
Type
());
resultModel
.
setResultType
(
model
.
getResult
Type
());
resultModels
.
add
(
resultModel
);
// TODO 以管道汇总样式表暂存json,在结果录入后,将数据更新技术参数,考虑老数据
Map
<
String
,
Object
>
paramDetail
=
getDeviceListByProjectContraption3
(
model
);
...
...
@@ -812,7 +783,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModel
.
setEquCategory
(
applicationEquipModels
.
get
(
i
).
getEquCategory
());
resultModel
.
setEquList
(
applicationEquipModels
.
get
(
i
).
getEquList
());
resultModel
.
setIsExistNc
(
false
);
this
.
setResultTypeByBizTypeV2
(
resultModel
,
model
.
getBiz
Type
());
resultModel
.
setResultType
(
model
.
getResult
Type
());
Long
resultSeq
=
sequence
.
nextId
();
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModels
.
add
(
resultModel
);
...
...
@@ -841,9 +812,21 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
private
void
setResultTypeByBizTypeV2
(
JyjcInspectionResult
resultModel
,
String
bizType
)
{
private
void
setResultTypeAndDockInfo
(
JyjcInspectionApplicationModel
applicationModel
)
{
LambdaQueryWrapper
<
JyjcOpeningApplication
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
applicationModel
.
getInspectionUnitCode
());
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
queryWrapper
.
select
(
JyjcOpeningApplication:
:
getResultType
,
BaseEntity:
:
getSequenceNbr
);
queryWrapper
.
orderByDesc
(
JyjcOpeningApplication:
:
getAcceptDate
);
queryWrapper
.
last
(
"limit 1"
);
List
<
JyjcOpeningApplication
>
applicationList
=
jyjcOpeningApplicationService
.
list
(
queryWrapper
);
if
(!
applicationList
.
isEmpty
())
{
applicationModel
.
setResultType
(
applicationList
.
get
(
0
).
getResultType
());
applicationModel
.
setDockingUnitCode
(
applicationList
.
get
(
0
).
getDockingUnitCode
());
}
}
public
void
createHisAfterReceive
(
JyjcInspectionApplicationModel
model
)
{
if
(
model
.
getEquipClassify
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
JSONObject
hisData
=
getDeviceListByProjectContraption2
(
model
);
...
...
@@ -865,34 +848,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
private
void
setResultTypeByBizType
(
JyjcInspectionResult
resultModel
,
String
bizType
)
{
// 由于一个检验检测单位可以申请开通检验、检测两个申请,即确定一个 开通申请的维度为:单位编码 + 开通业务类型
// 但是表里面放的使用单位的公司编码,导致无法匹配到正确的开通申请,故按照单位编码+ 开通类型 + 状态查询开通申请
BizTypeEnum
bizTypeEnum
=
BizTypeEnum
.
getInstance
(
bizType
);
String
openBizType
=
""
;
assert
bizTypeEnum
!=
null
;
switch
(
bizTypeEnum
)
{
case
SUPERVISE:
case
FIRST_INSPECTION:
openBizType
=
OpenBizTypeEnum
.
JY
.
getCode
();
break
;
case
DETECTION:
openBizType
=
OpenBizTypeEnum
.
JC
.
getCode
();
break
;
default
:
break
;
}
LambdaQueryWrapper
<
JyjcOpeningApplication
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
resultModel
.
getInspectionUnitCode
());
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getOpenBizType
,
openBizType
);
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
queryWrapper
.
select
(
JyjcOpeningApplication:
:
getResultType
);
List
<
JyjcOpeningApplication
>
applicationList
=
jyjcOpeningApplicationService
.
list
(
queryWrapper
);
if
(!
applicationList
.
isEmpty
())
{
resultModel
.
setResultType
(
applicationList
.
get
(
0
).
getResultType
());
}
}
private
void
pushInspectionApplication
(
JyjcInspectionApplicationModel
inspectionApplicationModel
)
{
// 将检验检测申请信息推送至对应的检验机构
if
(
inspectionApplicationModel
.
getResultType
().
equals
(
ResultTypeEnum
.
INTEGRATED
.
getCode
()))
{
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
1b06b1ee
...
...
@@ -511,8 +511,8 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/refreshUserGroupInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"同步人员信息"
,
notes
=
"同步人员信息"
)
public
ResponseModel
<
TzsUserInfoDto
>
refreshUserInfo
(
@RequestBody
List
<
String
>
userIds
)
{
tzsUserInfoServiceImpl
.
refreshUserGroupInfo
(
userIds
);
public
ResponseModel
<
TzsUserInfoDto
>
refreshUserInfo
(
@RequestBody
List
<
String
>
userIds
,
@RequestParam
(
required
=
false
)
boolean
refreshNonAdmin
)
{
tzsUserInfoServiceImpl
.
refreshUserGroupInfo
(
userIds
,
refreshNonAdmin
);
return
ResponseHelper
.
buildResponse
(
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/TzsUserInfoServiceImpl.java
View file @
1b06b1ee
...
...
@@ -2520,19 +2520,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
public
void
refreshAdminUserRole
(
List
<
TzsUserInfo
>
userInfos
,
List
<
String
>
userId
)
{
List
<
String
>
adminUserIdList
;
if
(
ValidationUtil
.
isEmpty
(
userInfos
))
{
adminUserIdList
=
userId
;
}
else
{
List
<
String
>
amosUserIdList
=
userInfos
.
stream
().
map
(
TzsUserInfo:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
adminUserIdList
=
userId
.
stream
().
filter
(
id
->
!
amosUserIdList
.
contains
(
id
)).
collect
(
Collectors
.
toList
());
}
if
(
ValidationUtil
.
isEmpty
(
adminUserIdList
))
{
return
;
}
List
<
RegUnitInfo
>
regUnitInfos
=
regUnitInfoService
.
lambdaQuery
().
in
(
RegUnitInfo:
:
getAdminUserId
,
adminUserIdList
).
list
();
public
void
refreshAdminUserRole
(
List
<
RegUnitInfo
>
regUnitInfos
)
{
List
<
String
>
useUnitCodes
=
regUnitInfos
.
stream
().
map
(
RegUnitInfo:
:
getUnitCode
).
collect
(
Collectors
.
toList
());
if
(
ValidationUtil
.
isEmpty
(
useUnitCodes
))
{
return
;
...
...
@@ -2584,14 +2572,29 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
public
void
refreshUserGroupInfo
(
List
<
String
>
userId
)
{
public
void
refreshUserGroupInfo
(
List
<
String
>
userId
,
boolean
refreshNonAdmin
)
{
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
return
;
}
List
<
RegUnitInfo
>
adminRegUnitInfos
=
regUnitInfoService
.
lambdaQuery
().
in
(
RegUnitInfo:
:
getAdminUserId
,
userId
).
list
();
refreshAdminUserRole
(
adminRegUnitInfos
);
if
(!
refreshNonAdmin
)
{
return
;
}
List
<
String
>
amosAdminUserIdList
=
adminRegUnitInfos
.
stream
().
map
(
RegUnitInfo:
:
getAdminUserId
).
collect
(
Collectors
.
toList
());
userId
=
userId
.
stream
().
filter
(
id
->
!
amosAdminUserIdList
.
contains
(
id
)).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
return
;
}
// 根据userId获取用户
List
<
TzsUserInfo
>
userInfos
=
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
in
(
TzsUserInfo:
:
getAmosUserId
,
userId
));
refreshAdminUserRole
(
userInfos
,
userId
);
.
in
(
TzsUserInfo:
:
getAmosUserId
,
userId
).
eq
(
TzsUserInfo:
:
getIsDelete
,
false
));
if
(
ObjectUtils
.
isEmpty
(
userInfos
))
{
return
;
}
...
...
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