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
d4d70fa8
Commit
d4d70fa8
authored
Mar 20, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.维保增加设备列表详情:
草稿及流程中时显示设备的最新信息 流程为已完成时,设备详情信息不再变更,显示最后一刻数据。
parent
0a80d42b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
6 deletions
+45
-6
JgMaintenanceContractVo.java
...n/amos/boot/module/jg/api/vo/JgMaintenanceContractVo.java
+1
-1
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+10
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+13
-3
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+21
-0
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/vo/JgMaintenanceContractVo.java
View file @
d4d70fa8
...
@@ -160,7 +160,7 @@ public class JgMaintenanceContractVo {
...
@@ -160,7 +160,7 @@ public class JgMaintenanceContractVo {
@ApiModelProperty
(
"设备类别"
)
@ApiModelProperty
(
"设备类别"
)
private
String
equCategory
;
private
String
equCategory
;
private
List
<
Map
<
String
,
Object
>>
equipmentLists
;
private
List
<
?
extends
Map
<?,?
>>
equipmentLists
;
/**
/**
* 工作流下一节点任务id
* 工作流下一节点任务id
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
d4d70fa8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
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
;
...
@@ -113,13 +114,20 @@ public interface ICommonService {
...
@@ -113,13 +114,20 @@ public interface ICommonService {
* @param equipId 设备唯一标识
* @param equipId 设备唯一标识
* @param currentDocumentId 业务id
* @param currentDocumentId 业务id
*/
*/
void
saveOrUpdateHistory
(
String
registrationClass
,
JSON
Object
map
,
String
equipId
,
String
currentDocumentId
);
void
saveOrUpdateHistory
(
String
registrationClass
,
JSON
map
,
String
equipId
,
String
currentDocumentId
);
/**
/**
* 查询历史
树
* 查询历史
数据
* @param currentDocumentId 业务id
* @param currentDocumentId 业务id
* @return JSONObject
* @return JSONObject
*/
*/
JSONObject
queryHistoryData
(
Long
currentDocumentId
);
JSONObject
queryHistoryData
(
Long
currentDocumentId
);
/**
* 查询历史数据: 通用
* @param currentDocumentId 业务id
* @return Object
*/
Object
queryHistoryDataObj
(
Long
currentDocumentId
);
}
}
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/CommonServiceImpl.java
View file @
d4d70fa8
...
@@ -1566,17 +1566,17 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1566,17 +1566,17 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
@Override
public
void
saveOrUpdateHistory
(
String
registrationClass
,
JSON
Object
map
,
String
equipId
,
String
currentDocumentId
)
{
public
void
saveOrUpdateHistory
(
String
registrationClass
,
JSON
json
,
String
equipId
,
String
currentDocumentId
)
{
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
lambda
.
eq
(
JgRegistrationHistory:
:
getRegistrationClass
,
registrationClass
);
lambda
.
eq
(
JgRegistrationHistory:
:
getRegistrationClass
,
registrationClass
);
Integer
integer
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectCount
(
lambda
);
Integer
integer
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectCount
(
lambda
);
if
(
integer
>
0
)
{
if
(
integer
>
0
)
{
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
map
));
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
json
));
jgRegistrationHistoryService
.
update
(
jgRegistrationHistory
,
lambda
);
jgRegistrationHistoryService
.
update
(
jgRegistrationHistory
,
lambda
);
}
else
{
}
else
{
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
map
));
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
json
));
jgRegistrationHistory
.
setStatus
(
"new"
);
jgRegistrationHistory
.
setStatus
(
"new"
);
jgRegistrationHistory
.
setRegistrationClass
(
registrationClass
);
jgRegistrationHistory
.
setRegistrationClass
(
registrationClass
);
jgRegistrationHistory
.
setEquId
(
equipId
);
jgRegistrationHistory
.
setEquId
(
equipId
);
...
@@ -1585,6 +1585,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1585,6 +1585,7 @@ public class CommonServiceImpl implements ICommonService {
}
}
}
}
@Override
@Override
public
JSONObject
queryHistoryData
(
Long
currentDocumentId
){
public
JSONObject
queryHistoryData
(
Long
currentDocumentId
){
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
...
@@ -1594,4 +1595,12 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1594,4 +1595,12 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
public
Object
queryHistoryDataObj
(
Long
currentDocumentId
){
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
return
jgRegistrationHistory
!=
null
?
JSON
.
parse
(
jgRegistrationHistory
.
getChangeData
())
:
null
;
}
}
}
\ No newline at end of file
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/JgMaintenanceContractServiceImpl.java
View file @
d4d70fa8
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -148,13 +149,31 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -148,13 +149,31 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
BeanUtils
.
copyProperties
(
dto
,
vo
);
BeanUtils
.
copyProperties
(
dto
,
vo
);
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setOtherAccessories
(
ObjectUtils
.
isEmpty
(
dto
.
getOtherAccessories
())
?
null
:
JSON
.
parseArray
(
dto
.
getOtherAccessories
()));
vo
.
setOtherAccessories
(
ObjectUtils
.
isEmpty
(
dto
.
getOtherAccessories
())
?
null
:
JSON
.
parseArray
(
dto
.
getOtherAccessories
()));
// 非已完成状态数据显示最新的设备信息
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
dto
.
getStatus
())){
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
vo
.
setEquipmentLists
(
list
);
vo
.
setEquipmentLists
(
list
);
}
}
}
else
{
// 完成的显示历史表的数据
JSONArray
objects
=
(
JSONArray
)
commonService
.
queryHistoryDataObj
(
dto
.
getSequenceNbr
());
// 兼容老数据
if
(
objects
==
null
){
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
vo
.
setEquipmentLists
(
list
);
}
}
else
{
List
equList
=
objects
.
toJavaList
(
Map
.
class
);
vo
.
setEquipmentLists
(
equList
);
}
}
return
vo
;
return
vo
;
}
}
/**
/**
* 根据sequenceNbr更新数据
* 根据sequenceNbr更新数据
*
*
...
@@ -502,6 +521,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -502,6 +521,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
commonService
.
buildTaskModel
(
modelDtos
);
commonService
.
buildTaskModel
(
modelDtos
);
}
}
updateById
(
contract
);
updateById
(
contract
);
// 设备数据存历史数据,在流程完成时使用
commonService
.
saveOrUpdateHistory
(
null
,
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
)),
null
,
contract
.
getSequenceNbr
().
toString
());
return
Collections
.
singletonList
(
contract
);
return
Collections
.
singletonList
(
contract
);
}
}
...
...
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