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
d6d98801
Commit
d6d98801
authored
Jul 11, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
0b09f950
54aece6a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
59 deletions
+84
-59
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+1
-1
EquipClaimServiceImpl.java
...oot/module/jg/biz/service/impl/EquipClaimServiceImpl.java
+81
-57
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+2
-1
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 @
d6d98801
...
@@ -263,7 +263,7 @@ public class JgUseRegistration extends BaseEntity {
...
@@ -263,7 +263,7 @@ public class JgUseRegistration extends BaseEntity {
private
String
supervisionOrgCode
;
private
String
supervisionOrgCode
;
/**
/**
* 工程装置id
* 工程装置id
( 主键sequence_nbr )
*/
*/
@TableField
(
"project_contraption_id"
)
@TableField
(
"project_contraption_id"
)
private
String
projectContraptionId
;
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 @
d6d98801
...
@@ -69,6 +69,7 @@ import java.time.Instant;
...
@@ -69,6 +69,7 @@ import java.time.Instant;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
IdxBizJgRegisterInfoServiceImpl
.*;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
IdxBizJgRegisterInfoServiceImpl
.*;
...
@@ -104,6 +105,8 @@ public class EquipClaimServiceImpl {
...
@@ -104,6 +105,8 @@ public class EquipClaimServiceImpl {
private
static
final
String
create_date
=
"create_date"
;
private
static
final
String
create_date
=
"create_date"
;
public
static
final
String
JG_HIS_XA_CLAIM
=
"jg_his_xa_claim"
;
public
static
final
String
JG_HIS_XA_CLAIM
=
"jg_his_xa_claim"
;
public
static
final
String
USE_REGISTRATION_CODE
=
"useRegistrationCode"
;
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
RedisUtils
redisUtils
;
private
final
CommonServiceImpl
commonService
;
private
final
CommonServiceImpl
commonService
;
...
@@ -142,7 +145,6 @@ public class EquipClaimServiceImpl {
...
@@ -142,7 +145,6 @@ public class EquipClaimServiceImpl {
private
final
DataDockServiceImpl
dockService
;
private
final
DataDockServiceImpl
dockService
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoServiceImpl
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoServiceImpl
;
private
final
CodeUtil
codeUtil
;
private
final
CodeUtil
codeUtil
;
private
final
ProduceInfoMapper
produceInfoMapper
;
/**
/**
...
@@ -800,16 +802,6 @@ public class EquipClaimServiceImpl {
...
@@ -800,16 +802,6 @@ public class EquipClaimServiceImpl {
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
/**
* 历史管道登记
*
* @param equipInfo
* @return
*/
public
JgUseRegistration
addHistoryPipeRegistration
(
JSONObject
equipInfo
)
{
return
null
;
}
private
<
T
>
List
<
T
>
initializeList
()
{
private
<
T
>
List
<
T
>
initializeList
()
{
return
new
ArrayList
<>(
15
);
return
new
ArrayList
<>(
15
);
}
}
...
@@ -822,7 +814,7 @@ public class EquipClaimServiceImpl {
...
@@ -822,7 +814,7 @@ public class EquipClaimServiceImpl {
public
void
updateConProEquipInfoWithClaim
(
JSONObject
equipInfo
)
{
public
void
updateConProEquipInfoWithClaim
(
JSONObject
equipInfo
)
{
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
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
>()
IdxBizJgProjectContraption
oldProCon
=
idxBizJgProjectContraptionService
.
getBaseMapper
().
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgProjectContraption
>()
.
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
company
.
getCompanyCode
())
.
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
company
.
getCompanyCode
())
...
@@ -834,15 +826,18 @@ public class EquipClaimServiceImpl {
...
@@ -834,15 +826,18 @@ public class EquipClaimServiceImpl {
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_LIST"
));
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_LIST"
));
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_CATEGORY"
));
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_CATEGORY"
));
String
equDefineName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_DEFINE"
));
String
equDefineName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_DEFINE"
));
// 是否工业管道
boolean
isGYGD
=
"8300"
.
equals
(
equipInfo
.
get
(
"EQU_CATEGORY"
).
toString
());
// 1. 本单位下无该工程装置
// 1. 本单位下无该工程装置
if
(!
hasThisProCon
)
{
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
);
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
String
[]
splitOrgBranchCode
=
Objects
.
toString
(
equipInfo
.
getString
(
"orgBranchCode"
),
""
).
split
(
"_"
);
String
[]
splitOrgBranchCode
=
Objects
.
toString
(
equipInfo
.
getString
(
"orgBranchCode"
),
""
).
split
(
"_"
);
// 工程装置
// 工程装置
IdxBizJgProjectContraption
projectContraption
=
JSON
.
parseObject
(
toJSONString
(
equipInfo
),
IdxBizJgProjectContraption
.
class
);
IdxBizJgProjectContraption
projectContraption
=
JSON
.
parseObject
(
toJSONString
(
equipInfo
),
IdxBizJgProjectContraption
.
class
);
projectContraption
.
setDataSource
(
JG_HIS_XA_CLAIM
);
projectContraption
.
setDataSource
(
JG_HIS_XA_CLAIM
);
projectContraption
.
setIsIntoManagement
(
false
);
projectContraption
.
setIsIntoManagement
(
registerFlag
);
projectContraption
.
setProvinceName
(
"陕西省"
);
projectContraption
.
setProvinceName
(
"陕西省"
);
CityCountyStreet
result
=
getCityCountStreet
(
equipInfo
,
new
JgUseRegistration
());
CityCountyStreet
result
=
getCityCountStreet
(
equipInfo
,
new
JgUseRegistration
());
projectContraption
.
setCityName
(
result
.
useCityName
);
projectContraption
.
setCityName
(
result
.
useCityName
);
...
@@ -865,19 +860,20 @@ public class EquipClaimServiceImpl {
...
@@ -865,19 +860,20 @@ public class EquipClaimServiceImpl {
projectContraption
.
setIsFirstMerge
(
false
);
projectContraption
.
setIsFirstMerge
(
false
);
projectContraption
.
setCreateDate
(
new
Date
());
projectContraption
.
setCreateDate
(
new
Date
());
projectContraption
.
setOrgCode
(
splitOrgBranchCode
[
0
]);
projectContraption
.
setOrgCode
(
splitOrgBranchCode
[
0
]);
projectContraption
.
setOrgName
(
splitOrgBranchCode
[
1
]
);
projectContraption
.
setOrgName
(
splitOrgBranchCode
.
length
>
1
?
splitOrgBranchCode
[
1
]
:
null
);
// 监管码
// 监管码
if
(!
ObjectUtils
.
isEmpty
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
)))
{
if
(!
ObjectUtils
.
isEmpty
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
)))
{
projectContraption
.
setSupervisoryCode
(
idxBizJgRegisterInfoServiceImpl
.
getSupervisoryCode
(
Objects
.
toString
(
equipInfo
.
get
(
"city"
),
null
),
equipInfo
.
get
(
"EQU_CATEGORY"
).
toString
()));
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
);
this
.
pipeHistoryRegister
(
equipInfo
,
projectContraption
);
}
}
// 更新
idxBizJgProjectContraptionService
.
updateById
(
projectContraption
);
}
}
// 2. 本单位下有该工程装置
// 2. 本单位下有该工程装置
...
@@ -906,7 +902,7 @@ public class EquipClaimServiceImpl {
...
@@ -906,7 +902,7 @@ public class EquipClaimServiceImpl {
// 2.1 已经有的工程装置【已登记】
// 2.1 已经有的工程装置【已登记】
String
useRegistrationCode1
=
oldProCon
.
getUseRegistrationCode
();
String
useRegistrationCode1
=
oldProCon
.
getUseRegistrationCode
();
String
useRegistrationCode2
=
Objects
.
toString
(
equipInfo
.
get
(
USE_REGISTRATION_CODE
),
null
);
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
();
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
()))
{
if
(!
ObjectUtils
.
isEmpty
(
useRegistration
.
getSequenceNbr
()))
{
...
@@ -934,8 +930,7 @@ public class EquipClaimServiceImpl {
...
@@ -934,8 +930,7 @@ public class EquipClaimServiceImpl {
public
void
pipeHistoryRegister
(
JSONObject
equipInfo
,
IdxBizJgProjectContraption
projectContraption
)
{
public
void
pipeHistoryRegister
(
JSONObject
equipInfo
,
IdxBizJgProjectContraption
projectContraption
)
{
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
AgencyUserModel
userModel
=
getSelectedOrgInfo
().
getUserModel
();
AgencyUserModel
userModel
=
getSelectedOrgInfo
().
getUserModel
();
String
proConName
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION"
);
String
proConName
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION
);
String
proConNo
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION_NO"
);
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
// 使用登记表 eq关系表
// 使用登记表 eq关系表
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
SYDJ
.
getCode
(),
1
);
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
SYDJ
.
getCode
(),
1
);
...
@@ -961,7 +956,7 @@ public class EquipClaimServiceImpl {
...
@@ -961,7 +956,7 @@ public class EquipClaimServiceImpl {
.
setCreateDate
(
new
Date
())
.
setCreateDate
(
new
Date
())
.
setCreateUserId
(
userModel
.
getUserId
())
.
setCreateUserId
(
userModel
.
getUserId
())
.
setCreateUserName
(
userModel
.
getRealName
())
.
setCreateUserName
(
userModel
.
getRealName
())
.
setProjectContraptionId
(
pro
ConNo
)
.
setProjectContraptionId
(
pro
jectContraption
.
getSequenceNbr
().
toString
()
)
.
setProjectContraption
(
proConName
)
.
setProjectContraption
(
proConName
)
.
setSupervisionOrgCode
(
splitOrgBranchCode
[
0
])
.
setSupervisionOrgCode
(
splitOrgBranchCode
[
0
])
.
setRegDate
(
new
Date
());
.
setRegDate
(
new
Date
());
...
@@ -978,10 +973,10 @@ public class EquipClaimServiceImpl {
...
@@ -978,10 +973,10 @@ public class EquipClaimServiceImpl {
jgUseRegistrationEqServiceImpl
.
save
(
useRegEq
);
jgUseRegistrationEqServiceImpl
.
save
(
useRegEq
);
});
});
// 历史表
// 历史表
// JSONObject changeData = getJgUseRegistrationChangeData(paramsDto, records
, applyNo);
JSONObject
changeData
=
getJgUseRegistrationChangeData
(
equipInfo
,
projectContraption
,
applyNo
);
JgRegistrationHistory
registrationHistory
=
JgRegistrationHistory
.
builder
()
JgRegistrationHistory
registrationHistory
=
JgRegistrationHistory
.
builder
()
.
registrationClass
(
"使用登记"
)
.
registrationClass
(
"使用登记"
)
.
changeData
(
JSON
.
toJSONString
(
equipInfo
))
.
changeData
(
JSON
.
toJSONString
(
changeData
))
.
status
(
"history"
)
.
status
(
"history"
)
.
currentDocumentId
(
String
.
valueOf
(
useRegseq
))
.
currentDocumentId
(
String
.
valueOf
(
useRegseq
))
.
build
();
.
build
();
...
@@ -1035,7 +1030,7 @@ public class EquipClaimServiceImpl {
...
@@ -1035,7 +1030,7 @@ public class EquipClaimServiceImpl {
.
isScrap
(
"0"
)
.
isScrap
(
"0"
)
.
version
(
1
)
.
version
(
1
)
.
superviseOrgCode
(
splitOrgBranchCode
[
0
])
.
superviseOrgCode
(
splitOrgBranchCode
[
0
])
.
superviseOrgName
(
splitOrgBranchCode
[
1
]
)
.
superviseOrgName
(
splitOrgBranchCode
.
length
>
1
?
splitOrgBranchCode
[
1
]
:
null
)
.
build
();
.
build
();
jgUseRegistrationManageService
.
save
(
registrationManage
);
jgUseRegistrationManageService
.
save
(
registrationManage
);
// 流水表
// 流水表
...
@@ -1065,25 +1060,30 @@ public class EquipClaimServiceImpl {
...
@@ -1065,25 +1060,30 @@ 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();
* @return
// jsonObject.put("receiveOrgCode", paramsDto.getReceiveOrgCode() + "_" + paramsDto.getReceiveOrgName());
*/
// jsonObject.put("status", FlowStatusEnum.TO_BE_FINISHED.getName());
private
JSONObject
getJgUseRegistrationChangeData
(
JSONObject
equipInfo
,
IdxBizJgProjectContraption
proCon
,
String
spplyNo
)
{
// jsonObject.put("applyNo", spplyNo);
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
// jsonObject.remove("submit");
JSONObject
jsonObject
=
new
JSONObject
();
// jsonObject.remove("instanceId");
jsonObject
.
putAll
(
equipInfo
);
// if (!ObjectUtils.isEmpty(jsonObject.get("factoryUseSiteStreet"))) {
jsonObject
.
put
(
"receiveOrgCode"
,
equipInfo
.
getString
(
"receiveOrgCode"
));
// jsonObject.put("factoryUseSiteStreet", String.valueOf(Long.valueOf(jsonObject.get("factoryUseSiteStreet").toString())));
jsonObject
.
put
(
"status"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
// }
jsonObject
.
put
(
"applyNo"
,
spplyNo
);
// IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionService.getById(paramsDto.getProjectContraptionSeq());
jsonObject
.
remove
(
"submit"
);
// jsonObject.put("pipelineLength", projectContraption.getPipelineLength());
jsonObject
.
remove
(
"instanceId"
);
// jsonObject.put("useUnitCreditCode", paramsDto.getCompanyCode());
if
(!
ObjectUtils
.
isEmpty
(
jsonObject
.
get
(
"factoryUseSiteStreet"
)))
{
// jsonObject.put("useUnitName", paramsDto.getCompanyName());
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();
// IdxBizJgConstructionInfo constructionInfo = idxBizJgConstructionInfoService.lambdaQuery().eq(IdxBizJgConstructionInfo::getRecord, record).orderByDesc(IdxBizJgConstructionInfo::getRecDate).one();
// jsonObject.put("uscUnitCreditCode", constructionInfo.getUscUnitCreditCode());
// jsonObject.put("uscUnitCreditCode", constructionInfo.getUscUnitCreditCode());
// jsonObject.put("uscUnitName", constructionInfo.getUscUnitName());
// jsonObject.put("uscUnitName", constructionInfo.getUscUnitName());
// IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = i
dxBizJgInspectionDetectionInfoService.lambdaQuery().eq(IdxBizJgInspectionDetectionInfo::getRecord, record).orderByDesc(IdxBizJgInspectionDetectionInfo::getRecDate).one();
// IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = iI
dxBizJgInspectionDetectionInfoService.lambdaQuery().eq(IdxBizJgInspectionDetectionInfo::getRecord, record).orderByDesc(IdxBizJgInspectionDetectionInfo::getRecDate).one();
// JSONObject inspectionDetectionInfoJO = (JSONObject) JSON.toJSON(inspectionDetectionInfo);
// JSONObject inspectionDetectionInfoJO = (JSONObject) JSON.toJSON(inspectionDetectionInfo);
// jsonObject.putAll(inspectionDetectionInfoJO);
// jsonObject.putAll(inspectionDetectionInfoJO);
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
...
@@ -1093,15 +1093,20 @@ public class EquipClaimServiceImpl {
...
@@ -1093,15 +1093,20 @@ public class EquipClaimServiceImpl {
// jsonObject.put("nextInspectDate", Optional.ofNullable(inspectionDetectionInfo.getNextInspectDate())
// jsonObject.put("nextInspectDate", Optional.ofNullable(inspectionDetectionInfo.getNextInspectDate())
// .map(sdf::format)
// .map(sdf::format)
// .orElse(null));
// .orElse(null));
// jsonObject.put("orgBranchCode", paramsDto.getOrgBranchCode() + "_" + paramsDto.getOrgBranchName());
jsonObject
.
put
(
"orgBranchCode"
,
equipInfo
.
getString
(
"orgBranchCode"
));
// jsonObject.put("projectContraption", projectContraption.getProjectContraption());
jsonObject
.
put
(
"projectContraption"
,
projectContraption
.
getProjectContraption
());
// jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
jsonObject
.
put
(
"projectContraptionNo"
,
projectContraption
.
getProjectContraptionNo
());
// jsonObject.put("equipmentLists", jgUseRegistrationServiceImpl.getBaseMapper().queryForUnitPipelineEquipment(records));
JSONArray
pipeArray
=
JSON
.
parseArray
(
toJSONString
(
equipInfo
.
get
(
PIPELINE_LIST
)));
// jsonObject.put("useRegistrationCode", paramsDto.getUseOrgCode());
pipeArray
.
forEach
(
item
->
{
// // 转化 附件 字段
JSONObject
itemObj
=
JSON
.
parseObject
(
toJSONString
(
item
));
// dockService.convertStringToJsonObject(jsonObject, JgUseRegistrationServiceImpl.jsonFields);
itemObj
.
put
(
"productName"
,
itemObj
.
get
(
"pipeName"
));
// return jsonObject;
});
// }
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
)
{
public
String
getEquCode
(
String
equListCode
,
String
equCategoryCode
,
String
equDefineCode
,
Date
now
,
String
receiveCompanyCode
)
{
CodeGenerateDto
codeGenerateDto
=
new
CodeGenerateDto
();
CodeGenerateDto
codeGenerateDto
=
new
CodeGenerateDto
();
...
@@ -1117,8 +1122,8 @@ public class EquipClaimServiceImpl {
...
@@ -1117,8 +1122,8 @@ public class EquipClaimServiceImpl {
Date
nowDate
=
new
Date
();
Date
nowDate
=
new
Date
();
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
List
<
Map
<
String
,
Object
>>
pipelineList
=
(
List
<
Map
<
String
,
Object
>>)
equipInfo
.
get
(
PIPELINE_LIST
);
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
String
proConName
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION"
);
String
proConName
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION
);
String
proConNo
=
equipInfo
.
getString
(
"PROJECT_CONTRAPTION_NO"
);
String
proConNo
=
equipInfo
.
getString
(
PROJECT_CONTRAPTION_NO
);
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_LIST"
));
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_LIST"
));
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_CATEGORY"
));
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
((
String
)
equipInfo
.
get
(
"EQU_CATEGORY"
));
List
<
IdxBizJgUseInfo
>
toUpdateUseInfoList
=
initializeList
();
List
<
IdxBizJgUseInfo
>
toUpdateUseInfoList
=
initializeList
();
...
@@ -1141,10 +1146,12 @@ public class EquipClaimServiceImpl {
...
@@ -1141,10 +1146,12 @@ public class EquipClaimServiceImpl {
List
<
IdxBizJgTechParamsPipeline
>
toAddParamsPipelineList
=
initializeList
();
List
<
IdxBizJgTechParamsPipeline
>
toAddParamsPipelineList
=
initializeList
();
List
<
ESEquipmentCategoryDto
>
esEquipmentCategoryList
=
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
]);
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
)
{
for
(
Map
<
String
,
Object
>
pipeline
:
pipelineList
)
{
boolean
hasRecord
=
!
ObjectUtils
.
isEmpty
(
pipeline
.
get
(
"record"
));
boolean
hasRecord
=
!
ObjectUtils
.
isEmpty
(
pipeline
.
get
(
"record"
));
String
record
=
hasRecord
?
pipeline
.
get
(
"record"
).
toString
()
:
UUID
.
randomUUID
().
toString
();
String
record
=
hasRecord
?
pipeline
.
get
(
"record"
).
toString
()
:
UUID
.
randomUUID
().
toString
();
pipeline
.
put
(
"record"
,
record
);
// 更新时工业管道(8300)检验检测信息
// 更新时工业管道(8300)检验检测信息
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
toJSONString
(
pipeline
),
IdxBizJgInspectionDetectionInfo
.
class
);
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
toJSONString
(
pipeline
),
IdxBizJgInspectionDetectionInfo
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfo
))
{
...
@@ -1152,6 +1159,7 @@ public class EquipClaimServiceImpl {
...
@@ -1152,6 +1159,7 @@ public class EquipClaimServiceImpl {
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
Map
<
String
,
Object
>
mapOrDefault
=
optional
.
orElse
(
Collections
.
emptyMap
());
Map
<
String
,
Object
>
mapOrDefault
=
optional
.
orElse
(
Collections
.
emptyMap
());
inspectionDetectionInfo
.
setInspectOrgName
((
String
)
mapOrDefault
.
getOrDefault
(
"useUnit"
,
inspectionDetectionInfo
.
getInspectOrgName
()));
inspectionDetectionInfo
.
setInspectOrgName
((
String
)
mapOrDefault
.
getOrDefault
(
"useUnit"
,
inspectionDetectionInfo
.
getInspectOrgName
()));
inspectionDetectionInfo
.
setInspectConclusion
((
String
)
pipeline
.
getOrDefault
(
"inspectConclusionCode"
,
""
));
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
nowDate
);
inspectionDetectionInfo
.
setRecDate
(
nowDate
);
inspectionDetectionInfo
.
setSequenceNbr
(
null
);
inspectionDetectionInfo
.
setSequenceNbr
(
null
);
...
@@ -1209,7 +1217,7 @@ public class EquipClaimServiceImpl {
...
@@ -1209,7 +1217,7 @@ public class EquipClaimServiceImpl {
}
}
// 施工信息
// 施工信息
JSONObject
pipeJSON
=
new
JSONObject
(
pipeline
);
JSONObject
pipeJSON
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
pipeline
)
);
pipeJSON
.
remove
(
"uscDate"
);
pipeJSON
.
remove
(
"uscDate"
);
IdxBizJgConstructionInfo
constructionInfo
=
JSON
.
parseObject
(
toJSONString
(
pipeJSON
),
IdxBizJgConstructionInfo
.
class
);
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
));
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 {
...
@@ -1378,7 +1386,7 @@ public class EquipClaimServiceImpl {
if
(!
toUpdateParamsPipelineList
.
isEmpty
())
{
if
(!
toUpdateParamsPipelineList
.
isEmpty
())
{
iIdxBizJgTechParamsPipelineService
.
updateBatchByRecord
(
toUpdateParamsPipelineList
);
iIdxBizJgTechParamsPipelineService
.
updateBatchByRecord
(
toUpdateParamsPipelineList
);
}
}
equipInfo
.
put
(
PIPELINE_LIST
,
pipelineList
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryList
);
}
}
...
@@ -1396,7 +1404,23 @@ public class EquipClaimServiceImpl {
...
@@ -1396,7 +1404,23 @@ public class EquipClaimServiceImpl {
.
map
(
v
->
(
String
)
v
.
get
(
"pipelineNumber"
)).
distinct
().
count
())
{
.
map
(
v
->
(
String
)
v
.
get
(
"pipelineNumber"
)).
distinct
().
count
())
{
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
pipelineList
)
?
"请填写管道信息!"
:
"同一工程装置下管道编号不能重复!"
);
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
(
"管道编号与本单位原装置下的重复!"
);
}
}
}
}
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
d6d98801
...
@@ -1405,7 +1405,7 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -1405,7 +1405,7 @@ public class TzBaseEnterpriseInfoServiceImpl
String
oldSuperviseOrgCode
=
tzBaseEnterpriseInfo
.
getSuperviseOrgCode
();
String
oldSuperviseOrgCode
=
tzBaseEnterpriseInfo
.
getSuperviseOrgCode
();
String
newSuperviseOrgCode
=
companyModel
.
getOrgCode
().
replace
(
"*"
+
companyModel
.
getCompanyOrgCode
(),
""
);
String
newSuperviseOrgCode
=
companyModel
.
getOrgCode
().
replace
(
"*"
+
companyModel
.
getCompanyOrgCode
(),
""
);
// 更新 tz_base_enterprise_info。只有管辖机构有改动才更新
// 更新 tz_base_enterprise_info。只有管辖机构有改动才更新
if
(!
new
SuperviseOrgCode
.
equals
(
oldSupervise
OrgCode
))
{
if
(!
new
OrgCode
.
equals
(
old
OrgCode
))
{
HashMap
<
String
,
Object
>
parentMessage
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
newSuperviseOrgCode
).
getResult
();
HashMap
<
String
,
Object
>
parentMessage
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
newSuperviseOrgCode
).
getResult
();
// 目前平台返回key为compnay(存在拼写错误)
// 目前平台返回key为compnay(存在拼写错误)
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
parentMessage
.
get
(
"compnay"
)),
CompanyModel
.
class
);
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
parentMessage
.
get
(
"compnay"
)),
CompanyModel
.
class
);
...
@@ -1425,5 +1425,6 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -1425,5 +1425,6 @@ public class TzBaseEnterpriseInfoServiceImpl
public
void
updateUnitOrgCode
(
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
,
CompanyModel
parentModel
,
String
oldSuperviseOrgCode
,
String
newSuperviseOrgCode
,
String
oldOrgCode
,
String
newOrgCode
)
{
public
void
updateUnitOrgCode
(
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
,
CompanyModel
parentModel
,
String
oldSuperviseOrgCode
,
String
newSuperviseOrgCode
,
String
oldOrgCode
,
String
newOrgCode
)
{
tzBaseEnterpriseInfoMapper
.
updateSubCompanyOrgCode
(
parentModel
.
getCompanyName
(),
oldSuperviseOrgCode
,
newSuperviseOrgCode
,
oldOrgCode
,
newOrgCode
,
tzBaseEnterpriseInfo
.
getSequenceNbr
());
tzBaseEnterpriseInfoMapper
.
updateSubCompanyOrgCode
(
parentModel
.
getCompanyName
(),
oldSuperviseOrgCode
,
newSuperviseOrgCode
,
oldOrgCode
,
newOrgCode
,
tzBaseEnterpriseInfo
.
getSequenceNbr
());
tzBaseEnterpriseInfoMapper
.
updateUnitOrgCode
(
oldOrgCode
,
newOrgCode
);
tzBaseEnterpriseInfoMapper
.
updateUnitOrgCode
(
oldOrgCode
,
newOrgCode
);
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
tzBaseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
UPDATE
));
}
}
}
}
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