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
debbf3a2
Commit
debbf3a2
authored
Dec 18, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.压力管道编辑功能接口开发
parent
0b096f2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
BatchDataChangeProcessStrategy.java
...e/jg/biz/service/impl/BatchDataChangeProcessStrategy.java
+9
-2
UseRegisterUpdateService.java
.../module/jg/biz/service/impl/UseRegisterUpdateService.java
+10
-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/BatchDataChangeProcessStrategy.java
View file @
debbf3a2
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -6,6 +6,7 @@ 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
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
...
@@ -75,8 +76,7 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
...
@@ -75,8 +76,7 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
this
.
calTotalPieLineLength
(
projectContraptionChangeDataDto
,
items
);
this
.
calTotalPieLineLength
(
projectContraptionChangeDataDto
,
items
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
// 2.使用登记表的装置名称更新
// 2.使用登记表的装置名称更新
jgUseRegistration
.
setProjectContraption
(
projectContraptionChangeDataDto
.
getProjectContraption
());
updateUseRegisterProjectInfo
(
jgUseRegistration
,
projectContraptionChangeDataDto
);
useRegistrationService
.
updateById
(
jgUseRegistration
);
// 设备技术参数入库前校验,约束:同一个装置下的管道编号不能重复
// 设备技术参数入库前校验,约束:同一个装置下的管道编号不能重复
if
(
items
.
size
()
!=
items
.
stream
().
map
(
TechParamsPipelineChangeFieldDto:
:
getPipelineNumber
).
distinct
().
count
())
{
if
(
items
.
size
()
!=
items
.
stream
().
map
(
TechParamsPipelineChangeFieldDto:
:
getPipelineNumber
).
distinct
().
count
())
{
throw
new
BadRequest
(
"同一工程装置下管道编号不能重复!"
);
throw
new
BadRequest
(
"同一工程装置下管道编号不能重复!"
);
...
@@ -129,6 +129,13 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
...
@@ -129,6 +129,13 @@ public class BatchDataChangeProcessStrategy implements IChangeDataProcessStrateg
return
allChangeColumns
;
return
allChangeColumns
;
}
}
private
void
updateUseRegisterProjectInfo
(
JgUseRegistration
jgUseRegistration
,
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
)
{
LambdaUpdateWrapper
<
JgUseRegistration
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
jgUseRegistration
.
getSequenceNbr
());
updateWrapper
.
set
(
JgUseRegistration:
:
getProjectContraption
,
projectContraptionChangeDataDto
.
getProjectContraption
());
useRegistrationService
.
update
(
null
,
updateWrapper
);
}
private
void
calTotalPieLineLength
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
PipelineChangeItemDto
>
items
)
{
private
void
calTotalPieLineLength
(
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
,
List
<
PipelineChangeItemDto
>
items
)
{
projectContraptionChangeDataDto
.
setPipelineLength
(
items
.
stream
().
filter
(
i
->
i
.
getPipeLength
()
!=
null
).
mapToDouble
(
TechParamsPipelineChangeFieldDto:
:
getPipeLength
).
sum
());
projectContraptionChangeDataDto
.
setPipelineLength
(
items
.
stream
().
filter
(
i
->
i
.
getPipeLength
()
!=
null
).
mapToDouble
(
TechParamsPipelineChangeFieldDto:
:
getPipeLength
).
sum
());
}
}
...
...
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/UseRegisterUpdateService.java
View file @
debbf3a2
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
...
@@ -30,10 +31,13 @@ public class UseRegisterUpdateService {
...
@@ -30,10 +31,13 @@ public class UseRegisterUpdateService {
private
final
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
private
final
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
public
UseRegisterUpdateService
(
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
,
JgUseRegistrationServiceImpl
useRegistrationService
,
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
)
{
private
final
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionService
;
public
UseRegisterUpdateService
(
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
,
JgUseRegistrationServiceImpl
useRegistrationService
,
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
,
IdxBizJgProjectContraptionServiceImpl
idxBizJgProjectContraptionService
)
{
this
.
idxBizJgRegisterInfoMapper
=
idxBizJgRegisterInfoMapper
;
this
.
idxBizJgRegisterInfoMapper
=
idxBizJgRegisterInfoMapper
;
this
.
useRegistrationService
=
useRegistrationService
;
this
.
useRegistrationService
=
useRegistrationService
;
this
.
jgRegistrationHistoryService
=
jgRegistrationHistoryService
;
this
.
jgRegistrationHistoryService
=
jgRegistrationHistoryService
;
this
.
idxBizJgProjectContraptionService
=
idxBizJgProjectContraptionService
;
}
}
public
void
updateHisData
(
String
applyNo
)
{
public
void
updateHisData
(
String
applyNo
)
{
...
@@ -82,6 +86,11 @@ public class UseRegisterUpdateService {
...
@@ -82,6 +86,11 @@ public class UseRegisterUpdateService {
});
});
jsonObject
.
put
(
"equipmentLists"
,
result
);
jsonObject
.
put
(
"equipmentLists"
,
result
);
}
else
{
}
else
{
// 管道逻辑 更新装置、管道有关数据
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionService
.
getById
(
jgUseRegistration
.
getProjectContraptionId
());
jsonObject
.
put
(
"pipelineLength"
,
projectContraption
.
getPipelineLength
());
jsonObject
.
put
(
"projectContraption"
,
projectContraption
.
getProjectContraption
());
jsonObject
.
put
(
"projectContraptionNo"
,
projectContraption
.
getProjectContraptionNo
());
jsonObject
.
put
(
"equipmentLists"
,
useRegistrationService
.
getBaseMapper
().
queryForUnitPipelineEquipment
(
records
));
jsonObject
.
put
(
"equipmentLists"
,
useRegistrationService
.
getBaseMapper
().
queryForUnitPipelineEquipment
(
records
));
}
}
}
}
...
...
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