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
28e50234
Commit
28e50234
authored
May 13, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(大编辑):代码重构
1.联调自测
parent
520b3807
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
20 deletions
+26
-20
JgBizChangeLogDto.java
...eejoin/amos/boot/module/jg/api/dto/JgBizChangeLogDto.java
+0
-1
BizDataChangeController.java
...oot/module/jg/biz/controller/BizDataChangeController.java
+6
-3
BizDataChangeServiceImpl.java
...mos/boot/module/jg/biz/edit/BizDataChangeServiceImpl.java
+1
-1
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+9
-5
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+10
-10
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/JgBizChangeLogDto.java
View file @
28e50234
...
...
@@ -33,7 +33,6 @@ public class JgBizChangeLogDto extends BaseDto {
@ApiModelProperty
(
value
=
"变更附件"
)
private
String
changeAttachment
;
@ApiModelProperty
(
value
=
"触发的id(列入使用登记变化后,安装告知数据也变化,则记录两条:使用登记的oid为空,按照告知的为使用登记的id)"
)
private
String
oId
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/BizDataChangeController.java
View file @
28e50234
...
...
@@ -57,14 +57,17 @@ public class BizDataChangeController extends BaseController {
public
ResponseModel
<
IPage
<?>>
getDetailV2
(
@ApiParam
(
value
=
"单据编号或者设备装置唯一标识"
)
@RequestParam
String
applyNo
,
@ApiParam
(
value
=
"业务类型"
)
@PathVariable
String
bizType
,
@ApiParam
(
value
=
"详情类型:设备、装置列表"
)
@RequestParam
DetailType
type
,
@ApiParam
(
value
=
"查询参数"
)
@RequestParam
JSONObject
searchParams
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
queryDetail
(
applyNo
,
bizType
,
type
,
searchParams
));
@ApiParam
(
value
=
"查询参数"
)
@RequestParam
Map
<
String
,
Object
>
searchParams
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
queryDetail
(
applyNo
,
bizType
,
type
,
new
JSONObject
(
searchParams
)
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/v2/{bizType}/sub-detail"
)
@ApiOperation
(
value
=
"编辑二级页面详情查询--通用"
,
httpMethod
=
"GET"
)
public
ResponseModel
<
Map
<
String
,
?>>
getSubDetailV2
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
@ApiParam
(
value
=
"单据编号,装置时需要"
)
@RequestParam
(
required
=
false
)
String
applyNo
,
@ApiParam
(
value
=
"详情类型:设备、装置"
)
@RequestParam
DetailType
type
,
@ApiParam
(
value
=
"业务类型"
)
@PathVariable
String
bizType
)
{
public
ResponseModel
<
Map
<
String
,
?>>
getSubDetailV2
(
@ApiParam
(
value
=
"设备或者装置唯一标识"
)
@RequestParam
String
bizId
,
@ApiParam
(
value
=
"单据编号,装置时需要"
)
@RequestParam
(
required
=
false
)
String
applyNo
,
@ApiParam
(
value
=
"详情类型:设备、装置"
)
@RequestParam
DetailType
type
,
@ApiParam
(
value
=
"业务类型"
)
@PathVariable
String
bizType
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
querySubDetail
(
applyNo
,
bizId
,
bizType
,
type
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/BizDataChangeServiceImpl.java
View file @
28e50234
...
...
@@ -23,7 +23,7 @@ public class BizDataChangeServiceImpl {
* @param bizType 业务类型
* @param modelType 处理器类型
* @param changeData 变化后的数据
* @param selectedOrgInfo
* @param selectedOrgInfo
登录人信息
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
save
(
String
bizId
,
...
...
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 @
28e50234
...
...
@@ -131,6 +131,9 @@ public class CommonEquipDataProcessService {
throw
new
RuntimeException
(
e
);
}
}
public
static
<
T
extends
IBaseChangeData
>
void
castMap2Bean
(
Map
<
String
,
Object
>
map
,
T
target
)
{
BeanUtil
.
copyProperties
(
JSON
.
parse
(
JSONObject
.
toJSONString
(
map
)),
target
,
true
);
}
public
void
checkValidField
(
String
record
,
BaseChangeDataDto
changeDataDto
,
String
equList
,
String
equCategory
,
String
equDefine
)
{
...
...
@@ -718,12 +721,13 @@ public class CommonEquipDataProcessService {
// 转json
this
.
castJsonFields
(
re
);
// 转下滑线大写下划线
this
.
cast2UnderCase
(
re
);
Map
<
String
,
Object
>
result
=
this
.
cast2UnderCase
(
re
);
// 流水主键赋值 用于后续的更新
re
.
put
(
"jySeq"
,
inspectionDetectionInfo
!=
null
?
inspectionDetectionInfo
.
getSequenceNbr
()
:
null
);
re
.
put
(
"maintenanceSeq"
,
idxBizJgMaintenanceRecordInfo
!=
null
?
idxBizJgMaintenanceRecordInfo
.
getSequenceNbr
()
:
null
);
re
.
put
(
"constructionInfoSeq"
,
constructionInfo
!=
null
?
constructionInfo
.
getSequenceNbr
()
:
null
);
return
re
;
result
.
put
(
"jySeq"
,
inspectionDetectionInfo
!=
null
?
inspectionDetectionInfo
.
getSequenceNbr
()
:
null
);
result
.
put
(
"maintenanceSeq"
,
idxBizJgMaintenanceRecordInfo
!=
null
?
idxBizJgMaintenanceRecordInfo
.
getSequenceNbr
()
:
null
);
result
.
put
(
"constructionInfoSeq"
,
constructionInfo
!=
null
?
constructionInfo
.
getSequenceNbr
()
:
null
);
result
.
put
(
"record"
,
useInfo
.
getRecord
());
return
result
;
}
public
IPage
<?>
getEquListByRecords
(
Set
<
String
>
eqs
,
JSONObject
map
)
{
...
...
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/SingleEquipChangeProcess.java
View file @
28e50234
...
...
@@ -32,32 +32,32 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
IdxBizJgUseInfo
useInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getUseInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
));
IdxBizJgUseInfo
useInfoNew
=
BeanUtil
.
copyProperties
(
useInfoOld
,
IdxBizJgUseInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
useInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
useInfoNew
);
useInfoNew
.
setSequenceNbr
(
useInfoOld
.
getSequenceNbr
());
IdxBizJgRegisterInfo
registerInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgRegisterInfoService
().
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
));
IdxBizJgRegisterInfo
registerInfoNew
=
BeanUtil
.
copyProperties
(
registerInfoOld
,
IdxBizJgRegisterInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
registerInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
registerInfoNew
);
registerInfoNew
.
setSequenceNbr
(
registerInfoOld
.
getSequenceNbr
());
IdxBizJgFactoryInfo
factoryInfoOld
=
commonEquipDataProcessService
.
getJgFactoryInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>().
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
record
));
IdxBizJgFactoryInfo
factoryInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgFactoryInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
factoryInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
factoryInfoNew
);
factoryInfoNew
.
setSequenceNbr
(
factoryInfoOld
.
getSequenceNbr
());
IdxBizJgDesignInfo
designInfoOld
=
commonEquipDataProcessService
.
getIdxBizJgDesignInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgDesignInfo
>().
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
));
IdxBizJgDesignInfo
designInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgDesignInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
designInfoNew
);
IdxBizJgDesignInfo
designInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgDesignInfo
.
class
);
;
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
designInfoNew
);
designInfoNew
.
setSequenceNbr
(
designInfoOld
.
getSequenceNbr
());
IdxBizJgOtherInfo
otherInfoOld
=
commonEquipDataProcessService
.
getIdxBizJgOtherInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>().
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
));
IdxBizJgOtherInfo
otherInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgOtherInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
otherInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
otherInfoNew
);
otherInfoNew
.
setSequenceNbr
(
otherInfoOld
.
getSequenceNbr
());
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgSupervisionInfoMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
record
));
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgSupervisionInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
idxBizJgSupervisionInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
idxBizJgSupervisionInfoNew
);
idxBizJgSupervisionInfoNew
.
setSequenceNbr
(
idxBizJgSupervisionInfoOld
.
getSequenceNbr
());
String
jySeq
=
changeJson
.
getString
(
"jySeq"
);
...
...
@@ -66,7 +66,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
if
(
jySeq
!=
null
)
{
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getInspectionDetectionInfoService
().
getById
(
jySeq
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfoNew
=
BeanUtil
.
copyProperties
(
inspectionDetectionInfoOld
,
IdxBizJgInspectionDetectionInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
idxBizJgSupervisionInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
idxBizJgSupervisionInfoNew
);
inspectionDetectionInfoNew
.
setSequenceNbr
(
inspectionDetectionInfoOld
.
getSequenceNbr
());
List
<
FieldChangeMeta
>
inspectionFieldChangeMetas
=
commonEquipDataProcessService
.
simpleTrackAndUpdate
(
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getInspectionDetectionInfoService
().
getBaseMapper
(),
inspectionDetectionInfoOld
,
inspectionDetectionInfoNew
,
useInfoNew
.
getRecord
(),
"SEQUENCE_NBR"
,
inspectionDetectionInfoOld
.
getSequenceNbr
());
allChangeColumns
.
addAll
(
inspectionFieldChangeMetas
);
...
...
@@ -75,7 +75,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
if
(
maintenanceSeq
!=
null
)
{
IdxBizJgMaintenanceRecordInfo
idxBizJgMaintenanceRecordInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgMaintenanceRecordInfoService
().
getById
(
maintenanceSeq
);
IdxBizJgMaintenanceRecordInfo
idxBizJgMaintenanceRecordInfoNew
=
BeanUtil
.
copyProperties
(
factoryInfoOld
,
IdxBizJgMaintenanceRecordInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
idxBizJgMaintenanceRecordInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
idxBizJgMaintenanceRecordInfoNew
);
idxBizJgMaintenanceRecordInfoNew
.
setSequenceNbr
(
idxBizJgMaintenanceRecordInfoOld
.
getSequenceNbr
());
List
<
FieldChangeMeta
>
idxBizJgMaintenanceFieldChangeMetas
=
commonEquipDataProcessService
.
simpleTrackAndUpdate
(
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgMaintenanceRecordInfoService
().
getBaseMapper
(),
idxBizJgMaintenanceRecordInfoOld
,
idxBizJgMaintenanceRecordInfoNew
,
useInfoNew
.
getRecord
(),
"SEQUENCE_NBR"
,
idxBizJgMaintenanceRecordInfoOld
.
getSequenceNbr
());
allChangeColumns
.
addAll
(
idxBizJgMaintenanceFieldChangeMetas
);
...
...
@@ -83,7 +83,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
if
(
constructionInfoSeq
!=
null
)
{
IdxBizJgConstructionInfo
constructionInfoOld
=
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgConstructionInfoService
().
getById
(
constructionInfoSeq
);
IdxBizJgConstructionInfo
constructionInfoNew
=
BeanUtil
.
copyProperties
(
constructionInfoOld
,
IdxBizJgConstructionInfo
.
class
);
BeanUtil
.
copyProperties
(
changeJson
,
constructionInfoNew
);
CommonEquipDataProcessService
.
castMap2Bean
(
changeJson
,
constructionInfoNew
);
constructionInfoNew
.
setSequenceNbr
(
constructionInfoOld
.
getSequenceNbr
());
List
<
FieldChangeMeta
>
constructionInfoFieldChangeMetas
=
commonEquipDataProcessService
.
simpleTrackAndUpdate
(
commonEquipDataProcessService
.
getJgUseRegistrationService
().
getIdxBizJgConstructionInfoService
().
getBaseMapper
(),
constructionInfoOld
,
constructionInfoNew
,
useInfoNew
.
getRecord
(),
"SEQUENCE_NBR"
,
constructionInfoOld
.
getSequenceNbr
());
allChangeColumns
.
addAll
(
constructionInfoFieldChangeMetas
);
...
...
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