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
6c697e1b
Commit
6c697e1b
authored
Jun 13, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(大编辑):bug修复
1.比较
parent
9de09a9d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+10
-3
DiffUtils.java
...yeejoin/amos/boot/module/jg/biz/edit/utils/DiffUtils.java
+34
-0
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/edit/process/equip/CommonEquipDataProcessService.java
View file @
6c697e1b
...
...
@@ -31,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.factory.ColumnDiffFactory;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.FormatService
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.RegionCodeTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.utils.DiffUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
...
...
@@ -306,7 +307,7 @@ public class CommonEquipDataProcessService {
o
.
setColumnOldValue
(
oldKv
.
get
(
o
.
getColumnKey
()).
getColumnOldValue
());
}
});
List
<
FieldChangeMeta
>
up
=
changeDataNew
.
stream
().
filter
(
n
->
!
StringUtils
.
equals
(
n
.
getColumnNewValue
(),
n
.
getColumnOldValue
())).
collect
(
Collectors
.
toList
());
List
<
FieldChangeMeta
>
up
=
changeDataNew
.
stream
().
filter
(
n
->
!
DiffUtils
.
compare
(
n
.
getColumnType
(),
n
.
getColumnNewValue
(),
n
.
getColumnOldValue
())).
collect
(
Collectors
.
toList
());
up
.
forEach
(
fieldChangeMeta
->
{
fieldChangeMeta
.
setDisplayOldValue
(
formatService
.
format
(
fieldChangeMeta
.
getFieldDisplayDefine
(),
fieldChangeMeta
.
getColumnOldValue
()));
fieldChangeMeta
.
setDisplayNewValue
(
formatService
.
format
(
fieldChangeMeta
.
getFieldDisplayDefine
(),
fieldChangeMeta
.
getColumnNewValue
()));
...
...
@@ -563,6 +564,12 @@ public class CommonEquipDataProcessService {
String
value
=
DateUtil
.
format
((
Date
)
oV
,
displayDefine
.
format
());
fieldChangeMeta
.
setColumnNewValue
(
value
);
fieldChangeMeta
.
setColumnOldValue
(
value
);
}
else
if
(
oV
instanceof
Boolean
)
{
fieldChangeMeta
.
setColumnOldValue
(
Boolean
.
toString
((
Boolean
)
oV
));
fieldChangeMeta
.
setColumnNewValue
(
Boolean
.
toString
((
Boolean
)
oV
));
}
else
{
fieldChangeMeta
.
setColumnOldValue
(
Objects
.
toString
(
oV
,
null
));
fieldChangeMeta
.
setColumnNewValue
(
Objects
.
toString
(
oV
,
null
));
}
changeData
.
add
(
fieldChangeMeta
);
}
...
...
@@ -949,7 +956,7 @@ public class CommonEquipDataProcessService {
// 兼容逻辑,管道级别 原业务存的name,编辑存的code,进行转换name/code->code
item
.
put
(
"deviceLevel"
,
pieLineLevelTypeHandler
.
getCodeByName
(
r
.
getDeviceLevel
()));
// 原始业务不包含此字段 需要加上 否则流程中第一次编辑时该字段丢失导致安装信息无法更新
if
(
r
.
getConstructionInfoSeq
()
==
null
)
{
if
(
r
.
getConstructionInfoSeq
()
==
null
)
{
IdxBizJgConstructionInfo
constructionInfo
=
jgConstructionInfoService
.
queryNewestDetailIdByRecord
(
r
.
getRecord
());
item
.
put
(
"constructionInfoSeq"
,
constructionInfo
.
getSequenceNbr
());
}
...
...
@@ -1121,7 +1128,7 @@ public class CommonEquipDataProcessService {
jgUseRegistrationService
.
getIdxBizJgRegisterInfoService
().
update
(
updateWrapper
);
}
public
void
updatePipeline2InUse
(
String
projectContraptionId
,
String
useRegistrationCode
)
{
public
void
updatePipeline2InUse
(
String
projectContraptionId
,
String
useRegistrationCode
)
{
List
<
IdxBizJgUseInfo
>
useInfos
=
idxBizJgUseInfoService
.
list
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionId
).
eq
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
).
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgUseInfo:
:
getRecord
));
useInfos
.
parallelStream
().
forEach
(
e
->
{
this
.
setNewPipelineUseState
(
e
,
useRegistrationCode
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/utils/DiffUtils.java
0 → 100644
View file @
6c697e1b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
utils
;
import
com.alibaba.fastjson.JSON
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.function.BiPredicate
;
public
class
DiffUtils
{
private
static
final
Map
<
String
,
BiPredicate
<
String
,
String
>>
diffCache
=
new
ConcurrentHashMap
<>();
static
{
registerDefaultComparators
();
}
private
static
void
registerDefaultComparators
()
{
diffCache
.
put
(
String
.
class
.
getSimpleName
(),
StringUtils:
:
equals
);
diffCache
.
put
(
JSON
.
class
.
getSimpleName
(),
JsonDiffUtil:
:
jsonEqualsIgnoreType
);
}
public
static
void
register
(
String
type
,
BiPredicate
<
String
,
String
>
comparator
)
{
diffCache
.
put
(
type
,
comparator
);
}
public
static
boolean
compare
(
String
type
,
String
newValue
,
String
oldValue
)
{
if
(
type
==
null
||
newValue
==
null
||
oldValue
==
null
)
{
return
Objects
.
equals
(
newValue
,
oldValue
);
}
return
diffCache
.
getOrDefault
(
type
,
Objects:
:
equals
).
test
(
newValue
,
oldValue
);
}
}
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