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
ea97a4bc
Commit
ea97a4bc
authored
Apr 14, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
03055517
4abe0b2d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
29 deletions
+46
-29
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+1
-1
FillingEditPermForCurrentUser.java
...le/jg/biz/service/impl/FillingEditPermForCurrentUser.java
+18
-3
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+5
-5
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+22
-20
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
ea97a4bc
...
...
@@ -175,7 +175,7 @@ public class JgUseRegistrationController extends BaseController {
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
value
=
"record"
,
required
=
false
)
String
record
,
@RequestParam
(
value
=
"sequenceNbr"
,
required
=
false
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDetail
(
record
,
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDetail
(
record
,
sequenceNbr
,
getSelectedOrgInfo
()
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
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/FillingEditPermForCurrentUser.java
View file @
ea97a4bc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.GroupModel
;
...
...
@@ -14,9 +17,16 @@ import java.util.List;
@Slf4j
public
class
FillingEditPermForCurrentUser
extends
BaseUseRegisterResultData
{
private
final
CompanyBo
company
;
public
FillingEditPermForCurrentUser
(
JSONObject
data
)
{
private
static
final
String
COMPANY_TYPE
=
"companyType"
;
private
static
final
String
HAS_PERMISSION
=
"hasPermission"
;
public
FillingEditPermForCurrentUser
(
JSONObject
data
,
CompanyBo
company
)
{
super
(
data
);
this
.
company
=
company
;
}
...
...
@@ -29,7 +39,6 @@ public class FillingEditPermForCurrentUser extends BaseUseRegisterResultData {
private
void
fillingEditPermission
(
JSONObject
jsonObject
)
{
String
HAS_PERMISSION
=
"hasPermission"
;
jsonObject
.
put
(
HAS_PERMISSION
,
false
);
// 当前登录人所在用户组
List
<
GroupModel
>
groupModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
groupClient
.
queryByUserId
(
RequestContext
.
getExeUserId
()));
...
...
@@ -38,6 +47,12 @@ public class FillingEditPermForCurrentUser extends BaseUseRegisterResultData {
if
(
groupModels
.
stream
().
anyMatch
(
g
->
hasPermGroup
.
stream
().
anyMatch
(
h
->
h
.
getDictDataValue
().
equals
(
g
.
getGroupName
()))))
{
jsonObject
.
put
(
HAS_PERMISSION
,
true
);
}
if
(
company
!=
null
)
{
if
(
company
.
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
jsonObject
.
put
(
COMPANY_TYPE
,
BaseController
.
COMPANY_TYPE_COMPANY
);
}
else
{
jsonObject
.
put
(
COMPANY_TYPE
,
BaseController
.
COMPANY_TYPE_SUPERVISION
);
}
}
}
}
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 @
ea97a4bc
...
...
@@ -2144,16 +2144,16 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
public
Map
<
String
,
Object
>
getDetail
(
String
record
,
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
getDetail
(
String
record
,
Long
sequenceNbr
,
ReginParams
selectedOrgInfo
)
{
if
(!
ObjectUtils
.
isEmpty
(
sequenceNbr
))
{
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
this
.
doCompensate
(
jgUseRegistration
);
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
);
lambda
.
eq
(
JgRegistrationHistory:
:
getIsDelete
,
false
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
jsonObject
.
put
(
"manageType"
,
jgUseRegistration
.
getManageType
());
jsonObject
.
put
(
"createUserId"
,
jgUseRegistration
.
getCreateUserId
());
jsonObject
.
put
(
"receiveOrgCode"
,
jgUseRegistration
.
getReceiveCompanyCode
()
+
"_"
+
jgUseRegistration
.
getReceiveOrgName
());
jsonObject
.
put
(
"status"
,
jgUseRegistration
.
getStatus
());
...
...
@@ -2219,7 +2219,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 结果增强,填充单据是否可变更设备状态,用来控制前端按钮的显示隐藏。
new
FillingUseRegisterResult
(
sequenceNbr
,
jsonObject
,
applicationContext
).
getData
();
// 结果增强,填充当前人是否有编辑按钮权限
new
FillingEditPermForCurrentUser
(
jsonObject
).
getData
();
new
FillingEditPermForCurrentUser
(
jsonObject
,
Optional
.
ofNullable
(
selectedOrgInfo
).
map
(
ReginParams:
:
getCompany
).
orElse
(
null
)
).
getData
();
return
jsonObject
;
}
// 基本信息 + 制造信息
...
...
@@ -2270,7 +2270,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 结果增强,填充单据是否可变更设备状态
new
DefaultUseRegisterResult
(
result
).
getData
();
// 结果增强,填充当前人是否有编辑按钮权限
new
FillingEditPermForCurrentUser
(
result
).
getData
();
new
FillingEditPermForCurrentUser
(
result
,
selectedOrgInfo
.
getCompany
()
).
getData
();
return
result
;
}
...
...
@@ -4478,7 +4478,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(
CollUtil
.
isNotEmpty
(
useRegistrations
)){
for
(
JgUseRegistration
useRegistration
:
useRegistrations
)
{
try
{
Map
<
String
,
Object
>
detail
=
this
.
getDetail
(
null
,
useRegistration
.
getSequenceNbr
());
Map
<
String
,
Object
>
detail
=
this
.
getDetail
(
null
,
useRegistration
.
getSequenceNbr
()
,
null
);
String
jsonString
=
JSONObject
.
toJSONString
(
detail
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonString
);
FeignClientResult
<
AgencyUserModel
>
agencyUserModelFeignClientResult
=
Privilege
.
agencyUserClient
.
queryByUserId
((
String
)
detail
.
get
(
"createUserId"
));
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
ea97a4bc
...
...
@@ -1939,30 +1939,32 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
// 查询所有的
Map
<
String
,
ESTaskDetailDto
>
esTaskDetailDtoMap
=
allESTaskDetailDtos
.
stream
().
collect
(
Collectors
.
toMap
(
ESTaskDetailDto:
:
getId
,
Function
.
identity
()));
// 只更新未完成状态
planTaskDetails
.
stream
().
filter
(
p
->
PlanTaskDetailStatusEnum
.
NOTSTARTED
.
getValue
().
equals
(
p
.
getStatus
()
)).
forEach
(
planTaskDetail
->
{
ESTaskDetailDto
esTaskDetailDto
=
esTaskDetailDtoMap
.
get
(
planTaskDetail
.
getId
(
));
planTaskDetails
.
stream
().
filter
(
p
->
PlanTaskDetailStatusEnum
.
NOTSTARTED
.
getValue
().
equals
(
p
.
getStatus
())).
collect
(
Collectors
.
toList
(
)).
forEach
(
planTaskDetail
->
{
ESTaskDetailDto
esTaskDetailDto
=
esTaskDetailDtoMap
.
get
(
Objects
.
toString
(
planTaskDetail
.
getId
()
));
JSONObject
appCheckInput
=
esTaskDetailDto
.
getAppCheckInput
();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
mapList
=
(
Map
<
String
,
List
<
Map
<
String
,
Object
>>>)
JSON
.
parse
(
appCheckInput
.
toJSONString
());
List
<
AppCheckInputRespone
>
appCheckInputRespones
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
mapList
.
get
(
"items"
))
{
AppCheckInputRespone
appCheckInputRespone
=
new
AppCheckInputRespone
();
BeanUtil
.
copyProperties
(
map
,
appCheckInputRespone
);
InputItem
inputItem
=
inputItemDao
.
getOne
(
Long
.
parseLong
(
map
.
get
(
"checkInputId"
).
toString
()));
CheckInput
checkInput
=
new
CheckInput
();
String
itemType
=
String
.
valueOf
(
map
.
get
(
"itemType"
));
if
(
XJConstant
.
INPUT_ITEM_SELECT
.
equals
(
itemType
))
{
paraseSelect
(
checkInput
,
String
.
valueOf
(
map
.
get
(
"dataJson"
)));
appCheckInputRespone
.
setInputValue
(
checkInput
.
getInputValue
());
}
else
if
(
XJConstant
.
INPUT_ITEM_NUMBER
.
equals
(
itemType
))
{
appCheckInputRespone
.
setInputValue
(
inputItem
.
getDefaultValue
());
}
else
if
(
XJConstant
.
INPUT_ITEM_TEXT
.
equals
(
itemType
))
{
appCheckInputRespone
.
setInputValue
(
inputItem
.
getDefaultValue
());
}
if
(!
mapList
.
isEmpty
())
{
List
<
AppCheckInputRespone
>
appCheckInputRespones
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
mapList
.
get
(
"items"
))
{
AppCheckInputRespone
appCheckInputRespone
=
new
AppCheckInputRespone
();
BeanUtil
.
copyProperties
(
map
,
appCheckInputRespone
);
InputItem
inputItem
=
inputItemDao
.
getOne
(
Long
.
parseLong
(
map
.
get
(
"checkInputId"
).
toString
()));
CheckInput
checkInput
=
new
CheckInput
();
String
itemType
=
String
.
valueOf
(
map
.
get
(
"itemType"
));
if
(
XJConstant
.
INPUT_ITEM_SELECT
.
equals
(
itemType
))
{
paraseSelect
(
checkInput
,
String
.
valueOf
(
map
.
get
(
"dataJson"
)));
appCheckInputRespone
.
setInputValue
(
checkInput
.
getInputValue
());
}
else
if
(
XJConstant
.
INPUT_ITEM_NUMBER
.
equals
(
itemType
))
{
appCheckInputRespone
.
setInputValue
(
inputItem
.
getDefaultValue
());
}
else
if
(
XJConstant
.
INPUT_ITEM_TEXT
.
equals
(
itemType
))
{
appCheckInputRespone
.
setInputValue
(
inputItem
.
getDefaultValue
());
}
appCheckInputRespone
.
setPointInputImgUrls
(
new
ArrayList
<>());
appCheckInputRespones
.
add
(
appCheckInputRespone
);
appCheckInputRespone
.
setPointInputImgUrls
(
new
ArrayList
<>());
appCheckInputRespones
.
add
(
appCheckInputRespone
);
}
appCheckInput
.
put
(
"items"
,
appCheckInputRespones
);
}
appCheckInput
.
put
(
"items"
,
appCheckInputRespones
);
esTaskDetailDto
.
setPointImgUrls
(
new
ArrayList
<>());
esTaskDetailDto
.
setAppCheckInput
(
appCheckInput
);
esTaskDetailDto
.
setPointStatus
(
String
.
valueOf
(
PlanTaskDetailIsFinishEnum
.
FINISHED
.
getValue
()));
...
...
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