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
79c5067f
Commit
79c5067f
authored
Feb 26, 2025
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
d5feb64e
55d7139a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
21 deletions
+63
-21
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+23
-2
IdxBizJgProjectContraptionServiceImpl.java
...z/service/impl/IdxBizJgProjectContraptionServiceImpl.java
+2
-0
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+36
-17
use-registration-form-set.ftl
...rc/main/resources/templates/use-registration-form-set.ftl
+1
-1
use-registration-form-unit.ftl
...c/main/resources/templates/use-registration-form-unit.ftl
+1
-1
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/service/impl/CommonServiceImpl.java
View file @
79c5067f
...
@@ -2307,7 +2307,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -2307,7 +2307,7 @@ public class CommonServiceImpl implements ICommonService {
formData
.
put
(
"productName"
,
formData
.
getString
(
"projectContraption"
));
formData
.
put
(
"productName"
,
formData
.
getString
(
"projectContraption"
));
}
}
//单位模版 部分字段需从设备列表中获取
//单位模版 部分字段需从设备列表中获取
if
(
formData
.
containsKey
(
"equipmentLists"
)
&&
manageType
.
equals
(
UNIT
)
){
if
(
formData
.
containsKey
(
"equipmentLists"
)){
JSONArray
equipmentLists
=
formData
.
getJSONArray
(
"equipmentLists"
);
JSONArray
equipmentLists
=
formData
.
getJSONArray
(
"equipmentLists"
);
List
<
Map
<
String
,
Object
>>
equips
=
equipmentLists
.
stream
()
List
<
Map
<
String
,
Object
>>
equips
=
equipmentLists
.
stream
()
.
filter
(
obj
->
obj
instanceof
Map
)
.
filter
(
obj
->
obj
instanceof
Map
)
...
@@ -2317,7 +2317,28 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -2317,7 +2317,28 @@ public class CommonServiceImpl implements ICommonService {
formData
.
put
(
"equNum"
,
equipmentLists
.
size
());
formData
.
put
(
"equNum"
,
equipmentLists
.
size
());
//设备品种
//设备品种
formData
.
put
(
"equDefine"
,
equips
.
get
(
0
).
get
(
"equDefineName"
));
formData
.
put
(
"equDefine"
,
equips
.
get
(
0
).
get
(
"equDefineName"
));
}
else
if
(
manageType
.
equals
(
UNIT
)
&&
!
CollectionUtils
.
isEmpty
(
equips
)){
Set
<
String
>
productNameSet
=
equips
.
stream
()
.
filter
(
Objects:
:
nonNull
)
// 过滤掉equip为null的情况
.
map
(
e
->
e
.
get
(
"productName"
))
// 获取productName
.
filter
(
Objects:
:
nonNull
)
// 过滤掉productName为null的情况
.
map
(
Object:
:
toString
)
// 转换为String类型
.
collect
(
Collectors
.
toSet
());
// 收集到Set中
// 将set转成字符串逗号拼接
String
productName
=
""
;
List
<
String
>
sortedProductNameList
=
new
ArrayList
<>(
productNameSet
);
if
(
sortedProductNameList
.
size
()
>
3
)
{
productName
=
String
.
join
(
","
,
sortedProductNameList
.
subList
(
0
,
3
))
+
",..."
;
}
else
{
productName
=
String
.
join
(
","
,
sortedProductNameList
);
}
formData
.
put
(
"productName"
,
equips
.
get
(
0
).
get
(
"productName"
));
}
else
if
(
manageType
.
equals
(
VEHICLE
)
&&
!
CollectionUtils
.
isEmpty
(
equips
)){
//气瓶数量
//气瓶数量
formData
.
put
(
"gasNum"
,
equips
.
size
());
formData
.
put
(
"gasNum"
,
equips
.
size
());
//设备品种
//设备品种
...
...
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/IdxBizJgProjectContraptionServiceImpl.java
View file @
79c5067f
...
@@ -667,6 +667,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
...
@@ -667,6 +667,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
result
.
put
(
"inspectConclusionCode"
,
info
.
getInspectConclusion
());
result
.
put
(
"inspectConclusionCode"
,
info
.
getInspectConclusion
());
result
.
put
(
"inspectConclusion"
,
Optional
.
ofNullable
(
dataDictionaryServiceImpl
.
getByCode
(
info
.
getInspectConclusion
(),
"JYJL"
))
result
.
put
(
"inspectConclusion"
,
Optional
.
ofNullable
(
dataDictionaryServiceImpl
.
getByCode
(
info
.
getInspectConclusion
(),
"JYJL"
))
.
map
(
DataDictionary:
:
getName
).
orElse
(
""
));
.
map
(
DataDictionary:
:
getName
).
orElse
(
""
));
result
.
put
(
"jySeq"
,
info
.
getSequenceNbr
());
return
result
;
return
result
;
}
}
}
}
\ 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/JgChangeRegistrationReformServiceImpl.java
View file @
79c5067f
...
@@ -1526,6 +1526,26 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1526,6 +1526,26 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
pipeline
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
pipeline
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsPipelineService
.
save
(
pipeline
);
iIdxBizJgTechParamsPipelineService
.
save
(
pipeline
);
}
}
// 检验信息恢复
JSONObject
inspectData
=
jsonObject
.
getJSONObject
(
"inspectData"
);
if
(
inspectData
!=
null
){
// 被更新前的检验信息
JSONArray
oData
=
Optional
.
ofNullable
(
inspectData
.
getJSONArray
(
"oData"
)).
orElse
(
new
JSONArray
());
// 改造登记本次插入的检验信息主键sequenceNbr数组
JSONArray
insertIds
=
Optional
.
ofNullable
(
inspectData
.
getJSONArray
(
"insertIds"
)).
orElse
(
new
JSONArray
());
// 更新的检验信息换成原来的
for
(
int
i
=
0
;
i
<
oData
.
size
();
i
++){
JSONObject
item
=
oData
.
getJSONObject
(
i
);
InspectionDetectionInfo
inspectionDetectionInfo
=
BeanUtil
.
copyProperties
(
item
,
InspectionDetectionInfo
.
class
);
inspectionDetectionInfoMapper
.
deleteById
(
inspectionDetectionInfo
.
getSequenceNbr
());
inspectionDetectionInfoMapper
.
insert
(
inspectionDetectionInfo
);
}
// 新插入的删除
if
(!
insertIds
.
isEmpty
()){
List
<
String
>
ids
=
insertIds
.
toJavaList
(
String
.
class
);
inspectionDetectionInfoMapper
.
deleteBatchIds
(
ids
);
}
}
break
;
break
;
// 起重机械
// 起重机械
case
QZJX:
case
QZJX:
...
@@ -1610,33 +1630,27 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1610,33 +1630,27 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 编辑时会有此数据,所以用来做标识,根据设备record + 检验报告编号判定唯一一条检验流水,有进行更新,无则进行插入
// 编辑时会有此数据,所以用来做标识,根据设备record + 检验报告编号判定唯一一条检验流水,有进行更新,无则进行插入
if
(
inspectionDetectionInfo
.
getInspectReportNo
()
!=
null
&&
inspectionDetectionInfo
.
getInspectReport
()
!=
null
){
if
(
inspectionDetectionInfo
.
getInspectReportNo
()
!=
null
&&
inspectionDetectionInfo
.
getInspectReport
()
!=
null
){
String
record
=
equipment
.
get
(
"record"
).
toString
();
String
record
=
equipment
.
get
(
"record"
).
toString
();
String
jySeq
=
equipment
.
get
(
"jySeq"
)
==
null
?
null
:
equipment
.
get
(
"jySeq"
).
toString
();
inspectionDetectionInfo
.
setInspectConclusion
((
String
)
equipment
.
get
(
"inspectConclusionCode"
));
inspectionDetectionInfo
.
setInspectConclusion
((
String
)
equipment
.
get
(
"inspectConclusionCode"
));
inspectionDetectionInfo
.
setSequenceNbr
(
jySeq
);
saveEquipOfPieLineInspectData
(
record
,
inspectionDetectionInfo
,
registrationReform
);
saveEquipOfPieLineInspectData
(
record
,
inspectionDetectionInfo
,
registrationReform
);
}
}
}
}
private
void
saveEquipOfPieLineInspectData
(
String
record
,
InspectionDetectionInfo
inspectionDetectionInfo
,
JgChangeRegistrationReform
registrationReform
)
{
private
void
saveEquipOfPieLineInspectData
(
String
record
,
InspectionDetectionInfo
inspectionDetectionInfo
,
JgChangeRegistrationReform
registrationReform
)
{
// 1.检验机构 + 设备+ 检验报告编号时 , 是唯一的为了防止老数据有重复的,程序健壮,故使用list进行处理
// 1.检验机构 + 设备+ 检验报告编号时 , 是唯一的为了防止老数据有重复的,程序健壮,故使用list进行处理
LambdaQueryWrapper
<
InspectionDetectionInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
AbstractEquipBaseEntity:
:
getRecord
,
record
)
.
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
inspectionDetectionInfo
.
getInspectReportNo
())
.
eq
(
InspectionDetectionInfo:
:
getInspectOrgCode
,
inspectionDetectionInfo
.
getInspectOrgCode
());
List
<
InspectionDetectionInfo
>
inspectionDetectionInfos
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
List
<
InspectionDetectionInfo
>
oInspectionDetectionInfos
=
new
ArrayList
<>(
inspectionDetectionInfos
);
JSONObject
data
=
new
JSONObject
();
String
insertId
=
null
;
String
insertId
=
null
;
if
(
inspectionDetectionInfos
.
isEmpty
()){
InspectionDetectionInfo
inspectionDetectionInfoOld
=
null
;
if
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
){
// 编辑
inspectionDetectionInfoOld
=
inspectionDetectionInfoMapper
.
selectById
(
inspectionDetectionInfo
.
getSequenceNbr
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfoMapper
.
updateById
(
inspectionDetectionInfo
);
}
else
{
// 新增
insertId
=
sequence
.
nextId
()
+
""
;
insertId
=
sequence
.
nextId
()
+
""
;
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfo
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
inspectionDetectionInfo
);
inspectionDetectionInfoMapper
.
insert
(
inspectionDetectionInfo
);
}
else
{
for
(
InspectionDetectionInfo
inspectionDetectionInfo1
:
inspectionDetectionInfos
)
{
Bean
.
copyExistPropertis
(
inspectionDetectionInfo
,
inspectionDetectionInfo1
);
inspectionDetectionInfo1
.
setRecDate
(
new
Date
());
inspectionDetectionInfoMapper
.
updateById
(
inspectionDetectionInfo1
);
}
}
}
// 2.记录原始检验流水用来作废时恢复数据
// 2.记录原始检验流水用来作废时恢复数据
JSONObject
oldData
=
commonServiceImpl
.
queryHisOldData
(
registrationReform
.
getApplyNo
());
JSONObject
oldData
=
commonServiceImpl
.
queryHisOldData
(
registrationReform
.
getApplyNo
());
...
@@ -1644,25 +1658,30 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1644,25 +1658,30 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 插入的检验数据ids
// 插入的检验数据ids
this
.
setInsertIds
(
inspectData
,
insertId
);
this
.
setInsertIds
(
inspectData
,
insertId
);
// 被更新的原行数据
// 被更新的原行数据
this
.
setOData
(
inspectData
,
oInspectionDetectionInfos
);
this
.
setOData
(
inspectData
,
inspectionDetectionInfoOld
);
oldData
.
put
(
"inspectData"
,
inspectData
);
LambdaUpdateWrapper
<
JgRegistrationHistory
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
JgRegistrationHistory
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
registrationReform
.
getApplyNo
());
updateWrapper
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
registrationReform
.
getApplyNo
());
updateWrapper
.
set
(
JgRegistrationHistory:
:
getOldData
,
JSONObject
.
toJSONString
(
oldData
));
updateWrapper
.
set
(
JgRegistrationHistory:
:
getOldData
,
JSONObject
.
toJSONString
(
oldData
));
jgRegistrationHistoryServiceImpl
.
update
(
updateWrapper
);
jgRegistrationHistoryServiceImpl
.
update
(
updateWrapper
);
}
}
private
void
setOData
(
JSONObject
inspectData
,
List
<
InspectionDetectionInfo
>
oInspectionDetectionInfos
)
{
private
void
setOData
(
JSONObject
inspectData
,
InspectionDetectionInfo
oInspectionDetectionInfo
)
{
JSONArray
oData
=
inspectData
.
getJSONArray
(
"oData"
);
JSONArray
oData
=
inspectData
.
getJSONArray
(
"oData"
);
if
(
oData
==
null
){
if
(
oData
==
null
){
oData
=
new
JSONArray
();
oData
=
new
JSONArray
();
inspectData
.
put
(
"oData"
,
oData
);
}
if
(
oInspectionDetectionInfo
!=
null
){
oData
.
add
(
oInspectionDetectionInfo
);
}
}
oData
.
addAll
(
oInspectionDetectionInfos
);
}
}
private
void
setInsertIds
(
JSONObject
inspectData
,
String
insertId
)
{
private
void
setInsertIds
(
JSONObject
inspectData
,
String
insertId
)
{
JSONArray
existInsertIds
=
inspectData
.
getJSONArray
(
"insertIds"
);
JSONArray
existInsertIds
=
inspectData
.
getJSONArray
(
"insertIds"
);
if
(
existInsertIds
==
null
){
if
(
existInsertIds
==
null
){
existInsertIds
=
new
JSONArray
();
existInsertIds
=
new
JSONArray
();
inspectData
.
put
(
"insertIds"
,
existInsertIds
);
}
}
if
(
insertId
!=
null
){
if
(
insertId
!=
null
){
existInsertIds
.
add
(
insertId
);
existInsertIds
.
add
(
insertId
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/use-registration-form-set.ftl
View file @
79c5067f
...
@@ -2191,7 +2191,7 @@
...
@@ -2191,7 +2191,7 @@
<w:spacing
w:val=
"-1"
/>
<w:spacing
w:val=
"-1"
/>
<w:lang
w:val=
"en-US"
w:eastAsia=
"zh-CN"
/>
<w:lang
w:val=
"en-US"
w:eastAsia=
"zh-CN"
/>
</w:rPr>
</w:rPr>
<w:t>
${(
resul
tNo)!''}
</w:t>
<w:t>
${(
inspectRepor
tNo)!''}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
</w:tc>
</w:tc>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/use-registration-form-unit.ftl
View file @
79c5067f
...
@@ -543,7 +543,7 @@
...
@@ -543,7 +543,7 @@
<w:sz
w:val=
"21"
/>
<w:sz
w:val=
"21"
/>
<w:sz-cs
w:val=
"21"
/>
<w:sz-cs
w:val=
"21"
/>
</w:rPr>
</w:rPr>
<w:t>
${(registrationType)!''}
</w:t>
<w:t>
${(registrationType)!'
新设备首次启用
'}
</w:t>
</w:r>
</w:r>
</w:p>
</w:p>
<w:p>
<w:p>
...
...
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