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
54aece6a
Commit
54aece6a
authored
Jul 11, 2025
by
hcing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备认领-管道认领
parent
44a233f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
70 deletions
+94
-70
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+1
-1
EquipClaimServiceImpl.java
...oot/module/jg/biz/service/impl/EquipClaimServiceImpl.java
+93
-69
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/entity/JgUseRegistration.java
View file @
54aece6a
...
...
@@ -263,7 +263,7 @@ public class JgUseRegistration extends BaseEntity {
private
String
supervisionOrgCode
;
/**
* 工程装置id
* 工程装置id
( 主键sequence_nbr )
*/
@TableField
(
"project_contraption_id"
)
private
String
projectContraptionId
;
...
...
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/EquipClaimServiceImpl.java
View file @
54aece6a
...
...
@@ -69,6 +69,7 @@ import java.time.Instant;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
IdxBizJgRegisterInfoServiceImpl
.*;
...
...
@@ -104,6 +105,8 @@ public class EquipClaimServiceImpl {
private
static
final
String
create_date
=
"create_date"
;
public
static
final
String
JG_HIS_XA_CLAIM
=
"jg_his_xa_claim"
;
public
static
final
String
USE_REGISTRATION_CODE
=
"useRegistrationCode"
;
public
static
final
String
PROJECT_CONTRAPTION_NO
=
"PROJECT_CONTRAPTION_NO"
;
public
static
final
String
PROJECT_CONTRAPTION
=
"PROJECT_CONTRAPTION"
;
private
final
RedisUtils
redisUtils
;
private
final
CommonServiceImpl
commonService
;
...
...
@@ -142,7 +145,6 @@ public class EquipClaimServiceImpl {
private
final
DataDockServiceImpl
dockService
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoServiceImpl
;
private
final
CodeUtil
codeUtil
;
private
final
ProduceInfoMapper
produceInfoMapper
;
/**
...
...
@@ -800,16 +802,6 @@ public class EquipClaimServiceImpl {
return
Boolean
.
TRUE
;
}
/**
* 历史管道登记
*
* @param equipInfo
* @return
*/
public
JgUseRegistration
addHistoryPipeRegistration
(
JSONObject
equipInfo
)
{
return
null
;
}
private
<
T
>
List
<
T
>
initializeList
()
{
return
new
ArrayList
<>(
15
);
}
...
...
@@ -822,7 +814,7 @@ public class EquipClaimServiceImpl {
public
void
updateConProEquipInfoWithClaim
(
JSONObject
equipInfo
)
{
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
String
proConNo
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION_NO"
);
String
proConNo
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION_NO
);
IdxBizJgProjectContraption
oldProCon
=
idxBizJgProjectContraptionService
.
getBaseMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgProjectContraption
>()
.
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
company
.
getCompanyCode
())
...
...
@@ -834,15 +826,18 @@ public class EquipClaimServiceImpl {
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_LIST"
));
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_CATEGORY"
));
String
equDefineName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_DEFINE"
));
// 是否工业管道
boolean
isGYGD
=
"8300"
.
equals
(
equipInfo
.
get
(
"EQU_CATEGORY"
).
toString
());
// 1. 本单位下无该工程装置
if
(!
hasThisProCon
)
{
// 是否进行登记 和 纳管同一状态
boolean
registerFlag
=
!
ObjectUtils
.
isEmpty
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
))
&&
isGYGD
;
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
String
[]
splitOrgBranchCode
=
Objects
.
toString
(
equipInfo
.
getString
(
"orgBranchCode"
),
""
).
split
(
"_"
);
// 工程装置
IdxBizJgProjectContraption
projectContraption
=
JSON
.
parseObject
(
toJSONString
(
equipInfo
),
IdxBizJgProjectContraption
.
class
);
projectContraption
.
setDataSource
(
JG_HIS_XA_CLAIM
);
projectContraption
.
setIsIntoManagement
(
false
);
projectContraption
.
setIsIntoManagement
(
registerFlag
);
projectContraption
.
setProvinceName
(
"陕西省"
);
CityCountyStreet
result
=
getCityCountStreet
(
equipInfo
,
new
JgUseRegistration
());
projectContraption
.
setCityName
(
result
.
useCityName
);
...
...
@@ -865,19 +860,20 @@ public class EquipClaimServiceImpl {
projectContraption
.
setIsFirstMerge
(
false
);
projectContraption
.
setCreateDate
(
new
Date
());
projectContraption
.
setOrgCode
(
splitOrgBranchCode
[
0
]);
projectContraption
.
setOrgName
(
splitOrgBranchCode
[
1
]
);
projectContraption
.
setOrgName
(
splitOrgBranchCode
.
length
>
1
?
splitOrgBranchCode
[
1
]
:
null
);
// 监管码
if
(!
ObjectUtils
.
isEmpty
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
)))
{
projectContraption
.
setSupervisoryCode
(
idxBizJgRegisterInfoServiceImpl
.
getSupervisoryCode
(
Objects
.
toString
(
equipInfo
.
get
(
"city"
),
null
),
equipInfo
.
get
(
"EQU_CATEGORY"
).
toString
()));
}
idxBizJgProjectContraptionService
.
updateById
(
projectContraption
);
// 设备
this
.
addOrUpdatePipeEquip
(
equipInfo
,
projectContraption
,
false
);
// 设备
this
.
addOrUpdatePipeEquip
(
equipInfo
,
projectContraption
,
registerFlag
);
// 历史管道登记
if
(
!
ObjectUtils
.
isEmpty
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
))
)
{
if
(
registerFlag
)
{
this
.
pipeHistoryRegister
(
equipInfo
,
projectContraption
);
}
// 更新
idxBizJgProjectContraptionService
.
updateById
(
projectContraption
);
}
// 2. 本单位下有该工程装置
...
...
@@ -906,7 +902,7 @@ public class EquipClaimServiceImpl {
// 2.1 已经有的工程装置【已登记】
String
useRegistrationCode1
=
oldProCon
.
getUseRegistrationCode
();
String
useRegistrationCode2
=
Objects
.
toString
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
),
null
);
if
(
hasRegister
&&
useRegistrationCode1
.
equals
(
useRegistrationCode2
))
{
if
(
hasRegister
&&
isGYGD
&&
useRegistrationCode1
.
equals
(
useRegistrationCode2
))
{
// 更新原使用登记
JgUseRegistration
useRegistration
=
useRegistrationService
.
lambdaQuery
().
eq
(
JgUseRegistration:
:
getUseRegistrationCode
,
useRegistrationCode1
).
eq
(
JgUseRegistration:
:
getIsDelete
,
Boolean
.
FALSE
).
ne
(
JgUseRegistration:
:
getStatus
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
()).
one
();
if
(!
ObjectUtils
.
isEmpty
(
useRegistration
.
getSequenceNbr
()))
{
...
...
@@ -934,8 +930,7 @@ public class EquipClaimServiceImpl {
public
void
pipeHistoryRegister
(
JSONObject
equipInfo
,
IdxBizJgProjectContraption
projectContraption
)
{
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
AgencyUserModel
userModel
=
getSelectedOrgInfo
().
getUserModel
();
String
proConName
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION"
);
String
proConNo
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION_NO"
);
String
proConName
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION
);
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
// 使用登记表 eq关系表
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
SYDJ
.
getCode
(),
1
);
...
...
@@ -961,7 +956,7 @@ public class EquipClaimServiceImpl {
.
setCreateDate
(
new
Date
())
.
setCreateUserId
(
userModel
.
getUserId
())
.
setCreateUserName
(
userModel
.
getRealName
())
.
setProjectContraptionId
(
pro
ConNo
)
.
setProjectContraptionId
(
pro
jectContraption
.
getSequenceNbr
().
toString
()
)
.
setProjectContraption
(
proConName
)
.
setSupervisionOrgCode
(
splitOrgBranchCode
[
0
])
.
setRegDate
(
new
Date
());
...
...
@@ -978,10 +973,10 @@ public class EquipClaimServiceImpl {
jgUseRegistrationEqServiceImpl
.
save
(
useRegEq
);
});
// 历史表
// JSONObject changeData = getJgUseRegistrationChangeData(paramsDto, records
, applyNo);
JSONObject
changeData
=
getJgUseRegistrationChangeData
(
equipInfo
,
projectContraption
,
applyNo
);
JgRegistrationHistory
registrationHistory
=
JgRegistrationHistory
.
builder
()
.
registrationClass
(
"使用登记"
)
.
changeData
(
JSON
.
toJSONString
(
equipInfo
))
.
changeData
(
JSON
.
toJSONString
(
changeData
))
.
status
(
"history"
)
.
currentDocumentId
(
String
.
valueOf
(
useRegseq
))
.
build
();
...
...
@@ -1035,7 +1030,7 @@ public class EquipClaimServiceImpl {
.
isScrap
(
"0"
)
.
version
(
1
)
.
superviseOrgCode
(
splitOrgBranchCode
[
0
])
.
superviseOrgName
(
splitOrgBranchCode
[
1
]
)
.
superviseOrgName
(
splitOrgBranchCode
.
length
>
1
?
splitOrgBranchCode
[
1
]
:
null
)
.
build
();
jgUseRegistrationManageService
.
save
(
registrationManage
);
// 流水表
...
...
@@ -1065,43 +1060,53 @@ public class EquipClaimServiceImpl {
});
}
// private JSONObject getJgUseRegistrationChangeData(EquipRequestParamsDto paramsDto, List<String> records, String spplyNo) {
// String record = Optional.ofNullable(records.get(0)).orElse("");
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("receiveOrgCode", paramsDto.getReceiveOrgCode() + "_" + paramsDto.getReceiveOrgName());
// jsonObject.put("status", FlowStatusEnum.TO_BE_FINISHED.getName());
// jsonObject.put("applyNo", spplyNo);
// jsonObject.remove("submit");
// jsonObject.remove("instanceId");
// if (!ObjectUtils.isEmpty(jsonObject.get("factoryUseSiteStreet"))) {
// jsonObject.put("factoryUseSiteStreet", String.valueOf(Long.valueOf(jsonObject.get("factoryUseSiteStreet").toString())));
// }
// IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionService.getById(paramsDto.getProjectContraptionSeq());
// jsonObject.put("pipelineLength", projectContraption.getPipelineLength());
// jsonObject.put("useUnitCreditCode", paramsDto.getCompanyCode());
// jsonObject.put("useUnitName", paramsDto.getCompanyName());
// IdxBizJgConstructionInfo constructionInfo = idxBizJgConstructionInfoService.lambdaQuery().eq(IdxBizJgConstructionInfo::getRecord, record).orderByDesc(IdxBizJgConstructionInfo::getRecDate).one();
// jsonObject.put("uscUnitCreditCode", constructionInfo.getUscUnitCreditCode());
// jsonObject.put("uscUnitName", constructionInfo.getUscUnitName());
// IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = idxBizJgInspectionDetectionInfoService.lambdaQuery().eq(IdxBizJgInspectionDetectionInfo::getRecord, record).orderByDesc(IdxBizJgInspectionDetectionInfo::getRecDate).one();
// JSONObject inspectionDetectionInfoJO = (JSONObject) JSON.toJSON(inspectionDetectionInfo);
// jsonObject.putAll(inspectionDetectionInfoJO);
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// jsonObject.put("inspectDate", Optional.ofNullable(inspectionDetectionInfo.getInspectDate())
// .map(sdf::format)
// .orElse(null));
// jsonObject.put("nextInspectDate", Optional.ofNullable(inspectionDetectionInfo.getNextInspectDate())
// .map(sdf::format)
// .orElse(null));
// jsonObject.put("orgBranchCode", paramsDto.getOrgBranchCode() + "_" + paramsDto.getOrgBranchName());
// jsonObject.put("projectContraption", projectContraption.getProjectContraption());
// jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
// jsonObject.put("equipmentLists", jgUseRegistrationServiceImpl.getBaseMapper().queryForUnitPipelineEquipment(records));
// jsonObject.put("useRegistrationCode", paramsDto.getUseOrgCode());
// // 转化 附件 字段
// dockService.convertStringToJsonObject(jsonObject, JgUseRegistrationServiceImpl.jsonFields);
// return jsonObject;
// }
/**
* 组装使用登记表单的回显数据
* @return
*/
private
JSONObject
getJgUseRegistrationChangeData
(
JSONObject
equipInfo
,
IdxBizJgProjectContraption
proCon
,
String
spplyNo
)
{
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
putAll
(
equipInfo
);
jsonObject
.
put
(
"receiveOrgCode"
,
equipInfo
.
getString
(
"receiveOrgCode"
));
jsonObject
.
put
(
"status"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jsonObject
.
put
(
"applyNo"
,
spplyNo
);
jsonObject
.
remove
(
"submit"
);
jsonObject
.
remove
(
"instanceId"
);
if
(!
ObjectUtils
.
isEmpty
(
jsonObject
.
get
(
"factoryUseSiteStreet"
)))
{
jsonObject
.
put
(
"factoryUseSiteStreet"
,
String
.
valueOf
(
Long
.
valueOf
(
jsonObject
.
get
(
"factoryUseSiteStreet"
).
toString
())));
}
IdxBizJgProjectContraption
projectContraption
=
idxBizJgProjectContraptionService
.
getById
(
proCon
.
getSequenceNbr
());
jsonObject
.
put
(
"pipelineLength"
,
projectContraption
.
getPipelineLength
());
jsonObject
.
put
(
"useUnitCreditCode"
,
company
.
getCompanyCode
());
jsonObject
.
put
(
"useUnitName"
,
company
.
getCompanyName
());
// IdxBizJgConstructionInfo constructionInfo = idxBizJgConstructionInfoService.lambdaQuery().eq(IdxBizJgConstructionInfo::getRecord, record).orderByDesc(IdxBizJgConstructionInfo::getRecDate).one();
// jsonObject.put("uscUnitCreditCode", constructionInfo.getUscUnitCreditCode());
// jsonObject.put("uscUnitName", constructionInfo.getUscUnitName());
// IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = iIdxBizJgInspectionDetectionInfoService.lambdaQuery().eq(IdxBizJgInspectionDetectionInfo::getRecord, record).orderByDesc(IdxBizJgInspectionDetectionInfo::getRecDate).one();
// JSONObject inspectionDetectionInfoJO = (JSONObject) JSON.toJSON(inspectionDetectionInfo);
// jsonObject.putAll(inspectionDetectionInfoJO);
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// jsonObject.put("inspectDate", Optional.ofNullable(inspectionDetectionInfo.getInspectDate())
// .map(sdf::format)
// .orElse(null));
// jsonObject.put("nextInspectDate", Optional.ofNullable(inspectionDetectionInfo.getNextInspectDate())
// .map(sdf::format)
// .orElse(null));
jsonObject
.
put
(
"orgBranchCode"
,
equipInfo
.
getString
(
"orgBranchCode"
));
jsonObject
.
put
(
"projectContraption"
,
projectContraption
.
getProjectContraption
());
jsonObject
.
put
(
"projectContraptionNo"
,
projectContraption
.
getProjectContraptionNo
());
JSONArray
pipeArray
=
JSON
.
parseArray
(
toJSONString
(
equipInfo
.
get
(
PIPELINE_LIST
)));
pipeArray
.
forEach
(
item
->
{
JSONObject
itemObj
=
JSON
.
parseObject
(
toJSONString
(
item
));
itemObj
.
put
(
"productName"
,
itemObj
.
get
(
"pipeName"
));
});
jsonObject
.
put
(
"equipmentLists"
,
pipeArray
);
jsonObject
.
put
(
"useRegistrationCode"
,
equipInfo
.
get
(
USE_REGISTRATION_CODE
).
toString
());
// 转化 附件 字段
dockService
.
convertStringToJsonObject
(
jsonObject
,
JgUseRegistrationServiceImpl
.
jsonFields
);
return
jsonObject
;
}
public
String
getEquCode
(
String
equListCode
,
String
equCategoryCode
,
String
equDefineCode
,
Date
now
,
String
receiveCompanyCode
)
{
CodeGenerateDto
codeGenerateDto
=
new
CodeGenerateDto
();
...
...
@@ -1117,8 +1122,8 @@ public class EquipClaimServiceImpl {
Date
nowDate
=
new
Date
();
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
String
proConName
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION"
);
String
proConNo
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION_NO"
);
String
proConName
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION
);
String
proConNo
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION_NO
);
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_LIST"
));
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_CATEGORY"
));
List
<
IdxBizJgUseInfo
>
toUpdateUseInfoList
=
initializeList
();
...
...
@@ -1141,10 +1146,12 @@ public class EquipClaimServiceImpl {
List
<
IdxBizJgTechParamsPipeline
>
toAddParamsPipelineList
=
initializeList
();
List
<
ESEquipmentCategoryDto
>
esEquipmentCategoryList
=
initializeList
();
String
equCode
=
this
.
getEquCode
(
equipInfo
.
get
(
"EQU_LIST"
).
toString
(),
equipInfo
.
get
(
"EQU_CATEGORY"
).
toString
(),
equipInfo
.
get
(
"EQU_DEFINE"
).
toString
(),
new
Date
(),
Objects
.
toString
(
equipInfo
.
getString
(
"receiveOrgCode"
),
""
).
split
(
"_"
)[
0
]);
projectContraption
.
setEquCode
(
equCode
);
// 设备信息
for
(
Map
<
String
,
Object
>
pipeline
:
pipelineList
)
{
boolean
hasRecord
=
!
ObjectUtils
.
isEmpty
(
pipeline
.
get
(
"record"
));
String
record
=
hasRecord
?
pipeline
.
get
(
"record"
).
toString
()
:
UUID
.
randomUUID
().
toString
();
pipeline
.
put
(
"record"
,
record
);
// 更新时工业管道(8300)检验检测信息
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
toJSONString
(
pipeline
),
IdxBizJgInspectionDetectionInfo
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfo
))
{
...
...
@@ -1152,6 +1159,7 @@ public class EquipClaimServiceImpl {
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
Map
<
String
,
Object
>
mapOrDefault
=
optional
.
orElse
(
Collections
.
emptyMap
());
inspectionDetectionInfo
.
setInspectOrgName
((
String
)
mapOrDefault
.
getOrDefault
(
"useUnit"
,
inspectionDetectionInfo
.
getInspectOrgName
()));
inspectionDetectionInfo
.
setInspectConclusion
((
String
)
pipeline
.
getOrDefault
(
"inspectConclusionCode"
,
""
));
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
nowDate
);
inspectionDetectionInfo
.
setSequenceNbr
(
null
);
...
...
@@ -1209,7 +1217,7 @@ public class EquipClaimServiceImpl {
}
// 施工信息
JSONObject
pipeJSON
=
new
JSONObject
(
pipeline
);
JSONObject
pipeJSON
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
pipeline
)
);
pipeJSON
.
remove
(
"uscDate"
);
IdxBizJgConstructionInfo
constructionInfo
=
JSON
.
parseObject
(
toJSONString
(
pipeJSON
),
IdxBizJgConstructionInfo
.
class
);
constructionInfo
.
setUscDate
(
ValidationUtil
.
isEmpty
(
pipeline
.
get
(
"uscDate"
))
?
null
:
DateUtil
.
parse
(
pipeline
.
get
(
"uscDate"
).
toString
(),
DatePattern
.
NORM_MONTH_FORMAT
));
...
...
@@ -1378,7 +1386,7 @@ public class EquipClaimServiceImpl {
if
(!
toUpdateParamsPipelineList
.
isEmpty
())
{
iIdxBizJgTechParamsPipelineService
.
updateBatchByRecord
(
toUpdateParamsPipelineList
);
}
equipInfo
.
put
(
PIPELINE_LIST
,
pipelineList
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
);
}
...
...
@@ -1396,7 +1404,23 @@ public class EquipClaimServiceImpl {
.
map
(
v
->
(
String
)
v
.
get
(
"pipelineNumber"
)).
distinct
().
count
())
{
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
pipelineList
)
?
"请填写管道信息!"
:
"同一工程装置下管道编号不能重复!"
);
}
String
useRegistrationCode
=
Objects
.
toString
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
),
null
);
// todo
// 需要融合的判断融合后的管道编号是否重复
String
proConNo
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION_NO
);
IdxBizJgProjectContraption
oldProCon
=
idxBizJgProjectContraptionService
.
getBaseMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgProjectContraption
>()
.
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
company
.
getCompanyCode
())
.
eq
(
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
proConNo
)
.
eq
(
IdxBizJgProjectContraption:
:
getIsDelete
,
Boolean
.
FALSE
)
.
isNull
(
IdxBizJgProjectContraption:
:
getProjectContraptionParentId
));
boolean
hasThisProCon
=
!
ObjectUtils
.
isEmpty
(
oldProCon
);
if
(
hasThisProCon
){
List
<
String
>
records
=
idxBizJgUseInfoService
.
lambdaQuery
().
select
(
IdxBizJgUseInfo:
:
getRecord
).
eq
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
oldProCon
.
getSequenceNbr
()).
list
().
stream
().
map
(
IdxBizJgUseInfo:
:
getRecord
).
collect
(
Collectors
.
toList
());
List
<
String
>
oldPipelineNumber
=
iIdxBizJgTechParamsPipelineService
.
lambdaQuery
().
select
(
IdxBizJgTechParamsPipeline:
:
getPipelineNumber
).
in
(
IdxBizJgTechParamsPipeline:
:
getRecord
,
records
).
list
().
stream
().
map
(
IdxBizJgTechParamsPipeline:
:
getPipelineNumber
).
collect
(
Collectors
.
toList
());
List
<
String
>
newPipelineNumber
=
pipelineList
.
stream
().
map
(
item
->
item
.
get
(
"pipelineNumber"
).
toString
()).
collect
(
Collectors
.
toList
());
boolean
noCommonElements
=
Collections
.
disjoint
(
oldPipelineNumber
,
newPipelineNumber
);
if
(!
noCommonElements
){
throw
new
BadRequest
(
"管道编号与本单位原装置下的重复!"
);
}
}
}
}
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