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
7f84c1c9
Commit
7f84c1c9
authored
Jan 15, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:(jg) 管道使用登记功能修改
parent
7561c92e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
24 deletions
+82
-24
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+2
-8
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+5
-2
DataHandlerController.java
.../boot/module/jg/biz/controller/DataHandlerController.java
+9
-1
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+3
-2
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+31
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+26
-11
IdxBizJgProjectContraptionDto.java
...oot/module/ymt/api/dto/IdxBizJgProjectContraptionDto.java
+6
-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/mapper/JgUseRegistrationMapper.java
View file @
7f84c1c9
...
@@ -10,10 +10,8 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
...
@@ -10,10 +10,8 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
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.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.RegistrationVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.RegistrationVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -71,17 +69,14 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
...
@@ -71,17 +69,14 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Page
<
JSONObject
>
queryForEquipUsedByVehiclePageHistory
(
@Param
(
"page"
)
Page
<
JSONObject
>
page
,
@Param
(
"jsonObject"
)
JSONObject
jsonObject
);
Page
<
JSONObject
>
queryForEquipUsedByVehiclePageHistory
(
@Param
(
"page"
)
Page
<
JSONObject
>
page
,
@Param
(
"jsonObject"
)
JSONObject
jsonObject
);
@MapKey
(
"records"
)
List
<
Map
<
String
,
Object
>>
queryForUnitVesselEquipment
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
Map
<
String
,
Object
>>
queryForUnitVesselEquipment
(
@Param
(
"records"
)
List
<
String
>
records
);
Page
<
JSONObject
>
queryForUnitPipelineEquipmentPage
(
@Param
(
"page"
)
Page
<
JSONObject
>
page
,
@Param
(
"jsonObject"
)
JSONObject
jsonObject
,
@Param
(
"records"
)
Set
<
String
>
records
);
Page
<
JSONObject
>
queryForUnitPipelineEquipmentPage
(
@Param
(
"page"
)
Page
<
JSONObject
>
page
,
@Param
(
"jsonObject"
)
JSONObject
jsonObject
,
@Param
(
"records"
)
Set
<
String
>
records
);
@MapKey
(
"records"
)
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipment
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipment
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipmentForEdit
(
@Param
(
"records"
)
List
<
String
>
records
);
List
<
Map
<
String
,
Object
>>
queryForUnitPipelineEquipmentForEdit
(
@Param
(
"records"
)
List
<
String
>
records
);
@MapKey
(
"id"
)
List
<
Map
<
String
,
Object
>>
selectEquipList
(
@Param
(
"id"
)
Long
id
);
List
<
Map
<
String
,
Object
>>
selectEquipList
(
@Param
(
"id"
)
Long
id
);
List
<
CompanyEquipCountDto
>
queryForFlowingEquipList
();
List
<
CompanyEquipCountDto
>
queryForFlowingEquipList
();
...
@@ -117,9 +112,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
...
@@ -117,9 +112,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
/**
/**
* 查询指定装置下可做使用登记的的管道,样式为汇总表样式
* 查询指定装置下可做使用登记的的管道,样式为汇总表样式
* @param projectContraptionSeq
装置id
* @param projectContraptionSeq
List 原始装置idList
* @return List<Map<String, Object>>
* @return List<Map<String, Object>>
*/
*/
List
<
Map
<
String
,
Object
>>
selectPieLineListByOfCanReg
(
@Param
(
"projectContraptionSeq"
)
String
projectContraptionSeq
);
List
<
Map
<
String
,
Object
>>
selectPieLineListByOfCanReg
(
@Param
(
"projectContraptionSeqList"
)
List
<
String
>
projectContraptionSeqList
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
7f84c1c9
...
@@ -1068,9 +1068,12 @@
...
@@ -1068,9 +1068,12 @@
<include
refid=
"page-list-pipeline"
/>
<include
refid=
"page-list-pipeline"
/>
WHERE
WHERE
ri."EQU_CATEGORY" = '8300'
ri."EQU_CATEGORY" = '8300'
and ui."PROJECT_CONTRAPTION_ID" = #{projectContraptionSeq}
AND ui."PROJECT_CONTRAPTION_ID" IN
<foreach
collection=
"projectContraptionSeqList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
AND ui.IS_INTO_MANAGEMENT = true
AND ui.IS_INTO_MANAGEMENT = true
and (length(ri.USE_ORG_CODE) = 0 or ri.USE_ORG_CODE is null
)
AND (length(ri.USE_ORG_CODE) = 0 OR ri.USE_ORG_CODE IS NULL
)
ORDER BY ui.REC_DATE DESC
ORDER BY ui.REC_DATE DESC
)
)
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataHandlerController.java
View file @
7f84c1c9
...
@@ -127,5 +127,13 @@ public class DataHandlerController extends BaseController {
...
@@ -127,5 +127,13 @@ public class DataHandlerController extends BaseController {
return
ResponseHelper
.
buildResponse
(
true
);
return
ResponseHelper
.
buildResponse
(
true
);
}
}
/**
* 管道使用登记主表刷入原始工程装置ID集合和Eq表刷入工程装置ID
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管道使用登记主表刷入原始工程装置ID集合和Eq表刷入工程装置ID"
,
notes
=
"管道使用登记主表刷入原始工程装置ID集合和Eq表刷入工程装置ID"
)
@GetMapping
(
value
=
"/useRegistration/writeProjectContraptionIdInJgUseRegistration"
)
public
ResponseModel
<
Boolean
>
writeProjectContraptionIdInJgUseRegistration
()
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
writeProjectContraptionIdInJgUseRegistration
());
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
7f84c1c9
...
@@ -389,7 +389,8 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -389,7 +389,8 @@ public class JgUseRegistrationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询工程装置下的所有做过安装告知但是为做使用登记的管道"
,
notes
=
"查询工程装置下的所有做过安装告知但是为做使用登记的管道"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询工程装置下的所有做过安装告知但是为做使用登记的管道"
,
notes
=
"查询工程装置下的所有做过安装告知但是为做使用登记的管道"
)
@GetMapping
(
value
=
"/getDeviceListByProjectContraptionSeq"
)
@GetMapping
(
value
=
"/getDeviceListByProjectContraptionSeq"
)
public
ResponseModel
<
Object
>
getDeviceListByProjectContraption
(
@RequestParam
(
"record"
)
String
projectContraptionSeq
)
{
public
ResponseModel
<
Object
>
getDeviceListByProjectContraption
(
@RequestParam
(
"record"
)
String
projectContraptionSeq
,
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDeviceListByProjectContraption
(
projectContraptionSeq
));
@RequestParam
(
"originProjectContraptionIds"
)
String
[]
originProjectContraptionIds
)
{
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDeviceListByProjectContraption
(
projectContraptionSeq
,
originProjectContraptionIds
));
}
}
}
}
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/DataHandlerServiceImpl.java
View file @
7f84c1c9
...
@@ -959,4 +959,35 @@ public class DataHandlerServiceImpl {
...
@@ -959,4 +959,35 @@ public class DataHandlerServiceImpl {
useInfoService
.
update
(
updateWrapper
);
useInfoService
.
update
(
updateWrapper
);
});
});
}
}
public
Boolean
writeProjectContraptionIdInJgUseRegistration
()
{
List
<
JgUseRegistration
>
useRegistrations
=
useRegistrationService
.
list
(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
.
isNotNull
(
JgUseRegistration:
:
getProjectContraptionId
)
.
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getProjectContraptionId
)
);
for
(
JgUseRegistration
u
:
useRegistrations
)
{
// 更新 JgUseRegistration 表
useRegistrationService
.
lambdaUpdate
()
.
set
(
JgUseRegistration:
:
getOriginProjectContraptionIds
,
u
.
getProjectContraptionId
())
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
u
.
getSequenceNbr
())
.
update
();
// 更新 JgUseRegistrationEq 表
LambdaQueryWrapper
<
JgUseRegistrationEq
>
lambda
=
new
QueryWrapper
<
JgUseRegistrationEq
>().
lambda
();
lambda
.
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
u
.
getSequenceNbr
());
List
<
JgUseRegistrationEq
>
jgUseRegistrationEqList
=
useRegistrationEqService
.
getBaseMapper
().
selectList
(
lambda
);
if
(
jgUseRegistrationEqList
!=
null
)
{
for
(
JgUseRegistrationEq
eq
:
jgUseRegistrationEqList
)
{
useRegistrationEqService
.
lambdaUpdate
()
.
set
(
JgUseRegistrationEq:
:
getOriginProjectContraptionId
,
u
.
getProjectContraptionId
())
.
eq
(
JgUseRegistrationEq:
:
getSequenceNbr
,
eq
.
getSequenceNbr
())
.
update
();
}
}
}
return
true
;
}
}
}
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/JgUseRegistrationServiceImpl.java
View file @
7f84c1c9
...
@@ -100,6 +100,7 @@ import java.util.concurrent.atomic.AtomicReference;
...
@@ -100,6 +100,7 @@ import java.util.concurrent.atomic.AtomicReference;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.IntStream
;
import
java.util.stream.IntStream
;
import
java.util.stream.Stream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
java.util.zip.ZipOutputStream
;
...
@@ -835,6 +836,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -835,6 +836,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 具体地址
// 具体地址
useRegistration
.
setUseAddress
(
"陕西省"
+
fullAddress
+
map
.
get
(
"address"
));
useRegistration
.
setUseAddress
(
"陕西省"
+
fullAddress
+
map
.
get
(
"address"
));
useRegistration
.
setOriginProjectContraptionIds
((
String
)
map
.
get
(
"originProjectContraptionIds"
));
// 新增或编辑保存
// 新增或编辑保存
if
(
StringUtils
.
isEmpty
(
useRegistration
.
getSequenceNbr
()))
{
if
(
StringUtils
.
isEmpty
(
useRegistration
.
getSequenceNbr
()))
{
...
@@ -3868,6 +3870,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -3868,6 +3870,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper
<
IdxBizJgProjectContraption
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJgProjectContraption
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
useUnitCreditCode
)
wrapper
.
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
useUnitCreditCode
)
.
eq
(
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
true
)
.
eq
(
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
true
)
.
notIn
(!
proIds
.
isEmpty
(),
BaseEntity:
:
getSequenceNbr
,
proIds
)
.
notIn
(!
proIds
.
isEmpty
(),
BaseEntity:
:
getSequenceNbr
,
proIds
)
.
and
(
w
->
w
.
isNull
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
.
and
(
w
->
w
.
isNull
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
.
or
().
eq
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
""
)
.
or
().
eq
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
""
)
...
@@ -3875,19 +3878,31 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -3875,19 +3878,31 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
jgProjectContraptionService
.
page
(
page
,
wrapper
);
return
jgProjectContraptionService
.
page
(
page
,
wrapper
);
}
}
public
Map
<
String
,
Object
>
getDeviceListByProjectContraption
(
String
projectContraptionSeq
)
{
public
Map
<
String
,
Object
>
getDeviceListByProjectContraption
(
String
projectContraptionSeq
,
String
[]
originProjectContraptionIds
)
{
// 获取工程信息
IdxBizJgProjectContraption
projectContraption
=
jgProjectContraptionService
.
getById
(
projectContraptionSeq
);
IdxBizJgProjectContraption
projectContraption
=
jgProjectContraptionService
.
getById
(
projectContraptionSeq
);
Map
<
String
,
Object
>
re
=
new
HashMap
<>();
// 查询设备列表
List
<
Map
<
String
,
Object
>>
equList
=
this
.
getBaseMapper
().
selectPieLineListByOfCanReg
(
projectContraptionSeq
);
List
<
String
>
uniqueContraptionList
=
Stream
.
concat
(
Arrays
.
stream
(
originProjectContraptionIds
),
Stream
.
of
(
projectContraptionSeq
))
re
.
put
(
"equipmentLists"
,
equList
);
.
distinct
()
re
.
put
(
"projectContraption"
,
projectContraption
.
getProjectContraption
());
.
collect
(
Collectors
.
toList
());
re
.
put
(
"projectContraptionId"
,
projectContraptionSeq
);
List
<
Map
<
String
,
Object
>>
equList
=
this
.
getBaseMapper
()
re
.
put
(
"projectContraptionNo"
,
projectContraption
.
getProjectContraptionNo
());
.
selectPieLineListByOfCanReg
(
uniqueContraptionList
);
re
.
put
(
"pipelineLength"
,
projectContraption
.
getPipelineLength
());
// 计算管道长度总和
this
.
setPieLineInspectInfo
(
projectContraptionSeq
,
re
);
double
totalPipelineLength
=
equList
.
stream
()
this
.
setConstructionInfo
(
projectContraptionSeq
,
re
);
.
map
(
map
->
map
.
get
(
"pipeLength"
))
return
re
;
.
filter
(
Objects:
:
nonNull
)
.
mapToDouble
(
value
->
(
Double
)
value
)
.
sum
();
return
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"equipmentLists"
,
equList
)
.
put
(
"projectContraption"
,
projectContraption
.
getProjectContraption
())
.
put
(
"projectContraptionId"
,
projectContraptionSeq
)
.
put
(
"projectContraptionNo"
,
projectContraption
.
getProjectContraptionNo
())
.
put
(
"pipelineLength"
,
totalPipelineLength
)
.
build
();
}
}
private
void
setConstructionInfo
(
String
projectContraptionSeq
,
Map
<
String
,
Object
>
re
)
{
private
void
setConstructionInfo
(
String
projectContraptionSeq
,
Map
<
String
,
Object
>
re
)
{
LambdaQueryWrapper
<
IdxBizJgProjectConstruction
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJgProjectConstruction
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
IdxBizJgProjectConstruction:
:
getProjectContraptionId
,
projectContraptionSeq
)
queryWrapper
.
eq
(
IdxBizJgProjectConstruction:
:
getProjectContraptionId
,
projectContraptionSeq
)
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/dto/IdxBizJgProjectContraptionDto.java
View file @
7f84c1c9
...
@@ -126,4 +126,10 @@ public class IdxBizJgProjectContraptionDto extends BaseDto {
...
@@ -126,4 +126,10 @@ public class IdxBizJgProjectContraptionDto extends BaseDto {
@ApiModelProperty
(
"投入日期"
)
@ApiModelProperty
(
"投入日期"
)
private
String
useDate
;
private
String
useDate
;
@ApiModelProperty
(
"工程装置父级ID(合并用)"
)
private
String
projectContraptionParentId
;
@ApiModelProperty
(
"是否首次合并新增"
)
private
Boolean
isFirstMerge
;
}
}
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