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
a697164b
Commit
a697164b
authored
Apr 25, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.编辑增加修改气瓶标签信息
parent
0340cae6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
8 deletions
+89
-8
EquipOtherInfoChangeDataDto.java
...s/boot/module/jg/api/dto/EquipOtherInfoChangeDataDto.java
+22
-0
BatchDataChangeProcessStrategy.java
...e/jg/biz/service/impl/BatchDataChangeProcessStrategy.java
+3
-1
CommonEquipDataProcessService.java
...le/jg/biz/service/impl/CommonEquipDataProcessService.java
+49
-3
EquipChangeDataUpdateService.java
...ule/jg/biz/service/impl/EquipChangeDataUpdateService.java
+12
-4
SingleDataChangeProcessStrategy.java
.../jg/biz/service/impl/SingleDataChangeProcessStrategy.java
+3
-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/dto/EquipOtherInfoChangeDataDto.java
0 → 100644
View file @
a697164b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Group
(
value
=
"equip_other_info"
)
public
class
EquipOtherInfoChangeDataDto
extends
BaseChangeDataDto
{
@FieldDisplayDefine
(
value
=
"信息化管理情况"
)
private
String
informationSituation
;
@FieldDisplayDefine
(
value
=
"信息化管理二维码"
)
private
String
informationManageCode
;
@FieldDisplayDefine
(
value
=
"气瓶钢印标识"
,
type
=
JSON
.
class
)
private
String
cylinderStampAttachment
;
}
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/BatchDataChangeProcessStrategy.java
View file @
a697164b
...
...
@@ -115,11 +115,13 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
EquipRegisterChangeDataDto
registerChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipRegisterChangeDataDto
.
class
);
EquipFactoryChangeDataDto
factoryChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipFactoryChangeDataDto
.
class
);
EquipDesignChangeDataDto
designChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipDesignChangeDataDto
.
class
);
commonEquipDataProcessService
.
buildChangeFields
(
record
,
designChangeDataDto
,
factoryChangeDataDto
,
registerChangeDataDto
,
allChangeColumns
);
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
=
commonEquipDataProcessService
.
castMap2Bean
(
itemData
,
EquipOtherInfoChangeDataDto
.
class
);
commonEquipDataProcessService
.
buildChangeFields
(
record
,
designChangeDataDto
,
factoryChangeDataDto
,
registerChangeDataDto
,
otherInfoChangeDataDto
,
allChangeColumns
);
// 设备制造、设计、注册信息业务处理落库
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
registerChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
factoryChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
designChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
otherInfoChangeDataDto
);
// 设备技术参数入库处理
commonEquipDataProcessService
.
updateTechParamInfo
(
registerChangeDataDto
,
record
,
itemData
,
allChangeColumns
);
}
...
...
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/CommonEquipDataProcessService.java
View file @
a697164b
...
...
@@ -13,9 +13,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgDesignInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgFactoryInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
...
...
@@ -58,6 +56,8 @@ public class CommonEquipDataProcessService {
private
final
List
<
String
>
jsonFields
=
new
ArrayList
<>();
private
final
IdxBizJgOtherInfoMapper
idxBizJgOtherInfoMapper
;
@PostConstruct
public
void
init
()
{
...
...
@@ -104,6 +104,15 @@ public class CommonEquipDataProcessService {
jsonFields
.
add
(
field
.
getName
());
}
}
Field
[]
fields6
=
EquipOtherInfoChangeDataDto
.
class
.
getDeclaredFields
();
for
(
Field
field
:
fields6
)
{
field
.
setAccessible
(
true
);
FieldDisplayDefine
fieldDisplayDefine
=
field
.
getAnnotation
(
FieldDisplayDefine
.
class
);
if
(
fieldDisplayDefine
!=
null
&&
fieldDisplayDefine
.
type
()
==
JSON
.
class
)
{
jsonFields
.
add
(
field
.
getName
());
}
}
}
public
<
T
extends
BaseChangeDataDto
>
T
castMap2Bean
(
Map
<
String
,
Object
>
map
,
Class
<
T
>
clazz
)
{
...
...
@@ -150,6 +159,37 @@ public class CommonEquipDataProcessService {
allChangeColumns
.
addAll
(
this
.
mergeChangeFields
(
registerInfoNew
,
registerInfoOld
));
}
void
buildChangeFields
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
,
EquipFactoryChangeDataDto
equipFactoryChangeDataDto
,
EquipRegisterChangeDataDto
registerChangeDataDto
,
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
,
List
<
ChangeDataDto
>
allChangeColumns
)
{
// 构造新对象行转列
List
<
ChangeDataDto
>
designInfoNew
=
this
.
buildDesignInfoNew
(
equipDesignChangeDataDto
,
record
);
List
<
ChangeDataDto
>
factoryInfoNew
=
this
.
buildFactoryInfoNew
(
equipFactoryChangeDataDto
,
record
);
List
<
ChangeDataDto
>
registerInfoNew
=
this
.
buildRegisterInfoNew
(
registerChangeDataDto
,
record
);
List
<
ChangeDataDto
>
otherInfoNew
=
this
.
convertBeanField2Column2
(
otherInfoChangeDataDto
,
record
);
// 老数据查询行转列
List
<
ChangeDataDto
>
designInfoOld
=
this
.
buildDesignInfoOld
(
record
);
List
<
ChangeDataDto
>
factoryInfoOld
=
this
.
buildFactoryInfoOld
(
record
);
List
<
ChangeDataDto
>
registerInfoOld
=
this
.
buildRegisterInfoOld
(
record
);
List
<
ChangeDataDto
>
otherInfoOld
=
this
.
buildOtherInfoOld
(
record
);
allChangeColumns
.
addAll
(
this
.
mergeChangeFields
(
designInfoNew
,
designInfoOld
));
allChangeColumns
.
addAll
(
this
.
mergeChangeFields
(
factoryInfoNew
,
factoryInfoOld
));
allChangeColumns
.
addAll
(
this
.
mergeChangeFields
(
registerInfoNew
,
registerInfoOld
));
allChangeColumns
.
addAll
(
this
.
mergeChangeFields
(
otherInfoNew
,
otherInfoOld
));
}
private
List
<
ChangeDataDto
>
buildOtherInfoOld
(
String
record
)
{
EquipOtherInfoChangeDataDto
changeDataDto
=
new
EquipOtherInfoChangeDataDto
();
IdxBizJgOtherInfo
otherInfo
=
idxBizJgOtherInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>().
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
));
BeanUtil
.
copyProperties
(
otherInfo
,
changeDataDto
);
return
this
.
convertBeanField2Column2
(
changeDataDto
,
record
);
}
EquipOtherInfoChangeDataDto
buildOtherInfo
(
String
record
)
{
EquipOtherInfoChangeDataDto
changeDataDto
=
new
EquipOtherInfoChangeDataDto
();
IdxBizJgOtherInfo
otherInfo
=
idxBizJgOtherInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>().
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
));
BeanUtil
.
copyProperties
(
otherInfo
,
changeDataDto
);
return
changeDataDto
;
}
void
buildChangeFields
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
,
EquipFactoryChangeDataDto
equipFactoryChangeDataDto
,
EquipRegisterChangeDataDto
registerChangeDataDto
,
EquipUseInfoChangeDataDto
useInfoChangeDataDto
,
List
<
ChangeDataDto
>
allChangeColumns
)
{
// 构造新对象行转列
List
<
ChangeDataDto
>
designInfoNew
=
this
.
buildDesignInfoNew
(
equipDesignChangeDataDto
,
record
);
...
...
@@ -194,6 +234,12 @@ public class CommonEquipDataProcessService {
EquipUseInfoChangeDataDto
equipUseInfoChangeDataDto
=
(
EquipUseInfoChangeDataDto
)
changeDataDto
;
equipChangeDataUpdateService
.
updateUseInfoChangeData
(
record
,
equipUseInfoChangeDataDto
);
}
// 气瓶钢印信息
if
(
changeDataDto
instanceof
EquipOtherInfoChangeDataDto
)
{
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
=
(
EquipOtherInfoChangeDataDto
)
changeDataDto
;
equipChangeDataUpdateService
.
updateOtherInfoChangeData
(
record
,
otherInfoChangeDataDto
);
}
}
private
String
buildTableName
(
Class
<?>
clazz
)
{
...
...
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/EquipChangeDataUpdateService.java
View file @
a697164b
...
...
@@ -11,10 +11,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquCodeTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgDesignInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgFactoryInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
...
...
@@ -37,6 +34,8 @@ public class EquipChangeDataUpdateService {
private
final
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
private
final
IdxBizJgOtherInfoMapper
idxBizJgOtherInfoMapper
;
private
final
CommonMapper
commonMapper
;
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
...
...
@@ -239,4 +238,13 @@ public class EquipChangeDataUpdateService {
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
}
public
void
updateOtherInfoChangeData
(
String
record
,
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
)
{
LambdaUpdateWrapper
<
IdxBizJgOtherInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
updateWrapper
.
set
(
IdxBizJgOtherInfo:
:
getInformationManageCode
,
otherInfoChangeDataDto
.
getInformationManageCode
());
updateWrapper
.
set
(
IdxBizJgOtherInfo:
:
getCylinderStampAttachment
,
otherInfoChangeDataDto
.
getCylinderStampAttachment
());
updateWrapper
.
set
(
IdxBizJgOtherInfo:
:
getInformationSituation
,
otherInfoChangeDataDto
.
getInformationSituation
());
idxBizJgOtherInfoMapper
.
update
(
null
,
updateWrapper
);
}
}
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/SingleDataChangeProcessStrategy.java
View file @
a697164b
...
...
@@ -127,10 +127,13 @@ public class SingleDataChangeProcessStrategy implements IChangeDataProcessStrate
EquipDesignChangeDataDto
designChangeDataDto
=
commonEquipDataProcessService
.
buildDesignInfo
(
record
);
// 技术参数构建
BaseTechParamsFieldDto
techParamsFieldDto
=
commonEquipDataProcessService
.
buildTechParamInfo
(
equipRegisterChangeDataDto
,
record
);
// 其他信息:目前为气瓶的信息化情况
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
=
commonEquipDataProcessService
.
buildOtherInfo
(
record
);
re
.
putAll
(
BeanUtil
.
beanToMap
(
equipRegisterChangeDataDto
));
re
.
putAll
(
BeanUtil
.
beanToMap
(
factoryChangeDataDto
));
re
.
putAll
(
BeanUtil
.
beanToMap
(
designChangeDataDto
));
re
.
putAll
(
BeanUtil
.
beanToMap
(
techParamsFieldDto
));
re
.
putAll
(
BeanUtil
.
beanToMap
(
otherInfoChangeDataDto
));
commonEquipDataProcessService
.
castJsonFields
(
re
);
return
commonEquipDataProcessService
.
cast2UnderCase
(
re
);
}
...
...
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